From d5fe655714188fe86bddd3aff583faa8357ae69e Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Wed, 7 Oct 2026 04:29:07 -0400 Subject: [PATCH] Initial commit: Structure de base du projet et fichiers de configuration --- build.sh | 57 + capacitor.config.ts | 12 + index.html | 147 + node_modules/.bin/cap | 1 + node_modules/.bin/capacitor | 1 + node_modules/.bin/is-docker | 1 + node_modules/.bin/mkdirp | 1 + node_modules/.bin/native-run | 1 + node_modules/.bin/node-which | 1 + node_modules/.bin/rimraf | 1 + node_modules/.bin/semver | 1 + node_modules/.bin/tree-kill | 1 + node_modules/.bin/tsc | 1 + node_modules/.package-lock.json | 1284 + .../@capacitor/app/CapacitorApp.podspec | 17 + node_modules/@capacitor/app/LICENSE | 23 + node_modules/@capacitor/app/README.md | 423 + .../@capacitor/app/android/build.gradle | 79 + .../app/android/src/main/AndroidManifest.xml | 2 + .../capacitorjs/plugins/app/AppPlugin.java | 162 + .../@capacitor/app/dist/esm/definitions.d.ts | 246 + .../@capacitor/app/dist/esm/definitions.js | 2 + .../app/dist/esm/definitions.js.map | 1 + .../@capacitor/app/dist/esm/index.d.ts | 4 + node_modules/@capacitor/app/dist/esm/index.js | 7 + .../@capacitor/app/dist/esm/index.js.map | 1 + node_modules/@capacitor/app/dist/esm/web.d.ts | 11 + node_modules/@capacitor/app/dist/esm/web.js | 35 + .../@capacitor/app/dist/esm/web.js.map | 1 + .../@capacitor/app/dist/plugin.cjs.js | 51 + .../@capacitor/app/dist/plugin.cjs.js.map | 1 + node_modules/@capacitor/app/dist/plugin.js | 54 + .../@capacitor/app/dist/plugin.js.map | 1 + .../@capacitor/app/ios/Plugin/AppPlugin.h | 10 + .../@capacitor/app/ios/Plugin/AppPlugin.m | 13 + .../@capacitor/app/ios/Plugin/AppPlugin.swift | 107 + .../@capacitor/app/ios/Plugin/Info.plist | 24 + node_modules/@capacitor/app/package.json | 83 + node_modules/@capacitor/cli/LICENSE | 21 + node_modules/@capacitor/cli/README.md | 15 + .../cli/assets/android-template.tar.gz | Bin 0 -> 233664 bytes .../capacitor-cordova-android-plugins.tar.gz | Bin 0 -> 930 bytes .../capacitor-cordova-ios-plugins.tar.gz | Bin 0 -> 433 bytes .../@capacitor/cli/assets/ios-template.tar.gz | Bin 0 -> 155641 bytes node_modules/@capacitor/cli/bin/capacitor | 18 + .../@capacitor/cli/dist/android/add.js | 52 + .../@capacitor/cli/dist/android/build.js | 100 + .../@capacitor/cli/dist/android/common.js | 97 + .../@capacitor/cli/dist/android/doctor.js | 163 + .../@capacitor/cli/dist/android/open.js | 28 + .../@capacitor/cli/dist/android/run.js | 42 + .../@capacitor/cli/dist/android/update.js | 323 + node_modules/@capacitor/cli/dist/colors.js | 26 + node_modules/@capacitor/cli/dist/common.js | 398 + node_modules/@capacitor/cli/dist/config.js | 396 + node_modules/@capacitor/cli/dist/cordova.js | 829 + .../@capacitor/cli/dist/declarations.d.ts | 605 + .../@capacitor/cli/dist/declarations.js | 2 + .../@capacitor/cli/dist/definitions.js | 2 + node_modules/@capacitor/cli/dist/errors.js | 27 + .../@capacitor/cli/dist/framework-configs.js | 109 + node_modules/@capacitor/cli/dist/index.js | 212 + node_modules/@capacitor/cli/dist/ios/add.js | 13 + node_modules/@capacitor/cli/dist/ios/build.js | 56 + .../@capacitor/cli/dist/ios/common.js | 103 + .../@capacitor/cli/dist/ios/doctor.js | 49 + node_modules/@capacitor/cli/dist/ios/open.js | 11 + node_modules/@capacitor/cli/dist/ios/run.js | 38 + .../@capacitor/cli/dist/ios/update.js | 406 + node_modules/@capacitor/cli/dist/ipc.js | 61 + node_modules/@capacitor/cli/dist/log.js | 41 + node_modules/@capacitor/cli/dist/plugin.js | 186 + node_modules/@capacitor/cli/dist/sysconfig.js | 35 + node_modules/@capacitor/cli/dist/tasks/add.js | 122 + .../@capacitor/cli/dist/tasks/build.js | 61 + .../@capacitor/cli/dist/tasks/config.js | 31 + .../@capacitor/cli/dist/tasks/copy.js | 212 + .../@capacitor/cli/dist/tasks/create.js | 11 + .../@capacitor/cli/dist/tasks/doctor.js | 73 + .../@capacitor/cli/dist/tasks/init.js | 143 + .../@capacitor/cli/dist/tasks/list.js | 50 + .../@capacitor/cli/dist/tasks/migrate.js | 611 + .../@capacitor/cli/dist/tasks/new-plugin.js | 11 + .../@capacitor/cli/dist/tasks/open.js | 62 + node_modules/@capacitor/cli/dist/tasks/run.js | 114 + .../@capacitor/cli/dist/tasks/serve.js | 11 + .../@capacitor/cli/dist/tasks/sourcemaps.js | 40 + .../@capacitor/cli/dist/tasks/sync.js | 59 + .../@capacitor/cli/dist/tasks/telemetry.js | 40 + .../@capacitor/cli/dist/tasks/update.js | 74 + node_modules/@capacitor/cli/dist/telemetry.js | 130 + node_modules/@capacitor/cli/dist/util/cli.js | 25 + .../@capacitor/cli/dist/util/emoji.js | 13 + node_modules/@capacitor/cli/dist/util/fn.js | 13 + node_modules/@capacitor/cli/dist/util/fs.js | 24 + node_modules/@capacitor/cli/dist/util/js.js | 21 + .../@capacitor/cli/dist/util/livereload.js | 151 + .../@capacitor/cli/dist/util/monorepotools.js | 110 + .../@capacitor/cli/dist/util/native-run.js | 53 + node_modules/@capacitor/cli/dist/util/node.js | 54 + .../@capacitor/cli/dist/util/promise.js | 35 + .../@capacitor/cli/dist/util/subprocess.js | 43 + .../@capacitor/cli/dist/util/template.js | 11 + node_modules/@capacitor/cli/dist/util/term.js | 30 + node_modules/@capacitor/cli/dist/util/uuid.js | 11 + node_modules/@capacitor/cli/dist/util/xml.js | 57 + node_modules/@capacitor/cli/dist/web/copy.js | 22 + node_modules/@capacitor/cli/package.json | 88 + node_modules/@capacitor/core/LICENSE | 21 + node_modules/@capacitor/core/README.md | 3 + node_modules/@capacitor/core/cordova.js | 1689 + .../@capacitor/core/dist/capacitor.js | 3 + .../@capacitor/core/dist/capacitor.js.map | 1 + .../@capacitor/core/dist/index.cjs.js | 698 + .../@capacitor/core/dist/index.cjs.js.map | 1 + node_modules/@capacitor/core/dist/index.js | 682 + .../@capacitor/core/dist/index.js.map | 1 + node_modules/@capacitor/core/package.json | 57 + .../@capacitor/core/types/core-plugins.d.ts | 160 + .../core/types/definitions-internal.d.ts | 175 + .../@capacitor/core/types/definitions.d.ts | 96 + .../@capacitor/core/types/global.d.ts | 21 + node_modules/@capacitor/core/types/index.d.ts | 9 + .../core/types/legacy/legacy-definitions.d.ts | 37 + .../types/legacy/legacy-web-plugin-merge.d.ts | 3 + .../@capacitor/core/types/platforms.d.ts | 28 + .../@capacitor/core/types/runtime.d.ts | 9 + node_modules/@capacitor/core/types/util.d.ts | 28 + .../@capacitor/core/types/web-plugin.d.ts | 48 + .../@ionic/cli-framework-output/LICENSE | 21 + .../@ionic/cli-framework-output/README.md | 1 + .../cli-framework-output/dist/colors.d.ts | 33 + .../cli-framework-output/dist/colors.js | 18 + .../cli-framework-output/dist/index.d.ts | 24 + .../@ionic/cli-framework-output/dist/index.js | 29 + .../cli-framework-output/dist/logger.d.ts | 105 + .../cli-framework-output/dist/logger.js | 203 + .../cli-framework-output/dist/output.d.ts | 41 + .../cli-framework-output/dist/output.js | 86 + .../cli-framework-output/dist/tasks.d.ts | 79 + .../@ionic/cli-framework-output/dist/tasks.js | 141 + .../cli-framework-output/dist/utils.d.ts | 4 + .../@ionic/cli-framework-output/dist/utils.js | 39 + .../@ionic/cli-framework-output/package.json | 50 + node_modules/@ionic/utils-array/CHANGELOG.md | 185 + node_modules/@ionic/utils-array/LICENSE | 21 + node_modules/@ionic/utils-array/README.md | 1 + .../@ionic/utils-array/dist/index.d.ts | 39 + node_modules/@ionic/utils-array/dist/index.js | 97 + node_modules/@ionic/utils-array/package.json | 49 + node_modules/@ionic/utils-fs/CHANGELOG.md | 318 + node_modules/@ionic/utils-fs/LICENSE | 21 + node_modules/@ionic/utils-fs/README.md | 1 + node_modules/@ionic/utils-fs/dist/index.d.ts | 148 + node_modules/@ionic/utils-fs/dist/index.js | 286 + node_modules/@ionic/utils-fs/dist/safe.d.ts | 4 + node_modules/@ionic/utils-fs/dist/safe.js | 22 + node_modules/@ionic/utils-fs/package.json | 51 + node_modules/@ionic/utils-object/CHANGELOG.md | 170 + node_modules/@ionic/utils-object/LICENSE | 21 + node_modules/@ionic/utils-object/README.md | 1 + .../@ionic/utils-object/dist/index.d.ts | 10 + .../@ionic/utils-object/dist/index.js | 49 + node_modules/@ionic/utils-object/package.json | 49 + .../@ionic/utils-process/CHANGELOG.md | 253 + node_modules/@ionic/utils-process/LICENSE | 21 + node_modules/@ionic/utils-process/README.md | 1 + .../@ionic/utils-process/dist/index.d.ts | 63 + .../@ionic/utils-process/dist/index.js | 158 + .../@ionic/utils-terminal/CHANGELOG.md | 252 + .../@ionic/utils-terminal/LICENSE | 21 + .../@ionic/utils-terminal/README.md | 1 + .../@ionic/utils-terminal/dist/ansi.d.ts | 19 + .../@ionic/utils-terminal/dist/ansi.js | 33 + .../@ionic/utils-terminal/dist/cursor.d.ts | 9 + .../@ionic/utils-terminal/dist/cursor.js | 37 + .../@ionic/utils-terminal/dist/format.d.ts | 35 + .../@ionic/utils-terminal/dist/format.js | 122 + .../@ionic/utils-terminal/dist/index.d.ts | 4 + .../@ionic/utils-terminal/dist/index.js | 7 + .../@ionic/utils-terminal/dist/info.d.ts | 26 + .../@ionic/utils-terminal/dist/info.js | 39 + .../@ionic/utils-terminal/package.json | 58 + .../@ionic/utils-process/package.json | 54 + node_modules/@ionic/utils-stream/CHANGELOG.md | 187 + node_modules/@ionic/utils-stream/LICENSE | 21 + node_modules/@ionic/utils-stream/README.md | 1 + .../@ionic/utils-stream/dist/index.d.ts | 39 + .../@ionic/utils-stream/dist/index.js | 108 + node_modules/@ionic/utils-stream/package.json | 50 + node_modules/@ionic/utils-subprocess/LICENSE | 21 + .../@ionic/utils-subprocess/README.md | 1 + .../@ionic/utils-subprocess/dist/index.d.ts | 102 + .../@ionic/utils-subprocess/dist/index.js | 230 + .../@ionic/utils-terminal/CHANGELOG.md | 252 + .../@ionic/utils-terminal/LICENSE | 21 + .../@ionic/utils-terminal/README.md | 1 + .../@ionic/utils-terminal/dist/ansi.d.ts | 19 + .../@ionic/utils-terminal/dist/ansi.js | 33 + .../@ionic/utils-terminal/dist/cursor.d.ts | 9 + .../@ionic/utils-terminal/dist/cursor.js | 37 + .../@ionic/utils-terminal/dist/format.d.ts | 35 + .../@ionic/utils-terminal/dist/format.js | 122 + .../@ionic/utils-terminal/dist/index.d.ts | 4 + .../@ionic/utils-terminal/dist/index.js | 7 + .../@ionic/utils-terminal/dist/info.d.ts | 26 + .../@ionic/utils-terminal/dist/info.js | 39 + .../@ionic/utils-terminal/package.json | 58 + .../@ionic/utils-subprocess/package.json | 55 + node_modules/@ionic/utils-terminal/LICENSE | 21 + node_modules/@ionic/utils-terminal/README.md | 1 + .../@ionic/utils-terminal/dist/ansi.d.ts | 19 + .../@ionic/utils-terminal/dist/ansi.js | 33 + .../@ionic/utils-terminal/dist/cursor.d.ts | 9 + .../@ionic/utils-terminal/dist/cursor.js | 38 + .../@ionic/utils-terminal/dist/format.d.ts | 35 + .../@ionic/utils-terminal/dist/format.js | 123 + .../@ionic/utils-terminal/dist/index.d.ts | 4 + .../@ionic/utils-terminal/dist/index.js | 7 + .../@ionic/utils-terminal/dist/info.d.ts | 26 + .../@ionic/utils-terminal/dist/info.js | 40 + .../@ionic/utils-terminal/package.json | 57 + node_modules/@types/fs-extra/LICENSE | 21 + node_modules/@types/fs-extra/README.md | 15 + node_modules/@types/fs-extra/index.d.ts | 465 + node_modules/@types/fs-extra/package.json | 62 + node_modules/@types/node/LICENSE | 21 + node_modules/@types/node/README.md | 15 + node_modules/@types/node/assert.d.ts | 1077 + node_modules/@types/node/assert/strict.d.ts | 68 + node_modules/@types/node/async_hooks.d.ts | 711 + node_modules/@types/node/buffer.buffer.d.ts | 471 + node_modules/@types/node/buffer.d.ts | 1800 + node_modules/@types/node/child_process.d.ts | 1361 + node_modules/@types/node/cluster.d.ts | 432 + node_modules/@types/node/console.d.ts | 93 + node_modules/@types/node/constants.d.ts | 14 + node_modules/@types/node/crypto.d.ts | 3964 ++ node_modules/@types/node/dgram.d.ts | 652 + .../@types/node/diagnostics_channel.d.ts | 794 + node_modules/@types/node/dns.d.ts | 876 + node_modules/@types/node/dns/promises.d.ts | 497 + node_modules/@types/node/domain.d.ts | 150 + node_modules/@types/node/events.d.ts | 1008 + node_modules/@types/node/ffi.d.ts | 500 + node_modules/@types/node/fs.d.ts | 4803 ++ node_modules/@types/node/fs/promises.d.ts | 1477 + node_modules/@types/node/globals.d.ts | 150 + .../@types/node/globals.typedarray.d.ts | 101 + node_modules/@types/node/http.d.ts | 2218 + node_modules/@types/node/http2.d.ts | 2498 + node_modules/@types/node/https.d.ts | 400 + node_modules/@types/node/index.d.ts | 116 + node_modules/@types/node/inspector.d.ts | 265 + .../@types/node/inspector.generated.d.ts | 4406 ++ .../@types/node/inspector/promises.d.ts | 35 + node_modules/@types/node/module.d.ts | 726 + node_modules/@types/node/net.d.ts | 1074 + node_modules/@types/node/os.d.ts | 498 + node_modules/@types/node/package.json | 140 + node_modules/@types/node/path.d.ts | 178 + node_modules/@types/node/path/posix.d.ts | 8 + node_modules/@types/node/path/win32.d.ts | 8 + node_modules/@types/node/perf_hooks.d.ts | 617 + node_modules/@types/node/process.d.ts | 2269 + node_modules/@types/node/punycode.d.ts | 89 + node_modules/@types/node/querystring.d.ts | 139 + node_modules/@types/node/quic.d.ts | 2191 + node_modules/@types/node/readline.d.ts | 508 + .../@types/node/readline/promises.d.ts | 158 + node_modules/@types/node/repl.d.ts | 420 + node_modules/@types/node/sea.d.ts | 47 + node_modules/@types/node/sqlite.d.ts | 1140 + node_modules/@types/node/stream.d.ts | 1806 + .../@types/node/stream/consumers.d.ts | 114 + node_modules/@types/node/stream/iter.d.ts | 449 + node_modules/@types/node/stream/promises.d.ts | 211 + node_modules/@types/node/stream/web.d.ts | 320 + node_modules/@types/node/string_decoder.d.ts | 27 + node_modules/@types/node/test.d.ts | 2558 + node_modules/@types/node/test/reporters.d.ts | 60 + node_modules/@types/node/timers.d.ts | 149 + node_modules/@types/node/timers/promises.d.ts | 93 + node_modules/@types/node/tls.d.ts | 1232 + node_modules/@types/node/trace_events.d.ts | 103 + .../@types/node/ts5.6/buffer.buffer.d.ts | 467 + .../ts5.6/compatibility/float16array.d.ts | 71 + .../@types/node/ts5.6/globals.typedarray.d.ts | 36 + node_modules/@types/node/ts5.6/index.d.ts | 118 + .../ts5.7/compatibility/float16array.d.ts | 72 + node_modules/@types/node/ts5.7/index.d.ts | 118 + node_modules/@types/node/tty.d.ts | 226 + node_modules/@types/node/url.d.ts | 556 + node_modules/@types/node/util.d.ts | 1677 + node_modules/@types/node/util/types.d.ts | 558 + node_modules/@types/node/v8.d.ts | 1059 + node_modules/@types/node/vfs.d.ts | 211 + node_modules/@types/node/vm.d.ts | 1137 + node_modules/@types/node/wasi.d.ts | 131 + .../node/web-globals/abortcontroller.d.ts | 59 + .../@types/node/web-globals/blob.d.ts | 23 + .../@types/node/web-globals/console.d.ts | 9 + .../@types/node/web-globals/crypto.d.ts | 39 + .../@types/node/web-globals/domexception.d.ts | 83 + .../@types/node/web-globals/encoding.d.ts | 11 + .../@types/node/web-globals/events.d.ts | 106 + .../@types/node/web-globals/fetch.d.ts | 69 + .../@types/node/web-globals/importmeta.d.ts | 13 + .../@types/node/web-globals/messaging.d.ts | 23 + .../@types/node/web-globals/navigator.d.ts | 25 + .../@types/node/web-globals/performance.d.ts | 45 + .../@types/node/web-globals/storage.d.ts | 24 + .../@types/node/web-globals/streams.d.ts | 119 + .../@types/node/web-globals/timers.d.ts | 44 + node_modules/@types/node/web-globals/url.d.ts | 24 + node_modules/@types/node/worker_threads.d.ts | 672 + node_modules/@types/node/zlib.d.ts | 612 + node_modules/@types/node/zlib/iter.d.ts | 131 + node_modules/@types/slice-ansi/LICENSE | 21 + node_modules/@types/slice-ansi/README.md | 16 + node_modules/@types/slice-ansi/index.d.ts | 15 + node_modules/@types/slice-ansi/package.json | 29 + .../@typescript/typescript-linux-x64/LICENSE | 55 + .../typescript-linux-x64/NOTICE.txt | 436 + .../typescript-linux-x64/README.md | 3 + .../typescript-linux-x64/lib/lib.d.ts | 20 + .../lib/lib.decorators.d.ts | 382 + .../lib/lib.decorators.legacy.d.ts | 20 + .../lib/lib.dom.asynciterable.d.ts | 18 + .../typescript-linux-x64/lib/lib.dom.d.ts | 45125 ++++++++++++++++ .../lib/lib.dom.iterable.d.ts | 18 + .../lib/lib.es2015.collection.d.ts | 159 + .../lib/lib.es2015.core.d.ts | 595 + .../typescript-linux-x64/lib/lib.es2015.d.ts | 26 + .../lib/lib.es2015.generator.d.ts | 75 + .../lib/lib.es2015.iterable.d.ts | 603 + .../lib/lib.es2015.promise.d.ts | 79 + .../lib/lib.es2015.proxy.d.ts | 126 + .../lib/lib.es2015.reflect.d.ts | 142 + .../lib/lib.es2015.symbol.d.ts | 44 + .../lib/lib.es2015.symbol.wellknown.d.ts | 324 + .../lib/lib.es2016.array.include.d.ts | 114 + .../typescript-linux-x64/lib/lib.es2016.d.ts | 19 + .../lib/lib.es2016.full.d.ts | 21 + .../lib/lib.es2016.intl.d.ts | 29 + .../lib/lib.es2017.arraybuffer.d.ts | 19 + .../typescript-linux-x64/lib/lib.es2017.d.ts | 24 + .../lib/lib.es2017.date.d.ts | 29 + .../lib/lib.es2017.full.d.ts | 21 + .../lib/lib.es2017.intl.d.ts | 42 + .../lib/lib.es2017.object.d.ts | 47 + .../lib/lib.es2017.sharedmemory.d.ts | 133 + .../lib/lib.es2017.string.d.ts | 47 + .../lib/lib.es2017.typedarrays.d.ts | 51 + .../lib/lib.es2018.asyncgenerator.d.ts | 75 + .../lib/lib.es2018.asynciterable.d.ts | 51 + .../typescript-linux-x64/lib/lib.es2018.d.ts | 22 + .../lib/lib.es2018.full.d.ts | 22 + .../lib/lib.es2018.intl.d.ts | 81 + .../lib/lib.es2018.promise.d.ts | 28 + .../lib/lib.es2018.regexp.d.ts | 35 + .../lib/lib.es2019.array.d.ts | 77 + .../typescript-linux-x64/lib/lib.es2019.d.ts | 22 + .../lib/lib.es2019.full.d.ts | 22 + .../lib/lib.es2019.intl.d.ts | 21 + .../lib/lib.es2019.object.d.ts | 31 + .../lib/lib.es2019.string.d.ts | 35 + .../lib/lib.es2019.symbol.d.ts | 22 + .../lib/lib.es2020.bigint.d.ts | 763 + .../typescript-linux-x64/lib/lib.es2020.d.ts | 25 + .../lib/lib.es2020.date.d.ts | 40 + .../lib/lib.es2020.full.d.ts | 22 + .../lib/lib.es2020.intl.d.ts | 472 + .../lib/lib.es2020.number.d.ts | 26 + .../lib/lib.es2020.promise.d.ts | 45 + .../lib/lib.es2020.sharedmemory.d.ts | 97 + .../lib/lib.es2020.string.d.ts | 42 + .../lib/lib.es2020.symbol.wellknown.d.ts | 39 + .../typescript-linux-x64/lib/lib.es2021.d.ts | 21 + .../lib/lib.es2021.full.d.ts | 22 + .../lib/lib.es2021.intl.d.ts | 164 + .../lib/lib.es2021.promise.d.ts | 46 + .../lib/lib.es2021.string.d.ts | 31 + .../lib/lib.es2021.weakref.d.ts | 76 + .../lib/lib.es2022.array.d.ts | 119 + .../typescript-linux-x64/lib/lib.es2022.d.ts | 23 + .../lib/lib.es2022.error.d.ts | 73 + .../lib/lib.es2022.full.d.ts | 22 + .../lib/lib.es2022.intl.d.ts | 143 + .../lib/lib.es2022.object.d.ts | 24 + .../lib/lib.es2022.regexp.d.ts | 37 + .../lib/lib.es2022.string.d.ts | 23 + .../lib/lib.es2023.array.d.ts | 922 + .../lib/lib.es2023.collection.d.ts | 19 + .../typescript-linux-x64/lib/lib.es2023.d.ts | 20 + .../lib/lib.es2023.full.d.ts | 22 + .../lib/lib.es2023.intl.d.ts | 62 + .../lib/lib.es2024.arraybuffer.d.ts | 63 + .../lib/lib.es2024.collection.d.ts | 27 + .../typescript-linux-x64/lib/lib.es2024.d.ts | 24 + .../lib/lib.es2024.full.d.ts | 22 + .../lib/lib.es2024.object.d.ts | 27 + .../lib/lib.es2024.promise.d.ts | 33 + .../lib/lib.es2024.regexp.d.ts | 23 + .../lib/lib.es2024.sharedmemory.d.ts | 66 + .../lib/lib.es2024.string.d.ts | 27 + .../lib/lib.es2025.collection.d.ts | 94 + .../typescript-linux-x64/lib/lib.es2025.d.ts | 23 + .../lib/lib.es2025.float16.d.ts | 443 + .../lib/lib.es2025.full.d.ts | 22 + .../lib/lib.es2025.intl.d.ts | 200 + .../lib/lib.es2025.iterator.d.ts | 146 + .../lib/lib.es2025.promise.d.ts | 32 + .../lib/lib.es2025.regexp.d.ts | 30 + .../typescript-linux-x64/lib/lib.es5.d.ts | 4599 ++ .../typescript-linux-x64/lib/lib.es6.d.ts | 21 + .../lib/lib.esnext.array.d.ts | 33 + .../lib/lib.esnext.collection.d.ts | 47 + .../typescript-linux-x64/lib/lib.esnext.d.ts | 27 + .../lib/lib.esnext.date.d.ts | 21 + .../lib/lib.esnext.decorators.d.ts | 26 + .../lib/lib.esnext.disposable.d.ts | 191 + .../lib/lib.esnext.error.d.ts | 22 + .../lib/lib.esnext.full.d.ts | 22 + .../lib/lib.esnext.intl.d.ts | 107 + .../lib/lib.esnext.sharedmemory.d.ts | 23 + .../lib/lib.esnext.temporal.d.ts | 485 + .../lib/lib.esnext.typedarrays.d.ts | 90 + .../lib/lib.scripthost.d.ts | 320 + .../lib/lib.webworker.asynciterable.d.ts | 18 + .../lib/lib.webworker.d.ts | 15606 ++++++ .../lib/lib.webworker.importscripts.d.ts | 21 + .../lib/lib.webworker.iterable.d.ts | 18 + .../@typescript/typescript-linux-x64/lib/tsc | Bin 0 -> 24101026 bytes .../typescript-linux-x64/lib/tsc.sig | 11 + .../typescript-linux-x64/package.json | 45 + node_modules/@xmldom/xmldom/CHANGELOG.md | 1132 + node_modules/@xmldom/xmldom/LICENSE | 8 + node_modules/@xmldom/xmldom/SECURITY.md | 50 + node_modules/@xmldom/xmldom/index.d.ts | 1843 + node_modules/@xmldom/xmldom/lib/.eslintrc.yml | 3 + .../@xmldom/xmldom/lib/conventions.js | 429 + node_modules/@xmldom/xmldom/lib/dom-parser.js | 591 + node_modules/@xmldom/xmldom/lib/dom.js | 3759 ++ node_modules/@xmldom/xmldom/lib/entities.js | 2171 + node_modules/@xmldom/xmldom/lib/errors.js | 205 + node_modules/@xmldom/xmldom/lib/grammar.js | 559 + node_modules/@xmldom/xmldom/lib/index.js | 41 + node_modules/@xmldom/xmldom/lib/sax.js | 983 + node_modules/@xmldom/xmldom/package.json | 77 + node_modules/@xmldom/xmldom/readme.md | 366 + node_modules/ansi-regex/index.d.ts | 37 + node_modules/ansi-regex/index.js | 10 + node_modules/ansi-regex/license | 9 + node_modules/ansi-regex/package.json | 55 + node_modules/ansi-regex/readme.md | 78 + node_modules/ansi-styles/index.d.ts | 345 + node_modules/ansi-styles/index.js | 163 + node_modules/ansi-styles/license | 9 + node_modules/ansi-styles/package.json | 56 + node_modules/ansi-styles/readme.md | 152 + node_modules/astral-regex/index.d.ts | 28 + node_modules/astral-regex/index.js | 6 + node_modules/astral-regex/license | 9 + node_modules/astral-regex/package.json | 33 + node_modules/astral-regex/readme.md | 46 + node_modules/at-least-node/LICENSE | 6 + node_modules/at-least-node/README.md | 25 + node_modules/at-least-node/index.js | 5 + node_modules/at-least-node/package.json | 32 + .../balanced-match/.github/FUNDING.yml | 2 + node_modules/balanced-match/LICENSE.md | 21 + node_modules/balanced-match/README.md | 97 + node_modules/balanced-match/index.js | 62 + node_modules/balanced-match/package.json | 48 + node_modules/base64-js/LICENSE | 21 + node_modules/base64-js/README.md | 34 + node_modules/base64-js/base64js.min.js | 1 + node_modules/base64-js/index.d.ts | 3 + node_modules/base64-js/index.js | 150 + node_modules/base64-js/package.json | 47 + node_modules/big-integer/BigInteger.d.ts | 2393 + node_modules/big-integer/BigInteger.js | 1453 + node_modules/big-integer/BigInteger.min.js | 1 + node_modules/big-integer/LICENSE | 24 + node_modules/big-integer/README.md | 589 + node_modules/big-integer/bower.json | 29 + node_modules/big-integer/package.json | 48 + node_modules/big-integer/tsconfig.json | 24 + node_modules/bplist-parser/.editorconfig | 12 + node_modules/bplist-parser/.eslintignore | 1 + node_modules/bplist-parser/.eslintrc.js | 296 + node_modules/bplist-parser/README.md | 48 + node_modules/bplist-parser/bplistParser.d.ts | 8 + node_modules/bplist-parser/bplistParser.js | 373 + node_modules/bplist-parser/package.json | 35 + .../brace-expansion/.github/FUNDING.yml | 2 + node_modules/brace-expansion/LICENSE | 21 + node_modules/brace-expansion/README.md | 157 + node_modules/brace-expansion/index.js | 394 + node_modules/brace-expansion/package.json | 49 + node_modules/buffer-crc32/LICENSE | 19 + node_modules/buffer-crc32/README.md | 47 + node_modules/buffer-crc32/index.js | 111 + node_modules/buffer-crc32/package.json | 39 + node_modules/chownr/LICENSE | 15 + node_modules/chownr/README.md | 3 + node_modules/chownr/chownr.js | 167 + node_modules/chownr/package.json | 32 + node_modules/color-convert/CHANGELOG.md | 54 + node_modules/color-convert/LICENSE | 21 + node_modules/color-convert/README.md | 68 + node_modules/color-convert/conversions.js | 839 + node_modules/color-convert/index.js | 81 + node_modules/color-convert/package.json | 48 + node_modules/color-convert/route.js | 97 + node_modules/color-name/LICENSE | 8 + node_modules/color-name/README.md | 11 + node_modules/color-name/index.js | 152 + node_modules/color-name/package.json | 28 + node_modules/commander/LICENSE | 22 + node_modules/commander/Readme.md | 1129 + node_modules/commander/esm.mjs | 16 + node_modules/commander/index.js | 27 + node_modules/commander/lib/argument.js | 147 + node_modules/commander/lib/command.js | 2179 + node_modules/commander/lib/error.js | 45 + node_modules/commander/lib/help.js | 461 + node_modules/commander/lib/option.js | 326 + node_modules/commander/lib/suggestSimilar.js | 100 + node_modules/commander/package-support.json | 16 + node_modules/commander/package.json | 80 + node_modules/commander/typings/index.d.ts | 891 + node_modules/cross-spawn/LICENSE | 21 + node_modules/cross-spawn/README.md | 89 + node_modules/cross-spawn/index.js | 39 + node_modules/cross-spawn/lib/enoent.js | 59 + node_modules/cross-spawn/lib/parse.js | 91 + node_modules/cross-spawn/lib/util/escape.js | 47 + .../cross-spawn/lib/util/readShebang.js | 23 + .../cross-spawn/lib/util/resolveCommand.js | 52 + node_modules/cross-spawn/package.json | 73 + node_modules/debug/LICENSE | 20 + node_modules/debug/README.md | 481 + node_modules/debug/package.json | 64 + node_modules/debug/src/browser.js | 272 + node_modules/debug/src/common.js | 292 + node_modules/debug/src/index.js | 10 + node_modules/debug/src/node.js | 263 + node_modules/define-lazy-prop/index.d.ts | 33 + node_modules/define-lazy-prop/index.js | 19 + node_modules/define-lazy-prop/license | 9 + node_modules/define-lazy-prop/package.json | 48 + node_modules/define-lazy-prop/readme.md | 64 + node_modules/elementtree/.npmignore | 1 + node_modules/elementtree/.travis.yml | 14 + node_modules/elementtree/CHANGES.md | 39 + node_modules/elementtree/LICENSE.txt | 203 + node_modules/elementtree/Makefile | 21 + node_modules/elementtree/NOTICE | 5 + node_modules/elementtree/README.md | 141 + node_modules/elementtree/lib/constants.js | 20 + node_modules/elementtree/lib/elementpath.js | 343 + node_modules/elementtree/lib/elementtree.js | 611 + node_modules/elementtree/lib/errors.js | 31 + node_modules/elementtree/lib/parser.js | 33 + node_modules/elementtree/lib/parsers/index.js | 1 + node_modules/elementtree/lib/parsers/sax.js | 56 + node_modules/elementtree/lib/sprintf.js | 86 + node_modules/elementtree/lib/treebuilder.js | 60 + node_modules/elementtree/lib/utils.js | 72 + node_modules/elementtree/package.json | 39 + .../elementtree/tests/data/bom-xml.xml | 17 + node_modules/elementtree/tests/data/xml1.xml | 17 + node_modules/elementtree/tests/data/xml2.xml | 14 + node_modules/elementtree/tests/test-simple.js | 348 + node_modules/emoji-regex/LICENSE-MIT.txt | 20 + node_modules/emoji-regex/README.md | 73 + node_modules/emoji-regex/es2015/index.js | 6 + node_modules/emoji-regex/es2015/text.js | 6 + node_modules/emoji-regex/index.d.ts | 23 + node_modules/emoji-regex/index.js | 6 + node_modules/emoji-regex/package.json | 50 + node_modules/emoji-regex/text.js | 6 + node_modules/env-paths/index.d.ts | 101 + node_modules/env-paths/index.js | 74 + node_modules/env-paths/license | 9 + node_modules/env-paths/package.json | 45 + node_modules/env-paths/readme.md | 115 + node_modules/fd-slicer/.npmignore | 2 + node_modules/fd-slicer/.travis.yml | 7 + node_modules/fd-slicer/CHANGELOG.md | 49 + node_modules/fd-slicer/LICENSE | 21 + node_modules/fd-slicer/README.md | 199 + node_modules/fd-slicer/index.js | 296 + node_modules/fd-slicer/package.json | 36 + node_modules/fd-slicer/test/test.js | 350 + node_modules/fs-extra/CHANGELOG.md | 902 + node_modules/fs-extra/LICENSE | 15 + node_modules/fs-extra/README.md | 264 + .../fs-extra/lib/copy-sync/copy-sync.js | 166 + node_modules/fs-extra/lib/copy-sync/index.js | 5 + node_modules/fs-extra/lib/copy/copy.js | 232 + node_modules/fs-extra/lib/copy/index.js | 6 + node_modules/fs-extra/lib/empty/index.js | 48 + node_modules/fs-extra/lib/ensure/file.js | 69 + node_modules/fs-extra/lib/ensure/index.js | 23 + node_modules/fs-extra/lib/ensure/link.js | 61 + .../fs-extra/lib/ensure/symlink-paths.js | 99 + .../fs-extra/lib/ensure/symlink-type.js | 31 + node_modules/fs-extra/lib/ensure/symlink.js | 63 + node_modules/fs-extra/lib/fs/index.js | 130 + node_modules/fs-extra/lib/index.js | 27 + node_modules/fs-extra/lib/json/index.js | 16 + node_modules/fs-extra/lib/json/jsonfile.js | 11 + .../fs-extra/lib/json/output-json-sync.js | 12 + node_modules/fs-extra/lib/json/output-json.js | 12 + node_modules/fs-extra/lib/mkdirs/index.js | 14 + node_modules/fs-extra/lib/mkdirs/make-dir.js | 141 + node_modules/fs-extra/lib/move-sync/index.js | 5 + .../fs-extra/lib/move-sync/move-sync.js | 47 + node_modules/fs-extra/lib/move/index.js | 6 + node_modules/fs-extra/lib/move/move.js | 65 + node_modules/fs-extra/lib/output/index.js | 40 + .../fs-extra/lib/path-exists/index.js | 12 + node_modules/fs-extra/lib/remove/index.js | 9 + node_modules/fs-extra/lib/remove/rimraf.js | 302 + node_modules/fs-extra/lib/util/stat.js | 139 + node_modules/fs-extra/lib/util/utimes.js | 26 + node_modules/fs-extra/package.json | 70 + node_modules/fs-minipass/LICENSE | 15 + node_modules/fs-minipass/README.md | 70 + node_modules/fs-minipass/index.js | 422 + .../fs-minipass/node_modules/minipass/LICENSE | 15 + .../node_modules/minipass/README.md | 728 + .../node_modules/minipass/index.d.ts | 155 + .../node_modules/minipass/index.js | 649 + .../node_modules/minipass/package.json | 56 + node_modules/fs-minipass/package.json | 39 + node_modules/fs.realpath/LICENSE | 43 + node_modules/fs.realpath/README.md | 33 + node_modules/fs.realpath/index.js | 66 + node_modules/fs.realpath/old.js | 303 + node_modules/fs.realpath/package.json | 26 + node_modules/glob/LICENSE | 15 + node_modules/glob/README.md | 1086 + node_modules/glob/dist/cjs/glob.d.ts | 333 + node_modules/glob/dist/cjs/glob.d.ts.map | 1 + node_modules/glob/dist/cjs/glob.js | 229 + node_modules/glob/dist/cjs/glob.js.map | 1 + node_modules/glob/dist/cjs/has-magic.d.ts | 14 + node_modules/glob/dist/cjs/has-magic.d.ts.map | 1 + node_modules/glob/dist/cjs/has-magic.js | 27 + node_modules/glob/dist/cjs/has-magic.js.map | 1 + node_modules/glob/dist/cjs/ignore.d.ts | 20 + node_modules/glob/dist/cjs/ignore.d.ts.map | 1 + node_modules/glob/dist/cjs/ignore.js | 103 + node_modules/glob/dist/cjs/ignore.js.map | 1 + node_modules/glob/dist/cjs/index-cjs.d.ts | 75 + node_modules/glob/dist/cjs/index-cjs.d.ts.map | 1 + node_modules/glob/dist/cjs/index-cjs.js | 7 + node_modules/glob/dist/cjs/index-cjs.js.map | 1 + node_modules/glob/dist/cjs/index.d.ts | 96 + node_modules/glob/dist/cjs/index.d.ts.map | 1 + node_modules/glob/dist/cjs/index.js | 68 + node_modules/glob/dist/cjs/index.js.map | 1 + node_modules/glob/dist/cjs/package.json | 3 + node_modules/glob/dist/cjs/pattern.d.ts | 77 + node_modules/glob/dist/cjs/pattern.d.ts.map | 1 + node_modules/glob/dist/cjs/pattern.js | 219 + node_modules/glob/dist/cjs/pattern.js.map | 1 + node_modules/glob/dist/cjs/processor.d.ts | 59 + node_modules/glob/dist/cjs/processor.d.ts.map | 1 + node_modules/glob/dist/cjs/processor.js | 309 + node_modules/glob/dist/cjs/processor.js.map | 1 + node_modules/glob/dist/cjs/walker.d.ts | 95 + node_modules/glob/dist/cjs/walker.d.ts.map | 1 + node_modules/glob/dist/cjs/walker.js | 360 + node_modules/glob/dist/cjs/walker.js.map | 1 + node_modules/glob/dist/mjs/glob.d.ts | 333 + node_modules/glob/dist/mjs/glob.d.ts.map | 1 + node_modules/glob/dist/mjs/glob.js | 225 + node_modules/glob/dist/mjs/glob.js.map | 1 + node_modules/glob/dist/mjs/has-magic.d.ts | 14 + node_modules/glob/dist/mjs/has-magic.d.ts.map | 1 + node_modules/glob/dist/mjs/has-magic.js | 23 + node_modules/glob/dist/mjs/has-magic.js.map | 1 + node_modules/glob/dist/mjs/ignore.d.ts | 20 + node_modules/glob/dist/mjs/ignore.d.ts.map | 1 + node_modules/glob/dist/mjs/ignore.js | 99 + node_modules/glob/dist/mjs/ignore.js.map | 1 + node_modules/glob/dist/mjs/index.d.ts | 96 + node_modules/glob/dist/mjs/index.d.ts.map | 1 + node_modules/glob/dist/mjs/index.js | 55 + node_modules/glob/dist/mjs/index.js.map | 1 + node_modules/glob/dist/mjs/package.json | 3 + node_modules/glob/dist/mjs/pattern.d.ts | 77 + node_modules/glob/dist/mjs/pattern.d.ts.map | 1 + node_modules/glob/dist/mjs/pattern.js | 215 + node_modules/glob/dist/mjs/pattern.js.map | 1 + node_modules/glob/dist/mjs/processor.d.ts | 59 + node_modules/glob/dist/mjs/processor.d.ts.map | 1 + node_modules/glob/dist/mjs/processor.js | 302 + node_modules/glob/dist/mjs/processor.js.map | 1 + node_modules/glob/dist/mjs/walker.d.ts | 95 + node_modules/glob/dist/mjs/walker.d.ts.map | 1 + node_modules/glob/dist/mjs/walker.js | 351 + node_modules/glob/dist/mjs/walker.js.map | 1 + node_modules/glob/package.json | 97 + node_modules/graceful-fs/LICENSE | 15 + node_modules/graceful-fs/README.md | 143 + node_modules/graceful-fs/clone.js | 23 + node_modules/graceful-fs/graceful-fs.js | 448 + node_modules/graceful-fs/legacy-streams.js | 118 + node_modules/graceful-fs/package.json | 53 + node_modules/graceful-fs/polyfills.js | 355 + node_modules/inherits/LICENSE | 16 + node_modules/inherits/README.md | 42 + node_modules/inherits/inherits.js | 9 + node_modules/inherits/inherits_browser.js | 27 + node_modules/inherits/package.json | 29 + node_modules/ini/LICENSE | 15 + node_modules/ini/README.md | 180 + node_modules/ini/lib/ini.js | 280 + node_modules/ini/package.json | 45 + node_modules/is-docker/cli.js | 5 + node_modules/is-docker/index.d.ts | 15 + node_modules/is-docker/index.js | 29 + node_modules/is-docker/license | 9 + node_modules/is-docker/package.json | 42 + node_modules/is-docker/readme.md | 27 + .../is-fullwidth-code-point/index.d.ts | 17 + node_modules/is-fullwidth-code-point/index.js | 50 + node_modules/is-fullwidth-code-point/license | 9 + .../is-fullwidth-code-point/package.json | 42 + .../is-fullwidth-code-point/readme.md | 39 + node_modules/is-wsl/index.d.ts | 15 + node_modules/is-wsl/index.js | 31 + node_modules/is-wsl/license | 9 + node_modules/is-wsl/package.json | 45 + node_modules/is-wsl/readme.md | 36 + node_modules/isexe/.npmignore | 2 + node_modules/isexe/LICENSE | 15 + node_modules/isexe/README.md | 51 + node_modules/isexe/index.js | 57 + node_modules/isexe/mode.js | 41 + node_modules/isexe/package.json | 31 + node_modules/isexe/test/basic.js | 221 + node_modules/isexe/windows.js | 42 + node_modules/jsonfile/LICENSE | 15 + node_modules/jsonfile/README.md | 230 + node_modules/jsonfile/index.js | 88 + node_modules/jsonfile/package.json | 40 + node_modules/jsonfile/utils.js | 18 + node_modules/kleur/colors.d.ts | 38 + node_modules/kleur/colors.js | 53 + node_modules/kleur/colors.mjs | 53 + node_modules/kleur/index.d.ts | 45 + node_modules/kleur/index.js | 110 + node_modules/kleur/index.mjs | 110 + node_modules/kleur/license | 21 + node_modules/kleur/package.json | 51 + node_modules/kleur/readme.md | 232 + node_modules/lru-cache/LICENSE | 15 + node_modules/lru-cache/README.md | 331 + .../lru-cache/dist/commonjs/index.d.ts | 1277 + .../lru-cache/dist/commonjs/index.d.ts.map | 1 + node_modules/lru-cache/dist/commonjs/index.js | 1546 + .../lru-cache/dist/commonjs/index.js.map | 1 + .../lru-cache/dist/commonjs/index.min.js | 2 + .../lru-cache/dist/commonjs/index.min.js.map | 7 + .../lru-cache/dist/commonjs/package.json | 3 + node_modules/lru-cache/dist/esm/index.d.ts | 1277 + .../lru-cache/dist/esm/index.d.ts.map | 1 + node_modules/lru-cache/dist/esm/index.js | 1542 + node_modules/lru-cache/dist/esm/index.js.map | 1 + node_modules/lru-cache/dist/esm/index.min.js | 2 + .../lru-cache/dist/esm/index.min.js.map | 7 + node_modules/lru-cache/dist/esm/package.json | 3 + node_modules/lru-cache/package.json | 116 + node_modules/minimatch/LICENSE | 15 + node_modules/minimatch/README.md | 496 + .../dist/cjs/assert-valid-pattern.d.ts | 2 + .../dist/cjs/assert-valid-pattern.d.ts.map | 1 + .../dist/cjs/assert-valid-pattern.js | 14 + .../dist/cjs/assert-valid-pattern.js.map | 1 + node_modules/minimatch/dist/cjs/ast.d.ts | 25 + node_modules/minimatch/dist/cjs/ast.d.ts.map | 1 + node_modules/minimatch/dist/cjs/ast.js | 719 + node_modules/minimatch/dist/cjs/ast.js.map | 1 + .../minimatch/dist/cjs/brace-expressions.d.ts | 8 + .../dist/cjs/brace-expressions.d.ts.map | 1 + .../minimatch/dist/cjs/brace-expressions.js | 152 + .../dist/cjs/brace-expressions.js.map | 1 + node_modules/minimatch/dist/cjs/escape.d.ts | 12 + .../minimatch/dist/cjs/escape.d.ts.map | 1 + node_modules/minimatch/dist/cjs/escape.js | 22 + node_modules/minimatch/dist/cjs/escape.js.map | 1 + .../minimatch/dist/cjs/index-cjs.d.ts | 45 + .../minimatch/dist/cjs/index-cjs.d.ts.map | 1 + node_modules/minimatch/dist/cjs/index-cjs.js | 7 + .../minimatch/dist/cjs/index-cjs.js.map | 1 + node_modules/minimatch/dist/cjs/index.d.ts | 99 + .../minimatch/dist/cjs/index.d.ts.map | 1 + node_modules/minimatch/dist/cjs/index.js | 1025 + node_modules/minimatch/dist/cjs/index.js.map | 1 + node_modules/minimatch/dist/cjs/package.json | 3 + node_modules/minimatch/dist/cjs/unescape.d.ts | 17 + .../minimatch/dist/cjs/unescape.d.ts.map | 1 + node_modules/minimatch/dist/cjs/unescape.js | 24 + .../minimatch/dist/cjs/unescape.js.map | 1 + .../dist/mjs/assert-valid-pattern.d.ts | 2 + .../dist/mjs/assert-valid-pattern.d.ts.map | 1 + .../dist/mjs/assert-valid-pattern.js | 10 + .../dist/mjs/assert-valid-pattern.js.map | 1 + node_modules/minimatch/dist/mjs/ast.d.ts | 25 + node_modules/minimatch/dist/mjs/ast.d.ts.map | 1 + node_modules/minimatch/dist/mjs/ast.js | 715 + node_modules/minimatch/dist/mjs/ast.js.map | 1 + .../minimatch/dist/mjs/brace-expressions.d.ts | 8 + .../dist/mjs/brace-expressions.d.ts.map | 1 + .../minimatch/dist/mjs/brace-expressions.js | 148 + .../dist/mjs/brace-expressions.js.map | 1 + node_modules/minimatch/dist/mjs/escape.d.ts | 12 + .../minimatch/dist/mjs/escape.d.ts.map | 1 + node_modules/minimatch/dist/mjs/escape.js | 18 + node_modules/minimatch/dist/mjs/escape.js.map | 1 + node_modules/minimatch/dist/mjs/index.d.ts | 99 + .../minimatch/dist/mjs/index.d.ts.map | 1 + node_modules/minimatch/dist/mjs/index.js | 1009 + node_modules/minimatch/dist/mjs/index.js.map | 1 + node_modules/minimatch/dist/mjs/package.json | 3 + node_modules/minimatch/dist/mjs/unescape.d.ts | 17 + .../minimatch/dist/mjs/unescape.d.ts.map | 1 + node_modules/minimatch/dist/mjs/unescape.js | 20 + .../minimatch/dist/mjs/unescape.js.map | 1 + node_modules/minimatch/package.json | 89 + node_modules/minipass/LICENSE | 15 + node_modules/minipass/README.md | 769 + node_modules/minipass/index.d.ts | 150 + node_modules/minipass/index.js | 702 + node_modules/minipass/index.mjs | 702 + node_modules/minipass/package.json | 79 + node_modules/minizlib/LICENSE | 26 + node_modules/minizlib/README.md | 60 + node_modules/minizlib/constants.js | 115 + node_modules/minizlib/index.js | 348 + .../minizlib/node_modules/minipass/LICENSE | 15 + .../minizlib/node_modules/minipass/README.md | 728 + .../minizlib/node_modules/minipass/index.d.ts | 155 + .../minizlib/node_modules/minipass/index.js | 649 + .../node_modules/minipass/package.json | 56 + node_modules/minizlib/package.json | 42 + node_modules/mkdirp/CHANGELOG.md | 15 + node_modules/mkdirp/LICENSE | 21 + node_modules/mkdirp/bin/cmd.js | 68 + node_modules/mkdirp/index.js | 31 + node_modules/mkdirp/lib/find-made.js | 29 + node_modules/mkdirp/lib/mkdirp-manual.js | 64 + node_modules/mkdirp/lib/mkdirp-native.js | 39 + node_modules/mkdirp/lib/opts-arg.js | 23 + node_modules/mkdirp/lib/path-arg.js | 29 + node_modules/mkdirp/lib/use-native.js | 10 + node_modules/mkdirp/package.json | 44 + node_modules/mkdirp/readme.markdown | 266 + node_modules/ms/index.js | 162 + node_modules/ms/license.md | 21 + node_modules/ms/package.json | 38 + node_modules/ms/readme.md | 59 + node_modules/native-run/LICENSE | 21 + node_modules/native-run/README.md | 39 + .../native-run/assets/android/skins/LICENSE | 10 + .../native-run/assets/android/skins/README.md | 4 + .../android/skins/nexus_5x/land_back.webp | Bin 0 -> 29412 bytes .../android/skins/nexus_5x/land_fore.webp | Bin 0 -> 14594 bytes .../android/skins/nexus_5x/land_shadow.webp | Bin 0 -> 14286 bytes .../assets/android/skins/nexus_5x/layout | 59 + .../android/skins/nexus_5x/port_back.webp | Bin 0 -> 32676 bytes .../android/skins/nexus_5x/port_fore.webp | Bin 0 -> 10654 bytes .../android/skins/nexus_5x/port_shadow.webp | Bin 0 -> 27440 bytes .../assets/android/skins/pixel/land_back.webp | Bin 0 -> 58256 bytes .../assets/android/skins/pixel/land_fore.webp | Bin 0 -> 25022 bytes .../android/skins/pixel/land_shadow.webp | Bin 0 -> 24696 bytes .../assets/android/skins/pixel/layout | 59 + .../assets/android/skins/pixel/port_back.webp | Bin 0 -> 74552 bytes .../assets/android/skins/pixel/port_fore.webp | Bin 0 -> 23232 bytes .../android/skins/pixel/port_shadow.webp | Bin 0 -> 40708 bytes .../android/skins/pixel_2/land_back.webp | Bin 0 -> 202854 bytes .../android/skins/pixel_2/land_fore.webp | Bin 0 -> 176 bytes .../android/skins/pixel_2/land_shadow.webp | Bin 0 -> 17820 bytes .../assets/android/skins/pixel_2/layout | 59 + .../android/skins/pixel_2/port_back.webp | Bin 0 -> 206916 bytes .../android/skins/pixel_2/port_fore.webp | Bin 0 -> 188 bytes .../android/skins/pixel_2/port_shadow.webp | Bin 0 -> 27142 bytes .../assets/android/skins/pixel_3/layout | 38 + .../android/skins/pixel_3/port_back.webp | Bin 0 -> 1142086 bytes .../android/skins/pixel_3/round_corners.webp | Bin 0 -> 1822 bytes node_modules/native-run/bin/native-run | 11 + node_modules/native-run/dist/android/help.js | 38 + node_modules/native-run/dist/android/index.js | 21 + node_modules/native-run/dist/android/list.js | 37 + node_modules/native-run/dist/android/run.js | 103 + .../native-run/dist/android/sdk-info.js | 46 + .../native-run/dist/android/utils/adb.js | 318 + .../native-run/dist/android/utils/apk.js | 36 + .../native-run/dist/android/utils/avd.js | 69 + .../dist/android/utils/binary-xml-parser.js | 593 + .../native-run/dist/android/utils/emulator.js | 204 + .../native-run/dist/android/utils/list.js | 32 + .../native-run/dist/android/utils/run.js | 132 + .../native-run/dist/android/utils/sdk/api.js | 47 + .../dist/android/utils/sdk/index.js | 169 + .../native-run/dist/android/utils/sdk/xml.js | 58 + node_modules/native-run/dist/constants.js | 5 + node_modules/native-run/dist/errors.js | 81 + node_modules/native-run/dist/help.js | 18 + node_modules/native-run/dist/index.js | 49 + node_modules/native-run/dist/ios/help.js | 35 + node_modules/native-run/dist/ios/index.js | 17 + .../native-run/dist/ios/lib/client/afc.js | 164 + .../native-run/dist/ios/lib/client/client.js | 17 + .../dist/ios/lib/client/debugserver.js | 66 + .../native-run/dist/ios/lib/client/index.js | 10 + .../dist/ios/lib/client/installation_proxy.js | 72 + .../dist/ios/lib/client/lockdownd.js | 111 + .../ios/lib/client/mobile_image_mounter.js | 61 + .../native-run/dist/ios/lib/client/usbmuxd.js | 103 + node_modules/native-run/dist/ios/lib/index.js | 6 + .../native-run/dist/ios/lib/lib-errors.js | 10 + .../native-run/dist/ios/lib/manager.js | 139 + .../native-run/dist/ios/lib/protocol/afc.js | 373 + .../native-run/dist/ios/lib/protocol/gdb.js | 112 + .../native-run/dist/ios/lib/protocol/index.js | 8 + .../dist/ios/lib/protocol/lockdown.js | 57 + .../dist/ios/lib/protocol/protocol.js | 111 + .../dist/ios/lib/protocol/usbmux.js | 57 + node_modules/native-run/dist/ios/list.js | 55 + node_modules/native-run/dist/ios/run.js | 116 + node_modules/native-run/dist/ios/utils/app.js | 60 + .../native-run/dist/ios/utils/device.js | 141 + .../native-run/dist/ios/utils/simulator.js | 90 + .../native-run/dist/ios/utils/xcode.js | 54 + node_modules/native-run/dist/list.js | 35 + node_modules/native-run/dist/utils/cli.js | 21 + node_modules/native-run/dist/utils/fn.js | 16 + node_modules/native-run/dist/utils/fs.js | 12 + node_modules/native-run/dist/utils/ini.js | 30 + node_modules/native-run/dist/utils/json.js | 7 + node_modules/native-run/dist/utils/list.js | 69 + node_modules/native-run/dist/utils/log.js | 11 + node_modules/native-run/dist/utils/object.js | 15 + node_modules/native-run/dist/utils/process.js | 34 + node_modules/native-run/dist/utils/unzip.js | 22 + node_modules/native-run/package.json | 106 + node_modules/open/index.d.ts | 153 + node_modules/open/index.js | 334 + node_modules/open/license | 9 + node_modules/open/package.json | 61 + node_modules/open/readme.md | 171 + node_modules/open/xdg-open | 1066 + node_modules/path-key/index.d.ts | 40 + node_modules/path-key/index.js | 16 + node_modules/path-key/license | 9 + node_modules/path-key/package.json | 39 + node_modules/path-key/readme.md | 61 + node_modules/path-scurry/LICENSE.md | 55 + node_modules/path-scurry/README.md | 636 + .../path-scurry/dist/commonjs/index.d.ts | 1116 + .../path-scurry/dist/commonjs/index.d.ts.map | 1 + .../path-scurry/dist/commonjs/index.js | 2014 + .../path-scurry/dist/commonjs/index.js.map | 1 + .../path-scurry/dist/commonjs/package.json | 3 + node_modules/path-scurry/dist/esm/index.d.ts | 1116 + .../path-scurry/dist/esm/index.d.ts.map | 1 + node_modules/path-scurry/dist/esm/index.js | 1979 + .../path-scurry/dist/esm/index.js.map | 1 + .../path-scurry/dist/esm/package.json | 3 + .../node_modules/minipass/LICENSE.md | 55 + .../node_modules/minipass/README.md | 825 + .../minipass/dist/commonjs/index.d.ts | 545 + .../minipass/dist/commonjs/index.d.ts.map | 1 + .../minipass/dist/commonjs/index.js | 1038 + .../minipass/dist/commonjs/index.js.map | 1 + .../minipass/dist/commonjs/package.json | 3 + .../node_modules/minipass/dist/esm/index.d.ts | 545 + .../minipass/dist/esm/index.d.ts.map | 1 + .../node_modules/minipass/dist/esm/index.js | 1020 + .../minipass/dist/esm/index.js.map | 1 + .../minipass/dist/esm/package.json | 3 + .../node_modules/minipass/package.json | 77 + node_modules/path-scurry/package.json | 89 + node_modules/pend/LICENSE | 23 + node_modules/pend/README.md | 41 + node_modules/pend/index.js | 55 + node_modules/pend/package.json | 18 + node_modules/pend/test.js | 137 + node_modules/plist/.github/workflows/ci.yml | 24 + node_modules/plist/.jshintrc | 4 + node_modules/plist/History.md | 201 + node_modules/plist/LICENSE | 24 + node_modules/plist/Makefile | 75 + node_modules/plist/README.md | 146 + node_modules/plist/dist/plist-build.js | 5348 ++ node_modules/plist/dist/plist-parse.js | 10709 ++++ node_modules/plist/dist/plist.js | 15918 ++++++ .../plist/examples/browser/index.html | 14 + node_modules/plist/index.js | 13 + node_modules/plist/lib/build.js | 143 + node_modules/plist/lib/parse.js | 208 + node_modules/plist/package.json | 43 + .../prompts/dist/dateparts/datepart.js | 39 + node_modules/prompts/dist/dateparts/day.js | 35 + node_modules/prompts/dist/dateparts/hours.js | 30 + node_modules/prompts/dist/dateparts/index.js | 13 + .../prompts/dist/dateparts/meridiem.js | 25 + .../prompts/dist/dateparts/milliseconds.js | 28 + .../prompts/dist/dateparts/minutes.js | 29 + node_modules/prompts/dist/dateparts/month.js | 31 + .../prompts/dist/dateparts/seconds.js | 29 + node_modules/prompts/dist/dateparts/year.js | 29 + .../prompts/dist/elements/autocomplete.js | 285 + .../dist/elements/autocompleteMultiselect.js | 201 + node_modules/prompts/dist/elements/confirm.js | 93 + node_modules/prompts/dist/elements/date.js | 250 + node_modules/prompts/dist/elements/index.js | 13 + .../prompts/dist/elements/multiselect.js | 289 + node_modules/prompts/dist/elements/number.js | 250 + node_modules/prompts/dist/elements/prompt.js | 82 + node_modules/prompts/dist/elements/select.js | 190 + node_modules/prompts/dist/elements/text.js | 245 + node_modules/prompts/dist/elements/toggle.js | 124 + node_modules/prompts/dist/index.js | 154 + node_modules/prompts/dist/prompts.js | 222 + node_modules/prompts/dist/util/action.js | 38 + node_modules/prompts/dist/util/clear.js | 42 + .../prompts/dist/util/entriesToDisplay.js | 21 + node_modules/prompts/dist/util/figures.js | 32 + node_modules/prompts/dist/util/index.js | 12 + node_modules/prompts/dist/util/lines.js | 14 + node_modules/prompts/dist/util/strip.js | 7 + node_modules/prompts/dist/util/style.js | 51 + node_modules/prompts/dist/util/wrap.js | 16 + node_modules/prompts/index.js | 14 + .../prompts/lib/dateparts/datepart.js | 35 + node_modules/prompts/lib/dateparts/day.js | 42 + node_modules/prompts/lib/dateparts/hours.js | 30 + node_modules/prompts/lib/dateparts/index.js | 13 + .../prompts/lib/dateparts/meridiem.js | 24 + .../prompts/lib/dateparts/milliseconds.js | 28 + node_modules/prompts/lib/dateparts/minutes.js | 28 + node_modules/prompts/lib/dateparts/month.js | 33 + node_modules/prompts/lib/dateparts/seconds.js | 28 + node_modules/prompts/lib/dateparts/year.js | 28 + .../prompts/lib/elements/autocomplete.js | 264 + .../lib/elements/autocompleteMultiselect.js | 194 + node_modules/prompts/lib/elements/confirm.js | 89 + node_modules/prompts/lib/elements/date.js | 209 + node_modules/prompts/lib/elements/index.js | 13 + .../prompts/lib/elements/multiselect.js | 271 + node_modules/prompts/lib/elements/number.js | 213 + node_modules/prompts/lib/elements/prompt.js | 68 + node_modules/prompts/lib/elements/select.js | 175 + node_modules/prompts/lib/elements/text.js | 208 + node_modules/prompts/lib/elements/toggle.js | 118 + node_modules/prompts/lib/index.js | 98 + node_modules/prompts/lib/prompts.js | 206 + node_modules/prompts/lib/util/action.js | 39 + node_modules/prompts/lib/util/clear.js | 22 + .../prompts/lib/util/entriesToDisplay.js | 21 + node_modules/prompts/lib/util/figures.js | 33 + node_modules/prompts/lib/util/index.js | 12 + node_modules/prompts/lib/util/lines.js | 15 + node_modules/prompts/lib/util/strip.js | 11 + node_modules/prompts/lib/util/style.js | 40 + node_modules/prompts/lib/util/wrap.js | 27 + node_modules/prompts/license | 21 + .../prompts/node_modules/kleur/index.js | 104 + .../prompts/node_modules/kleur/kleur.d.ts | 45 + .../prompts/node_modules/kleur/license | 21 + .../prompts/node_modules/kleur/package.json | 35 + .../prompts/node_modules/kleur/readme.md | 172 + node_modules/prompts/package.json | 53 + node_modules/prompts/readme.md | 882 + node_modules/readable-stream/CONTRIBUTING.md | 38 + node_modules/readable-stream/GOVERNANCE.md | 136 + node_modules/readable-stream/LICENSE | 47 + node_modules/readable-stream/README.md | 106 + .../readable-stream/errors-browser.js | 127 + node_modules/readable-stream/errors.js | 116 + .../readable-stream/experimentalWarning.js | 17 + .../readable-stream/lib/_stream_duplex.js | 126 + .../lib/_stream_passthrough.js | 37 + .../readable-stream/lib/_stream_readable.js | 1027 + .../readable-stream/lib/_stream_transform.js | 190 + .../readable-stream/lib/_stream_writable.js | 641 + .../lib/internal/streams/async_iterator.js | 180 + .../lib/internal/streams/buffer_list.js | 183 + .../lib/internal/streams/destroy.js | 96 + .../lib/internal/streams/end-of-stream.js | 86 + .../lib/internal/streams/from-browser.js | 3 + .../lib/internal/streams/from.js | 52 + .../lib/internal/streams/pipeline.js | 86 + .../lib/internal/streams/state.js | 22 + .../lib/internal/streams/stream-browser.js | 1 + .../lib/internal/streams/stream.js | 1 + node_modules/readable-stream/package.json | 68 + .../readable-stream/readable-browser.js | 9 + node_modules/readable-stream/readable.js | 16 + node_modules/rimraf/LICENSE | 15 + node_modules/rimraf/README.md | 214 + node_modules/rimraf/dist/cjs/package.json | 84 + node_modules/rimraf/dist/cjs/src/bin.d.ts | 8 + node_modules/rimraf/dist/cjs/src/bin.d.ts.map | 1 + node_modules/rimraf/dist/cjs/src/bin.js | 260 + node_modules/rimraf/dist/cjs/src/bin.js.map | 1 + .../rimraf/dist/cjs/src/default-tmp.d.ts | 3 + .../rimraf/dist/cjs/src/default-tmp.d.ts.map | 1 + .../rimraf/dist/cjs/src/default-tmp.js | 61 + .../rimraf/dist/cjs/src/default-tmp.js.map | 1 + .../rimraf/dist/cjs/src/fix-eperm.d.ts | 3 + .../rimraf/dist/cjs/src/fix-eperm.d.ts.map | 1 + node_modules/rimraf/dist/cjs/src/fix-eperm.js | 58 + .../rimraf/dist/cjs/src/fix-eperm.js.map | 1 + node_modules/rimraf/dist/cjs/src/fs.d.ts | 17 + node_modules/rimraf/dist/cjs/src/fs.d.ts.map | 1 + node_modules/rimraf/dist/cjs/src/fs.js | 46 + node_modules/rimraf/dist/cjs/src/fs.js.map | 1 + .../rimraf/dist/cjs/src/ignore-enoent.d.ts | 3 + .../dist/cjs/src/ignore-enoent.d.ts.map | 1 + .../rimraf/dist/cjs/src/ignore-enoent.js | 21 + .../rimraf/dist/cjs/src/ignore-enoent.js.map | 1 + .../rimraf/dist/cjs/src/index-cjs.d.ts | 57 + .../rimraf/dist/cjs/src/index-cjs.d.ts.map | 1 + node_modules/rimraf/dist/cjs/src/index-cjs.js | 7 + .../rimraf/dist/cjs/src/index-cjs.js.map | 1 + node_modules/rimraf/dist/cjs/src/index.d.ts | 71 + .../rimraf/dist/cjs/src/index.d.ts.map | 1 + node_modules/rimraf/dist/cjs/src/index.js | 92 + node_modules/rimraf/dist/cjs/src/index.js.map | 1 + node_modules/rimraf/dist/cjs/src/opt-arg.d.ts | 17 + .../rimraf/dist/cjs/src/opt-arg.d.ts.map | 1 + node_modules/rimraf/dist/cjs/src/opt-arg.js | 36 + .../rimraf/dist/cjs/src/opt-arg.js.map | 1 + .../rimraf/dist/cjs/src/path-arg.d.ts | 4 + .../rimraf/dist/cjs/src/path-arg.d.ts.map | 1 + node_modules/rimraf/dist/cjs/src/path-arg.js | 54 + .../rimraf/dist/cjs/src/path-arg.js.map | 1 + .../rimraf/dist/cjs/src/platform.d.ts | 3 + .../rimraf/dist/cjs/src/platform.d.ts.map | 1 + node_modules/rimraf/dist/cjs/src/platform.js | 4 + .../rimraf/dist/cjs/src/platform.js.map | 1 + .../rimraf/dist/cjs/src/readdir-or-error.d.ts | 5 + .../dist/cjs/src/readdir-or-error.d.ts.map | 1 + .../rimraf/dist/cjs/src/readdir-or-error.js | 19 + .../dist/cjs/src/readdir-or-error.js.map | 1 + .../rimraf/dist/cjs/src/retry-busy.d.ts | 8 + .../rimraf/dist/cjs/src/retry-busy.d.ts.map | 1 + .../rimraf/dist/cjs/src/retry-busy.js | 68 + .../rimraf/dist/cjs/src/retry-busy.js.map | 1 + .../rimraf/dist/cjs/src/rimraf-manual.d.ts | 3 + .../dist/cjs/src/rimraf-manual.d.ts.map | 1 + .../rimraf/dist/cjs/src/rimraf-manual.js | 12 + .../rimraf/dist/cjs/src/rimraf-manual.js.map | 1 + .../dist/cjs/src/rimraf-move-remove.d.ts | 4 + .../dist/cjs/src/rimraf-move-remove.d.ts.map | 1 + .../rimraf/dist/cjs/src/rimraf-move-remove.js | 192 + .../dist/cjs/src/rimraf-move-remove.js.map | 1 + .../rimraf/dist/cjs/src/rimraf-native.d.ts | 4 + .../dist/cjs/src/rimraf-native.d.ts.map | 1 + .../rimraf/dist/cjs/src/rimraf-native.js | 24 + .../rimraf/dist/cjs/src/rimraf-native.js.map | 1 + .../rimraf/dist/cjs/src/rimraf-posix.d.ts | 4 + .../rimraf/dist/cjs/src/rimraf-posix.d.ts.map | 1 + .../rimraf/dist/cjs/src/rimraf-posix.js | 123 + .../rimraf/dist/cjs/src/rimraf-posix.js.map | 1 + .../rimraf/dist/cjs/src/rimraf-windows.d.ts | 4 + .../dist/cjs/src/rimraf-windows.d.ts.map | 1 + .../rimraf/dist/cjs/src/rimraf-windows.js | 182 + .../rimraf/dist/cjs/src/rimraf-windows.js.map | 1 + .../rimraf/dist/cjs/src/use-native.d.ts | 4 + .../rimraf/dist/cjs/src/use-native.d.ts.map | 1 + .../rimraf/dist/cjs/src/use-native.js | 19 + .../rimraf/dist/cjs/src/use-native.js.map | 1 + node_modules/rimraf/dist/mjs/default-tmp.d.ts | 3 + .../rimraf/dist/mjs/default-tmp.d.ts.map | 1 + node_modules/rimraf/dist/mjs/default-tmp.js | 55 + .../rimraf/dist/mjs/default-tmp.js.map | 1 + node_modules/rimraf/dist/mjs/fix-eperm.d.ts | 3 + .../rimraf/dist/mjs/fix-eperm.d.ts.map | 1 + node_modules/rimraf/dist/mjs/fix-eperm.js | 53 + node_modules/rimraf/dist/mjs/fix-eperm.js.map | 1 + node_modules/rimraf/dist/mjs/fs.d.ts | 17 + node_modules/rimraf/dist/mjs/fs.d.ts.map | 1 + node_modules/rimraf/dist/mjs/fs.js | 31 + node_modules/rimraf/dist/mjs/fs.js.map | 1 + .../rimraf/dist/mjs/ignore-enoent.d.ts | 3 + .../rimraf/dist/mjs/ignore-enoent.d.ts.map | 1 + node_modules/rimraf/dist/mjs/ignore-enoent.js | 16 + .../rimraf/dist/mjs/ignore-enoent.js.map | 1 + node_modules/rimraf/dist/mjs/index.d.ts | 71 + node_modules/rimraf/dist/mjs/index.d.ts.map | 1 + node_modules/rimraf/dist/mjs/index.js | 84 + node_modules/rimraf/dist/mjs/index.js.map | 1 + node_modules/rimraf/dist/mjs/opt-arg.d.ts | 17 + node_modules/rimraf/dist/mjs/opt-arg.d.ts.map | 1 + node_modules/rimraf/dist/mjs/opt-arg.js | 31 + node_modules/rimraf/dist/mjs/opt-arg.js.map | 1 + node_modules/rimraf/dist/mjs/package.json | 4 + node_modules/rimraf/dist/mjs/path-arg.d.ts | 4 + .../rimraf/dist/mjs/path-arg.d.ts.map | 1 + node_modules/rimraf/dist/mjs/path-arg.js | 49 + node_modules/rimraf/dist/mjs/path-arg.js.map | 1 + node_modules/rimraf/dist/mjs/platform.d.ts | 3 + .../rimraf/dist/mjs/platform.d.ts.map | 1 + node_modules/rimraf/dist/mjs/platform.js | 2 + node_modules/rimraf/dist/mjs/platform.js.map | 1 + .../rimraf/dist/mjs/readdir-or-error.d.ts | 5 + .../rimraf/dist/mjs/readdir-or-error.d.ts.map | 1 + .../rimraf/dist/mjs/readdir-or-error.js | 14 + .../rimraf/dist/mjs/readdir-or-error.js.map | 1 + node_modules/rimraf/dist/mjs/retry-busy.d.ts | 8 + .../rimraf/dist/mjs/retry-busy.d.ts.map | 1 + node_modules/rimraf/dist/mjs/retry-busy.js | 63 + .../rimraf/dist/mjs/retry-busy.js.map | 1 + .../rimraf/dist/mjs/rimraf-manual.d.ts | 3 + .../rimraf/dist/mjs/rimraf-manual.d.ts.map | 1 + node_modules/rimraf/dist/mjs/rimraf-manual.js | 6 + .../rimraf/dist/mjs/rimraf-manual.js.map | 1 + .../rimraf/dist/mjs/rimraf-move-remove.d.ts | 4 + .../dist/mjs/rimraf-move-remove.d.ts.map | 1 + .../rimraf/dist/mjs/rimraf-move-remove.js | 187 + .../rimraf/dist/mjs/rimraf-move-remove.js.map | 1 + .../rimraf/dist/mjs/rimraf-native.d.ts | 4 + .../rimraf/dist/mjs/rimraf-native.d.ts.map | 1 + node_modules/rimraf/dist/mjs/rimraf-native.js | 19 + .../rimraf/dist/mjs/rimraf-native.js.map | 1 + .../rimraf/dist/mjs/rimraf-posix.d.ts | 4 + .../rimraf/dist/mjs/rimraf-posix.d.ts.map | 1 + node_modules/rimraf/dist/mjs/rimraf-posix.js | 118 + .../rimraf/dist/mjs/rimraf-posix.js.map | 1 + .../rimraf/dist/mjs/rimraf-windows.d.ts | 4 + .../rimraf/dist/mjs/rimraf-windows.d.ts.map | 1 + .../rimraf/dist/mjs/rimraf-windows.js | 177 + .../rimraf/dist/mjs/rimraf-windows.js.map | 1 + node_modules/rimraf/dist/mjs/use-native.d.ts | 4 + .../rimraf/dist/mjs/use-native.d.ts.map | 1 + node_modules/rimraf/dist/mjs/use-native.js | 13 + .../rimraf/dist/mjs/use-native.js.map | 1 + node_modules/rimraf/package.json | 84 + node_modules/safe-buffer/LICENSE | 21 + node_modules/safe-buffer/README.md | 584 + node_modules/safe-buffer/index.d.ts | 187 + node_modules/safe-buffer/index.js | 65 + node_modules/safe-buffer/package.json | 51 + node_modules/sax/LICENSE | 41 + node_modules/sax/LICENSE-W3C.html | 188 + node_modules/sax/README.md | 220 + node_modules/sax/lib/sax.js | 1563 + node_modules/sax/package.json | 24 + node_modules/semver/LICENSE | 15 + node_modules/semver/README.md | 680 + node_modules/semver/bin/semver.js | 195 + node_modules/semver/classes/comparator.js | 143 + node_modules/semver/classes/index.js | 7 + node_modules/semver/classes/range.js | 577 + node_modules/semver/classes/semver.js | 350 + node_modules/semver/functions/clean.js | 8 + node_modules/semver/functions/cmp.js | 54 + node_modules/semver/functions/coerce.js | 62 + .../semver/functions/compare-build.js | 9 + .../semver/functions/compare-loose.js | 5 + node_modules/semver/functions/compare.js | 7 + node_modules/semver/functions/diff.js | 60 + node_modules/semver/functions/eq.js | 5 + node_modules/semver/functions/gt.js | 5 + node_modules/semver/functions/gte.js | 5 + node_modules/semver/functions/inc.js | 21 + node_modules/semver/functions/lt.js | 5 + node_modules/semver/functions/lte.js | 5 + node_modules/semver/functions/major.js | 5 + node_modules/semver/functions/minor.js | 5 + node_modules/semver/functions/neq.js | 5 + node_modules/semver/functions/parse.js | 18 + node_modules/semver/functions/patch.js | 5 + node_modules/semver/functions/prerelease.js | 8 + node_modules/semver/functions/rcompare.js | 5 + node_modules/semver/functions/rsort.js | 5 + node_modules/semver/functions/satisfies.js | 12 + node_modules/semver/functions/sort.js | 5 + node_modules/semver/functions/truncate.js | 48 + node_modules/semver/functions/valid.js | 8 + node_modules/semver/index.js | 93 + node_modules/semver/internal/constants.js | 37 + node_modules/semver/internal/debug.js | 11 + node_modules/semver/internal/identifiers.js | 29 + node_modules/semver/internal/lrucache.js | 42 + node_modules/semver/internal/parse-options.js | 17 + node_modules/semver/internal/re.js | 223 + node_modules/semver/package.json | 78 + node_modules/semver/preload.js | 4 + node_modules/semver/range.bnf | 17 + node_modules/semver/ranges/gtr.js | 6 + node_modules/semver/ranges/intersects.js | 9 + node_modules/semver/ranges/ltr.js | 6 + node_modules/semver/ranges/max-satisfying.js | 27 + node_modules/semver/ranges/min-satisfying.js | 26 + node_modules/semver/ranges/min-version.js | 63 + node_modules/semver/ranges/outside.js | 82 + node_modules/semver/ranges/simplify.js | 49 + node_modules/semver/ranges/subset.js | 249 + node_modules/semver/ranges/to-comparators.js | 10 + node_modules/semver/ranges/valid.js | 13 + node_modules/shebang-command/index.js | 19 + node_modules/shebang-command/license | 9 + node_modules/shebang-command/package.json | 34 + node_modules/shebang-command/readme.md | 34 + node_modules/shebang-regex/index.d.ts | 22 + node_modules/shebang-regex/index.js | 2 + node_modules/shebang-regex/license | 9 + node_modules/shebang-regex/package.json | 35 + node_modules/shebang-regex/readme.md | 33 + node_modules/signal-exit/LICENSE.txt | 16 + node_modules/signal-exit/README.md | 39 + node_modules/signal-exit/index.js | 202 + node_modules/signal-exit/package.json | 38 + node_modules/signal-exit/signals.js | 53 + node_modules/sisteransi/license | 21 + node_modules/sisteransi/package.json | 34 + node_modules/sisteransi/readme.md | 113 + node_modules/sisteransi/src/index.js | 58 + node_modules/sisteransi/src/sisteransi.d.ts | 35 + node_modules/slice-ansi/index.js | 103 + node_modules/slice-ansi/license | 10 + node_modules/slice-ansi/package.json | 52 + node_modules/slice-ansi/readme.md | 66 + node_modules/split2/LICENSE | 13 + node_modules/split2/README.md | 85 + node_modules/split2/bench.js | 27 + node_modules/split2/index.js | 141 + node_modules/split2/package.json | 39 + node_modules/split2/test.js | 409 + node_modules/string-width/index.d.ts | 29 + node_modules/string-width/index.js | 47 + node_modules/string-width/license | 9 + node_modules/string-width/package.json | 56 + node_modules/string-width/readme.md | 50 + node_modules/string_decoder/LICENSE | 48 + node_modules/string_decoder/README.md | 47 + .../string_decoder/lib/string_decoder.js | 296 + node_modules/string_decoder/package.json | 34 + node_modules/strip-ansi/index.d.ts | 17 + node_modules/strip-ansi/index.js | 4 + node_modules/strip-ansi/license | 9 + node_modules/strip-ansi/package.json | 54 + node_modules/strip-ansi/readme.md | 46 + node_modules/tar/LICENSE | 15 + node_modules/tar/README.md | 1080 + node_modules/tar/index.js | 18 + node_modules/tar/lib/create.js | 111 + node_modules/tar/lib/extract.js | 113 + node_modules/tar/lib/get-write-flag.js | 20 + node_modules/tar/lib/header.js | 304 + node_modules/tar/lib/high-level-opt.js | 29 + node_modules/tar/lib/large-numbers.js | 104 + node_modules/tar/lib/list.js | 139 + node_modules/tar/lib/mkdir.js | 229 + node_modules/tar/lib/mode-fix.js | 27 + node_modules/tar/lib/normalize-unicode.js | 12 + .../tar/lib/normalize-windows-path.js | 8 + node_modules/tar/lib/pack.js | 432 + node_modules/tar/lib/parse.js | 552 + node_modules/tar/lib/path-reservations.js | 156 + node_modules/tar/lib/pax.js | 150 + node_modules/tar/lib/read-entry.js | 107 + node_modules/tar/lib/replace.js | 246 + node_modules/tar/lib/strip-absolute-path.js | 24 + .../tar/lib/strip-trailing-slashes.js | 13 + node_modules/tar/lib/types.js | 44 + node_modules/tar/lib/unpack.js | 923 + node_modules/tar/lib/update.js | 40 + node_modules/tar/lib/warn-mixin.js | 24 + node_modules/tar/lib/winchars.js | 23 + node_modules/tar/lib/write-entry.js | 546 + .../tar/node_modules/minipass/LICENSE | 15 + .../tar/node_modules/minipass/README.md | 769 + .../tar/node_modules/minipass/index.d.ts | 152 + .../tar/node_modules/minipass/index.js | 702 + .../tar/node_modules/minipass/index.mjs | 702 + .../tar/node_modules/minipass/package.json | 76 + node_modules/tar/package.json | 70 + node_modules/through2/LICENSE.md | 9 + node_modules/through2/README.md | 140 + node_modules/through2/package.json | 38 + node_modules/through2/through2.js | 83 + node_modules/tree-kill/LICENSE | 21 + node_modules/tree-kill/README.md | 89 + node_modules/tree-kill/cli.js | 14 + node_modules/tree-kill/index.d.ts | 13 + node_modules/tree-kill/index.js | 118 + node_modules/tree-kill/package.json | 51 + node_modules/tslib/CopyrightNotice.txt | 15 + node_modules/tslib/LICENSE.txt | 12 + node_modules/tslib/README.md | 164 + node_modules/tslib/SECURITY.md | 41 + node_modules/tslib/modules/index.d.ts | 38 + node_modules/tslib/modules/index.js | 70 + node_modules/tslib/modules/package.json | 3 + node_modules/tslib/package.json | 47 + node_modules/tslib/tslib.d.ts | 460 + node_modules/tslib/tslib.es6.html | 1 + node_modules/tslib/tslib.es6.js | 402 + node_modules/tslib/tslib.es6.mjs | 401 + node_modules/tslib/tslib.html | 1 + node_modules/tslib/tslib.js | 484 + node_modules/typescript/LICENSE | 55 + node_modules/typescript/NOTICE.txt | 436 + node_modules/typescript/README.md | 49 + node_modules/typescript/bin/tsc | 2 + .../typescript/dist/api/async/api.d.ts | 529 + .../typescript/dist/api/async/api.d.ts.map | 1 + node_modules/typescript/dist/api/async/api.js | 1657 + .../typescript/dist/api/async/api.js.map | 1 + .../typescript/dist/api/async/client.d.ts | 39 + .../typescript/dist/api/async/client.d.ts.map | 1 + .../typescript/dist/api/async/client.js | 211 + .../typescript/dist/api/async/client.js.map | 1 + .../typescript/dist/api/async/types.d.ts | 310 + .../typescript/dist/api/async/types.d.ts.map | 1 + .../typescript/dist/api/async/types.js | 2 + .../typescript/dist/api/async/types.js.map | 1 + .../typescript/dist/api/compilerOptions.d.ts | 109 + .../dist/api/compilerOptions.d.ts.map | 1 + .../typescript/dist/api/compilerOptions.js | 2 + .../dist/api/compilerOptions.js.map | 1 + node_modules/typescript/dist/api/fs.d.ts | 23 + node_modules/typescript/dist/api/fs.d.ts.map | 1 + node_modules/typescript/dist/api/fs.js | 109 + node_modules/typescript/dist/api/fs.js.map | 1 + .../typescript/dist/api/node/encoder.d.ts | 15 + .../typescript/dist/api/node/encoder.d.ts.map | 1 + .../dist/api/node/encoder.generated.d.ts | 5 + .../dist/api/node/encoder.generated.d.ts.map | 1 + .../dist/api/node/encoder.generated.js | 74 + .../dist/api/node/encoder.generated.js.map | 1 + .../typescript/dist/api/node/encoder.js | 287 + .../typescript/dist/api/node/encoder.js.map | 1 + .../typescript/dist/api/node/msgpack.d.ts | 32 + .../typescript/dist/api/node/msgpack.d.ts.map | 1 + .../typescript/dist/api/node/msgpack.js | 213 + .../typescript/dist/api/node/msgpack.js.map | 1 + .../typescript/dist/api/node/node.d.ts | 76 + .../typescript/dist/api/node/node.d.ts.map | 1 + .../dist/api/node/node.generated.d.ts | 182 + .../dist/api/node/node.generated.d.ts.map | 1 + .../dist/api/node/node.generated.js | 835 + .../dist/api/node/node.generated.js.map | 1 + .../dist/api/node/node.infrastructure.d.ts | 62 + .../api/node/node.infrastructure.d.ts.map | 1 + .../dist/api/node/node.infrastructure.js | 122 + .../dist/api/node/node.infrastructure.js.map | 1 + node_modules/typescript/dist/api/node/node.js | 298 + .../typescript/dist/api/node/node.js.map | 1 + .../typescript/dist/api/node/protocol.d.ts | 29 + .../dist/api/node/protocol.d.ts.map | 1 + .../dist/api/node/protocol.generated.d.ts | 4 + .../dist/api/node/protocol.generated.d.ts.map | 1 + .../dist/api/node/protocol.generated.js | 241 + .../dist/api/node/protocol.generated.js.map | 1 + .../typescript/dist/api/node/protocol.js | 30 + .../typescript/dist/api/node/protocol.js.map | 1 + .../typescript/dist/api/node/wtf8.d.ts | 6 + .../typescript/dist/api/node/wtf8.d.ts.map | 1 + node_modules/typescript/dist/api/node/wtf8.js | 61 + .../typescript/dist/api/node/wtf8.js.map | 1 + node_modules/typescript/dist/api/options.d.ts | 32 + .../typescript/dist/api/options.d.ts.map | 1 + node_modules/typescript/dist/api/options.js | 11 + .../typescript/dist/api/options.js.map | 1 + node_modules/typescript/dist/api/path.d.ts | 110 + .../typescript/dist/api/path.d.ts.map | 1 + node_modules/typescript/dist/api/path.js | 508 + node_modules/typescript/dist/api/path.js.map | 1 + node_modules/typescript/dist/api/proto.d.ts | 239 + .../typescript/dist/api/proto.d.ts.map | 1 + node_modules/typescript/dist/api/proto.js | 37 + node_modules/typescript/dist/api/proto.js.map | 1 + .../typescript/dist/api/sourceFileCache.d.ts | 79 + .../dist/api/sourceFileCache.d.ts.map | 1 + .../typescript/dist/api/sourceFileCache.js | 169 + .../dist/api/sourceFileCache.js.map | 1 + .../typescript/dist/api/sync/api.d.ts | 529 + .../typescript/dist/api/sync/api.d.ts.map | 1 + node_modules/typescript/dist/api/sync/api.js | 1665 + .../typescript/dist/api/sync/api.js.map | 1 + .../typescript/dist/api/sync/client.d.ts | 30 + .../typescript/dist/api/sync/client.d.ts.map | 1 + .../typescript/dist/api/sync/client.js | 124 + .../typescript/dist/api/sync/client.js.map | 1 + .../typescript/dist/api/sync/types.d.ts | 310 + .../typescript/dist/api/sync/types.d.ts.map | 1 + .../typescript/dist/api/sync/types.js | 2 + .../typescript/dist/api/sync/types.js.map | 1 + .../typescript/dist/api/syncChannel.d.ts | 114 + .../typescript/dist/api/syncChannel.d.ts.map | 1 + .../typescript/dist/api/syncChannel.js | 508 + .../typescript/dist/api/syncChannel.js.map | 1 + node_modules/typescript/dist/api/timing.d.ts | 175 + .../typescript/dist/api/timing.d.ts.map | 1 + node_modules/typescript/dist/api/timing.js | 149 + .../typescript/dist/api/timing.js.map | 1 + node_modules/typescript/dist/ast/ast.d.ts | 100 + node_modules/typescript/dist/ast/ast.d.ts.map | 1 + .../typescript/dist/ast/ast.generated.d.ts | 1161 + .../dist/ast/ast.generated.d.ts.map | 1 + .../typescript/dist/ast/ast.generated.js | 4 + .../typescript/dist/ast/ast.generated.js.map | 1 + node_modules/typescript/dist/ast/ast.js | 7 + node_modules/typescript/dist/ast/ast.js.map | 1 + node_modules/typescript/dist/ast/astnav.d.ts | 19 + .../typescript/dist/ast/astnav.d.ts.map | 1 + node_modules/typescript/dist/ast/astnav.js | 596 + .../typescript/dist/ast/astnav.js.map | 1 + node_modules/typescript/dist/ast/clone.d.ts | 16 + .../typescript/dist/ast/clone.d.ts.map | 1 + node_modules/typescript/dist/ast/clone.js | 104 + node_modules/typescript/dist/ast/clone.js.map | 1 + .../dist/ast/factory.generated.d.ts | 520 + .../dist/ast/factory.generated.d.ts.map | 1 + .../typescript/dist/ast/factory.generated.js | 3057 ++ .../dist/ast/factory.generated.js.map | 1 + node_modules/typescript/dist/ast/index.d.ts | 20 + .../typescript/dist/ast/index.d.ts.map | 1 + node_modules/typescript/dist/ast/index.js | 20 + node_modules/typescript/dist/ast/index.js.map | 1 + node_modules/typescript/dist/ast/is.d.ts | 35 + node_modules/typescript/dist/ast/is.d.ts.map | 1 + .../typescript/dist/ast/is.generated.d.ts | 329 + .../typescript/dist/ast/is.generated.d.ts.map | 1 + .../typescript/dist/ast/is.generated.js | 1103 + .../typescript/dist/ast/is.generated.js.map | 1 + node_modules/typescript/dist/ast/is.js | 233 + node_modules/typescript/dist/ast/is.js.map | 1 + node_modules/typescript/dist/ast/jsdoc.d.ts | 11 + .../typescript/dist/ast/jsdoc.d.ts.map | 1 + node_modules/typescript/dist/ast/jsdoc.js | 202 + node_modules/typescript/dist/ast/jsdoc.js.map | 1 + node_modules/typescript/dist/ast/scanner.d.ts | 97 + .../typescript/dist/ast/scanner.d.ts.map | 1 + node_modules/typescript/dist/ast/scanner.js | 2230 + .../typescript/dist/ast/scanner.js.map | 1 + node_modules/typescript/dist/ast/utils.d.ts | 17 + .../typescript/dist/ast/utils.d.ts.map | 1 + node_modules/typescript/dist/ast/utils.js | 67 + node_modules/typescript/dist/ast/utils.js.map | 1 + node_modules/typescript/dist/ast/visitor.d.ts | 14 + .../typescript/dist/ast/visitor.d.ts.map | 1 + .../dist/ast/visitor.generated.d.ts | 50 + .../dist/ast/visitor.generated.d.ts.map | 1 + .../typescript/dist/ast/visitor.generated.js | 978 + .../dist/ast/visitor.generated.js.map | 1 + node_modules/typescript/dist/ast/visitor.js | 47 + .../typescript/dist/ast/visitor.js.map | 1 + .../typescript/dist/enums/characterCodes.d.ts | 2 + .../dist/enums/characterCodes.d.ts.map | 1 + .../dist/enums/characterCodes.enum.d.ts | 129 + .../dist/enums/characterCodes.enum.d.ts.map | 1 + .../dist/enums/characterCodes.enum.js | 132 + .../dist/enums/characterCodes.enum.js.map | 1 + .../typescript/dist/enums/characterCodes.js | 130 + .../dist/enums/characterCodes.js.map | 1 + .../dist/enums/commentDirectiveType.d.ts | 2 + .../dist/enums/commentDirectiveType.d.ts.map | 1 + .../dist/enums/commentDirectiveType.enum.d.ts | 5 + .../enums/commentDirectiveType.enum.d.ts.map | 1 + .../dist/enums/commentDirectiveType.enum.js | 6 + .../enums/commentDirectiveType.enum.js.map | 1 + .../dist/enums/commentDirectiveType.js | 6 + .../dist/enums/commentDirectiveType.js.map | 1 + .../dist/enums/completionItemKind.d.ts | 2 + .../dist/enums/completionItemKind.d.ts.map | 1 + .../dist/enums/completionItemKind.enum.d.ts | 28 + .../enums/completionItemKind.enum.d.ts.map | 1 + .../dist/enums/completionItemKind.enum.js | 30 + .../dist/enums/completionItemKind.enum.js.map | 1 + .../dist/enums/completionItemKind.js | 30 + .../dist/enums/completionItemKind.js.map | 1 + .../dist/enums/diagnosticCategory.d.ts | 2 + .../dist/enums/diagnosticCategory.d.ts.map | 1 + .../dist/enums/diagnosticCategory.enum.d.ts | 7 + .../enums/diagnosticCategory.enum.d.ts.map | 1 + .../dist/enums/diagnosticCategory.enum.js | 9 + .../dist/enums/diagnosticCategory.enum.js.map | 1 + .../dist/enums/diagnosticCategory.js | 9 + .../dist/enums/diagnosticCategory.js.map | 1 + .../typescript/dist/enums/elementFlags.d.ts | 2 + .../dist/enums/elementFlags.d.ts.map | 1 + .../dist/enums/elementFlags.enum.d.ts | 12 + .../dist/enums/elementFlags.enum.d.ts.map | 1 + .../dist/enums/elementFlags.enum.js | 14 + .../dist/enums/elementFlags.enum.js.map | 1 + .../typescript/dist/enums/elementFlags.js | 14 + .../typescript/dist/enums/elementFlags.js.map | 1 + .../dist/enums/internalSymbolName.d.ts | 2 + .../dist/enums/internalSymbolName.d.ts.map | 1 + .../dist/enums/internalSymbolName.enum.d.ts | 23 + .../enums/internalSymbolName.enum.d.ts.map | 1 + .../dist/enums/internalSymbolName.enum.js | 25 + .../dist/enums/internalSymbolName.enum.js.map | 1 + .../dist/enums/internalSymbolName.js | 25 + .../dist/enums/internalSymbolName.js.map | 1 + .../typescript/dist/enums/jsxEmit.d.ts | 2 + .../typescript/dist/enums/jsxEmit.d.ts.map | 1 + .../typescript/dist/enums/jsxEmit.enum.d.ts | 9 + .../dist/enums/jsxEmit.enum.d.ts.map | 1 + .../typescript/dist/enums/jsxEmit.enum.js | 11 + .../typescript/dist/enums/jsxEmit.enum.js.map | 1 + node_modules/typescript/dist/enums/jsxEmit.js | 11 + .../typescript/dist/enums/jsxEmit.js.map | 1 + .../dist/enums/languageVariant.d.ts | 2 + .../dist/enums/languageVariant.d.ts.map | 1 + .../dist/enums/languageVariant.enum.d.ts | 5 + .../dist/enums/languageVariant.enum.d.ts.map | 1 + .../dist/enums/languageVariant.enum.js | 6 + .../dist/enums/languageVariant.enum.js.map | 1 + .../typescript/dist/enums/languageVariant.js | 6 + .../dist/enums/languageVariant.js.map | 1 + .../typescript/dist/enums/modifierFlags.d.ts | 2 + .../dist/enums/modifierFlags.d.ts.map | 1 + .../dist/enums/modifierFlags.enum.d.ts | 42 + .../dist/enums/modifierFlags.enum.d.ts.map | 1 + .../dist/enums/modifierFlags.enum.js | 44 + .../dist/enums/modifierFlags.enum.js.map | 1 + .../typescript/dist/enums/modifierFlags.js | 44 + .../dist/enums/modifierFlags.js.map | 1 + .../dist/enums/moduleDetectionKind.d.ts | 2 + .../dist/enums/moduleDetectionKind.d.ts.map | 1 + .../dist/enums/moduleDetectionKind.enum.d.ts | 7 + .../enums/moduleDetectionKind.enum.d.ts.map | 1 + .../dist/enums/moduleDetectionKind.enum.js | 9 + .../enums/moduleDetectionKind.enum.js.map | 1 + .../dist/enums/moduleDetectionKind.js | 9 + .../dist/enums/moduleDetectionKind.js.map | 1 + .../typescript/dist/enums/moduleKind.d.ts | 2 + .../typescript/dist/enums/moduleKind.d.ts.map | 1 + .../dist/enums/moduleKind.enum.d.ts | 17 + .../dist/enums/moduleKind.enum.d.ts.map | 1 + .../typescript/dist/enums/moduleKind.enum.js | 19 + .../dist/enums/moduleKind.enum.js.map | 1 + .../typescript/dist/enums/moduleKind.js | 19 + .../typescript/dist/enums/moduleKind.js.map | 1 + .../dist/enums/moduleResolutionKind.d.ts | 2 + .../dist/enums/moduleResolutionKind.d.ts.map | 1 + .../dist/enums/moduleResolutionKind.enum.d.ts | 9 + .../enums/moduleResolutionKind.enum.d.ts.map | 1 + .../dist/enums/moduleResolutionKind.enum.js | 11 + .../enums/moduleResolutionKind.enum.js.map | 1 + .../dist/enums/moduleResolutionKind.js | 11 + .../dist/enums/moduleResolutionKind.js.map | 1 + .../typescript/dist/enums/newLineKind.d.ts | 2 + .../dist/enums/newLineKind.d.ts.map | 1 + .../dist/enums/newLineKind.enum.d.ts | 6 + .../dist/enums/newLineKind.enum.d.ts.map | 1 + .../typescript/dist/enums/newLineKind.enum.js | 8 + .../dist/enums/newLineKind.enum.js.map | 1 + .../typescript/dist/enums/newLineKind.js | 8 + .../typescript/dist/enums/newLineKind.js.map | 1 + .../dist/enums/nodeBuilderFlags.d.ts | 2 + .../dist/enums/nodeBuilderFlags.d.ts.map | 1 + .../dist/enums/nodeBuilderFlags.enum.d.ts | 36 + .../dist/enums/nodeBuilderFlags.enum.d.ts.map | 1 + .../dist/enums/nodeBuilderFlags.enum.js | 38 + .../dist/enums/nodeBuilderFlags.enum.js.map | 1 + .../typescript/dist/enums/nodeBuilderFlags.js | 38 + .../dist/enums/nodeBuilderFlags.js.map | 1 + .../typescript/dist/enums/nodeFlags.d.ts | 2 + .../typescript/dist/enums/nodeFlags.d.ts.map | 1 + .../typescript/dist/enums/nodeFlags.enum.d.ts | 44 + .../dist/enums/nodeFlags.enum.d.ts.map | 1 + .../typescript/dist/enums/nodeFlags.enum.js | 46 + .../dist/enums/nodeFlags.enum.js.map | 1 + .../typescript/dist/enums/nodeFlags.js | 46 + .../typescript/dist/enums/nodeFlags.js.map | 1 + .../typescript/dist/enums/objectFlags.d.ts | 2 + .../dist/enums/objectFlags.d.ts.map | 1 + .../dist/enums/objectFlags.enum.d.ts | 50 + .../dist/enums/objectFlags.enum.d.ts.map | 1 + .../typescript/dist/enums/objectFlags.enum.js | 52 + .../dist/enums/objectFlags.enum.js.map | 1 + .../typescript/dist/enums/objectFlags.js | 52 + .../typescript/dist/enums/objectFlags.js.map | 1 + .../dist/enums/outerExpressionKinds.d.ts | 2 + .../dist/enums/outerExpressionKinds.d.ts.map | 1 + .../dist/enums/outerExpressionKinds.enum.d.ts | 16 + .../enums/outerExpressionKinds.enum.d.ts.map | 1 + .../dist/enums/outerExpressionKinds.enum.js | 18 + .../enums/outerExpressionKinds.enum.js.map | 1 + .../dist/enums/outerExpressionKinds.js | 18 + .../dist/enums/outerExpressionKinds.js.map | 1 + .../dist/enums/regularExpressionFlags.d.ts | 2 + .../enums/regularExpressionFlags.d.ts.map | 1 + .../enums/regularExpressionFlags.enum.d.ts | 13 + .../regularExpressionFlags.enum.d.ts.map | 1 + .../dist/enums/regularExpressionFlags.enum.js | 14 + .../enums/regularExpressionFlags.enum.js.map | 1 + .../dist/enums/regularExpressionFlags.js | 14 + .../dist/enums/regularExpressionFlags.js.map | 1 + .../typescript/dist/enums/scriptKind.d.ts | 2 + .../typescript/dist/enums/scriptKind.d.ts.map | 1 + .../dist/enums/scriptKind.enum.d.ts | 11 + .../dist/enums/scriptKind.enum.d.ts.map | 1 + .../typescript/dist/enums/scriptKind.enum.js | 12 + .../dist/enums/scriptKind.enum.js.map | 1 + .../typescript/dist/enums/scriptKind.js | 12 + .../typescript/dist/enums/scriptKind.js.map | 1 + .../typescript/dist/enums/scriptTarget.d.ts | 2 + .../dist/enums/scriptTarget.d.ts.map | 1 + .../dist/enums/scriptTarget.enum.d.ts | 17 + .../dist/enums/scriptTarget.enum.d.ts.map | 1 + .../dist/enums/scriptTarget.enum.js | 18 + .../dist/enums/scriptTarget.enum.js.map | 1 + .../typescript/dist/enums/scriptTarget.js | 18 + .../typescript/dist/enums/scriptTarget.js.map | 1 + .../typescript/dist/enums/signatureFlags.d.ts | 2 + .../dist/enums/signatureFlags.d.ts.map | 1 + .../dist/enums/signatureFlags.enum.d.ts | 15 + .../dist/enums/signatureFlags.enum.d.ts.map | 1 + .../dist/enums/signatureFlags.enum.js | 17 + .../dist/enums/signatureFlags.enum.js.map | 1 + .../typescript/dist/enums/signatureFlags.js | 17 + .../dist/enums/signatureFlags.js.map | 1 + .../typescript/dist/enums/signatureKind.d.ts | 2 + .../dist/enums/signatureKind.d.ts.map | 1 + .../dist/enums/signatureKind.enum.d.ts | 5 + .../dist/enums/signatureKind.enum.d.ts.map | 1 + .../dist/enums/signatureKind.enum.js | 7 + .../dist/enums/signatureKind.enum.js.map | 1 + .../typescript/dist/enums/signatureKind.js | 7 + .../dist/enums/signatureKind.js.map | 1 + .../typescript/dist/enums/symbolFlags.d.ts | 2 + .../dist/enums/symbolFlags.d.ts.map | 1 + .../dist/enums/symbolFlags.enum.d.ts | 71 + .../dist/enums/symbolFlags.enum.d.ts.map | 1 + .../typescript/dist/enums/symbolFlags.enum.js | 73 + .../dist/enums/symbolFlags.enum.js.map | 1 + .../typescript/dist/enums/symbolFlags.js | 73 + .../typescript/dist/enums/symbolFlags.js.map | 1 + .../typescript/dist/enums/syntaxKind.d.ts | 2 + .../typescript/dist/enums/syntaxKind.d.ts.map | 1 + .../dist/enums/syntaxKind.enum.d.ts | 389 + .../dist/enums/syntaxKind.enum.d.ts.map | 1 + .../typescript/dist/enums/syntaxKind.enum.js | 391 + .../dist/enums/syntaxKind.enum.js.map | 1 + .../typescript/dist/enums/syntaxKind.js | 391 + .../typescript/dist/enums/syntaxKind.js.map | 1 + .../typescript/dist/enums/tokenFlags.d.ts | 2 + .../typescript/dist/enums/tokenFlags.d.ts.map | 1 + .../dist/enums/tokenFlags.enum.d.ts | 30 + .../dist/enums/tokenFlags.enum.d.ts.map | 1 + .../typescript/dist/enums/tokenFlags.enum.js | 32 + .../dist/enums/tokenFlags.enum.js.map | 1 + .../typescript/dist/enums/tokenFlags.js | 32 + .../typescript/dist/enums/tokenFlags.js.map | 1 + .../typescript/dist/enums/typeFlags.d.ts | 2 + .../typescript/dist/enums/typeFlags.d.ts.map | 1 + .../typescript/dist/enums/typeFlags.enum.d.ts | 76 + .../dist/enums/typeFlags.enum.d.ts.map | 1 + .../typescript/dist/enums/typeFlags.enum.js | 78 + .../dist/enums/typeFlags.enum.js.map | 1 + .../typescript/dist/enums/typeFlags.js | 78 + .../typescript/dist/enums/typeFlags.js.map | 1 + .../dist/enums/typePredicateKind.d.ts | 2 + .../dist/enums/typePredicateKind.d.ts.map | 1 + .../dist/enums/typePredicateKind.enum.d.ts | 7 + .../enums/typePredicateKind.enum.d.ts.map | 1 + .../dist/enums/typePredicateKind.enum.js | 9 + .../dist/enums/typePredicateKind.enum.js.map | 1 + .../dist/enums/typePredicateKind.js | 9 + .../dist/enums/typePredicateKind.js.map | 1 + .../typescript/dist/internal/utils.d.ts | 23 + .../typescript/dist/internal/utils.d.ts.map | 1 + .../typescript/dist/internal/utils.js | 25 + .../typescript/dist/internal/utils.js.map | 1 + node_modules/typescript/lib/getExePath.d.ts | 2 + node_modules/typescript/lib/getExePath.js | 70 + node_modules/typescript/lib/tsc.js | 28 + node_modules/typescript/lib/version.cjs | 3 + node_modules/typescript/lib/version.d.cts | 2 + node_modules/typescript/package.json | 87 + .../vendor/vscode-jsonrpc/License.txt | 11 + .../vendor/vscode-jsonrpc/README.md | 54 + .../vscode-jsonrpc/lib/browser/main.d.ts | 17 + .../vendor/vscode-jsonrpc/lib/browser/main.js | 83 + .../vscode-jsonrpc/lib/browser/ril.d.ts | 22 + .../vendor/vscode-jsonrpc/lib/browser/ril.js | 210 + .../vendor/vscode-jsonrpc/lib/common/api.d.ts | 14 + .../vendor/vscode-jsonrpc/lib/common/api.js | 87 + .../lib/common/cancellation.d.ts | 32 + .../vscode-jsonrpc/lib/common/cancellation.js | 132 + .../vscode-jsonrpc/lib/common/connection.d.ts | 367 + .../vscode-jsonrpc/lib/common/connection.js | 1271 + .../vscode-jsonrpc/lib/common/disposable.d.ts | 9 + .../vscode-jsonrpc/lib/common/disposable.js | 16 + .../vscode-jsonrpc/lib/common/encoding.d.ts | 52 + .../vscode-jsonrpc/lib/common/encoding.js | 70 + .../vscode-jsonrpc/lib/common/events.d.ts | 39 + .../vscode-jsonrpc/lib/common/events.js | 135 + .../vendor/vscode-jsonrpc/lib/common/is.d.ts | 7 + .../vendor/vscode-jsonrpc/lib/common/is.js | 34 + .../vscode-jsonrpc/lib/common/linkedMap.d.ts | 55 + .../vscode-jsonrpc/lib/common/linkedMap.js | 412 + .../lib/common/messageBuffer.d.ts | 18 + .../lib/common/messageBuffer.js | 155 + .../lib/common/messageReader.d.ts | 77 + .../lib/common/messageReader.js | 246 + .../lib/common/messageWriter.d.ts | 60 + .../lib/common/messageWriter.js | 157 + .../vscode-jsonrpc/lib/common/messages.d.ts | 369 + .../vscode-jsonrpc/lib/common/messages.js | 436 + .../vendor/vscode-jsonrpc/lib/common/ral.d.ts | 74 + .../vendor/vscode-jsonrpc/lib/common/ral.js | 23 + .../vscode-jsonrpc/lib/common/semaphore.d.ts | 10 + .../vscode-jsonrpc/lib/common/semaphore.js | 74 + .../lib/common/sharedArrayCancellation.d.ts | 15 + .../lib/common/sharedArrayCancellation.js | 77 + .../vendor/vscode-jsonrpc/lib/node/main.d.ts | 58 + .../vendor/vscode-jsonrpc/lib/node/main.js | 289 + .../vendor/vscode-jsonrpc/lib/node/ril.d.ts | 12 + .../vendor/vscode-jsonrpc/lib/node/ril.js | 163 + .../vendor/vscode-jsonrpc/package.json | 54 + .../vscode-jsonrpc/typings/thenable.d.ts | 5 + node_modules/undici-types/LICENSE | 21 + node_modules/undici-types/README.md | 6 + node_modules/undici-types/agent.d.ts | 30 + node_modules/undici-types/api.d.ts | 43 + node_modules/undici-types/balanced-pool.d.ts | 30 + .../undici-types/cache-interceptor.d.ts | 179 + node_modules/undici-types/cache.d.ts | 36 + node_modules/undici-types/client-stats.d.ts | 15 + node_modules/undici-types/client.d.ts | 134 + node_modules/undici-types/connector.d.ts | 37 + node_modules/undici-types/content-type.d.ts | 21 + node_modules/undici-types/cookies.d.ts | 30 + .../undici-types/diagnostics-channel.d.ts | 74 + node_modules/undici-types/dispatcher.d.ts | 253 + .../undici-types/dispatcher1-wrapper.d.ts | 7 + .../undici-types/env-http-proxy-agent.d.ts | 22 + node_modules/undici-types/errors.d.ts | 187 + node_modules/undici-types/eventsource.d.ts | 66 + node_modules/undici-types/fetch.d.ts | 235 + node_modules/undici-types/formdata.d.ts | 108 + .../undici-types/global-dispatcher.d.ts | 9 + node_modules/undici-types/global-origin.d.ts | 7 + node_modules/undici-types/h2c-client.d.ts | 73 + node_modules/undici-types/handlers.d.ts | 16 + node_modules/undici-types/header.d.ts | 165 + node_modules/undici-types/index.d.ts | 93 + node_modules/undici-types/interceptors.d.ts | 80 + node_modules/undici-types/mock-agent.d.ts | 68 + .../undici-types/mock-call-history.d.ts | 111 + node_modules/undici-types/mock-client.d.ts | 27 + node_modules/undici-types/mock-errors.d.ts | 12 + .../undici-types/mock-interceptor.d.ts | 98 + node_modules/undici-types/mock-pool.d.ts | 27 + node_modules/undici-types/package.json | 55 + node_modules/undici-types/patch.d.ts | 29 + node_modules/undici-types/pool-stats.d.ts | 19 + node_modules/undici-types/pool.d.ts | 39 + node_modules/undici-types/proxy-agent.d.ts | 36 + node_modules/undici-types/readable.d.ts | 68 + node_modules/undici-types/retry-agent.d.ts | 8 + node_modules/undici-types/retry-handler.d.ts | 125 + .../undici-types/round-robin-pool.d.ts | 39 + node_modules/undici-types/snapshot-agent.d.ts | 113 + .../undici-types/socks5-proxy-agent.d.ts | 25 + node_modules/undici-types/util.d.ts | 18 + node_modules/undici-types/utility.d.ts | 7 + node_modules/undici-types/webidl.d.ts | 346 + node_modules/undici-types/websocket.d.ts | 188 + node_modules/universalify/LICENSE | 20 + node_modules/universalify/README.md | 76 + node_modules/universalify/index.js | 24 + node_modules/universalify/package.json | 34 + node_modules/untildify/index.d.ts | 14 + node_modules/untildify/index.js | 12 + node_modules/untildify/license | 9 + node_modules/untildify/package.json | 43 + node_modules/untildify/readme.md | 30 + 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 + node_modules/which/CHANGELOG.md | 166 + node_modules/which/LICENSE | 15 + node_modules/which/README.md | 54 + node_modules/which/bin/node-which | 52 + node_modules/which/package.json | 43 + node_modules/which/which.js | 125 + node_modules/wrap-ansi/index.js | 216 + node_modules/wrap-ansi/license | 9 + node_modules/wrap-ansi/package.json | 62 + node_modules/wrap-ansi/readme.md | 91 + node_modules/xml2js/LICENSE | 19 + node_modules/xml2js/README.md | 507 + node_modules/xml2js/lib/bom.js | 12 + node_modules/xml2js/lib/builder.js | 127 + node_modules/xml2js/lib/defaults.js | 72 + node_modules/xml2js/lib/parser.js | 385 + node_modules/xml2js/lib/processors.js | 34 + node_modules/xml2js/lib/xml2js.js | 39 + .../node_modules/xmlbuilder/CHANGELOG.md | 470 + .../xml2js/node_modules/xmlbuilder/LICENSE | 21 + .../xml2js/node_modules/xmlbuilder/README.md | 86 + .../node_modules/xmlbuilder/appveyor.yml | 20 + .../node_modules/xmlbuilder/lib/Derivation.js | 10 + .../xmlbuilder/lib/DocumentPosition.js | 12 + .../node_modules/xmlbuilder/lib/NodeType.js | 23 + .../xmlbuilder/lib/OperationType.js | 11 + .../node_modules/xmlbuilder/lib/Utility.js | 83 + .../xmlbuilder/lib/WriterState.js | 10 + .../xmlbuilder/lib/XMLAttribute.js | 108 + .../node_modules/xmlbuilder/lib/XMLCData.js | 36 + .../xmlbuilder/lib/XMLCharacterData.js | 79 + .../node_modules/xmlbuilder/lib/XMLComment.js | 36 + .../xmlbuilder/lib/XMLDOMConfiguration.js | 64 + .../xmlbuilder/lib/XMLDOMErrorHandler.js | 16 + .../xmlbuilder/lib/XMLDOMImplementation.js | 32 + .../xmlbuilder/lib/XMLDOMStringList.js | 28 + .../xmlbuilder/lib/XMLDTDAttList.js | 55 + .../xmlbuilder/lib/XMLDTDElement.js | 38 + .../xmlbuilder/lib/XMLDTDEntity.js | 97 + .../xmlbuilder/lib/XMLDTDNotation.js | 52 + .../xmlbuilder/lib/XMLDeclaration.js | 43 + .../node_modules/xmlbuilder/lib/XMLDocType.js | 186 + .../xmlbuilder/lib/XMLDocument.js | 242 + .../xmlbuilder/lib/XMLDocumentCB.js | 528 + .../xmlbuilder/lib/XMLDocumentFragment.js | 24 + .../node_modules/xmlbuilder/lib/XMLDummy.js | 31 + .../node_modules/xmlbuilder/lib/XMLElement.js | 298 + .../xmlbuilder/lib/XMLNamedNodeMap.js | 58 + .../node_modules/xmlbuilder/lib/XMLNode.js | 785 + .../xmlbuilder/lib/XMLNodeFilter.js | 48 + .../xmlbuilder/lib/XMLNodeList.js | 28 + .../lib/XMLProcessingInstruction.js | 49 + .../node_modules/xmlbuilder/lib/XMLRaw.js | 35 + .../xmlbuilder/lib/XMLStreamWriter.js | 176 + .../xmlbuilder/lib/XMLStringWriter.js | 35 + .../xmlbuilder/lib/XMLStringifier.js | 240 + .../node_modules/xmlbuilder/lib/XMLText.js | 69 + .../xmlbuilder/lib/XMLTypeInfo.js | 21 + .../xmlbuilder/lib/XMLUserDataHandler.js | 16 + .../xmlbuilder/lib/XMLWriterBase.js | 428 + .../node_modules/xmlbuilder/lib/index.js | 65 + .../node_modules/xmlbuilder/package.json | 39 + .../xmlbuilder/typings/index.d.ts | 153 + node_modules/xml2js/package.json | 93 + node_modules/xmlbuilder/.nycrc | 6 + node_modules/xmlbuilder/.vscode/launch.json | 23 + node_modules/xmlbuilder/CHANGELOG.md | 593 + node_modules/xmlbuilder/LICENSE | 21 + node_modules/xmlbuilder/README.md | 103 + node_modules/xmlbuilder/lib/Derivation.js | 10 + .../xmlbuilder/lib/DocumentPosition.js | 12 + node_modules/xmlbuilder/lib/NodeType.js | 25 + node_modules/xmlbuilder/lib/OperationType.js | 11 + node_modules/xmlbuilder/lib/Utility.js | 88 + node_modules/xmlbuilder/lib/WriterState.js | 10 + node_modules/xmlbuilder/lib/XMLAttribute.js | 130 + node_modules/xmlbuilder/lib/XMLCData.js | 41 + .../xmlbuilder/lib/XMLCharacterData.js | 86 + node_modules/xmlbuilder/lib/XMLComment.js | 41 + .../xmlbuilder/lib/XMLDOMConfiguration.js | 80 + .../xmlbuilder/lib/XMLDOMErrorHandler.js | 20 + .../xmlbuilder/lib/XMLDOMImplementation.js | 55 + .../xmlbuilder/lib/XMLDOMStringList.js | 44 + node_modules/xmlbuilder/lib/XMLDTDAttList.js | 66 + node_modules/xmlbuilder/lib/XMLDTDElement.js | 44 + node_modules/xmlbuilder/lib/XMLDTDEntity.js | 115 + node_modules/xmlbuilder/lib/XMLDTDNotation.js | 66 + node_modules/xmlbuilder/lib/XMLDeclaration.js | 51 + node_modules/xmlbuilder/lib/XMLDocType.js | 235 + node_modules/xmlbuilder/lib/XMLDocument.js | 282 + node_modules/xmlbuilder/lib/XMLDocumentCB.js | 650 + .../xmlbuilder/lib/XMLDocumentFragment.js | 21 + node_modules/xmlbuilder/lib/XMLDummy.js | 39 + node_modules/xmlbuilder/lib/XMLElement.js | 334 + .../xmlbuilder/lib/XMLNamedNodeMap.js | 77 + node_modules/xmlbuilder/lib/XMLNode.js | 999 + node_modules/xmlbuilder/lib/XMLNodeFilter.js | 51 + node_modules/xmlbuilder/lib/XMLNodeList.js | 45 + .../lib/XMLProcessingInstruction.js | 56 + node_modules/xmlbuilder/lib/XMLRaw.js | 40 + .../xmlbuilder/lib/XMLStreamWriter.js | 209 + .../xmlbuilder/lib/XMLStringWriter.js | 40 + node_modules/xmlbuilder/lib/XMLStringifier.js | 291 + node_modules/xmlbuilder/lib/XMLText.js | 82 + node_modules/xmlbuilder/lib/XMLTypeInfo.js | 23 + .../xmlbuilder/lib/XMLUserDataHandler.js | 27 + node_modules/xmlbuilder/lib/XMLWriterBase.js | 485 + node_modules/xmlbuilder/lib/index.js | 120 + node_modules/xmlbuilder/package.json | 51 + .../xmlbuilder/perf/basic/escaping.coffee | 244 + .../xmlbuilder/perf/basic/object.coffee | 21 + node_modules/xmlbuilder/perf/index.coffee | 161 + node_modules/xmlbuilder/perf/perf.list | 11 + node_modules/xmlbuilder/typings/index.d.ts | 1771 + node_modules/yallist/LICENSE | 15 + node_modules/yallist/README.md | 204 + node_modules/yallist/iterator.js | 8 + node_modules/yallist/package.json | 29 + node_modules/yallist/yallist.js | 426 + node_modules/yauzl/LICENSE | 21 + node_modules/yauzl/README.md | 658 + node_modules/yauzl/index.js | 796 + node_modules/yauzl/package.json | 40 + package-lock.json | 1621 + package.json | 28 + run.sh | 40 + src/algorithms/placement.js | 234 + src/app.js | 72 + src/components/interface-participants.js | 115 + src/components/interface-tables.js | 119 + src/components/interface.js | 290 + src/main.js | 7 + src/models/objects.js | 158 + src/services/service-impression-sauvegarde.js | 297 + src/services/service-reservation-titre.js | 215 + src/services/service.js | 238 + src/utils/calculs.js | 60 + src/utils/indicateurs.js | 228 + 2031 files changed, 356928 insertions(+) create mode 100644 build.sh create mode 100644 capacitor.config.ts create mode 100644 index.html create mode 120000 node_modules/.bin/cap create mode 120000 node_modules/.bin/capacitor create mode 120000 node_modules/.bin/is-docker create mode 120000 node_modules/.bin/mkdirp create mode 120000 node_modules/.bin/native-run create mode 120000 node_modules/.bin/node-which create mode 120000 node_modules/.bin/rimraf create mode 120000 node_modules/.bin/semver create mode 120000 node_modules/.bin/tree-kill create mode 120000 node_modules/.bin/tsc create mode 100644 node_modules/.package-lock.json create mode 100644 node_modules/@capacitor/app/CapacitorApp.podspec create mode 100644 node_modules/@capacitor/app/LICENSE create mode 100644 node_modules/@capacitor/app/README.md create mode 100644 node_modules/@capacitor/app/android/build.gradle create mode 100644 node_modules/@capacitor/app/android/src/main/AndroidManifest.xml create mode 100644 node_modules/@capacitor/app/android/src/main/java/com/capacitorjs/plugins/app/AppPlugin.java create mode 100644 node_modules/@capacitor/app/dist/esm/definitions.d.ts create mode 100644 node_modules/@capacitor/app/dist/esm/definitions.js create mode 100644 node_modules/@capacitor/app/dist/esm/definitions.js.map create mode 100644 node_modules/@capacitor/app/dist/esm/index.d.ts create mode 100644 node_modules/@capacitor/app/dist/esm/index.js create mode 100644 node_modules/@capacitor/app/dist/esm/index.js.map create mode 100644 node_modules/@capacitor/app/dist/esm/web.d.ts create mode 100644 node_modules/@capacitor/app/dist/esm/web.js create mode 100644 node_modules/@capacitor/app/dist/esm/web.js.map create mode 100644 node_modules/@capacitor/app/dist/plugin.cjs.js create mode 100644 node_modules/@capacitor/app/dist/plugin.cjs.js.map create mode 100644 node_modules/@capacitor/app/dist/plugin.js create mode 100644 node_modules/@capacitor/app/dist/plugin.js.map create mode 100644 node_modules/@capacitor/app/ios/Plugin/AppPlugin.h create mode 100644 node_modules/@capacitor/app/ios/Plugin/AppPlugin.m create mode 100644 node_modules/@capacitor/app/ios/Plugin/AppPlugin.swift create mode 100644 node_modules/@capacitor/app/ios/Plugin/Info.plist create mode 100644 node_modules/@capacitor/app/package.json create mode 100644 node_modules/@capacitor/cli/LICENSE create mode 100644 node_modules/@capacitor/cli/README.md create mode 100644 node_modules/@capacitor/cli/assets/android-template.tar.gz create mode 100644 node_modules/@capacitor/cli/assets/capacitor-cordova-android-plugins.tar.gz create mode 100644 node_modules/@capacitor/cli/assets/capacitor-cordova-ios-plugins.tar.gz create mode 100644 node_modules/@capacitor/cli/assets/ios-template.tar.gz create mode 100755 node_modules/@capacitor/cli/bin/capacitor create mode 100644 node_modules/@capacitor/cli/dist/android/add.js create mode 100644 node_modules/@capacitor/cli/dist/android/build.js create mode 100644 node_modules/@capacitor/cli/dist/android/common.js create mode 100644 node_modules/@capacitor/cli/dist/android/doctor.js create mode 100644 node_modules/@capacitor/cli/dist/android/open.js create mode 100644 node_modules/@capacitor/cli/dist/android/run.js create mode 100644 node_modules/@capacitor/cli/dist/android/update.js create mode 100644 node_modules/@capacitor/cli/dist/colors.js create mode 100644 node_modules/@capacitor/cli/dist/common.js create mode 100644 node_modules/@capacitor/cli/dist/config.js create mode 100644 node_modules/@capacitor/cli/dist/cordova.js create mode 100644 node_modules/@capacitor/cli/dist/declarations.d.ts create mode 100644 node_modules/@capacitor/cli/dist/declarations.js create mode 100644 node_modules/@capacitor/cli/dist/definitions.js create mode 100644 node_modules/@capacitor/cli/dist/errors.js create mode 100644 node_modules/@capacitor/cli/dist/framework-configs.js create mode 100644 node_modules/@capacitor/cli/dist/index.js create mode 100644 node_modules/@capacitor/cli/dist/ios/add.js create mode 100644 node_modules/@capacitor/cli/dist/ios/build.js create mode 100644 node_modules/@capacitor/cli/dist/ios/common.js create mode 100644 node_modules/@capacitor/cli/dist/ios/doctor.js create mode 100644 node_modules/@capacitor/cli/dist/ios/open.js create mode 100644 node_modules/@capacitor/cli/dist/ios/run.js create mode 100644 node_modules/@capacitor/cli/dist/ios/update.js create mode 100644 node_modules/@capacitor/cli/dist/ipc.js create mode 100644 node_modules/@capacitor/cli/dist/log.js create mode 100644 node_modules/@capacitor/cli/dist/plugin.js create mode 100644 node_modules/@capacitor/cli/dist/sysconfig.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/add.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/build.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/config.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/copy.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/create.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/doctor.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/init.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/list.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/migrate.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/new-plugin.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/open.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/run.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/serve.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/sourcemaps.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/sync.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/telemetry.js create mode 100644 node_modules/@capacitor/cli/dist/tasks/update.js create mode 100644 node_modules/@capacitor/cli/dist/telemetry.js create mode 100644 node_modules/@capacitor/cli/dist/util/cli.js create mode 100644 node_modules/@capacitor/cli/dist/util/emoji.js create mode 100644 node_modules/@capacitor/cli/dist/util/fn.js create mode 100644 node_modules/@capacitor/cli/dist/util/fs.js create mode 100644 node_modules/@capacitor/cli/dist/util/js.js create mode 100644 node_modules/@capacitor/cli/dist/util/livereload.js create mode 100644 node_modules/@capacitor/cli/dist/util/monorepotools.js create mode 100644 node_modules/@capacitor/cli/dist/util/native-run.js create mode 100644 node_modules/@capacitor/cli/dist/util/node.js create mode 100644 node_modules/@capacitor/cli/dist/util/promise.js create mode 100644 node_modules/@capacitor/cli/dist/util/subprocess.js create mode 100644 node_modules/@capacitor/cli/dist/util/template.js create mode 100644 node_modules/@capacitor/cli/dist/util/term.js create mode 100644 node_modules/@capacitor/cli/dist/util/uuid.js create mode 100644 node_modules/@capacitor/cli/dist/util/xml.js create mode 100644 node_modules/@capacitor/cli/dist/web/copy.js create mode 100644 node_modules/@capacitor/cli/package.json create mode 100644 node_modules/@capacitor/core/LICENSE create mode 100644 node_modules/@capacitor/core/README.md create mode 100644 node_modules/@capacitor/core/cordova.js create mode 100644 node_modules/@capacitor/core/dist/capacitor.js create mode 100644 node_modules/@capacitor/core/dist/capacitor.js.map create mode 100644 node_modules/@capacitor/core/dist/index.cjs.js create mode 100644 node_modules/@capacitor/core/dist/index.cjs.js.map create mode 100644 node_modules/@capacitor/core/dist/index.js create mode 100644 node_modules/@capacitor/core/dist/index.js.map create mode 100644 node_modules/@capacitor/core/package.json create mode 100644 node_modules/@capacitor/core/types/core-plugins.d.ts create mode 100644 node_modules/@capacitor/core/types/definitions-internal.d.ts create mode 100644 node_modules/@capacitor/core/types/definitions.d.ts create mode 100644 node_modules/@capacitor/core/types/global.d.ts create mode 100644 node_modules/@capacitor/core/types/index.d.ts create mode 100644 node_modules/@capacitor/core/types/legacy/legacy-definitions.d.ts create mode 100644 node_modules/@capacitor/core/types/legacy/legacy-web-plugin-merge.d.ts create mode 100644 node_modules/@capacitor/core/types/platforms.d.ts create mode 100644 node_modules/@capacitor/core/types/runtime.d.ts create mode 100644 node_modules/@capacitor/core/types/util.d.ts create mode 100644 node_modules/@capacitor/core/types/web-plugin.d.ts create mode 100644 node_modules/@ionic/cli-framework-output/LICENSE create mode 100644 node_modules/@ionic/cli-framework-output/README.md create mode 100644 node_modules/@ionic/cli-framework-output/dist/colors.d.ts create mode 100644 node_modules/@ionic/cli-framework-output/dist/colors.js create mode 100644 node_modules/@ionic/cli-framework-output/dist/index.d.ts create mode 100644 node_modules/@ionic/cli-framework-output/dist/index.js create mode 100644 node_modules/@ionic/cli-framework-output/dist/logger.d.ts create mode 100644 node_modules/@ionic/cli-framework-output/dist/logger.js create mode 100644 node_modules/@ionic/cli-framework-output/dist/output.d.ts create mode 100644 node_modules/@ionic/cli-framework-output/dist/output.js create mode 100644 node_modules/@ionic/cli-framework-output/dist/tasks.d.ts create mode 100644 node_modules/@ionic/cli-framework-output/dist/tasks.js create mode 100644 node_modules/@ionic/cli-framework-output/dist/utils.d.ts create mode 100644 node_modules/@ionic/cli-framework-output/dist/utils.js create mode 100644 node_modules/@ionic/cli-framework-output/package.json create mode 100644 node_modules/@ionic/utils-array/CHANGELOG.md create mode 100644 node_modules/@ionic/utils-array/LICENSE create mode 100644 node_modules/@ionic/utils-array/README.md create mode 100644 node_modules/@ionic/utils-array/dist/index.d.ts create mode 100644 node_modules/@ionic/utils-array/dist/index.js create mode 100644 node_modules/@ionic/utils-array/package.json create mode 100644 node_modules/@ionic/utils-fs/CHANGELOG.md create mode 100644 node_modules/@ionic/utils-fs/LICENSE create mode 100644 node_modules/@ionic/utils-fs/README.md create mode 100644 node_modules/@ionic/utils-fs/dist/index.d.ts create mode 100644 node_modules/@ionic/utils-fs/dist/index.js create mode 100644 node_modules/@ionic/utils-fs/dist/safe.d.ts create mode 100644 node_modules/@ionic/utils-fs/dist/safe.js create mode 100644 node_modules/@ionic/utils-fs/package.json create mode 100644 node_modules/@ionic/utils-object/CHANGELOG.md create mode 100644 node_modules/@ionic/utils-object/LICENSE create mode 100644 node_modules/@ionic/utils-object/README.md create mode 100644 node_modules/@ionic/utils-object/dist/index.d.ts create mode 100644 node_modules/@ionic/utils-object/dist/index.js create mode 100644 node_modules/@ionic/utils-object/package.json create mode 100644 node_modules/@ionic/utils-process/CHANGELOG.md create mode 100644 node_modules/@ionic/utils-process/LICENSE create mode 100644 node_modules/@ionic/utils-process/README.md create mode 100644 node_modules/@ionic/utils-process/dist/index.d.ts create mode 100644 node_modules/@ionic/utils-process/dist/index.js create mode 100644 node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/CHANGELOG.md create mode 100644 node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/LICENSE create mode 100644 node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/README.md create mode 100644 node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/ansi.d.ts create mode 100644 node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/ansi.js create mode 100644 node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/cursor.d.ts create mode 100644 node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/cursor.js create mode 100644 node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/format.d.ts create mode 100644 node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/format.js create mode 100644 node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/index.d.ts create mode 100644 node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/index.js create mode 100644 node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/info.d.ts create mode 100644 node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/info.js create mode 100644 node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/package.json create mode 100644 node_modules/@ionic/utils-process/package.json create mode 100644 node_modules/@ionic/utils-stream/CHANGELOG.md create mode 100644 node_modules/@ionic/utils-stream/LICENSE create mode 100644 node_modules/@ionic/utils-stream/README.md create mode 100644 node_modules/@ionic/utils-stream/dist/index.d.ts create mode 100644 node_modules/@ionic/utils-stream/dist/index.js create mode 100644 node_modules/@ionic/utils-stream/package.json create mode 100644 node_modules/@ionic/utils-subprocess/LICENSE create mode 100644 node_modules/@ionic/utils-subprocess/README.md create mode 100644 node_modules/@ionic/utils-subprocess/dist/index.d.ts create mode 100644 node_modules/@ionic/utils-subprocess/dist/index.js create mode 100644 node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/CHANGELOG.md create mode 100644 node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/LICENSE create mode 100644 node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/README.md create mode 100644 node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/ansi.d.ts create mode 100644 node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/ansi.js create mode 100644 node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/cursor.d.ts create mode 100644 node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/cursor.js create mode 100644 node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/format.d.ts create mode 100644 node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/format.js create mode 100644 node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/index.d.ts create mode 100644 node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/index.js create mode 100644 node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/info.d.ts create mode 100644 node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/info.js create mode 100644 node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/package.json create mode 100644 node_modules/@ionic/utils-subprocess/package.json create mode 100644 node_modules/@ionic/utils-terminal/LICENSE create mode 100644 node_modules/@ionic/utils-terminal/README.md create mode 100644 node_modules/@ionic/utils-terminal/dist/ansi.d.ts create mode 100644 node_modules/@ionic/utils-terminal/dist/ansi.js create mode 100644 node_modules/@ionic/utils-terminal/dist/cursor.d.ts create mode 100644 node_modules/@ionic/utils-terminal/dist/cursor.js create mode 100644 node_modules/@ionic/utils-terminal/dist/format.d.ts create mode 100644 node_modules/@ionic/utils-terminal/dist/format.js create mode 100644 node_modules/@ionic/utils-terminal/dist/index.d.ts create mode 100644 node_modules/@ionic/utils-terminal/dist/index.js create mode 100644 node_modules/@ionic/utils-terminal/dist/info.d.ts create mode 100644 node_modules/@ionic/utils-terminal/dist/info.js create mode 100644 node_modules/@ionic/utils-terminal/package.json create mode 100644 node_modules/@types/fs-extra/LICENSE create mode 100644 node_modules/@types/fs-extra/README.md create mode 100644 node_modules/@types/fs-extra/index.d.ts create mode 100644 node_modules/@types/fs-extra/package.json create mode 100644 node_modules/@types/node/LICENSE create mode 100644 node_modules/@types/node/README.md create mode 100644 node_modules/@types/node/assert.d.ts create mode 100644 node_modules/@types/node/assert/strict.d.ts create mode 100644 node_modules/@types/node/async_hooks.d.ts create mode 100644 node_modules/@types/node/buffer.buffer.d.ts create mode 100644 node_modules/@types/node/buffer.d.ts create mode 100644 node_modules/@types/node/child_process.d.ts create mode 100644 node_modules/@types/node/cluster.d.ts create mode 100644 node_modules/@types/node/console.d.ts create mode 100644 node_modules/@types/node/constants.d.ts create mode 100644 node_modules/@types/node/crypto.d.ts create mode 100644 node_modules/@types/node/dgram.d.ts create mode 100644 node_modules/@types/node/diagnostics_channel.d.ts create mode 100644 node_modules/@types/node/dns.d.ts create mode 100644 node_modules/@types/node/dns/promises.d.ts create mode 100644 node_modules/@types/node/domain.d.ts create mode 100644 node_modules/@types/node/events.d.ts create mode 100644 node_modules/@types/node/ffi.d.ts create mode 100644 node_modules/@types/node/fs.d.ts create mode 100644 node_modules/@types/node/fs/promises.d.ts create mode 100644 node_modules/@types/node/globals.d.ts create mode 100644 node_modules/@types/node/globals.typedarray.d.ts create mode 100644 node_modules/@types/node/http.d.ts create mode 100644 node_modules/@types/node/http2.d.ts create mode 100644 node_modules/@types/node/https.d.ts create mode 100644 node_modules/@types/node/index.d.ts create mode 100644 node_modules/@types/node/inspector.d.ts create mode 100644 node_modules/@types/node/inspector.generated.d.ts create mode 100644 node_modules/@types/node/inspector/promises.d.ts create mode 100644 node_modules/@types/node/module.d.ts create mode 100644 node_modules/@types/node/net.d.ts create mode 100644 node_modules/@types/node/os.d.ts create mode 100644 node_modules/@types/node/package.json create mode 100644 node_modules/@types/node/path.d.ts create mode 100644 node_modules/@types/node/path/posix.d.ts create mode 100644 node_modules/@types/node/path/win32.d.ts create mode 100644 node_modules/@types/node/perf_hooks.d.ts create mode 100644 node_modules/@types/node/process.d.ts create mode 100644 node_modules/@types/node/punycode.d.ts create mode 100644 node_modules/@types/node/querystring.d.ts create mode 100644 node_modules/@types/node/quic.d.ts create mode 100644 node_modules/@types/node/readline.d.ts create mode 100644 node_modules/@types/node/readline/promises.d.ts create mode 100644 node_modules/@types/node/repl.d.ts create mode 100644 node_modules/@types/node/sea.d.ts create mode 100644 node_modules/@types/node/sqlite.d.ts create mode 100644 node_modules/@types/node/stream.d.ts create mode 100644 node_modules/@types/node/stream/consumers.d.ts create mode 100644 node_modules/@types/node/stream/iter.d.ts create mode 100644 node_modules/@types/node/stream/promises.d.ts create mode 100644 node_modules/@types/node/stream/web.d.ts create mode 100644 node_modules/@types/node/string_decoder.d.ts create mode 100644 node_modules/@types/node/test.d.ts create mode 100644 node_modules/@types/node/test/reporters.d.ts create mode 100644 node_modules/@types/node/timers.d.ts create mode 100644 node_modules/@types/node/timers/promises.d.ts create mode 100644 node_modules/@types/node/tls.d.ts create mode 100644 node_modules/@types/node/trace_events.d.ts create mode 100644 node_modules/@types/node/ts5.6/buffer.buffer.d.ts create mode 100644 node_modules/@types/node/ts5.6/compatibility/float16array.d.ts create mode 100644 node_modules/@types/node/ts5.6/globals.typedarray.d.ts create mode 100644 node_modules/@types/node/ts5.6/index.d.ts create mode 100644 node_modules/@types/node/ts5.7/compatibility/float16array.d.ts create mode 100644 node_modules/@types/node/ts5.7/index.d.ts create mode 100644 node_modules/@types/node/tty.d.ts create mode 100644 node_modules/@types/node/url.d.ts create mode 100644 node_modules/@types/node/util.d.ts create mode 100644 node_modules/@types/node/util/types.d.ts create mode 100644 node_modules/@types/node/v8.d.ts create mode 100644 node_modules/@types/node/vfs.d.ts create mode 100644 node_modules/@types/node/vm.d.ts create mode 100644 node_modules/@types/node/wasi.d.ts create mode 100644 node_modules/@types/node/web-globals/abortcontroller.d.ts create mode 100644 node_modules/@types/node/web-globals/blob.d.ts create mode 100644 node_modules/@types/node/web-globals/console.d.ts create mode 100644 node_modules/@types/node/web-globals/crypto.d.ts create mode 100644 node_modules/@types/node/web-globals/domexception.d.ts create mode 100644 node_modules/@types/node/web-globals/encoding.d.ts create mode 100644 node_modules/@types/node/web-globals/events.d.ts create mode 100644 node_modules/@types/node/web-globals/fetch.d.ts create mode 100644 node_modules/@types/node/web-globals/importmeta.d.ts create mode 100644 node_modules/@types/node/web-globals/messaging.d.ts create mode 100644 node_modules/@types/node/web-globals/navigator.d.ts create mode 100644 node_modules/@types/node/web-globals/performance.d.ts create mode 100644 node_modules/@types/node/web-globals/storage.d.ts create mode 100644 node_modules/@types/node/web-globals/streams.d.ts create mode 100644 node_modules/@types/node/web-globals/timers.d.ts create mode 100644 node_modules/@types/node/web-globals/url.d.ts create mode 100644 node_modules/@types/node/worker_threads.d.ts create mode 100644 node_modules/@types/node/zlib.d.ts create mode 100644 node_modules/@types/node/zlib/iter.d.ts create mode 100644 node_modules/@types/slice-ansi/LICENSE create mode 100644 node_modules/@types/slice-ansi/README.md create mode 100644 node_modules/@types/slice-ansi/index.d.ts create mode 100644 node_modules/@types/slice-ansi/package.json create mode 100644 node_modules/@typescript/typescript-linux-x64/LICENSE create mode 100644 node_modules/@typescript/typescript-linux-x64/NOTICE.txt create mode 100644 node_modules/@typescript/typescript-linux-x64/README.md create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.decorators.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.decorators.legacy.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.dom.asynciterable.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.dom.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.dom.iterable.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.collection.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.core.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.generator.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.iterable.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.promise.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.proxy.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.reflect.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.symbol.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.symbol.wellknown.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2016.array.include.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2016.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2016.full.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2016.intl.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.arraybuffer.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.date.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.full.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.intl.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.object.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.sharedmemory.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.string.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.typedarrays.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.asyncgenerator.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.asynciterable.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.full.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.intl.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.promise.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.regexp.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.array.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.full.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.intl.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.object.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.string.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.symbol.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.bigint.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.date.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.full.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.intl.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.number.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.promise.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.sharedmemory.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.string.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.symbol.wellknown.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.full.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.intl.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.promise.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.string.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.weakref.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.array.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.error.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.full.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.intl.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.object.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.regexp.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.string.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.array.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.collection.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.full.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.intl.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.arraybuffer.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.collection.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.full.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.object.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.promise.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.regexp.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.sharedmemory.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.string.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.collection.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.float16.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.full.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.intl.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.iterator.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.promise.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.regexp.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es5.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.es6.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.array.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.collection.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.date.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.decorators.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.disposable.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.error.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.full.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.intl.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.sharedmemory.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.temporal.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.typedarrays.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.scripthost.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.webworker.asynciterable.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.webworker.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.webworker.importscripts.d.ts create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/lib.webworker.iterable.d.ts create mode 100755 node_modules/@typescript/typescript-linux-x64/lib/tsc create mode 100644 node_modules/@typescript/typescript-linux-x64/lib/tsc.sig create mode 100644 node_modules/@typescript/typescript-linux-x64/package.json create mode 100644 node_modules/@xmldom/xmldom/CHANGELOG.md create mode 100644 node_modules/@xmldom/xmldom/LICENSE create mode 100644 node_modules/@xmldom/xmldom/SECURITY.md create mode 100644 node_modules/@xmldom/xmldom/index.d.ts create mode 100644 node_modules/@xmldom/xmldom/lib/.eslintrc.yml create mode 100644 node_modules/@xmldom/xmldom/lib/conventions.js create mode 100644 node_modules/@xmldom/xmldom/lib/dom-parser.js create mode 100644 node_modules/@xmldom/xmldom/lib/dom.js create mode 100644 node_modules/@xmldom/xmldom/lib/entities.js create mode 100644 node_modules/@xmldom/xmldom/lib/errors.js create mode 100644 node_modules/@xmldom/xmldom/lib/grammar.js create mode 100644 node_modules/@xmldom/xmldom/lib/index.js create mode 100644 node_modules/@xmldom/xmldom/lib/sax.js create mode 100644 node_modules/@xmldom/xmldom/package.json create mode 100644 node_modules/@xmldom/xmldom/readme.md create mode 100644 node_modules/ansi-regex/index.d.ts create mode 100644 node_modules/ansi-regex/index.js create mode 100644 node_modules/ansi-regex/license create mode 100644 node_modules/ansi-regex/package.json create mode 100644 node_modules/ansi-regex/readme.md create mode 100644 node_modules/ansi-styles/index.d.ts create mode 100644 node_modules/ansi-styles/index.js create mode 100644 node_modules/ansi-styles/license create mode 100644 node_modules/ansi-styles/package.json create mode 100644 node_modules/ansi-styles/readme.md create mode 100644 node_modules/astral-regex/index.d.ts create mode 100644 node_modules/astral-regex/index.js create mode 100644 node_modules/astral-regex/license create mode 100644 node_modules/astral-regex/package.json create mode 100644 node_modules/astral-regex/readme.md create mode 100644 node_modules/at-least-node/LICENSE create mode 100644 node_modules/at-least-node/README.md create mode 100644 node_modules/at-least-node/index.js create mode 100644 node_modules/at-least-node/package.json create mode 100644 node_modules/balanced-match/.github/FUNDING.yml create mode 100644 node_modules/balanced-match/LICENSE.md create mode 100644 node_modules/balanced-match/README.md create mode 100644 node_modules/balanced-match/index.js create mode 100644 node_modules/balanced-match/package.json create mode 100644 node_modules/base64-js/LICENSE create mode 100644 node_modules/base64-js/README.md create mode 100644 node_modules/base64-js/base64js.min.js create mode 100644 node_modules/base64-js/index.d.ts create mode 100644 node_modules/base64-js/index.js create mode 100644 node_modules/base64-js/package.json create mode 100644 node_modules/big-integer/BigInteger.d.ts create mode 100644 node_modules/big-integer/BigInteger.js create mode 100644 node_modules/big-integer/BigInteger.min.js create mode 100644 node_modules/big-integer/LICENSE create mode 100644 node_modules/big-integer/README.md create mode 100644 node_modules/big-integer/bower.json create mode 100644 node_modules/big-integer/package.json create mode 100644 node_modules/big-integer/tsconfig.json create mode 100644 node_modules/bplist-parser/.editorconfig create mode 100644 node_modules/bplist-parser/.eslintignore create mode 100644 node_modules/bplist-parser/.eslintrc.js create mode 100644 node_modules/bplist-parser/README.md create mode 100644 node_modules/bplist-parser/bplistParser.d.ts create mode 100644 node_modules/bplist-parser/bplistParser.js create mode 100644 node_modules/bplist-parser/package.json create mode 100644 node_modules/brace-expansion/.github/FUNDING.yml create mode 100644 node_modules/brace-expansion/LICENSE create mode 100644 node_modules/brace-expansion/README.md create mode 100644 node_modules/brace-expansion/index.js create mode 100644 node_modules/brace-expansion/package.json create mode 100644 node_modules/buffer-crc32/LICENSE create mode 100644 node_modules/buffer-crc32/README.md create mode 100644 node_modules/buffer-crc32/index.js create mode 100644 node_modules/buffer-crc32/package.json create mode 100644 node_modules/chownr/LICENSE create mode 100644 node_modules/chownr/README.md create mode 100644 node_modules/chownr/chownr.js create mode 100644 node_modules/chownr/package.json create mode 100644 node_modules/color-convert/CHANGELOG.md create mode 100644 node_modules/color-convert/LICENSE create mode 100644 node_modules/color-convert/README.md create mode 100644 node_modules/color-convert/conversions.js create mode 100644 node_modules/color-convert/index.js create mode 100644 node_modules/color-convert/package.json create mode 100644 node_modules/color-convert/route.js create mode 100644 node_modules/color-name/LICENSE create mode 100644 node_modules/color-name/README.md create mode 100644 node_modules/color-name/index.js create mode 100644 node_modules/color-name/package.json create mode 100644 node_modules/commander/LICENSE create mode 100644 node_modules/commander/Readme.md create mode 100644 node_modules/commander/esm.mjs create mode 100644 node_modules/commander/index.js create mode 100644 node_modules/commander/lib/argument.js create mode 100644 node_modules/commander/lib/command.js create mode 100644 node_modules/commander/lib/error.js create mode 100644 node_modules/commander/lib/help.js create mode 100644 node_modules/commander/lib/option.js create mode 100644 node_modules/commander/lib/suggestSimilar.js create mode 100644 node_modules/commander/package-support.json create mode 100644 node_modules/commander/package.json create mode 100644 node_modules/commander/typings/index.d.ts create mode 100644 node_modules/cross-spawn/LICENSE create mode 100644 node_modules/cross-spawn/README.md create mode 100644 node_modules/cross-spawn/index.js create mode 100644 node_modules/cross-spawn/lib/enoent.js create mode 100644 node_modules/cross-spawn/lib/parse.js create mode 100644 node_modules/cross-spawn/lib/util/escape.js create mode 100644 node_modules/cross-spawn/lib/util/readShebang.js create mode 100644 node_modules/cross-spawn/lib/util/resolveCommand.js create mode 100644 node_modules/cross-spawn/package.json create mode 100644 node_modules/debug/LICENSE create mode 100644 node_modules/debug/README.md create mode 100644 node_modules/debug/package.json create mode 100644 node_modules/debug/src/browser.js create mode 100644 node_modules/debug/src/common.js create mode 100644 node_modules/debug/src/index.js create mode 100644 node_modules/debug/src/node.js create mode 100644 node_modules/define-lazy-prop/index.d.ts create mode 100644 node_modules/define-lazy-prop/index.js create mode 100644 node_modules/define-lazy-prop/license create mode 100644 node_modules/define-lazy-prop/package.json create mode 100644 node_modules/define-lazy-prop/readme.md create mode 100644 node_modules/elementtree/.npmignore create mode 100644 node_modules/elementtree/.travis.yml create mode 100644 node_modules/elementtree/CHANGES.md create mode 100644 node_modules/elementtree/LICENSE.txt create mode 100755 node_modules/elementtree/Makefile create mode 100644 node_modules/elementtree/NOTICE create mode 100644 node_modules/elementtree/README.md create mode 100644 node_modules/elementtree/lib/constants.js create mode 100644 node_modules/elementtree/lib/elementpath.js create mode 100644 node_modules/elementtree/lib/elementtree.js create mode 100644 node_modules/elementtree/lib/errors.js create mode 100644 node_modules/elementtree/lib/parser.js create mode 100644 node_modules/elementtree/lib/parsers/index.js create mode 100644 node_modules/elementtree/lib/parsers/sax.js create mode 100644 node_modules/elementtree/lib/sprintf.js create mode 100644 node_modules/elementtree/lib/treebuilder.js create mode 100644 node_modules/elementtree/lib/utils.js create mode 100644 node_modules/elementtree/package.json create mode 100644 node_modules/elementtree/tests/data/bom-xml.xml create mode 100644 node_modules/elementtree/tests/data/xml1.xml create mode 100644 node_modules/elementtree/tests/data/xml2.xml create mode 100644 node_modules/elementtree/tests/test-simple.js create mode 100644 node_modules/emoji-regex/LICENSE-MIT.txt create mode 100644 node_modules/emoji-regex/README.md create mode 100644 node_modules/emoji-regex/es2015/index.js create mode 100644 node_modules/emoji-regex/es2015/text.js create mode 100644 node_modules/emoji-regex/index.d.ts create mode 100644 node_modules/emoji-regex/index.js create mode 100644 node_modules/emoji-regex/package.json create mode 100644 node_modules/emoji-regex/text.js create mode 100644 node_modules/env-paths/index.d.ts create mode 100644 node_modules/env-paths/index.js create mode 100644 node_modules/env-paths/license create mode 100644 node_modules/env-paths/package.json create mode 100644 node_modules/env-paths/readme.md create mode 100644 node_modules/fd-slicer/.npmignore create mode 100644 node_modules/fd-slicer/.travis.yml create mode 100644 node_modules/fd-slicer/CHANGELOG.md create mode 100644 node_modules/fd-slicer/LICENSE create mode 100644 node_modules/fd-slicer/README.md create mode 100644 node_modules/fd-slicer/index.js create mode 100644 node_modules/fd-slicer/package.json create mode 100644 node_modules/fd-slicer/test/test.js create mode 100644 node_modules/fs-extra/CHANGELOG.md create mode 100644 node_modules/fs-extra/LICENSE create mode 100644 node_modules/fs-extra/README.md create mode 100644 node_modules/fs-extra/lib/copy-sync/copy-sync.js create mode 100644 node_modules/fs-extra/lib/copy-sync/index.js create mode 100644 node_modules/fs-extra/lib/copy/copy.js create mode 100644 node_modules/fs-extra/lib/copy/index.js create mode 100644 node_modules/fs-extra/lib/empty/index.js create mode 100644 node_modules/fs-extra/lib/ensure/file.js create mode 100644 node_modules/fs-extra/lib/ensure/index.js create mode 100644 node_modules/fs-extra/lib/ensure/link.js create mode 100644 node_modules/fs-extra/lib/ensure/symlink-paths.js create mode 100644 node_modules/fs-extra/lib/ensure/symlink-type.js create mode 100644 node_modules/fs-extra/lib/ensure/symlink.js create mode 100644 node_modules/fs-extra/lib/fs/index.js create mode 100644 node_modules/fs-extra/lib/index.js create mode 100644 node_modules/fs-extra/lib/json/index.js create mode 100644 node_modules/fs-extra/lib/json/jsonfile.js create mode 100644 node_modules/fs-extra/lib/json/output-json-sync.js create mode 100644 node_modules/fs-extra/lib/json/output-json.js create mode 100644 node_modules/fs-extra/lib/mkdirs/index.js create mode 100644 node_modules/fs-extra/lib/mkdirs/make-dir.js create mode 100644 node_modules/fs-extra/lib/move-sync/index.js create mode 100644 node_modules/fs-extra/lib/move-sync/move-sync.js create mode 100644 node_modules/fs-extra/lib/move/index.js create mode 100644 node_modules/fs-extra/lib/move/move.js create mode 100644 node_modules/fs-extra/lib/output/index.js create mode 100644 node_modules/fs-extra/lib/path-exists/index.js create mode 100644 node_modules/fs-extra/lib/remove/index.js create mode 100644 node_modules/fs-extra/lib/remove/rimraf.js create mode 100644 node_modules/fs-extra/lib/util/stat.js create mode 100644 node_modules/fs-extra/lib/util/utimes.js create mode 100644 node_modules/fs-extra/package.json create mode 100644 node_modules/fs-minipass/LICENSE create mode 100644 node_modules/fs-minipass/README.md create mode 100644 node_modules/fs-minipass/index.js create mode 100644 node_modules/fs-minipass/node_modules/minipass/LICENSE create mode 100644 node_modules/fs-minipass/node_modules/minipass/README.md create mode 100644 node_modules/fs-minipass/node_modules/minipass/index.d.ts create mode 100644 node_modules/fs-minipass/node_modules/minipass/index.js create mode 100644 node_modules/fs-minipass/node_modules/minipass/package.json create mode 100644 node_modules/fs-minipass/package.json create mode 100644 node_modules/fs.realpath/LICENSE create mode 100644 node_modules/fs.realpath/README.md create mode 100644 node_modules/fs.realpath/index.js create mode 100644 node_modules/fs.realpath/old.js create mode 100644 node_modules/fs.realpath/package.json create mode 100644 node_modules/glob/LICENSE create mode 100644 node_modules/glob/README.md create mode 100644 node_modules/glob/dist/cjs/glob.d.ts create mode 100644 node_modules/glob/dist/cjs/glob.d.ts.map create mode 100644 node_modules/glob/dist/cjs/glob.js create mode 100644 node_modules/glob/dist/cjs/glob.js.map create mode 100644 node_modules/glob/dist/cjs/has-magic.d.ts create mode 100644 node_modules/glob/dist/cjs/has-magic.d.ts.map create mode 100644 node_modules/glob/dist/cjs/has-magic.js create mode 100644 node_modules/glob/dist/cjs/has-magic.js.map create mode 100644 node_modules/glob/dist/cjs/ignore.d.ts create mode 100644 node_modules/glob/dist/cjs/ignore.d.ts.map create mode 100644 node_modules/glob/dist/cjs/ignore.js create mode 100644 node_modules/glob/dist/cjs/ignore.js.map create mode 100644 node_modules/glob/dist/cjs/index-cjs.d.ts create mode 100644 node_modules/glob/dist/cjs/index-cjs.d.ts.map create mode 100644 node_modules/glob/dist/cjs/index-cjs.js create mode 100644 node_modules/glob/dist/cjs/index-cjs.js.map create mode 100644 node_modules/glob/dist/cjs/index.d.ts create mode 100644 node_modules/glob/dist/cjs/index.d.ts.map create mode 100644 node_modules/glob/dist/cjs/index.js create mode 100644 node_modules/glob/dist/cjs/index.js.map create mode 100644 node_modules/glob/dist/cjs/package.json create mode 100644 node_modules/glob/dist/cjs/pattern.d.ts create mode 100644 node_modules/glob/dist/cjs/pattern.d.ts.map create mode 100644 node_modules/glob/dist/cjs/pattern.js create mode 100644 node_modules/glob/dist/cjs/pattern.js.map create mode 100644 node_modules/glob/dist/cjs/processor.d.ts create mode 100644 node_modules/glob/dist/cjs/processor.d.ts.map create mode 100644 node_modules/glob/dist/cjs/processor.js create mode 100644 node_modules/glob/dist/cjs/processor.js.map create mode 100644 node_modules/glob/dist/cjs/walker.d.ts create mode 100644 node_modules/glob/dist/cjs/walker.d.ts.map create mode 100644 node_modules/glob/dist/cjs/walker.js create mode 100644 node_modules/glob/dist/cjs/walker.js.map create mode 100644 node_modules/glob/dist/mjs/glob.d.ts create mode 100644 node_modules/glob/dist/mjs/glob.d.ts.map create mode 100644 node_modules/glob/dist/mjs/glob.js create mode 100644 node_modules/glob/dist/mjs/glob.js.map create mode 100644 node_modules/glob/dist/mjs/has-magic.d.ts create mode 100644 node_modules/glob/dist/mjs/has-magic.d.ts.map create mode 100644 node_modules/glob/dist/mjs/has-magic.js create mode 100644 node_modules/glob/dist/mjs/has-magic.js.map create mode 100644 node_modules/glob/dist/mjs/ignore.d.ts create mode 100644 node_modules/glob/dist/mjs/ignore.d.ts.map create mode 100644 node_modules/glob/dist/mjs/ignore.js create mode 100644 node_modules/glob/dist/mjs/ignore.js.map create mode 100644 node_modules/glob/dist/mjs/index.d.ts create mode 100644 node_modules/glob/dist/mjs/index.d.ts.map create mode 100644 node_modules/glob/dist/mjs/index.js create mode 100644 node_modules/glob/dist/mjs/index.js.map create mode 100644 node_modules/glob/dist/mjs/package.json create mode 100644 node_modules/glob/dist/mjs/pattern.d.ts create mode 100644 node_modules/glob/dist/mjs/pattern.d.ts.map create mode 100644 node_modules/glob/dist/mjs/pattern.js create mode 100644 node_modules/glob/dist/mjs/pattern.js.map create mode 100644 node_modules/glob/dist/mjs/processor.d.ts create mode 100644 node_modules/glob/dist/mjs/processor.d.ts.map create mode 100644 node_modules/glob/dist/mjs/processor.js create mode 100644 node_modules/glob/dist/mjs/processor.js.map create mode 100644 node_modules/glob/dist/mjs/walker.d.ts create mode 100644 node_modules/glob/dist/mjs/walker.d.ts.map create mode 100644 node_modules/glob/dist/mjs/walker.js create mode 100644 node_modules/glob/dist/mjs/walker.js.map create mode 100644 node_modules/glob/package.json create mode 100644 node_modules/graceful-fs/LICENSE create mode 100644 node_modules/graceful-fs/README.md create mode 100644 node_modules/graceful-fs/clone.js create mode 100644 node_modules/graceful-fs/graceful-fs.js create mode 100644 node_modules/graceful-fs/legacy-streams.js create mode 100644 node_modules/graceful-fs/package.json create mode 100644 node_modules/graceful-fs/polyfills.js create mode 100644 node_modules/inherits/LICENSE create mode 100644 node_modules/inherits/README.md create mode 100644 node_modules/inherits/inherits.js create mode 100644 node_modules/inherits/inherits_browser.js create mode 100644 node_modules/inherits/package.json create mode 100644 node_modules/ini/LICENSE create mode 100644 node_modules/ini/README.md create mode 100644 node_modules/ini/lib/ini.js create mode 100644 node_modules/ini/package.json create mode 100755 node_modules/is-docker/cli.js create mode 100644 node_modules/is-docker/index.d.ts create mode 100644 node_modules/is-docker/index.js create mode 100644 node_modules/is-docker/license create mode 100644 node_modules/is-docker/package.json create mode 100644 node_modules/is-docker/readme.md create mode 100644 node_modules/is-fullwidth-code-point/index.d.ts create mode 100644 node_modules/is-fullwidth-code-point/index.js create mode 100644 node_modules/is-fullwidth-code-point/license create mode 100644 node_modules/is-fullwidth-code-point/package.json create mode 100644 node_modules/is-fullwidth-code-point/readme.md create mode 100644 node_modules/is-wsl/index.d.ts create mode 100644 node_modules/is-wsl/index.js create mode 100644 node_modules/is-wsl/license create mode 100644 node_modules/is-wsl/package.json create mode 100644 node_modules/is-wsl/readme.md create mode 100644 node_modules/isexe/.npmignore create mode 100644 node_modules/isexe/LICENSE create mode 100644 node_modules/isexe/README.md create mode 100644 node_modules/isexe/index.js create mode 100644 node_modules/isexe/mode.js create mode 100644 node_modules/isexe/package.json create mode 100644 node_modules/isexe/test/basic.js create mode 100644 node_modules/isexe/windows.js create mode 100644 node_modules/jsonfile/LICENSE create mode 100644 node_modules/jsonfile/README.md create mode 100644 node_modules/jsonfile/index.js create mode 100644 node_modules/jsonfile/package.json create mode 100644 node_modules/jsonfile/utils.js create mode 100644 node_modules/kleur/colors.d.ts create mode 100644 node_modules/kleur/colors.js create mode 100644 node_modules/kleur/colors.mjs create mode 100644 node_modules/kleur/index.d.ts create mode 100644 node_modules/kleur/index.js create mode 100644 node_modules/kleur/index.mjs create mode 100644 node_modules/kleur/license create mode 100644 node_modules/kleur/package.json create mode 100644 node_modules/kleur/readme.md create mode 100644 node_modules/lru-cache/LICENSE create mode 100644 node_modules/lru-cache/README.md create mode 100644 node_modules/lru-cache/dist/commonjs/index.d.ts create mode 100644 node_modules/lru-cache/dist/commonjs/index.d.ts.map create mode 100644 node_modules/lru-cache/dist/commonjs/index.js create mode 100644 node_modules/lru-cache/dist/commonjs/index.js.map create mode 100644 node_modules/lru-cache/dist/commonjs/index.min.js create mode 100644 node_modules/lru-cache/dist/commonjs/index.min.js.map create mode 100644 node_modules/lru-cache/dist/commonjs/package.json create mode 100644 node_modules/lru-cache/dist/esm/index.d.ts create mode 100644 node_modules/lru-cache/dist/esm/index.d.ts.map create mode 100644 node_modules/lru-cache/dist/esm/index.js create mode 100644 node_modules/lru-cache/dist/esm/index.js.map create mode 100644 node_modules/lru-cache/dist/esm/index.min.js create mode 100644 node_modules/lru-cache/dist/esm/index.min.js.map create mode 100644 node_modules/lru-cache/dist/esm/package.json create mode 100644 node_modules/lru-cache/package.json create mode 100644 node_modules/minimatch/LICENSE create mode 100644 node_modules/minimatch/README.md create mode 100644 node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts create mode 100644 node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts.map create mode 100644 node_modules/minimatch/dist/cjs/assert-valid-pattern.js create mode 100644 node_modules/minimatch/dist/cjs/assert-valid-pattern.js.map create mode 100644 node_modules/minimatch/dist/cjs/ast.d.ts create mode 100644 node_modules/minimatch/dist/cjs/ast.d.ts.map create mode 100644 node_modules/minimatch/dist/cjs/ast.js create mode 100644 node_modules/minimatch/dist/cjs/ast.js.map create mode 100644 node_modules/minimatch/dist/cjs/brace-expressions.d.ts create mode 100644 node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map create mode 100644 node_modules/minimatch/dist/cjs/brace-expressions.js create mode 100644 node_modules/minimatch/dist/cjs/brace-expressions.js.map create mode 100644 node_modules/minimatch/dist/cjs/escape.d.ts create mode 100644 node_modules/minimatch/dist/cjs/escape.d.ts.map create mode 100644 node_modules/minimatch/dist/cjs/escape.js create mode 100644 node_modules/minimatch/dist/cjs/escape.js.map create mode 100644 node_modules/minimatch/dist/cjs/index-cjs.d.ts create mode 100644 node_modules/minimatch/dist/cjs/index-cjs.d.ts.map create mode 100644 node_modules/minimatch/dist/cjs/index-cjs.js create mode 100644 node_modules/minimatch/dist/cjs/index-cjs.js.map create mode 100644 node_modules/minimatch/dist/cjs/index.d.ts create mode 100644 node_modules/minimatch/dist/cjs/index.d.ts.map create mode 100644 node_modules/minimatch/dist/cjs/index.js create mode 100644 node_modules/minimatch/dist/cjs/index.js.map create mode 100644 node_modules/minimatch/dist/cjs/package.json create mode 100644 node_modules/minimatch/dist/cjs/unescape.d.ts create mode 100644 node_modules/minimatch/dist/cjs/unescape.d.ts.map create mode 100644 node_modules/minimatch/dist/cjs/unescape.js create mode 100644 node_modules/minimatch/dist/cjs/unescape.js.map create mode 100644 node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts create mode 100644 node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts.map create mode 100644 node_modules/minimatch/dist/mjs/assert-valid-pattern.js create mode 100644 node_modules/minimatch/dist/mjs/assert-valid-pattern.js.map create mode 100644 node_modules/minimatch/dist/mjs/ast.d.ts create mode 100644 node_modules/minimatch/dist/mjs/ast.d.ts.map create mode 100644 node_modules/minimatch/dist/mjs/ast.js create mode 100644 node_modules/minimatch/dist/mjs/ast.js.map create mode 100644 node_modules/minimatch/dist/mjs/brace-expressions.d.ts create mode 100644 node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map create mode 100644 node_modules/minimatch/dist/mjs/brace-expressions.js create mode 100644 node_modules/minimatch/dist/mjs/brace-expressions.js.map create mode 100644 node_modules/minimatch/dist/mjs/escape.d.ts create mode 100644 node_modules/minimatch/dist/mjs/escape.d.ts.map create mode 100644 node_modules/minimatch/dist/mjs/escape.js create mode 100644 node_modules/minimatch/dist/mjs/escape.js.map create mode 100644 node_modules/minimatch/dist/mjs/index.d.ts create mode 100644 node_modules/minimatch/dist/mjs/index.d.ts.map create mode 100644 node_modules/minimatch/dist/mjs/index.js create mode 100644 node_modules/minimatch/dist/mjs/index.js.map create mode 100644 node_modules/minimatch/dist/mjs/package.json create mode 100644 node_modules/minimatch/dist/mjs/unescape.d.ts create mode 100644 node_modules/minimatch/dist/mjs/unescape.d.ts.map create mode 100644 node_modules/minimatch/dist/mjs/unescape.js create mode 100644 node_modules/minimatch/dist/mjs/unescape.js.map create mode 100644 node_modules/minimatch/package.json create mode 100644 node_modules/minipass/LICENSE create mode 100644 node_modules/minipass/README.md create mode 100644 node_modules/minipass/index.d.ts create mode 100644 node_modules/minipass/index.js create mode 100644 node_modules/minipass/index.mjs create mode 100644 node_modules/minipass/package.json create mode 100644 node_modules/minizlib/LICENSE create mode 100644 node_modules/minizlib/README.md create mode 100644 node_modules/minizlib/constants.js create mode 100644 node_modules/minizlib/index.js create mode 100644 node_modules/minizlib/node_modules/minipass/LICENSE create mode 100644 node_modules/minizlib/node_modules/minipass/README.md create mode 100644 node_modules/minizlib/node_modules/minipass/index.d.ts create mode 100644 node_modules/minizlib/node_modules/minipass/index.js create mode 100644 node_modules/minizlib/node_modules/minipass/package.json create mode 100644 node_modules/minizlib/package.json create mode 100644 node_modules/mkdirp/CHANGELOG.md create mode 100644 node_modules/mkdirp/LICENSE create mode 100755 node_modules/mkdirp/bin/cmd.js create mode 100644 node_modules/mkdirp/index.js create mode 100644 node_modules/mkdirp/lib/find-made.js create mode 100644 node_modules/mkdirp/lib/mkdirp-manual.js create mode 100644 node_modules/mkdirp/lib/mkdirp-native.js create mode 100644 node_modules/mkdirp/lib/opts-arg.js create mode 100644 node_modules/mkdirp/lib/path-arg.js create mode 100644 node_modules/mkdirp/lib/use-native.js create mode 100644 node_modules/mkdirp/package.json create mode 100644 node_modules/mkdirp/readme.markdown create mode 100644 node_modules/ms/index.js create mode 100644 node_modules/ms/license.md create mode 100644 node_modules/ms/package.json create mode 100644 node_modules/ms/readme.md create mode 100644 node_modules/native-run/LICENSE create mode 100644 node_modules/native-run/README.md create mode 100644 node_modules/native-run/assets/android/skins/LICENSE create mode 100644 node_modules/native-run/assets/android/skins/README.md create mode 100644 node_modules/native-run/assets/android/skins/nexus_5x/land_back.webp create mode 100644 node_modules/native-run/assets/android/skins/nexus_5x/land_fore.webp create mode 100644 node_modules/native-run/assets/android/skins/nexus_5x/land_shadow.webp create mode 100644 node_modules/native-run/assets/android/skins/nexus_5x/layout create mode 100644 node_modules/native-run/assets/android/skins/nexus_5x/port_back.webp create mode 100644 node_modules/native-run/assets/android/skins/nexus_5x/port_fore.webp create mode 100644 node_modules/native-run/assets/android/skins/nexus_5x/port_shadow.webp create mode 100644 node_modules/native-run/assets/android/skins/pixel/land_back.webp create mode 100644 node_modules/native-run/assets/android/skins/pixel/land_fore.webp create mode 100644 node_modules/native-run/assets/android/skins/pixel/land_shadow.webp create mode 100644 node_modules/native-run/assets/android/skins/pixel/layout create mode 100644 node_modules/native-run/assets/android/skins/pixel/port_back.webp create mode 100644 node_modules/native-run/assets/android/skins/pixel/port_fore.webp create mode 100644 node_modules/native-run/assets/android/skins/pixel/port_shadow.webp create mode 100644 node_modules/native-run/assets/android/skins/pixel_2/land_back.webp create mode 100644 node_modules/native-run/assets/android/skins/pixel_2/land_fore.webp create mode 100644 node_modules/native-run/assets/android/skins/pixel_2/land_shadow.webp create mode 100644 node_modules/native-run/assets/android/skins/pixel_2/layout create mode 100644 node_modules/native-run/assets/android/skins/pixel_2/port_back.webp create mode 100644 node_modules/native-run/assets/android/skins/pixel_2/port_fore.webp create mode 100644 node_modules/native-run/assets/android/skins/pixel_2/port_shadow.webp create mode 100644 node_modules/native-run/assets/android/skins/pixel_3/layout create mode 100644 node_modules/native-run/assets/android/skins/pixel_3/port_back.webp create mode 100644 node_modules/native-run/assets/android/skins/pixel_3/round_corners.webp create mode 100755 node_modules/native-run/bin/native-run create mode 100644 node_modules/native-run/dist/android/help.js create mode 100644 node_modules/native-run/dist/android/index.js create mode 100644 node_modules/native-run/dist/android/list.js create mode 100644 node_modules/native-run/dist/android/run.js create mode 100644 node_modules/native-run/dist/android/sdk-info.js create mode 100644 node_modules/native-run/dist/android/utils/adb.js create mode 100644 node_modules/native-run/dist/android/utils/apk.js create mode 100644 node_modules/native-run/dist/android/utils/avd.js create mode 100644 node_modules/native-run/dist/android/utils/binary-xml-parser.js create mode 100644 node_modules/native-run/dist/android/utils/emulator.js create mode 100644 node_modules/native-run/dist/android/utils/list.js create mode 100644 node_modules/native-run/dist/android/utils/run.js create mode 100644 node_modules/native-run/dist/android/utils/sdk/api.js create mode 100644 node_modules/native-run/dist/android/utils/sdk/index.js create mode 100644 node_modules/native-run/dist/android/utils/sdk/xml.js create mode 100644 node_modules/native-run/dist/constants.js create mode 100644 node_modules/native-run/dist/errors.js create mode 100644 node_modules/native-run/dist/help.js create mode 100644 node_modules/native-run/dist/index.js create mode 100644 node_modules/native-run/dist/ios/help.js create mode 100644 node_modules/native-run/dist/ios/index.js create mode 100644 node_modules/native-run/dist/ios/lib/client/afc.js create mode 100644 node_modules/native-run/dist/ios/lib/client/client.js create mode 100644 node_modules/native-run/dist/ios/lib/client/debugserver.js create mode 100644 node_modules/native-run/dist/ios/lib/client/index.js create mode 100644 node_modules/native-run/dist/ios/lib/client/installation_proxy.js create mode 100644 node_modules/native-run/dist/ios/lib/client/lockdownd.js create mode 100644 node_modules/native-run/dist/ios/lib/client/mobile_image_mounter.js create mode 100644 node_modules/native-run/dist/ios/lib/client/usbmuxd.js create mode 100644 node_modules/native-run/dist/ios/lib/index.js create mode 100644 node_modules/native-run/dist/ios/lib/lib-errors.js create mode 100644 node_modules/native-run/dist/ios/lib/manager.js create mode 100644 node_modules/native-run/dist/ios/lib/protocol/afc.js create mode 100644 node_modules/native-run/dist/ios/lib/protocol/gdb.js create mode 100644 node_modules/native-run/dist/ios/lib/protocol/index.js create mode 100644 node_modules/native-run/dist/ios/lib/protocol/lockdown.js create mode 100644 node_modules/native-run/dist/ios/lib/protocol/protocol.js create mode 100644 node_modules/native-run/dist/ios/lib/protocol/usbmux.js create mode 100644 node_modules/native-run/dist/ios/list.js create mode 100644 node_modules/native-run/dist/ios/run.js create mode 100644 node_modules/native-run/dist/ios/utils/app.js create mode 100644 node_modules/native-run/dist/ios/utils/device.js create mode 100644 node_modules/native-run/dist/ios/utils/simulator.js create mode 100644 node_modules/native-run/dist/ios/utils/xcode.js create mode 100644 node_modules/native-run/dist/list.js create mode 100644 node_modules/native-run/dist/utils/cli.js create mode 100644 node_modules/native-run/dist/utils/fn.js create mode 100644 node_modules/native-run/dist/utils/fs.js create mode 100644 node_modules/native-run/dist/utils/ini.js create mode 100644 node_modules/native-run/dist/utils/json.js create mode 100644 node_modules/native-run/dist/utils/list.js create mode 100644 node_modules/native-run/dist/utils/log.js create mode 100644 node_modules/native-run/dist/utils/object.js create mode 100644 node_modules/native-run/dist/utils/process.js create mode 100644 node_modules/native-run/dist/utils/unzip.js create mode 100644 node_modules/native-run/package.json create mode 100644 node_modules/open/index.d.ts create mode 100644 node_modules/open/index.js create mode 100644 node_modules/open/license create mode 100644 node_modules/open/package.json create mode 100644 node_modules/open/readme.md create mode 100755 node_modules/open/xdg-open create mode 100644 node_modules/path-key/index.d.ts create mode 100644 node_modules/path-key/index.js create mode 100644 node_modules/path-key/license create mode 100644 node_modules/path-key/package.json create mode 100644 node_modules/path-key/readme.md create mode 100644 node_modules/path-scurry/LICENSE.md create mode 100644 node_modules/path-scurry/README.md create mode 100644 node_modules/path-scurry/dist/commonjs/index.d.ts create mode 100644 node_modules/path-scurry/dist/commonjs/index.d.ts.map create mode 100644 node_modules/path-scurry/dist/commonjs/index.js create mode 100644 node_modules/path-scurry/dist/commonjs/index.js.map create mode 100644 node_modules/path-scurry/dist/commonjs/package.json create mode 100644 node_modules/path-scurry/dist/esm/index.d.ts create mode 100644 node_modules/path-scurry/dist/esm/index.d.ts.map create mode 100644 node_modules/path-scurry/dist/esm/index.js create mode 100644 node_modules/path-scurry/dist/esm/index.js.map create mode 100644 node_modules/path-scurry/dist/esm/package.json create mode 100644 node_modules/path-scurry/node_modules/minipass/LICENSE.md create mode 100644 node_modules/path-scurry/node_modules/minipass/README.md create mode 100644 node_modules/path-scurry/node_modules/minipass/dist/commonjs/index.d.ts create mode 100644 node_modules/path-scurry/node_modules/minipass/dist/commonjs/index.d.ts.map create mode 100644 node_modules/path-scurry/node_modules/minipass/dist/commonjs/index.js create mode 100644 node_modules/path-scurry/node_modules/minipass/dist/commonjs/index.js.map create mode 100644 node_modules/path-scurry/node_modules/minipass/dist/commonjs/package.json create mode 100644 node_modules/path-scurry/node_modules/minipass/dist/esm/index.d.ts create mode 100644 node_modules/path-scurry/node_modules/minipass/dist/esm/index.d.ts.map create mode 100644 node_modules/path-scurry/node_modules/minipass/dist/esm/index.js create mode 100644 node_modules/path-scurry/node_modules/minipass/dist/esm/index.js.map create mode 100644 node_modules/path-scurry/node_modules/minipass/dist/esm/package.json create mode 100644 node_modules/path-scurry/node_modules/minipass/package.json create mode 100644 node_modules/path-scurry/package.json create mode 100644 node_modules/pend/LICENSE create mode 100644 node_modules/pend/README.md create mode 100644 node_modules/pend/index.js create mode 100644 node_modules/pend/package.json create mode 100644 node_modules/pend/test.js create mode 100644 node_modules/plist/.github/workflows/ci.yml create mode 100644 node_modules/plist/.jshintrc create mode 100644 node_modules/plist/History.md create mode 100644 node_modules/plist/LICENSE create mode 100644 node_modules/plist/Makefile create mode 100644 node_modules/plist/README.md create mode 100644 node_modules/plist/dist/plist-build.js create mode 100644 node_modules/plist/dist/plist-parse.js create mode 100644 node_modules/plist/dist/plist.js create mode 100644 node_modules/plist/examples/browser/index.html create mode 100644 node_modules/plist/index.js create mode 100644 node_modules/plist/lib/build.js create mode 100644 node_modules/plist/lib/parse.js create mode 100644 node_modules/plist/package.json create mode 100644 node_modules/prompts/dist/dateparts/datepart.js create mode 100644 node_modules/prompts/dist/dateparts/day.js create mode 100644 node_modules/prompts/dist/dateparts/hours.js create mode 100644 node_modules/prompts/dist/dateparts/index.js create mode 100644 node_modules/prompts/dist/dateparts/meridiem.js create mode 100644 node_modules/prompts/dist/dateparts/milliseconds.js create mode 100644 node_modules/prompts/dist/dateparts/minutes.js create mode 100644 node_modules/prompts/dist/dateparts/month.js create mode 100644 node_modules/prompts/dist/dateparts/seconds.js create mode 100644 node_modules/prompts/dist/dateparts/year.js create mode 100644 node_modules/prompts/dist/elements/autocomplete.js create mode 100644 node_modules/prompts/dist/elements/autocompleteMultiselect.js create mode 100644 node_modules/prompts/dist/elements/confirm.js create mode 100644 node_modules/prompts/dist/elements/date.js create mode 100644 node_modules/prompts/dist/elements/index.js create mode 100644 node_modules/prompts/dist/elements/multiselect.js create mode 100644 node_modules/prompts/dist/elements/number.js create mode 100644 node_modules/prompts/dist/elements/prompt.js create mode 100644 node_modules/prompts/dist/elements/select.js create mode 100644 node_modules/prompts/dist/elements/text.js create mode 100644 node_modules/prompts/dist/elements/toggle.js create mode 100644 node_modules/prompts/dist/index.js create mode 100644 node_modules/prompts/dist/prompts.js create mode 100644 node_modules/prompts/dist/util/action.js create mode 100644 node_modules/prompts/dist/util/clear.js create mode 100644 node_modules/prompts/dist/util/entriesToDisplay.js create mode 100644 node_modules/prompts/dist/util/figures.js create mode 100644 node_modules/prompts/dist/util/index.js create mode 100644 node_modules/prompts/dist/util/lines.js create mode 100644 node_modules/prompts/dist/util/strip.js create mode 100644 node_modules/prompts/dist/util/style.js create mode 100644 node_modules/prompts/dist/util/wrap.js create mode 100644 node_modules/prompts/index.js create mode 100644 node_modules/prompts/lib/dateparts/datepart.js create mode 100644 node_modules/prompts/lib/dateparts/day.js create mode 100644 node_modules/prompts/lib/dateparts/hours.js create mode 100644 node_modules/prompts/lib/dateparts/index.js create mode 100644 node_modules/prompts/lib/dateparts/meridiem.js create mode 100644 node_modules/prompts/lib/dateparts/milliseconds.js create mode 100644 node_modules/prompts/lib/dateparts/minutes.js create mode 100644 node_modules/prompts/lib/dateparts/month.js create mode 100644 node_modules/prompts/lib/dateparts/seconds.js create mode 100644 node_modules/prompts/lib/dateparts/year.js create mode 100644 node_modules/prompts/lib/elements/autocomplete.js create mode 100644 node_modules/prompts/lib/elements/autocompleteMultiselect.js create mode 100644 node_modules/prompts/lib/elements/confirm.js create mode 100644 node_modules/prompts/lib/elements/date.js create mode 100644 node_modules/prompts/lib/elements/index.js create mode 100644 node_modules/prompts/lib/elements/multiselect.js create mode 100644 node_modules/prompts/lib/elements/number.js create mode 100644 node_modules/prompts/lib/elements/prompt.js create mode 100644 node_modules/prompts/lib/elements/select.js create mode 100644 node_modules/prompts/lib/elements/text.js create mode 100644 node_modules/prompts/lib/elements/toggle.js create mode 100644 node_modules/prompts/lib/index.js create mode 100644 node_modules/prompts/lib/prompts.js create mode 100644 node_modules/prompts/lib/util/action.js create mode 100644 node_modules/prompts/lib/util/clear.js create mode 100644 node_modules/prompts/lib/util/entriesToDisplay.js create mode 100644 node_modules/prompts/lib/util/figures.js create mode 100644 node_modules/prompts/lib/util/index.js create mode 100644 node_modules/prompts/lib/util/lines.js create mode 100644 node_modules/prompts/lib/util/strip.js create mode 100644 node_modules/prompts/lib/util/style.js create mode 100644 node_modules/prompts/lib/util/wrap.js create mode 100644 node_modules/prompts/license create mode 100644 node_modules/prompts/node_modules/kleur/index.js create mode 100644 node_modules/prompts/node_modules/kleur/kleur.d.ts create mode 100644 node_modules/prompts/node_modules/kleur/license create mode 100644 node_modules/prompts/node_modules/kleur/package.json create mode 100644 node_modules/prompts/node_modules/kleur/readme.md create mode 100644 node_modules/prompts/package.json create mode 100755 node_modules/prompts/readme.md create mode 100644 node_modules/readable-stream/CONTRIBUTING.md create mode 100644 node_modules/readable-stream/GOVERNANCE.md create mode 100644 node_modules/readable-stream/LICENSE create mode 100644 node_modules/readable-stream/README.md create mode 100644 node_modules/readable-stream/errors-browser.js create mode 100644 node_modules/readable-stream/errors.js create mode 100644 node_modules/readable-stream/experimentalWarning.js create mode 100644 node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 node_modules/readable-stream/lib/_stream_readable.js create mode 100644 node_modules/readable-stream/lib/_stream_transform.js create mode 100644 node_modules/readable-stream/lib/_stream_writable.js create mode 100644 node_modules/readable-stream/lib/internal/streams/async_iterator.js create mode 100644 node_modules/readable-stream/lib/internal/streams/buffer_list.js create mode 100644 node_modules/readable-stream/lib/internal/streams/destroy.js create mode 100644 node_modules/readable-stream/lib/internal/streams/end-of-stream.js create mode 100644 node_modules/readable-stream/lib/internal/streams/from-browser.js create mode 100644 node_modules/readable-stream/lib/internal/streams/from.js create mode 100644 node_modules/readable-stream/lib/internal/streams/pipeline.js create mode 100644 node_modules/readable-stream/lib/internal/streams/state.js create mode 100644 node_modules/readable-stream/lib/internal/streams/stream-browser.js create mode 100644 node_modules/readable-stream/lib/internal/streams/stream.js create mode 100644 node_modules/readable-stream/package.json create mode 100644 node_modules/readable-stream/readable-browser.js create mode 100644 node_modules/readable-stream/readable.js create mode 100644 node_modules/rimraf/LICENSE create mode 100644 node_modules/rimraf/README.md create mode 100644 node_modules/rimraf/dist/cjs/package.json create mode 100644 node_modules/rimraf/dist/cjs/src/bin.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/bin.d.ts.map create mode 100755 node_modules/rimraf/dist/cjs/src/bin.js create mode 100644 node_modules/rimraf/dist/cjs/src/bin.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/default-tmp.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/default-tmp.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/default-tmp.js create mode 100644 node_modules/rimraf/dist/cjs/src/default-tmp.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/fix-eperm.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/fix-eperm.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/fix-eperm.js create mode 100644 node_modules/rimraf/dist/cjs/src/fix-eperm.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/fs.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/fs.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/fs.js create mode 100644 node_modules/rimraf/dist/cjs/src/fs.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/ignore-enoent.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/ignore-enoent.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/ignore-enoent.js create mode 100644 node_modules/rimraf/dist/cjs/src/ignore-enoent.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/index-cjs.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/index-cjs.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/index-cjs.js create mode 100644 node_modules/rimraf/dist/cjs/src/index-cjs.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/index.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/index.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/index.js create mode 100644 node_modules/rimraf/dist/cjs/src/index.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/opt-arg.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/opt-arg.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/opt-arg.js create mode 100644 node_modules/rimraf/dist/cjs/src/opt-arg.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/path-arg.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/path-arg.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/path-arg.js create mode 100644 node_modules/rimraf/dist/cjs/src/path-arg.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/platform.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/platform.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/platform.js create mode 100644 node_modules/rimraf/dist/cjs/src/platform.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/readdir-or-error.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/readdir-or-error.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/readdir-or-error.js create mode 100644 node_modules/rimraf/dist/cjs/src/readdir-or-error.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/retry-busy.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/retry-busy.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/retry-busy.js create mode 100644 node_modules/rimraf/dist/cjs/src/retry-busy.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-manual.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-manual.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-manual.js create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-manual.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-move-remove.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-move-remove.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-move-remove.js create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-move-remove.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-native.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-native.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-native.js create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-native.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-posix.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-posix.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-posix.js create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-posix.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-windows.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-windows.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-windows.js create mode 100644 node_modules/rimraf/dist/cjs/src/rimraf-windows.js.map create mode 100644 node_modules/rimraf/dist/cjs/src/use-native.d.ts create mode 100644 node_modules/rimraf/dist/cjs/src/use-native.d.ts.map create mode 100644 node_modules/rimraf/dist/cjs/src/use-native.js create mode 100644 node_modules/rimraf/dist/cjs/src/use-native.js.map create mode 100644 node_modules/rimraf/dist/mjs/default-tmp.d.ts create mode 100644 node_modules/rimraf/dist/mjs/default-tmp.d.ts.map create mode 100644 node_modules/rimraf/dist/mjs/default-tmp.js create mode 100644 node_modules/rimraf/dist/mjs/default-tmp.js.map create mode 100644 node_modules/rimraf/dist/mjs/fix-eperm.d.ts create mode 100644 node_modules/rimraf/dist/mjs/fix-eperm.d.ts.map create mode 100644 node_modules/rimraf/dist/mjs/fix-eperm.js create mode 100644 node_modules/rimraf/dist/mjs/fix-eperm.js.map create mode 100644 node_modules/rimraf/dist/mjs/fs.d.ts create mode 100644 node_modules/rimraf/dist/mjs/fs.d.ts.map create mode 100644 node_modules/rimraf/dist/mjs/fs.js create mode 100644 node_modules/rimraf/dist/mjs/fs.js.map create mode 100644 node_modules/rimraf/dist/mjs/ignore-enoent.d.ts create mode 100644 node_modules/rimraf/dist/mjs/ignore-enoent.d.ts.map create mode 100644 node_modules/rimraf/dist/mjs/ignore-enoent.js create mode 100644 node_modules/rimraf/dist/mjs/ignore-enoent.js.map create mode 100644 node_modules/rimraf/dist/mjs/index.d.ts create mode 100644 node_modules/rimraf/dist/mjs/index.d.ts.map create mode 100644 node_modules/rimraf/dist/mjs/index.js create mode 100644 node_modules/rimraf/dist/mjs/index.js.map create mode 100644 node_modules/rimraf/dist/mjs/opt-arg.d.ts create mode 100644 node_modules/rimraf/dist/mjs/opt-arg.d.ts.map create mode 100644 node_modules/rimraf/dist/mjs/opt-arg.js create mode 100644 node_modules/rimraf/dist/mjs/opt-arg.js.map create mode 100644 node_modules/rimraf/dist/mjs/package.json create mode 100644 node_modules/rimraf/dist/mjs/path-arg.d.ts create mode 100644 node_modules/rimraf/dist/mjs/path-arg.d.ts.map create mode 100644 node_modules/rimraf/dist/mjs/path-arg.js create mode 100644 node_modules/rimraf/dist/mjs/path-arg.js.map create mode 100644 node_modules/rimraf/dist/mjs/platform.d.ts create mode 100644 node_modules/rimraf/dist/mjs/platform.d.ts.map create mode 100644 node_modules/rimraf/dist/mjs/platform.js create mode 100644 node_modules/rimraf/dist/mjs/platform.js.map create mode 100644 node_modules/rimraf/dist/mjs/readdir-or-error.d.ts create mode 100644 node_modules/rimraf/dist/mjs/readdir-or-error.d.ts.map create mode 100644 node_modules/rimraf/dist/mjs/readdir-or-error.js create mode 100644 node_modules/rimraf/dist/mjs/readdir-or-error.js.map create mode 100644 node_modules/rimraf/dist/mjs/retry-busy.d.ts create mode 100644 node_modules/rimraf/dist/mjs/retry-busy.d.ts.map create mode 100644 node_modules/rimraf/dist/mjs/retry-busy.js create mode 100644 node_modules/rimraf/dist/mjs/retry-busy.js.map create mode 100644 node_modules/rimraf/dist/mjs/rimraf-manual.d.ts create mode 100644 node_modules/rimraf/dist/mjs/rimraf-manual.d.ts.map create mode 100644 node_modules/rimraf/dist/mjs/rimraf-manual.js create mode 100644 node_modules/rimraf/dist/mjs/rimraf-manual.js.map create mode 100644 node_modules/rimraf/dist/mjs/rimraf-move-remove.d.ts create mode 100644 node_modules/rimraf/dist/mjs/rimraf-move-remove.d.ts.map create mode 100644 node_modules/rimraf/dist/mjs/rimraf-move-remove.js create mode 100644 node_modules/rimraf/dist/mjs/rimraf-move-remove.js.map create mode 100644 node_modules/rimraf/dist/mjs/rimraf-native.d.ts create mode 100644 node_modules/rimraf/dist/mjs/rimraf-native.d.ts.map create mode 100644 node_modules/rimraf/dist/mjs/rimraf-native.js create mode 100644 node_modules/rimraf/dist/mjs/rimraf-native.js.map create mode 100644 node_modules/rimraf/dist/mjs/rimraf-posix.d.ts create mode 100644 node_modules/rimraf/dist/mjs/rimraf-posix.d.ts.map create mode 100644 node_modules/rimraf/dist/mjs/rimraf-posix.js create mode 100644 node_modules/rimraf/dist/mjs/rimraf-posix.js.map create mode 100644 node_modules/rimraf/dist/mjs/rimraf-windows.d.ts create mode 100644 node_modules/rimraf/dist/mjs/rimraf-windows.d.ts.map create mode 100644 node_modules/rimraf/dist/mjs/rimraf-windows.js create mode 100644 node_modules/rimraf/dist/mjs/rimraf-windows.js.map create mode 100644 node_modules/rimraf/dist/mjs/use-native.d.ts create mode 100644 node_modules/rimraf/dist/mjs/use-native.d.ts.map create mode 100644 node_modules/rimraf/dist/mjs/use-native.js create mode 100644 node_modules/rimraf/dist/mjs/use-native.js.map create mode 100644 node_modules/rimraf/package.json create mode 100644 node_modules/safe-buffer/LICENSE create mode 100644 node_modules/safe-buffer/README.md create mode 100644 node_modules/safe-buffer/index.d.ts create mode 100644 node_modules/safe-buffer/index.js create mode 100644 node_modules/safe-buffer/package.json create mode 100644 node_modules/sax/LICENSE create mode 100644 node_modules/sax/LICENSE-W3C.html create mode 100644 node_modules/sax/README.md create mode 100644 node_modules/sax/lib/sax.js create mode 100644 node_modules/sax/package.json create mode 100644 node_modules/semver/LICENSE create mode 100644 node_modules/semver/README.md create mode 100755 node_modules/semver/bin/semver.js create mode 100644 node_modules/semver/classes/comparator.js create mode 100644 node_modules/semver/classes/index.js create mode 100644 node_modules/semver/classes/range.js create mode 100644 node_modules/semver/classes/semver.js create mode 100644 node_modules/semver/functions/clean.js create mode 100644 node_modules/semver/functions/cmp.js create mode 100644 node_modules/semver/functions/coerce.js create mode 100644 node_modules/semver/functions/compare-build.js create mode 100644 node_modules/semver/functions/compare-loose.js create mode 100644 node_modules/semver/functions/compare.js create mode 100644 node_modules/semver/functions/diff.js create mode 100644 node_modules/semver/functions/eq.js create mode 100644 node_modules/semver/functions/gt.js create mode 100644 node_modules/semver/functions/gte.js create mode 100644 node_modules/semver/functions/inc.js create mode 100644 node_modules/semver/functions/lt.js create mode 100644 node_modules/semver/functions/lte.js create mode 100644 node_modules/semver/functions/major.js create mode 100644 node_modules/semver/functions/minor.js create mode 100644 node_modules/semver/functions/neq.js create mode 100644 node_modules/semver/functions/parse.js create mode 100644 node_modules/semver/functions/patch.js create mode 100644 node_modules/semver/functions/prerelease.js create mode 100644 node_modules/semver/functions/rcompare.js create mode 100644 node_modules/semver/functions/rsort.js create mode 100644 node_modules/semver/functions/satisfies.js create mode 100644 node_modules/semver/functions/sort.js create mode 100644 node_modules/semver/functions/truncate.js create mode 100644 node_modules/semver/functions/valid.js create mode 100644 node_modules/semver/index.js create mode 100644 node_modules/semver/internal/constants.js create mode 100644 node_modules/semver/internal/debug.js create mode 100644 node_modules/semver/internal/identifiers.js create mode 100644 node_modules/semver/internal/lrucache.js create mode 100644 node_modules/semver/internal/parse-options.js create mode 100644 node_modules/semver/internal/re.js create mode 100644 node_modules/semver/package.json create mode 100644 node_modules/semver/preload.js create mode 100644 node_modules/semver/range.bnf create mode 100644 node_modules/semver/ranges/gtr.js create mode 100644 node_modules/semver/ranges/intersects.js create mode 100644 node_modules/semver/ranges/ltr.js create mode 100644 node_modules/semver/ranges/max-satisfying.js create mode 100644 node_modules/semver/ranges/min-satisfying.js create mode 100644 node_modules/semver/ranges/min-version.js create mode 100644 node_modules/semver/ranges/outside.js create mode 100644 node_modules/semver/ranges/simplify.js create mode 100644 node_modules/semver/ranges/subset.js create mode 100644 node_modules/semver/ranges/to-comparators.js create mode 100644 node_modules/semver/ranges/valid.js create mode 100644 node_modules/shebang-command/index.js create mode 100644 node_modules/shebang-command/license create mode 100644 node_modules/shebang-command/package.json create mode 100644 node_modules/shebang-command/readme.md create mode 100644 node_modules/shebang-regex/index.d.ts create mode 100644 node_modules/shebang-regex/index.js create mode 100644 node_modules/shebang-regex/license create mode 100644 node_modules/shebang-regex/package.json create mode 100644 node_modules/shebang-regex/readme.md create mode 100644 node_modules/signal-exit/LICENSE.txt create mode 100644 node_modules/signal-exit/README.md create mode 100644 node_modules/signal-exit/index.js create mode 100644 node_modules/signal-exit/package.json create mode 100644 node_modules/signal-exit/signals.js create mode 100644 node_modules/sisteransi/license create mode 100755 node_modules/sisteransi/package.json create mode 100755 node_modules/sisteransi/readme.md create mode 100644 node_modules/sisteransi/src/index.js create mode 100644 node_modules/sisteransi/src/sisteransi.d.ts create mode 100755 node_modules/slice-ansi/index.js create mode 100644 node_modules/slice-ansi/license create mode 100644 node_modules/slice-ansi/package.json create mode 100644 node_modules/slice-ansi/readme.md create mode 100644 node_modules/split2/LICENSE create mode 100644 node_modules/split2/README.md create mode 100644 node_modules/split2/bench.js create mode 100644 node_modules/split2/index.js create mode 100644 node_modules/split2/package.json create mode 100644 node_modules/split2/test.js create mode 100644 node_modules/string-width/index.d.ts create mode 100644 node_modules/string-width/index.js create mode 100644 node_modules/string-width/license create mode 100644 node_modules/string-width/package.json create mode 100644 node_modules/string-width/readme.md create mode 100644 node_modules/string_decoder/LICENSE create mode 100644 node_modules/string_decoder/README.md create mode 100644 node_modules/string_decoder/lib/string_decoder.js create mode 100644 node_modules/string_decoder/package.json create mode 100644 node_modules/strip-ansi/index.d.ts create mode 100644 node_modules/strip-ansi/index.js create mode 100644 node_modules/strip-ansi/license create mode 100644 node_modules/strip-ansi/package.json create mode 100644 node_modules/strip-ansi/readme.md create mode 100644 node_modules/tar/LICENSE create mode 100644 node_modules/tar/README.md create mode 100644 node_modules/tar/index.js create mode 100644 node_modules/tar/lib/create.js create mode 100644 node_modules/tar/lib/extract.js create mode 100644 node_modules/tar/lib/get-write-flag.js create mode 100644 node_modules/tar/lib/header.js create mode 100644 node_modules/tar/lib/high-level-opt.js create mode 100644 node_modules/tar/lib/large-numbers.js create mode 100644 node_modules/tar/lib/list.js create mode 100644 node_modules/tar/lib/mkdir.js create mode 100644 node_modules/tar/lib/mode-fix.js create mode 100644 node_modules/tar/lib/normalize-unicode.js create mode 100644 node_modules/tar/lib/normalize-windows-path.js create mode 100644 node_modules/tar/lib/pack.js create mode 100644 node_modules/tar/lib/parse.js create mode 100644 node_modules/tar/lib/path-reservations.js create mode 100644 node_modules/tar/lib/pax.js create mode 100644 node_modules/tar/lib/read-entry.js create mode 100644 node_modules/tar/lib/replace.js create mode 100644 node_modules/tar/lib/strip-absolute-path.js create mode 100644 node_modules/tar/lib/strip-trailing-slashes.js create mode 100644 node_modules/tar/lib/types.js create mode 100644 node_modules/tar/lib/unpack.js create mode 100644 node_modules/tar/lib/update.js create mode 100644 node_modules/tar/lib/warn-mixin.js create mode 100644 node_modules/tar/lib/winchars.js create mode 100644 node_modules/tar/lib/write-entry.js create mode 100644 node_modules/tar/node_modules/minipass/LICENSE create mode 100644 node_modules/tar/node_modules/minipass/README.md create mode 100644 node_modules/tar/node_modules/minipass/index.d.ts create mode 100644 node_modules/tar/node_modules/minipass/index.js create mode 100644 node_modules/tar/node_modules/minipass/index.mjs create mode 100644 node_modules/tar/node_modules/minipass/package.json create mode 100644 node_modules/tar/package.json create mode 100644 node_modules/through2/LICENSE.md create mode 100644 node_modules/through2/README.md create mode 100644 node_modules/through2/package.json create mode 100644 node_modules/through2/through2.js create mode 100644 node_modules/tree-kill/LICENSE create mode 100644 node_modules/tree-kill/README.md create mode 100755 node_modules/tree-kill/cli.js create mode 100644 node_modules/tree-kill/index.d.ts create mode 100755 node_modules/tree-kill/index.js create mode 100644 node_modules/tree-kill/package.json create mode 100644 node_modules/tslib/CopyrightNotice.txt create mode 100644 node_modules/tslib/LICENSE.txt create mode 100644 node_modules/tslib/README.md create mode 100644 node_modules/tslib/SECURITY.md create mode 100644 node_modules/tslib/modules/index.d.ts create mode 100644 node_modules/tslib/modules/index.js create mode 100644 node_modules/tslib/modules/package.json create mode 100644 node_modules/tslib/package.json create mode 100644 node_modules/tslib/tslib.d.ts create mode 100644 node_modules/tslib/tslib.es6.html create mode 100644 node_modules/tslib/tslib.es6.js create mode 100644 node_modules/tslib/tslib.es6.mjs create mode 100644 node_modules/tslib/tslib.html create mode 100644 node_modules/tslib/tslib.js create mode 100644 node_modules/typescript/LICENSE create mode 100644 node_modules/typescript/NOTICE.txt create mode 100644 node_modules/typescript/README.md create mode 100755 node_modules/typescript/bin/tsc create mode 100644 node_modules/typescript/dist/api/async/api.d.ts create mode 100644 node_modules/typescript/dist/api/async/api.d.ts.map create mode 100644 node_modules/typescript/dist/api/async/api.js create mode 100644 node_modules/typescript/dist/api/async/api.js.map create mode 100644 node_modules/typescript/dist/api/async/client.d.ts create mode 100644 node_modules/typescript/dist/api/async/client.d.ts.map create mode 100644 node_modules/typescript/dist/api/async/client.js create mode 100644 node_modules/typescript/dist/api/async/client.js.map create mode 100644 node_modules/typescript/dist/api/async/types.d.ts create mode 100644 node_modules/typescript/dist/api/async/types.d.ts.map create mode 100644 node_modules/typescript/dist/api/async/types.js create mode 100644 node_modules/typescript/dist/api/async/types.js.map create mode 100644 node_modules/typescript/dist/api/compilerOptions.d.ts create mode 100644 node_modules/typescript/dist/api/compilerOptions.d.ts.map create mode 100644 node_modules/typescript/dist/api/compilerOptions.js create mode 100644 node_modules/typescript/dist/api/compilerOptions.js.map create mode 100644 node_modules/typescript/dist/api/fs.d.ts create mode 100644 node_modules/typescript/dist/api/fs.d.ts.map create mode 100644 node_modules/typescript/dist/api/fs.js create mode 100644 node_modules/typescript/dist/api/fs.js.map create mode 100644 node_modules/typescript/dist/api/node/encoder.d.ts create mode 100644 node_modules/typescript/dist/api/node/encoder.d.ts.map create mode 100644 node_modules/typescript/dist/api/node/encoder.generated.d.ts create mode 100644 node_modules/typescript/dist/api/node/encoder.generated.d.ts.map create mode 100644 node_modules/typescript/dist/api/node/encoder.generated.js create mode 100644 node_modules/typescript/dist/api/node/encoder.generated.js.map create mode 100644 node_modules/typescript/dist/api/node/encoder.js create mode 100644 node_modules/typescript/dist/api/node/encoder.js.map create mode 100644 node_modules/typescript/dist/api/node/msgpack.d.ts create mode 100644 node_modules/typescript/dist/api/node/msgpack.d.ts.map create mode 100644 node_modules/typescript/dist/api/node/msgpack.js create mode 100644 node_modules/typescript/dist/api/node/msgpack.js.map create mode 100644 node_modules/typescript/dist/api/node/node.d.ts create mode 100644 node_modules/typescript/dist/api/node/node.d.ts.map create mode 100644 node_modules/typescript/dist/api/node/node.generated.d.ts create mode 100644 node_modules/typescript/dist/api/node/node.generated.d.ts.map create mode 100644 node_modules/typescript/dist/api/node/node.generated.js create mode 100644 node_modules/typescript/dist/api/node/node.generated.js.map create mode 100644 node_modules/typescript/dist/api/node/node.infrastructure.d.ts create mode 100644 node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map create mode 100644 node_modules/typescript/dist/api/node/node.infrastructure.js create mode 100644 node_modules/typescript/dist/api/node/node.infrastructure.js.map create mode 100644 node_modules/typescript/dist/api/node/node.js create mode 100644 node_modules/typescript/dist/api/node/node.js.map create mode 100644 node_modules/typescript/dist/api/node/protocol.d.ts create mode 100644 node_modules/typescript/dist/api/node/protocol.d.ts.map create mode 100644 node_modules/typescript/dist/api/node/protocol.generated.d.ts create mode 100644 node_modules/typescript/dist/api/node/protocol.generated.d.ts.map create mode 100644 node_modules/typescript/dist/api/node/protocol.generated.js create mode 100644 node_modules/typescript/dist/api/node/protocol.generated.js.map create mode 100644 node_modules/typescript/dist/api/node/protocol.js create mode 100644 node_modules/typescript/dist/api/node/protocol.js.map create mode 100644 node_modules/typescript/dist/api/node/wtf8.d.ts create mode 100644 node_modules/typescript/dist/api/node/wtf8.d.ts.map create mode 100644 node_modules/typescript/dist/api/node/wtf8.js create mode 100644 node_modules/typescript/dist/api/node/wtf8.js.map create mode 100644 node_modules/typescript/dist/api/options.d.ts create mode 100644 node_modules/typescript/dist/api/options.d.ts.map create mode 100644 node_modules/typescript/dist/api/options.js create mode 100644 node_modules/typescript/dist/api/options.js.map create mode 100644 node_modules/typescript/dist/api/path.d.ts create mode 100644 node_modules/typescript/dist/api/path.d.ts.map create mode 100644 node_modules/typescript/dist/api/path.js create mode 100644 node_modules/typescript/dist/api/path.js.map create mode 100644 node_modules/typescript/dist/api/proto.d.ts create mode 100644 node_modules/typescript/dist/api/proto.d.ts.map create mode 100644 node_modules/typescript/dist/api/proto.js create mode 100644 node_modules/typescript/dist/api/proto.js.map create mode 100644 node_modules/typescript/dist/api/sourceFileCache.d.ts create mode 100644 node_modules/typescript/dist/api/sourceFileCache.d.ts.map create mode 100644 node_modules/typescript/dist/api/sourceFileCache.js create mode 100644 node_modules/typescript/dist/api/sourceFileCache.js.map create mode 100644 node_modules/typescript/dist/api/sync/api.d.ts create mode 100644 node_modules/typescript/dist/api/sync/api.d.ts.map create mode 100644 node_modules/typescript/dist/api/sync/api.js create mode 100644 node_modules/typescript/dist/api/sync/api.js.map create mode 100644 node_modules/typescript/dist/api/sync/client.d.ts create mode 100644 node_modules/typescript/dist/api/sync/client.d.ts.map create mode 100644 node_modules/typescript/dist/api/sync/client.js create mode 100644 node_modules/typescript/dist/api/sync/client.js.map create mode 100644 node_modules/typescript/dist/api/sync/types.d.ts create mode 100644 node_modules/typescript/dist/api/sync/types.d.ts.map create mode 100644 node_modules/typescript/dist/api/sync/types.js create mode 100644 node_modules/typescript/dist/api/sync/types.js.map create mode 100644 node_modules/typescript/dist/api/syncChannel.d.ts create mode 100644 node_modules/typescript/dist/api/syncChannel.d.ts.map create mode 100644 node_modules/typescript/dist/api/syncChannel.js create mode 100644 node_modules/typescript/dist/api/syncChannel.js.map create mode 100644 node_modules/typescript/dist/api/timing.d.ts create mode 100644 node_modules/typescript/dist/api/timing.d.ts.map create mode 100644 node_modules/typescript/dist/api/timing.js create mode 100644 node_modules/typescript/dist/api/timing.js.map create mode 100644 node_modules/typescript/dist/ast/ast.d.ts create mode 100644 node_modules/typescript/dist/ast/ast.d.ts.map create mode 100644 node_modules/typescript/dist/ast/ast.generated.d.ts create mode 100644 node_modules/typescript/dist/ast/ast.generated.d.ts.map create mode 100644 node_modules/typescript/dist/ast/ast.generated.js create mode 100644 node_modules/typescript/dist/ast/ast.generated.js.map create mode 100644 node_modules/typescript/dist/ast/ast.js create mode 100644 node_modules/typescript/dist/ast/ast.js.map create mode 100644 node_modules/typescript/dist/ast/astnav.d.ts create mode 100644 node_modules/typescript/dist/ast/astnav.d.ts.map create mode 100644 node_modules/typescript/dist/ast/astnav.js create mode 100644 node_modules/typescript/dist/ast/astnav.js.map create mode 100644 node_modules/typescript/dist/ast/clone.d.ts create mode 100644 node_modules/typescript/dist/ast/clone.d.ts.map create mode 100644 node_modules/typescript/dist/ast/clone.js create mode 100644 node_modules/typescript/dist/ast/clone.js.map create mode 100644 node_modules/typescript/dist/ast/factory.generated.d.ts create mode 100644 node_modules/typescript/dist/ast/factory.generated.d.ts.map create mode 100644 node_modules/typescript/dist/ast/factory.generated.js create mode 100644 node_modules/typescript/dist/ast/factory.generated.js.map create mode 100644 node_modules/typescript/dist/ast/index.d.ts create mode 100644 node_modules/typescript/dist/ast/index.d.ts.map create mode 100644 node_modules/typescript/dist/ast/index.js create mode 100644 node_modules/typescript/dist/ast/index.js.map create mode 100644 node_modules/typescript/dist/ast/is.d.ts create mode 100644 node_modules/typescript/dist/ast/is.d.ts.map create mode 100644 node_modules/typescript/dist/ast/is.generated.d.ts create mode 100644 node_modules/typescript/dist/ast/is.generated.d.ts.map create mode 100644 node_modules/typescript/dist/ast/is.generated.js create mode 100644 node_modules/typescript/dist/ast/is.generated.js.map create mode 100644 node_modules/typescript/dist/ast/is.js create mode 100644 node_modules/typescript/dist/ast/is.js.map create mode 100644 node_modules/typescript/dist/ast/jsdoc.d.ts create mode 100644 node_modules/typescript/dist/ast/jsdoc.d.ts.map create mode 100644 node_modules/typescript/dist/ast/jsdoc.js create mode 100644 node_modules/typescript/dist/ast/jsdoc.js.map create mode 100644 node_modules/typescript/dist/ast/scanner.d.ts create mode 100644 node_modules/typescript/dist/ast/scanner.d.ts.map create mode 100644 node_modules/typescript/dist/ast/scanner.js create mode 100644 node_modules/typescript/dist/ast/scanner.js.map create mode 100644 node_modules/typescript/dist/ast/utils.d.ts create mode 100644 node_modules/typescript/dist/ast/utils.d.ts.map create mode 100644 node_modules/typescript/dist/ast/utils.js create mode 100644 node_modules/typescript/dist/ast/utils.js.map create mode 100644 node_modules/typescript/dist/ast/visitor.d.ts create mode 100644 node_modules/typescript/dist/ast/visitor.d.ts.map create mode 100644 node_modules/typescript/dist/ast/visitor.generated.d.ts create mode 100644 node_modules/typescript/dist/ast/visitor.generated.d.ts.map create mode 100644 node_modules/typescript/dist/ast/visitor.generated.js create mode 100644 node_modules/typescript/dist/ast/visitor.generated.js.map create mode 100644 node_modules/typescript/dist/ast/visitor.js create mode 100644 node_modules/typescript/dist/ast/visitor.js.map create mode 100644 node_modules/typescript/dist/enums/characterCodes.d.ts create mode 100644 node_modules/typescript/dist/enums/characterCodes.d.ts.map create mode 100644 node_modules/typescript/dist/enums/characterCodes.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/characterCodes.enum.js create mode 100644 node_modules/typescript/dist/enums/characterCodes.enum.js.map create mode 100644 node_modules/typescript/dist/enums/characterCodes.js create mode 100644 node_modules/typescript/dist/enums/characterCodes.js.map create mode 100644 node_modules/typescript/dist/enums/commentDirectiveType.d.ts create mode 100644 node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map create mode 100644 node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/commentDirectiveType.enum.js create mode 100644 node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map create mode 100644 node_modules/typescript/dist/enums/commentDirectiveType.js create mode 100644 node_modules/typescript/dist/enums/commentDirectiveType.js.map create mode 100644 node_modules/typescript/dist/enums/completionItemKind.d.ts create mode 100644 node_modules/typescript/dist/enums/completionItemKind.d.ts.map create mode 100644 node_modules/typescript/dist/enums/completionItemKind.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/completionItemKind.enum.js create mode 100644 node_modules/typescript/dist/enums/completionItemKind.enum.js.map create mode 100644 node_modules/typescript/dist/enums/completionItemKind.js create mode 100644 node_modules/typescript/dist/enums/completionItemKind.js.map create mode 100644 node_modules/typescript/dist/enums/diagnosticCategory.d.ts create mode 100644 node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map create mode 100644 node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/diagnosticCategory.enum.js create mode 100644 node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map create mode 100644 node_modules/typescript/dist/enums/diagnosticCategory.js create mode 100644 node_modules/typescript/dist/enums/diagnosticCategory.js.map create mode 100644 node_modules/typescript/dist/enums/elementFlags.d.ts create mode 100644 node_modules/typescript/dist/enums/elementFlags.d.ts.map create mode 100644 node_modules/typescript/dist/enums/elementFlags.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/elementFlags.enum.js create mode 100644 node_modules/typescript/dist/enums/elementFlags.enum.js.map create mode 100644 node_modules/typescript/dist/enums/elementFlags.js create mode 100644 node_modules/typescript/dist/enums/elementFlags.js.map create mode 100644 node_modules/typescript/dist/enums/internalSymbolName.d.ts create mode 100644 node_modules/typescript/dist/enums/internalSymbolName.d.ts.map create mode 100644 node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/internalSymbolName.enum.js create mode 100644 node_modules/typescript/dist/enums/internalSymbolName.enum.js.map create mode 100644 node_modules/typescript/dist/enums/internalSymbolName.js create mode 100644 node_modules/typescript/dist/enums/internalSymbolName.js.map create mode 100644 node_modules/typescript/dist/enums/jsxEmit.d.ts create mode 100644 node_modules/typescript/dist/enums/jsxEmit.d.ts.map create mode 100644 node_modules/typescript/dist/enums/jsxEmit.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/jsxEmit.enum.js create mode 100644 node_modules/typescript/dist/enums/jsxEmit.enum.js.map create mode 100644 node_modules/typescript/dist/enums/jsxEmit.js create mode 100644 node_modules/typescript/dist/enums/jsxEmit.js.map create mode 100644 node_modules/typescript/dist/enums/languageVariant.d.ts create mode 100644 node_modules/typescript/dist/enums/languageVariant.d.ts.map create mode 100644 node_modules/typescript/dist/enums/languageVariant.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/languageVariant.enum.js create mode 100644 node_modules/typescript/dist/enums/languageVariant.enum.js.map create mode 100644 node_modules/typescript/dist/enums/languageVariant.js create mode 100644 node_modules/typescript/dist/enums/languageVariant.js.map create mode 100644 node_modules/typescript/dist/enums/modifierFlags.d.ts create mode 100644 node_modules/typescript/dist/enums/modifierFlags.d.ts.map create mode 100644 node_modules/typescript/dist/enums/modifierFlags.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/modifierFlags.enum.js create mode 100644 node_modules/typescript/dist/enums/modifierFlags.enum.js.map create mode 100644 node_modules/typescript/dist/enums/modifierFlags.js create mode 100644 node_modules/typescript/dist/enums/modifierFlags.js.map create mode 100644 node_modules/typescript/dist/enums/moduleDetectionKind.d.ts create mode 100644 node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map create mode 100644 node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/moduleDetectionKind.enum.js create mode 100644 node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map create mode 100644 node_modules/typescript/dist/enums/moduleDetectionKind.js create mode 100644 node_modules/typescript/dist/enums/moduleDetectionKind.js.map create mode 100644 node_modules/typescript/dist/enums/moduleKind.d.ts create mode 100644 node_modules/typescript/dist/enums/moduleKind.d.ts.map create mode 100644 node_modules/typescript/dist/enums/moduleKind.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/moduleKind.enum.js create mode 100644 node_modules/typescript/dist/enums/moduleKind.enum.js.map create mode 100644 node_modules/typescript/dist/enums/moduleKind.js create mode 100644 node_modules/typescript/dist/enums/moduleKind.js.map create mode 100644 node_modules/typescript/dist/enums/moduleResolutionKind.d.ts create mode 100644 node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map create mode 100644 node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/moduleResolutionKind.enum.js create mode 100644 node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map create mode 100644 node_modules/typescript/dist/enums/moduleResolutionKind.js create mode 100644 node_modules/typescript/dist/enums/moduleResolutionKind.js.map create mode 100644 node_modules/typescript/dist/enums/newLineKind.d.ts create mode 100644 node_modules/typescript/dist/enums/newLineKind.d.ts.map create mode 100644 node_modules/typescript/dist/enums/newLineKind.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/newLineKind.enum.js create mode 100644 node_modules/typescript/dist/enums/newLineKind.enum.js.map create mode 100644 node_modules/typescript/dist/enums/newLineKind.js create mode 100644 node_modules/typescript/dist/enums/newLineKind.js.map create mode 100644 node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts create mode 100644 node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map create mode 100644 node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js create mode 100644 node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map create mode 100644 node_modules/typescript/dist/enums/nodeBuilderFlags.js create mode 100644 node_modules/typescript/dist/enums/nodeBuilderFlags.js.map create mode 100644 node_modules/typescript/dist/enums/nodeFlags.d.ts create mode 100644 node_modules/typescript/dist/enums/nodeFlags.d.ts.map create mode 100644 node_modules/typescript/dist/enums/nodeFlags.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/nodeFlags.enum.js create mode 100644 node_modules/typescript/dist/enums/nodeFlags.enum.js.map create mode 100644 node_modules/typescript/dist/enums/nodeFlags.js create mode 100644 node_modules/typescript/dist/enums/nodeFlags.js.map create mode 100644 node_modules/typescript/dist/enums/objectFlags.d.ts create mode 100644 node_modules/typescript/dist/enums/objectFlags.d.ts.map create mode 100644 node_modules/typescript/dist/enums/objectFlags.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/objectFlags.enum.js create mode 100644 node_modules/typescript/dist/enums/objectFlags.enum.js.map create mode 100644 node_modules/typescript/dist/enums/objectFlags.js create mode 100644 node_modules/typescript/dist/enums/objectFlags.js.map create mode 100644 node_modules/typescript/dist/enums/outerExpressionKinds.d.ts create mode 100644 node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map create mode 100644 node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/outerExpressionKinds.enum.js create mode 100644 node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map create mode 100644 node_modules/typescript/dist/enums/outerExpressionKinds.js create mode 100644 node_modules/typescript/dist/enums/outerExpressionKinds.js.map create mode 100644 node_modules/typescript/dist/enums/regularExpressionFlags.d.ts create mode 100644 node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map create mode 100644 node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/regularExpressionFlags.enum.js create mode 100644 node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map create mode 100644 node_modules/typescript/dist/enums/regularExpressionFlags.js create mode 100644 node_modules/typescript/dist/enums/regularExpressionFlags.js.map create mode 100644 node_modules/typescript/dist/enums/scriptKind.d.ts create mode 100644 node_modules/typescript/dist/enums/scriptKind.d.ts.map create mode 100644 node_modules/typescript/dist/enums/scriptKind.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/scriptKind.enum.js create mode 100644 node_modules/typescript/dist/enums/scriptKind.enum.js.map create mode 100644 node_modules/typescript/dist/enums/scriptKind.js create mode 100644 node_modules/typescript/dist/enums/scriptKind.js.map create mode 100644 node_modules/typescript/dist/enums/scriptTarget.d.ts create mode 100644 node_modules/typescript/dist/enums/scriptTarget.d.ts.map create mode 100644 node_modules/typescript/dist/enums/scriptTarget.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/scriptTarget.enum.js create mode 100644 node_modules/typescript/dist/enums/scriptTarget.enum.js.map create mode 100644 node_modules/typescript/dist/enums/scriptTarget.js create mode 100644 node_modules/typescript/dist/enums/scriptTarget.js.map create mode 100644 node_modules/typescript/dist/enums/signatureFlags.d.ts create mode 100644 node_modules/typescript/dist/enums/signatureFlags.d.ts.map create mode 100644 node_modules/typescript/dist/enums/signatureFlags.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/signatureFlags.enum.js create mode 100644 node_modules/typescript/dist/enums/signatureFlags.enum.js.map create mode 100644 node_modules/typescript/dist/enums/signatureFlags.js create mode 100644 node_modules/typescript/dist/enums/signatureFlags.js.map create mode 100644 node_modules/typescript/dist/enums/signatureKind.d.ts create mode 100644 node_modules/typescript/dist/enums/signatureKind.d.ts.map create mode 100644 node_modules/typescript/dist/enums/signatureKind.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/signatureKind.enum.js create mode 100644 node_modules/typescript/dist/enums/signatureKind.enum.js.map create mode 100644 node_modules/typescript/dist/enums/signatureKind.js create mode 100644 node_modules/typescript/dist/enums/signatureKind.js.map create mode 100644 node_modules/typescript/dist/enums/symbolFlags.d.ts create mode 100644 node_modules/typescript/dist/enums/symbolFlags.d.ts.map create mode 100644 node_modules/typescript/dist/enums/symbolFlags.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/symbolFlags.enum.js create mode 100644 node_modules/typescript/dist/enums/symbolFlags.enum.js.map create mode 100644 node_modules/typescript/dist/enums/symbolFlags.js create mode 100644 node_modules/typescript/dist/enums/symbolFlags.js.map create mode 100644 node_modules/typescript/dist/enums/syntaxKind.d.ts create mode 100644 node_modules/typescript/dist/enums/syntaxKind.d.ts.map create mode 100644 node_modules/typescript/dist/enums/syntaxKind.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/syntaxKind.enum.js create mode 100644 node_modules/typescript/dist/enums/syntaxKind.enum.js.map create mode 100644 node_modules/typescript/dist/enums/syntaxKind.js create mode 100644 node_modules/typescript/dist/enums/syntaxKind.js.map create mode 100644 node_modules/typescript/dist/enums/tokenFlags.d.ts create mode 100644 node_modules/typescript/dist/enums/tokenFlags.d.ts.map create mode 100644 node_modules/typescript/dist/enums/tokenFlags.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/tokenFlags.enum.js create mode 100644 node_modules/typescript/dist/enums/tokenFlags.enum.js.map create mode 100644 node_modules/typescript/dist/enums/tokenFlags.js create mode 100644 node_modules/typescript/dist/enums/tokenFlags.js.map create mode 100644 node_modules/typescript/dist/enums/typeFlags.d.ts create mode 100644 node_modules/typescript/dist/enums/typeFlags.d.ts.map create mode 100644 node_modules/typescript/dist/enums/typeFlags.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/typeFlags.enum.js create mode 100644 node_modules/typescript/dist/enums/typeFlags.enum.js.map create mode 100644 node_modules/typescript/dist/enums/typeFlags.js create mode 100644 node_modules/typescript/dist/enums/typeFlags.js.map create mode 100644 node_modules/typescript/dist/enums/typePredicateKind.d.ts create mode 100644 node_modules/typescript/dist/enums/typePredicateKind.d.ts.map create mode 100644 node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts create mode 100644 node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map create mode 100644 node_modules/typescript/dist/enums/typePredicateKind.enum.js create mode 100644 node_modules/typescript/dist/enums/typePredicateKind.enum.js.map create mode 100644 node_modules/typescript/dist/enums/typePredicateKind.js create mode 100644 node_modules/typescript/dist/enums/typePredicateKind.js.map create mode 100644 node_modules/typescript/dist/internal/utils.d.ts create mode 100644 node_modules/typescript/dist/internal/utils.d.ts.map create mode 100644 node_modules/typescript/dist/internal/utils.js create mode 100644 node_modules/typescript/dist/internal/utils.js.map create mode 100644 node_modules/typescript/lib/getExePath.d.ts create mode 100644 node_modules/typescript/lib/getExePath.js create mode 100644 node_modules/typescript/lib/tsc.js create mode 100644 node_modules/typescript/lib/version.cjs create mode 100644 node_modules/typescript/lib/version.d.cts create mode 100644 node_modules/typescript/package.json create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/License.txt create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/README.md create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/package.json create mode 100644 node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts create mode 100644 node_modules/undici-types/LICENSE create mode 100644 node_modules/undici-types/README.md create mode 100644 node_modules/undici-types/agent.d.ts create mode 100644 node_modules/undici-types/api.d.ts create mode 100644 node_modules/undici-types/balanced-pool.d.ts create mode 100644 node_modules/undici-types/cache-interceptor.d.ts create mode 100644 node_modules/undici-types/cache.d.ts create mode 100644 node_modules/undici-types/client-stats.d.ts create mode 100644 node_modules/undici-types/client.d.ts create mode 100644 node_modules/undici-types/connector.d.ts create mode 100644 node_modules/undici-types/content-type.d.ts create mode 100644 node_modules/undici-types/cookies.d.ts create mode 100644 node_modules/undici-types/diagnostics-channel.d.ts create mode 100644 node_modules/undici-types/dispatcher.d.ts create mode 100644 node_modules/undici-types/dispatcher1-wrapper.d.ts create mode 100644 node_modules/undici-types/env-http-proxy-agent.d.ts create mode 100644 node_modules/undici-types/errors.d.ts create mode 100644 node_modules/undici-types/eventsource.d.ts create mode 100644 node_modules/undici-types/fetch.d.ts create mode 100644 node_modules/undici-types/formdata.d.ts create mode 100644 node_modules/undici-types/global-dispatcher.d.ts create mode 100644 node_modules/undici-types/global-origin.d.ts create mode 100644 node_modules/undici-types/h2c-client.d.ts create mode 100644 node_modules/undici-types/handlers.d.ts create mode 100644 node_modules/undici-types/header.d.ts create mode 100644 node_modules/undici-types/index.d.ts create mode 100644 node_modules/undici-types/interceptors.d.ts create mode 100644 node_modules/undici-types/mock-agent.d.ts create mode 100644 node_modules/undici-types/mock-call-history.d.ts create mode 100644 node_modules/undici-types/mock-client.d.ts create mode 100644 node_modules/undici-types/mock-errors.d.ts create mode 100644 node_modules/undici-types/mock-interceptor.d.ts create mode 100644 node_modules/undici-types/mock-pool.d.ts create mode 100644 node_modules/undici-types/package.json create mode 100644 node_modules/undici-types/patch.d.ts create mode 100644 node_modules/undici-types/pool-stats.d.ts create mode 100644 node_modules/undici-types/pool.d.ts create mode 100644 node_modules/undici-types/proxy-agent.d.ts create mode 100644 node_modules/undici-types/readable.d.ts create mode 100644 node_modules/undici-types/retry-agent.d.ts create mode 100644 node_modules/undici-types/retry-handler.d.ts create mode 100644 node_modules/undici-types/round-robin-pool.d.ts create mode 100644 node_modules/undici-types/snapshot-agent.d.ts create mode 100644 node_modules/undici-types/socks5-proxy-agent.d.ts create mode 100644 node_modules/undici-types/util.d.ts create mode 100644 node_modules/undici-types/utility.d.ts create mode 100644 node_modules/undici-types/webidl.d.ts create mode 100644 node_modules/undici-types/websocket.d.ts create mode 100644 node_modules/universalify/LICENSE create mode 100644 node_modules/universalify/README.md create mode 100644 node_modules/universalify/index.js create mode 100644 node_modules/universalify/package.json create mode 100644 node_modules/untildify/index.d.ts create mode 100644 node_modules/untildify/index.js create mode 100644 node_modules/untildify/license create mode 100644 node_modules/untildify/package.json create mode 100644 node_modules/untildify/readme.md 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 node_modules/which/CHANGELOG.md create mode 100644 node_modules/which/LICENSE create mode 100644 node_modules/which/README.md create mode 100755 node_modules/which/bin/node-which create mode 100644 node_modules/which/package.json create mode 100644 node_modules/which/which.js create mode 100755 node_modules/wrap-ansi/index.js create mode 100644 node_modules/wrap-ansi/license create mode 100644 node_modules/wrap-ansi/package.json create mode 100644 node_modules/wrap-ansi/readme.md create mode 100644 node_modules/xml2js/LICENSE create mode 100644 node_modules/xml2js/README.md create mode 100644 node_modules/xml2js/lib/bom.js create mode 100644 node_modules/xml2js/lib/builder.js create mode 100644 node_modules/xml2js/lib/defaults.js create mode 100644 node_modules/xml2js/lib/parser.js create mode 100644 node_modules/xml2js/lib/processors.js create mode 100644 node_modules/xml2js/lib/xml2js.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/CHANGELOG.md create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/LICENSE create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/README.md create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/appveyor.yml create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/Derivation.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/DocumentPosition.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/NodeType.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/OperationType.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/Utility.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/WriterState.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLAttribute.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLCData.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLCharacterData.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLComment.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMImplementation.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMStringList.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDAttList.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDElement.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDEntity.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDNotation.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDeclaration.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocType.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocument.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocumentCB.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocumentFragment.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDummy.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLElement.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNode.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNodeFilter.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNodeList.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLRaw.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStreamWriter.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStringWriter.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStringifier.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLText.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLTypeInfo.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLUserDataHandler.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/XMLWriterBase.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/lib/index.js create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/package.json create mode 100644 node_modules/xml2js/node_modules/xmlbuilder/typings/index.d.ts create mode 100644 node_modules/xml2js/package.json create mode 100644 node_modules/xmlbuilder/.nycrc create mode 100644 node_modules/xmlbuilder/.vscode/launch.json create mode 100644 node_modules/xmlbuilder/CHANGELOG.md create mode 100644 node_modules/xmlbuilder/LICENSE create mode 100644 node_modules/xmlbuilder/README.md create mode 100644 node_modules/xmlbuilder/lib/Derivation.js create mode 100644 node_modules/xmlbuilder/lib/DocumentPosition.js create mode 100644 node_modules/xmlbuilder/lib/NodeType.js create mode 100644 node_modules/xmlbuilder/lib/OperationType.js create mode 100644 node_modules/xmlbuilder/lib/Utility.js create mode 100644 node_modules/xmlbuilder/lib/WriterState.js create mode 100644 node_modules/xmlbuilder/lib/XMLAttribute.js create mode 100644 node_modules/xmlbuilder/lib/XMLCData.js create mode 100644 node_modules/xmlbuilder/lib/XMLCharacterData.js create mode 100644 node_modules/xmlbuilder/lib/XMLComment.js create mode 100644 node_modules/xmlbuilder/lib/XMLDOMConfiguration.js create mode 100644 node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js create mode 100644 node_modules/xmlbuilder/lib/XMLDOMImplementation.js create mode 100644 node_modules/xmlbuilder/lib/XMLDOMStringList.js create mode 100644 node_modules/xmlbuilder/lib/XMLDTDAttList.js create mode 100644 node_modules/xmlbuilder/lib/XMLDTDElement.js create mode 100644 node_modules/xmlbuilder/lib/XMLDTDEntity.js create mode 100644 node_modules/xmlbuilder/lib/XMLDTDNotation.js create mode 100644 node_modules/xmlbuilder/lib/XMLDeclaration.js create mode 100644 node_modules/xmlbuilder/lib/XMLDocType.js create mode 100644 node_modules/xmlbuilder/lib/XMLDocument.js create mode 100644 node_modules/xmlbuilder/lib/XMLDocumentCB.js create mode 100644 node_modules/xmlbuilder/lib/XMLDocumentFragment.js create mode 100644 node_modules/xmlbuilder/lib/XMLDummy.js create mode 100644 node_modules/xmlbuilder/lib/XMLElement.js create mode 100644 node_modules/xmlbuilder/lib/XMLNamedNodeMap.js create mode 100644 node_modules/xmlbuilder/lib/XMLNode.js create mode 100644 node_modules/xmlbuilder/lib/XMLNodeFilter.js create mode 100644 node_modules/xmlbuilder/lib/XMLNodeList.js create mode 100644 node_modules/xmlbuilder/lib/XMLProcessingInstruction.js create mode 100644 node_modules/xmlbuilder/lib/XMLRaw.js create mode 100644 node_modules/xmlbuilder/lib/XMLStreamWriter.js create mode 100644 node_modules/xmlbuilder/lib/XMLStringWriter.js create mode 100644 node_modules/xmlbuilder/lib/XMLStringifier.js create mode 100644 node_modules/xmlbuilder/lib/XMLText.js create mode 100644 node_modules/xmlbuilder/lib/XMLTypeInfo.js create mode 100644 node_modules/xmlbuilder/lib/XMLUserDataHandler.js create mode 100644 node_modules/xmlbuilder/lib/XMLWriterBase.js create mode 100644 node_modules/xmlbuilder/lib/index.js create mode 100644 node_modules/xmlbuilder/package.json create mode 100644 node_modules/xmlbuilder/perf/basic/escaping.coffee create mode 100644 node_modules/xmlbuilder/perf/basic/object.coffee create mode 100644 node_modules/xmlbuilder/perf/index.coffee create mode 100644 node_modules/xmlbuilder/perf/perf.list create mode 100644 node_modules/xmlbuilder/typings/index.d.ts create mode 100644 node_modules/yallist/LICENSE create mode 100644 node_modules/yallist/README.md create mode 100644 node_modules/yallist/iterator.js create mode 100644 node_modules/yallist/package.json create mode 100644 node_modules/yallist/yallist.js create mode 100644 node_modules/yauzl/LICENSE create mode 100644 node_modules/yauzl/README.md create mode 100644 node_modules/yauzl/index.js create mode 100644 node_modules/yauzl/package.json create mode 100644 package-lock.json create mode 100644 package.json create mode 100755 run.sh create mode 100644 src/algorithms/placement.js create mode 100644 src/app.js create mode 100644 src/components/interface-participants.js create mode 100644 src/components/interface-tables.js create mode 100644 src/components/interface.js create mode 100644 src/main.js create mode 100644 src/models/objects.js create mode 100644 src/services/service-impression-sauvegarde.js create mode 100644 src/services/service-reservation-titre.js create mode 100644 src/services/service.js create mode 100644 src/utils/calculs.js create mode 100644 src/utils/indicateurs.js diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..6e43b84 --- /dev/null +++ b/build.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +# Script pour construire l'exécutable de l'application de gestion de tables tournantes + +# Vérification de la présence de Node.js +if ! command -v node &> /dev/null; then + echo "Erreur : Node.js n'est pas installé." + echo "Veuillez installer Node.js avant d'exécuter ce script." + exit 1 +fi + +# Vérification de la présence de npm +if ! command -v npm &> /dev/null; then + echo "Erreur : npm n'est pas installé." + echo "Veuillez installer npm avant d'exécuter ce script." + exit 1 +fi + +# Vérification que nous sommes dans le bon répertoire +if [ ! -f "package.json" ]; then + echo "Erreur : Ce script doit être exécuté depuis le répertoire racine du projet." + exit 1 +fi + +# Vérification de la présence de Capacitor +if ! command -v npx &> /dev/null; then + echo "Erreur : Capacitor n'est pas installé." + echo "Veuillez installer Capacitor avant de construire l'application." + exit 1 +fi + +echo "Construction de l'application de gestion de tables tournantes..." + +# Installation des dépendances +echo "Installation des dépendances..." +npm install + +# Vérification de l'installation +if [ $? -ne 0 ]; then + echo "Erreur lors de l'installation des dépendances." + exit 1 +fi + +# Construction de l'application pour Web +echo "Construction de l'application web..." +npm run build + +# Vérification de la construction +if [ $? -ne 0 ]; then + echo "Erreur lors de la construction de l'application." + exit 1 +fi + +echo "Construction terminée avec succès!" +echo "" +echo "L'application est disponible dans le répertoire 'dist/'" +echo "Pour l'exécuter, utilisez le script ./run.sh" \ No newline at end of file diff --git a/capacitor.config.ts b/capacitor.config.ts new file mode 100644 index 0000000..4d7638d --- /dev/null +++ b/capacitor.config.ts @@ -0,0 +1,12 @@ +import { CapacitorConfig } from '@capacitor/cli'; + +const config: CapacitorConfig = { + appId: 'org.erplibre.table.tournante', + appName: 'Gestion Table Tournante Libre', + webDir: 'www', + server: { + androidScheme: 'https' + } +}; + +export default config; diff --git a/index.html b/index.html new file mode 100644 index 0000000..6accbae --- /dev/null +++ b/index.html @@ -0,0 +1,147 @@ + + + + + + Gestion Table Tournante Libre + + + + + + \ No newline at end of file diff --git a/node_modules/.bin/cap b/node_modules/.bin/cap new file mode 120000 index 0000000..8c24610 --- /dev/null +++ b/node_modules/.bin/cap @@ -0,0 +1 @@ +../@capacitor/cli/bin/capacitor \ No newline at end of file diff --git a/node_modules/.bin/capacitor b/node_modules/.bin/capacitor new file mode 120000 index 0000000..8c24610 --- /dev/null +++ b/node_modules/.bin/capacitor @@ -0,0 +1 @@ +../@capacitor/cli/bin/capacitor \ No newline at end of file diff --git a/node_modules/.bin/is-docker b/node_modules/.bin/is-docker new file mode 120000 index 0000000..9896ba5 --- /dev/null +++ b/node_modules/.bin/is-docker @@ -0,0 +1 @@ +../is-docker/cli.js \ No newline at end of file diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp new file mode 120000 index 0000000..017896c --- /dev/null +++ b/node_modules/.bin/mkdirp @@ -0,0 +1 @@ +../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/native-run b/node_modules/.bin/native-run new file mode 120000 index 0000000..cc75291 --- /dev/null +++ b/node_modules/.bin/native-run @@ -0,0 +1 @@ +../native-run/bin/native-run \ No newline at end of file diff --git a/node_modules/.bin/node-which b/node_modules/.bin/node-which new file mode 120000 index 0000000..6f8415e --- /dev/null +++ b/node_modules/.bin/node-which @@ -0,0 +1 @@ +../which/bin/node-which \ No newline at end of file diff --git a/node_modules/.bin/rimraf b/node_modules/.bin/rimraf new file mode 120000 index 0000000..3445a8a --- /dev/null +++ b/node_modules/.bin/rimraf @@ -0,0 +1 @@ +../rimraf/dist/cjs/src/bin.js \ No newline at end of file diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 120000 index 0000000..5aaadf4 --- /dev/null +++ b/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/.bin/tree-kill b/node_modules/.bin/tree-kill new file mode 120000 index 0000000..26dcd2c --- /dev/null +++ b/node_modules/.bin/tree-kill @@ -0,0 +1 @@ +../tree-kill/cli.js \ No newline at end of file diff --git a/node_modules/.bin/tsc b/node_modules/.bin/tsc new file mode 120000 index 0000000..0863208 --- /dev/null +++ b/node_modules/.bin/tsc @@ -0,0 +1 @@ +../typescript/bin/tsc \ 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..71313ad --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,1284 @@ +{ + "name": "gestion-table-tournante-libre", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@capacitor/app": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@capacitor/app/-/app-5.0.8.tgz", + "integrity": "sha512-ClUPJG6Awkf5HncVCZQwLrnuugjU8TnACSJ1dKJb6QNCHv2jQzmXvB3KvTvxTZyWbh5EVvlla0qlobYyU1lb6A==", + "license": "MIT", + "peerDependencies": { + "@capacitor/core": "^5.0.0" + } + }, + "node_modules/@capacitor/cli": { + "version": "5.7.8", + "resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-5.7.8.tgz", + "integrity": "sha512-qN8LDlREMhrYhOvVXahoJVNkP8LP55/YPRJrzTAFrMqlNJC18L3CzgWYIblFPnuwfbH/RxbfoZT/ydkwgVpMrw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ionic/cli-framework-output": "^2.2.5", + "@ionic/utils-fs": "^3.1.6", + "@ionic/utils-subprocess": "^2.1.11", + "@ionic/utils-terminal": "^2.3.3", + "commander": "^9.3.0", + "debug": "^4.3.4", + "env-paths": "^2.2.0", + "kleur": "^4.1.4", + "native-run": "^2.0.0", + "open": "^8.4.0", + "plist": "^3.0.5", + "prompts": "^2.4.2", + "rimraf": "^4.4.1", + "semver": "^7.3.7", + "tar": "^6.1.11", + "tslib": "^2.4.0", + "xml2js": "^0.5.0" + }, + "bin": { + "cap": "bin/capacitor", + "capacitor": "bin/capacitor" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@capacitor/core": { + "version": "5.7.8", + "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-5.7.8.tgz", + "integrity": "sha512-rrZcm/2vJM0WdWRQup1TUidbjQV9PfIadSkV4rAGLD7R6PuzZSMPGT0gmoZzCRlXkqrazrWWDkurei3ozU02FA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@ionic/cli-framework-output": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/@ionic/cli-framework-output/-/cli-framework-output-2.2.8.tgz", + "integrity": "sha512-TshtaFQsovB4NWRBydbNFawql6yul7d5bMiW1WYYf17hd99V6xdDdk3vtF51bw6sLkxON3bDQpWsnUc9/hVo3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ionic/utils-terminal": "2.3.5", + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-array": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@ionic/utils-array/-/utils-array-2.1.6.tgz", + "integrity": "sha512-0JZ1Zkp3wURnv8oq6Qt7fMPo5MpjbLoUoa9Bu2Q4PJuSDWM8H8gwF3dQO7VTeUj3/0o1IB1wGkFWZZYgUXZMUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-fs": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@ionic/utils-fs/-/utils-fs-3.1.7.tgz", + "integrity": "sha512-2EknRvMVfhnyhL1VhFkSLa5gOcycK91VnjfrTB0kbqkTFCOXyXgVLI5whzq7SLrgD9t1aqos3lMMQyVzaQ5gVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/fs-extra": "^8.0.0", + "debug": "^4.0.0", + "fs-extra": "^9.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-object": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@ionic/utils-object/-/utils-object-2.1.6.tgz", + "integrity": "sha512-vCl7sl6JjBHFw99CuAqHljYJpcE88YaH2ZW4ELiC/Zwxl5tiwn4kbdP/gxi2OT3MQb1vOtgAmSNRtusvgxI8ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-process": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/@ionic/utils-process/-/utils-process-2.1.11.tgz", + "integrity": "sha512-Uavxn+x8j3rDlZEk1X7YnaN6wCgbCwYQOeIjv/m94i1dzslqWhqIHEqxEyeE8HsT5Negboagg7GtQiABy+BLbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ionic/utils-object": "2.1.6", + "@ionic/utils-terminal": "2.3.4", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "tree-kill": "^1.2.2", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@ionic/utils-terminal/-/utils-terminal-2.3.4.tgz", + "integrity": "sha512-cEiMFl3jklE0sW60r8JHH3ijFTwh/jkdEKWbylSyExQwZ8pPuwoXz7gpkWoJRLuoRHHSvg+wzNYyPJazIHfoJA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/slice-ansi": "^4.0.0", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "tslib": "^2.0.1", + "untildify": "^4.0.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@ionic/utils-stream/-/utils-stream-3.1.6.tgz", + "integrity": "sha512-4+Kitey1lTA1yGtnigeYNhV/0tggI3lWBMjC7tBs1K9GXa/q7q4CtOISppdh8QgtOhrhAXS2Igp8rbko/Cj+lA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-subprocess": { + "version": "2.1.14", + "resolved": "https://registry.npmjs.org/@ionic/utils-subprocess/-/utils-subprocess-2.1.14.tgz", + "integrity": "sha512-nGYvyGVjU0kjPUcSRFr4ROTraT3w/7r502f5QJEsMRKTqa4eEzCshtwRk+/mpASm0kgBN5rrjYA5A/OZg8ahqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ionic/utils-array": "2.1.6", + "@ionic/utils-fs": "3.1.7", + "@ionic/utils-process": "2.1.11", + "@ionic/utils-stream": "3.1.6", + "@ionic/utils-terminal": "2.3.4", + "cross-spawn": "^7.0.3", + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@ionic/utils-terminal/-/utils-terminal-2.3.4.tgz", + "integrity": "sha512-cEiMFl3jklE0sW60r8JHH3ijFTwh/jkdEKWbylSyExQwZ8pPuwoXz7gpkWoJRLuoRHHSvg+wzNYyPJazIHfoJA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/slice-ansi": "^4.0.0", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "tslib": "^2.0.1", + "untildify": "^4.0.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-terminal": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@ionic/utils-terminal/-/utils-terminal-2.3.5.tgz", + "integrity": "sha512-3cKScz9Jx2/Pr9ijj1OzGlBDfcmx7OMVBt4+P1uRR0SSW4cm1/y3Mo4OY3lfkuaYifMNBW8Wz6lQHbs1bihr7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/slice-ansi": "^4.0.0", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "tslib": "^2.0.1", + "untildify": "^4.0.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@types/fs-extra": { + "version": "8.1.5", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.1.5.tgz", + "integrity": "sha512-0dzKcwO+S8s2kuF5Z9oUWatQJj5Uq/iqphEtE3GQJVRRYm/tD1LglU2UnXi2A8jLq5umkGouOXOR9y0n613ZwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/node": { + "version": "26.6.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.4.tgz", + "integrity": "sha512-ldVPDCzj7fsaGZrLB0NuHuTvJcsNasysBAqMolr/cgxrLd1xbqxIr3XJiPnHHJUCxj5sNF1vnRj9aWnrVh5Jcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~8.9.0" + } + }, + "node_modules/@types/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-+OpjSaq85gvlZAYINyzKpLeiFkSC4EsC6IIiT6v6TLSU5k5U83fHGj9Lel8oKEXM0HqgrMVCjXPDPVICtxF7EQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript/typescript-linux-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", + "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@xmldom/xmldom": { + "version": "0.9.12", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.12.tgz", + "integrity": "sha512-5AXjrcMClTryPe9LgZrygpB1lj7s0S9E0+W+AHaVKAVyHanafK86iPSvG5xHVSp/jC+VH1UXu0TAEmY279xH7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "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/big-integer": { + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", + "dev": true, + "license": "Unlicense", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/bplist-parser": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.3.2.tgz", + "integrity": "sha512-apC2+fspHGI3mMKj+dGevkGo/tCqVB8jMb6i+OX+E29p0Iposz07fABkRIfVUPNd5A5VbuOz1bZbnmkKLYF+wQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "big-integer": "1.6.x" + }, + "engines": { + "node": ">= 5.10.0" + } + }, + "node_modules/brace-expansion": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.7.tgz", + "integrity": "sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/elementtree": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.7.tgz", + "integrity": "sha512-wkgGT6kugeQk/P6VZ/f4T+4HB41BVgNBq5CDIZVbQ02nvTVqAiVTbskxxu3eA/X96lMlfYOwnLQpN2v5E1zDEg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "sax": "1.1.4" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/glob": { + "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ini": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", + "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/jsonfile": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz", + "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/minimatch": { + "version": "8.0.7", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.7.tgz", + "integrity": "sha512-V+1uQNdzybxa14e/p00HZnQNNcTjnRJjDxg2V8wtkjFctq4M7hXFws4oekyTP0Jebeq7QYtpFyOeBAjc88zvYg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/native-run": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/native-run/-/native-run-2.0.3.tgz", + "integrity": "sha512-U1PllBuzW5d1gfan+88L+Hky2eZx+9gv3Pf6rNBxKbORxi7boHzqiA6QFGSnqMem4j0A9tZ08NMIs5+0m/VS1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ionic/utils-fs": "^3.1.7", + "@ionic/utils-terminal": "^2.3.4", + "bplist-parser": "^0.3.2", + "debug": "^4.3.4", + "elementtree": "^0.1.7", + "ini": "^4.1.1", + "plist": "^3.1.0", + "split2": "^4.2.0", + "through2": "^4.0.2", + "tslib": "^2.6.2", + "yauzl": "^2.10.0" + }, + "bin": { + "native-run": "bin/native-run" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/open": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true, + "license": "MIT" + }, + "node_modules/plist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.1.1.tgz", + "integrity": "sha512-ZIfcLJC+7E7FBFnDxm9MPmt7D+DidyQ26lewieO75AdhA2ayMtsJSES0iWzqJQbcVRSrTufQoy0DR94xHue0oA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@xmldom/xmldom": "^0.9.10", + "base64-js": "^1.5.1", + "xmlbuilder": "^15.1.1" + }, + "engines": { + "node": ">=10.4.0" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/prompts/node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/rimraf": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz", + "integrity": "sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^9.2.0" + }, + "bin": { + "rimraf": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "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/sax": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.1.4.tgz", + "integrity": "sha512-5f3k2PbGGp+YtKJjOItpg3P99IMD84E4HOvcfleTb5joCHNXYLsR9yWFPOYGgaeMPDubQILTCMdsFb2OMeOjtg==", + "dev": true, + "license": "ISC" + }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "deprecated": "Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "3" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/typescript": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", + "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc" + }, + "engines": { + "node": ">=16.20.0" + }, + "optionalDependencies": { + "@typescript/typescript-aix-ppc64": "7.0.2", + "@typescript/typescript-darwin-arm64": "7.0.2", + "@typescript/typescript-darwin-x64": "7.0.2", + "@typescript/typescript-freebsd-arm64": "7.0.2", + "@typescript/typescript-freebsd-x64": "7.0.2", + "@typescript/typescript-linux-arm": "7.0.2", + "@typescript/typescript-linux-arm64": "7.0.2", + "@typescript/typescript-linux-loong64": "7.0.2", + "@typescript/typescript-linux-mips64el": "7.0.2", + "@typescript/typescript-linux-ppc64": "7.0.2", + "@typescript/typescript-linux-riscv64": "7.0.2", + "@typescript/typescript-linux-s390x": "7.0.2", + "@typescript/typescript-linux-x64": "7.0.2", + "@typescript/typescript-netbsd-arm64": "7.0.2", + "@typescript/typescript-netbsd-x64": "7.0.2", + "@typescript/typescript-openbsd-arm64": "7.0.2", + "@typescript/typescript-openbsd-x64": "7.0.2", + "@typescript/typescript-sunos-x64": "7.0.2", + "@typescript/typescript-win32-arm64": "7.0.2", + "@typescript/typescript-win32-x64": "7.0.2" + } + }, + "node_modules/undici-types": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", + "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", + "dev": true, + "license": "MIT" + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/xml2js": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", + "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xml2js/node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/xmlbuilder": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", + "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + } +} diff --git a/node_modules/@capacitor/app/CapacitorApp.podspec b/node_modules/@capacitor/app/CapacitorApp.podspec new file mode 100644 index 0000000..9878794 --- /dev/null +++ b/node_modules/@capacitor/app/CapacitorApp.podspec @@ -0,0 +1,17 @@ +require 'json' + +package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) + +Pod::Spec.new do |s| + s.name = 'CapacitorApp' + s.version = package['version'] + s.summary = package['description'] + s.license = package['license'] + s.homepage = 'https://capacitorjs.com' + s.author = package['author'] + s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] } + s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'app/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' + s.ios.deployment_target = '13.0' + s.dependency 'Capacitor' + s.swift_version = '5.1' +end diff --git a/node_modules/@capacitor/app/LICENSE b/node_modules/@capacitor/app/LICENSE new file mode 100644 index 0000000..6652495 --- /dev/null +++ b/node_modules/@capacitor/app/LICENSE @@ -0,0 +1,23 @@ +Copyright 2020-present Ionic +https://ionic.io + +MIT License + +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/@capacitor/app/README.md b/node_modules/@capacitor/app/README.md new file mode 100644 index 0000000..7d59fb7 --- /dev/null +++ b/node_modules/@capacitor/app/README.md @@ -0,0 +1,423 @@ +# @capacitor/app + +The App API handles high level App state and events. For example, this API emits events when the app enters and leaves the foreground, handles deeplinks, opens other apps, and manages persisted plugin state. + +## Install + +```bash +npm install @capacitor/app@latest-5 +npx cap sync +``` + +## iOS + +For being able to open the app from a custom scheme you need to register the scheme first. You can do it by editing the [`Info.plist`](https://capacitorjs.com/docs/ios/configuration#configuring-infoplist) file and adding this lines. + + +```xml +CFBundleURLTypes + + + CFBundleURLName + com.getcapacitor.capacitor + CFBundleURLSchemes + + mycustomscheme + + + +``` + +## Android + +For being able to open the app from a custom scheme you need to register the scheme first. You can do it by adding this lines inside the `activity` section of the `AndroidManifest.xml`. + +```xml + + + + + + +``` + +`custom_url_scheme` value is stored in `strings.xml`. When the Android platform is added, `@capacitor/cli` adds the app's package name as default value, but can be replaced by editing the `strings.xml` file. + +## Example + +```typescript +import { App } from '@capacitor/app'; + +App.addListener('appStateChange', ({ isActive }) => { + console.log('App state changed. Is active?', isActive); +}); + +App.addListener('appUrlOpen', data => { + console.log('App opened with URL:', data); +}); + +App.addListener('appRestoredResult', data => { + console.log('Restored state:', data); +}); + +const checkAppLaunchUrl = async () => { + const { url } = await App.getLaunchUrl(); + + console.log('App opened with URL: ' + url); +}; +``` + +## API + + + +* [`exitApp()`](#exitapp) +* [`getInfo()`](#getinfo) +* [`getState()`](#getstate) +* [`getLaunchUrl()`](#getlaunchurl) +* [`minimizeApp()`](#minimizeapp) +* [`addListener('appStateChange', ...)`](#addlistenerappstatechange-) +* [`addListener('pause', ...)`](#addlistenerpause-) +* [`addListener('resume', ...)`](#addlistenerresume-) +* [`addListener('appUrlOpen', ...)`](#addlistenerappurlopen-) +* [`addListener('appRestoredResult', ...)`](#addlistenerapprestoredresult-) +* [`addListener('backButton', ...)`](#addlistenerbackbutton-) +* [`removeAllListeners()`](#removealllisteners) +* [Interfaces](#interfaces) +* [Type Aliases](#type-aliases) + + + + + + +### exitApp() + +```typescript +exitApp() => Promise +``` + +Force exit the app. This should only be used in conjunction with the `backButton` handler for Android to +exit the app when navigation is complete. + +Ionic handles this itself so you shouldn't need to call this if using Ionic. + +**Since:** 1.0.0 + +-------------------- + + +### getInfo() + +```typescript +getInfo() => Promise +``` + +Return information about the app. + +**Returns:** Promise<AppInfo> + +**Since:** 1.0.0 + +-------------------- + + +### getState() + +```typescript +getState() => Promise +``` + +Gets the current app state. + +**Returns:** Promise<AppState> + +**Since:** 1.0.0 + +-------------------- + + +### getLaunchUrl() + +```typescript +getLaunchUrl() => Promise +``` + +Get the URL the app was launched with, if any. + +**Returns:** Promise<AppLaunchUrl> + +**Since:** 1.0.0 + +-------------------- + + +### minimizeApp() + +```typescript +minimizeApp() => Promise +``` + +Minimizes the application. + +Only available for Android. + +**Since:** 1.1.0 + +-------------------- + + +### addListener('appStateChange', ...) + +```typescript +addListener(eventName: 'appStateChange', listenerFunc: StateChangeListener) => Promise & PluginListenerHandle +``` + +Listen for changes in the app or the activity states. + +On iOS it's fired when the native [UIApplication.willResignActiveNotification](https://developer.apple.com/documentation/uikit/uiapplication/1622973-willresignactivenotification) and +[UIApplication.didBecomeActiveNotification](https://developer.apple.com/documentation/uikit/uiapplication/1622953-didbecomeactivenotification) events get fired. +On Android it's fired when the Capacitor's Activity [onResume](https://developer.android.com/reference/android/app/Activity#onResume()) and [onStop](https://developer.android.com/reference/android/app/Activity#onStop()) methods gets called. +On Web it's fired when the document's visibilitychange gets fired. + +| Param | Type | +| ------------------ | ------------------------------------------------------------------- | +| **`eventName`** | 'appStateChange' | +| **`listenerFunc`** | StateChangeListener | + +**Returns:** Promise<PluginListenerHandle> & PluginListenerHandle + +**Since:** 1.0.0 + +-------------------- + + +### addListener('pause', ...) + +```typescript +addListener(eventName: 'pause', listenerFunc: () => void) => Promise & PluginListenerHandle +``` + +Listen for when the app or the activity are paused. + +On iOS it's fired when the native [UIApplication.didEnterBackgroundNotification](https://developer.apple.com/documentation/uikit/uiapplication/1623071-didenterbackgroundnotification) event gets fired. +On Android it's fired when the Capacitor's Activity [onPause](https://developer.android.com/reference/android/app/Activity#onPause()) method gets called. +On Web it's fired when the document's visibilitychange gets fired and document.hidden is true. + +| Param | Type | +| ------------------ | -------------------------- | +| **`eventName`** | 'pause' | +| **`listenerFunc`** | () => void | + +**Returns:** Promise<PluginListenerHandle> & PluginListenerHandle + +**Since:** 4.1.0 + +-------------------- + + +### addListener('resume', ...) + +```typescript +addListener(eventName: 'resume', listenerFunc: () => void) => Promise & PluginListenerHandle +``` + +Listen for when the app or activity are resumed. + +On iOS it's fired when the native [UIApplication.willEnterForegroundNotification](https://developer.apple.com/documentation/uikit/uiapplication/1622944-willenterforegroundnotification) event gets fired. +On Android it's fired when the Capacitor's Activity [onResume](https://developer.android.com/reference/android/app/Activity#onResume()) method gets called, +but only after resume has fired first. +On Web it's fired when the document's visibilitychange gets fired and document.hidden is false. + +| Param | Type | +| ------------------ | -------------------------- | +| **`eventName`** | 'resume' | +| **`listenerFunc`** | () => void | + +**Returns:** Promise<PluginListenerHandle> & PluginListenerHandle + +**Since:** 4.1.0 + +-------------------- + + +### addListener('appUrlOpen', ...) + +```typescript +addListener(eventName: 'appUrlOpen', listenerFunc: URLOpenListener) => Promise & PluginListenerHandle +``` + +Listen for url open events for the app. This handles both custom URL scheme links as well +as URLs your app handles (Universal Links on iOS and App Links on Android) + +| Param | Type | +| ------------------ | ----------------------------------------------------------- | +| **`eventName`** | 'appUrlOpen' | +| **`listenerFunc`** | URLOpenListener | + +**Returns:** Promise<PluginListenerHandle> & PluginListenerHandle + +**Since:** 1.0.0 + +-------------------- + + +### addListener('appRestoredResult', ...) + +```typescript +addListener(eventName: 'appRestoredResult', listenerFunc: RestoredListener) => Promise & PluginListenerHandle +``` + +If the app was launched with previously persisted plugin call data, such as on Android +when an activity returns to an app that was closed, this call will return any data +the app was launched with, converted into the form of a result from a plugin call. + +On Android, due to memory constraints on low-end devices, it's possible +that, if your app launches a new activity, your app will be terminated by +the operating system in order to reduce memory consumption. + +For example, that means the Camera API, which launches a new Activity to +take a photo, may not be able to return data back to your app. + +To avoid this, Capacitor stores all restored activity results on launch. +You should add a listener for `appRestoredResult` in order to handle any +plugin call results that were delivered when your app was not running. + +Once you have that result (if any), you can update the UI to restore a +logical experience for the user, such as navigating or selecting the +proper tab. + +We recommend every Android app using plugins that rely on external +Activities (for example, Camera) to have this event and process handled. + +| Param | Type | +| ------------------ | ------------------------------------------------------------- | +| **`eventName`** | 'appRestoredResult' | +| **`listenerFunc`** | RestoredListener | + +**Returns:** Promise<PluginListenerHandle> & PluginListenerHandle + +**Since:** 1.0.0 + +-------------------- + + +### addListener('backButton', ...) + +```typescript +addListener(eventName: 'backButton', listenerFunc: BackButtonListener) => Promise & PluginListenerHandle +``` + +Listen for the hardware back button event (Android only). Listening for this event will disable the +default back button behaviour, so you might want to call `window.history.back()` manually. +If you want to close the app, call `App.exitApp()`. + +| Param | Type | +| ------------------ | ----------------------------------------------------------------- | +| **`eventName`** | 'backButton' | +| **`listenerFunc`** | BackButtonListener | + +**Returns:** Promise<PluginListenerHandle> & PluginListenerHandle + +**Since:** 1.0.0 + +-------------------- + + +### removeAllListeners() + +```typescript +removeAllListeners() => Promise +``` + +Remove all native listeners for this plugin + +**Since:** 1.0.0 + +-------------------- + + +### Interfaces + + +#### AppInfo + +| Prop | Type | Description | Since | +| ------------- | ------------------- | --------------------------------------------------------------------------------------------------- | ----- | +| **`name`** | string | The name of the app. | 1.0.0 | +| **`id`** | string | The identifier of the app. On iOS it's the Bundle Identifier. On Android it's the Application ID | 1.0.0 | +| **`build`** | string | The build version. On iOS it's the CFBundleVersion. On Android it's the versionCode. | 1.0.0 | +| **`version`** | string | The app version. On iOS it's the CFBundleShortVersionString. On Android it's package's versionName. | 1.0.0 | + + +#### AppState + +| Prop | Type | Description | Since | +| -------------- | -------------------- | --------------------------------- | ----- | +| **`isActive`** | boolean | Whether the app is active or not. | 1.0.0 | + + +#### AppLaunchUrl + +| Prop | Type | Description | Since | +| --------- | ------------------- | ----------------------------- | ----- | +| **`url`** | string | The url used to open the app. | 1.0.0 | + + +#### PluginListenerHandle + +| Prop | Type | +| ------------ | ----------------------------------------- | +| **`remove`** | () => Promise<void> | + + +#### URLOpenListenerEvent + +| Prop | Type | Description | Since | +| -------------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | +| **`url`** | string | The URL the app was opened with. | 1.0.0 | +| **`iosSourceApplication`** | any | The source application opening the app (iOS only) https://developer.apple.com/documentation/uikit/uiapplicationopenurloptionskey/1623128-sourceapplication | 1.0.0 | +| **`iosOpenInPlace`** | boolean | Whether the app should open the passed document in-place or must copy it first. https://developer.apple.com/documentation/uikit/uiapplicationopenurloptionskey/1623123-openinplace | 1.0.0 | + + +#### RestoredListenerEvent + +| Prop | Type | Description | Since | +| ---------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | +| **`pluginId`** | string | The pluginId this result corresponds to. For example, `Camera`. | 1.0.0 | +| **`methodName`** | string | The methodName this result corresponds to. For example, `getPhoto` | 1.0.0 | +| **`data`** | any | The result data passed from the plugin. This would be the result you'd expect from normally calling the plugin method. For example, `CameraPhoto` | 1.0.0 | +| **`success`** | boolean | Boolean indicating if the plugin call succeeded. | 1.0.0 | +| **`error`** | { message: string; } | If the plugin call didn't succeed, it will contain the error message. | 1.0.0 | + + +#### BackButtonListenerEvent + +| Prop | Type | Description | Since | +| --------------- | -------------------- | --------------------------------------------------------------------------------------------------------- | ----- | +| **`canGoBack`** | boolean | Indicates whether the browser can go back in history. False when the history stack is on the first entry. | 1.0.0 | + + +### Type Aliases + + +#### StateChangeListener + +(state: AppState): void + + +#### URLOpenListener + +(event: URLOpenListenerEvent): void + + +#### RestoredListener + +(event: RestoredListenerEvent): void + + +#### BackButtonListener + +(event: BackButtonListenerEvent): void + + diff --git a/node_modules/@capacitor/app/android/build.gradle b/node_modules/@capacitor/app/android/build.gradle new file mode 100644 index 0000000..471a4f1 --- /dev/null +++ b/node_modules/@capacitor/app/android/build.gradle @@ -0,0 +1,79 @@ +ext { + capacitorVersion = System.getenv('CAPACITOR_VERSION') + junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2' + androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1' + androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5' + androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1' +} + +buildscript { + repositories { + google() + mavenCentral() + maven { + url "https://plugins.gradle.org/m2/" + } + } + dependencies { + classpath 'com.android.tools.build:gradle:8.0.0' + if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") { + classpath 'io.github.gradle-nexus:publish-plugin:1.3.0' + } + } +} + +apply plugin: 'com.android.library' +if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") { + apply plugin: 'io.github.gradle-nexus.publish-plugin' + apply from: file('../../scripts/android/publish-root.gradle') + apply from: file('../../scripts/android/publish-module.gradle') +} + +android { + namespace "com.capacitorjs.plugins.app" + compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33 + defaultConfig { + minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22 + targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + lintOptions { + abortOnError false + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + publishing { + singleVariant("release") + } +} + +repositories { + google() + mavenCentral() +} + + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + + if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") { + implementation "com.capacitorjs:core:$capacitorVersion" + } else { + implementation project(':capacitor-android') + } + + implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" + testImplementation "junit:junit:$junitVersion" + androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" + androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" +} diff --git a/node_modules/@capacitor/app/android/src/main/AndroidManifest.xml b/node_modules/@capacitor/app/android/src/main/AndroidManifest.xml new file mode 100644 index 0000000..a2f47b6 --- /dev/null +++ b/node_modules/@capacitor/app/android/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ + + diff --git a/node_modules/@capacitor/app/android/src/main/java/com/capacitorjs/plugins/app/AppPlugin.java b/node_modules/@capacitor/app/android/src/main/java/com/capacitorjs/plugins/app/AppPlugin.java new file mode 100644 index 0000000..916ad39 --- /dev/null +++ b/node_modules/@capacitor/app/android/src/main/java/com/capacitorjs/plugins/app/AppPlugin.java @@ -0,0 +1,162 @@ +package com.capacitorjs.plugins.app; + +import android.content.Intent; +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageInfo; +import android.net.Uri; +import androidx.activity.OnBackPressedCallback; +import androidx.core.content.pm.PackageInfoCompat; +import com.getcapacitor.JSObject; +import com.getcapacitor.Logger; +import com.getcapacitor.Plugin; +import com.getcapacitor.PluginCall; +import com.getcapacitor.PluginMethod; +import com.getcapacitor.annotation.CapacitorPlugin; +import com.getcapacitor.util.InternalUtils; + +@CapacitorPlugin(name = "App") +public class AppPlugin extends Plugin { + + private static final String EVENT_BACK_BUTTON = "backButton"; + private static final String EVENT_URL_OPEN = "appUrlOpen"; + private static final String EVENT_STATE_CHANGE = "appStateChange"; + private static final String EVENT_RESTORED_RESULT = "appRestoredResult"; + private static final String EVENT_PAUSE = "pause"; + private static final String EVENT_RESUME = "resume"; + private boolean hasPausedEver = false; + + public void load() { + bridge + .getApp() + .setStatusChangeListener( + isActive -> { + Logger.debug(getLogTag(), "Firing change: " + isActive); + JSObject data = new JSObject(); + data.put("isActive", isActive); + notifyListeners(EVENT_STATE_CHANGE, data, false); + } + ); + bridge + .getApp() + .setAppRestoredListener( + result -> { + Logger.debug(getLogTag(), "Firing restored result"); + notifyListeners(EVENT_RESTORED_RESULT, result.getWrappedResult(), true); + } + ); + OnBackPressedCallback callback = new OnBackPressedCallback(true) { + @Override + public void handleOnBackPressed() { + if (!hasListeners(EVENT_BACK_BUTTON)) { + if (bridge.getWebView().canGoBack()) { + bridge.getWebView().goBack(); + } + } else { + JSObject data = new JSObject(); + data.put("canGoBack", bridge.getWebView().canGoBack()); + notifyListeners(EVENT_BACK_BUTTON, data, true); + bridge.triggerJSEvent("backbutton", "document"); + } + } + }; + getActivity().getOnBackPressedDispatcher().addCallback(getActivity(), callback); + } + + @PluginMethod + public void exitApp(PluginCall call) { + unsetAppListeners(); + call.resolve(); + getBridge().getActivity().finish(); + } + + @PluginMethod + public void getInfo(PluginCall call) { + JSObject data = new JSObject(); + try { + PackageInfo pinfo = InternalUtils.getPackageInfo(getContext().getPackageManager(), getContext().getPackageName()); + ApplicationInfo applicationInfo = getContext().getApplicationInfo(); + int stringId = applicationInfo.labelRes; + String appName = stringId == 0 ? applicationInfo.nonLocalizedLabel.toString() : getContext().getString(stringId); + data.put("name", appName); + data.put("id", pinfo.packageName); + data.put("build", Integer.toString((int) PackageInfoCompat.getLongVersionCode(pinfo))); + data.put("version", pinfo.versionName); + call.resolve(data); + } catch (Exception ex) { + call.reject("Unable to get App Info"); + } + } + + @PluginMethod + public void getLaunchUrl(PluginCall call) { + Uri launchUri = bridge.getIntentUri(); + if (launchUri != null) { + JSObject d = new JSObject(); + d.put("url", launchUri.toString()); + call.resolve(d); + } else { + call.resolve(); + } + } + + @PluginMethod + public void getState(PluginCall call) { + JSObject data = new JSObject(); + data.put("isActive", this.bridge.getApp().isActive()); + call.resolve(data); + } + + @PluginMethod + public void minimizeApp(PluginCall call) { + Intent startMain = new Intent(Intent.ACTION_MAIN); + startMain.addCategory(Intent.CATEGORY_HOME); + startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + getActivity().startActivity(startMain); + call.resolve(); + } + + /** + * Handle ACTION_VIEW intents to store a URL that was used to open the app + * @param intent + */ + @Override + protected void handleOnNewIntent(Intent intent) { + super.handleOnNewIntent(intent); + // read intent + String action = intent.getAction(); + Uri url = intent.getData(); + + if (!Intent.ACTION_VIEW.equals(action) || url == null) { + return; + } + + JSObject ret = new JSObject(); + ret.put("url", url.toString()); + notifyListeners(EVENT_URL_OPEN, ret, true); + } + + @Override + protected void handleOnPause() { + super.handleOnPause(); + hasPausedEver = true; + notifyListeners(EVENT_PAUSE, null); + } + + @Override + protected void handleOnResume() { + super.handleOnResume(); + if (hasPausedEver) { + notifyListeners(EVENT_RESUME, null); + } + } + + @Override + protected void handleOnDestroy() { + unsetAppListeners(); + } + + private void unsetAppListeners() { + bridge.getApp().setStatusChangeListener(null); + bridge.getApp().setAppRestoredListener(null); + } +} diff --git a/node_modules/@capacitor/app/dist/esm/definitions.d.ts b/node_modules/@capacitor/app/dist/esm/definitions.d.ts new file mode 100644 index 0000000..e6f6946 --- /dev/null +++ b/node_modules/@capacitor/app/dist/esm/definitions.d.ts @@ -0,0 +1,246 @@ +import type { PluginListenerHandle } from '@capacitor/core'; +export interface AppInfo { + /** + * The name of the app. + * + * @since 1.0.0 + */ + name: string; + /** + * The identifier of the app. + * On iOS it's the Bundle Identifier. + * On Android it's the Application ID + * + * @since 1.0.0 + */ + id: string; + /** + * The build version. + * On iOS it's the CFBundleVersion. + * On Android it's the versionCode. + * + * @since 1.0.0 + */ + build: string; + /** + * The app version. + * On iOS it's the CFBundleShortVersionString. + * On Android it's package's versionName. + * + * @since 1.0.0 + */ + version: string; +} +export interface AppState { + /** + * Whether the app is active or not. + * + * @since 1.0.0 + */ + isActive: boolean; +} +export interface URLOpenListenerEvent { + /** + * The URL the app was opened with. + * + * @since 1.0.0 + */ + url: string; + /** + * The source application opening the app (iOS only) + * https://developer.apple.com/documentation/uikit/uiapplicationopenurloptionskey/1623128-sourceapplication + * + * @since 1.0.0 + */ + iosSourceApplication?: any; + /** + * Whether the app should open the passed document in-place + * or must copy it first. + * https://developer.apple.com/documentation/uikit/uiapplicationopenurloptionskey/1623123-openinplace + * + * @since 1.0.0 + */ + iosOpenInPlace?: boolean; +} +export interface AppLaunchUrl { + /** + * The url used to open the app. + * + * @since 1.0.0 + */ + url: string; +} +export interface RestoredListenerEvent { + /** + * The pluginId this result corresponds to. For example, `Camera`. + * + * @since 1.0.0 + */ + pluginId: string; + /** + * The methodName this result corresponds to. For example, `getPhoto` + * + * @since 1.0.0 + */ + methodName: string; + /** + * The result data passed from the plugin. This would be the result you'd + * expect from normally calling the plugin method. For example, `CameraPhoto` + * + * @since 1.0.0 + */ + data?: any; + /** + * Boolean indicating if the plugin call succeeded. + * + * @since 1.0.0 + */ + success: boolean; + /** + * If the plugin call didn't succeed, it will contain the error message. + * + * @since 1.0.0 + */ + error?: { + message: string; + }; +} +export interface BackButtonListenerEvent { + /** + * Indicates whether the browser can go back in history. + * False when the history stack is on the first entry. + * + * @since 1.0.0 + */ + canGoBack: boolean; +} +export declare type StateChangeListener = (state: AppState) => void; +export declare type URLOpenListener = (event: URLOpenListenerEvent) => void; +export declare type RestoredListener = (event: RestoredListenerEvent) => void; +export declare type BackButtonListener = (event: BackButtonListenerEvent) => void; +export interface AppPlugin { + /** + * Force exit the app. This should only be used in conjunction with the `backButton` handler for Android to + * exit the app when navigation is complete. + * + * Ionic handles this itself so you shouldn't need to call this if using Ionic. + * + * @since 1.0.0 + */ + exitApp(): Promise; + /** + * Return information about the app. + * + * @since 1.0.0 + */ + getInfo(): Promise; + /** + * Gets the current app state. + * + * @since 1.0.0 + */ + getState(): Promise; + /** + * Get the URL the app was launched with, if any. + * + * @since 1.0.0 + */ + getLaunchUrl(): Promise; + /** + * Minimizes the application. + * + * Only available for Android. + * + * @since 1.1.0 + */ + minimizeApp(): Promise; + /** + * Listen for changes in the app or the activity states. + * + * On iOS it's fired when the native [UIApplication.willResignActiveNotification](https://developer.apple.com/documentation/uikit/uiapplication/1622973-willresignactivenotification) and + * [UIApplication.didBecomeActiveNotification](https://developer.apple.com/documentation/uikit/uiapplication/1622953-didbecomeactivenotification) events get fired. + * On Android it's fired when the Capacitor's Activity [onResume](https://developer.android.com/reference/android/app/Activity#onResume()) and [onStop](https://developer.android.com/reference/android/app/Activity#onStop()) methods gets called. + * On Web it's fired when the document's visibilitychange gets fired. + * + * @since 1.0.0 + */ + addListener(eventName: 'appStateChange', listenerFunc: StateChangeListener): Promise & PluginListenerHandle; + /** + * Listen for when the app or the activity are paused. + * + * On iOS it's fired when the native [UIApplication.didEnterBackgroundNotification](https://developer.apple.com/documentation/uikit/uiapplication/1623071-didenterbackgroundnotification) event gets fired. + * On Android it's fired when the Capacitor's Activity [onPause](https://developer.android.com/reference/android/app/Activity#onPause()) method gets called. + * On Web it's fired when the document's visibilitychange gets fired and document.hidden is true. + * + * @since 4.1.0 + */ + addListener(eventName: 'pause', listenerFunc: () => void): Promise & PluginListenerHandle; + /** + * Listen for when the app or activity are resumed. + * + * On iOS it's fired when the native [UIApplication.willEnterForegroundNotification](https://developer.apple.com/documentation/uikit/uiapplication/1622944-willenterforegroundnotification) event gets fired. + * On Android it's fired when the Capacitor's Activity [onResume](https://developer.android.com/reference/android/app/Activity#onResume()) method gets called, + * but only after resume has fired first. + * On Web it's fired when the document's visibilitychange gets fired and document.hidden is false. + * + * @since 4.1.0 + */ + addListener(eventName: 'resume', listenerFunc: () => void): Promise & PluginListenerHandle; + /** + * Listen for url open events for the app. This handles both custom URL scheme links as well + * as URLs your app handles (Universal Links on iOS and App Links on Android) + * + * @since 1.0.0 + */ + addListener(eventName: 'appUrlOpen', listenerFunc: URLOpenListener): Promise & PluginListenerHandle; + /** + * If the app was launched with previously persisted plugin call data, such as on Android + * when an activity returns to an app that was closed, this call will return any data + * the app was launched with, converted into the form of a result from a plugin call. + * + * On Android, due to memory constraints on low-end devices, it's possible + * that, if your app launches a new activity, your app will be terminated by + * the operating system in order to reduce memory consumption. + * + * For example, that means the Camera API, which launches a new Activity to + * take a photo, may not be able to return data back to your app. + * + * To avoid this, Capacitor stores all restored activity results on launch. + * You should add a listener for `appRestoredResult` in order to handle any + * plugin call results that were delivered when your app was not running. + * + * Once you have that result (if any), you can update the UI to restore a + * logical experience for the user, such as navigating or selecting the + * proper tab. + * + * We recommend every Android app using plugins that rely on external + * Activities (for example, Camera) to have this event and process handled. + * + * @since 1.0.0 + */ + addListener(eventName: 'appRestoredResult', listenerFunc: RestoredListener): Promise & PluginListenerHandle; + /** + * Listen for the hardware back button event (Android only). Listening for this event will disable the + * default back button behaviour, so you might want to call `window.history.back()` manually. + * If you want to close the app, call `App.exitApp()`. + * + * @since 1.0.0 + */ + addListener(eventName: 'backButton', listenerFunc: BackButtonListener): Promise & PluginListenerHandle; + /** + * Remove all native listeners for this plugin + * + * @since 1.0.0 + */ + removeAllListeners(): Promise; +} +/** + * @deprecated Use `RestoredListenerEvent`. + * @since 1.0.0 + */ +export declare type AppRestoredResult = RestoredListenerEvent; +/** + * @deprecated Use `URLOpenListenerEvent`. + * @since 1.0.0 + */ +export declare type AppUrlOpen = URLOpenListenerEvent; diff --git a/node_modules/@capacitor/app/dist/esm/definitions.js b/node_modules/@capacitor/app/dist/esm/definitions.js new file mode 100644 index 0000000..497acb5 --- /dev/null +++ b/node_modules/@capacitor/app/dist/esm/definitions.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=definitions.js.map \ No newline at end of file diff --git a/node_modules/@capacitor/app/dist/esm/definitions.js.map b/node_modules/@capacitor/app/dist/esm/definitions.js.map new file mode 100644 index 0000000..de65ef4 --- /dev/null +++ b/node_modules/@capacitor/app/dist/esm/definitions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface AppInfo {\n /**\n * The name of the app.\n *\n * @since 1.0.0\n */\n name: string;\n\n /**\n * The identifier of the app.\n * On iOS it's the Bundle Identifier.\n * On Android it's the Application ID\n *\n * @since 1.0.0\n */\n id: string;\n\n /**\n * The build version.\n * On iOS it's the CFBundleVersion.\n * On Android it's the versionCode.\n *\n * @since 1.0.0\n */\n build: string;\n\n /**\n * The app version.\n * On iOS it's the CFBundleShortVersionString.\n * On Android it's package's versionName.\n *\n * @since 1.0.0\n */\n version: string;\n}\n\nexport interface AppState {\n /**\n * Whether the app is active or not.\n *\n * @since 1.0.0\n */\n isActive: boolean;\n}\n\nexport interface URLOpenListenerEvent {\n /**\n * The URL the app was opened with.\n *\n * @since 1.0.0\n */\n url: string;\n\n /**\n * The source application opening the app (iOS only)\n * https://developer.apple.com/documentation/uikit/uiapplicationopenurloptionskey/1623128-sourceapplication\n *\n * @since 1.0.0\n */\n iosSourceApplication?: any;\n /**\n * Whether the app should open the passed document in-place\n * or must copy it first.\n * https://developer.apple.com/documentation/uikit/uiapplicationopenurloptionskey/1623123-openinplace\n *\n * @since 1.0.0\n */\n iosOpenInPlace?: boolean;\n}\n\nexport interface AppLaunchUrl {\n /**\n * The url used to open the app.\n *\n * @since 1.0.0\n */\n url: string;\n}\n\nexport interface RestoredListenerEvent {\n /**\n * The pluginId this result corresponds to. For example, `Camera`.\n *\n * @since 1.0.0\n */\n pluginId: string;\n /**\n * The methodName this result corresponds to. For example, `getPhoto`\n *\n * @since 1.0.0\n */\n methodName: string;\n /**\n * The result data passed from the plugin. This would be the result you'd\n * expect from normally calling the plugin method. For example, `CameraPhoto`\n *\n * @since 1.0.0\n */\n data?: any;\n /**\n * Boolean indicating if the plugin call succeeded.\n *\n * @since 1.0.0\n */\n success: boolean;\n /**\n * If the plugin call didn't succeed, it will contain the error message.\n *\n * @since 1.0.0\n */\n error?: {\n message: string;\n };\n}\n\nexport interface BackButtonListenerEvent {\n /**\n * Indicates whether the browser can go back in history.\n * False when the history stack is on the first entry.\n *\n * @since 1.0.0\n */\n canGoBack: boolean;\n}\n\nexport type StateChangeListener = (state: AppState) => void;\nexport type URLOpenListener = (event: URLOpenListenerEvent) => void;\nexport type RestoredListener = (event: RestoredListenerEvent) => void;\nexport type BackButtonListener = (event: BackButtonListenerEvent) => void;\n\nexport interface AppPlugin {\n /**\n * Force exit the app. This should only be used in conjunction with the `backButton` handler for Android to\n * exit the app when navigation is complete.\n *\n * Ionic handles this itself so you shouldn't need to call this if using Ionic.\n *\n * @since 1.0.0\n */\n exitApp(): Promise;\n\n /**\n * Return information about the app.\n *\n * @since 1.0.0\n */\n getInfo(): Promise;\n\n /**\n * Gets the current app state.\n *\n * @since 1.0.0\n */\n getState(): Promise;\n\n /**\n * Get the URL the app was launched with, if any.\n *\n * @since 1.0.0\n */\n getLaunchUrl(): Promise;\n\n /**\n * Minimizes the application.\n *\n * Only available for Android.\n *\n * @since 1.1.0\n */\n minimizeApp(): Promise;\n\n /**\n * Listen for changes in the app or the activity states.\n *\n * On iOS it's fired when the native [UIApplication.willResignActiveNotification](https://developer.apple.com/documentation/uikit/uiapplication/1622973-willresignactivenotification) and\n * [UIApplication.didBecomeActiveNotification](https://developer.apple.com/documentation/uikit/uiapplication/1622953-didbecomeactivenotification) events get fired.\n * On Android it's fired when the Capacitor's Activity [onResume](https://developer.android.com/reference/android/app/Activity#onResume()) and [onStop](https://developer.android.com/reference/android/app/Activity#onStop()) methods gets called.\n * On Web it's fired when the document's visibilitychange gets fired.\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'appStateChange',\n listenerFunc: StateChangeListener,\n ): Promise & PluginListenerHandle;\n\n /**\n * Listen for when the app or the activity are paused.\n *\n * On iOS it's fired when the native [UIApplication.didEnterBackgroundNotification](https://developer.apple.com/documentation/uikit/uiapplication/1623071-didenterbackgroundnotification) event gets fired.\n * On Android it's fired when the Capacitor's Activity [onPause](https://developer.android.com/reference/android/app/Activity#onPause()) method gets called.\n * On Web it's fired when the document's visibilitychange gets fired and document.hidden is true.\n *\n * @since 4.1.0\n */\n addListener(\n eventName: 'pause',\n listenerFunc: () => void,\n ): Promise & PluginListenerHandle;\n\n /**\n * Listen for when the app or activity are resumed.\n *\n * On iOS it's fired when the native [UIApplication.willEnterForegroundNotification](https://developer.apple.com/documentation/uikit/uiapplication/1622944-willenterforegroundnotification) event gets fired.\n * On Android it's fired when the Capacitor's Activity [onResume](https://developer.android.com/reference/android/app/Activity#onResume()) method gets called,\n * but only after resume has fired first.\n * On Web it's fired when the document's visibilitychange gets fired and document.hidden is false.\n *\n * @since 4.1.0\n */\n addListener(\n eventName: 'resume',\n listenerFunc: () => void,\n ): Promise & PluginListenerHandle;\n\n /**\n * Listen for url open events for the app. This handles both custom URL scheme links as well\n * as URLs your app handles (Universal Links on iOS and App Links on Android)\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'appUrlOpen',\n listenerFunc: URLOpenListener,\n ): Promise & PluginListenerHandle;\n\n /**\n * If the app was launched with previously persisted plugin call data, such as on Android\n * when an activity returns to an app that was closed, this call will return any data\n * the app was launched with, converted into the form of a result from a plugin call.\n *\n * On Android, due to memory constraints on low-end devices, it's possible\n * that, if your app launches a new activity, your app will be terminated by\n * the operating system in order to reduce memory consumption.\n *\n * For example, that means the Camera API, which launches a new Activity to\n * take a photo, may not be able to return data back to your app.\n *\n * To avoid this, Capacitor stores all restored activity results on launch.\n * You should add a listener for `appRestoredResult` in order to handle any\n * plugin call results that were delivered when your app was not running.\n *\n * Once you have that result (if any), you can update the UI to restore a\n * logical experience for the user, such as navigating or selecting the\n * proper tab.\n *\n * We recommend every Android app using plugins that rely on external\n * Activities (for example, Camera) to have this event and process handled.\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'appRestoredResult',\n listenerFunc: RestoredListener,\n ): Promise & PluginListenerHandle;\n\n /**\n * Listen for the hardware back button event (Android only). Listening for this event will disable the\n * default back button behaviour, so you might want to call `window.history.back()` manually.\n * If you want to close the app, call `App.exitApp()`.\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'backButton',\n listenerFunc: BackButtonListener,\n ): Promise & PluginListenerHandle;\n\n /**\n * Remove all native listeners for this plugin\n *\n * @since 1.0.0\n */\n removeAllListeners(): Promise;\n}\n\n/**\n * @deprecated Use `RestoredListenerEvent`.\n * @since 1.0.0\n */\nexport type AppRestoredResult = RestoredListenerEvent;\n\n/**\n * @deprecated Use `URLOpenListenerEvent`.\n * @since 1.0.0\n */\nexport type AppUrlOpen = URLOpenListenerEvent;\n"]} \ No newline at end of file diff --git a/node_modules/@capacitor/app/dist/esm/index.d.ts b/node_modules/@capacitor/app/dist/esm/index.d.ts new file mode 100644 index 0000000..7379e22 --- /dev/null +++ b/node_modules/@capacitor/app/dist/esm/index.d.ts @@ -0,0 +1,4 @@ +import type { AppPlugin } from './definitions'; +declare const App: AppPlugin; +export * from './definitions'; +export { App }; diff --git a/node_modules/@capacitor/app/dist/esm/index.js b/node_modules/@capacitor/app/dist/esm/index.js new file mode 100644 index 0000000..6834c6d --- /dev/null +++ b/node_modules/@capacitor/app/dist/esm/index.js @@ -0,0 +1,7 @@ +import { registerPlugin } from '@capacitor/core'; +const App = registerPlugin('App', { + web: () => import('./web').then(m => new m.AppWeb()), +}); +export * from './definitions'; +export { App }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@capacitor/app/dist/esm/index.js.map b/node_modules/@capacitor/app/dist/esm/index.js.map new file mode 100644 index 0000000..a48b836 --- /dev/null +++ b/node_modules/@capacitor/app/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,GAAG,GAAG,cAAc,CAAY,KAAK,EAAE;IAC3C,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;CACrD,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { AppPlugin } from './definitions';\n\nconst App = registerPlugin('App', {\n web: () => import('./web').then(m => new m.AppWeb()),\n});\n\nexport * from './definitions';\nexport { App };\n"]} \ No newline at end of file diff --git a/node_modules/@capacitor/app/dist/esm/web.d.ts b/node_modules/@capacitor/app/dist/esm/web.d.ts new file mode 100644 index 0000000..da0f8b2 --- /dev/null +++ b/node_modules/@capacitor/app/dist/esm/web.d.ts @@ -0,0 +1,11 @@ +import { WebPlugin } from '@capacitor/core'; +import type { AppInfo, AppPlugin, AppLaunchUrl, AppState } from './definitions'; +export declare class AppWeb extends WebPlugin implements AppPlugin { + constructor(); + exitApp(): Promise; + getInfo(): Promise; + getLaunchUrl(): Promise; + getState(): Promise; + minimizeApp(): Promise; + private handleVisibilityChange; +} diff --git a/node_modules/@capacitor/app/dist/esm/web.js b/node_modules/@capacitor/app/dist/esm/web.js new file mode 100644 index 0000000..f9ea10a --- /dev/null +++ b/node_modules/@capacitor/app/dist/esm/web.js @@ -0,0 +1,35 @@ +import { WebPlugin } from '@capacitor/core'; +export class AppWeb extends WebPlugin { + constructor() { + super(); + this.handleVisibilityChange = () => { + const data = { + isActive: document.hidden !== true, + }; + this.notifyListeners('appStateChange', data); + if (document.hidden) { + this.notifyListeners('pause', null); + } + else { + this.notifyListeners('resume', null); + } + }; + document.addEventListener('visibilitychange', this.handleVisibilityChange, false); + } + exitApp() { + throw this.unimplemented('Not implemented on web.'); + } + async getInfo() { + throw this.unimplemented('Not implemented on web.'); + } + async getLaunchUrl() { + return { url: '' }; + } + async getState() { + return { isActive: document.hidden !== true }; + } + async minimizeApp() { + throw this.unimplemented('Not implemented on web.'); + } +} +//# sourceMappingURL=web.js.map \ No newline at end of file diff --git a/node_modules/@capacitor/app/dist/esm/web.js.map b/node_modules/@capacitor/app/dist/esm/web.js.map new file mode 100644 index 0000000..4ade26b --- /dev/null +++ b/node_modules/@capacitor/app/dist/esm/web.js.map @@ -0,0 +1 @@ +{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,MAAO,SAAQ,SAAS;IACnC;QACE,KAAK,EAAE,CAAC;QA4BF,2BAAsB,GAAG,GAAG,EAAE;YACpC,MAAM,IAAI,GAAG;gBACX,QAAQ,EAAE,QAAQ,CAAC,MAAM,KAAK,IAAI;aACnC,CAAC;YAEF,IAAI,CAAC,eAAe,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;YAC7C,IAAI,QAAQ,CAAC,MAAM,EAAE;gBACnB,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;aACrC;iBAAM;gBACL,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;aACtC;QACH,CAAC,CAAC;QAtCA,QAAQ,CAAC,gBAAgB,CACvB,kBAAkB,EAClB,IAAI,CAAC,sBAAsB,EAC3B,KAAK,CACN,CAAC;IACJ,CAAC;IAED,OAAO;QACL,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,OAAO;QACX,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,WAAW;QACf,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;CAcF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { AppInfo, AppPlugin, AppLaunchUrl, AppState } from './definitions';\n\nexport class AppWeb extends WebPlugin implements AppPlugin {\n constructor() {\n super();\n document.addEventListener(\n 'visibilitychange',\n this.handleVisibilityChange,\n false,\n );\n }\n\n exitApp(): Promise {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async getInfo(): Promise {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async getLaunchUrl(): Promise {\n return { url: '' };\n }\n\n async getState(): Promise {\n return { isActive: document.hidden !== true };\n }\n\n async minimizeApp(): Promise {\n throw this.unimplemented('Not implemented on web.');\n }\n\n private handleVisibilityChange = () => {\n const data = {\n isActive: document.hidden !== true,\n };\n\n this.notifyListeners('appStateChange', data);\n if (document.hidden) {\n this.notifyListeners('pause', null);\n } else {\n this.notifyListeners('resume', null);\n }\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/@capacitor/app/dist/plugin.cjs.js b/node_modules/@capacitor/app/dist/plugin.cjs.js new file mode 100644 index 0000000..538847c --- /dev/null +++ b/node_modules/@capacitor/app/dist/plugin.cjs.js @@ -0,0 +1,51 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var core = require('@capacitor/core'); + +const App = core.registerPlugin('App', { + web: () => Promise.resolve().then(function () { return web; }).then(m => new m.AppWeb()), +}); + +class AppWeb extends core.WebPlugin { + constructor() { + super(); + this.handleVisibilityChange = () => { + const data = { + isActive: document.hidden !== true, + }; + this.notifyListeners('appStateChange', data); + if (document.hidden) { + this.notifyListeners('pause', null); + } + else { + this.notifyListeners('resume', null); + } + }; + document.addEventListener('visibilitychange', this.handleVisibilityChange, false); + } + exitApp() { + throw this.unimplemented('Not implemented on web.'); + } + async getInfo() { + throw this.unimplemented('Not implemented on web.'); + } + async getLaunchUrl() { + return { url: '' }; + } + async getState() { + return { isActive: document.hidden !== true }; + } + async minimizeApp() { + throw this.unimplemented('Not implemented on web.'); + } +} + +var web = /*#__PURE__*/Object.freeze({ + __proto__: null, + AppWeb: AppWeb +}); + +exports.App = App; +//# sourceMappingURL=plugin.cjs.js.map diff --git a/node_modules/@capacitor/app/dist/plugin.cjs.js.map b/node_modules/@capacitor/app/dist/plugin.cjs.js.map new file mode 100644 index 0000000..cec1c02 --- /dev/null +++ b/node_modules/@capacitor/app/dist/plugin.cjs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst App = registerPlugin('App', {\n web: () => import('./web').then(m => new m.AppWeb()),\n});\nexport * from './definitions';\nexport { App };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class AppWeb extends WebPlugin {\n constructor() {\n super();\n this.handleVisibilityChange = () => {\n const data = {\n isActive: document.hidden !== true,\n };\n this.notifyListeners('appStateChange', data);\n if (document.hidden) {\n this.notifyListeners('pause', null);\n }\n else {\n this.notifyListeners('resume', null);\n }\n };\n document.addEventListener('visibilitychange', this.handleVisibilityChange, false);\n }\n exitApp() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getInfo() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getLaunchUrl() {\n return { url: '' };\n }\n async getState() {\n return { isActive: document.hidden !== true };\n }\n async minimizeApp() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,GAAG,GAAGA,mBAAc,CAAC,KAAK,EAAE;AAClC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;AACxD,CAAC;;ACFM,MAAM,MAAM,SAASC,cAAS,CAAC;AACtC,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,EAAE,CAAC;AAChB,QAAQ,IAAI,CAAC,sBAAsB,GAAG,MAAM;AAC5C,YAAY,MAAM,IAAI,GAAG;AACzB,gBAAgB,QAAQ,EAAE,QAAQ,CAAC,MAAM,KAAK,IAAI;AAClD,aAAa,CAAC;AACd,YAAY,IAAI,CAAC,eAAe,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;AACzD,YAAY,IAAI,QAAQ,CAAC,MAAM,EAAE;AACjC,gBAAgB,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACpD,aAAa;AACb,iBAAiB;AACjB,gBAAgB,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AACrD,aAAa;AACb,SAAS,CAAC;AACV,QAAQ,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,IAAI,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;AAC1F,KAAK;AACL,IAAI,OAAO,GAAG;AACd,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;AAC5D,KAAK;AACL,IAAI,MAAM,OAAO,GAAG;AACpB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;AAC5D,KAAK;AACL,IAAI,MAAM,YAAY,GAAG;AACzB,QAAQ,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;AAC3B,KAAK;AACL,IAAI,MAAM,QAAQ,GAAG;AACrB,QAAQ,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;AACtD,KAAK;AACL,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;AAC5D,KAAK;AACL;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@capacitor/app/dist/plugin.js b/node_modules/@capacitor/app/dist/plugin.js new file mode 100644 index 0000000..ad967bc --- /dev/null +++ b/node_modules/@capacitor/app/dist/plugin.js @@ -0,0 +1,54 @@ +var capacitorApp = (function (exports, core) { + 'use strict'; + + const App = core.registerPlugin('App', { + web: () => Promise.resolve().then(function () { return web; }).then(m => new m.AppWeb()), + }); + + class AppWeb extends core.WebPlugin { + constructor() { + super(); + this.handleVisibilityChange = () => { + const data = { + isActive: document.hidden !== true, + }; + this.notifyListeners('appStateChange', data); + if (document.hidden) { + this.notifyListeners('pause', null); + } + else { + this.notifyListeners('resume', null); + } + }; + document.addEventListener('visibilitychange', this.handleVisibilityChange, false); + } + exitApp() { + throw this.unimplemented('Not implemented on web.'); + } + async getInfo() { + throw this.unimplemented('Not implemented on web.'); + } + async getLaunchUrl() { + return { url: '' }; + } + async getState() { + return { isActive: document.hidden !== true }; + } + async minimizeApp() { + throw this.unimplemented('Not implemented on web.'); + } + } + + var web = /*#__PURE__*/Object.freeze({ + __proto__: null, + AppWeb: AppWeb + }); + + exports.App = App; + + Object.defineProperty(exports, '__esModule', { value: true }); + + return exports; + +})({}, capacitorExports); +//# sourceMappingURL=plugin.js.map diff --git a/node_modules/@capacitor/app/dist/plugin.js.map b/node_modules/@capacitor/app/dist/plugin.js.map new file mode 100644 index 0000000..086884d --- /dev/null +++ b/node_modules/@capacitor/app/dist/plugin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst App = registerPlugin('App', {\n web: () => import('./web').then(m => new m.AppWeb()),\n});\nexport * from './definitions';\nexport { App };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class AppWeb extends WebPlugin {\n constructor() {\n super();\n this.handleVisibilityChange = () => {\n const data = {\n isActive: document.hidden !== true,\n };\n this.notifyListeners('appStateChange', data);\n if (document.hidden) {\n this.notifyListeners('pause', null);\n }\n else {\n this.notifyListeners('resume', null);\n }\n };\n document.addEventListener('visibilitychange', this.handleVisibilityChange, false);\n }\n exitApp() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getInfo() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getLaunchUrl() {\n return { url: '' };\n }\n async getState() {\n return { isActive: document.hidden !== true };\n }\n async minimizeApp() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,GAAG,GAAGA,mBAAc,CAAC,KAAK,EAAE;IAClC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;IACxD,CAAC;;ICFM,MAAM,MAAM,SAASC,cAAS,CAAC;IACtC,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,EAAE,CAAC;IAChB,QAAQ,IAAI,CAAC,sBAAsB,GAAG,MAAM;IAC5C,YAAY,MAAM,IAAI,GAAG;IACzB,gBAAgB,QAAQ,EAAE,QAAQ,CAAC,MAAM,KAAK,IAAI;IAClD,aAAa,CAAC;IACd,YAAY,IAAI,CAAC,eAAe,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IACzD,YAAY,IAAI,QAAQ,CAAC,MAAM,EAAE;IACjC,gBAAgB,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACpD,aAAa;IACb,iBAAiB;IACjB,gBAAgB,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACrD,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,IAAI,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;IAC1F,KAAK;IACL,IAAI,OAAO,GAAG;IACd,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IAC5D,KAAK;IACL,IAAI,MAAM,OAAO,GAAG;IACpB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IAC5D,KAAK;IACL,IAAI,MAAM,YAAY,GAAG;IACzB,QAAQ,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;IAC3B,KAAK;IACL,IAAI,MAAM,QAAQ,GAAG;IACrB,QAAQ,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;IACtD,KAAK;IACL,IAAI,MAAM,WAAW,GAAG;IACxB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IAC5D,KAAK;IACL;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@capacitor/app/ios/Plugin/AppPlugin.h b/node_modules/@capacitor/app/ios/Plugin/AppPlugin.h new file mode 100644 index 0000000..f2bd9e0 --- /dev/null +++ b/node_modules/@capacitor/app/ios/Plugin/AppPlugin.h @@ -0,0 +1,10 @@ +#import + +//! Project version number for Plugin. +FOUNDATION_EXPORT double PluginVersionNumber; + +//! Project version string for Plugin. +FOUNDATION_EXPORT const unsigned char PluginVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + diff --git a/node_modules/@capacitor/app/ios/Plugin/AppPlugin.m b/node_modules/@capacitor/app/ios/Plugin/AppPlugin.m new file mode 100644 index 0000000..e18f8ee --- /dev/null +++ b/node_modules/@capacitor/app/ios/Plugin/AppPlugin.m @@ -0,0 +1,13 @@ +#import +#import + +// Define the plugin using the CAP_PLUGIN Macro, and +// each method the plugin supports using the CAP_PLUGIN_METHOD macro. +CAP_PLUGIN(AppPlugin, "App", + CAP_PLUGIN_METHOD(exitApp, CAPPluginReturnPromise); + CAP_PLUGIN_METHOD(getInfo, CAPPluginReturnPromise); + CAP_PLUGIN_METHOD(getLaunchUrl, CAPPluginReturnPromise); + CAP_PLUGIN_METHOD(getState, CAPPluginReturnPromise); + CAP_PLUGIN_METHOD(minimizeApp, CAPPluginReturnPromise); + CAP_PLUGIN_METHOD(removeAllListeners, CAPPluginReturnPromise); +) diff --git a/node_modules/@capacitor/app/ios/Plugin/AppPlugin.swift b/node_modules/@capacitor/app/ios/Plugin/AppPlugin.swift new file mode 100644 index 0000000..e974127 --- /dev/null +++ b/node_modules/@capacitor/app/ios/Plugin/AppPlugin.swift @@ -0,0 +1,107 @@ +import Foundation +import Capacitor + +@objc(AppPlugin) +public class AppPlugin: CAPPlugin { + private var observers: [NSObjectProtocol] = [] + + override public func load() { + NotificationCenter.default.addObserver(self, selector: #selector(self.handleUrlOpened(notification:)), name: Notification.Name.capacitorOpenURL, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(self.handleUniversalLink(notification:)), name: Notification.Name.capacitorOpenUniversalLink, object: nil) + observers.append(NotificationCenter.default.addObserver(forName: UIApplication.didBecomeActiveNotification, object: nil, queue: OperationQueue.main) { [weak self] (_) in + self?.notifyListeners("appStateChange", data: [ + "isActive": true + ]) + }) + observers.append(NotificationCenter.default.addObserver(forName: UIApplication.willResignActiveNotification, object: nil, queue: OperationQueue.main) { [weak self] (_) in + self?.notifyListeners("appStateChange", data: [ + "isActive": false + ]) + }) + + observers.append(NotificationCenter.default.addObserver(forName: UIApplication.didEnterBackgroundNotification, object: nil, queue: OperationQueue.main) { [weak self] (_) in + self?.notifyListeners("pause", data: nil) + }) + + observers.append(NotificationCenter.default.addObserver(forName: UIApplication.willEnterForegroundNotification, object: nil, queue: OperationQueue.main) { [weak self] (_) in + self?.notifyListeners("resume", data: nil) + }) + + } + + deinit { + NotificationCenter.default.removeObserver(self) + for observer in observers { + NotificationCenter.default.removeObserver(observer) + } + } + + @objc func handleUrlOpened(notification: NSNotification) { + guard let object = notification.object as? [String: Any?] else { + return + } + + notifyListeners("appUrlOpen", data: makeUrlOpenObject(object), retainUntilConsumed: true) + } + + @objc func handleUniversalLink(notification: NSNotification) { + guard let object = notification.object as? [String: Any?] else { + return + } + + notifyListeners("appUrlOpen", data: makeUrlOpenObject(object), retainUntilConsumed: true) + } + + func makeUrlOpenObject(_ object: [String: Any?]) -> JSObject { + guard let url = object["url"] as? NSURL else { + return [:] + } + + let options = object["options"] as? [String: Any?] ?? [:] + return [ + "url": url.absoluteString ?? "", + "iosSourceApplication": options[UIApplication.OpenURLOptionsKey.sourceApplication.rawValue] as? String ?? "", + "iosOpenInPlace": options[UIApplication.OpenURLOptionsKey.openInPlace.rawValue] as? String ?? "" + ] + } + + @objc func exitApp(_ call: CAPPluginCall) { + call.unimplemented() + } + + @objc func getInfo(_ call: CAPPluginCall) { + if let info = Bundle.main.infoDictionary { + call.resolve([ + "name": info["CFBundleDisplayName"] as? String ?? "", + "id": info["CFBundleIdentifier"] as? String ?? "", + "build": info["CFBundleVersion"] as? String ?? "", + "version": info["CFBundleShortVersionString"] as? String ?? "" + ]) + } else { + call.reject("Unable to get App Info") + } + + } + + @objc func getLaunchUrl(_ call: CAPPluginCall) { + if let lastUrl = ApplicationDelegateProxy.shared.lastURL { + let urlValue = lastUrl.absoluteString + call.resolve([ + "url": urlValue + ]) + } + call.resolve() + } + + @objc func getState(_ call: CAPPluginCall) { + DispatchQueue.main.async { + call.resolve([ + "isActive": UIApplication.shared.applicationState == UIApplication.State.active + ]) + } + } + + @objc func minimizeApp(_ call: CAPPluginCall) { + call.unimplemented() + } +} diff --git a/node_modules/@capacitor/app/ios/Plugin/Info.plist b/node_modules/@capacitor/app/ios/Plugin/Info.plist new file mode 100644 index 0000000..1007fd9 --- /dev/null +++ b/node_modules/@capacitor/app/ios/Plugin/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/node_modules/@capacitor/app/package.json b/node_modules/@capacitor/app/package.json new file mode 100644 index 0000000..4d0a6aa --- /dev/null +++ b/node_modules/@capacitor/app/package.json @@ -0,0 +1,83 @@ +{ + "name": "@capacitor/app", + "version": "5.0.8", + "description": "The App API handles high level App state and events.For example, this API emits events when the app enters and leaves the foreground, handles deeplinks, opens other apps, and manages persisted plugin state.", + "main": "dist/plugin.cjs.js", + "module": "dist/esm/index.js", + "types": "dist/esm/index.d.ts", + "unpkg": "dist/plugin.js", + "files": [ + "android/src/main/", + "android/build.gradle", + "dist/", + "ios/Plugin/", + "CapacitorApp.podspec" + ], + "author": "Ionic ", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/ionic-team/capacitor-plugins.git" + }, + "bugs": { + "url": "https://github.com/ionic-team/capacitor-plugins/issues" + }, + "keywords": [ + "capacitor", + "plugin", + "native" + ], + "scripts": { + "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", + "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..", + "verify:android": "cd android && ./gradlew clean build test && cd ..", + "verify:web": "npm run build", + "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", + "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format", + "eslint": "eslint . --ext ts", + "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", + "swiftlint": "node-swiftlint", + "docgen": "docgen --api AppPlugin --output-readme README.md", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "clean": "rimraf ./dist", + "watch": "tsc --watch", + "prepublishOnly": "npm run build", + "publish:cocoapod": "pod trunk push ./CapacitorApp.podspec --allow-warnings" + }, + "devDependencies": { + "@capacitor/android": "^5.0.0", + "@capacitor/core": "^5.0.0", + "@capacitor/docgen": "0.2.2", + "@capacitor/ios": "^5.0.0", + "@ionic/eslint-config": "^0.3.0", + "@ionic/prettier-config": "~1.0.1", + "@ionic/swiftlint-config": "^1.1.2", + "eslint": "^7.11.0", + "prettier": "~2.3.0", + "prettier-plugin-java": "~1.0.2", + "rimraf": "^3.0.0", + "rollup": "^2.29.0", + "swiftlint": "^1.0.1", + "typescript": "~4.1.5" + }, + "peerDependencies": { + "@capacitor/core": "^5.0.0" + }, + "prettier": "@ionic/prettier-config", + "swiftlint": "@ionic/swiftlint-config", + "eslintConfig": { + "extends": "@ionic/eslint-config/recommended" + }, + "capacitor": { + "ios": { + "src": "ios" + }, + "android": { + "src": "android" + } + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "f6242b39fa8ba423d1912da5398fb11c2aadfa09" +} diff --git a/node_modules/@capacitor/cli/LICENSE b/node_modules/@capacitor/cli/LICENSE new file mode 100644 index 0000000..c3e903b --- /dev/null +++ b/node_modules/@capacitor/cli/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017-present Drifty Co. + +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/@capacitor/cli/README.md b/node_modules/@capacitor/cli/README.md new file mode 100644 index 0000000..d758c3c --- /dev/null +++ b/node_modules/@capacitor/cli/README.md @@ -0,0 +1,15 @@ +# Capacitor CLI + +The Capacitor command-line interface should be installed locally and executed through `npm` scripts. + +``` +npm install @capacitor/cli --save-dev +``` + +## Using Capacitor CLI + +Consult the Getting Started guide for information on using the CLI and Capacitor scripts. + +### License + +* [MIT](https://github.com/ionic-team/capacitor/blob/HEAD/LICENSE) diff --git a/node_modules/@capacitor/cli/assets/android-template.tar.gz b/node_modules/@capacitor/cli/assets/android-template.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..c812adb220c4f94c217040f35a878c42e239f666 GIT binary patch literal 233664 zcmV(}K+wM*iwFP!000006YRTZKvUV)FdQA*1QkaGER+Z;(h`u~RYX(-l#Vn*ID|k* zLJA>N(LqNM7)Jr6jv^u*q<0ko73l&}Ly=xXhfuzI0@%ixJNKD;pZk9AJNpMYXYaMw zUVE*z*IwlSM`OqsG!9P$Apfx@E-o%3B?SY2Wo4vUzv4$%-o?emC8eaqVGs!^8EGlm zqf#;wQV?+oDQOu=7)1O(N7AQ8A(4?ph`2bBg2MsC|2dwO&A>kX{vXiRcq%I{`2~MJ zZvrp_5(bBc9miP{@fd5^M|FUa0S5vWNd^>Pwq!Daq<}!6F=Shc6&!_kSbao%ghp6l z@m7e_>c>waRx!apjzOUUuoDyvmJCA@2v`gXNygxDFdGaOAVG!UNP<217fED2Te6<5 zz$vFd0GJJ)2qW79u;aS=h?7XH6UH89s09^`d?YZ?*20wA0f1%tJQk!b{AWjzo94NoD0yM_v^fgxCw z5s}u|RWK+V&3Z#XSqNC;=kO>b7KXy(Y%pjF@e{vbM@ZK8FanZnD+&Y1C?O~o1cVca zcmhBqV*u8+&lB-z3X*6I?#CJ+!q6YtU`2zeqp%nP34jt-fmWA8uW%bG49DWpVAq;D z=#eSb7(7fH>4ZVA&;eLu$e>IB2g2G0a34nz-=_&xz+y3H zp~7&C0~QL$SOZ7|6;HG$5s)YV?)hWz>_d62I6gC02TlNSt{}wYt>g+iy^U;#R-Wcv(%r4r>riALprU% zuoi?0z%&6GiM&Q3xRF27Xc9=yiUPxMcruI%E;NVaJVYr<= z3H(_b1Q%9!CIdtq5(~p2$rz_K<^PSwVQ^ow_9*-)>mY%ag$RWMt9Z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XWl zkbi`_^WRmTOKT$6h4I&q??*S+pM(Ac2Eiy84uWC-Dj36fa(Oe!q7H@z!$GQ@>%!>E z*H2eN_;hnQ_!2wDv)A7d&p>ICd=vhGIgN=n&MINQD#wrSf5_{ho%>%4pL~uQ`3F^FV{bH>gz23;q~{PtbeC<{QiG2o^$?NZ&uwAM;vj)5pRkA01+9zH~<&` E07NUwLjV8( literal 0 HcmV?d00001 diff --git a/node_modules/@capacitor/cli/assets/capacitor-cordova-ios-plugins.tar.gz b/node_modules/@capacitor/cli/assets/capacitor-cordova-ios-plugins.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..fe10aaeffde7dad32cab2f43ea501957ef0db344 GIT binary patch literal 433 zcmV;i0Z#rOiwFP!000006YY~hOT;h`g?rv#F}HwdH?7?k3M;~%JP4xRM3$J2ZQN~A zlGH`i|1N23T}2VJf?~f*$dLCk8S)lNXX=)ntm|AzbBadQnxpY6m6-~;Hw2W@IEuin zNjz&-8n$~!97o^C|q7wWxir$|+|R_Tc;?qvN4eXEwHv)BE|=5Rs!-E@as zPEcl(A^*sWyX$O)SPkjk@=5+F4c_EGh{G@$^Z#9*XPVIX!~75WnMVE`KcD`u1QoD1kP!{{PuLkCM!s zd+xcXpL6ewUMP)23#BtyRN#N?V_;xlW?}-uf6dKIk-r8;vfuE>*w73F3{A{TP0Wo< z%nVHc149#2Gb0c%_@5)`~Q z#53q2v`{dF7C~kAP2V?OF9^A<_Y0dr|9Dq+EjBVj`TrWL|3CYYGf^)#h!IR>vKYVU z!~ao(IC{*$SorI|FvnNz-`L#D%={DkH!?IdHu%r}|LNzW{hNK!{`K|2X*1^fcsp9m zoiR;0L0O5y3JRk|Qx{QLY#M_O+Jc7G%1S{I6gHd625rFvWu-)GWhF)+tRo+ROf32? z%Al0>=YkH@P#PWdaPV`09gHI_f(o*!K^%C*TzzFFB_l^1!P4B!*vP;bZ(?ZVU|?WC zFg9?s0QKjBAB`HM(Lqlto55uTQQ6>JeHcBBO#y8OV75kFh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.assets.android.platformTemplateArchiveAbs, config.android.platformDirAbs); + }); +} +exports.addAndroid = addAndroid; +async function createLocalProperties(platformDir) { + const defaultAndroidPath = (0, path_1.join)((0, os_1.homedir)(), 'Library/Android/sdk'); + if (await (0, utils_fs_1.pathExists)(defaultAndroidPath)) { + const localSettings = ` +## This file is automatically generated by Android Studio. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file should *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. +# +# Location of the SDK. This is only used by Gradle. +# For customization when using a Version Control System, please read the +# header note. +sdk.dir=${defaultAndroidPath} + `; + await (0, utils_fs_1.writeFile)((0, path_1.join)(platformDir, 'local.properties'), localSettings, { + encoding: 'utf-8', + }); + // Only sync if we were able to create the local properties above, otherwise + // this will fail + try { + await gradleSync(platformDir); + } + catch (e) { + console.error('Error running gradle sync', e); + console.error('Unable to infer default Android SDK settings. This is fine, just run npx cap open android and import and sync gradle manually'); + } + } +} +exports.createLocalProperties = createLocalProperties; +async function gradleSync(platformDir) { + await (0, subprocess_1.runCommand)(`./gradlew`, [], { + cwd: platformDir, + }); +} diff --git a/node_modules/@capacitor/cli/dist/android/build.js b/node_modules/@capacitor/cli/dist/android/build.js new file mode 100644 index 0000000..728ad75 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/android/build.js @@ -0,0 +1,100 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.buildAndroid = void 0; +const tslib_1 = require("tslib"); +const path_1 = require("path"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_1 = require("../common"); +const log_1 = require("../log"); +const subprocess_1 = require("../util/subprocess"); +async function buildAndroid(config, buildOptions) { + var _a, _b; + const releaseType = (_a = buildOptions.androidreleasetype) !== null && _a !== void 0 ? _a : 'AAB'; + const releaseTypeIsAAB = releaseType === 'AAB'; + const flavor = (_b = buildOptions.flavor) !== null && _b !== void 0 ? _b : ''; + const arg = releaseTypeIsAAB + ? `:app:bundle${flavor}Release` + : `assemble${flavor}Release`; + const gradleArgs = [arg]; + try { + await (0, common_1.runTask)('Running Gradle build', async () => (0, subprocess_1.runCommand)('./gradlew', gradleArgs, { + cwd: config.android.platformDirAbs, + })); + } + catch (e) { + if (e.includes('EACCES')) { + throw `gradlew file does not have executable permissions. This can happen if the Android platform was added on a Windows machine. Please run ${colors_1.default.strong(`chmod +x ./${config.android.platformDir}/gradlew`)} and try again.`; + } + else { + throw e; + } + } + const releaseDir = releaseTypeIsAAB + ? flavor !== '' + ? `${flavor}Release` + : 'release' + : flavor !== '' + ? (0, path_1.join)(flavor, 'release') + : 'release'; + const releasePath = (0, path_1.join)(config.android.appDirAbs, 'build', 'outputs', releaseTypeIsAAB ? 'bundle' : 'apk', releaseDir); + const unsignedReleaseName = `app${flavor !== '' ? `-${flavor}` : ''}-release${releaseTypeIsAAB ? '' : '-unsigned'}.${releaseType.toLowerCase()}`; + const signedReleaseName = unsignedReleaseName.replace(`-release${releaseTypeIsAAB ? '' : '-unsigned'}.${releaseType.toLowerCase()}`, `-release-signed.${releaseType.toLowerCase()}`); + if (buildOptions.signingtype == 'jarsigner') { + await signWithJarSigner(config, buildOptions, releasePath, signedReleaseName, unsignedReleaseName); + } + else { + await signWithApkSigner(config, buildOptions, releasePath, signedReleaseName, unsignedReleaseName); + } + (0, log_1.logSuccess)(`Successfully generated ${signedReleaseName} at: ${releasePath}`); +} +exports.buildAndroid = buildAndroid; +async function signWithApkSigner(config, buildOptions, releasePath, signedReleaseName, unsignedReleaseName) { + if (!buildOptions.keystorepath || !buildOptions.keystorepass) { + throw 'Missing options. Please supply all options for android signing. (Keystore Path, Keystore Password)'; + } + const signingArgs = [ + 'sign', + '--ks', + buildOptions.keystorepath, + '--ks-pass', + `pass:${buildOptions.keystorepass}`, + '--in', + `${(0, path_1.join)(releasePath, unsignedReleaseName)}`, + '--out', + `${(0, path_1.join)(releasePath, signedReleaseName)}`, + ]; + await (0, common_1.runTask)('Signing Release', async () => { + await (0, subprocess_1.runCommand)('apksigner', signingArgs, { + cwd: config.android.platformDirAbs, + }); + }); +} +async function signWithJarSigner(config, buildOptions, releasePath, signedReleaseName, unsignedReleaseName) { + if (!buildOptions.keystorepath || + !buildOptions.keystorealias || + !buildOptions.keystorealiaspass || + !buildOptions.keystorepass) { + throw 'Missing options. Please supply all options for android signing. (Keystore Path, Keystore Password, Keystore Key Alias, Keystore Key Password)'; + } + const signingArgs = [ + '-sigalg', + 'SHA1withRSA', + '-digestalg', + 'SHA1', + '-keystore', + buildOptions.keystorepath, + '-keypass', + buildOptions.keystorealiaspass, + '-storepass', + buildOptions.keystorepass, + `-signedjar`, + `${(0, path_1.join)(releasePath, signedReleaseName)}`, + `${(0, path_1.join)(releasePath, unsignedReleaseName)}`, + buildOptions.keystorealias, + ]; + await (0, common_1.runTask)('Signing Release', async () => { + await (0, subprocess_1.runCommand)('jarsigner', signingArgs, { + cwd: config.android.platformDirAbs, + }); + }); +} diff --git a/node_modules/@capacitor/cli/dist/android/common.js b/node_modules/@capacitor/cli/dist/android/common.js new file mode 100644 index 0000000..0a86c2c --- /dev/null +++ b/node_modules/@capacitor/cli/dist/android/common.js @@ -0,0 +1,97 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.editProjectSettingsAndroid = exports.resolvePlugin = exports.getAndroidPlugins = exports.checkAndroidPackage = void 0; +const utils_fs_1 = require("@ionic/utils-fs"); +const path_1 = require("path"); +const common_1 = require("../common"); +const cordova_1 = require("../cordova"); +const plugin_1 = require("../plugin"); +const fs_1 = require("../util/fs"); +async function checkAndroidPackage(config) { + return (0, common_1.checkCapacitorPlatform)(config, 'android'); +} +exports.checkAndroidPackage = checkAndroidPackage; +async function getAndroidPlugins(allPlugins) { + const resolved = await Promise.all(allPlugins.map(async (plugin) => await resolvePlugin(plugin))); + return resolved.filter((plugin) => !!plugin); +} +exports.getAndroidPlugins = getAndroidPlugins; +async function resolvePlugin(plugin) { + var _a; + const platform = 'android'; + if ((_a = plugin.manifest) === null || _a === void 0 ? void 0 : _a.android) { + let pluginFilesPath = plugin.manifest.android.src + ? plugin.manifest.android.src + : platform; + const absolutePath = (0, path_1.join)(plugin.rootPath, pluginFilesPath, plugin.id); + // Android folder shouldn't have subfolders, but they used to, so search for them for compatibility reasons + if (await (0, utils_fs_1.pathExists)(absolutePath)) { + pluginFilesPath = (0, path_1.join)(platform, plugin.id); + } + plugin.android = { + type: 0 /* PluginType.Core */, + path: (0, fs_1.convertToUnixPath)(pluginFilesPath), + }; + } + else if (plugin.xml) { + plugin.android = { + type: 1 /* PluginType.Cordova */, + path: 'src/' + platform, + }; + if ((0, cordova_1.getIncompatibleCordovaPlugins)(platform).includes(plugin.id) || + !(0, plugin_1.getPluginPlatform)(plugin, platform)) { + plugin.android.type = 2 /* PluginType.Incompatible */; + } + } + else { + return null; + } + return plugin; +} +exports.resolvePlugin = resolvePlugin; +/** + * Update an Android project with the desired app name and appId. + * This is a little trickier for Android because the appId becomes + * the package name. + */ +async function editProjectSettingsAndroid(config) { + const appId = config.app.appId; + const appName = config.app.appName + .replace(/&/g, '&') + .replace(/ checkGradlew(config), + () => checkAppSrcDirs(config), + ]); + (0, log_1.logSuccess)('Android looking great! 👌'); + } + catch (e) { + if (!(0, errors_1.isFatal)(e)) { + (0, errors_1.fatal)((_a = e.stack) !== null && _a !== void 0 ? _a : e); + } + throw e; + } +} +exports.doctorAndroid = doctorAndroid; +async function checkAppSrcDirs(config) { + if (!(await (0, utils_fs_1.pathExists)(config.android.appDirAbs))) { + return `${colors_1.default.strong(config.android.appDir)} directory is missing in ${colors_1.default.strong(config.android.platformDir)}`; + } + if (!(await (0, utils_fs_1.pathExists)(config.android.srcMainDirAbs))) { + return `${colors_1.default.strong(config.android.srcMainDir)} directory is missing in ${colors_1.default.strong(config.android.platformDir)}`; + } + if (!(await (0, utils_fs_1.pathExists)(config.android.assetsDirAbs))) { + return `${colors_1.default.strong(config.android.assetsDir)} directory is missing in ${colors_1.default.strong(config.android.platformDir)}`; + } + if (!(await (0, utils_fs_1.pathExists)(config.android.webDirAbs))) { + return `${colors_1.default.strong(config.android.webDir)} directory is missing in ${colors_1.default.strong(config.android.platformDir)}`; + } + const appSrcMainAssetsWwwIndexHtmlDir = (0, path_1.join)(config.android.webDirAbs, 'index.html'); + if (!(await (0, utils_fs_1.pathExists)(appSrcMainAssetsWwwIndexHtmlDir))) { + return `${colors_1.default.strong('index.html')} file is missing in ${colors_1.default.strong(config.android.webDirAbs)}`; + } + return checkAndroidManifestFile(config); +} +async function checkAndroidManifestFile(config) { + const manifestFileName = 'AndroidManifest.xml'; + const manifestFilePath = (0, path_1.join)(config.android.srcMainDirAbs, manifestFileName); + if (!(await (0, utils_fs_1.pathExists)(manifestFilePath))) { + return `${colors_1.default.strong(manifestFileName)} is missing in ${colors_1.default.strong(config.android.srcMainDir)}`; + } + try { + const xmlData = await (0, xml_1.readXML)(manifestFilePath); + return checkAndroidManifestData(config, xmlData); + } + catch (e) { + return e; + } +} +async function checkAndroidManifestData(config, xmlData) { + const manifestNode = xmlData.manifest; + if (!manifestNode) { + return `Missing ${colors_1.default.input('')} XML node in ${colors_1.default.strong(config.android.srcMainDir)}`; + } + const applicationChildNodes = manifestNode.application; + if (!Array.isArray(manifestNode.application)) { + return `Missing ${colors_1.default.input('')} XML node as a child node of ${colors_1.default.input('')} in ${colors_1.default.strong(config.android.srcMainDir)}`; + } + let mainActivityClassPath = ''; + const mainApplicationNode = applicationChildNodes.find(applicationChildNode => { + const activityChildNodes = applicationChildNode.activity; + if (!Array.isArray(activityChildNodes)) { + return false; + } + const mainActivityNode = activityChildNodes.find(activityChildNode => { + const intentFilterChildNodes = activityChildNode['intent-filter']; + if (!Array.isArray(intentFilterChildNodes)) { + return false; + } + return intentFilterChildNodes.find(intentFilterChildNode => { + const actionChildNodes = intentFilterChildNode.action; + if (!Array.isArray(actionChildNodes)) { + return false; + } + const mainActionChildNode = actionChildNodes.find(actionChildNode => { + const androidName = actionChildNode.$['android:name']; + return androidName === 'android.intent.action.MAIN'; + }); + if (!mainActionChildNode) { + return false; + } + const categoryChildNodes = intentFilterChildNode.category; + if (!Array.isArray(categoryChildNodes)) { + return false; + } + return categoryChildNodes.find(categoryChildNode => { + const androidName = categoryChildNode.$['android:name']; + return androidName === 'android.intent.category.LAUNCHER'; + }); + }); + }); + if (mainActivityNode) { + mainActivityClassPath = mainActivityNode.$['android:name']; + } + return mainActivityNode; + }); + if (!mainApplicationNode) { + return `Missing main ${colors_1.default.input('')} XML node in ${colors_1.default.strong(config.android.srcMainDir)}`; + } + if (!mainActivityClassPath) { + return `Missing ${colors_1.default.input('')} attribute for MainActivity class in ${colors_1.default.strong(config.android.srcMainDir)}`; + } + return checkPackage(config, mainActivityClassPath); +} +async function checkPackage(config, mainActivityClassPath) { + const appSrcMainJavaDir = (0, path_1.join)(config.android.srcMainDirAbs, 'java'); + if (!(await (0, utils_fs_1.pathExists)(appSrcMainJavaDir))) { + return `${colors_1.default.strong('java')} directory is missing in ${colors_1.default.strong(appSrcMainJavaDir)}`; + } + const mainActivityClassName = mainActivityClassPath.split('.').pop(); + const srcFiles = await (0, utils_fs_1.readdirp)(appSrcMainJavaDir, { + filter: entry => !entry.stats.isDirectory() && + ['.java', '.kt'].includes((0, path_1.extname)(entry.path)) && + mainActivityClassName === (0, path_1.parse)(entry.path).name, + }); + if (srcFiles.length == 0) { + return `Main activity file (${mainActivityClassName}) is missing`; + } + return checkBuildGradle(config); +} +async function checkBuildGradle(config) { + const fileName = 'build.gradle'; + const filePath = (0, path_1.join)(config.android.appDirAbs, fileName); + if (!(await (0, utils_fs_1.pathExists)(filePath))) { + return `${colors_1.default.strong(fileName)} file is missing in ${colors_1.default.strong(config.android.appDir)}`; + } + let fileContent = await (0, utils_fs_1.readFile)(filePath, { encoding: 'utf-8' }); + fileContent = fileContent.replace(/'|"/g, '').replace(/\s+/g, ' '); + const searchFor = `applicationId`; + if (fileContent.indexOf(searchFor) === -1) { + return `${colors_1.default.strong('build.gradle')} file missing ${colors_1.default.input(`applicationId`)} config in ${filePath}`; + } + return null; +} +async function checkGradlew(config) { + const fileName = 'gradlew'; + const filePath = (0, path_1.join)(config.android.platformDirAbs, fileName); + if (!(await (0, utils_fs_1.pathExists)(filePath))) { + return `${colors_1.default.strong(fileName)} file is missing in ${colors_1.default.strong(config.android.platformDir)}`; + } + return null; +} +async function checkAndroidInstalled() { + /* + if (!await isInstalled('android')) { + return 'Android is not installed. For information: https://developer.android.com/studio/index.html'; + } + */ + return null; +} diff --git a/node_modules/@capacitor/cli/dist/android/open.js b/node_modules/@capacitor/cli/dist/android/open.js new file mode 100644 index 0000000..574bcf8 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/android/open.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.openAndroid = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const debug_1 = tslib_1.__importDefault(require("debug")); +const open_1 = tslib_1.__importDefault(require("open")); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const log_1 = require("../log"); +const debug = (0, debug_1.default)('capacitor:android:open'); +async function openAndroid(config) { + const androidStudioPath = await config.android.studioPath; + const dir = config.android.platformDirAbs; + try { + if (!(await (0, utils_fs_1.pathExists)(androidStudioPath))) { + throw new Error(`Android Studio does not exist at: ${androidStudioPath}`); + } + await (0, open_1.default)(dir, { app: { name: androidStudioPath }, wait: false }); + log_1.logger.info(`Opening Android project at: ${colors_1.default.strong(config.android.platformDir)}.`); + } + catch (e) { + debug('Error opening Android Studio: %O', e); + log_1.logger.error('Unable to launch Android Studio. Is it installed?\n' + + `Attempted to open Android Studio at: ${colors_1.default.strong(androidStudioPath)}\n` + + `You can configure this with the ${colors_1.default.input('CAPACITOR_ANDROID_STUDIO_PATH')} environment variable.`); + } +} +exports.openAndroid = openAndroid; diff --git a/node_modules/@capacitor/cli/dist/android/run.js b/node_modules/@capacitor/cli/dist/android/run.js new file mode 100644 index 0000000..d001ba4 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/android/run.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.runAndroid = void 0; +const tslib_1 = require("tslib"); +const debug_1 = tslib_1.__importDefault(require("debug")); +const path_1 = require("path"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_1 = require("../common"); +const native_run_1 = require("../util/native-run"); +const subprocess_1 = require("../util/subprocess"); +const debug = (0, debug_1.default)('capacitor:android:run'); +async function runAndroid(config, { target: selectedTarget, flavor: selectedFlavor, forwardPorts: selectedPorts, }) { + var _a; + const target = await (0, common_1.promptForPlatformTarget)(await (0, native_run_1.getPlatformTargets)('android'), selectedTarget); + const runFlavor = selectedFlavor || ((_a = config.android) === null || _a === void 0 ? void 0 : _a.flavor) || ''; + const arg = `assemble${runFlavor}Debug`; + const gradleArgs = [arg]; + debug('Invoking ./gradlew with args: %O', gradleArgs); + try { + await (0, common_1.runTask)('Running Gradle build', async () => (0, subprocess_1.runCommand)('./gradlew', gradleArgs, { + cwd: config.android.platformDirAbs, + })); + } + catch (e) { + if (e.includes('EACCES')) { + throw `gradlew file does not have executable permissions. This can happen if the Android platform was added on a Windows machine. Please run ${colors_1.default.strong(`chmod +x ./${config.android.platformDir}/gradlew`)} and try again.`; + } + else { + throw e; + } + } + const pathToApk = `${config.android.platformDirAbs}/${config.android.appDir}/build/outputs/apk${runFlavor !== '' ? '/' + runFlavor : ''}/debug`; + const apkName = (0, common_1.parseApkNameFromFlavor)(runFlavor); + const apkPath = (0, path_1.resolve)(pathToApk, apkName); + const nativeRunArgs = ['android', '--app', apkPath, '--target', target.id]; + if (selectedPorts) { + nativeRunArgs.push('--forward', `${selectedPorts}`); + } + debug('Invoking native-run with args: %O', nativeRunArgs); + await (0, common_1.runTask)(`Deploying ${colors_1.default.strong(apkName)} to ${colors_1.default.input(target.id)}`, async () => (0, native_run_1.runNativeRun)(nativeRunArgs)); +} +exports.runAndroid = runAndroid; diff --git a/node_modules/@capacitor/cli/dist/android/update.js b/node_modules/@capacitor/cli/dist/android/update.js new file mode 100644 index 0000000..76c80f3 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/android/update.js @@ -0,0 +1,323 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handleCordovaPluginsGradle = exports.installGradlePlugins = exports.updateAndroid = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const debug_1 = tslib_1.__importDefault(require("debug")); +const path_1 = require("path"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_1 = require("../common"); +const cordova_1 = require("../cordova"); +const errors_1 = require("../errors"); +const plugin_1 = require("../plugin"); +const copy_1 = require("../tasks/copy"); +const migrate_1 = require("../tasks/migrate"); +const fs_1 = require("../util/fs"); +const node_1 = require("../util/node"); +const template_1 = require("../util/template"); +const common_2 = require("./common"); +const platform = 'android'; +const debug = (0, debug_1.default)('capacitor:android:update'); +async function updateAndroid(config) { + const plugins = await getPluginsTask(config); + const capacitorPlugins = plugins.filter(p => (0, plugin_1.getPluginType)(p, platform) === 0 /* PluginType.Core */); + (0, plugin_1.printPlugins)(capacitorPlugins, 'android'); + await writePluginsJson(config, capacitorPlugins); + await removePluginsNativeFiles(config); + const cordovaPlugins = plugins.filter(p => (0, plugin_1.getPluginType)(p, platform) === 1 /* PluginType.Cordova */); + await (0, migrate_1.patchOldCapacitorPlugins)(config); + if (cordovaPlugins.length > 0) { + await copyPluginsNativeFiles(config, cordovaPlugins); + } + if (!(await (0, utils_fs_1.pathExists)(config.android.webDirAbs))) { + await (0, copy_1.copy)(config, platform); + } + await (0, cordova_1.handleCordovaPluginsJS)(cordovaPlugins, config, platform); + await (0, cordova_1.checkPluginDependencies)(plugins, platform); + await installGradlePlugins(config, capacitorPlugins, cordovaPlugins); + await handleCordovaPluginsGradle(config, cordovaPlugins); + await (0, cordova_1.writeCordovaAndroidManifest)(cordovaPlugins, config, platform); + const incompatibleCordovaPlugins = plugins.filter(p => (0, plugin_1.getPluginType)(p, platform) === 2 /* PluginType.Incompatible */); + (0, plugin_1.printPlugins)(incompatibleCordovaPlugins, platform, 'incompatible'); + await (0, common_1.checkPlatformVersions)(config, platform); +} +exports.updateAndroid = updateAndroid; +function getGradlePackageName(id) { + return id.replace('@', '').replace('/', '-'); +} +async function writePluginsJson(config, plugins) { + const classes = await findAndroidPluginClasses(plugins); + const pluginsJsonPath = (0, path_1.resolve)(config.android.assetsDirAbs, 'capacitor.plugins.json'); + await (0, utils_fs_1.writeJSON)(pluginsJsonPath, classes, { spaces: '\t' }); +} +async function findAndroidPluginClasses(plugins) { + const entries = []; + for (const plugin of plugins) { + entries.push(...(await findAndroidPluginClassesInPlugin(plugin))); + } + return entries; +} +async function findAndroidPluginClassesInPlugin(plugin) { + if (!plugin.android || (0, plugin_1.getPluginType)(plugin, platform) !== 0 /* PluginType.Core */) { + return []; + } + const srcPath = (0, path_1.resolve)(plugin.rootPath, plugin.android.path, 'src/main'); + const srcFiles = await (0, utils_fs_1.readdirp)(srcPath, { + filter: entry => !entry.stats.isDirectory() && + ['.java', '.kt'].includes((0, path_1.extname)(entry.path)), + }); + const classRegex = /^@(?:CapacitorPlugin|NativePlugin)[\s\S]+?class ([\w]+)/gm; + const packageRegex = /^package ([\w.]+);?$/gm; + debug('Searching %O source files in %O by %O regex', srcFiles.length, srcPath, classRegex); + const entries = await Promise.all(srcFiles.map(async (srcFile) => { + const srcFileContents = await (0, utils_fs_1.readFile)(srcFile, { encoding: 'utf-8' }); + classRegex.lastIndex = 0; + const classMatch = classRegex.exec(srcFileContents); + if (classMatch) { + const className = classMatch[1]; + debug('Searching %O for package by %O regex', srcFile, packageRegex); + packageRegex.lastIndex = 0; + const packageMatch = packageRegex.exec(srcFileContents.substring(0, classMatch.index)); + if (!packageMatch) { + (0, errors_1.fatal)(`Package could not be parsed from Android plugin.\n` + + `Location: ${colors_1.default.strong(srcFile)}`); + } + const packageName = packageMatch[1]; + const classpath = `${packageName}.${className}`; + debug('%O is a suitable plugin class', classpath); + return { + pkg: plugin.id, + classpath, + }; + } + })); + return entries.filter((entry) => !!entry); +} +async function installGradlePlugins(config, capacitorPlugins, cordovaPlugins) { + const capacitorAndroidPackagePath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor/android', 'package.json'); + if (!capacitorAndroidPackagePath) { + (0, errors_1.fatal)(`Unable to find ${colors_1.default.strong('node_modules/@capacitor/android')}.\n` + + `Are you sure ${colors_1.default.strong('@capacitor/android')} is installed?`); + } + const capacitorAndroidPath = (0, path_1.resolve)((0, path_1.dirname)(capacitorAndroidPackagePath), 'capacitor'); + const settingsPath = config.android.platformDirAbs; + const dependencyPath = config.android.appDirAbs; + const relativeCapcitorAndroidPath = (0, fs_1.convertToUnixPath)((0, path_1.relative)(settingsPath, capacitorAndroidPath)); + const settingsLines = `// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN +include ':capacitor-android' +project(':capacitor-android').projectDir = new File('${relativeCapcitorAndroidPath}') +${capacitorPlugins + .map(p => { + if (!p.android) { + return ''; + } + const relativePluginPath = (0, fs_1.convertToUnixPath)((0, path_1.relative)(settingsPath, p.rootPath)); + return ` +include ':${getGradlePackageName(p.id)}' +project(':${getGradlePackageName(p.id)}').projectDir = new File('${relativePluginPath}/${p.android.path}') +`; + }) + .join('')}`; + const applyArray = []; + const frameworksArray = []; + let prefsArray = []; + cordovaPlugins.map(p => { + const relativePluginPath = (0, fs_1.convertToUnixPath)((0, path_1.relative)(dependencyPath, p.rootPath)); + const frameworks = (0, plugin_1.getPlatformElement)(p, platform, 'framework'); + frameworks.map((framework) => { + if (framework.$.custom && + framework.$.custom === 'true' && + framework.$.type && + framework.$.type === 'gradleReference') { + applyArray.push(`apply from: "${relativePluginPath}/${framework.$.src}"`); + } + else if (!framework.$.type && !framework.$.custom) { + if (framework.$.src.startsWith('platform(')) { + frameworksArray.push(` implementation ${framework.$.src}`); + } + else { + frameworksArray.push(` implementation "${framework.$.src}"`); + } + } + }); + prefsArray = prefsArray.concat((0, plugin_1.getAllElements)(p, platform, 'preference')); + }); + let frameworkString = frameworksArray.join('\n'); + frameworkString = await replaceFrameworkVariables(config, prefsArray, frameworkString); + const dependencyLines = `// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN + +android { + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } +} + +apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle" +dependencies { +${capacitorPlugins + .map(p => { + return ` implementation project(':${getGradlePackageName(p.id)}')`; + }) + .join('\n')} +${frameworkString} +} +${applyArray.join('\n')} + +if (hasProperty('postBuildExtras')) { + postBuildExtras() +} +`; + await (0, utils_fs_1.writeFile)((0, path_1.join)(settingsPath, 'capacitor.settings.gradle'), settingsLines); + await (0, utils_fs_1.writeFile)((0, path_1.join)(dependencyPath, 'capacitor.build.gradle'), dependencyLines); +} +exports.installGradlePlugins = installGradlePlugins; +async function handleCordovaPluginsGradle(config, cordovaPlugins) { + var _a, _b, _c; + const pluginsGradlePath = (0, path_1.join)(config.android.cordovaPluginsDirAbs, 'build.gradle'); + const kotlinNeeded = await kotlinNeededCheck(config, cordovaPlugins); + const kotlinVersionString = (_c = (_b = (_a = config.app.extConfig.cordova) === null || _a === void 0 ? void 0 : _a.preferences) === null || _b === void 0 ? void 0 : _b.GradlePluginKotlinVersion) !== null && _c !== void 0 ? _c : '1.8.20'; + const frameworksArray = []; + let prefsArray = []; + const applyArray = []; + applyArray.push(`apply from: "cordova.variables.gradle"`); + cordovaPlugins.map(p => { + const relativePluginPath = (0, fs_1.convertToUnixPath)((0, path_1.relative)(config.android.cordovaPluginsDirAbs, p.rootPath)); + const frameworks = (0, plugin_1.getPlatformElement)(p, platform, 'framework'); + frameworks.map((framework) => { + if (!framework.$.type && !framework.$.custom) { + frameworksArray.push(framework.$.src); + } + else if (framework.$.custom && + framework.$.custom === 'true' && + framework.$.type && + framework.$.type === 'gradleReference') { + applyArray.push(`apply from: "${relativePluginPath}/${framework.$.src}"`); + } + }); + prefsArray = prefsArray.concat((0, plugin_1.getAllElements)(p, platform, 'preference')); + }); + let frameworkString = frameworksArray + .map(f => { + if (f.startsWith('platform(')) { + return ` implementation ${f}`; + } + else { + return ` implementation "${f}"`; + } + }) + .join('\n'); + frameworkString = await replaceFrameworkVariables(config, prefsArray, frameworkString); + if (kotlinNeeded) { + frameworkString += `\n implementation "androidx.core:core-ktx:$androidxCoreKTXVersion"`; + frameworkString += `\n implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"`; + } + const applyString = applyArray.join('\n'); + let buildGradle = await (0, utils_fs_1.readFile)(pluginsGradlePath, { encoding: 'utf-8' }); + buildGradle = buildGradle.replace(/(SUB-PROJECT DEPENDENCIES START)[\s\S]*(\/\/ SUB-PROJECT DEPENDENCIES END)/, '$1\n' + frameworkString.concat('\n') + ' $2'); + buildGradle = buildGradle.replace(/(PLUGIN GRADLE EXTENSIONS START)[\s\S]*(\/\/ PLUGIN GRADLE EXTENSIONS END)/, '$1\n' + applyString.concat('\n') + '$2'); + if (kotlinNeeded) { + buildGradle = buildGradle.replace(/(buildscript\s{\n(\t|\s{4})repositories\s{\n((\t{2}|\s{8}).+\n)+(\t|\s{4})}\n(\t|\s{4})dependencies\s{\n(\t{2}|\s{8}).+)\n((\t|\s{4})}\n}\n)/, `$1\n classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"\n$8`); + buildGradle = buildGradle.replace(/(ext\s{)/, `$1\n androidxCoreKTXVersion = project.hasProperty('androidxCoreKTXVersion') ? rootProject.ext.androidxCoreKTXVersion : '1.8.0'`); + buildGradle = buildGradle.replace(/(buildscript\s{)/, `$1\n ext.kotlin_version = project.hasProperty('kotlin_version') ? rootProject.ext.kotlin_version : '${kotlinVersionString}'`); + buildGradle = buildGradle.replace(/(apply\splugin:\s'com\.android\.library')/, `$1\napply plugin: 'kotlin-android'`); + buildGradle = buildGradle.replace(/(compileOptions\s{\n((\t{2}|\s{8}).+\n)+(\t|\s{4})})\n(})/, `$1\n sourceSets {\n main.java.srcDirs += 'src/main/kotlin'\n }\n$5`); + } + await (0, utils_fs_1.writeFile)(pluginsGradlePath, buildGradle); + const cordovaVariables = `// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN +ext { + cdvMinSdkVersion = project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : ${config.android.minVersion} + // Plugin gradle extensions can append to this to have code run at the end. + cdvPluginPostBuildExtras = [] + cordovaConfig = [:] +}`; + await (0, utils_fs_1.writeFile)((0, path_1.join)(config.android.cordovaPluginsDirAbs, 'cordova.variables.gradle'), cordovaVariables); +} +exports.handleCordovaPluginsGradle = handleCordovaPluginsGradle; +async function kotlinNeededCheck(config, cordovaPlugins) { + var _a, _b; + if (((_b = (_a = config.app.extConfig.cordova) === null || _a === void 0 ? void 0 : _a.preferences) === null || _b === void 0 ? void 0 : _b.GradlePluginKotlinEnabled) !== + 'true') { + for (const plugin of cordovaPlugins) { + const androidPlatform = (0, plugin_1.getPluginPlatform)(plugin, platform); + const sourceFiles = androidPlatform['source-file']; + if (sourceFiles) { + for (const srcFile of sourceFiles) { + if (/^.*\.kt$/.test(srcFile['$'].src)) { + return true; + } + } + } + } + return false; + } + else { + return true; + } +} +async function copyPluginsNativeFiles(config, cordovaPlugins) { + const pluginsPath = (0, path_1.join)(config.android.cordovaPluginsDirAbs, 'src', 'main'); + for (const p of cordovaPlugins) { + const androidPlatform = (0, plugin_1.getPluginPlatform)(p, platform); + if (androidPlatform) { + const sourceFiles = androidPlatform['source-file']; + if (sourceFiles) { + for (const sourceFile of sourceFiles) { + const fileName = sourceFile.$.src.split('/').pop(); + let baseFolder = 'java/'; + if (fileName.split('.').pop() === 'aidl') { + baseFolder = 'aidl/'; + } + const target = sourceFile.$['target-dir'] + .replace('app/src/main/', '') + .replace('src/', baseFolder); + await (0, utils_fs_1.copy)((0, plugin_1.getFilePath)(config, p, sourceFile.$.src), (0, path_1.join)(pluginsPath, target, fileName)); + } + } + const resourceFiles = androidPlatform['resource-file']; + if (resourceFiles) { + for (const resourceFile of resourceFiles) { + const target = resourceFile.$['target']; + if (resourceFile.$.src.split('.').pop() === 'aar') { + await (0, utils_fs_1.copy)((0, plugin_1.getFilePath)(config, p, resourceFile.$.src), (0, path_1.join)(pluginsPath, 'libs', target.split('/').pop())); + } + else if (target !== '.') { + await (0, utils_fs_1.copy)((0, plugin_1.getFilePath)(config, p, resourceFile.$.src), (0, path_1.join)(pluginsPath, target)); + } + } + } + const libFiles = (0, plugin_1.getPlatformElement)(p, platform, 'lib-file'); + for (const libFile of libFiles) { + await (0, utils_fs_1.copy)((0, plugin_1.getFilePath)(config, p, libFile.$.src), (0, path_1.join)(pluginsPath, 'libs', libFile.$.src.split('/').pop())); + } + } + } +} +async function removePluginsNativeFiles(config) { + await (0, utils_fs_1.remove)(config.android.cordovaPluginsDirAbs); + await (0, template_1.extractTemplate)(config.cli.assets.android.cordovaPluginsTemplateArchiveAbs, config.android.cordovaPluginsDirAbs); +} +async function getPluginsTask(config) { + return await (0, common_1.runTask)('Updating Android plugins', async () => { + const allPlugins = await (0, plugin_1.getPlugins)(config, 'android'); + const androidPlugins = await (0, common_2.getAndroidPlugins)(allPlugins); + return androidPlugins; + }); +} +async function getVariablesGradleFile(config) { + const variablesFile = (0, path_1.resolve)(config.android.platformDirAbs, 'variables.gradle'); + let variablesGradle = ''; + if (await (0, utils_fs_1.pathExists)(variablesFile)) { + variablesGradle = await (0, utils_fs_1.readFile)(variablesFile, { encoding: 'utf-8' }); + } + return variablesGradle; +} +async function replaceFrameworkVariables(config, prefsArray, frameworkString) { + const variablesGradle = await getVariablesGradleFile(config); + prefsArray.map((preference) => { + if (!variablesGradle.includes(preference.$.name)) { + frameworkString = frameworkString.replace(new RegExp(('$' + preference.$.name).replace('$', '\\$&'), 'g'), preference.$.default); + } + }); + return frameworkString; +} diff --git a/node_modules/@capacitor/cli/dist/colors.js b/node_modules/@capacitor/cli/dist/colors.js new file mode 100644 index 0000000..8fe2c66 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/colors.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ancillary = exports.failure = exports.success = exports.input = exports.weak = exports.strong = void 0; +const tslib_1 = require("tslib"); +const kleur_1 = tslib_1.__importDefault(require("kleur")); +exports.strong = kleur_1.default.bold; +exports.weak = kleur_1.default.dim; +exports.input = kleur_1.default.cyan; +exports.success = kleur_1.default.green; +exports.failure = kleur_1.default.red; +exports.ancillary = kleur_1.default.cyan; +const COLORS = { + strong: exports.strong, + weak: exports.weak, + input: exports.input, + success: exports.success, + failure: exports.failure, + ancillary: exports.ancillary, + log: { + DEBUG: kleur_1.default.magenta, + INFO: kleur_1.default.cyan, + WARN: kleur_1.default.yellow, + ERROR: kleur_1.default.red, + }, +}; +exports.default = COLORS; diff --git a/node_modules/@capacitor/cli/dist/common.js b/node_modules/@capacitor/cli/dist/common.js new file mode 100644 index 0000000..9b7fa42 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/common.js @@ -0,0 +1,398 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseApkNameFromFlavor = exports.checkJDKMajorVersion = exports.resolvePlatform = exports.checkPlatformVersions = exports.getAddedPlatforms = exports.getPlatformTargetName = exports.promptForPlatformTarget = exports.promptForPlatform = exports.isValidEnterprisePlatform = exports.getKnownEnterprisePlatforms = exports.isValidCommunityPlatform = exports.getKnownCommunityPlatforms = exports.isValidPlatform = exports.getKnownPlatforms = exports.selectPlatforms = exports.getProjectPlatformDirectory = exports.getCLIVersion = exports.getCoreVersion = exports.getCapacitorPackageVersion = exports.requireCapacitorPackage = exports.getCapacitorPackage = exports.runTask = exports.runPlatformHook = exports.wait = exports.checkAppName = exports.checkAppId = exports.checkAppDir = exports.checkAppConfig = exports.checkCapacitorPlatform = exports.checkPackage = exports.checkWebDir = exports.check = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const utils_terminal_1 = require("@ionic/utils-terminal"); +const path_1 = require("path"); +const colors_1 = tslib_1.__importDefault(require("./colors")); +const errors_1 = require("./errors"); +const log_1 = require("./log"); +const monorepotools_1 = require("./util/monorepotools"); +const node_1 = require("./util/node"); +const subprocess_1 = require("./util/subprocess"); +async function check(checks) { + const results = await Promise.all(checks.map(f => f())); + const errors = results.filter(r => r != null); + if (errors.length > 0) { + throw errors.join('\n'); + } +} +exports.check = check; +async function checkWebDir(config) { + var _a; + // We can skip checking the web dir if a server URL is set. + if ((_a = config.app.extConfig.server) === null || _a === void 0 ? void 0 : _a.url) { + return null; + } + const invalidFolders = ['', '.', '..', '../', './']; + if (invalidFolders.includes(config.app.webDir)) { + return `"${config.app.webDir}" is not a valid value for webDir`; + } + if (!(await (0, utils_fs_1.pathExists)(config.app.webDirAbs))) { + return (`Could not find the web assets directory: ${colors_1.default.strong((0, utils_terminal_1.prettyPath)(config.app.webDirAbs))}.\n` + + `Please create it and make sure it has an ${colors_1.default.strong('index.html')} file. You can change the path of this directory in ${colors_1.default.strong(config.app.extConfigName)} (${colors_1.default.input('webDir')} option). You may need to compile the web assets for your app (typically ${colors_1.default.input('npm run build')}). More info: ${colors_1.default.strong('https://capacitorjs.com/docs/basics/workflow#sync-your-project')}`); + } + if (!(await (0, utils_fs_1.pathExists)((0, path_1.join)(config.app.webDirAbs, 'index.html')))) { + return (`The web assets directory (${colors_1.default.strong((0, utils_terminal_1.prettyPath)(config.app.webDirAbs))}) must contain an ${colors_1.default.strong('index.html')} file.\n` + + `It will be the entry point for the web portion of the Capacitor app.`); + } + return null; +} +exports.checkWebDir = checkWebDir; +async function checkPackage() { + if (!(await (0, utils_fs_1.pathExists)('package.json'))) { + if (await (0, utils_fs_1.pathExists)('project.json')) { + return null; + } + else { + return (`The Capacitor CLI needs to run at the root of an npm package or in a valid NX monorepo.\n` + + `Make sure you have a package.json or project.json file in the directory where you run the Capacitor CLI.\n` + + `More info: ${colors_1.default.strong('https://docs.npmjs.com/cli/init')}`); + } + } + return null; +} +exports.checkPackage = checkPackage; +async function checkCapacitorPlatform(config, platform) { + const pkg = await getCapacitorPackage(config, platform); + if (!pkg) { + return (`Could not find the ${colors_1.default.input(platform)} platform.\n` + + `You must install it in your project first, e.g. w/ ${colors_1.default.input(`npm install @capacitor/${platform}`)}`); + } + return null; +} +exports.checkCapacitorPlatform = checkCapacitorPlatform; +async function checkAppConfig(config) { + if (!config.app.appId) { + return (`Missing ${colors_1.default.input('appId')} for new platform.\n` + + `Please add it in ${config.app.extConfigName} or run ${colors_1.default.input('npx cap init')}.`); + } + if (!config.app.appName) { + return (`Missing ${colors_1.default.input('appName')} for new platform.\n` + + `Please add it in ${config.app.extConfigName} or run ${colors_1.default.input('npx cap init')}.`); + } + const appIdError = await checkAppId(config, config.app.appId); + if (appIdError) { + return appIdError; + } + const appNameError = await checkAppName(config, config.app.appName); + if (appNameError) { + return appNameError; + } + return null; +} +exports.checkAppConfig = checkAppConfig; +async function checkAppDir(config, dir) { + if (!/^\S*$/.test(dir)) { + return `Your app directory should not contain spaces`; + } + return null; +} +exports.checkAppDir = checkAppDir; +async function checkAppId(config, id) { + if (!id) { + return `Invalid App ID. Must be in Java package form with no dashes (ex: com.example.app)`; + } + if (/^[a-z][a-z0-9_]*(\.[a-z0-9_]+)+$/.test(id.toLowerCase())) { + return null; + } + return `Invalid App ID "${id}". Must be in Java package form with no dashes (ex: com.example.app)`; +} +exports.checkAppId = checkAppId; +async function checkAppName(config, name) { + // We allow pretty much anything right now, have fun + if (!(name === null || name === void 0 ? void 0 : name.length)) { + return `Must provide an app name. For example: 'Spacebook'`; + } + return null; +} +exports.checkAppName = checkAppName; +async function wait(time) { + return new Promise(resolve => setTimeout(resolve, time)); +} +exports.wait = wait; +async function runPlatformHook(config, platformName, platformDir, hook) { + var _a; + const { spawn } = await Promise.resolve().then(() => tslib_1.__importStar(require('child_process'))); + let pkg; + if ((0, monorepotools_1.isNXMonorepo)(platformDir)) { + pkg = await (0, utils_fs_1.readJSON)((0, path_1.join)((0, monorepotools_1.findNXMonorepoRoot)(platformDir), 'package.json')); + } + else { + pkg = await (0, utils_fs_1.readJSON)((0, path_1.join)(platformDir, 'package.json')); + } + const cmd = (_a = pkg.scripts) === null || _a === void 0 ? void 0 : _a[hook]; + if (!cmd) { + return; + } + return new Promise((resolve, reject) => { + const p = spawn(cmd, { + stdio: 'inherit', + shell: true, + cwd: platformDir, + env: { + INIT_CWD: platformDir, + CAPACITOR_ROOT_DIR: config.app.rootDir, + CAPACITOR_WEB_DIR: config.app.webDirAbs, + CAPACITOR_CONFIG: JSON.stringify(config.app.extConfig), + CAPACITOR_PLATFORM_NAME: platformName, + ...process.env, + }, + }); + p.on('close', () => { + resolve(); + }); + p.on('error', err => { + reject(err); + }); + }); +} +exports.runPlatformHook = runPlatformHook; +async function runTask(title, fn) { + const chain = log_1.output.createTaskChain(); + chain.next(title); + try { + const value = await fn(); + chain.end(); + return value; + } + catch (e) { + chain.fail(); + throw e; + } +} +exports.runTask = runTask; +async function getCapacitorPackage(config, name) { + const packagePath = (0, node_1.resolveNode)(config.app.rootDir, `@capacitor/${name}`, 'package.json'); + if (!packagePath) { + return null; + } + return (0, utils_fs_1.readJSON)(packagePath); +} +exports.getCapacitorPackage = getCapacitorPackage; +async function requireCapacitorPackage(config, name) { + const pkg = await getCapacitorPackage(config, name); + if (!pkg) { + (0, errors_1.fatal)(`Unable to find node_modules/@capacitor/${name}.\n` + + `Are you sure ${colors_1.default.strong(`@capacitor/${name}`)} is installed?`); + } + return pkg; +} +exports.requireCapacitorPackage = requireCapacitorPackage; +async function getCapacitorPackageVersion(config, platform) { + return (await requireCapacitorPackage(config, platform)).version; +} +exports.getCapacitorPackageVersion = getCapacitorPackageVersion; +async function getCoreVersion(config) { + return getCapacitorPackageVersion(config, 'core'); +} +exports.getCoreVersion = getCoreVersion; +async function getCLIVersion(config) { + return getCapacitorPackageVersion(config, 'cli'); +} +exports.getCLIVersion = getCLIVersion; +function getPlatformDirectory(config, platform) { + switch (platform) { + case 'android': + return config.android.platformDirAbs; + case 'ios': + return config.ios.platformDirAbs; + case 'web': + return config.web.platformDirAbs; + } + return null; +} +async function getProjectPlatformDirectory(config, platform) { + const platformPath = getPlatformDirectory(config, platform); + if (platformPath && (await (0, utils_fs_1.pathExists)(platformPath))) { + return platformPath; + } + return null; +} +exports.getProjectPlatformDirectory = getProjectPlatformDirectory; +async function selectPlatforms(config, selectedPlatformName) { + if (selectedPlatformName) { + // already passed in a platform name + const platformName = selectedPlatformName.toLowerCase().trim(); + if (!(await isValidPlatform(platformName))) { + (0, errors_1.fatal)(`Invalid platform: ${colors_1.default.input(platformName)}`); + } + else if (!(await getProjectPlatformDirectory(config, platformName))) { + if (platformName === 'web') { + (0, errors_1.fatal)(`Could not find the web platform directory.\n` + + `Make sure ${colors_1.default.strong(config.app.webDir)} exists.`); + } + (0, errors_1.fatal)(`${colors_1.default.strong(platformName)} platform has not been added yet.\n` + + `See the docs for adding the ${colors_1.default.strong(platformName)} platform: ${colors_1.default.strong(`https://capacitorjs.com/docs/${platformName}#adding-the-${platformName}-platform`)}`); + } + // return the platform in an string array + return [platformName]; + } + // wasn't given a platform name, so let's + // get the platforms that have already been created + return getAddedPlatforms(config); +} +exports.selectPlatforms = selectPlatforms; +async function getKnownPlatforms() { + return ['web', 'android', 'ios']; +} +exports.getKnownPlatforms = getKnownPlatforms; +async function isValidPlatform(platform) { + return (await getKnownPlatforms()).includes(platform); +} +exports.isValidPlatform = isValidPlatform; +async function getKnownCommunityPlatforms() { + return ['electron']; +} +exports.getKnownCommunityPlatforms = getKnownCommunityPlatforms; +async function isValidCommunityPlatform(platform) { + return (await getKnownCommunityPlatforms()).includes(platform); +} +exports.isValidCommunityPlatform = isValidCommunityPlatform; +async function getKnownEnterprisePlatforms() { + return ['windows']; +} +exports.getKnownEnterprisePlatforms = getKnownEnterprisePlatforms; +async function isValidEnterprisePlatform(platform) { + return (await getKnownEnterprisePlatforms()).includes(platform); +} +exports.isValidEnterprisePlatform = isValidEnterprisePlatform; +async function promptForPlatform(platforms, promptMessage, selectedPlatformName) { + const { prompt } = await Promise.resolve().then(() => tslib_1.__importStar(require('prompts'))); + if (!selectedPlatformName) { + const answers = await prompt([ + { + type: 'select', + name: 'mode', + message: promptMessage, + choices: platforms.map(p => ({ title: p, value: p })), + }, + ], { onCancel: () => process.exit(1) }); + return answers.mode.toLowerCase().trim(); + } + const platformName = selectedPlatformName.toLowerCase().trim(); + if (!(await isValidPlatform(platformName))) { + const knownPlatforms = await getKnownPlatforms(); + (0, errors_1.fatal)(`Invalid platform: ${colors_1.default.input(platformName)}.\n` + + `Valid platforms include: ${knownPlatforms.join(', ')}`); + } + return platformName; +} +exports.promptForPlatform = promptForPlatform; +async function promptForPlatformTarget(targets, selectedTarget) { + const { prompt } = await Promise.resolve().then(() => tslib_1.__importStar(require('prompts'))); + const validTargets = targets.filter(t => t.id !== undefined); + if (!selectedTarget) { + if (validTargets.length === 1) { + return validTargets[0]; + } + else { + const answers = await prompt([ + { + type: 'select', + name: 'target', + message: 'Please choose a target device:', + choices: validTargets.map(t => ({ + title: `${getPlatformTargetName(t)} (${t.id})`, + value: t, + })), + }, + ], { onCancel: () => process.exit(1) }); + return answers.target; + } + } + const targetID = selectedTarget.trim(); + const target = targets.find(t => t.id === targetID); + if (!target) { + (0, errors_1.fatal)(`Invalid target ID: ${colors_1.default.input(targetID)}.\n` + + `Valid targets are: ${targets.map(t => t.id).join(', ')}`); + } + return target; +} +exports.promptForPlatformTarget = promptForPlatformTarget; +function getPlatformTargetName(target) { + var _a, _b, _c; + return `${(_c = (_b = (_a = target.name) !== null && _a !== void 0 ? _a : target.model) !== null && _b !== void 0 ? _b : target.id) !== null && _c !== void 0 ? _c : '?'}${target.virtual + ? ` (${target.platform === 'ios' ? 'simulator' : 'emulator'})` + : ''}`; +} +exports.getPlatformTargetName = getPlatformTargetName; +async function getAddedPlatforms(config) { + const platforms = []; + if (await getProjectPlatformDirectory(config, config.android.name)) { + platforms.push(config.android.name); + } + if (await getProjectPlatformDirectory(config, config.ios.name)) { + platforms.push(config.ios.name); + } + platforms.push(config.web.name); + return platforms; +} +exports.getAddedPlatforms = getAddedPlatforms; +async function checkPlatformVersions(config, platform) { + const semver = await Promise.resolve().then(() => tslib_1.__importStar(require('semver'))); + const coreVersion = await getCoreVersion(config); + const platformVersion = await getCapacitorPackageVersion(config, platform); + if (semver.diff(coreVersion, platformVersion) === 'minor' || + semver.diff(coreVersion, platformVersion) === 'major') { + log_1.logger.warn(`${colors_1.default.strong('@capacitor/core')}${colors_1.default.weak(`@${coreVersion}`)} version doesn't match ${colors_1.default.strong(`@capacitor/${platform}`)}${colors_1.default.weak(`@${platformVersion}`)} version.\n` + + `Consider updating to a matching version, e.g. w/ ${colors_1.default.input(`npm install @capacitor/core@${platformVersion}`)}`); + } +} +exports.checkPlatformVersions = checkPlatformVersions; +function resolvePlatform(config, platform) { + if (platform[0] !== '@') { + const core = (0, node_1.resolveNode)(config.app.rootDir, `@capacitor/${platform}`, 'package.json'); + if (core) { + return (0, path_1.dirname)(core); + } + const community = (0, node_1.resolveNode)(config.app.rootDir, `@capacitor-community/${platform}`, 'package.json'); + if (community) { + return (0, path_1.dirname)(community); + } + const enterprise = (0, node_1.resolveNode)(config.app.rootDir, `@ionic-enterprise/capacitor-${platform}`, 'package.json'); + if (enterprise) { + return (0, path_1.dirname)(enterprise); + } + } + // third-party + const thirdParty = (0, node_1.resolveNode)(config.app.rootDir, platform, 'package.json'); + if (thirdParty) { + return (0, path_1.dirname)(thirdParty); + } + return null; +} +exports.resolvePlatform = resolvePlatform; +async function checkJDKMajorVersion() { + try { + const string = await (0, subprocess_1.runCommand)('java', ['--version']); + const versionRegex = RegExp(/([0-9]+)\.?([0-9]*)\.?([0-9]*)/); + const versionMatch = versionRegex.exec(string); + if (versionMatch === null) { + return -1; + } + const firstVersionNumber = parseInt(versionMatch[1]); + const secondVersionNumber = parseInt(versionMatch[2]); + if (typeof firstVersionNumber === 'number' && firstVersionNumber != 1) { + return firstVersionNumber; + } + else if (typeof secondVersionNumber === 'number' && + firstVersionNumber == 1 && + secondVersionNumber < 9) { + return secondVersionNumber; + } + else { + return -1; + } + } + catch (e) { + return -1; + } +} +exports.checkJDKMajorVersion = checkJDKMajorVersion; +function parseApkNameFromFlavor(flavor) { + const convertedName = flavor.replace(/([A-Z])/g, '$1').toLowerCase(); + return `app-${convertedName ? `${convertedName}-` : ''}debug.apk`; +} +exports.parseApkNameFromFlavor = parseApkNameFromFlavor; diff --git a/node_modules/@capacitor/cli/dist/config.js b/node_modules/@capacitor/cli/dist/config.js new file mode 100644 index 0000000..1773a7e --- /dev/null +++ b/node_modules/@capacitor/cli/dist/config.js @@ -0,0 +1,396 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.checkExternalConfig = exports.writeConfig = exports.loadConfig = exports.CONFIG_FILE_NAME_JSON = exports.CONFIG_FILE_NAME_JS = exports.CONFIG_FILE_NAME_TS = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const debug_1 = tslib_1.__importDefault(require("debug")); +const path_1 = require("path"); +const colors_1 = tslib_1.__importDefault(require("./colors")); +const common_1 = require("./common"); +const errors_1 = require("./errors"); +const log_1 = require("./log"); +const fn_1 = require("./util/fn"); +const js_1 = require("./util/js"); +const monorepotools_1 = require("./util/monorepotools"); +const node_1 = require("./util/node"); +const promise_1 = require("./util/promise"); +const subprocess_1 = require("./util/subprocess"); +const debug = (0, debug_1.default)('capacitor:config'); +exports.CONFIG_FILE_NAME_TS = 'capacitor.config.ts'; +exports.CONFIG_FILE_NAME_JS = 'capacitor.config.js'; +exports.CONFIG_FILE_NAME_JSON = 'capacitor.config.json'; +async function loadConfig() { + var _a, _b, _c, _d; + const appRootDir = process.cwd(); + const cliRootDir = (0, path_1.dirname)(__dirname); + const conf = await loadExtConfig(appRootDir); + const depsForNx = await (async () => { + var _a, _b; + if ((0, monorepotools_1.isNXMonorepo)(appRootDir)) { + const rootOfNXMonorepo = (0, monorepotools_1.findNXMonorepoRoot)(appRootDir); + const pkgJSONOfMonorepoRoot = await (0, fn_1.tryFn)(utils_fs_1.readJSON, (0, path_1.resolve)(rootOfNXMonorepo, 'package.json')); + const devDependencies = (_a = pkgJSONOfMonorepoRoot === null || pkgJSONOfMonorepoRoot === void 0 ? void 0 : pkgJSONOfMonorepoRoot.devDependencies) !== null && _a !== void 0 ? _a : {}; + const dependencies = (_b = pkgJSONOfMonorepoRoot === null || pkgJSONOfMonorepoRoot === void 0 ? void 0 : pkgJSONOfMonorepoRoot.dependencies) !== null && _b !== void 0 ? _b : {}; + return { + devDependencies, + dependencies, + }; + } + return {}; + })(); + const appId = (_a = conf.extConfig.appId) !== null && _a !== void 0 ? _a : ''; + const appName = (_b = conf.extConfig.appName) !== null && _b !== void 0 ? _b : ''; + const webDir = (_c = conf.extConfig.webDir) !== null && _c !== void 0 ? _c : 'www'; + const cli = await loadCLIConfig(cliRootDir); + const config = { + android: await loadAndroidConfig(appRootDir, conf.extConfig, cli), + ios: await loadIOSConfig(appRootDir, conf.extConfig), + web: await loadWebConfig(appRootDir, webDir), + cli, + app: { + rootDir: appRootDir, + appId, + appName, + webDir, + webDirAbs: (0, path_1.resolve)(appRootDir, webDir), + package: (_d = (await (0, fn_1.tryFn)(utils_fs_1.readJSON, (0, path_1.resolve)(appRootDir, 'package.json')))) !== null && _d !== void 0 ? _d : { + name: appName, + version: '1.0.0', + ...depsForNx, + }, + ...conf, + }, + }; + debug('config: %O', config); + return config; +} +exports.loadConfig = loadConfig; +async function writeConfig(extConfig, extConfigFilePath) { + switch ((0, path_1.extname)(extConfigFilePath)) { + case '.json': { + await (0, utils_fs_1.writeJSON)(extConfigFilePath, extConfig, { spaces: 2 }); + break; + } + case '.ts': { + await (0, utils_fs_1.writeFile)(extConfigFilePath, formatConfigTS(extConfig)); + break; + } + } +} +exports.writeConfig = writeConfig; +async function loadExtConfigTS(rootDir, extConfigName, extConfigFilePath) { + var _a, _b; + try { + const tsPath = (0, node_1.resolveNode)(rootDir, 'typescript'); + if (!tsPath) { + (0, errors_1.fatal)('Could not find installation of TypeScript.\n' + + `To use ${colors_1.default.strong(extConfigName)} files, you must install TypeScript in your project, e.g. w/ ${colors_1.default.input('npm install -D typescript')}`); + } + const ts = require(tsPath); // eslint-disable-line @typescript-eslint/no-var-requires + const extConfigObject = (0, node_1.requireTS)(ts, extConfigFilePath); + const extConfig = (_a = extConfigObject.default) !== null && _a !== void 0 ? _a : extConfigObject; + return { + extConfigType: 'ts', + extConfigName, + extConfigFilePath: extConfigFilePath, + extConfig, + }; + } + catch (e) { + if (!(0, errors_1.isFatal)(e)) { + (0, errors_1.fatal)(`Parsing ${colors_1.default.strong(extConfigName)} failed.\n\n${(_b = e.stack) !== null && _b !== void 0 ? _b : e}`); + } + throw e; + } +} +async function loadExtConfigJS(rootDir, extConfigName, extConfigFilePath) { + var _a; + try { + return { + extConfigType: 'js', + extConfigName, + extConfigFilePath: extConfigFilePath, + extConfig: require(extConfigFilePath), + }; + } + catch (e) { + (0, errors_1.fatal)(`Parsing ${colors_1.default.strong(extConfigName)} failed.\n\n${(_a = e.stack) !== null && _a !== void 0 ? _a : e}`); + } +} +async function loadExtConfig(rootDir) { + var _a; + const extConfigFilePathTS = (0, path_1.resolve)(rootDir, exports.CONFIG_FILE_NAME_TS); + if (await (0, utils_fs_1.pathExists)(extConfigFilePathTS)) { + return loadExtConfigTS(rootDir, exports.CONFIG_FILE_NAME_TS, extConfigFilePathTS); + } + const extConfigFilePathJS = (0, path_1.resolve)(rootDir, exports.CONFIG_FILE_NAME_JS); + if (await (0, utils_fs_1.pathExists)(extConfigFilePathJS)) { + return loadExtConfigJS(rootDir, exports.CONFIG_FILE_NAME_JS, extConfigFilePathJS); + } + const extConfigFilePath = (0, path_1.resolve)(rootDir, exports.CONFIG_FILE_NAME_JSON); + return { + extConfigType: 'json', + extConfigName: exports.CONFIG_FILE_NAME_JSON, + extConfigFilePath: extConfigFilePath, + extConfig: (_a = (await (0, fn_1.tryFn)(utils_fs_1.readJSON, extConfigFilePath))) !== null && _a !== void 0 ? _a : {}, + }; +} +async function loadCLIConfig(rootDir) { + const assetsDir = 'assets'; + const assetsDirAbs = (0, path_1.join)(rootDir, assetsDir); + const iosPlatformTemplateArchive = 'ios-template.tar.gz'; + const iosCordovaPluginsTemplateArchive = 'capacitor-cordova-ios-plugins.tar.gz'; + const androidPlatformTemplateArchive = 'android-template.tar.gz'; + const androidCordovaPluginsTemplateArchive = 'capacitor-cordova-android-plugins.tar.gz'; + return { + rootDir, + assetsDir, + assetsDirAbs, + assets: { + ios: { + platformTemplateArchive: iosPlatformTemplateArchive, + platformTemplateArchiveAbs: (0, path_1.resolve)(assetsDirAbs, iosPlatformTemplateArchive), + cordovaPluginsTemplateArchive: iosCordovaPluginsTemplateArchive, + cordovaPluginsTemplateArchiveAbs: (0, path_1.resolve)(assetsDirAbs, iosCordovaPluginsTemplateArchive), + }, + android: { + platformTemplateArchive: androidPlatformTemplateArchive, + platformTemplateArchiveAbs: (0, path_1.resolve)(assetsDirAbs, androidPlatformTemplateArchive), + cordovaPluginsTemplateArchive: androidCordovaPluginsTemplateArchive, + cordovaPluginsTemplateArchiveAbs: (0, path_1.resolve)(assetsDirAbs, androidCordovaPluginsTemplateArchive), + }, + }, + package: await (0, utils_fs_1.readJSON)((0, path_1.resolve)(rootDir, 'package.json')), + os: determineOS(process.platform), + }; +} +async function loadAndroidConfig(rootDir, extConfig, cliConfig) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s; + const name = 'android'; + const platformDir = (_b = (_a = extConfig.android) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : 'android'; + const platformDirAbs = (0, path_1.resolve)(rootDir, platformDir); + const appDir = 'app'; + const srcDir = `${appDir}/src`; + const srcMainDir = `${srcDir}/main`; + const assetsDir = `${srcMainDir}/assets`; + const webDir = `${assetsDir}/public`; + const resDir = `${srcMainDir}/res`; + let apkPath = `${appDir}/build/outputs/apk/`; + const flavor = ((_c = extConfig.android) === null || _c === void 0 ? void 0 : _c.flavor) || ''; + if ((_d = extConfig.android) === null || _d === void 0 ? void 0 : _d.flavor) { + apkPath = `${apkPath}/${(_e = extConfig.android) === null || _e === void 0 ? void 0 : _e.flavor}`; + } + const apkName = (0, common_1.parseApkNameFromFlavor)(flavor); + const buildOutputDir = `${apkPath}/debug`; + const cordovaPluginsDir = 'capacitor-cordova-android-plugins'; + const studioPath = (0, promise_1.lazy)(() => determineAndroidStudioPath(cliConfig.os)); + const buildOptions = { + keystorePath: (_g = (_f = extConfig.android) === null || _f === void 0 ? void 0 : _f.buildOptions) === null || _g === void 0 ? void 0 : _g.keystorePath, + keystorePassword: (_j = (_h = extConfig.android) === null || _h === void 0 ? void 0 : _h.buildOptions) === null || _j === void 0 ? void 0 : _j.keystorePassword, + keystoreAlias: (_l = (_k = extConfig.android) === null || _k === void 0 ? void 0 : _k.buildOptions) === null || _l === void 0 ? void 0 : _l.keystoreAlias, + keystoreAliasPassword: (_o = (_m = extConfig.android) === null || _m === void 0 ? void 0 : _m.buildOptions) === null || _o === void 0 ? void 0 : _o.keystoreAliasPassword, + signingType: (_q = (_p = extConfig.android) === null || _p === void 0 ? void 0 : _p.buildOptions) === null || _q === void 0 ? void 0 : _q.signingType, + releaseType: (_s = (_r = extConfig.android) === null || _r === void 0 ? void 0 : _r.buildOptions) === null || _s === void 0 ? void 0 : _s.releaseType, + }; + return { + name, + minVersion: '22', + studioPath, + platformDir, + platformDirAbs, + cordovaPluginsDir, + cordovaPluginsDirAbs: (0, path_1.resolve)(platformDirAbs, cordovaPluginsDir), + appDir, + appDirAbs: (0, path_1.resolve)(platformDirAbs, appDir), + srcDir, + srcDirAbs: (0, path_1.resolve)(platformDirAbs, srcDir), + srcMainDir, + srcMainDirAbs: (0, path_1.resolve)(platformDirAbs, srcMainDir), + assetsDir, + assetsDirAbs: (0, path_1.resolve)(platformDirAbs, assetsDir), + webDir, + webDirAbs: (0, path_1.resolve)(platformDirAbs, webDir), + resDir, + resDirAbs: (0, path_1.resolve)(platformDirAbs, resDir), + apkName, + buildOutputDir, + buildOutputDirAbs: (0, path_1.resolve)(platformDirAbs, buildOutputDir), + flavor, + buildOptions, + }; +} +async function loadIOSConfig(rootDir, extConfig) { + var _a, _b, _c, _d; + const name = 'ios'; + const platformDir = (_b = (_a = extConfig.ios) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : 'ios'; + const platformDirAbs = (0, path_1.resolve)(rootDir, platformDir); + const scheme = (_d = (_c = extConfig.ios) === null || _c === void 0 ? void 0 : _c.scheme) !== null && _d !== void 0 ? _d : 'App'; + const nativeProjectDir = 'App'; + const nativeProjectDirAbs = (0, path_1.resolve)(platformDirAbs, nativeProjectDir); + const nativeTargetDir = `${nativeProjectDir}/App`; + const nativeTargetDirAbs = (0, path_1.resolve)(platformDirAbs, nativeTargetDir); + const nativeXcodeProjDir = `${nativeProjectDir}/App.xcodeproj`; + const nativeXcodeProjDirAbs = (0, path_1.resolve)(platformDirAbs, nativeXcodeProjDir); + const nativeXcodeWorkspaceDirAbs = (0, promise_1.lazy)(() => determineXcodeWorkspaceDirAbs(nativeProjectDirAbs)); + const podPath = (0, promise_1.lazy)(() => determineGemfileOrCocoapodPath(rootDir, platformDirAbs, nativeProjectDirAbs)); + const webDirAbs = (0, promise_1.lazy)(() => determineIOSWebDirAbs(nativeProjectDirAbs, nativeTargetDirAbs, nativeXcodeProjDirAbs)); + const cordovaPluginsDir = 'capacitor-cordova-ios-plugins'; + return { + name, + minVersion: '13.0', + platformDir, + platformDirAbs, + scheme, + cordovaPluginsDir, + cordovaPluginsDirAbs: (0, path_1.resolve)(platformDirAbs, cordovaPluginsDir), + nativeProjectDir, + nativeProjectDirAbs, + nativeTargetDir, + nativeTargetDirAbs, + nativeXcodeProjDir, + nativeXcodeProjDirAbs, + nativeXcodeWorkspaceDir: (0, promise_1.lazy)(async () => (0, path_1.relative)(platformDirAbs, await nativeXcodeWorkspaceDirAbs)), + nativeXcodeWorkspaceDirAbs, + webDir: (0, promise_1.lazy)(async () => (0, path_1.relative)(platformDirAbs, await webDirAbs)), + webDirAbs, + podPath, + }; +} +async function loadWebConfig(rootDir, webDir) { + const platformDir = webDir; + const platformDirAbs = (0, path_1.resolve)(rootDir, platformDir); + return { + name: 'web', + platformDir, + platformDirAbs, + }; +} +function determineOS(os) { + switch (os) { + case 'darwin': + return "mac" /* OS.Mac */; + case 'win32': + return "windows" /* OS.Windows */; + case 'linux': + return "linux" /* OS.Linux */; + } + return "unknown" /* OS.Unknown */; +} +async function determineXcodeWorkspaceDirAbs(nativeProjectDirAbs) { + return (0, path_1.resolve)(nativeProjectDirAbs, 'App.xcworkspace'); +} +async function determineIOSWebDirAbs(nativeProjectDirAbs, nativeTargetDirAbs, nativeXcodeProjDirAbs) { + const re = /path\s=\spublic[\s\S]+?sourceTree\s=\s([^;]+)/; + const pbxprojPath = (0, path_1.resolve)(nativeXcodeProjDirAbs, 'project.pbxproj'); + try { + const pbxproj = await (0, utils_fs_1.readFile)(pbxprojPath, { encoding: 'utf8' }); + const m = pbxproj.match(re); + if (m && m[1] === 'SOURCE_ROOT') { + log_1.logger.warn(`Using the iOS project root for the ${colors_1.default.strong('public')} directory is deprecated.\n` + + `Please follow the Upgrade Guide to move ${colors_1.default.strong('public')} inside the iOS target directory: ${colors_1.default.strong('https://capacitorjs.com/docs/updating/3-0#move-public-into-the-ios-target-directory')}`); + return (0, path_1.resolve)(nativeProjectDirAbs, 'public'); + } + } + catch (e) { + // ignore + } + return (0, path_1.resolve)(nativeTargetDirAbs, 'public'); +} +async function determineAndroidStudioPath(os) { + if (process.env.CAPACITOR_ANDROID_STUDIO_PATH) { + return process.env.CAPACITOR_ANDROID_STUDIO_PATH; + } + switch (os) { + case "mac" /* OS.Mac */: + return '/Applications/Android Studio.app'; + case "windows" /* OS.Windows */: { + const { runCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./util/subprocess'))); + let p = 'C:\\Program Files\\Android\\Android Studio\\bin\\studio64.exe'; + try { + if (!(await (0, utils_fs_1.pathExists)(p))) { + let commandResult = await runCommand('REG', [ + 'QUERY', + 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Android Studio', + '/v', + 'Path', + ]); + commandResult = commandResult.replace(/(\r\n|\n|\r)/gm, ''); + const i = commandResult.indexOf('REG_SZ'); + if (i > 0) { + p = commandResult.substring(i + 6).trim() + '\\bin\\studio64.exe'; + } + } + } + catch (e) { + debug(`Error checking registry for Android Studio path: %O`, e); + break; + } + return p; + } + case "linux" /* OS.Linux */: + return '/usr/local/android-studio/bin/studio.sh'; + } + return ''; +} +async function determineGemfileOrCocoapodPath(rootDir, platformDir, nativeProjectDirAbs) { + if (process.env.CAPACITOR_COCOAPODS_PATH) { + return process.env.CAPACITOR_COCOAPODS_PATH; + } + let gemfilePath = ''; + if (await (0, utils_fs_1.pathExists)((0, path_1.resolve)(rootDir, 'Gemfile'))) { + gemfilePath = (0, path_1.resolve)(rootDir, 'Gemfile'); + } + else if (await (0, utils_fs_1.pathExists)((0, path_1.resolve)(platformDir, 'Gemfile'))) { + gemfilePath = (0, path_1.resolve)(platformDir, 'Gemfile'); + } + else if (await (0, utils_fs_1.pathExists)((0, path_1.resolve)(nativeProjectDirAbs, 'Gemfile'))) { + gemfilePath = (0, path_1.resolve)(nativeProjectDirAbs, 'Gemfile'); + } + const appSpecificGemfileExists = gemfilePath != ''; + // Multi-app projects might share a single global 'Gemfile' at the Git repository root directory. + if (!appSpecificGemfileExists) { + try { + const output = await (0, subprocess_1.getCommandOutput)('git', ['rev-parse', '--show-toplevel'], { cwd: rootDir }); + if (output != null) { + gemfilePath = (0, path_1.resolve)(output, 'Gemfile'); + } + } + catch (e) { + // Nothing + } + } + try { + const gemfileText = (await (0, utils_fs_1.readFile)(gemfilePath)).toString(); + if (!gemfileText) { + return 'pod'; + } + const cocoapodsInGemfile = new RegExp(/gem 'cocoapods'/).test(gemfileText); + if (cocoapodsInGemfile) { + return 'bundle exec pod'; + } + else { + return 'pod'; + } + } + catch { + return 'pod'; + } +} +function formatConfigTS(extConfig) { + // TODO: tags + return `import { CapacitorConfig } from '@capacitor/cli'; + +const config: CapacitorConfig = ${(0, js_1.formatJSObject)(extConfig)}; + +export default config;\n`; +} +function checkExternalConfig(config) { + if (typeof config.extConfig.bundledWebRuntime !== 'undefined') { + let actionMessage = `Can be safely deleted.`; + if (config.extConfig.bundledWebRuntime === true) { + actionMessage = `Please, use a bundler to bundle Capacitor and its plugins.`; + } + log_1.logger.warn(`The ${colors_1.default.strong('bundledWebRuntime')} configuration option has been deprecated. ${actionMessage}`); + } +} +exports.checkExternalConfig = checkExternalConfig; diff --git a/node_modules/@capacitor/cli/dist/cordova.js b/node_modules/@capacitor/cli/dist/cordova.js new file mode 100644 index 0000000..229cd38 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/cordova.js @@ -0,0 +1,829 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.writeCordovaAndroidManifest = exports.getCordovaPreferences = exports.needsStaticPod = exports.getIncompatibleCordovaPlugins = exports.checkPluginDependencies = exports.logCordovaManualSteps = exports.getCordovaPlugins = exports.handleCordovaPluginsJS = exports.autoGenerateConfig = exports.removePluginFiles = exports.createEmptyCordovaJS = exports.copyCordovaJS = exports.copyPluginsJS = exports.generateCordovaPluginsJSFile = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const path_1 = require("path"); +const plist_1 = tslib_1.__importDefault(require("plist")); +const prompts_1 = tslib_1.__importDefault(require("prompts")); +const common_1 = require("./android/common"); +const colors_1 = tslib_1.__importDefault(require("./colors")); +const errors_1 = require("./errors"); +const common_2 = require("./ios/common"); +const log_1 = require("./log"); +const plugin_1 = require("./plugin"); +const node_1 = require("./util/node"); +const term_1 = require("./util/term"); +const xml_1 = require("./util/xml"); +/** + * Build the root cordova_plugins.js file referencing each Plugin JS file. + */ +function generateCordovaPluginsJSFile(config, plugins, platform) { + const pluginModules = []; + const pluginExports = []; + plugins.map(p => { + const pluginId = p.xml.$.id; + const jsModules = (0, plugin_1.getJSModules)(p, platform); + jsModules.map((jsModule) => { + const clobbers = []; + const merges = []; + let clobbersModule = ''; + let mergesModule = ''; + let runsModule = ''; + let clobberKey = ''; + let mergeKey = ''; + if (jsModule.clobbers) { + jsModule.clobbers.map((clobber) => { + clobbers.push(clobber.$.target); + clobberKey = clobber.$.target; + }); + clobbersModule = `, + "clobbers": [ + "${clobbers.join('",\n "')}" + ]`; + } + if (jsModule.merges) { + jsModule.merges.map((merge) => { + merges.push(merge.$.target); + mergeKey = merge.$.target; + }); + mergesModule = `, + "merges": [ + "${merges.join('",\n "')}" + ]`; + } + if (jsModule.runs) { + runsModule = ',\n "runs": true'; + } + const pluginModule = { + clobber: clobberKey, + merge: mergeKey, + // mimics Cordova's module name logic if the name attr is missing + pluginContent: `{ + "id": "${pluginId + + '.' + + (jsModule.$.name || jsModule.$.src.match(/([^/]+)\.js/)[1])}", + "file": "plugins/${pluginId}/${jsModule.$.src}", + "pluginId": "${pluginId}"${clobbersModule}${mergesModule}${runsModule} + }`, + }; + pluginModules.push(pluginModule); + }); + pluginExports.push(`"${pluginId}": "${p.xml.$.version}"`); + }); + return ` + cordova.define('cordova/plugin_list', function(require, exports, module) { + module.exports = [ + ${pluginModules + .sort((a, b) => a.clobber && b.clobber // Clobbers in alpha order + ? a.clobber.localeCompare(b.clobber) + : a.clobber || b.clobber // Clobbers before anything else + ? b.clobber.localeCompare(a.clobber) + : a.merge.localeCompare(b.merge)) + .map(e => e.pluginContent) + .join(',\n ')} + ]; + module.exports.metadata = + // TOP OF METADATA + { + ${pluginExports.join(',\n ')} + }; + // BOTTOM OF METADATA + }); + `; +} +exports.generateCordovaPluginsJSFile = generateCordovaPluginsJSFile; +/** + * Build the plugins/* files for each Cordova plugin installed. + */ +async function copyPluginsJS(config, cordovaPlugins, platform) { + const webDir = await getWebDir(config, platform); + const pluginsDir = (0, path_1.join)(webDir, 'plugins'); + const cordovaPluginsJSFile = (0, path_1.join)(webDir, 'cordova_plugins.js'); + await removePluginFiles(config, platform); + await Promise.all(cordovaPlugins.map(async (p) => { + const pluginId = p.xml.$.id; + const pluginDir = (0, path_1.join)(pluginsDir, pluginId, 'www'); + await (0, utils_fs_1.ensureDir)(pluginDir); + const jsModules = (0, plugin_1.getJSModules)(p, platform); + await Promise.all(jsModules.map(async (jsModule) => { + const filePath = (0, path_1.join)(webDir, 'plugins', pluginId, jsModule.$.src); + await (0, utils_fs_1.copy)((0, path_1.join)(p.rootPath, jsModule.$.src), filePath); + let data = await (0, utils_fs_1.readFile)(filePath, { encoding: 'utf-8' }); + data = data.trim(); + // mimics Cordova's module name logic if the name attr is missing + const name = pluginId + + '.' + + (jsModule.$.name || + (0, path_1.basename)(jsModule.$.src, (0, path_1.extname)(jsModule.$.src))); + data = `cordova.define("${name}", function(require, exports, module) { \n${data}\n});`; + data = data.replace(/)<[^<]*)*<\/script\s*>/gi, ''); + await (0, utils_fs_1.writeFile)(filePath, data, { encoding: 'utf-8' }); + })); + const assets = (0, plugin_1.getAssets)(p, platform); + await Promise.all(assets.map(async (asset) => { + const filePath = (0, path_1.join)(webDir, asset.$.target); + await (0, utils_fs_1.copy)((0, path_1.join)(p.rootPath, asset.$.src), filePath); + })); + })); + await (0, utils_fs_1.writeFile)(cordovaPluginsJSFile, generateCordovaPluginsJSFile(config, cordovaPlugins, platform)); +} +exports.copyPluginsJS = copyPluginsJS; +async function copyCordovaJS(config, platform) { + const cordovaPath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor/core', 'cordova.js'); + if (!cordovaPath) { + (0, errors_1.fatal)(`Unable to find ${colors_1.default.strong('node_modules/@capacitor/core/cordova.js')}.\n` + `Are you sure ${colors_1.default.strong('@capacitor/core')} is installed?`); + } + return (0, utils_fs_1.copy)(cordovaPath, (0, path_1.join)(await getWebDir(config, platform), 'cordova.js')); +} +exports.copyCordovaJS = copyCordovaJS; +async function createEmptyCordovaJS(config, platform) { + const webDir = await getWebDir(config, platform); + await (0, utils_fs_1.writeFile)((0, path_1.join)(webDir, 'cordova.js'), ''); + await (0, utils_fs_1.writeFile)((0, path_1.join)(webDir, 'cordova_plugins.js'), ''); +} +exports.createEmptyCordovaJS = createEmptyCordovaJS; +async function removePluginFiles(config, platform) { + const webDir = await getWebDir(config, platform); + const pluginsDir = (0, path_1.join)(webDir, 'plugins'); + const cordovaPluginsJSFile = (0, path_1.join)(webDir, 'cordova_plugins.js'); + await (0, utils_fs_1.remove)(pluginsDir); + await (0, utils_fs_1.remove)(cordovaPluginsJSFile); +} +exports.removePluginFiles = removePluginFiles; +async function autoGenerateConfig(config, cordovaPlugins, platform) { + var _a, _b, _c, _d; + let xmlDir = (0, path_1.join)(config.android.resDirAbs, 'xml'); + const fileName = 'config.xml'; + if (platform === 'ios') { + xmlDir = config.ios.nativeTargetDirAbs; + } + await (0, utils_fs_1.ensureDir)(xmlDir); + const cordovaConfigXMLFile = (0, path_1.join)(xmlDir, fileName); + await (0, utils_fs_1.remove)(cordovaConfigXMLFile); + const pluginEntries = []; + cordovaPlugins.map(p => { + const currentPlatform = (0, plugin_1.getPluginPlatform)(p, platform); + if (currentPlatform) { + const configFiles = currentPlatform['config-file']; + if (configFiles) { + const configXMLEntries = configFiles.filter(function (item) { + var _a; + return (_a = item.$) === null || _a === void 0 ? void 0 : _a.target.includes(fileName); + }); + configXMLEntries.map((entry) => { + if (entry.feature) { + const feature = { feature: entry.feature }; + pluginEntries.push(feature); + } + }); + } + } + }); + let accessOriginString = []; + if ((_b = (_a = config.app.extConfig) === null || _a === void 0 ? void 0 : _a.cordova) === null || _b === void 0 ? void 0 : _b.accessOrigins) { + accessOriginString = await Promise.all(config.app.extConfig.cordova.accessOrigins.map(async (host) => { + return ` + `; + })); + } + else { + accessOriginString.push(``); + } + const pluginEntriesString = await Promise.all(pluginEntries.map(async (item) => { + const xmlString = await (0, xml_1.writeXML)(item); + return xmlString; + })); + let pluginPreferencesString = []; + if ((_d = (_c = config.app.extConfig) === null || _c === void 0 ? void 0 : _c.cordova) === null || _d === void 0 ? void 0 : _d.preferences) { + pluginPreferencesString = await Promise.all(Object.entries(config.app.extConfig.cordova.preferences).map(async ([key, value]) => { + return ` + `; + })); + } + const content = ` + + ${accessOriginString.join('')} + ${pluginEntriesString.join('')} + ${pluginPreferencesString.join('')} +`; + await (0, utils_fs_1.writeFile)(cordovaConfigXMLFile, content); +} +exports.autoGenerateConfig = autoGenerateConfig; +async function getWebDir(config, platform) { + if (platform === 'ios') { + return config.ios.webDirAbs; + } + if (platform === 'android') { + return config.android.webDirAbs; + } + return ''; +} +async function handleCordovaPluginsJS(cordovaPlugins, config, platform) { + const webDir = await getWebDir(config, platform); + await (0, utils_fs_1.mkdirp)(webDir); + if (cordovaPlugins.length > 0) { + (0, plugin_1.printPlugins)(cordovaPlugins, platform, 'cordova'); + await copyCordovaJS(config, platform); + await copyPluginsJS(config, cordovaPlugins, platform); + } + else { + await removePluginFiles(config, platform); + await createEmptyCordovaJS(config, platform); + } + await autoGenerateConfig(config, cordovaPlugins, platform); +} +exports.handleCordovaPluginsJS = handleCordovaPluginsJS; +async function getCordovaPlugins(config, platform) { + const allPlugins = await (0, plugin_1.getPlugins)(config, platform); + let plugins = []; + if (platform === config.ios.name) { + plugins = await (0, common_2.getIOSPlugins)(allPlugins); + } + else if (platform === config.android.name) { + plugins = await (0, common_1.getAndroidPlugins)(allPlugins); + } + return plugins.filter(p => (0, plugin_1.getPluginType)(p, platform) === 1 /* PluginType.Cordova */); +} +exports.getCordovaPlugins = getCordovaPlugins; +async function logCordovaManualSteps(cordovaPlugins, config, platform) { + cordovaPlugins.map(p => { + const editConfig = (0, plugin_1.getPlatformElement)(p, platform, 'edit-config'); + const configFile = (0, plugin_1.getPlatformElement)(p, platform, 'config-file'); + editConfig.concat(configFile).map(async (configElement) => { + if (configElement.$ && !configElement.$.target.includes('config.xml')) { + if (platform === config.ios.name) { + if (configElement.$.target.includes('Info.plist')) { + logiOSPlist(configElement, config, p); + } + } + } + }); + }); +} +exports.logCordovaManualSteps = logCordovaManualSteps; +async function logiOSPlist(configElement, config, plugin) { + var _a, _b; + let plistPath = (0, path_1.resolve)(config.ios.nativeTargetDirAbs, 'Info.plist'); + if ((_a = config.app.extConfig.ios) === null || _a === void 0 ? void 0 : _a.scheme) { + plistPath = (0, path_1.resolve)(config.ios.nativeProjectDirAbs, `${(_b = config.app.extConfig.ios) === null || _b === void 0 ? void 0 : _b.scheme}-Info.plist`); + } + if (!(await (0, utils_fs_1.pathExists)(plistPath))) { + plistPath = (0, path_1.resolve)(config.ios.nativeTargetDirAbs, 'Base.lproj', 'Info.plist'); + } + if (await (0, utils_fs_1.pathExists)(plistPath)) { + const xmlMeta = await (0, xml_1.readXML)(plistPath); + const data = await (0, utils_fs_1.readFile)(plistPath, { encoding: 'utf-8' }); + const trimmedPlistData = data.replace(/(\t|\r|\n)/g, ''); + const plistData = plist_1.default.parse(data); + const dict = xmlMeta.plist.dict.pop(); + if (!dict.key.includes(configElement.$.parent)) { + let xml = buildConfigFileXml(configElement); + xml = `${configElement.$.parent}${getConfigFileTagContent(xml)}`; + log_1.logger.warn(`Configuration required for ${colors_1.default.strong(plugin.id)}.\n` + + `Add the following to Info.plist:\n` + + xml); + } + else if (configElement.array || configElement.dict) { + if (configElement.array && + configElement.array.length > 0 && + configElement.array[0].string) { + let xml = ''; + configElement.array[0].string.map((element) => { + const d = plistData[configElement.$.parent]; + if (Array.isArray(d) && !d.includes(element)) { + xml = xml.concat(`${element}\n`); + } + }); + if (xml.length > 0) { + log_1.logger.warn(`Configuration required for ${colors_1.default.strong(plugin.id)}.\n` + + `Add the following in the existing ${colors_1.default.strong(configElement.$.parent)} array of your Info.plist:\n` + + xml); + } + } + else { + let xml = buildConfigFileXml(configElement); + xml = `${configElement.$.parent}${getConfigFileTagContent(xml)}`; + xml = `${xml}`; + const parseXmlToSearchable = (childElementsObj, arrayToAddTo) => { + for (const childElement of childElementsObj) { + const childElementName = childElement['#name']; + const toAdd = { name: childElementName }; + if (childElementName === 'key' || childElementName === 'string') { + toAdd.value = childElement['_']; + } + else { + if (childElement['$']) { + toAdd.attrs = { ...childElement['$'] }; + } + if (childElement['$$']) { + toAdd.children = []; + parseXmlToSearchable(childElement['$$'], toAdd['children']); + } + } + arrayToAddTo.push(toAdd); + } + }; + const existingElements = (0, xml_1.parseXML)(trimmedPlistData, { + explicitChildren: true, + trim: true, + preserveChildrenOrder: true, + }); + const parsedExistingElements = []; + const rootKeyOfExistingElements = Object.keys(existingElements)[0]; + const rootOfExistingElementsToAdd = { name: rootKeyOfExistingElements, children: [] }; + if (existingElements[rootKeyOfExistingElements]['$']) { + rootOfExistingElementsToAdd.attrs = { + ...existingElements[rootKeyOfExistingElements]['$'], + }; + } + parseXmlToSearchable(existingElements[rootKeyOfExistingElements]['$$'], rootOfExistingElementsToAdd['children']); + parsedExistingElements.push(rootOfExistingElementsToAdd); + const requiredElements = (0, xml_1.parseXML)(xml, { + explicitChildren: true, + trim: true, + preserveChildrenOrder: true, + }); + const parsedRequiredElements = []; + const rootKeyOfRequiredElements = Object.keys(requiredElements)[0]; + const rootOfRequiredElementsToAdd = { name: rootKeyOfRequiredElements, children: [] }; + if (requiredElements[rootKeyOfRequiredElements]['$']) { + rootOfRequiredElementsToAdd.attrs = { + ...requiredElements[rootKeyOfRequiredElements]['$'], + }; + } + parseXmlToSearchable(requiredElements[rootKeyOfRequiredElements]['$$'], rootOfRequiredElementsToAdd['children']); + parsedRequiredElements.push(rootOfRequiredElementsToAdd); + const doesContainElements = (requiredElementsArray, existingElementsArray) => { + for (const requiredElement of requiredElementsArray) { + if (requiredElement.name === 'key' || + requiredElement.name === 'string') { + let foundMatch = false; + for (const existingElement of existingElementsArray) { + if (existingElement.name === requiredElement.name && + (existingElement.value === requiredElement.value || + /^[$].{1,}$/.test(requiredElement.value.trim()))) { + foundMatch = true; + break; + } + } + if (!foundMatch) { + return false; + } + } + else { + let foundMatch = false; + for (const existingElement of existingElementsArray) { + if (existingElement.name === requiredElement.name) { + if ((requiredElement.children !== undefined) === + (existingElement.children !== undefined)) { + if (doesContainElements(requiredElement.children, existingElement.children)) { + foundMatch = true; + break; + } + } + } + } + if (!foundMatch) { + return false; + } + } + } + return true; + }; + if (!doesContainElements(parsedRequiredElements, parsedExistingElements)) { + logPossibleMissingItem(configElement, plugin); + } + } + } + } + else { + logPossibleMissingItem(configElement, plugin); + } +} +function logPossibleMissingItem(configElement, plugin) { + let xml = buildConfigFileXml(configElement); + xml = getConfigFileTagContent(xml); + xml = removeOuterTags(xml); + log_1.logger.warn(`Configuration might be missing for ${colors_1.default.strong(plugin.id)}.\n` + + `Add the following to the existing ${colors_1.default.strong(configElement.$.parent)} entry of Info.plist:\n` + + xml); +} +function buildConfigFileXml(configElement) { + return (0, xml_1.buildXmlElement)(configElement, 'config-file'); +} +function getConfigFileTagContent(str) { + return str.replace(/|<\/config-file>/g, ''); +} +function removeOuterTags(str) { + const start = str.indexOf('>') + 1; + const end = str.lastIndexOf('<'); + return str.substring(start, end); +} +async function checkPluginDependencies(plugins, platform) { + const pluginDeps = new Map(); + const cordovaPlugins = plugins.filter(p => (0, plugin_1.getPluginType)(p, platform) === 1 /* PluginType.Cordova */); + const incompatible = plugins.filter(p => (0, plugin_1.getPluginType)(p, platform) === 2 /* PluginType.Incompatible */); + await Promise.all(cordovaPlugins.map(async (p) => { + let allDependencies = []; + allDependencies = allDependencies.concat((0, plugin_1.getPlatformElement)(p, platform, 'dependency')); + if (p.xml['dependency']) { + allDependencies = allDependencies.concat(p.xml['dependency']); + } + allDependencies = allDependencies.filter((dep) => !getIncompatibleCordovaPlugins(platform).includes(dep.$.id) && + incompatible.filter(p => p.id === dep.$.id || p.xml.$.id === dep.$.id) + .length === 0); + if (allDependencies) { + await Promise.all(allDependencies.map(async (dep) => { + var _a; + let plugin = dep.$.id; + let version = dep.$.version; + if (plugin.includes('@') && plugin.indexOf('@') !== 0) { + [plugin, version] = plugin.split('@'); + } + if (cordovaPlugins.filter(p => p.id === plugin || p.xml.$.id === plugin).length === 0) { + if ((_a = dep.$.url) === null || _a === void 0 ? void 0 : _a.startsWith('http')) { + plugin = dep.$.url; + version = dep.$.commit; + } + const deps = pluginDeps.get(p.id) || []; + deps.push(`${plugin}${version ? colors_1.default.weak(` (${version})`) : ''}`); + pluginDeps.set(p.id, deps); + } + })); + } + })); + if (pluginDeps.size > 0) { + let msg = `${colors_1.default.failure(colors_1.default.strong('Plugins are missing dependencies.'))}\n` + + `Cordova plugin dependencies must be installed in your project (e.g. w/ ${colors_1.default.input('npm install')}).\n`; + for (const [plugin, deps] of pluginDeps.entries()) { + msg += + `\n ${colors_1.default.strong(plugin)} is missing dependencies:\n` + + deps.map(d => ` - ${d}`).join('\n'); + } + log_1.logger.warn(`${msg}\n`); + } +} +exports.checkPluginDependencies = checkPluginDependencies; +function getIncompatibleCordovaPlugins(platform) { + const pluginList = [ + 'cordova-plugin-splashscreen', + 'cordova-plugin-ionic-webview', + 'cordova-plugin-crosswalk-webview', + 'cordova-plugin-wkwebview-engine', + 'cordova-plugin-console', + 'cordova-plugin-music-controls', + 'cordova-plugin-add-swift-support', + 'cordova-plugin-ionic-keyboard', + 'cordova-plugin-braintree', + '@ionic-enterprise/filesystem', + '@ionic-enterprise/keyboard', + '@ionic-enterprise/splashscreen', + 'cordova-support-google-services', + ]; + if (platform === 'ios') { + pluginList.push('cordova-plugin-statusbar', '@ionic-enterprise/statusbar', 'SalesforceMobileSDK-CordovaPlugin'); + } + if (platform === 'android') { + pluginList.push('cordova-plugin-compat'); + } + return pluginList; +} +exports.getIncompatibleCordovaPlugins = getIncompatibleCordovaPlugins; +function needsStaticPod(plugin, config) { + var _a, _b, _c, _d; + let pluginList = [ + 'phonegap-plugin-push', + '@batch.com/cordova-plugin', + 'onesignal-cordova-plugin', + ]; + if ((_b = (_a = config.app.extConfig) === null || _a === void 0 ? void 0 : _a.cordova) === null || _b === void 0 ? void 0 : _b.staticPlugins) { + pluginList = pluginList.concat((_d = (_c = config.app.extConfig) === null || _c === void 0 ? void 0 : _c.cordova) === null || _d === void 0 ? void 0 : _d.staticPlugins); + } + return pluginList.includes(plugin.id) || useFrameworks(plugin); +} +exports.needsStaticPod = needsStaticPod; +function useFrameworks(plugin) { + const podspecs = (0, plugin_1.getPlatformElement)(plugin, 'ios', 'podspec'); + const frameworkPods = podspecs.filter((podspec) => podspec.pods.filter((pods) => pods.$ && pods.$['use-frameworks'] === 'true').length > 0); + return frameworkPods.length > 0; +} +async function getCordovaPreferences(config) { + var _a, _b, _c, _d, _e; + const configXml = (0, path_1.join)(config.app.rootDir, 'config.xml'); + let cordova = {}; + if (await (0, utils_fs_1.pathExists)(configXml)) { + cordova.preferences = {}; + const xmlMeta = await (0, xml_1.readXML)(configXml); + if (xmlMeta.widget.preference) { + xmlMeta.widget.preference.map((pref) => { + cordova.preferences[pref.$.name] = pref.$.value; + }); + } + } + if (cordova.preferences && Object.keys(cordova.preferences).length > 0) { + if ((0, term_1.isInteractive)()) { + const answers = await (0, log_1.logPrompt)(`${colors_1.default.strong(`Cordova preferences can be automatically ported to ${colors_1.default.strong(config.app.extConfigName)}.`)}\n` + + `Keep in mind: Not all values can be automatically migrated from ${colors_1.default.strong('config.xml')}. There may be more work to do.\n` + + `More info: ${colors_1.default.strong('https://capacitorjs.com/docs/cordova/migrating-from-cordova-to-capacitor')}`, { + type: 'confirm', + name: 'confirm', + message: `Migrate Cordova preferences from config.xml?`, + initial: true, + }); + if (answers.confirm) { + if ((_b = (_a = config.app.extConfig) === null || _a === void 0 ? void 0 : _a.cordova) === null || _b === void 0 ? void 0 : _b.preferences) { + const answers = await (0, prompts_1.default)([ + { + type: 'confirm', + name: 'confirm', + message: `${config.app.extConfigName} already contains Cordova preferences. Overwrite?`, + }, + ], { onCancel: () => process.exit(1) }); + if (!answers.confirm) { + cordova = (_c = config.app.extConfig) === null || _c === void 0 ? void 0 : _c.cordova; + } + } + } + else { + cordova = (_d = config.app.extConfig) === null || _d === void 0 ? void 0 : _d.cordova; + } + } + } + else { + cordova = (_e = config.app.extConfig) === null || _e === void 0 ? void 0 : _e.cordova; + } + return cordova; +} +exports.getCordovaPreferences = getCordovaPreferences; +async function writeCordovaAndroidManifest(cordovaPlugins, config, platform, cleartext) { + var _a; + const manifestPath = (0, path_1.join)(config.android.cordovaPluginsDirAbs, 'src', 'main', 'AndroidManifest.xml'); + const rootXMLEntries = []; + const applicationXMLEntries = []; + const applicationXMLAttributes = []; + let prefsArray = []; + cordovaPlugins.map(async (p) => { + const editConfig = (0, plugin_1.getPlatformElement)(p, platform, 'edit-config'); + const configFile = (0, plugin_1.getPlatformElement)(p, platform, 'config-file'); + prefsArray = prefsArray.concat((0, plugin_1.getAllElements)(p, platform, 'preference')); + editConfig.concat(configFile).map(async (configElement) => { + var _a, _b; + if (configElement.$ && + (((_a = configElement.$.target) === null || _a === void 0 ? void 0 : _a.includes('AndroidManifest.xml')) || + ((_b = configElement.$.file) === null || _b === void 0 ? void 0 : _b.includes('AndroidManifest.xml')))) { + const keys = Object.keys(configElement).filter(k => k !== '$'); + keys.map(k => { + configElement[k].map(async (e) => { + const xmlElement = (0, xml_1.buildXmlElement)(e, k); + const pathParts = getPathParts(configElement.$.parent || configElement.$.target); + if (pathParts.length > 1) { + if (pathParts.pop() === 'application') { + if (configElement.$.mode && + configElement.$.mode === 'merge' && + xmlElement.startsWith(' { + applicationXMLAttributes.push(`${ek}="${e.$[ek]}"`); + }); + } + else if (!applicationXMLEntries.includes(xmlElement) && + !contains(applicationXMLEntries, xmlElement, k)) { + applicationXMLEntries.push(xmlElement); + } + } + else { + const manifestPathOfCapApp = (0, path_1.join)(config.android.appDirAbs, 'src', 'main', 'AndroidManifest.xml'); + const manifestContentTrimmed = (await (0, utils_fs_1.readFile)(manifestPathOfCapApp)) + .toString() + .trim() + .replace(/\n|\t|\r/g, '') + .replace(/[\s]{1,}[\s]{1,}/g, '>') + .replace(/[\s]{2,}/g, ' '); + const requiredManifestContentTrimmed = xmlElement + .trim() + .replace(/\n|\t|\r/g, '') + .replace(/[\s]{1,}[\s]{1,}/g, '>') + .replace(/[\s]{2,}/g, ' '); + const pathPartList = getPathParts(configElement.$.parent || configElement.$.target); + const doesXmlManifestContainRequiredInfo = (requiredElements, existingElements, pathTarget) => { + const findElementsToSearchIn = (existingElements, pathTarget) => { + const parts = [...pathTarget]; + const elementsToSearchNextIn = []; + for (const existingElement of existingElements) { + if (existingElement.name === pathTarget[0]) { + if (existingElement.children) { + for (const el of existingElement.children) { + elementsToSearchNextIn.push(el); + } + } + else { + elementsToSearchNextIn.push(existingElement); + } + } + } + if (elementsToSearchNextIn.length === 0) { + return []; + } + else { + parts.splice(0, 1); + if (parts.length <= 0) { + return elementsToSearchNextIn; + } + else { + return findElementsToSearchIn(elementsToSearchNextIn, parts); + } + } + }; + const parseXmlToSearchable = (childElementsObj, arrayToAddTo) => { + for (const childElementKey of Object.keys(childElementsObj)) { + for (const occurannceOfElement of childElementsObj[childElementKey]) { + const toAdd = { name: childElementKey }; + if (occurannceOfElement['$']) { + toAdd.attrs = { ...occurannceOfElement['$'] }; + } + if (occurannceOfElement['$$']) { + toAdd.children = []; + parseXmlToSearchable(occurannceOfElement['$$'], toAdd['children']); + } + arrayToAddTo.push(toAdd); + } + } + }; + const doesElementMatch = (requiredElement, existingElement) => { + var _a; + if (requiredElement.name !== existingElement.name) { + return false; + } + if ((requiredElement.attrs !== undefined) !== + (existingElement.attrs !== undefined)) { + return false; + } + else { + if (requiredElement.attrs !== undefined) { + const requiredELementAttrKeys = Object.keys(requiredElement.attrs); + for (const key of requiredELementAttrKeys) { + if (!/^[$].{1,}$/.test(requiredElement.attrs[key].trim())) { + if (requiredElement.attrs[key] !== + existingElement.attrs[key]) { + return false; + } + } + } + } + } + if ((requiredElement.children !== undefined) !== + (existingElement.children !== undefined) && + ((_a = requiredElement.children) === null || _a === void 0 ? void 0 : _a.length) !== 0) { + return false; + } + else { + if (requiredElement.children !== undefined) { + // each req element is in existing element + for (const requiredElementItem of requiredElement.children) { + let foundRequiredElement = false; + for (const existingElementItem of existingElement.children) { + const foundRequiredElementIn = doesElementMatch(requiredElementItem, existingElementItem); + if (foundRequiredElementIn) { + foundRequiredElement = true; + break; + } + } + if (!foundRequiredElement) { + return false; + } + } + } + else { + if (requiredElement.children === undefined && + existingElement.children === undefined) { + return true; + } + else { + let foundRequiredElement = false; + for (const existingElementItem of existingElement.children) { + const foundRequiredElementIn = doesElementMatch(requiredElement, existingElementItem); + if (foundRequiredElementIn) { + foundRequiredElement = true; + break; + } + } + if (!foundRequiredElement) { + return false; + } + } + } + } + return true; + }; + const parsedExistingElements = []; + const rootKeyOfExistingElements = Object.keys(existingElements)[0]; + const rootOfExistingElementsToAdd = { name: rootKeyOfExistingElements, children: [] }; + if (existingElements[rootKeyOfExistingElements]['$']) { + rootOfExistingElementsToAdd.attrs = { + ...existingElements[rootKeyOfExistingElements]['$'], + }; + } + parseXmlToSearchable(existingElements[rootKeyOfExistingElements]['$$'], rootOfExistingElementsToAdd['children']); + parsedExistingElements.push(rootOfExistingElementsToAdd); + const parsedRequiredElements = []; + const rootKeyOfRequiredElements = Object.keys(requiredElements)[0]; + const rootOfRequiredElementsToAdd = { name: rootKeyOfRequiredElements, children: [] }; + if (requiredElements[rootKeyOfRequiredElements]['$']) { + rootOfRequiredElementsToAdd.attrs = { + ...requiredElements[rootKeyOfRequiredElements]['$'], + }; + } + if (requiredElements[rootKeyOfRequiredElements]['$$'] !== + undefined) { + parseXmlToSearchable(requiredElements[rootKeyOfRequiredElements]['$$'], rootOfRequiredElementsToAdd['children']); + } + parsedRequiredElements.push(rootOfRequiredElementsToAdd); + const elementsToSearch = findElementsToSearchIn(parsedExistingElements, pathTarget); + for (const requiredElement of parsedRequiredElements) { + let foundMatch = false; + for (const existingElement of elementsToSearch) { + const doesContain = doesElementMatch(requiredElement, existingElement); + if (doesContain) { + foundMatch = true; + break; + } + } + if (!foundMatch) { + return false; + } + } + return true; + }; + if (!doesXmlManifestContainRequiredInfo((0, xml_1.parseXML)(requiredManifestContentTrimmed, { + explicitChildren: true, + trim: true, + }), (0, xml_1.parseXML)(manifestContentTrimmed, { + explicitChildren: true, + trim: true, + }), pathPartList)) { + log_1.logger.warn(`Android Configuration required for ${colors_1.default.strong(p.id)}.\n` + + `Add the following to AndroidManifest.xml:\n` + + xmlElement); + } + } + } + else { + if (!rootXMLEntries.includes(xmlElement) && + !contains(rootXMLEntries, xmlElement, k)) { + rootXMLEntries.push(xmlElement); + } + } + }); + }); + } + }); + }); + const cleartextString = 'android:usesCleartextTraffic="true"'; + const cleartextValue = (cleartext || ((_a = config.app.extConfig.server) === null || _a === void 0 ? void 0 : _a.cleartext)) && + !applicationXMLAttributes.includes(cleartextString) + ? cleartextString + : ''; + let content = ` + + +${applicationXMLEntries.join('\n')} + +${rootXMLEntries.join('\n')} +`; + content = content.replace(new RegExp('$PACKAGE_NAME'.replace('$', '\\$&'), 'g'), '${applicationId}'); + for (const preference of prefsArray) { + content = content.replace(new RegExp(('$' + preference.$.name).replace('$', '\\$&'), 'g'), preference.$.default); + } + if (await (0, utils_fs_1.pathExists)(manifestPath)) { + await (0, utils_fs_1.writeFile)(manifestPath, content); + } +} +exports.writeCordovaAndroidManifest = writeCordovaAndroidManifest; +function getPathParts(path) { + const rootPath = 'manifest'; + path = path.replace('/*', rootPath); + const parts = path.split('/').filter(part => part !== ''); + if (parts.length > 1 || parts.includes(rootPath)) { + return parts; + } + return [rootPath, path]; +} +function contains(entries, obj, k) { + const element = (0, xml_1.parseXML)(obj); + for (const entry of entries) { + const current = (0, xml_1.parseXML)(entry); + if (element && + current && + current[k] && + element[k] && + current[k].$ && + element[k].$ && + element[k].$['android:name'] === current[k].$['android:name']) { + return true; + } + } + return false; +} diff --git a/node_modules/@capacitor/cli/dist/declarations.d.ts b/node_modules/@capacitor/cli/dist/declarations.d.ts new file mode 100644 index 0000000..22c82e2 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/declarations.d.ts @@ -0,0 +1,605 @@ +export interface CapacitorConfig { + /** + * The unique identifier of your packaged app. + * + * This is also known as the Bundle ID in iOS and the Application ID in + * Android. It must be in reverse domain name notation, generally + * representing a domain name that you or your company owns. + * + * @since 1.0.0 + */ + appId?: string; + /** + * The human-friendly name of your app. + * + * This should be what you'd see in the App Store, but can be changed after + * within each native platform after it is generated. + * + * @since 1.0.0 + */ + appName?: string; + /** + * The directory of your compiled web assets. + * + * This directory should contain the final `index.html` of your app. + * + * @since 1.0.0 + */ + webDir?: string; + /** + * Whether to copy the Capacitor runtime bundle or not. + * + * If your app is not using a bundler, set this to `true`, then Capacitor + * will create a `capacitor.js` file that you'll need to add as a script in + * your `index.html` file. + * + * It's deprecated and will be removed in Capacitor 6 + * + * @since 1.0.0 + * @deprecated 5.0.0 + * @default false + */ + bundledWebRuntime?: boolean; + /** + * The build configuration (as defined by the native app) under which Capacitor + * will send statements to the log system. This applies to log statements in + * native code as well as statements redirected from JavaScript (`console.debug`, + * `console.error`, etc.). Enabling logging will let statements render in the + * Xcode and Android Studio windows but can leak information on device if enabled + * in released builds. + * + * 'none' = logs are never produced + * 'debug' = logs are produced in debug builds but not production builds + * 'production' = logs are always produced + * + * @since 3.0.0 + * @default debug + */ + loggingBehavior?: 'none' | 'debug' | 'production'; + /** + * User agent of Capacitor Web View. + * + * @since 1.4.0 + */ + overrideUserAgent?: string; + /** + * String to append to the original user agent of Capacitor Web View. + * + * This is disregarded if `overrideUserAgent` is used. + * + * @since 1.4.0 + */ + appendUserAgent?: string; + /** + * Background color of the Capacitor Web View. + * + * @since 1.1.0 + */ + backgroundColor?: string; + android?: { + /** + * Specify a custom path to the native Android project. + * + * @since 3.0.0 + * @default android + */ + path?: string; + /** + * User agent of Capacitor Web View on Android. + * + * Overrides global `overrideUserAgent` option. + * + * @since 1.4.0 + */ + overrideUserAgent?: string; + /** + * String to append to the original user agent of Capacitor Web View for Android. + * + * Overrides global `appendUserAgent` option. + * + * This is disregarded if `overrideUserAgent` is used. + * + * @since 1.4.0 + */ + appendUserAgent?: string; + /** + * Background color of the Capacitor Web View for Android. + * + * Overrides global `backgroundColor` option. + * + * @since 1.1.0 + */ + backgroundColor?: string; + /** + * Enable mixed content in the Capacitor Web View for Android. + * + * [Mixed + * content](https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content) + * is disabled by default for security. During development, you may need to + * enable it to allow the Web View to load files from different schemes. + * + * **This is not intended for use in production.** + * + * @since 1.0.0 + * @default false + */ + allowMixedContent?: boolean; + /** + * This enables a simpler keyboard which may have some limitations. + * + * This will capture JS keys using an alternative + * [`InputConnection`](https://developer.android.com/reference/android/view/inputmethod/InputConnection). + * + * @since 1.0.0 + * @default false + */ + captureInput?: boolean; + /** + * Always enable debuggable web content. + * + * This is automatically enabled during development. + * + * @since 1.0.0 + * @default false + */ + webContentsDebuggingEnabled?: boolean; + /** + * The build configuration under which Capacitor will generate logs on Android. + * + * Overrides global `loggingBehavior` option. + * + * @since 3.0.0 + * @default debug + */ + loggingBehavior?: 'none' | 'debug' | 'production'; + /** + * Allowlist of plugins to include during `npx cap sync` for Android. + * + * Overrides global `includePlugins` option. + * + * @since 3.0.0 + */ + includePlugins?: string[]; + /** + * Android flavor to use. + * + * If the app has flavors declared in the `build.gradle` + * configure the flavor you want to run with `npx cap run` command. + * + * @since 3.1.0 + */ + flavor?: string; + /** + * Whether to give the webview initial focus. + * + * @since 3.5.1 + * @default true + */ + initialFocus?: boolean; + /** + * The minimum supported webview version on Android supported by your app. + * + * The minimum supported cannot be lower than version `55`, which is required for Capacitor. + * + * If the device uses a lower WebView version, an error message will be shown on Logcat. + * If `server.errorPath` is configured, the WebView will redirect to that file, so can be + * used to show a custom error. + * + * @since 4.0.0 + * @default 60 + */ + minWebViewVersion?: number; + /** + * The minimum supported Huawei webview version on Android supported by your app. + * + * The minimum supported cannot be lower than version `10`, which is required for Capacitor. + * + * If the device uses a lower WebView version, an error message will be shown on Logcat. + * If `server.errorPath` is configured, the WebView will redirect to that file, so can be + * used to show a custom error. + * + * @since 4.6.4 + * @default 10 + */ + minHuaweiWebViewVersion?: number; + buildOptions?: { + /** + * Path to your keystore + * + * @since 4.4.0 + */ + keystorePath?: string; + /** + * Password to your keystore + * + * @since 4.4.0 + */ + keystorePassword?: string; + /** + * Alias in the keystore to use + * + * @since 4.4.0 + */ + keystoreAlias?: string; + /** + * Password for the alias in the keystore to use + * + * @since 4.4.0 + */ + keystoreAliasPassword?: string; + /** + * Bundle type for your release build + * + * @since 4.4.0 + * @default "AAB" + */ + releaseType?: 'AAB' | 'APK'; + /** + * Program to sign your build with + * + * @since 5.1.0 + * @default "jarsigner" + */ + signingType?: 'apksigner' | 'jarsigner'; + }; + /** + * Use legacy [addJavascriptInterface](https://developer.android.com/reference/android/webkit/WebView#addJavascriptInterface(java.lang.Object,%20java.lang.String)) + * instead of the new and more secure [addWebMessageListener](https://developer.android.com/reference/androidx/webkit/WebViewCompat#addWebMessageListener(android.webkit.WebView,java.lang.String,java.util.Set%3Cjava.lang.String%3E,androidx.webkit.WebViewCompat.WebMessageListener)) + * + * @since 4.5.0 + * @default false + */ + useLegacyBridge?: boolean; + }; + ios?: { + /** + * Specify a custom path to the native iOS project. + * + * @since 3.0.0 + * @default ios + */ + path?: string; + /** + * iOS build scheme to use. + * + * Usually this matches your app's target in Xcode. You can use the + * following command to list schemes: + * + * ```shell + * xcodebuild -workspace ios/App/App.xcworkspace -list + * ``` + * + * @since 3.0.0 + * @default App + */ + scheme?: string; + /** + * User agent of Capacitor Web View on iOS. + * + * Overrides global `overrideUserAgent` option. + * + * @since 1.4.0 + */ + overrideUserAgent?: string; + /** + * String to append to the original user agent of Capacitor Web View for iOS. + * + * Overrides global `appendUserAgent` option. + * + * This is disregarded if `overrideUserAgent` is used. + * + * @since 1.4.0 + */ + appendUserAgent?: string; + /** + * Background color of the Capacitor Web View for iOS. + * + * Overrides global `backgroundColor` option. + * + * @since 1.1.0 + */ + backgroundColor?: string; + /** + * Configure the scroll view's content inset adjustment behavior. + * + * This will set the + * [`contentInsetAdjustmentBehavior`](https://developer.apple.com/documentation/uikit/uiscrollview/2902261-contentinsetadjustmentbehavior) + * property on the Web View's + * [`UIScrollView`](https://developer.apple.com/documentation/uikit/uiscrollview). + * + * @since 2.0.0 + * @default never + */ + contentInset?: 'automatic' | 'scrollableAxes' | 'never' | 'always'; + /** + * Configure whether the scroll view is scrollable. + * + * This will set the + * [`isScrollEnabled`](https://developer.apple.com/documentation/uikit/uiscrollview/1619395-isscrollenabled) + * property on the Web View's + * [`UIScrollView`](https://developer.apple.com/documentation/uikit/uiscrollview). + * + * @since 1.0.0 + */ + scrollEnabled?: boolean; + /** + * Configure custom linker flags for compiling Cordova plugins. + * + * @since 1.0.0 + * @default [] + */ + cordovaLinkerFlags?: string[]; + /** + * Allow destination previews when pressing on links. + * + * This will set the + * [`allowsLinkPreview`](https://developer.apple.com/documentation/webkit/wkwebview/1415000-allowslinkpreview) + * property on the Web View, instead of using the default value. + * + * @since 2.0.0 + */ + allowsLinkPreview?: boolean; + /** + * The build configuration under which Capacitor will generate logs on iOS. + * + * Overrides global `loggingBehavior` option. + * + * @since 3.0.0 + * @default debug + */ + loggingBehavior?: 'none' | 'debug' | 'production'; + /** + * Allowlist of plugins to include during `npx cap sync` for iOS. + * + * Overrides global `includePlugins` option. + * + * @since 3.0.0 + */ + includePlugins?: string[]; + /** + * Sets WKWebView configuration for limitsNavigationsToAppBoundDomains. + * + * If the Info.plist file includes `WKAppBoundDomains` key, it's recommended to + * set this option to true, otherwise some features won't work. + * But as side effect, it blocks navigation outside the domains in the + * `WKAppBoundDomains` list. + * `localhost` (or the value configured as `server.hostname`) also needs to be + * added to the `WKAppBoundDomains` list. + * + * @since 3.1.0 + * @default false + */ + limitsNavigationsToAppBoundDomains?: boolean; + /** + * The content mode for the web view to use when it loads and renders web content. + * + * - 'recommended': The content mode that is appropriate for the current device. + * - 'desktop': The content mode that represents a desktop experience. + * - 'mobile': The content mode that represents a mobile experience. + * + * @since 4.0.0 + * @default recommended + */ + preferredContentMode?: 'recommended' | 'desktop' | 'mobile'; + /** + * Configure if Capacitor will handle local/push notifications. + * Set to false if you want to use your own UNUserNotificationCenter to handle notifications. + * + * @since 4.5.0 + * @default true + */ + handleApplicationNotifications?: boolean; + /** + * Using Xcode 14.3, on iOS 16.4 and greater, enable debuggable web content for release builds. + * + * If not set, it's `true` for development builds. + * + * @since 4.8.0 + * @default false + */ + webContentsDebuggingEnabled?: boolean; + }; + server?: { + /** + * Configure the local hostname of the device. + * + * It is recommended to keep this as `localhost` as it allows the use of + * Web APIs that would otherwise require a [secure + * context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts) + * such as + * [`navigator.geolocation`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/geolocation) + * and + * [`MediaDevices.getUserMedia`](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia). + * + * @since 1.0.0 + * @default localhost + */ + hostname?: string; + /** + * Configure the local scheme on iOS. + * + * [Can't be set to schemes that the WKWebView already handles, such as http or https](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/2875766-seturlschemehandler) + * This can be useful when migrating from + * [`cordova-plugin-ionic-webview`](https://github.com/ionic-team/cordova-plugin-ionic-webview), + * where the default scheme on iOS is `ionic`. + * + * @since 1.2.0 + * @default capacitor + */ + iosScheme?: string; + /** + * Configure the local scheme on Android. + * + * Custom schemes on Android are unable to change the URL path as of Webview 117. Changing this value from anything other than `http` or `https` can result in your + * application unable to resolve routing. If you must change this for some reason, consider using a hash-based url strategy, but there are no guarentees that this + * will continue to work long term as allowing non-standard schemes to modify query parameters and url fragments is only allowed for compatibility reasons. + * https://ionic.io/blog/capacitor-android-customscheme-issue-with-chrome-117 + * + * @since 1.2.0 + * @default http + */ + androidScheme?: string; + /** + * Load an external URL in the Web View. + * + * This is intended for use with live-reload servers. + * + * **This is not intended for use in production.** + * + * @since 1.0.0 + */ + url?: string; + /** + * Allow cleartext traffic in the Web View. + * + * On Android, all cleartext traffic is disabled by default as of API 28. + * + * This is intended for use with live-reload servers where unencrypted HTTP + * traffic is often used. + * + * **This is not intended for use in production.** + * + * @since 1.5.0 + * @default false + */ + cleartext?: boolean; + /** + * Set additional URLs the Web View can navigate to. + * + * By default, all external URLs are opened in the external browser (not + * the Web View). + * + * **This is not intended for use in production.** + * + * @since 1.0.0 + * @default [] + */ + allowNavigation?: string[]; + /** + * Specify path to a local html page to display in case of errors. + * On Android the html file won't have access to Capacitor plugins. + * + * @since 4.0.0 + * @default null + */ + errorPath?: string; + }; + cordova?: { + /** + * Populates tags in the config.xml with the origin set to + * the values entered here. + * If not provided, a single tag gets included. + * It only has effect on a few Cordova plugins that respect the whitelist. + * + * @since 3.3.0 + */ + accessOrigins?: string[]; + /** + * Configure Cordova preferences. + * + * @since 1.3.0 + */ + preferences?: { + [key: string]: string | undefined; + }; + /** + * List of Cordova plugins that need to be static but are not + * already in the static plugin list. + * + * @since 3.3.0 + */ + staticPlugins?: string[]; + }; + /** + * Configure plugins. + * + * This is an object with configuration values specified by plugin class + * name. + * + * @since 1.0.0 + */ + plugins?: PluginsConfig; + /** + * Allowlist of plugins to include during `npx cap sync`. + * + * This should be an array of strings representing the npm package name of + * plugins to include when running `npx cap sync`. If unset, Capacitor will + * inspect `package.json` for a list of potential plugins. + * + * @since 3.0.0 + */ + includePlugins?: string[]; +} +export interface FederatedApp { + name: string; + webDir: string; + liveUpdateConfig?: LiveUpdateConfig; +} +export interface LiveUpdateConfig { + appId: string; + channel: string; + autoUpdateMethod: AutoUpdateMethod; + maxVersions?: number; + key?: string; +} +export type AutoUpdateMethod = 'none' | 'background'; +export interface PluginsConfig { + /** + * Plugin configuration by class name. + * + * @since 1.0.0 + */ + [key: string]: { + [key: string]: any; + } | undefined; + /** + * FederatedCapacitor plugin configuration + * + * @since 5.0.0 + */ + FederatedCapacitor?: { + shell: Omit; + apps: FederatedApp[]; + liveUpdatesKey?: string; + }; + /** + * Capacitor Live Updates plugin configuration + * + * @since 4.2.0 + */ + LiveUpdates?: LiveUpdateConfig; + /** + * Capacitor Cookies plugin configuration + * + * @since 4.3.0 + */ + CapacitorCookies?: { + /** + * Enable CapacitorCookies to override the global `document.cookie` on native. + * + * @default false + */ + enabled?: boolean; + /** + * Enable `httpOnly` and other insecure cookies to be read and accessed on Android. + * + * Note: This can potentially be a security risk and is only intended to be used + * when your application uses a custom scheme on Android. + * + */ + androidCustomSchemeAllowInsecureAccess?: boolean; + }; + /** + * Capacitor Http plugin configuration + * + * @since 4.3.0 + */ + CapacitorHttp?: { + /** + * Enable CapacitorHttp to override the global `fetch` and `XMLHttpRequest` on native. + * + * @default false + */ + enabled?: boolean; + }; +} diff --git a/node_modules/@capacitor/cli/dist/declarations.js b/node_modules/@capacitor/cli/dist/declarations.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/declarations.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@capacitor/cli/dist/definitions.js b/node_modules/@capacitor/cli/dist/definitions.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/definitions.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@capacitor/cli/dist/errors.js b/node_modules/@capacitor/cli/dist/errors.js new file mode 100644 index 0000000..061c9a9 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/errors.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isFatal = exports.fatal = exports.FatalException = exports.BaseException = void 0; +class BaseException extends Error { + constructor(message, code) { + super(message); + this.message = message; + this.code = code; + } +} +exports.BaseException = BaseException; +class FatalException extends BaseException { + constructor(message, exitCode = 1) { + super(message, 'FATAL'); + this.message = message; + this.exitCode = exitCode; + } +} +exports.FatalException = FatalException; +function fatal(message) { + throw new FatalException(message); +} +exports.fatal = fatal; +function isFatal(e) { + return e && e instanceof FatalException; +} +exports.isFatal = isFatal; diff --git a/node_modules/@capacitor/cli/dist/framework-configs.js b/node_modules/@capacitor/cli/dist/framework-configs.js new file mode 100644 index 0000000..2df939d --- /dev/null +++ b/node_modules/@capacitor/cli/dist/framework-configs.js @@ -0,0 +1,109 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.detectFramework = void 0; +const FRAMEWORK_CONFIGS = [ + { + name: 'Angular', + isMatch: config => hasDependency(config, '@angular/cli'), + webDir: 'dist', + priority: 3, + }, + { + name: 'Create React App', + isMatch: config => hasDependency(config, 'react-scripts'), + webDir: 'build', + priority: 3, + }, + { + name: 'Ember', + isMatch: config => hasDependency(config, 'ember-cli'), + webDir: 'dist', + priority: 3, + }, + { + name: 'Gatsby', + isMatch: config => hasDependency(config, 'gatsby'), + webDir: 'public', + priority: 2, + }, + { + name: 'Ionic Angular', + isMatch: config => hasDependency(config, '@ionic/angular'), + webDir: 'www', + priority: 1, + }, + { + name: 'Ionic React', + isMatch: config => hasDependency(config, '@ionic/react'), + webDir: 'build', + priority: 1, + }, + { + name: 'Ionic Vue', + isMatch: config => hasDependency(config, '@ionic/vue'), + webDir: 'public', + priority: 1, + }, + { + name: 'Next', + isMatch: config => hasDependency(config, 'next'), + webDir: 'public', + priority: 2, + }, + { + name: 'Preact', + isMatch: config => hasDependency(config, 'preact-cli'), + webDir: 'build', + priority: 3, + }, + { + name: 'Stencil', + isMatch: config => hasDependency(config, '@stencil/core'), + webDir: 'www', + priority: 3, + }, + { + name: 'Svelte', + isMatch: config => hasDependency(config, 'svelte') && hasDependency(config, 'sirv-cli'), + webDir: 'public', + priority: 3, + }, + { + name: 'Vite', + isMatch: config => hasDependency(config, 'vite'), + webDir: 'dist', + priority: 2, + }, + { + name: 'Vue', + isMatch: config => hasDependency(config, '@vue/cli-service'), + webDir: 'dist', + priority: 3, + }, +]; +function detectFramework(config) { + const frameworks = FRAMEWORK_CONFIGS.filter(f => f.isMatch(config)).sort((a, b) => { + if (a.priority < b.priority) + return -1; + if (a.priority > b.priority) + return 1; + return 0; + }); + return frameworks[0]; +} +exports.detectFramework = detectFramework; +function hasDependency(config, depName) { + const deps = getDependencies(config); + return deps.includes(depName); +} +function getDependencies(config) { + var _a, _b, _c, _d; + const deps = []; + if ((_b = (_a = config === null || config === void 0 ? void 0 : config.app) === null || _a === void 0 ? void 0 : _a.package) === null || _b === void 0 ? void 0 : _b.dependencies) { + deps.push(...Object.keys(config.app.package.dependencies)); + } + if ((_d = (_c = config === null || config === void 0 ? void 0 : config.app) === null || _c === void 0 ? void 0 : _c.package) === null || _d === void 0 ? void 0 : _d.devDependencies) { + deps.push(...Object.keys(config.app.package.devDependencies)); + } + return deps; +} diff --git a/node_modules/@capacitor/cli/dist/index.js b/node_modules/@capacitor/cli/dist/index.js new file mode 100644 index 0000000..eaf59d9 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/index.js @@ -0,0 +1,212 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.runProgram = exports.run = void 0; +const tslib_1 = require("tslib"); +const commander_1 = require("commander"); +const colors_1 = tslib_1.__importDefault(require("./colors")); +const config_1 = require("./config"); +const errors_1 = require("./errors"); +const ipc_1 = require("./ipc"); +const log_1 = require("./log"); +const telemetry_1 = require("./telemetry"); +const cli_1 = require("./util/cli"); +const emoji_1 = require("./util/emoji"); +process.on('unhandledRejection', error => { + console.error(colors_1.default.failure('[fatal]'), error); +}); +process.on('message', ipc_1.receive); +async function run() { + try { + const config = await (0, config_1.loadConfig)(); + runProgram(config); + } + catch (e) { + process.exitCode = (0, errors_1.isFatal)(e) ? e.exitCode : 1; + log_1.logger.error(e.message ? e.message : String(e)); + } +} +exports.run = run; +function runProgram(config) { + commander_1.program.version(config.cli.package.version); + commander_1.program + .command('config', { hidden: true }) + .description(`print evaluated Capacitor config`) + .option('--json', 'Print in JSON format') + .action((0, cli_1.wrapAction)(async ({ json }) => { + const { configCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/config'))); + await configCommand(config, json); + })); + commander_1.program + .command('create [directory] [name] [id]', { hidden: true }) + .description('Creates a new Capacitor project') + .action((0, cli_1.wrapAction)(async () => { + const { createCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/create'))); + await createCommand(); + })); + commander_1.program + .command('init [appName] [appId]') + .description(`Initialize Capacitor configuration`) + .option('--web-dir ', 'Optional: Directory of your projects built web assets') + .action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (appName, appId, { webDir }) => { + const { initCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/init'))); + await initCommand(config, appName, appId, webDir); + }))); + commander_1.program + .command('serve', { hidden: true }) + .description('Serves a Capacitor Progressive Web App in the browser') + .action((0, cli_1.wrapAction)(async () => { + const { serveCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/serve'))); + await serveCommand(); + })); + commander_1.program + .command('sync [platform]') + .description(`${colors_1.default.input('copy')} + ${colors_1.default.input('update')}`) + .option('--deployment', 'Optional: if provided, pod install will use --deployment option') + .option('--inline', 'Optional: if true, all source maps will be inlined for easier debugging on mobile devices', false) + .action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform, { deployment, inline }) => { + (0, config_1.checkExternalConfig)(config.app); + const { syncCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/sync'))); + await syncCommand(config, platform, deployment, inline); + }))); + commander_1.program + .command('update [platform]') + .description(`updates the native plugins and dependencies based on ${colors_1.default.strong('package.json')}`) + .option('--deployment', 'Optional: if provided, pod install will use --deployment option') + .action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform, { deployment }) => { + (0, config_1.checkExternalConfig)(config.app); + const { updateCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/update'))); + await updateCommand(config, platform, deployment); + }))); + commander_1.program + .command('copy [platform]') + .description('copies the web app build into the native app') + .option('--inline', 'Optional: if true, all source maps will be inlined for easier debugging on mobile devices', false) + .action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform, { inline }) => { + (0, config_1.checkExternalConfig)(config.app); + const { copyCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/copy'))); + await copyCommand(config, platform, inline); + }))); + commander_1.program + .command('build ') + .description('builds the release version of the selected platform') + .option('--scheme ', 'iOS Scheme to build') + .option('--flavor ', 'Android Flavor to build') + .option('--keystorepath ', 'Path to the keystore') + .option('--keystorepass ', 'Password to the keystore') + .option('--keystorealias ', 'Key Alias in the keystore') + .option('--keystorealiaspass ', 'Password for the Key Alias') + .addOption(new commander_1.Option('--androidreleasetype ', 'Android release type; APK or AAB').choices(['AAB', 'APK'])) + .addOption(new commander_1.Option('--signing-type ', 'Program used to sign apps (default: jarsigner)').choices(['apksigner', 'jarsigner'])) + .action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform, { scheme, flavor, keystorepath, keystorepass, keystorealias, keystorealiaspass, androidreleasetype, signingType, }) => { + const { buildCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/build'))); + await buildCommand(config, platform, { + scheme, + flavor, + keystorepath, + keystorepass, + keystorealias, + keystorealiaspass, + androidreleasetype, + signingtype: signingType, + }); + }))); + commander_1.program + .command(`run [platform]`) + .description(`runs ${colors_1.default.input('sync')}, then builds and deploys the native app`) + .option('--scheme ', 'set the scheme of the iOS project') + .option('--flavor ', 'set the flavor of the Android project (flavor dimensions not yet supported)') + .option('--list', 'list targets, then quit') + // TODO: remove once --json is a hidden option (https://github.com/tj/commander.js/issues/1106) + .allowUnknownOption(true) + .option('--target ', 'use a specific target') + .option('--no-sync', `do not run ${colors_1.default.input('sync')}`) + .option('--forwardPorts ', 'Automatically run "adb reverse" for better live-reloading support') + .option('-l, --live-reload', 'Enable Live Reload') + .option('--host ', 'Host used for live reload') + .option('--port ', 'Port used for live reload') + .action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform, { scheme, flavor, list, target, sync, forwardPorts, liveReload, host, port, }) => { + const { runCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/run'))); + await runCommand(config, platform, { + scheme, + flavor, + list, + target, + sync, + forwardPorts, + liveReload, + host, + port, + }); + }))); + commander_1.program + .command('open [platform]') + .description('opens the native project workspace (Xcode for iOS)') + .action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform) => { + const { openCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/open'))); + await openCommand(config, platform); + }))); + commander_1.program + .command('add [platform]') + .description('add a native platform project') + .action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform) => { + (0, config_1.checkExternalConfig)(config.app); + const { addCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/add'))); + await addCommand(config, platform); + }))); + commander_1.program + .command('ls [platform]') + .description('list installed Cordova and Capacitor plugins') + .action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform) => { + (0, config_1.checkExternalConfig)(config.app); + const { listCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/list'))); + await listCommand(config, platform); + }))); + commander_1.program + .command('doctor [platform]') + .description('checks the current setup for common errors') + .action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform) => { + (0, config_1.checkExternalConfig)(config.app); + const { doctorCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/doctor'))); + await doctorCommand(config, platform); + }))); + commander_1.program + .command('telemetry [on|off]', { hidden: true }) + .description('enable or disable telemetry') + .action((0, cli_1.wrapAction)(async (onOrOff) => { + const { telemetryCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/telemetry'))); + await telemetryCommand(onOrOff); + })); + commander_1.program + .command('📡', { hidden: true }) + .description('IPC receiver command') + .action(() => { + // no-op: IPC messages are received via `process.on('message')` + }); + commander_1.program + .command('plugin:generate', { hidden: true }) + .description('start a new Capacitor plugin') + .action((0, cli_1.wrapAction)(async () => { + const { newPluginCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/new-plugin'))); + await newPluginCommand(); + })); + commander_1.program + .command('migrate') + .option('--noprompt', 'do not prompt for confirmation') + .option('--packagemanager ', 'The package manager to use for dependency installs (npm, pnpm, yarn)') + .description('Migrate your current Capacitor app to the latest major version of Capacitor.') + .action((0, cli_1.wrapAction)(async ({ noprompt, packagemanager }) => { + const { migrateCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/migrate'))); + await migrateCommand(config, noprompt, packagemanager); + })); + commander_1.program.arguments('[command]').action((0, cli_1.wrapAction)(async (cmd) => { + if (typeof cmd === 'undefined') { + log_1.output.write(`\n ${(0, emoji_1.emoji)('⚡️', '--')} ${colors_1.default.strong('Capacitor - Cross-Platform apps with JavaScript and the Web')} ${(0, emoji_1.emoji)('⚡️', '--')}\n\n`); + commander_1.program.outputHelp(); + } + else { + (0, errors_1.fatal)(`Unknown command: ${colors_1.default.input(cmd)}`); + } + })); + commander_1.program.parse(process.argv); +} +exports.runProgram = runProgram; diff --git a/node_modules/@capacitor/cli/dist/ios/add.js b/node_modules/@capacitor/cli/dist/ios/add.js new file mode 100644 index 0000000..7472926 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/ios/add.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.addIOS = void 0; +const tslib_1 = require("tslib"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_1 = require("../common"); +const template_1 = require("../util/template"); +async function addIOS(config) { + await (0, common_1.runTask)(`Adding native Xcode project in ${colors_1.default.strong(config.ios.platformDir)}`, () => { + return (0, template_1.extractTemplate)(config.cli.assets.ios.platformTemplateArchiveAbs, config.ios.platformDirAbs); + }); +} +exports.addIOS = addIOS; diff --git a/node_modules/@capacitor/cli/dist/ios/build.js b/node_modules/@capacitor/cli/dist/ios/build.js new file mode 100644 index 0000000..4e2908f --- /dev/null +++ b/node_modules/@capacitor/cli/dist/ios/build.js @@ -0,0 +1,56 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.buildiOS = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const path_1 = require("path"); +const rimraf_1 = tslib_1.__importDefault(require("rimraf")); +const common_1 = require("../common"); +const log_1 = require("../log"); +const subprocess_1 = require("../util/subprocess"); +async function buildiOS(config, buildOptions) { + var _a; + const theScheme = (_a = buildOptions.scheme) !== null && _a !== void 0 ? _a : 'App'; + await (0, common_1.runTask)('Building xArchive', async () => (0, subprocess_1.runCommand)('xcodebuild', [ + '-workspace', + (0, path_1.basename)(await config.ios.nativeXcodeWorkspaceDirAbs), + '-scheme', + `${theScheme}`, + '-destination', + `generic/platform=iOS`, + '-archivePath', + `${theScheme}.xcarchive`, + 'archive', + ], { + cwd: config.ios.nativeProjectDirAbs, + })); + const archivePlistContents = ` + + + +method +app-store + +`; + const archivePlistPath = (0, path_1.join)(`${config.ios.nativeProjectDirAbs}`, 'archive.plist'); + (0, utils_fs_1.writeFileSync)(archivePlistPath, archivePlistContents); + await (0, common_1.runTask)('Building IPA', async () => (0, subprocess_1.runCommand)('xcodebuild', [ + 'archive', + '-archivePath', + `${theScheme}.xcarchive`, + '-exportArchive', + '-exportOptionsPlist', + 'archive.plist', + '-exportPath', + 'output', + '-allowProvisioningUpdates', + ], { + cwd: config.ios.nativeProjectDirAbs, + })); + await (0, common_1.runTask)('Cleaning up', async () => { + (0, utils_fs_1.unlinkSync)(archivePlistPath); + rimraf_1.default.sync((0, path_1.join)(config.ios.nativeProjectDirAbs, `${theScheme}.xcarchive`)); + }); + (0, log_1.logSuccess)(`Successfully generated an IPA at: ${(0, path_1.join)(config.ios.nativeProjectDirAbs, 'output')}`); +} +exports.buildiOS = buildiOS; diff --git a/node_modules/@capacitor/cli/dist/ios/common.js b/node_modules/@capacitor/cli/dist/ios/common.js new file mode 100644 index 0000000..ad73c85 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/ios/common.js @@ -0,0 +1,103 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.editProjectSettingsIOS = exports.resolvePlugin = exports.getIOSPlugins = exports.checkCocoaPods = exports.checkBundler = exports.checkIOSPackage = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const child_process_1 = require("child_process"); +const path_1 = require("path"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_1 = require("../common"); +const cordova_1 = require("../cordova"); +const log_1 = require("../log"); +const plugin_1 = require("../plugin"); +const subprocess_1 = require("../util/subprocess"); +async function checkIOSPackage(config) { + return (0, common_1.checkCapacitorPlatform)(config, 'ios'); +} +exports.checkIOSPackage = checkIOSPackage; +function execBundler() { + try { + const bundleOutput = (0, child_process_1.execSync)('bundle &> /dev/null ; echo $?'); + return parseInt(bundleOutput.toString()); + } + catch (e) { + return -1; + } +} +async function checkBundler(config) { + if (config.cli.os === "mac" /* OS.Mac */) { + let bundlerResult = execBundler(); + if (bundlerResult === 1) { + // Bundler version is outdated + log_1.logger.info(`Using ${colors_1.default.strong('Gemfile')}: Bundler update needed...`); + await (0, subprocess_1.runCommand)('gem', ['install', 'bundler']); + bundlerResult = execBundler(); + } + if (bundlerResult === 0) { + // Bundler in use, all gems current + log_1.logger.info(`Using ${colors_1.default.strong('Gemfile')}: RubyGems bundle installed`); + } + } + return null; +} +exports.checkBundler = checkBundler; +async function checkCocoaPods(config) { + if (!(await (0, subprocess_1.isInstalled)(await config.ios.podPath)) && + config.cli.os === "mac" /* OS.Mac */) { + return (`CocoaPods is not installed.\n` + + `See this install guide: ${colors_1.default.strong('https://capacitorjs.com/docs/getting-started/environment-setup#homebrew')}`); + } + return null; +} +exports.checkCocoaPods = checkCocoaPods; +async function getIOSPlugins(allPlugins) { + const resolved = await Promise.all(allPlugins.map(async (plugin) => await resolvePlugin(plugin))); + return resolved.filter((plugin) => !!plugin); +} +exports.getIOSPlugins = getIOSPlugins; +async function resolvePlugin(plugin) { + var _a, _b; + const platform = 'ios'; + if ((_a = plugin.manifest) === null || _a === void 0 ? void 0 : _a.ios) { + plugin.ios = { + name: plugin.name, + type: 0 /* PluginType.Core */, + path: (_b = plugin.manifest.ios.src) !== null && _b !== void 0 ? _b : platform, + }; + } + else if (plugin.xml) { + plugin.ios = { + name: plugin.name, + type: 1 /* PluginType.Cordova */, + path: 'src/' + platform, + }; + if ((0, cordova_1.getIncompatibleCordovaPlugins)(platform).includes(plugin.id) || + !(0, plugin_1.getPluginPlatform)(plugin, platform)) { + plugin.ios.type = 2 /* PluginType.Incompatible */; + } + } + else { + return null; + } + return plugin; +} +exports.resolvePlugin = resolvePlugin; +/** + * Update the native project files with the desired app id and app name + */ +async function editProjectSettingsIOS(config) { + const appId = config.app.appId; + const appName = config.app.appName + .replace(/&/g, '&') + .replace(//g, '>'); + const pbxPath = `${config.ios.nativeXcodeProjDirAbs}/project.pbxproj`; + const plistPath = (0, path_1.resolve)(config.ios.nativeTargetDirAbs, 'Info.plist'); + let plistContent = await (0, utils_fs_1.readFile)(plistPath, { encoding: 'utf-8' }); + plistContent = plistContent.replace(/CFBundleDisplayName<\/key>[\s\S]?\s+([^<]*)<\/string>/, `CFBundleDisplayName\n ${appName}`); + let pbxContent = await (0, utils_fs_1.readFile)(pbxPath, { encoding: 'utf-8' }); + pbxContent = pbxContent.replace(/PRODUCT_BUNDLE_IDENTIFIER = ([^;]+)/g, `PRODUCT_BUNDLE_IDENTIFIER = ${appId}`); + await (0, utils_fs_1.writeFile)(plistPath, plistContent, { encoding: 'utf-8' }); + await (0, utils_fs_1.writeFile)(pbxPath, pbxContent, { encoding: 'utf-8' }); +} +exports.editProjectSettingsIOS = editProjectSettingsIOS; diff --git a/node_modules/@capacitor/cli/dist/ios/doctor.js b/node_modules/@capacitor/cli/dist/ios/doctor.js new file mode 100644 index 0000000..853ac18 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/ios/doctor.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.doctorIOS = void 0; +const common_1 = require("../common"); +const errors_1 = require("../errors"); +const log_1 = require("../log"); +const subprocess_1 = require("../util/subprocess"); +const common_2 = require("./common"); +async function doctorIOS(config) { + var _a; + // DOCTOR ideas for iOS: + // plugin specific warnings + // check cocoapods installed + // check projects exist + // check content in www === ios/www + // check CLI versions + // check plugins versions + // check native project deps are up-to-date === npm install + // check if npm install was updated + // check online datebase of common errors + // check if www folder is empty (index.html does not exist) + try { + await (0, common_1.check)([ + () => (0, common_2.checkBundler)(config) || (0, common_2.checkCocoaPods)(config), + () => (0, common_1.checkWebDir)(config), + checkXcode, + ]); + (0, log_1.logSuccess)('iOS looking great! 👌'); + } + catch (e) { + (0, errors_1.fatal)((_a = e.stack) !== null && _a !== void 0 ? _a : e); + } +} +exports.doctorIOS = doctorIOS; +async function checkXcode() { + if (!(await (0, subprocess_1.isInstalled)('xcodebuild'))) { + return `Xcode is not installed`; + } + // const matches = output.match(/^Xcode (.*)/); + // if (matches && matches.length === 2) { + // const minVersion = '9.0.0'; + // const semver = await import('semver'); + // console.log(matches[1]); + // if (semver.gt(minVersion, matches[1])) { + // return `Xcode version is too old, ${minVersion} is required`; + // } + // } + return null; +} diff --git a/node_modules/@capacitor/cli/dist/ios/open.js b/node_modules/@capacitor/cli/dist/ios/open.js new file mode 100644 index 0000000..ddd2c6c --- /dev/null +++ b/node_modules/@capacitor/cli/dist/ios/open.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.openIOS = void 0; +const tslib_1 = require("tslib"); +const open_1 = tslib_1.__importDefault(require("open")); +const common_1 = require("../common"); +async function openIOS(config) { + await (0, open_1.default)(await config.ios.nativeXcodeWorkspaceDirAbs, { wait: false }); + await (0, common_1.wait)(3000); +} +exports.openIOS = openIOS; diff --git a/node_modules/@capacitor/cli/dist/ios/run.js b/node_modules/@capacitor/cli/dist/ios/run.js new file mode 100644 index 0000000..4c176f8 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/ios/run.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.runIOS = void 0; +const tslib_1 = require("tslib"); +const debug_1 = tslib_1.__importDefault(require("debug")); +const path_1 = require("path"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_1 = require("../common"); +const native_run_1 = require("../util/native-run"); +const subprocess_1 = require("../util/subprocess"); +const debug = (0, debug_1.default)('capacitor:ios:run'); +async function runIOS(config, { target: selectedTarget, scheme: selectedScheme }) { + const target = await (0, common_1.promptForPlatformTarget)(await (0, native_run_1.getPlatformTargets)('ios'), selectedTarget); + const runScheme = selectedScheme || config.ios.scheme; + const derivedDataPath = (0, path_1.resolve)(config.ios.platformDirAbs, 'DerivedData', target.id); + const xcodebuildArgs = [ + '-workspace', + (0, path_1.basename)(await config.ios.nativeXcodeWorkspaceDirAbs), + '-scheme', + runScheme, + '-configuration', + 'Debug', + '-destination', + `id=${target.id}`, + '-derivedDataPath', + derivedDataPath, + ]; + debug('Invoking xcodebuild with args: %O', xcodebuildArgs); + await (0, common_1.runTask)('Running xcodebuild', async () => (0, subprocess_1.runCommand)('xcrun', ['xcodebuild', ...xcodebuildArgs], { + cwd: config.ios.nativeProjectDirAbs, + })); + const appName = `${runScheme}.app`; + const appPath = (0, path_1.resolve)(derivedDataPath, 'Build/Products', target.virtual ? 'Debug-iphonesimulator' : 'Debug-iphoneos', appName); + const nativeRunArgs = ['ios', '--app', appPath, '--target', target.id]; + debug('Invoking native-run with args: %O', nativeRunArgs); + await (0, common_1.runTask)(`Deploying ${colors_1.default.strong(appName)} to ${colors_1.default.input(target.id)}`, async () => (0, native_run_1.runNativeRun)(nativeRunArgs)); +} +exports.runIOS = runIOS; diff --git a/node_modules/@capacitor/cli/dist/ios/update.js b/node_modules/@capacitor/cli/dist/ios/update.js new file mode 100644 index 0000000..7f65db3 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/ios/update.js @@ -0,0 +1,406 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.installCocoaPodsPlugins = exports.updateIOS = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const path_1 = require("path"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_1 = require("../common"); +const cordova_1 = require("../cordova"); +const errors_1 = require("../errors"); +const log_1 = require("../log"); +const plugin_1 = require("../plugin"); +const copy_1 = require("../tasks/copy"); +const fs_1 = require("../util/fs"); +const node_1 = require("../util/node"); +const subprocess_1 = require("../util/subprocess"); +const template_1 = require("../util/template"); +const common_2 = require("./common"); +const platform = 'ios'; +async function updateIOS(config, deployment) { + const plugins = await getPluginsTask(config); + const capacitorPlugins = plugins.filter(p => (0, plugin_1.getPluginType)(p, platform) === 0 /* PluginType.Core */); + (0, plugin_1.printPlugins)(capacitorPlugins, 'ios'); + await removePluginsNativeFiles(config); + const cordovaPlugins = plugins.filter(p => (0, plugin_1.getPluginType)(p, platform) === 1 /* PluginType.Cordova */); + if (cordovaPlugins.length > 0) { + await copyPluginsNativeFiles(config, cordovaPlugins); + } + if (!(await (0, utils_fs_1.pathExists)(await config.ios.webDirAbs))) { + await (0, copy_1.copy)(config, platform); + } + await (0, cordova_1.handleCordovaPluginsJS)(cordovaPlugins, config, platform); + await (0, cordova_1.checkPluginDependencies)(plugins, platform); + await generateCordovaPodspecs(cordovaPlugins, config); + await installCocoaPodsPlugins(config, plugins, deployment); + await (0, cordova_1.logCordovaManualSteps)(cordovaPlugins, config, platform); + const incompatibleCordovaPlugins = plugins.filter(p => (0, plugin_1.getPluginType)(p, platform) === 2 /* PluginType.Incompatible */); + (0, plugin_1.printPlugins)(incompatibleCordovaPlugins, platform, 'incompatible'); + await (0, common_1.checkPlatformVersions)(config, platform); +} +exports.updateIOS = updateIOS; +async function installCocoaPodsPlugins(config, plugins, deployment) { + await (0, common_1.runTask)(`Updating iOS native dependencies with ${colors_1.default.input(`${await config.ios.podPath} install`)}`, () => { + return updatePodfile(config, plugins, deployment); + }); +} +exports.installCocoaPodsPlugins = installCocoaPodsPlugins; +async function updatePodfile(config, plugins, deployment) { + const dependenciesContent = await generatePodFile(config, plugins); + const relativeCapacitoriOSPath = await getRelativeCapacitoriOSPath(config); + const podfilePath = (0, path_1.join)(config.ios.nativeProjectDirAbs, 'Podfile'); + let podfileContent = await (0, utils_fs_1.readFile)(podfilePath, { encoding: 'utf-8' }); + podfileContent = podfileContent.replace(/(def capacitor_pods)[\s\S]+?(\nend)/, `$1${dependenciesContent}$2`); + podfileContent = podfileContent.replace(/(require_relative)[\s\S]+?(@capacitor\/ios\/scripts\/pods_helpers')/, `require_relative '${relativeCapacitoriOSPath}/scripts/pods_helpers'`); + podfileContent = podfileContent.replace(`def assertDeploymentTarget(installer) + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + # ensure IPHONEOS_DEPLOYMENT_TARGET is at least 13.0 + deployment_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f + should_upgrade = deployment_target < 13.0 && deployment_target != 0.0 + if should_upgrade + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' + end + end + end +end`, `require_relative '${relativeCapacitoriOSPath}/scripts/pods_helpers'`); + await (0, utils_fs_1.writeFile)(podfilePath, podfileContent, { encoding: 'utf-8' }); + const podPath = await config.ios.podPath; + const useBundler = podPath.startsWith('bundle'); + const podCommandExists = await (0, subprocess_1.isInstalled)('pod'); + if (useBundler || podCommandExists) { + if (useBundler) { + await (0, subprocess_1.runCommand)('bundle', ['exec', 'pod', 'install', ...(deployment ? ['--deployment'] : [])], { cwd: config.ios.nativeProjectDirAbs }); + } + else { + await (0, subprocess_1.runCommand)(podPath, ['install', ...(deployment ? ['--deployment'] : [])], { cwd: config.ios.nativeProjectDirAbs }); + } + } + else { + log_1.logger.warn('Skipping pod install because CocoaPods is not installed'); + } + const isXcodebuildAvailable = await (0, subprocess_1.isInstalled)('xcodebuild'); + if (isXcodebuildAvailable) { + await (0, subprocess_1.runCommand)('xcodebuild', ['-project', (0, path_1.basename)(`${config.ios.nativeXcodeProjDirAbs}`), 'clean'], { + cwd: config.ios.nativeProjectDirAbs, + }); + } + else { + log_1.logger.warn('Unable to find "xcodebuild". Skipping xcodebuild clean step...'); + } +} +async function getRelativeCapacitoriOSPath(config) { + const capacitoriOSPath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor/ios', 'package.json'); + if (!capacitoriOSPath) { + (0, errors_1.fatal)(`Unable to find ${colors_1.default.strong('node_modules/@capacitor/ios')}.\n` + + `Are you sure ${colors_1.default.strong('@capacitor/ios')} is installed?`); + } + return (0, fs_1.convertToUnixPath)((0, path_1.relative)(config.ios.nativeProjectDirAbs, await (0, utils_fs_1.realpath)((0, path_1.dirname)(capacitoriOSPath)))); +} +async function generatePodFile(config, plugins) { + const relativeCapacitoriOSPath = await getRelativeCapacitoriOSPath(config); + const capacitorPlugins = plugins.filter(p => (0, plugin_1.getPluginType)(p, platform) === 0 /* PluginType.Core */); + const pods = await Promise.all(capacitorPlugins.map(async (p) => { + if (!p.ios) { + return ''; + } + return ` pod '${p.ios.name}', :path => '${(0, fs_1.convertToUnixPath)((0, path_1.relative)(config.ios.nativeProjectDirAbs, await (0, utils_fs_1.realpath)(p.rootPath)))}'\n`; + })); + const cordovaPlugins = plugins.filter(p => (0, plugin_1.getPluginType)(p, platform) === 1 /* PluginType.Cordova */); + cordovaPlugins.map(async (p) => { + const podspecs = (0, plugin_1.getPlatformElement)(p, platform, 'podspec'); + podspecs.map((podspec) => { + podspec.pods.map((pPods) => { + pPods.pod.map((pod) => { + if (pod.$.git) { + let gitRef = ''; + if (pod.$.tag) { + gitRef = `, :tag => '${pod.$.tag}'`; + } + else if (pod.$.branch) { + gitRef = `, :branch => '${pod.$.branch}'`; + } + else if (pod.$.commit) { + gitRef = `, :commit => '${pod.$.commit}'`; + } + pods.push(` pod '${pod.$.name}', :git => '${pod.$.git}'${gitRef}\n`); + } + }); + }); + }); + }); + const staticPlugins = cordovaPlugins.filter(p => (0, cordova_1.needsStaticPod)(p, config)); + const noStaticPlugins = cordovaPlugins.filter(el => !staticPlugins.includes(el)); + if (noStaticPlugins.length > 0) { + pods.push(` pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'\n`); + } + if (staticPlugins.length > 0) { + pods.push(` pod 'CordovaPluginsStatic', :path => '../capacitor-cordova-ios-plugins'\n`); + } + const resourcesPlugins = cordovaPlugins.filter(filterResources); + if (resourcesPlugins.length > 0) { + pods.push(` pod 'CordovaPluginsResources', :path => '../capacitor-cordova-ios-plugins'\n`); + } + return ` + pod 'Capacitor', :path => '${relativeCapacitoriOSPath}' + pod 'CapacitorCordova', :path => '${relativeCapacitoriOSPath}' +${pods.join('').trimRight()}`; +} +function getFrameworkName(framework) { + if (isFramework(framework)) { + if (framework.$.custom && framework.$.custom === 'true') { + return framework.$.src; + } + return framework.$.src.substr(0, framework.$.src.indexOf('.')); + } + return framework.$.src + .substr(0, framework.$.src.indexOf('.')) + .replace('lib', ''); +} +function isFramework(framework) { + return framework.$.src.split('.').pop().includes('framework'); +} +async function generateCordovaPodspecs(cordovaPlugins, config) { + const staticPlugins = cordovaPlugins.filter(p => (0, cordova_1.needsStaticPod)(p, config)); + const noStaticPlugins = cordovaPlugins.filter(el => !staticPlugins.includes(el)); + generateCordovaPodspec(noStaticPlugins, config, false); + generateCordovaPodspec(staticPlugins, config, true); +} +async function generateCordovaPodspec(cordovaPlugins, config, isStatic) { + const weakFrameworks = []; + const linkedFrameworks = []; + const customFrameworks = []; + const systemLibraries = []; + const sourceFrameworks = []; + const frameworkDeps = []; + const compilerFlags = []; + let prefsArray = []; + let name = 'CordovaPlugins'; + let sourcesFolderName = 'sources'; + if (isStatic) { + name += 'Static'; + frameworkDeps.push('s.static_framework = true'); + sourcesFolderName += 'static'; + } + cordovaPlugins.map((plugin) => { + const frameworks = (0, plugin_1.getPlatformElement)(plugin, platform, 'framework'); + frameworks.map((framework) => { + if (!framework.$.type) { + const name = getFrameworkName(framework); + if (isFramework(framework)) { + if (framework.$.weak && framework.$.weak === 'true') { + if (!weakFrameworks.includes(name)) { + weakFrameworks.push(name); + } + } + else if (framework.$.custom && framework.$.custom === 'true') { + const frameworktPath = (0, path_1.join)(sourcesFolderName, plugin.name, name); + if (!customFrameworks.includes(frameworktPath)) { + customFrameworks.push(frameworktPath); + } + } + else { + if (!linkedFrameworks.includes(name)) { + linkedFrameworks.push(name); + } + } + } + else { + if (!systemLibraries.includes(name)) { + systemLibraries.push(name); + } + } + } + else if (framework.$.type && framework.$.type === 'podspec') { + let depString = `s.dependency '${framework.$.src}'`; + if (framework.$.spec && framework.$.spec !== '') { + depString += `, '${framework.$.spec}'`; + } + if (!frameworkDeps.includes(depString)) { + frameworkDeps.push(depString); + } + } + }); + prefsArray = prefsArray.concat((0, plugin_1.getAllElements)(plugin, platform, 'preference')); + const podspecs = (0, plugin_1.getPlatformElement)(plugin, platform, 'podspec'); + podspecs.map((podspec) => { + podspec.pods.map((pods) => { + pods.pod.map((pod) => { + let depString = `s.dependency '${pod.$.name}'`; + if (pod.$.spec && pod.$.spec !== '') { + depString += `, '${pod.$.spec}'`; + } + if (!frameworkDeps.includes(depString)) { + frameworkDeps.push(depString); + } + }); + }); + }); + const sourceFiles = (0, plugin_1.getPlatformElement)(plugin, platform, 'source-file'); + sourceFiles.map((sourceFile) => { + if (sourceFile.$.framework && sourceFile.$.framework === 'true') { + let fileName = sourceFile.$.src.split('/').pop(); + if (!fileName.startsWith('lib')) { + fileName = 'lib' + fileName; + } + const frameworktPath = (0, path_1.join)(sourcesFolderName, plugin.name, fileName); + if (!sourceFrameworks.includes(frameworktPath)) { + sourceFrameworks.push(frameworktPath); + } + } + else if (sourceFile.$['compiler-flags']) { + const cFlag = sourceFile.$['compiler-flags']; + if (!compilerFlags.includes(cFlag)) { + compilerFlags.push(cFlag); + } + } + }); + }); + const onlySystemLibraries = systemLibraries.filter(library => removeNoSystem(library, sourceFrameworks)); + if (weakFrameworks.length > 0) { + frameworkDeps.push(`s.weak_frameworks = '${weakFrameworks.join(`', '`)}'`); + } + if (linkedFrameworks.length > 0) { + frameworkDeps.push(`s.frameworks = '${linkedFrameworks.join(`', '`)}'`); + } + if (onlySystemLibraries.length > 0) { + frameworkDeps.push(`s.libraries = '${onlySystemLibraries.join(`', '`)}'`); + } + if (customFrameworks.length > 0) { + frameworkDeps.push(`s.vendored_frameworks = '${customFrameworks.join(`', '`)}'`); + frameworkDeps.push(`s.exclude_files = 'sources/**/*.framework/Headers/*.h', 'sources/**/*.framework/PrivateHeaders/*.h'`); + } + if (sourceFrameworks.length > 0) { + frameworkDeps.push(`s.vendored_libraries = '${sourceFrameworks.join(`', '`)}'`); + } + if (compilerFlags.length > 0) { + frameworkDeps.push(`s.compiler_flags = '${compilerFlags.join(' ')}'`); + } + const arcPlugins = cordovaPlugins.filter(filterARCFiles); + if (arcPlugins.length > 0) { + frameworkDeps.push(`s.subspec 'noarc' do |sna| + sna.requires_arc = false + sna.source_files = 'noarc/**/*.{swift,h,m,c,cc,mm,cpp}' + end`); + } + let frameworksString = frameworkDeps.join('\n '); + frameworksString = await replaceFrameworkVariables(config, prefsArray, frameworksString); + const content = ` + Pod::Spec.new do |s| + s.name = '${name}' + s.version = '${config.cli.package.version}' + s.summary = 'Autogenerated spec' + s.license = 'Unknown' + s.homepage = 'https://example.com' + s.authors = { 'Capacitor Generator' => 'hi@example.com' } + s.source = { :git => 'https://github.com/ionic-team/does-not-exist.git', :tag => '${config.cli.package.version}' } + s.source_files = '${sourcesFolderName}/**/*.{swift,h,m,c,cc,mm,cpp}' + s.ios.deployment_target = '${config.ios.minVersion}' + s.xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1 WK_WEB_VIEW_ONLY=1' } + s.dependency 'CapacitorCordova'${getLinkerFlags(config)} + s.swift_version = '5.1' + ${frameworksString} + end`; + await (0, utils_fs_1.writeFile)((0, path_1.join)(config.ios.cordovaPluginsDirAbs, `${name}.podspec`), content); +} +function getLinkerFlags(config) { + var _a; + if ((_a = config.app.extConfig.ios) === null || _a === void 0 ? void 0 : _a.cordovaLinkerFlags) { + return `\n s.pod_target_xcconfig = { 'OTHER_LDFLAGS' => '${config.app.extConfig.ios.cordovaLinkerFlags.join(' ')}' }`; + } + return ''; +} +async function copyPluginsNativeFiles(config, cordovaPlugins) { + for (const p of cordovaPlugins) { + const sourceFiles = (0, plugin_1.getPlatformElement)(p, platform, 'source-file'); + const headerFiles = (0, plugin_1.getPlatformElement)(p, platform, 'header-file'); + const codeFiles = sourceFiles.concat(headerFiles); + const frameworks = (0, plugin_1.getPlatformElement)(p, platform, 'framework'); + let sourcesFolderName = 'sources'; + if ((0, cordova_1.needsStaticPod)(p, config)) { + sourcesFolderName += 'static'; + } + const sourcesFolder = (0, path_1.join)(config.ios.cordovaPluginsDirAbs, sourcesFolderName, p.name); + for (const codeFile of codeFiles) { + let fileName = codeFile.$.src.split('/').pop(); + const fileExt = codeFile.$.src.split('.').pop(); + if (fileExt === 'a' && !fileName.startsWith('lib')) { + fileName = 'lib' + fileName; + } + let destFolder = sourcesFolderName; + if (codeFile.$['compiler-flags'] && + codeFile.$['compiler-flags'] === '-fno-objc-arc') { + destFolder = 'noarc'; + } + const filePath = (0, plugin_1.getFilePath)(config, p, codeFile.$.src); + const fileDest = (0, path_1.join)(config.ios.cordovaPluginsDirAbs, destFolder, p.name, fileName); + await (0, utils_fs_1.copy)(filePath, fileDest); + if (!codeFile.$.framework) { + let fileContent = await (0, utils_fs_1.readFile)(fileDest, { encoding: 'utf-8' }); + if (fileExt === 'swift') { + fileContent = 'import Cordova\n' + fileContent; + await (0, utils_fs_1.writeFile)(fileDest, fileContent, { encoding: 'utf-8' }); + } + else { + if (fileContent.includes('@import Firebase;')) { + fileContent = fileContent.replace('@import Firebase;', '#import '); + await (0, utils_fs_1.writeFile)(fileDest, fileContent, { encoding: 'utf-8' }); + } + if (fileContent.includes('[NSBundle bundleForClass:[self class]]') || + fileContent.includes('[NSBundle bundleForClass:[CDVCapture class]]')) { + fileContent = fileContent.replace('[NSBundle bundleForClass:[self class]]', '[NSBundle mainBundle]'); + fileContent = fileContent.replace('[NSBundle bundleForClass:[CDVCapture class]]', '[NSBundle mainBundle]'); + await (0, utils_fs_1.writeFile)(fileDest, fileContent, { encoding: 'utf-8' }); + } + if (fileContent.includes('[self.webView superview]') || + fileContent.includes('self.webView.superview')) { + fileContent = fileContent.replace(/\[self.webView superview\]/g, 'self.viewController.view'); + fileContent = fileContent.replace(/self.webView.superview/g, 'self.viewController.view'); + await (0, utils_fs_1.writeFile)(fileDest, fileContent, { encoding: 'utf-8' }); + } + } + } + } + const resourceFiles = (0, plugin_1.getPlatformElement)(p, platform, 'resource-file'); + for (const resourceFile of resourceFiles) { + const fileName = resourceFile.$.src.split('/').pop(); + await (0, utils_fs_1.copy)((0, plugin_1.getFilePath)(config, p, resourceFile.$.src), (0, path_1.join)(config.ios.cordovaPluginsDirAbs, 'resources', fileName)); + } + for (const framework of frameworks) { + if (framework.$.custom && framework.$.custom === 'true') { + await (0, utils_fs_1.copy)((0, plugin_1.getFilePath)(config, p, framework.$.src), (0, path_1.join)(sourcesFolder, framework.$.src)); + } + } + } +} +async function removePluginsNativeFiles(config) { + await (0, utils_fs_1.remove)(config.ios.cordovaPluginsDirAbs); + await (0, template_1.extractTemplate)(config.cli.assets.ios.cordovaPluginsTemplateArchiveAbs, config.ios.cordovaPluginsDirAbs); +} +function filterResources(plugin) { + const resources = (0, plugin_1.getPlatformElement)(plugin, platform, 'resource-file'); + return resources.length > 0; +} +function filterARCFiles(plugin) { + const sources = (0, plugin_1.getPlatformElement)(plugin, platform, 'source-file'); + const sourcesARC = sources.filter((sourceFile) => sourceFile.$['compiler-flags'] && + sourceFile.$['compiler-flags'] === '-fno-objc-arc'); + return sourcesARC.length > 0; +} +function removeNoSystem(library, sourceFrameworks) { + const libraries = sourceFrameworks.filter(framework => framework.includes(library)); + return libraries.length === 0; +} +async function getPluginsTask(config) { + return await (0, common_1.runTask)('Updating iOS plugins', async () => { + const allPlugins = await (0, plugin_1.getPlugins)(config, 'ios'); + const iosPlugins = await (0, common_2.getIOSPlugins)(allPlugins); + return iosPlugins; + }); +} +async function replaceFrameworkVariables(config, prefsArray, frameworkString) { + prefsArray.map((preference) => { + frameworkString = frameworkString.replace(new RegExp(('$' + preference.$.name).replace('$', '\\$&'), 'g'), preference.$.default); + }); + return frameworkString; +} diff --git a/node_modules/@capacitor/cli/dist/ipc.js b/node_modules/@capacitor/cli/dist/ipc.js new file mode 100644 index 0000000..c4d30ed --- /dev/null +++ b/node_modules/@capacitor/cli/dist/ipc.js @@ -0,0 +1,61 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.receive = exports.send = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const utils_subprocess_1 = require("@ionic/utils-subprocess"); +const debug_1 = tslib_1.__importDefault(require("debug")); +const https_1 = require("https"); +const path_1 = require("path"); +const cli_1 = require("./util/cli"); +const debug = (0, debug_1.default)('capacitor:ipc'); +/** + * Send an IPC message to a forked process. + */ +async function send(msg) { + const dir = cli_1.ENV_PATHS.log; + await (0, utils_fs_1.mkdirp)(dir); + const logPath = (0, path_1.resolve)(dir, 'ipc.log'); + debug('Sending %O IPC message to forked process (logs: %O)', msg.type, logPath); + const fd = await (0, utils_fs_1.open)(logPath, 'a'); + const p = (0, utils_subprocess_1.fork)(process.argv[1], ['📡'], { stdio: ['ignore', fd, fd, 'ipc'] }); + p.send(msg); + p.disconnect(); + p.unref(); +} +exports.send = send; +/** + * Receive and handle an IPC message. + * + * Assume minimal context and keep external dependencies to a minimum. + */ +async function receive(msg) { + debug('Received %O IPC message', msg.type); + if (msg.type === 'telemetry') { + const now = new Date().toISOString(); + const { data } = msg; + // This request is only made if telemetry is on. + const req = (0, https_1.request)({ + hostname: 'api.ionicjs.com', + port: 443, + path: '/events/metrics', + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + }, response => { + debug('Sent %O metric to events service (status: %O)', data.name, response.statusCode); + if (response.statusCode !== 204) { + response.on('data', chunk => { + debug('Bad response from events service. Request body: %O', chunk.toString()); + }); + } + }); + const body = { + metrics: [data], + sent_at: now, + }; + req.end(JSON.stringify(body)); + } +} +exports.receive = receive; diff --git a/node_modules/@capacitor/cli/dist/log.js b/node_modules/@capacitor/cli/dist/log.js new file mode 100644 index 0000000..f7de247 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/log.js @@ -0,0 +1,41 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.logSuccess = exports.logPrompt = exports.logger = exports.output = void 0; +const tslib_1 = require("tslib"); +const cli_framework_output_1 = require("@ionic/cli-framework-output"); +const colors_1 = tslib_1.__importDefault(require("./colors")); +const term_1 = require("./util/term"); +const options = { + colors: colors_1.default, + stream: process.argv.includes('--json') ? process.stderr : process.stdout, +}; +exports.output = (0, term_1.isInteractive)() + ? new cli_framework_output_1.TTYOutputStrategy(options) + : new cli_framework_output_1.StreamOutputStrategy(options); +exports.logger = (0, cli_framework_output_1.createDefaultLogger)({ + output: exports.output, + formatterOptions: { + titleize: false, + tags: new Map([ + [cli_framework_output_1.LOGGER_LEVELS.DEBUG, colors_1.default.log.DEBUG('[debug]')], + [cli_framework_output_1.LOGGER_LEVELS.INFO, colors_1.default.log.INFO('[info]')], + [cli_framework_output_1.LOGGER_LEVELS.WARN, colors_1.default.log.WARN('[warn]')], + [cli_framework_output_1.LOGGER_LEVELS.ERROR, colors_1.default.log.ERROR('[error]')], + ]), + }, +}); +async function logPrompt(msg, promptObject) { + const { wordWrap } = await Promise.resolve().then(() => tslib_1.__importStar(require('@ionic/cli-framework-output'))); + const { prompt } = await Promise.resolve().then(() => tslib_1.__importStar(require('prompts'))); + exports.logger.log({ + msg: `${colors_1.default.input('[?]')} ${wordWrap(msg, { indentation: 4 })}`, + logger: exports.logger, + format: false, + }); + return prompt(promptObject, { onCancel: () => process.exit(1) }); +} +exports.logPrompt = logPrompt; +function logSuccess(msg) { + exports.logger.msg(`${colors_1.default.success('[success]')} ${msg}`); +} +exports.logSuccess = logSuccess; diff --git a/node_modules/@capacitor/cli/dist/plugin.js b/node_modules/@capacitor/cli/dist/plugin.js new file mode 100644 index 0000000..c7a1cd7 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/plugin.js @@ -0,0 +1,186 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getAllElements = exports.getFilePath = exports.getAssets = exports.getJSModules = exports.getPluginType = exports.getPlatformElement = exports.getPluginPlatform = exports.printPlugins = exports.fixName = exports.getDependencies = exports.resolvePlugin = exports.getPlugins = exports.getIncludedPluginPackages = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const path_1 = require("path"); +const colors_1 = tslib_1.__importDefault(require("./colors")); +const errors_1 = require("./errors"); +const log_1 = require("./log"); +const node_1 = require("./util/node"); +const xml_1 = require("./util/xml"); +function getIncludedPluginPackages(config, platform) { + var _a, _b, _c, _d; + const { extConfig } = config.app; + switch (platform) { + case 'android': + return (_b = (_a = extConfig.android) === null || _a === void 0 ? void 0 : _a.includePlugins) !== null && _b !== void 0 ? _b : extConfig.includePlugins; + case 'ios': + return (_d = (_c = extConfig.ios) === null || _c === void 0 ? void 0 : _c.includePlugins) !== null && _d !== void 0 ? _d : extConfig.includePlugins; + } +} +exports.getIncludedPluginPackages = getIncludedPluginPackages; +async function getPlugins(config, platform) { + var _a; + const possiblePlugins = (_a = getIncludedPluginPackages(config, platform)) !== null && _a !== void 0 ? _a : getDependencies(config); + const resolvedPlugins = await Promise.all(possiblePlugins.map(async (p) => resolvePlugin(config, p))); + return resolvedPlugins.filter((p) => !!p); +} +exports.getPlugins = getPlugins; +async function resolvePlugin(config, name) { + try { + const packagePath = (0, node_1.resolveNode)(config.app.rootDir, name, 'package.json'); + if (!packagePath) { + (0, errors_1.fatal)(`Unable to find ${colors_1.default.strong(`node_modules/${name}`)}.\n` + + `Are you sure ${colors_1.default.strong(name)} is installed?`); + } + const rootPath = (0, path_1.dirname)(packagePath); + const meta = await (0, utils_fs_1.readJSON)(packagePath); + if (!meta) { + return null; + } + if (meta.capacitor) { + return { + id: name, + name: fixName(name), + version: meta.version, + rootPath, + repository: meta.repository, + manifest: meta.capacitor, + }; + } + const pluginXMLPath = (0, path_1.join)(rootPath, 'plugin.xml'); + const xmlMeta = await (0, xml_1.readXML)(pluginXMLPath); + return { + id: name, + name: fixName(name), + version: meta.version, + rootPath: rootPath, + repository: meta.repository, + xml: xmlMeta.plugin, + }; + } + catch (e) { + // ignore + } + return null; +} +exports.resolvePlugin = resolvePlugin; +function getDependencies(config) { + var _a, _b; + return [ + ...Object.keys((_a = config.app.package.dependencies) !== null && _a !== void 0 ? _a : {}), + ...Object.keys((_b = config.app.package.devDependencies) !== null && _b !== void 0 ? _b : {}), + ]; +} +exports.getDependencies = getDependencies; +function fixName(name) { + name = name + .replace(/\//g, '_') + .replace(/-/g, '_') + .replace(/@/g, '') + .replace(/_\w/g, m => m[1].toUpperCase()); + return name.charAt(0).toUpperCase() + name.slice(1); +} +exports.fixName = fixName; +function printPlugins(plugins, platform, type = 'capacitor') { + if (plugins.length === 0) { + return; + } + let msg; + const plural = plugins.length === 1 ? '' : 's'; + switch (type) { + case 'cordova': + msg = `Found ${plugins.length} Cordova plugin${plural} for ${colors_1.default.strong(platform)}:\n`; + break; + case 'incompatible': + msg = `Found ${plugins.length} incompatible Cordova plugin${plural} for ${colors_1.default.strong(platform)}, skipped install:\n`; + break; + case 'capacitor': + msg = `Found ${plugins.length} Capacitor plugin${plural} for ${colors_1.default.strong(platform)}:\n`; + break; + } + msg += plugins.map(p => `${p.id}${colors_1.default.weak(`@${p.version}`)}`).join('\n'); + log_1.logger.info(msg); +} +exports.printPlugins = printPlugins; +function getPluginPlatform(p, platform) { + const platforms = p.xml.platform; + if (platforms) { + const platforms = p.xml.platform.filter(function (item) { + return item.$.name === platform; + }); + return platforms[0]; + } + return []; +} +exports.getPluginPlatform = getPluginPlatform; +function getPlatformElement(p, platform, elementName) { + const platformTag = getPluginPlatform(p, platform); + if (platformTag) { + const element = platformTag[elementName]; + if (element) { + return element; + } + } + return []; +} +exports.getPlatformElement = getPlatformElement; +function getPluginType(p, platform) { + var _a, _b, _c, _d; + switch (platform) { + case 'ios': + return (_b = (_a = p.ios) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b : 0 /* PluginType.Core */; + case 'android': + return (_d = (_c = p.android) === null || _c === void 0 ? void 0 : _c.type) !== null && _d !== void 0 ? _d : 0 /* PluginType.Core */; + } + return 0 /* PluginType.Core */; +} +exports.getPluginType = getPluginType; +/** + * Get each JavaScript Module for the given plugin + */ +function getJSModules(p, platform) { + return getAllElements(p, platform, 'js-module'); +} +exports.getJSModules = getJSModules; +/** + * Get each asset tag for the given plugin + */ +function getAssets(p, platform) { + return getAllElements(p, platform, 'asset'); +} +exports.getAssets = getAssets; +function getFilePath(config, plugin, path) { + if (path.startsWith('node_modules')) { + let pathSegments = path.split('/').slice(1); + if (pathSegments[0].startsWith('@')) { + pathSegments = [ + pathSegments[0] + '/' + pathSegments[1], + ...pathSegments.slice(2), + ]; + } + const filePath = (0, node_1.resolveNode)(config.app.rootDir, ...pathSegments); + if (!filePath) { + throw new Error(`Can't resolve module ${pathSegments[0]}`); + } + return filePath; + } + return (0, path_1.join)(plugin.rootPath, path); +} +exports.getFilePath = getFilePath; +/** + * For a given plugin, return all the plugin.xml elements with elementName, checking root and specified platform + */ +function getAllElements(p, platform, elementName) { + let modules = []; + if (p.xml[elementName]) { + modules = modules.concat(p.xml[elementName]); + } + const platformModules = getPluginPlatform(p, platform); + if (platformModules === null || platformModules === void 0 ? void 0 : platformModules[elementName]) { + modules = modules.concat(platformModules[elementName]); + } + return modules; +} +exports.getAllElements = getAllElements; diff --git a/node_modules/@capacitor/cli/dist/sysconfig.js b/node_modules/@capacitor/cli/dist/sysconfig.js new file mode 100644 index 0000000..149eee5 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/sysconfig.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.writeConfig = exports.readConfig = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const debug_1 = tslib_1.__importDefault(require("debug")); +const path_1 = require("path"); +const cli_1 = require("./util/cli"); +const uuid_1 = require("./util/uuid"); +const debug = (0, debug_1.default)('capacitor:sysconfig'); +const SYSCONFIG_FILE = 'sysconfig.json'; +const SYSCONFIG_PATH = (0, path_1.resolve)(cli_1.ENV_PATHS.config, SYSCONFIG_FILE); +async function readConfig() { + debug('Reading from %O', SYSCONFIG_PATH); + try { + return await (0, utils_fs_1.readJSON)(SYSCONFIG_PATH); + } + catch (e) { + if (e.code !== 'ENOENT') { + throw e; + } + const sysconfig = { + machine: (0, uuid_1.uuidv4)(), + }; + await writeConfig(sysconfig); + return sysconfig; + } +} +exports.readConfig = readConfig; +async function writeConfig(sysconfig) { + debug('Writing to %O', SYSCONFIG_PATH); + await (0, utils_fs_1.mkdirp)((0, path_1.dirname)(SYSCONFIG_PATH)); + await (0, utils_fs_1.writeJSON)(SYSCONFIG_PATH, sysconfig, { spaces: '\t' }); +} +exports.writeConfig = writeConfig; diff --git a/node_modules/@capacitor/cli/dist/tasks/add.js b/node_modules/@capacitor/cli/dist/tasks/add.js new file mode 100644 index 0000000..2bb6a80 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/add.js @@ -0,0 +1,122 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.addCommand = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const utils_terminal_1 = require("@ionic/utils-terminal"); +const add_1 = require("../android/add"); +const common_1 = require("../android/common"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_2 = require("../common"); +const errors_1 = require("../errors"); +const add_2 = require("../ios/add"); +const common_3 = require("../ios/common"); +const log_1 = require("../log"); +const sync_1 = require("./sync"); +async function addCommand(config, selectedPlatformName) { + var _a; + if (selectedPlatformName && !(await (0, common_2.isValidPlatform)(selectedPlatformName))) { + const platformDir = (0, common_2.resolvePlatform)(config, selectedPlatformName); + if (platformDir) { + await (0, common_2.runPlatformHook)(config, selectedPlatformName, platformDir, 'capacitor:add'); + } + else { + let msg = `Platform ${colors_1.default.input(selectedPlatformName)} not found.`; + if (await (0, common_2.isValidCommunityPlatform)(selectedPlatformName)) { + msg += `\nTry installing ${colors_1.default.strong(`@capacitor-community/${selectedPlatformName}`)} and adding the platform again.`; + } + if (await (0, common_2.isValidEnterprisePlatform)(selectedPlatformName)) { + msg += + `\nThis is an enterprise platform and @ionic-enterprise/capacitor-${selectedPlatformName} is not installed.\n` + + `To learn how to use this platform, visit https://ionic.io/docs/${selectedPlatformName}`; + } + log_1.logger.error(msg); + } + } + else { + const knownPlatforms = await (0, common_2.getKnownPlatforms)(); + const platformName = await (0, common_2.promptForPlatform)(knownPlatforms, `Please choose a platform to add:`, selectedPlatformName); + if (platformName === config.web.name) { + webWarning(); + return; + } + const existingPlatformDir = await (0, common_2.getProjectPlatformDirectory)(config, platformName); + if (existingPlatformDir) { + (0, errors_1.fatal)(`${colors_1.default.input(platformName)} platform already exists.\n` + + `To re-add this platform, first remove ${colors_1.default.strong((0, utils_terminal_1.prettyPath)(existingPlatformDir))}, then run this command again.\n` + + `${colors_1.default.strong('WARNING')}: Your native project will be completely removed.`); + } + try { + await (0, common_2.check)([ + () => (0, common_2.checkPackage)(), + () => (0, common_2.checkAppConfig)(config), + ...addChecks(config, platformName), + ]); + await doAdd(config, platformName); + await editPlatforms(config, platformName); + if (await (0, utils_fs_1.pathExists)(config.app.webDirAbs)) { + await (0, sync_1.sync)(config, platformName, false, false); + if (platformName === config.android.name) { + await (0, common_2.runTask)('Syncing Gradle', async () => { + return (0, add_1.createLocalProperties)(config.android.platformDirAbs); + }); + } + } + else { + log_1.logger.warn(`${colors_1.default.success(colors_1.default.strong('sync'))} could not run--missing ${colors_1.default.strong(config.app.webDir)} directory.`); + } + printNextSteps(platformName); + } + catch (e) { + if (!(0, errors_1.isFatal)(e)) { + (0, errors_1.fatal)((_a = e.stack) !== null && _a !== void 0 ? _a : e); + } + throw e; + } + } +} +exports.addCommand = addCommand; +function printNextSteps(platformName) { + (0, log_1.logSuccess)(`${colors_1.default.strong(platformName)} platform added!`); + log_1.output.write(`Follow the Developer Workflow guide to get building:\n${colors_1.default.strong(`https://capacitorjs.com/docs/basics/workflow`)}\n`); +} +function addChecks(config, platformName) { + if (platformName === config.ios.name) { + return [ + () => (0, common_3.checkIOSPackage)(config), + () => (0, common_3.checkBundler)(config) || (0, common_3.checkCocoaPods)(config), + ]; + } + else if (platformName === config.android.name) { + return [() => (0, common_1.checkAndroidPackage)(config)]; + } + else if (platformName === config.web.name) { + return []; + } + else { + throw `Platform ${platformName} is not valid.`; + } +} +async function doAdd(config, platformName) { + await (0, common_2.runTask)(colors_1.default.success(colors_1.default.strong('add')), async () => { + if (platformName === config.ios.name) { + await (0, add_2.addIOS)(config); + } + else if (platformName === config.android.name) { + await (0, add_1.addAndroid)(config); + } + }); +} +async function editPlatforms(config, platformName) { + if (platformName === config.ios.name) { + await (0, common_3.editProjectSettingsIOS)(config); + } + else if (platformName === config.android.name) { + await (0, common_1.editProjectSettingsAndroid)(config); + } +} +function webWarning() { + log_1.logger.error(`Not adding platform ${colors_1.default.strong('web')}.\n` + + `In Capacitor, the web platform is just your web app! For example, if you have a React or Angular project, the web platform is that project.\n` + + `To add Capacitor functionality to your web app, follow the Web Getting Started Guide: ${colors_1.default.strong('https://capacitorjs.com/docs/web')}`); +} diff --git a/node_modules/@capacitor/cli/dist/tasks/build.js b/node_modules/@capacitor/cli/dist/tasks/build.js new file mode 100644 index 0000000..981cad3 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/build.js @@ -0,0 +1,61 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.build = exports.buildCommand = void 0; +const build_1 = require("../android/build"); +const common_1 = require("../common"); +const errors_1 = require("../errors"); +const build_2 = require("../ios/build"); +async function buildCommand(config, selectedPlatformName, buildOptions) { + var _a; + const platforms = await (0, common_1.selectPlatforms)(config, selectedPlatformName); + let platformName; + if (platforms.length === 1) { + platformName = platforms[0]; + } + else { + platformName = await (0, common_1.promptForPlatform)(platforms.filter(createBuildablePlatformFilter(config)), `Please choose a platform to build for:`); + } + const buildCommandOptions = { + scheme: buildOptions.scheme || config.ios.scheme, + flavor: buildOptions.flavor || config.android.flavor, + keystorepath: buildOptions.keystorepath || config.android.buildOptions.keystorePath, + keystorepass: buildOptions.keystorepass || config.android.buildOptions.keystorePassword, + keystorealias: buildOptions.keystorealias || config.android.buildOptions.keystoreAlias, + keystorealiaspass: buildOptions.keystorealiaspass || + config.android.buildOptions.keystoreAliasPassword, + androidreleasetype: buildOptions.androidreleasetype || + config.android.buildOptions.releaseType || + 'AAB', + signingtype: buildOptions.signingtype || + config.android.buildOptions.signingType || + 'jarsigner', + }; + try { + await build(config, platformName, buildCommandOptions); + } + catch (e) { + if (!(0, errors_1.isFatal)(e)) { + (0, errors_1.fatal)((_a = e.stack) !== null && _a !== void 0 ? _a : e); + } + throw e; + } +} +exports.buildCommand = buildCommand; +async function build(config, platformName, buildOptions) { + if (platformName == config.ios.name) { + await (0, build_2.buildiOS)(config, buildOptions); + } + else if (platformName === config.android.name) { + await (0, build_1.buildAndroid)(config, buildOptions); + } + else if (platformName === config.web.name) { + throw `Platform "${platformName}" is not available in the build command.`; + } + else { + throw `Platform "${platformName}" is not valid.`; + } +} +exports.build = build; +function createBuildablePlatformFilter(config) { + return platform => platform === config.ios.name || platform === config.android.name; +} diff --git a/node_modules/@capacitor/cli/dist/tasks/config.js b/node_modules/@capacitor/cli/dist/tasks/config.js new file mode 100644 index 0000000..6e9ac0a --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/config.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.configCommand = void 0; +const tslib_1 = require("tslib"); +const util_1 = tslib_1.__importDefault(require("util")); +const log_1 = require("../log"); +async function configCommand(config, json) { + const evaluatedConfig = await deepAwait(config); + if (json) { + process.stdout.write(`${JSON.stringify(evaluatedConfig)}\n`); + } + else { + log_1.output.write(`${util_1.default.inspect(evaluatedConfig, { depth: Infinity, colors: true })}\n`); + } +} +exports.configCommand = configCommand; +async function deepAwait(obj) { + if (obj && + !Array.isArray(obj) && + typeof obj === 'object' && + obj.constructor === Object) { + const o = {}; + for (const [k, v] of Object.entries(obj)) { + o[k] = await deepAwait(v); + } + return o; + } + else { + return await obj; + } +} diff --git a/node_modules/@capacitor/cli/dist/tasks/copy.js b/node_modules/@capacitor/cli/dist/tasks/copy.js new file mode 100644 index 0000000..ea3c064 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/copy.js @@ -0,0 +1,212 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.copy = exports.copyCommand = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const path_1 = require("path"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_1 = require("../common"); +const cordova_1 = require("../cordova"); +const errors_1 = require("../errors"); +const log_1 = require("../log"); +const plugin_1 = require("../plugin"); +const promise_1 = require("../util/promise"); +const copy_1 = require("../web/copy"); +const sourcemaps_1 = require("./sourcemaps"); +async function copyCommand(config, selectedPlatformName, inline = false) { + var _a; + if (selectedPlatformName && !(await (0, common_1.isValidPlatform)(selectedPlatformName))) { + const platformDir = (0, common_1.resolvePlatform)(config, selectedPlatformName); + if (platformDir) { + await (0, common_1.runPlatformHook)(config, selectedPlatformName, platformDir, 'capacitor:copy'); + } + else { + log_1.logger.error(`Platform ${colors_1.default.input(selectedPlatformName)} not found.`); + } + } + else { + const platforms = await (0, common_1.selectPlatforms)(config, selectedPlatformName); + try { + await (0, promise_1.allSerial)(platforms.map(platformName => () => copy(config, platformName, inline))); + } + catch (e) { + if ((0, errors_1.isFatal)(e)) { + throw e; + } + log_1.logger.error((_a = e.stack) !== null && _a !== void 0 ? _a : e); + } + } +} +exports.copyCommand = copyCommand; +async function copy(config, platformName, inline = false) { + await (0, common_1.runTask)(colors_1.default.success(colors_1.default.strong(`copy ${platformName}`)), async () => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v; + const result = await (0, common_1.checkWebDir)(config); + if (result) { + throw result; + } + await (0, common_1.runPlatformHook)(config, platformName, config.app.rootDir, 'capacitor:copy:before'); + const allPlugins = await (0, plugin_1.getPlugins)(config, platformName); + let usesFederatedCapacitor = false; + if (allPlugins.filter(plugin => plugin.id === '@ionic-enterprise/federated-capacitor').length > 0) { + usesFederatedCapacitor = true; + } + let usesLiveUpdates = false; + if (allPlugins.filter(plugin => plugin.id === '@capacitor/live-updates') + .length > 0) { + usesLiveUpdates = true; + } + let usesSSLPinning = false; + if (allPlugins.filter(plugin => plugin.id === '@ionic-enterprise/ssl-pinning') + .length > 0) { + usesSSLPinning = true; + } + if (platformName === config.ios.name) { + if (usesFederatedCapacitor) { + await copyFederatedWebDirs(config, await config.ios.webDirAbs); + if ((_c = (_b = (_a = config.app.extConfig) === null || _a === void 0 ? void 0 : _a.plugins) === null || _b === void 0 ? void 0 : _b.FederatedCapacitor) === null || _c === void 0 ? void 0 : _c.liveUpdatesKey) { + await copySecureLiveUpdatesKey(config.app.extConfig.plugins.FederatedCapacitor.liveUpdatesKey, config.app.rootDir, config.ios.nativeTargetDirAbs); + } + } + else { + await copyWebDir(config, await config.ios.webDirAbs, config.app.webDirAbs); + } + if (usesLiveUpdates && ((_f = (_e = (_d = config.app.extConfig) === null || _d === void 0 ? void 0 : _d.plugins) === null || _e === void 0 ? void 0 : _e.LiveUpdates) === null || _f === void 0 ? void 0 : _f.key)) { + await copySecureLiveUpdatesKey(config.app.extConfig.plugins.LiveUpdates.key, config.app.rootDir, config.ios.nativeTargetDirAbs); + } + if (usesSSLPinning && ((_j = (_h = (_g = config.app.extConfig) === null || _g === void 0 ? void 0 : _g.plugins) === null || _h === void 0 ? void 0 : _h.SSLPinning) === null || _j === void 0 ? void 0 : _j.certs)) { + await copySSLCert((_k = config.app.extConfig.plugins.SSLPinning) === null || _k === void 0 ? void 0 : _k.certs, config.app.rootDir, await config.ios.webDirAbs); + } + await copyCapacitorConfig(config, config.ios.nativeTargetDirAbs); + const cordovaPlugins = await (0, cordova_1.getCordovaPlugins)(config, platformName); + await (0, cordova_1.handleCordovaPluginsJS)(cordovaPlugins, config, platformName); + } + else if (platformName === config.android.name) { + if (usesFederatedCapacitor) { + await copyFederatedWebDirs(config, config.android.webDirAbs); + if ((_o = (_m = (_l = config.app.extConfig) === null || _l === void 0 ? void 0 : _l.plugins) === null || _m === void 0 ? void 0 : _m.FederatedCapacitor) === null || _o === void 0 ? void 0 : _o.liveUpdatesKey) { + await copySecureLiveUpdatesKey(config.app.extConfig.plugins.FederatedCapacitor.liveUpdatesKey, config.app.rootDir, config.android.assetsDirAbs); + } + } + else { + await copyWebDir(config, config.android.webDirAbs, config.app.webDirAbs); + } + if (usesLiveUpdates && ((_r = (_q = (_p = config.app.extConfig) === null || _p === void 0 ? void 0 : _p.plugins) === null || _q === void 0 ? void 0 : _q.LiveUpdates) === null || _r === void 0 ? void 0 : _r.key)) { + await copySecureLiveUpdatesKey(config.app.extConfig.plugins.LiveUpdates.key, config.app.rootDir, config.android.assetsDirAbs); + } + if (usesSSLPinning && ((_u = (_t = (_s = config.app.extConfig) === null || _s === void 0 ? void 0 : _s.plugins) === null || _t === void 0 ? void 0 : _t.SSLPinning) === null || _u === void 0 ? void 0 : _u.certs)) { + await copySSLCert((_v = config.app.extConfig.plugins.SSLPinning) === null || _v === void 0 ? void 0 : _v.certs, config.app.rootDir, config.android.assetsDirAbs); + } + await copyCapacitorConfig(config, config.android.assetsDirAbs); + const cordovaPlugins = await (0, cordova_1.getCordovaPlugins)(config, platformName); + await (0, cordova_1.handleCordovaPluginsJS)(cordovaPlugins, config, platformName); + await (0, cordova_1.writeCordovaAndroidManifest)(cordovaPlugins, config, platformName); + } + else if (platformName === config.web.name) { + if (usesFederatedCapacitor) { + log_1.logger.info('FederatedCapacitor Plugin installed, skipping web bundling...'); + } + else { + await (0, copy_1.copyWeb)(config); + } + } + else { + throw `Platform ${platformName} is not valid.`; + } + if (inline) { + await (0, sourcemaps_1.inlineSourceMaps)(config, platformName); + } + }); + await (0, common_1.runPlatformHook)(config, platformName, config.app.rootDir, 'capacitor:copy:after'); +} +exports.copy = copy; +async function copyCapacitorConfig(config, nativeAbsDir) { + const nativeRelDir = (0, path_1.relative)(config.app.rootDir, nativeAbsDir); + const nativeConfigFile = 'capacitor.config.json'; + const nativeConfigFilePath = (0, path_1.join)(nativeAbsDir, nativeConfigFile); + await (0, common_1.runTask)(`Creating ${colors_1.default.strong(nativeConfigFile)} in ${nativeRelDir}`, async () => { + var _a; + (_a = config.app.extConfig.android) === null || _a === void 0 ? true : delete _a.buildOptions; + await (0, utils_fs_1.writeJSON)(nativeConfigFilePath, config.app.extConfig, { + spaces: '\t', + }); + }); +} +async function copyWebDir(config, nativeAbsDir, webAbsDir) { + var _a; + const webRelDir = (0, path_1.basename)(webAbsDir); + const nativeRelDir = (0, path_1.relative)(config.app.rootDir, nativeAbsDir); + if (((_a = config.app.extConfig.server) === null || _a === void 0 ? void 0 : _a.url) && !(await (0, utils_fs_1.pathExists)(webAbsDir))) { + log_1.logger.warn(`Cannot copy web assets from ${colors_1.default.strong(webRelDir)} to ${nativeRelDir}\n` + + `Web asset directory specified by ${colors_1.default.input('webDir')} does not exist. This is not an error because ${colors_1.default.input('server.url')} is set in config.`); + return; + } + await (0, common_1.runTask)(`Copying web assets from ${colors_1.default.strong(webRelDir)} to ${nativeRelDir}`, async () => { + await (0, utils_fs_1.remove)(nativeAbsDir); + return (0, utils_fs_1.copy)(webAbsDir, nativeAbsDir); + }); +} +async function copyFederatedWebDirs(config, nativeAbsDir) { + var _a, _b; + log_1.logger.info('FederatedCapacitor Plugin Loaded - Copying Web Assets'); + if (!((_b = (_a = config.app.extConfig) === null || _a === void 0 ? void 0 : _a.plugins) === null || _b === void 0 ? void 0 : _b.FederatedCapacitor)) { + throw `FederatedCapacitor plugin is present but no valid config is defined.`; + } + const federatedConfig = config.app.extConfig.plugins.FederatedCapacitor; + if (federatedConfig) { + if (federatedConfig.shell.name === undefined) { + throw `FederatedCapacitor plugin is present but no valid Shell application is defined in the config.`; + } + if (!federatedConfig.apps.every(isFederatedApp)) { + throw `FederatedCapacitor plugin is present but there is a problem with the apps defined in the config.`; + } + const copyApps = () => { + return federatedConfig.apps.map(app => { + const appDir = (0, path_1.resolve)(config.app.rootDir, app.webDir); + return copyWebDir(config, (0, path_1.resolve)(nativeAbsDir, app.name), appDir); + }); + }; + const copyShell = () => { + return copyWebDir(config, (0, path_1.resolve)(nativeAbsDir, federatedConfig.shell.name), config.app.webDirAbs); + }; + await Promise.all([...copyApps(), copyShell()]); + } +} +function isFederatedApp(config) { + return (config.webDir !== undefined && + config.name !== undefined); +} +async function copySecureLiveUpdatesKey(secureLiveUpdatesKeyFile, rootDir, nativeAbsDir) { + const keyAbsFromPath = (0, path_1.join)(rootDir, secureLiveUpdatesKeyFile); + const keyAbsToPath = (0, path_1.join)(nativeAbsDir, (0, path_1.basename)(keyAbsFromPath)); + const keyRelToDir = (0, path_1.relative)(rootDir, nativeAbsDir); + if (!(await (0, utils_fs_1.pathExists)(keyAbsFromPath))) { + log_1.logger.warn(`Cannot copy Secure Live Updates signature file from ${colors_1.default.strong(keyAbsFromPath)} to ${keyRelToDir}\n` + + `Signature file does not exist at specified key path.`); + return; + } + await (0, common_1.runTask)(`Copying Secure Live Updates key from ${colors_1.default.strong(secureLiveUpdatesKeyFile)} to ${keyRelToDir}`, async () => { + return (0, utils_fs_1.copy)(keyAbsFromPath, keyAbsToPath); + }); +} +async function copySSLCert(sslCertPaths, rootDir, targetDir) { + const validCertPaths = []; + for (const sslCertPath of sslCertPaths) { + const certAbsFromPath = (0, path_1.join)(rootDir, sslCertPath); + if (!(await (0, utils_fs_1.pathExists)(certAbsFromPath))) { + log_1.logger.warn(`Cannot copy SSL Certificate file from ${colors_1.default.strong(certAbsFromPath)}\n` + + `SSL Certificate does not exist at specified path.`); + return; + } + validCertPaths.push(certAbsFromPath); + } + const certsDirAbsToPath = (0, path_1.join)(targetDir, 'certs'); + const certsDirRelToDir = (0, path_1.relative)(rootDir, targetDir); + await (0, common_1.runTask)(`Copying SSL Certificates from to ${certsDirRelToDir}`, async () => { + const promises = []; + for (const certPath of validCertPaths) { + promises.push((0, utils_fs_1.copy)(certPath, (0, path_1.join)(certsDirAbsToPath, (0, path_1.basename)(certPath)))); + } + return Promise.all(promises); + }); +} diff --git a/node_modules/@capacitor/cli/dist/tasks/create.js b/node_modules/@capacitor/cli/dist/tasks/create.js new file mode 100644 index 0000000..3b92c8b --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/create.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createCommand = void 0; +const tslib_1 = require("tslib"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const errors_1 = require("../errors"); +async function createCommand() { + (0, errors_1.fatal)(`The create command has been removed.\n` + + `Use ${colors_1.default.input('npm init @capacitor/app')}`); +} +exports.createCommand = createCommand; diff --git a/node_modules/@capacitor/cli/dist/tasks/doctor.js b/node_modules/@capacitor/cli/dist/tasks/doctor.js new file mode 100644 index 0000000..8fced77 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/doctor.js @@ -0,0 +1,73 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.doctor = exports.doctorCore = exports.doctorCommand = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const doctor_1 = require("../android/doctor"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_1 = require("../common"); +const doctor_2 = require("../ios/doctor"); +const log_1 = require("../log"); +const emoji_1 = require("../util/emoji"); +const node_1 = require("../util/node"); +const subprocess_1 = require("../util/subprocess"); +async function doctorCommand(config, selectedPlatformName) { + log_1.output.write(`${(0, emoji_1.emoji)('💊', '')} ${colors_1.default.strong('Capacitor Doctor')} ${(0, emoji_1.emoji)('💊', '')} \n\n`); + await doctorCore(config); + const platforms = await (0, common_1.selectPlatforms)(config, selectedPlatformName); + await Promise.all(platforms.map(platformName => { + return doctor(config, platformName); + })); +} +exports.doctorCommand = doctorCommand; +async function doctorCore(config) { + const [cliVersion, coreVersion, androidVersion, iosVersion] = await Promise.all([ + (0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor/cli', 'version']), + (0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor/core', 'version']), + (0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor/android', 'version']), + (0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor/ios', 'version']), + ]); + log_1.output.write(`${colors_1.default.strong('Latest Dependencies:')}\n\n` + + ` @capacitor/cli: ${colors_1.default.weak(cliVersion !== null && cliVersion !== void 0 ? cliVersion : 'unknown')}\n` + + ` @capacitor/core: ${colors_1.default.weak(coreVersion !== null && coreVersion !== void 0 ? coreVersion : 'unknown')}\n` + + ` @capacitor/android: ${colors_1.default.weak(androidVersion !== null && androidVersion !== void 0 ? androidVersion : 'unknown')}\n` + + ` @capacitor/ios: ${colors_1.default.weak(iosVersion !== null && iosVersion !== void 0 ? iosVersion : 'unknown')}\n\n` + + `${colors_1.default.strong('Installed Dependencies:')}\n\n`); + await printInstalledPackages(config); + log_1.output.write('\n'); +} +exports.doctorCore = doctorCore; +async function printInstalledPackages(config) { + const packageNames = [ + '@capacitor/cli', + '@capacitor/core', + '@capacitor/android', + '@capacitor/ios', + ]; + await Promise.all(packageNames.map(async (packageName) => { + const packagePath = (0, node_1.resolveNode)(config.app.rootDir, packageName, 'package.json'); + await printPackageVersion(packageName, packagePath); + })); +} +async function printPackageVersion(packageName, packagePath) { + let version; + if (packagePath) { + version = (await (0, utils_fs_1.readJSON)(packagePath)).version; + } + log_1.output.write(` ${packageName}: ${colors_1.default.weak(version || 'not installed')}\n`); +} +async function doctor(config, platformName) { + if (platformName === config.ios.name) { + await (0, doctor_2.doctorIOS)(config); + } + else if (platformName === config.android.name) { + await (0, doctor_1.doctorAndroid)(config); + } + else if (platformName === config.web.name) { + return Promise.resolve(); + } + else { + throw `Platform ${platformName} is not valid.`; + } +} +exports.doctor = doctor; diff --git a/node_modules/@capacitor/cli/dist/tasks/init.js b/node_modules/@capacitor/cli/dist/tasks/init.js new file mode 100644 index 0000000..d15150a --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/init.js @@ -0,0 +1,143 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initCommand = void 0; +const tslib_1 = require("tslib"); +const open_1 = tslib_1.__importDefault(require("open")); +const path_1 = require("path"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_1 = require("../common"); +const config_1 = require("../config"); +const cordova_1 = require("../cordova"); +const errors_1 = require("../errors"); +const framework_configs_1 = require("../framework-configs"); +const log_1 = require("../log"); +const sysconfig_1 = require("../sysconfig"); +const node_1 = require("../util/node"); +const term_1 = require("../util/term"); +async function initCommand(config, name, id, webDirFromCLI) { + var _a, _b, _c, _d; + try { + if (!(0, term_1.checkInteractive)(name, id)) { + return; + } + if (config.app.extConfigType !== 'json') { + (0, errors_1.fatal)(`Cannot run ${colors_1.default.input('init')} for a project using a non-JSON configuration file.\n` + + `Delete ${colors_1.default.strong(config.app.extConfigName)} and try again.`); + } + const isNewConfig = Object.keys(config.app.extConfig).length === 0; + const tsInstalled = !!(0, node_1.resolveNode)(config.app.rootDir, 'typescript'); + const appName = await getName(config, name); + const appId = await getAppId(config, id); + const webDir = (0, term_1.isInteractive)() + ? await getWebDir(config, webDirFromCLI) + : (_a = webDirFromCLI !== null && webDirFromCLI !== void 0 ? webDirFromCLI : config.app.extConfig.webDir) !== null && _a !== void 0 ? _a : 'www'; + await (0, common_1.check)([ + () => (0, common_1.checkAppName)(config, appName), + () => (0, common_1.checkAppId)(config, appId), + ]); + const androidScheme = (_c = (_b = config.app.extConfig.server) === null || _b === void 0 ? void 0 : _b.androidScheme) !== null && _c !== void 0 ? _c : 'https'; + const cordova = await (0, cordova_1.getCordovaPreferences)(config); + await runMergeConfig(config, { + appId, + appName, + webDir, + server: { + androidScheme: androidScheme, + }, + cordova, + }, isNewConfig && tsInstalled ? 'ts' : 'json'); + } + catch (e) { + if (!(0, errors_1.isFatal)(e)) { + log_1.output.write('Usage: npx cap init appName appId\n' + + 'Example: npx cap init "My App" "com.example.myapp"\n\n'); + (0, errors_1.fatal)((_d = e.stack) !== null && _d !== void 0 ? _d : e); + } + throw e; + } +} +exports.initCommand = initCommand; +async function getName(config, name) { + var _a; + if (!name) { + const answers = await (0, log_1.logPrompt)(`${colors_1.default.strong(`What is the name of your app?`)}\n` + + `This should be a human-friendly app name, like what you'd see in the App Store.`, { + type: 'text', + name: 'name', + message: `Name`, + initial: config.app.appName + ? config.app.appName + : (_a = config.app.package.name) !== null && _a !== void 0 ? _a : 'App', + }); + return answers.name; + } + return name; +} +async function getAppId(config, id) { + if (!id) { + const answers = await (0, log_1.logPrompt)(`${colors_1.default.strong(`What should be the Package ID for your app?`)}\n` + + `Package IDs (aka Bundle ID in iOS and Application ID in Android) are unique identifiers for apps. They must be in reverse domain name notation, generally representing a domain name that you or your company owns.`, { + type: 'text', + name: 'id', + message: `Package ID`, + initial: config.app.appId ? config.app.appId : 'com.example.app', + }); + return answers.id; + } + return id; +} +async function getWebDir(config, webDir) { + if (!webDir) { + const framework = (0, framework_configs_1.detectFramework)(config); + if (framework === null || framework === void 0 ? void 0 : framework.webDir) { + return framework.webDir; + } + const answers = await (0, log_1.logPrompt)(`${colors_1.default.strong(`What is the web asset directory for your app?`)}\n` + + `This directory should contain the final ${colors_1.default.strong('index.html')} of your app.`, { + type: 'text', + name: 'webDir', + message: `Web asset directory`, + initial: config.app.webDir ? config.app.webDir : 'www', + }); + return answers.webDir; + } + return webDir; +} +async function runMergeConfig(config, extConfig, type) { + const configDirectory = (0, path_1.dirname)(config.app.extConfigFilePath); + const newConfigPath = (0, path_1.resolve)(configDirectory, type === 'ts' ? config_1.CONFIG_FILE_NAME_TS : config_1.CONFIG_FILE_NAME_JSON); + await (0, common_1.runTask)(`Creating ${colors_1.default.strong((0, path_1.basename)(newConfigPath))} in ${colors_1.default.input(config.app.rootDir)}`, async () => { + await mergeConfig(config, extConfig, newConfigPath); + }); + printNextSteps((0, path_1.basename)(newConfigPath)); + if ((0, term_1.isInteractive)()) { + let sysconfig = await (0, sysconfig_1.readConfig)(); + if (typeof sysconfig.signup === 'undefined') { + const signup = await promptToSignup(); + sysconfig = { ...sysconfig, signup }; + await (0, sysconfig_1.writeConfig)(sysconfig); + } + } +} +async function mergeConfig(config, extConfig, newConfigPath) { + const oldConfig = { ...config.app.extConfig }; + const newConfig = { ...oldConfig, ...extConfig }; + await (0, config_1.writeConfig)(newConfig, newConfigPath); +} +function printNextSteps(newConfigName) { + (0, log_1.logSuccess)(`${colors_1.default.strong(newConfigName)} created!`); + log_1.output.write(`\nNext steps: \n${colors_1.default.strong(`https://capacitorjs.com/docs/getting-started#where-to-go-next`)}\n`); +} +async function promptToSignup() { + const answers = await (0, log_1.logPrompt)(`Join the Ionic Community! 💙\n` + + `Connect with millions of developers on the Ionic Forum and get access to live events, news updates, and more.`, { + type: 'confirm', + name: 'create', + message: `Create free Ionic account?`, + initial: true, + }); + if (answers.create) { + (0, open_1.default)(`http://ionicframework.com/signup?source=capacitor`); + } + return answers.create; +} diff --git a/node_modules/@capacitor/cli/dist/tasks/list.js b/node_modules/@capacitor/cli/dist/tasks/list.js new file mode 100644 index 0000000..a8f05fa --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/list.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.list = exports.listCommand = void 0; +const tslib_1 = require("tslib"); +const common_1 = require("../android/common"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_2 = require("../common"); +const errors_1 = require("../errors"); +const common_3 = require("../ios/common"); +const log_1 = require("../log"); +const plugin_1 = require("../plugin"); +const promise_1 = require("../util/promise"); +async function listCommand(config, selectedPlatformName) { + var _a; + const platforms = await (0, common_2.selectPlatforms)(config, selectedPlatformName); + try { + await (0, promise_1.allSerial)(platforms.map(platformName => () => list(config, platformName))); + } + catch (e) { + if ((0, errors_1.isFatal)(e)) { + throw e; + } + log_1.logger.error((_a = e.stack) !== null && _a !== void 0 ? _a : e); + } +} +exports.listCommand = listCommand; +async function list(config, platform) { + const allPlugins = await (0, plugin_1.getPlugins)(config, platform); + let plugins = []; + if (platform === config.ios.name) { + plugins = await (0, common_3.getIOSPlugins)(allPlugins); + } + else if (platform === config.android.name) { + plugins = await (0, common_1.getAndroidPlugins)(allPlugins); + } + else if (platform === config.web.name) { + log_1.logger.info(`Listing plugins for ${colors_1.default.input(platform)} is not possible.`); + return; + } + else { + throw `Platform ${colors_1.default.input(platform)} is not valid.`; + } + const capacitorPlugins = plugins.filter(p => (0, plugin_1.getPluginType)(p, platform) === 0 /* PluginType.Core */); + (0, plugin_1.printPlugins)(capacitorPlugins, platform); + const cordovaPlugins = plugins.filter(p => (0, plugin_1.getPluginType)(p, platform) === 1 /* PluginType.Cordova */); + (0, plugin_1.printPlugins)(cordovaPlugins, platform, 'cordova'); + const incompatibleCordovaPlugins = plugins.filter(p => (0, plugin_1.getPluginType)(p, platform) === 2 /* PluginType.Incompatible */); + (0, plugin_1.printPlugins)(incompatibleCordovaPlugins, platform, 'incompatible'); +} +exports.list = list; diff --git a/node_modules/@capacitor/cli/dist/tasks/migrate.js b/node_modules/@capacitor/cli/dist/tasks/migrate.js new file mode 100644 index 0000000..ecdc574 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/migrate.js @@ -0,0 +1,611 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.patchOldCapacitorPlugins = exports.migrateCommand = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const path_1 = require("path"); +const rimraf_1 = tslib_1.__importDefault(require("rimraf")); +const common_1 = require("../android/common"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_2 = require("../common"); +const errors_1 = require("../errors"); +const log_1 = require("../log"); +const plugin_1 = require("../plugin"); +const fs_1 = require("../util/fs"); +const node_1 = require("../util/node"); +const subprocess_1 = require("../util/subprocess"); +const template_1 = require("../util/template"); +// eslint-disable-next-line prefer-const +let allDependencies = {}; +const libs = [ + '@capacitor/core', + '@capacitor/cli', + '@capacitor/ios', + '@capacitor/android', +]; +const plugins = [ + '@capacitor/action-sheet', + '@capacitor/app', + '@capacitor/app-launcher', + '@capacitor/browser', + '@capacitor/camera', + '@capacitor/clipboard', + '@capacitor/device', + '@capacitor/dialog', + '@capacitor/filesystem', + '@capacitor/geolocation', + '@capacitor/google-maps', + '@capacitor/haptics', + '@capacitor/keyboard', + '@capacitor/local-notifications', + '@capacitor/motion', + '@capacitor/network', + '@capacitor/preferences', + '@capacitor/push-notifications', + '@capacitor/screen-reader', + '@capacitor/screen-orientation', + '@capacitor/share', + '@capacitor/splash-screen', + '@capacitor/status-bar', + '@capacitor/text-zoom', + '@capacitor/toast', +]; +const coreVersion = '^5.0.0'; +const pluginVersion = '^5.0.0'; +const gradleVersion = '8.0.2'; +let installFailed = false; +async function migrateCommand(config, noprompt, packagemanager) { + if (config === null) { + (0, errors_1.fatal)('Config data missing'); + } + const capMajor = await checkCapacitorMajorVersion(config); + if (capMajor < 4) { + (0, errors_1.fatal)('Migrate can only be used on capacitor 4 and above, please use the CLI in Capacitor 4 to upgrade to 4 first'); + } + const jdkMajor = await (0, common_2.checkJDKMajorVersion)(); + if (jdkMajor < 17) { + log_1.logger.warn('Capacitor 5 requires JDK 17 or higher. Some steps may fail.'); + } + const variablesAndClasspaths = await getAndroidVariablesAndClasspaths(config); + if (!variablesAndClasspaths) { + (0, errors_1.fatal)('Variable and Classpath info could not be read.'); + } + allDependencies = { + ...config.app.package.dependencies, + ...config.app.package.devDependencies, + }; + const monorepoWarning = 'Please note this tool is not intended for use in a mono-repo enviroment, please check out the Ionic vscode extension for this functionality.'; + log_1.logger.info(monorepoWarning); + const { migrateconfirm } = noprompt + ? { migrateconfirm: 'y' } + : await (0, log_1.logPrompt)(`Capacitor 5 sets a deployment target of iOS 13 and Android 13 (SDK 33). \n`, { + type: 'text', + name: 'migrateconfirm', + message: `Are you sure you want to migrate? (Y/n)`, + initial: 'y', + }); + if (typeof migrateconfirm === 'string' && + migrateconfirm.toLowerCase() === 'y') { + try { + const { depInstallConfirm } = noprompt + ? { depInstallConfirm: 'y' } + : await (0, log_1.logPrompt)(`Would you like the migrator to run npm, yarn, or pnpm install to install the latest versions of capacitor packages? (Those using other package managers should answer N)`, { + type: 'text', + name: 'depInstallConfirm', + message: `Run Dependency Install? (Y/n)`, + initial: 'y', + }); + const runNpmInstall = typeof depInstallConfirm === 'string' && + depInstallConfirm.toLowerCase() === 'y'; + let installerType = 'npm'; + if (runNpmInstall) { + const { manager } = packagemanager + ? { manager: packagemanager } + : await (0, log_1.logPrompt)('What dependency manager do you use?', { + type: 'select', + name: 'manager', + message: `Dependency Management Tool`, + choices: [ + { title: 'NPM', value: 'npm' }, + { title: 'Yarn', value: 'yarn' }, + { title: 'PNPM', value: 'pnpm' }, + ], + initial: 0, + }); + installerType = manager; + } + try { + await (0, common_2.runTask)(`Installing Latest Modules using ${installerType}.`, () => { + return installLatestLibs(installerType, runNpmInstall, config); + }); + } + catch (ex) { + log_1.logger.error(`${installerType} install failed. Try deleting node_modules folder and running ${colors_1.default.input(`${installerType} install --force`)} manually.`); + installFailed = true; + } + // Update iOS Projects + if (allDependencies['@capacitor/ios'] && + (0, utils_fs_1.existsSync)(config.ios.platformDirAbs)) { + //Update icon to single 1024 x 1024 icon + await (0, common_2.runTask)('Update App Icon to only 1024 x 1024', () => { + return updateAppIcons(config); + }); + //Remove Podfile.lock from .gitignore + await (0, common_2.runTask)('Remove Podfile.lock from iOS .gitignore', () => { + return updateIosGitIgnore((0, path_1.join)(config.ios.platformDirAbs, '.gitignore')); + }); + } + if (allDependencies['@capacitor/android'] && + (0, utils_fs_1.existsSync)(config.android.platformDirAbs)) { + await (0, common_2.runTask)(`Migrating build.gradle file.`, () => { + return updateBuildGradle((0, path_1.join)(config.android.platformDirAbs, 'build.gradle'), variablesAndClasspaths); + }); + // Remove enableJetifier + await (0, common_2.runTask)('Remove android.enableJetifier=true from gradle.properties', () => { + return updateGradleProperties((0, path_1.join)(config.android.platformDirAbs, 'gradle.properties')); + }); + // Move package from android manifest + await (0, common_2.runTask)('Migrating package from Manifest to build.gradle', () => { + return movePackageFromManifestToBuildGradle((0, path_1.join)(config.android.platformDirAbs, 'app', 'src', 'main', 'AndroidManifest.xml'), (0, path_1.join)(config.android.platformDirAbs, 'app', 'build.gradle')); + }); + // Update gradle-wrapper.properties + await (0, common_2.runTask)(`Migrating gradle-wrapper.properties by updating gradle version to ${gradleVersion}.`, () => { + return updateGradleWrapper((0, path_1.join)(config.android.platformDirAbs, 'gradle', 'wrapper', 'gradle-wrapper.properties')); + }); + // Variables gradle + await (0, common_2.runTask)(`Migrating variables.gradle file.`, () => { + return (async () => { + const variablesPath = (0, path_1.join)(config.android.platformDirAbs, 'variables.gradle'); + let txt = readFile(variablesPath); + if (!txt) { + return; + } + txt = txt.replace(/= {2}'/g, `= '`); + (0, utils_fs_1.writeFileSync)(variablesPath, txt, { encoding: 'utf-8' }); + for (const variable of Object.keys(variablesAndClasspaths.variables)) { + if (!(await updateFile(config, variablesPath, `${variable} = '`, `'`, variablesAndClasspaths.variables[variable].toString(), true))) { + const didWork = await updateFile(config, variablesPath, `${variable} = `, `\n`, variablesAndClasspaths.variables[variable].toString(), true); + if (!didWork) { + let file = readFile(variablesPath); + if (file) { + file = file.replace('}', ` ${variable} = '${variablesAndClasspaths.variables[variable].toString()}'\n}`); + (0, utils_fs_1.writeFileSync)(variablesPath, file); + } + } + } + } + const pluginVariables = { + firebaseMessagingVersion: '23.1.2', + playServicesLocationVersion: '21.0.1', + androidxBrowserVersion: '1.5.0', + androidxMaterialVersion: '1.8.0', + androidxExifInterfaceVersion: '1.3.6', + androidxCoreKTXVersion: '1.10.0', + googleMapsPlayServicesVersion: '18.1.0', + googleMapsUtilsVersion: '3.4.0', + googleMapsKtxVersion: '3.4.0', + googleMapsUtilsKtxVersion: '3.4.0', + kotlinxCoroutinesVersion: '1.6.4', + }; + for (const variable of Object.keys(pluginVariables)) { + await updateFile(config, variablesPath, `${variable} = '`, `'`, pluginVariables[variable], true); + } + })(); + }); + rimraf_1.default.sync((0, path_1.join)(config.android.appDirAbs, 'build')); + if (!installFailed) { + await (0, common_2.runTask)('Migrating package from Manifest to build.gradle in Capacitor plugins', () => { + return patchOldCapacitorPlugins(config); + }); + } + else { + log_1.logger.warn('Skipped migrating package from Manifest to build.gradle in Capacitor plugins'); + } + } + if (!installFailed) { + // Run Cap Sync + await (0, common_2.runTask)(`Running cap sync.`, () => { + return (0, subprocess_1.getCommandOutput)('npx', ['cap', 'sync']); + }); + } + else { + log_1.logger.warn('Skipped Running cap sync.'); + } + if (allDependencies['@capacitor/android'] && + (0, utils_fs_1.existsSync)(config.android.platformDirAbs)) { + if (!installFailed) { + try { + await (0, common_2.runTask)(`Upgrading gradle wrapper files`, () => { + return updateGradleWrapperFiles(config.android.platformDirAbs); + }); + } + catch (e) { + if (e.includes('EACCES')) { + log_1.logger.error(`gradlew file does not have executable permissions. This can happen if the Android platform was added on a Windows machine. Please run ${colors_1.default.input(`chmod +x ./${config.android.platformDir}/gradlew`)} and ${colors_1.default.input(`cd ${config.android.platformDir} && ./gradlew wrapper --distribution-type all --gradle-version ${gradleVersion} --warning-mode all`)} to update the files manually`); + } + else { + log_1.logger.error(`gradle wrapper files were not updated`); + } + } + } + else { + log_1.logger.warn('Skipped upgrading gradle wrapper files'); + } + } + // Write all breaking changes + await (0, common_2.runTask)(`Writing breaking changes.`, () => { + return writeBreakingChanges(); + }); + if (!installFailed) { + (0, log_1.logSuccess)(`Migration to Capacitor ${coreVersion} is complete. Run and test your app!`); + } + else { + log_1.logger.warn(`Migration to Capacitor ${coreVersion} is incomplete. Check the log messages for more information.`); + } + } + catch (err) { + (0, errors_1.fatal)(`Failed to migrate: ${err}`); + } + } + else { + (0, errors_1.fatal)(`User canceled migration.`); + } +} +exports.migrateCommand = migrateCommand; +async function checkCapacitorMajorVersion(config) { + var _a; + const capacitorVersion = await (0, common_2.getCoreVersion)(config); + const versionArray = (_a = capacitorVersion.match(/([0-9]+)\.([0-9]+)\.([0-9]+)/)) !== null && _a !== void 0 ? _a : []; + const majorVersion = parseInt(versionArray[1]); + return majorVersion; +} +async function installLatestLibs(dependencyManager, runInstall, config) { + const pkgJsonPath = (0, path_1.join)(config.app.rootDir, 'package.json'); + const pkgJsonFile = readFile(pkgJsonPath); + if (!pkgJsonFile) { + return; + } + const pkgJson = JSON.parse(pkgJsonFile); + for (const devDepKey of Object.keys(pkgJson['devDependencies'] || {})) { + if (libs.includes(devDepKey)) { + pkgJson['devDependencies'][devDepKey] = coreVersion; + } + else if (plugins.includes(devDepKey)) { + pkgJson['devDependencies'][devDepKey] = pluginVersion; + } + } + for (const depKey of Object.keys(pkgJson['dependencies'] || {})) { + if (libs.includes(depKey)) { + pkgJson['dependencies'][depKey] = coreVersion; + } + else if (plugins.includes(depKey)) { + pkgJson['dependencies'][depKey] = pluginVersion; + } + } + (0, utils_fs_1.writeFileSync)(pkgJsonPath, JSON.stringify(pkgJson, null, 2), { + encoding: 'utf-8', + }); + if (runInstall) { + rimraf_1.default.sync((0, path_1.join)(config.app.rootDir, 'node_modules/@capacitor/!(cli)')); + await (0, subprocess_1.runCommand)(dependencyManager, ['install']); + if (dependencyManager == 'yarn') { + await (0, subprocess_1.runCommand)(dependencyManager, ['upgrade']); + } + else { + await (0, subprocess_1.runCommand)(dependencyManager, ['update']); + } + } + else { + log_1.logger.info(`Please run an install command with your package manager of choice. (ex: yarn install)`); + } +} +async function writeBreakingChanges() { + const breaking = [ + '@capacitor/camera', + '@capacitor/device', + '@capacitor/local-notifications', + '@capacitor/push-notifications', + ]; + const broken = []; + for (const lib of breaking) { + if (allDependencies[lib]) { + broken.push(lib); + } + } + if (broken.length > 0) { + log_1.logger.info(`IMPORTANT: Review https://capacitorjs.com/docs/updating/5-0#plugins for breaking changes in these plugins that you use: ${broken.join(', ')}.`); + } +} +async function getAndroidVariablesAndClasspaths(config) { + const tempAndroidTemplateFolder = (0, path_1.join)(config.cli.assetsDirAbs, 'tempAndroidTemplate'); + await (0, template_1.extractTemplate)(config.cli.assets.android.platformTemplateArchiveAbs, tempAndroidTemplateFolder); + const variablesGradleFile = readFile((0, path_1.join)(tempAndroidTemplateFolder, 'variables.gradle')); + const buildGradleFile = readFile((0, path_1.join)(tempAndroidTemplateFolder, 'build.gradle')); + if (!variablesGradleFile || !buildGradleFile) { + return; + } + (0, fs_1.deleteFolderRecursive)(tempAndroidTemplateFolder); + const firstIndxOfCATBGV = buildGradleFile.indexOf(`classpath 'com.android.tools.build:gradle:`) + 42; + const firstIndxOfCGGGS = buildGradleFile.indexOf(`com.google.gms:google-services:`) + 31; + const comAndroidToolsBuildGradleVersion = '' + + buildGradleFile.substring(firstIndxOfCATBGV, buildGradleFile.indexOf("'", firstIndxOfCATBGV)); + const comGoogleGmsGoogleServices = '' + + buildGradleFile.substring(firstIndxOfCGGGS, buildGradleFile.indexOf("'", firstIndxOfCGGGS)); + const variablesGradleAsJSON = JSON.parse(variablesGradleFile + .replace('ext ', '') + .replace(/=/g, ':') + .replace(/\n/g, ',') + .replace(/,([^:]+):/g, function (_k, p1) { + return `,"${p1}":`; + }) + .replace('{,', '{') + .replace(',}', '}') + .replace(/\s/g, '') + .replace(/'/g, '"')); + return { + 'variables': variablesGradleAsJSON, + 'com.android.tools.build:gradle': comAndroidToolsBuildGradleVersion, + 'com.google.gms:google-services': comGoogleGmsGoogleServices, + }; +} +function readFile(filename) { + try { + if (!(0, utils_fs_1.existsSync)(filename)) { + log_1.logger.error(`Unable to find ${filename}. Try updating it manually`); + return; + } + return (0, utils_fs_1.readFileSync)(filename, 'utf-8'); + } + catch (err) { + log_1.logger.error(`Unable to read ${filename}. Verify it is not already open. ${err}`); + } +} +async function updateGradleWrapper(filename) { + const txt = readFile(filename); + if (!txt) { + return; + } + const replaced = setAllStringIn(txt, 'distributionUrl=', '\n', + // eslint-disable-next-line no-useless-escape + `https\\://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip`); + (0, utils_fs_1.writeFileSync)(filename, replaced, 'utf-8'); +} +async function updateGradleWrapperFiles(platformDir) { + await (0, subprocess_1.runCommand)(`./gradlew`, [ + 'wrapper', + '--distribution-type', + 'all', + '--gradle-version', + gradleVersion, + '--warning-mode', + 'all', + ], { + cwd: platformDir, + }); +} +async function updateIosGitIgnore(filename) { + const txt = readFile(filename); + if (!txt) { + return; + } + const lines = txt.split('\n'); + let linesToKeep = ''; + for (const line of lines) { + // check for enableJetifier + const podfileMatch = line.match(/.+Podfile\.lock/) || []; + if (podfileMatch.length == 0) { + linesToKeep += line + '\n'; + } + } + (0, utils_fs_1.writeFileSync)(filename, linesToKeep, { encoding: 'utf-8' }); +} +async function updateAppIcons(config) { + const iconToKeep = 'AppIcon-512@2x.png'; + const contentsFile = 'Contents.json'; + const newContentsFileContents = `{ + "images" : [ + { + "filename" : "${iconToKeep}", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +}`; + const path = (0, path_1.join)(config.ios.platformDirAbs, 'App', 'App', 'Assets.xcassets', 'AppIcon.appiconset'); + if (!(0, utils_fs_1.existsSync)(path)) { + log_1.logger.error(`Unable to find ${path}. Try updating it manually`); + return; + } + if (!(0, utils_fs_1.existsSync)((0, path_1.join)(path, iconToKeep))) { + log_1.logger.error(`Unable to find ${iconToKeep}. Try updating it manually`); + return; + } + if (!(0, utils_fs_1.existsSync)((0, path_1.join)(path, contentsFile))) { + log_1.logger.error(`Unable to find ${path}. Try updating it manually`); + return; + } + const filenames = (0, utils_fs_1.readdirSync)(path); + for (const filename of filenames) { + if (filename != iconToKeep && filename != contentsFile) { + (0, utils_fs_1.removeSync)((0, path_1.join)(path, filename)); + } + } + (0, utils_fs_1.writeFileSync)((0, path_1.join)(path, contentsFile), newContentsFileContents); +} +async function updateGradleProperties(filename) { + const txt = readFile(filename); + if (!txt) { + return; + } + const lines = txt.split('\n'); + let linesToKeep = ''; + for (const line of lines) { + // check for enableJetifier + const jetifierMatch = line.match(/android\.enableJetifier\s*=\s*true/) || []; + const commentMatch = line.match(/# Automatically convert third-party libraries to use AndroidX/) || []; + if (jetifierMatch.length == 0 && commentMatch.length == 0) { + linesToKeep += line + '\n'; + } + } + (0, utils_fs_1.writeFileSync)(filename, linesToKeep, { encoding: 'utf-8' }); +} +async function movePackageFromManifestToBuildGradle(manifestFilename, buildGradleFilename) { + const manifestText = readFile(manifestFilename); + const buildGradleText = readFile(buildGradleFilename); + if (!manifestText) { + log_1.logger.error(`Could not read ${manifestFilename}. Check its permissions and if it exists.`); + return; + } + if (!buildGradleText) { + log_1.logger.error(`Could not read ${buildGradleFilename}. Check its permissions and if it exists.`); + return; + } + const namespaceExists = new RegExp(/\s+namespace\s+/).test(buildGradleText); + if (namespaceExists) { + log_1.logger.error('Found namespace in build.gradle already, skipping migration'); + return; + } + let packageName; + const manifestRegEx = new RegExp(/package="([^"]+)"/); + const manifestResults = manifestRegEx.exec(manifestText); + if (manifestResults === null) { + log_1.logger.error(`Unable to update Android Manifest. Package not found.`); + return; + } + else { + packageName = manifestResults[1]; + } + let manifestReplaced = manifestText; + manifestReplaced = manifestReplaced.replace(manifestRegEx, ''); + if (manifestText == manifestReplaced) { + log_1.logger.error(`Unable to update Android Manifest: no changes were detected in Android Manifest file`); + return; + } + let buildGradleReplaced = buildGradleText; + buildGradleReplaced = setAllStringIn(buildGradleText, 'android {', '\n', `\n namespace "${packageName}"`); + if (buildGradleText == buildGradleReplaced) { + log_1.logger.error(`Unable to update buildGradleText: no changes were detected in Android Manifest file`); + return; + } + (0, utils_fs_1.writeFileSync)(manifestFilename, manifestReplaced, 'utf-8'); + (0, utils_fs_1.writeFileSync)(buildGradleFilename, buildGradleReplaced, 'utf-8'); +} +async function updateBuildGradle(filename, variablesAndClasspaths) { + // In build.gradle add dependencies: + // classpath 'com.android.tools.build:gradle:8.0.0' + // classpath 'com.google.gms:google-services:4.3.15' + const txt = readFile(filename); + if (!txt) { + return; + } + const neededDeps = { + 'com.android.tools.build:gradle': variablesAndClasspaths['com.android.tools.build:gradle'], + 'com.google.gms:google-services': variablesAndClasspaths['com.google.gms:google-services'], + }; + let replaced = txt; + for (const dep of Object.keys(neededDeps)) { + if (replaced.includes(`classpath '${dep}`)) { + const semver = await Promise.resolve().then(() => tslib_1.__importStar(require('semver'))); + const firstIndex = replaced.indexOf(dep) + dep.length + 1; + const existingVersion = '' + replaced.substring(firstIndex, replaced.indexOf("'", firstIndex)); + if (semver.gte(neededDeps[dep], existingVersion)) { + replaced = setAllStringIn(replaced, `classpath '${dep}:`, `'`, neededDeps[dep]); + log_1.logger.info(`Set ${dep} = ${neededDeps[dep]}.`); + } + } + } + (0, utils_fs_1.writeFileSync)(filename, replaced, 'utf-8'); +} +async function updateFile(config, filename, textStart, textEnd, replacement, skipIfNotFound) { + if (config === null) { + return false; + } + const path = filename; + let txt = readFile(path); + if (!txt) { + return false; + } + if (txt.includes(textStart)) { + if (replacement) { + txt = setAllStringIn(txt, textStart, textEnd, replacement); + (0, utils_fs_1.writeFileSync)(path, txt, { encoding: 'utf-8' }); + } + else { + // Replacing in code so we need to count the number of brackets to find the end of the function in swift + const lines = txt.split('\n'); + let replaced = ''; + let keep = true; + let brackets = 0; + for (const line of lines) { + if (line.includes(textStart)) { + keep = false; + } + if (!keep) { + brackets += (line.match(/{/g) || []).length; + brackets -= (line.match(/}/g) || []).length; + if (brackets == 0) { + keep = true; + } + } + else { + replaced += line + '\n'; + } + } + (0, utils_fs_1.writeFileSync)(path, replaced, { encoding: 'utf-8' }); + } + return true; + } + else if (!skipIfNotFound) { + log_1.logger.error(`Unable to find "${textStart}" in ${filename}. Try updating it manually`); + } + return false; +} +function setAllStringIn(data, start, end, replacement) { + let position = 0; + let result = data; + let replaced = true; + while (replaced) { + const foundIdx = result.indexOf(start, position); + if (foundIdx == -1) { + replaced = false; + } + else { + const idx = foundIdx + start.length; + position = idx + replacement.length; + result = + result.substring(0, idx) + + replacement + + result.substring(result.indexOf(end, idx)); + } + } + return result; +} +async function patchOldCapacitorPlugins(config) { + const allPlugins = await (0, plugin_1.getPlugins)(config, 'android'); + const androidPlugins = await (0, common_1.getAndroidPlugins)(allPlugins); + return await Promise.all(androidPlugins.map(async (p) => { + var _a, _b; + if ((_b = (_a = p.manifest) === null || _a === void 0 ? void 0 : _a.android) === null || _b === void 0 ? void 0 : _b.src) { + const buildGradlePath = (0, node_1.resolveNode)(config.app.rootDir, p.id, p.manifest.android.src, 'build.gradle'); + const manifestPath = (0, node_1.resolveNode)(config.app.rootDir, p.id, p.manifest.android.src, 'src', 'main', 'AndroidManifest.xml'); + if (buildGradlePath && manifestPath) { + const gradleContent = readFile(buildGradlePath); + if (!(gradleContent === null || gradleContent === void 0 ? void 0 : gradleContent.includes('namespace'))) { + if (plugins.includes(p.id)) { + log_1.logger.warn(`You are using an outdated version of ${p.id}, update the plugin to version ${pluginVersion}`); + } + else { + log_1.logger.warn(`${p.id}@${p.version} doesn't officially support Capacitor ${coreVersion} yet, doing our best moving it's package to build.gradle so it builds`); + } + movePackageFromManifestToBuildGradle(manifestPath, buildGradlePath); + } + } + } + })); +} +exports.patchOldCapacitorPlugins = patchOldCapacitorPlugins; diff --git a/node_modules/@capacitor/cli/dist/tasks/new-plugin.js b/node_modules/@capacitor/cli/dist/tasks/new-plugin.js new file mode 100644 index 0000000..5dd5f53 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/new-plugin.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.newPluginCommand = void 0; +const tslib_1 = require("tslib"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const errors_1 = require("../errors"); +async function newPluginCommand() { + (0, errors_1.fatal)(`The plugin:generate command has been removed.\n` + + `Use ${colors_1.default.input('npm init @capacitor/plugin')}`); +} +exports.newPluginCommand = newPluginCommand; diff --git a/node_modules/@capacitor/cli/dist/tasks/open.js b/node_modules/@capacitor/cli/dist/tasks/open.js new file mode 100644 index 0000000..58f928b --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/open.js @@ -0,0 +1,62 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.open = exports.openCommand = void 0; +const tslib_1 = require("tslib"); +const open_1 = require("../android/open"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_1 = require("../common"); +const errors_1 = require("../errors"); +const open_2 = require("../ios/open"); +const log_1 = require("../log"); +async function openCommand(config, selectedPlatformName) { + var _a; + if (selectedPlatformName && !(await (0, common_1.isValidPlatform)(selectedPlatformName))) { + const platformDir = (0, common_1.resolvePlatform)(config, selectedPlatformName); + if (platformDir) { + await (0, common_1.runPlatformHook)(config, selectedPlatformName, platformDir, 'capacitor:open'); + } + else { + log_1.logger.error(`Platform ${colors_1.default.input(selectedPlatformName)} not found.`); + } + } + else { + const platforms = await (0, common_1.selectPlatforms)(config, selectedPlatformName); + let platformName; + if (platforms.length === 1) { + platformName = platforms[0]; + } + else { + platformName = await (0, common_1.promptForPlatform)(platforms.filter(createOpenablePlatformFilter(config)), `Please choose a platform to open:`); + } + try { + await open(config, platformName); + } + catch (e) { + if (!(0, errors_1.isFatal)(e)) { + (0, errors_1.fatal)((_a = e.stack) !== null && _a !== void 0 ? _a : e); + } + throw e; + } + } +} +exports.openCommand = openCommand; +function createOpenablePlatformFilter(config) { + return platform => platform === config.ios.name || platform === config.android.name; +} +async function open(config, platformName) { + if (platformName === config.ios.name) { + await (0, common_1.runTask)('Opening the Xcode workspace...', () => { + return (0, open_2.openIOS)(config); + }); + } + else if (platformName === config.android.name) { + return (0, open_1.openAndroid)(config); + } + else if (platformName === config.web.name) { + return Promise.resolve(); + } + else { + throw `Platform ${platformName} is not valid.`; + } +} +exports.open = open; diff --git a/node_modules/@capacitor/cli/dist/tasks/run.js b/node_modules/@capacitor/cli/dist/tasks/run.js new file mode 100644 index 0000000..12b83b2 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/run.js @@ -0,0 +1,114 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.run = exports.runCommand = void 0; +const tslib_1 = require("tslib"); +const utils_process_1 = require("@ionic/utils-process"); +const utils_terminal_1 = require("@ionic/utils-terminal"); +const run_1 = require("../android/run"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_1 = require("../common"); +const cordova_1 = require("../cordova"); +const errors_1 = require("../errors"); +const run_2 = require("../ios/run"); +const log_1 = require("../log"); +const livereload_1 = require("../util/livereload"); +const native_run_1 = require("../util/native-run"); +const sync_1 = require("./sync"); +async function runCommand(config, selectedPlatformName, options) { + var _a, _b, _c, _d; + options.host = + (_b = (_a = options.host) !== null && _a !== void 0 ? _a : livereload_1.CapLiveReloadHelper.getIpAddress()) !== null && _b !== void 0 ? _b : 'localhost'; + options.port = (_c = options.port) !== null && _c !== void 0 ? _c : '3000'; + if (selectedPlatformName && !(await (0, common_1.isValidPlatform)(selectedPlatformName))) { + const platformDir = (0, common_1.resolvePlatform)(config, selectedPlatformName); + if (platformDir) { + await (0, common_1.runPlatformHook)(config, selectedPlatformName, platformDir, 'capacitor:run'); + } + else { + log_1.logger.error(`Platform ${colors_1.default.input(selectedPlatformName)} not found.`); + } + } + else { + const platforms = await (0, common_1.selectPlatforms)(config, selectedPlatformName); + let platformName; + if (platforms.length === 1) { + platformName = platforms[0]; + } + else { + platformName = await (0, common_1.promptForPlatform)(platforms.filter(createRunnablePlatformFilter(config)), `Please choose a platform to run:`); + } + if (options.list) { + const targets = await (0, native_run_1.getPlatformTargets)(platformName); + const outputTargets = targets.map(t => { + var _a; + return ({ + name: (0, common_1.getPlatformTargetName)(t), + api: `${t.platform === 'ios' ? 'iOS' : 'API'} ${t.sdkVersion}`, + id: (_a = t.id) !== null && _a !== void 0 ? _a : '?', + }); + }); + // TODO: make hidden commander option (https://github.com/tj/commander.js/issues/1106) + if (process.argv.includes('--json')) { + process.stdout.write(`${JSON.stringify(outputTargets)}\n`); + } + else { + const rows = outputTargets.map(t => [t.name, t.api, t.id]); + log_1.output.write(`${(0, utils_terminal_1.columnar)(rows, { + headers: ['Name', 'API', 'Target ID'], + vsep: ' ', + })}\n`); + } + return; + } + try { + if (options.sync) { + await (0, sync_1.sync)(config, platformName, false, true); + } + const cordovaPlugins = await (0, cordova_1.getCordovaPlugins)(config, platformName); + if (options.liveReload) { + await livereload_1.CapLiveReloadHelper.editCapConfigForLiveReload(config, platformName, options); + if (platformName === config.android.name) { + await await (0, cordova_1.writeCordovaAndroidManifest)(cordovaPlugins, config, platformName, true); + } + } + await run(config, platformName, options); + if (options.liveReload) { + new Promise(resolve => process.on('SIGINT', resolve)) + .then(async () => { + await livereload_1.CapLiveReloadHelper.revertCapConfigForLiveReload(); + if (platformName === config.android.name) { + await (0, cordova_1.writeCordovaAndroidManifest)(cordovaPlugins, config, platformName, false); + } + }) + .then(() => process.exit()); + log_1.logger.info(`App running with live reload listing for: http://${options.host}:${options.port}. Press Ctrl+C to quit.`); + await (0, utils_process_1.sleepForever)(); + } + } + catch (e) { + if (!(0, errors_1.isFatal)(e)) { + (0, errors_1.fatal)((_d = e.stack) !== null && _d !== void 0 ? _d : e); + } + throw e; + } + } +} +exports.runCommand = runCommand; +async function run(config, platformName, options) { + if (platformName == config.ios.name) { + await (0, run_2.runIOS)(config, options); + } + else if (platformName === config.android.name) { + await (0, run_1.runAndroid)(config, options); + } + else if (platformName === config.web.name) { + return; + } + else { + throw `Platform ${platformName} is not valid.`; + } +} +exports.run = run; +function createRunnablePlatformFilter(config) { + return platform => platform === config.ios.name || platform === config.android.name; +} diff --git a/node_modules/@capacitor/cli/dist/tasks/serve.js b/node_modules/@capacitor/cli/dist/tasks/serve.js new file mode 100644 index 0000000..bad369f --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/serve.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.serveCommand = void 0; +const tslib_1 = require("tslib"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const errors_1 = require("../errors"); +async function serveCommand() { + (0, errors_1.fatal)(`The serve command has been removed.\n` + + `Use a third-party tool for serving single page apps, such as ${colors_1.default.strong('serve')}: ${colors_1.default.strong('https://www.npmjs.com/package/serve')}`); +} +exports.serveCommand = serveCommand; diff --git a/node_modules/@capacitor/cli/dist/tasks/sourcemaps.js b/node_modules/@capacitor/cli/dist/tasks/sourcemaps.js new file mode 100644 index 0000000..a4396f4 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/sourcemaps.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.inlineSourceMaps = void 0; +const utils_fs_1 = require("@ionic/utils-fs"); +const path_1 = require("path"); +const log_1 = require("../log"); +function walkDirectory(dirPath) { + const files = (0, utils_fs_1.readdirSync)(dirPath); + files.forEach(file => { + const targetFile = (0, path_1.join)(dirPath, file); + if ((0, utils_fs_1.existsSync)(targetFile) && (0, utils_fs_1.lstatSync)(targetFile).isDirectory()) { + walkDirectory(targetFile); + } + else { + const mapFile = (0, path_1.join)(dirPath, `${file}.map`); + if ((0, path_1.extname)(file) === '.js' && (0, utils_fs_1.existsSync)(mapFile)) { + const bufMap = (0, utils_fs_1.readFileSync)(mapFile).toString('base64'); + const bufFile = (0, utils_fs_1.readFileSync)(targetFile, 'utf8'); + const result = bufFile.replace(`sourceMappingURL=${file}.map`, 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + + bufMap); + (0, utils_fs_1.writeFileSync)(targetFile, result); + (0, utils_fs_1.unlinkSync)(mapFile); + } + } + }); +} +async function inlineSourceMaps(config, platformName) { + let buildDir = ''; + if (platformName == config.ios.name) { + buildDir = await config.ios.webDirAbs; + } + if (platformName == config.android.name) { + buildDir = await config.android.webDirAbs; + } + if (buildDir) { + log_1.logger.info('Inlining sourcemaps'); + walkDirectory(buildDir); + } +} +exports.inlineSourceMaps = inlineSourceMaps; diff --git a/node_modules/@capacitor/cli/dist/tasks/sync.js b/node_modules/@capacitor/cli/dist/tasks/sync.js new file mode 100644 index 0000000..4e1fb86 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/sync.js @@ -0,0 +1,59 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sync = exports.syncCommand = void 0; +const common_1 = require("../common"); +const errors_1 = require("../errors"); +const log_1 = require("../log"); +const promise_1 = require("../util/promise"); +const copy_1 = require("./copy"); +const update_1 = require("./update"); +/** + * Sync is a copy and an update in one. + */ +async function syncCommand(config, selectedPlatformName, deployment, inline = false) { + var _a, _b; + if (selectedPlatformName && !(await (0, common_1.isValidPlatform)(selectedPlatformName))) { + try { + await (0, copy_1.copyCommand)(config, selectedPlatformName, inline); + } + catch (e) { + log_1.logger.error((_a = e.stack) !== null && _a !== void 0 ? _a : e); + } + await (0, update_1.updateCommand)(config, selectedPlatformName, deployment); + } + else { + const then = +new Date(); + const platforms = await (0, common_1.selectPlatforms)(config, selectedPlatformName); + try { + await (0, common_1.check)([ + () => (0, common_1.checkPackage)(), + () => (0, common_1.checkWebDir)(config), + ...(0, update_1.updateChecks)(config, platforms), + ]); + await (0, promise_1.allSerial)(platforms.map(platformName => () => sync(config, platformName, deployment, inline))); + const now = +new Date(); + const diff = (now - then) / 1000; + log_1.logger.info(`Sync finished in ${diff}s`); + } + catch (e) { + if (!(0, errors_1.isFatal)(e)) { + (0, errors_1.fatal)((_b = e.stack) !== null && _b !== void 0 ? _b : e); + } + throw e; + } + } +} +exports.syncCommand = syncCommand; +async function sync(config, platformName, deployment, inline = false) { + var _a; + await (0, common_1.runPlatformHook)(config, platformName, config.app.rootDir, 'capacitor:sync:before'); + try { + await (0, copy_1.copy)(config, platformName, inline); + } + catch (e) { + log_1.logger.error((_a = e.stack) !== null && _a !== void 0 ? _a : e); + } + await (0, update_1.update)(config, platformName, deployment); + await (0, common_1.runPlatformHook)(config, platformName, config.app.rootDir, 'capacitor:sync:after'); +} +exports.sync = sync; diff --git a/node_modules/@capacitor/cli/dist/tasks/telemetry.js b/node_modules/@capacitor/cli/dist/tasks/telemetry.js new file mode 100644 index 0000000..e1d4d03 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/telemetry.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.telemetryCommand = void 0; +const tslib_1 = require("tslib"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const errors_1 = require("../errors"); +const log_1 = require("../log"); +const sysconfig_1 = require("../sysconfig"); +const telemetry_1 = require("../telemetry"); +async function telemetryCommand(onOrOff) { + const sysconfig = await (0, sysconfig_1.readConfig)(); + const enabled = interpretEnabled(onOrOff); + if (typeof enabled === 'boolean') { + if (sysconfig.telemetry === enabled) { + log_1.logger.info(`Telemetry is already ${colors_1.default.strong(enabled ? 'on' : 'off')}`); + } + else { + await (0, sysconfig_1.writeConfig)({ ...sysconfig, telemetry: enabled }); + (0, log_1.logSuccess)(`You have ${colors_1.default.strong(`opted ${enabled ? 'in' : 'out'}`)} ${enabled ? 'for' : 'of'} telemetry on this machine.`); + if (enabled) { + log_1.output.write(telemetry_1.THANK_YOU); + } + } + } + else { + log_1.logger.info(`Telemetry is ${colors_1.default.strong(sysconfig.telemetry ? 'on' : 'off')}`); + } +} +exports.telemetryCommand = telemetryCommand; +function interpretEnabled(onOrOff) { + switch (onOrOff) { + case 'on': + return true; + case 'off': + return false; + case undefined: + return undefined; + } + (0, errors_1.fatal)(`Argument must be ${colors_1.default.strong('on')} or ${colors_1.default.strong('off')} (or left unspecified)`); +} diff --git a/node_modules/@capacitor/cli/dist/tasks/update.js b/node_modules/@capacitor/cli/dist/tasks/update.js new file mode 100644 index 0000000..bbddf69 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/tasks/update.js @@ -0,0 +1,74 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.update = exports.updateChecks = exports.updateCommand = void 0; +const tslib_1 = require("tslib"); +const update_1 = require("../android/update"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_1 = require("../common"); +const errors_1 = require("../errors"); +const common_2 = require("../ios/common"); +const update_2 = require("../ios/update"); +const log_1 = require("../log"); +const promise_1 = require("../util/promise"); +async function updateCommand(config, selectedPlatformName, deployment) { + var _a; + if (selectedPlatformName && !(await (0, common_1.isValidPlatform)(selectedPlatformName))) { + const platformDir = (0, common_1.resolvePlatform)(config, selectedPlatformName); + if (platformDir) { + await (0, common_1.runPlatformHook)(config, selectedPlatformName, platformDir, 'capacitor:update'); + } + else { + log_1.logger.error(`Platform ${colors_1.default.input(selectedPlatformName)} not found.`); + } + } + else { + const then = +new Date(); + const platforms = await (0, common_1.selectPlatforms)(config, selectedPlatformName); + try { + await (0, common_1.check)([() => (0, common_1.checkPackage)(), ...updateChecks(config, platforms)]); + await (0, promise_1.allSerial)(platforms.map(platformName => async () => await update(config, platformName, deployment))); + const now = +new Date(); + const diff = (now - then) / 1000; + log_1.logger.info(`Update finished in ${diff}s`); + } + catch (e) { + if (!(0, errors_1.isFatal)(e)) { + (0, errors_1.fatal)((_a = e.stack) !== null && _a !== void 0 ? _a : e); + } + throw e; + } + } +} +exports.updateCommand = updateCommand; +function updateChecks(config, platforms) { + const checks = []; + for (const platformName of platforms) { + if (platformName === config.ios.name) { + checks.push(() => (0, common_2.checkBundler)(config) || (0, common_2.checkCocoaPods)(config)); + } + else if (platformName === config.android.name) { + continue; + } + else if (platformName === config.web.name) { + continue; + } + else { + throw `Platform ${platformName} is not valid.`; + } + } + return checks; +} +exports.updateChecks = updateChecks; +async function update(config, platformName, deployment) { + await (0, common_1.runTask)(colors_1.default.success(colors_1.default.strong(`update ${platformName}`)), async () => { + await (0, common_1.runPlatformHook)(config, platformName, config.app.rootDir, 'capacitor:update:before'); + if (platformName === config.ios.name) { + await (0, update_2.updateIOS)(config, deployment); + } + else if (platformName === config.android.name) { + await (0, update_1.updateAndroid)(config); + } + await (0, common_1.runPlatformHook)(config, platformName, config.app.rootDir, 'capacitor:update:after'); + }); +} +exports.update = update; diff --git a/node_modules/@capacitor/cli/dist/telemetry.js b/node_modules/@capacitor/cli/dist/telemetry.js new file mode 100644 index 0000000..e156222 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/telemetry.js @@ -0,0 +1,130 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sendMetric = exports.telemetryAction = exports.THANK_YOU = void 0; +const tslib_1 = require("tslib"); +const commander_1 = require("commander"); +const debug_1 = tslib_1.__importDefault(require("debug")); +const colors_1 = tslib_1.__importDefault(require("./colors")); +const ipc_1 = require("./ipc"); +const log_1 = require("./log"); +const sysconfig_1 = require("./sysconfig"); +const subprocess_1 = require("./util/subprocess"); +const term_1 = require("./util/term"); +const debug = (0, debug_1.default)('capacitor:telemetry'); +exports.THANK_YOU = `\nThank you for helping to make Capacitor better! 💖` + + `\nInformation about the data we collect is available on our website: ${colors_1.default.strong('https://capacitorjs.com/telemetry')}\n`; +function telemetryAction(config, action) { + return async (...actionArgs) => { + const start = new Date(); + // This is how commanderjs works--the command object is either the last + // element or second to last if there are additional options (via `.allowUnknownOption()`) + const lastArg = actionArgs[actionArgs.length - 1]; + const cmd = lastArg instanceof commander_1.Command ? lastArg : actionArgs[actionArgs.length - 2]; + const command = getFullCommandName(cmd); + let error; + try { + await action(...actionArgs); + } + catch (e) { + error = e; + } + const end = new Date(); + const duration = end.getTime() - start.getTime(); + const packages = Object.entries({ + ...config.app.package.devDependencies, + ...config.app.package.dependencies, + }); + // Only collect packages in the capacitor org: + // https://www.npmjs.com/org/capacitor + const capacitorPackages = packages.filter(([k]) => k.startsWith('@capacitor/')); + const versions = capacitorPackages.map(([k, v]) => [ + `${k.replace(/^@capacitor\//, '').replace(/-/g, '_')}_version`, + v, + ]); + const data = { + app_id: await getAppIdentifier(config), + command, + arguments: cmd.args.join(' '), + options: JSON.stringify(cmd.opts()), + duration, + error: error ? (error.message ? error.message : String(error)) : null, + node_version: process.version, + os: config.cli.os, + ...Object.fromEntries(versions), + }; + if ((0, term_1.isInteractive)()) { + let sysconfig = await (0, sysconfig_1.readConfig)(); + if (!error && typeof sysconfig.telemetry === 'undefined') { + const confirm = await promptForTelemetry(); + sysconfig = { ...sysconfig, telemetry: confirm }; + await (0, sysconfig_1.writeConfig)(sysconfig); + } + await sendMetric(sysconfig, 'capacitor_cli_command', data); + } + if (error) { + throw error; + } + }; +} +exports.telemetryAction = telemetryAction; +/** + * If telemetry is enabled, send a metric via IPC to a forked process for uploading. + */ +async function sendMetric(sysconfig, name, data) { + if (sysconfig.telemetry && (0, term_1.isInteractive)()) { + const message = { + name, + timestamp: new Date().toISOString(), + session_id: sysconfig.machine, + source: 'capacitor_cli', + value: data, + }; + await (0, ipc_1.send)({ type: 'telemetry', data: message }); + } + else { + debug('Telemetry is off (user choice, non-interactive terminal, or CI)--not sending metric'); + } +} +exports.sendMetric = sendMetric; +async function promptForTelemetry() { + const { confirm } = await (0, log_1.logPrompt)(`${colors_1.default.strong('Would you like to help improve Capacitor by sharing anonymous usage data? 💖')}\n` + + `Read more about what is being collected and why here: ${colors_1.default.strong('https://capacitorjs.com/telemetry')}. You can change your mind at any time by using the ${colors_1.default.input('npx cap telemetry')} command.`, { + type: 'confirm', + name: 'confirm', + message: 'Share anonymous usage data?', + initial: true, + }); + if (confirm) { + log_1.output.write(exports.THANK_YOU); + } + return confirm; +} +/** + * Get a unique anonymous identifier for this app. + */ +async function getAppIdentifier(config) { + const { createHash } = await Promise.resolve().then(() => tslib_1.__importStar(require('crypto'))); + // get the first commit hash, which should be universally unique + const output = await (0, subprocess_1.getCommandOutput)('git', ['rev-list', '--max-parents=0', 'HEAD'], { cwd: config.app.rootDir }); + const firstLine = output === null || output === void 0 ? void 0 : output.split('\n')[0]; + if (!firstLine) { + debug('Could not obtain unique app identifier'); + return null; + } + // use sha1 to create a one-way hash to anonymize + const id = createHash('sha1').update(firstLine).digest('hex'); + return id; +} +/** + * Walk through the command's parent tree and construct a space-separated name. + * + * Probably overkill because we don't have nested commands, but whatever. + */ +function getFullCommandName(cmd) { + const names = []; + while (cmd.parent !== null) { + names.push(cmd.name()); + cmd = cmd.parent; + } + return names.reverse().join(' '); +} diff --git a/node_modules/@capacitor/cli/dist/util/cli.js b/node_modules/@capacitor/cli/dist/util/cli.js new file mode 100644 index 0000000..bedab98 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/util/cli.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.wrapAction = exports.ENV_PATHS = void 0; +const tslib_1 = require("tslib"); +const env_paths_1 = tslib_1.__importDefault(require("env-paths")); +const errors_1 = require("../errors"); +const log_1 = require("../log"); +exports.ENV_PATHS = (0, env_paths_1.default)('capacitor', { suffix: '' }); +function wrapAction(action) { + return async (...args) => { + try { + await action(...args); + } + catch (e) { + if ((0, errors_1.isFatal)(e)) { + process.exitCode = e.exitCode; + log_1.logger.error(e.message); + } + else { + throw e; + } + } + }; +} +exports.wrapAction = wrapAction; diff --git a/node_modules/@capacitor/cli/dist/util/emoji.js b/node_modules/@capacitor/cli/dist/util/emoji.js new file mode 100644 index 0000000..00a9dbc --- /dev/null +++ b/node_modules/@capacitor/cli/dist/util/emoji.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.emoji = void 0; +// Emoji falback, right now just uses fallback on windows, +// but could expand to be more sophisticated to allow emoji +// on Hyper term on windows, for example. +const emoji = (x, fallback) => { + if (process.platform === 'win32') { + return fallback; + } + return x; +}; +exports.emoji = emoji; diff --git a/node_modules/@capacitor/cli/dist/util/fn.js b/node_modules/@capacitor/cli/dist/util/fn.js new file mode 100644 index 0000000..9c99b90 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/util/fn.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.tryFn = void 0; +const tryFn = async (fn, ...args) => { + try { + return await fn(...args); + } + catch { + // ignore + } + return null; +}; +exports.tryFn = tryFn; diff --git a/node_modules/@capacitor/cli/dist/util/fs.js b/node_modules/@capacitor/cli/dist/util/fs.js new file mode 100644 index 0000000..884e83e --- /dev/null +++ b/node_modules/@capacitor/cli/dist/util/fs.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.deleteFolderRecursive = exports.convertToUnixPath = void 0; +const utils_fs_1 = require("@ionic/utils-fs"); +const path_1 = require("path"); +const convertToUnixPath = (path) => { + return path.replace(/\\/g, '/'); +}; +exports.convertToUnixPath = convertToUnixPath; +const deleteFolderRecursive = (directoryPath) => { + if ((0, utils_fs_1.existsSync)(directoryPath)) { + (0, utils_fs_1.readdirSync)(directoryPath).forEach(file => { + const curPath = (0, path_1.join)(directoryPath, file); + if ((0, utils_fs_1.lstatSync)(curPath).isDirectory()) { + (0, exports.deleteFolderRecursive)(curPath); + } + else { + (0, utils_fs_1.unlinkSync)(curPath); + } + }); + (0, utils_fs_1.rmdirSync)(directoryPath); + } +}; +exports.deleteFolderRecursive = deleteFolderRecursive; diff --git a/node_modules/@capacitor/cli/dist/util/js.js b/node_modules/@capacitor/cli/dist/util/js.js new file mode 100644 index 0000000..ceabcda --- /dev/null +++ b/node_modules/@capacitor/cli/dist/util/js.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.formatJSObject = void 0; +const tslib_1 = require("tslib"); +const util_1 = tslib_1.__importDefault(require("util")); +function formatJSObject(o) { + try { + o = JSON.parse(JSON.stringify(o)); + } + catch (e) { + throw new Error(`Cannot parse object as JSON: ${e.stack ? e.stack : e}`); + } + return util_1.default.inspect(o, { + compact: false, + breakLength: Infinity, + depth: Infinity, + maxArrayLength: Infinity, + maxStringLength: Infinity, + }); +} +exports.formatJSObject = formatJSObject; diff --git a/node_modules/@capacitor/cli/dist/util/livereload.js b/node_modules/@capacitor/cli/dist/util/livereload.js new file mode 100644 index 0000000..d017d94 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/util/livereload.js @@ -0,0 +1,151 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CapLiveReloadHelper = void 0; +const utils_fs_1 = require("@ionic/utils-fs"); +const os_1 = require("os"); +const path_1 = require("path"); +class CapLiveReload { + constructor() { + this.configJsonToRevertTo = { + json: null, + platformPath: null, + }; + // nothing to do + } + getIpAddress(name, family) { + var _a; + const interfaces = (_a = (0, os_1.networkInterfaces)()) !== null && _a !== void 0 ? _a : {}; + const _normalizeFamily = (family) => { + if (family === 4) { + return 'ipv4'; + } + if (family === 6) { + return 'ipv6'; + } + return family ? family.toLowerCase() : 'ipv4'; + }; + const isLoopback = (addr) => { + return (/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/.test(addr) || + /^fe80::1$/.test(addr) || + /^::1$/.test(addr) || + /^::$/.test(addr)); + }; + const isPrivate = (addr) => { + return (/^(::f{4}:)?10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || + /^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || + /^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || + /^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || + /^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || + /^f[cd][0-9a-f]{2}:/i.test(addr) || + /^fe80:/i.test(addr) || + /^::1$/.test(addr) || + /^::$/.test(addr)); + }; + const isPublic = (addr) => { + return !isPrivate(addr); + }; + const loopback = (family) => { + // + // Default to `ipv4` + // + family = _normalizeFamily(family); + if (family !== 'ipv4' && family !== 'ipv6') { + throw new Error('family must be ipv4 or ipv6'); + } + return family === 'ipv4' ? '127.0.0.1' : 'fe80::1'; + }; + // + // Default to `ipv4` + // + family = _normalizeFamily(family); + // + // If a specific network interface has been named, + // return the address. + // + if (name && name !== 'private' && name !== 'public') { + const res = interfaces[name].filter((details) => { + const itemFamily = _normalizeFamily(details.family); + return itemFamily === family; + }); + if (res.length === 0) { + return undefined; + } + return res[0].address; + } + const all = Object.keys(interfaces) + .map(nic => { + // + // Note: name will only be `public` or `private` + // when this is called. + // + const addresses = interfaces[nic].filter((details) => { + details.family = _normalizeFamily(details.family); + if (details.family !== family || isLoopback(details.address)) { + return false; + } + if (!name) { + return true; + } + return name === 'public' + ? isPrivate(details.address) + : isPublic(details.address); + }); + return addresses.length ? addresses[0].address : undefined; + }) + .filter(Boolean); + return !all.length ? loopback(family) : all[0]; + } + // TODO remove on next major as it's unused + async editExtConfigForLiveReload(config, platformName, options, rootConfigChange = false) { + const platformAbsPath = platformName == config.ios.name + ? config.ios.nativeTargetDirAbs + : platformName == config.android.name + ? config.android.assetsDirAbs + : null; + if (platformAbsPath == null) + throw new Error('Platform not found.'); + const capConfigPath = rootConfigChange + ? config.app.extConfigFilePath + : (0, path_1.join)(platformAbsPath, 'capacitor.config.json'); + const configJson = { ...config.app.extConfig }; + this.configJsonToRevertTo.json = JSON.stringify(configJson, null, 2); + this.configJsonToRevertTo.platformPath = capConfigPath; + const url = `http://${options.host}:${options.port}`; + configJson.server = { + url, + }; + return configJson; + } + // TODO remove rootConfigChange param on next major as it's unused + async editCapConfigForLiveReload(config, platformName, options, rootConfigChange = false) { + const platformAbsPath = platformName == config.ios.name + ? config.ios.nativeTargetDirAbs + : platformName == config.android.name + ? config.android.assetsDirAbs + : null; + if (platformAbsPath == null) + throw new Error('Platform not found.'); + const capConfigPath = rootConfigChange + ? config.app.extConfigFilePath + : (0, path_1.join)(platformAbsPath, 'capacitor.config.json'); + const configJson = (0, utils_fs_1.readJSONSync)(capConfigPath); + this.configJsonToRevertTo.json = JSON.stringify(configJson, null, 2); + this.configJsonToRevertTo.platformPath = capConfigPath; + const url = `http://${options.host}:${options.port}`; + configJson.server = { + url, + }; + (0, utils_fs_1.writeJSONSync)(capConfigPath, configJson, { spaces: '\t' }); + } + async revertCapConfigForLiveReload() { + if (this.configJsonToRevertTo.json == null || + this.configJsonToRevertTo.platformPath == null) + return; + const capConfigPath = this.configJsonToRevertTo.platformPath; + const configJson = this.configJsonToRevertTo.json; + (0, utils_fs_1.writeJSONSync)(capConfigPath, JSON.parse(configJson), { spaces: '\t' }); + this.configJsonToRevertTo.json = null; + this.configJsonToRevertTo.platformPath = null; + } +} +exports.CapLiveReloadHelper = new CapLiveReload(); diff --git a/node_modules/@capacitor/cli/dist/util/monorepotools.js b/node_modules/@capacitor/cli/dist/util/monorepotools.js new file mode 100644 index 0000000..038dfee --- /dev/null +++ b/node_modules/@capacitor/cli/dist/util/monorepotools.js @@ -0,0 +1,110 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isNXMonorepo = exports.isMonorepo = exports.findPackageRelativePathInMonorepo = exports.findPackagePath = exports.findNXMonorepoRoot = exports.findMonorepoRoot = void 0; +const node_fs_1 = require("node:fs"); +const node_path_1 = require("node:path"); +/** + * Finds the monorepo root from the given path. + * @param currentPath - The current path to start searching from. + * @returns The path to the monorepo root. + * @throws An error if the monorepo root is not found. + */ +function findMonorepoRoot(currentPath) { + const packageJsonPath = (0, node_path_1.join)(currentPath, 'package.json'); + const pnpmWorkspacePath = (0, node_path_1.join)(currentPath, 'pnpm-workspace.yaml'); + if ((0, node_fs_1.existsSync)(pnpmWorkspacePath) || + ((0, node_fs_1.existsSync)(packageJsonPath) && + JSON.parse((0, node_fs_1.readFileSync)(packageJsonPath, 'utf-8')).workspaces)) { + return currentPath; + } + const parentPath = (0, node_path_1.dirname)(currentPath); + if (parentPath === currentPath) { + throw new Error('Monorepo root not found'); + } + return findMonorepoRoot(parentPath); +} +exports.findMonorepoRoot = findMonorepoRoot; +/** + * Finds the NX monorepo root from the given path. + * @param currentPath - The current path to start searching from. + * @returns The path to the monorepo root. + * @throws An error if the monorepo root is not found. + */ +function findNXMonorepoRoot(currentPath) { + const nxJsonPath = (0, node_path_1.join)(currentPath, 'nx.json'); + if ((0, node_fs_1.existsSync)(nxJsonPath)) { + return currentPath; + } + const parentPath = (0, node_path_1.dirname)(currentPath); + if (parentPath === currentPath) { + throw new Error('Monorepo root not found'); + } + return findNXMonorepoRoot(parentPath); +} +exports.findNXMonorepoRoot = findNXMonorepoRoot; +/** + * Finds the path to a package within the node_modules folder, + * searching up the directory hierarchy until the last possible directory is reached. + * @param packageName - The name of the package to find. + * @param currentPath - The current path to start searching from. + * @param lastPossibleDirectory - The last possible directory to search for the package. + * @returns The path to the package, or null if not found. + */ +function findPackagePath(packageName, currentPath, lastPossibleDirectory) { + const nodeModulesPath = (0, node_path_1.join)(currentPath, 'node_modules', packageName); + if ((0, node_fs_1.existsSync)(nodeModulesPath)) { + return nodeModulesPath; + } + if (currentPath === lastPossibleDirectory) { + return null; + } + const parentPath = (0, node_path_1.dirname)(currentPath); + return findPackagePath(packageName, parentPath, lastPossibleDirectory); +} +exports.findPackagePath = findPackagePath; +/** + * Finds the relative path to a package from the current directory, + * using the monorepo root as the last possible directory. + * @param packageName - The name of the package to find. + * @param currentPath - The current path to start searching from. + * @returns The relative path to the package, or null if not found. + */ +function findPackageRelativePathInMonorepo(packageName, currentPath) { + const monorepoRoot = findMonorepoRoot(currentPath); + const packagePath = findPackagePath(packageName, currentPath, monorepoRoot); + if (packagePath) { + return (0, node_path_1.relative)(currentPath, packagePath); + } + return null; +} +exports.findPackageRelativePathInMonorepo = findPackageRelativePathInMonorepo; +/** + * Detects if the current directory is part of a monorepo (npm, yarn, pnpm). + * @param currentPath - The current path to start searching from. + * @returns True if the current directory is part of a monorepo, false otherwise. + */ +function isMonorepo(currentPath) { + try { + findMonorepoRoot(currentPath); + return true; + } + catch (error) { + return false; + } +} +exports.isMonorepo = isMonorepo; +/** + * Detects if the current directory is part of a nx integrated monorepo. + * @param currentPath - The current path to start searching from. + * @returns True if the current directory is part of a monorepo, false otherwise. + */ +function isNXMonorepo(currentPath) { + try { + findNXMonorepoRoot(currentPath); + return true; + } + catch (error) { + return false; + } +} +exports.isNXMonorepo = isNXMonorepo; diff --git a/node_modules/@capacitor/cli/dist/util/native-run.js b/node_modules/@capacitor/cli/dist/util/native-run.js new file mode 100644 index 0000000..4b6090b --- /dev/null +++ b/node_modules/@capacitor/cli/dist/util/native-run.js @@ -0,0 +1,53 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getPlatformTargets = exports.runNativeRun = void 0; +const tslib_1 = require("tslib"); +const path_1 = require("path"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const errors_1 = require("../errors"); +const node_1 = require("./node"); +const subprocess_1 = require("./subprocess"); +async function runNativeRun(args, options = {}) { + const p = (0, node_1.resolveNode)(__dirname, (0, path_1.dirname)('native-run/package'), 'bin/native-run'); + if (!p) { + (0, errors_1.fatal)(`${colors_1.default.input('native-run')} not found.`); + } + return await (0, subprocess_1.runCommand)(p, args, options); +} +exports.runNativeRun = runNativeRun; +async function getPlatformTargets(platformName) { + const errors = []; + try { + const output = await runNativeRun([platformName, '--list', '--json']); + const parsedOutput = JSON.parse(output); + if (parsedOutput.devices.length || parsedOutput.virtualDevices.length) { + return [ + ...parsedOutput.devices.map((t) => ({ ...t, virtual: false })), + ...parsedOutput.virtualDevices.map((t) => ({ + ...t, + virtual: true, + })), + ]; + } + else { + parsedOutput.errors.map((e) => { + errors.push(e); + }); + } + } + catch (e) { + const err = JSON.parse(e); + errors.push(err); + } + const plural = errors.length > 1 ? 's' : ''; + const errMsg = `${colors_1.default.strong('native-run')} failed with error${plural}\n + ${errors + .map((e) => { + return `\t${colors_1.default.strong(e.code)}: ${e.error}`; + }) + .join('\n')} + \n\tMore details for this error${plural} may be available online: ${colors_1.default.strong('https://github.com/ionic-team/native-run/wiki/Android-Errors')} + `; + throw errMsg; +} +exports.getPlatformTargets = getPlatformTargets; diff --git a/node_modules/@capacitor/cli/dist/util/node.js b/node_modules/@capacitor/cli/dist/util/node.js new file mode 100644 index 0000000..3701ce1 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/util/node.js @@ -0,0 +1,54 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.resolveNode = exports.requireTS = void 0; +const utils_fs_1 = require("@ionic/utils-fs"); +const fs_1 = require("fs"); +const path_1 = require("path"); +/** + * @see https://github.com/ionic-team/stencil/blob/HEAD/src/compiler/sys/node-require.ts + */ +const requireTS = (ts, p) => { + const id = (0, path_1.resolve)(p); + delete require.cache[id]; + require.extensions['.ts'] = (module, fileName) => { + var _a; + let sourceText = (0, utils_fs_1.readFileSync)(fileName, 'utf8'); + if (fileName.endsWith('.ts')) { + const tsResults = ts.transpileModule(sourceText, { + fileName, + compilerOptions: { + module: ts.ModuleKind.CommonJS, + moduleResolution: ts.ModuleResolutionKind.NodeJs, + esModuleInterop: true, + strict: true, + target: ts.ScriptTarget.ES2017, + }, + reportDiagnostics: true, + }); + sourceText = tsResults.outputText; + } + else { + // quick hack to turn a modern es module + // into and old school commonjs module + sourceText = sourceText.replace(/export\s+\w+\s+(\w+)/gm, 'exports.$1'); + } + (_a = module._compile) === null || _a === void 0 ? void 0 : _a.call(module, sourceText, fileName); + }; + const m = require(id); // eslint-disable-line @typescript-eslint/no-var-requires + delete require.extensions['.ts']; + return m; +}; +exports.requireTS = requireTS; +function resolveNode(root, ...pathSegments) { + try { + return require.resolve(pathSegments.join('/'), { paths: [root] }); + } + catch (e) { + const path = [root, 'node_modules', ...pathSegments].join('/'); + if ((0, fs_1.existsSync)(path)) { + return path; + } + return null; + } +} +exports.resolveNode = resolveNode; diff --git a/node_modules/@capacitor/cli/dist/util/promise.js b/node_modules/@capacitor/cli/dist/util/promise.js new file mode 100644 index 0000000..05c86c6 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/util/promise.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.lazy = exports.LazyPromise = exports.allSerial = void 0; +function allSerial(funcs) { + return funcs.reduce((promise, func) => promise.then(result => func().then(x => result.concat(x))), Promise.resolve([])); +} +exports.allSerial = allSerial; +class LazyPromise extends Promise { + constructor(executor) { + super(() => { + /* ignore */ + }); + this._executor = executor; + } + then(onfulfilled, onrejected) { + this._promise = this._promise || new Promise(this._executor); + return this._promise.then(onfulfilled, onrejected); + } + catch(onrejected) { + this._promise = this._promise || new Promise(this._executor); + return this._promise.catch(onrejected); + } +} +exports.LazyPromise = LazyPromise; +function lazy(fn) { + return new LazyPromise(async (resolve, reject) => { + try { + resolve(await fn()); + } + catch (e) { + reject(e); + } + }); +} +exports.lazy = lazy; diff --git a/node_modules/@capacitor/cli/dist/util/subprocess.js b/node_modules/@capacitor/cli/dist/util/subprocess.js new file mode 100644 index 0000000..7c5d46f --- /dev/null +++ b/node_modules/@capacitor/cli/dist/util/subprocess.js @@ -0,0 +1,43 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isInstalled = exports.getCommandOutput = exports.runCommand = void 0; +const utils_subprocess_1 = require("@ionic/utils-subprocess"); +async function runCommand(command, args, options = {}) { + const p = new utils_subprocess_1.Subprocess(command, args, options); + try { + return await p.output(); + } + catch (e) { + if (e instanceof utils_subprocess_1.SubprocessError) { + // old behavior of just throwing the stdout/stderr strings + throw e.output + ? e.output + : e.code + ? e.code + : e.error + ? e.error.message + : 'Unknown error'; + } + throw e; + } +} +exports.runCommand = runCommand; +async function getCommandOutput(command, args, options = {}) { + try { + return (await runCommand(command, args, options)).trim(); + } + catch (e) { + return null; + } +} +exports.getCommandOutput = getCommandOutput; +async function isInstalled(command) { + try { + await (0, utils_subprocess_1.which)(command); + } + catch (e) { + return false; + } + return true; +} +exports.isInstalled = isInstalled; diff --git a/node_modules/@capacitor/cli/dist/util/template.js b/node_modules/@capacitor/cli/dist/util/template.js new file mode 100644 index 0000000..5d41a32 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/util/template.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.extractTemplate = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const tar_1 = tslib_1.__importDefault(require("tar")); +async function extractTemplate(src, dir) { + await (0, utils_fs_1.mkdirp)(dir); + await tar_1.default.extract({ file: src, cwd: dir }); +} +exports.extractTemplate = extractTemplate; diff --git a/node_modules/@capacitor/cli/dist/util/term.js b/node_modules/@capacitor/cli/dist/util/term.js new file mode 100644 index 0000000..71988b6 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/util/term.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isInteractive = exports.checkInteractive = void 0; +const tslib_1 = require("tslib"); +const utils_terminal_1 = require("@ionic/utils-terminal"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const log_1 = require("../log"); +// Given input variables to a command, make sure all are provided if the terminal +// is not interactive (because we won't be able to prompt the user) +const checkInteractive = (...args) => { + if ((0, exports.isInteractive)()) { + return true; + } + // Fail if no args are provided, treat this as just a check of whether the term is + // interactive or not. + if (!args.length) { + return false; + } + // Make sure none of the provided args are empty, otherwise print the interactive + // warning and return false + if (args.filter(arg => !arg).length) { + log_1.logger.error(`Non-interactive shell detected.\n` + + `Run the command with ${colors_1.default.input('--help')} to see a list of arguments that must be provided.`); + return false; + } + return true; +}; +exports.checkInteractive = checkInteractive; +const isInteractive = () => utils_terminal_1.TERMINAL_INFO.tty && !utils_terminal_1.TERMINAL_INFO.ci; +exports.isInteractive = isInteractive; diff --git a/node_modules/@capacitor/cli/dist/util/uuid.js b/node_modules/@capacitor/cli/dist/util/uuid.js new file mode 100644 index 0000000..5391cb8 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/util/uuid.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.uuidv4 = void 0; +function uuidv4() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => { + const r = (Math.random() * 16) | 0; + const v = c == 'x' ? r : (r & 0x3) | 0x8; + return v.toString(16); + }); +} +exports.uuidv4 = uuidv4; diff --git a/node_modules/@capacitor/cli/dist/util/xml.js b/node_modules/@capacitor/cli/dist/util/xml.js new file mode 100644 index 0000000..1748bfe --- /dev/null +++ b/node_modules/@capacitor/cli/dist/util/xml.js @@ -0,0 +1,57 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.buildXmlElement = exports.writeXML = exports.parseXML = exports.readXML = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const xml2js_1 = tslib_1.__importDefault(require("xml2js")); +async function readXML(path) { + var _a; + try { + const xmlStr = await (0, utils_fs_1.readFile)(path, { encoding: 'utf-8' }); + try { + return await xml2js_1.default.parseStringPromise(xmlStr); + } + catch (e) { + throw `Error parsing: ${path}, ${(_a = e.stack) !== null && _a !== void 0 ? _a : e}`; + } + } + catch (e) { + throw `Unable to read: ${path}`; + } +} +exports.readXML = readXML; +function parseXML(xmlStr, options) { + const parser = options !== undefined + ? new xml2js_1.default.Parser({ ...options }) + : new xml2js_1.default.Parser(); + let xmlObj; + parser.parseString(xmlStr, (err, result) => { + if (!err) { + xmlObj = result; + } + }); + return xmlObj; +} +exports.parseXML = parseXML; +async function writeXML(object) { + return new Promise(resolve => { + const builder = new xml2js_1.default.Builder({ + headless: true, + explicitRoot: false, + rootName: 'deleteme', + }); + let xml = builder.buildObject(object); + xml = xml.replace('', '').replace('', ''); + resolve(xml); + }); +} +exports.writeXML = writeXML; +function buildXmlElement(configElement, rootName) { + const builder = new xml2js_1.default.Builder({ + headless: true, + explicitRoot: false, + rootName: rootName, + }); + return builder.buildObject(configElement); +} +exports.buildXmlElement = buildXmlElement; diff --git a/node_modules/@capacitor/cli/dist/web/copy.js b/node_modules/@capacitor/cli/dist/web/copy.js new file mode 100644 index 0000000..d815005 --- /dev/null +++ b/node_modules/@capacitor/cli/dist/web/copy.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.copyWeb = void 0; +const tslib_1 = require("tslib"); +const utils_fs_1 = require("@ionic/utils-fs"); +const path_1 = require("path"); +const colors_1 = tslib_1.__importDefault(require("../colors")); +const common_1 = require("../common"); +const errors_1 = require("../errors"); +const node_1 = require("../util/node"); +async function copyWeb(config) { + if (config.app.bundledWebRuntime) { + const runtimePath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor/core', 'dist', 'capacitor.js'); + if (!runtimePath) { + (0, errors_1.fatal)(`Unable to find ${colors_1.default.strong('node_modules/@capacitor/core/dist/capacitor.js')}.\n` + `Are you sure ${colors_1.default.strong('@capacitor/core')} is installed?`); + } + return (0, common_1.runTask)(`Copying ${colors_1.default.strong('capacitor.js')} to web dir`, () => { + return (0, utils_fs_1.copy)(runtimePath, (0, path_1.join)(config.app.webDirAbs, 'capacitor.js')); + }); + } +} +exports.copyWeb = copyWeb; diff --git a/node_modules/@capacitor/cli/package.json b/node_modules/@capacitor/cli/package.json new file mode 100644 index 0000000..e11d7a4 --- /dev/null +++ b/node_modules/@capacitor/cli/package.json @@ -0,0 +1,88 @@ +{ + "name": "@capacitor/cli", + "version": "5.7.8", + "description": "Capacitor: Cross-platform apps with JavaScript and the web", + "homepage": "https://capacitorjs.com", + "author": "Ionic Team (https://ionic.io)", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/ionic-team/capacitor.git" + }, + "bugs": { + "url": "https://github.com/ionic-team/capacitor/issues" + }, + "files": [ + "assets/", + "bin/", + "dist/**/*.js", + "dist/declarations.d.ts" + ], + "keywords": [ + "ionic", + "ionic framework", + "capacitor", + "universal app", + "progressive web apps", + "cross platform" + ], + "engines": { + "node": ">=16.0.0" + }, + "main": "dist/index.js", + "types": "dist/declarations.d.ts", + "bin": { + "capacitor": "./bin/capacitor", + "cap": "./bin/capacitor" + }, + "scripts": { + "build": "npm run clean && npm run assets && tsc", + "clean": "rimraf ./dist", + "assets": "node ../scripts/pack-cli-assets.mjs", + "prepublishOnly": "npm run build", + "test": "jest -i", + "watch": "npm run assets && tsc -w" + }, + "dependencies": { + "@ionic/cli-framework-output": "^2.2.5", + "@ionic/utils-fs": "^3.1.6", + "@ionic/utils-subprocess": "^2.1.11", + "@ionic/utils-terminal": "^2.3.3", + "commander": "^9.3.0", + "debug": "^4.3.4", + "env-paths": "^2.2.0", + "kleur": "^4.1.4", + "native-run": "^2.0.0", + "open": "^8.4.0", + "plist": "^3.0.5", + "prompts": "^2.4.2", + "rimraf": "^4.4.1", + "semver": "^7.3.7", + "tar": "^6.1.11", + "tslib": "^2.4.0", + "xml2js": "^0.5.0" + }, + "devDependencies": { + "@types/debug": "^4.1.7", + "@types/jest": "^29.5.0", + "@types/plist": "^3.0.2", + "@types/prompts": "^2.0.14", + "@types/semver": "^7.3.10", + "@types/tar": "^6.1.1", + "@types/tmp": "^0.2.3", + "@types/xml2js": "0.4.5", + "jest": "^29.5.0", + "jest-environment-jsdom": "^29.5.0", + "jest-jasmine2": "^29.5.0", + "tmp": "^0.2.1", + "ts-jest": "^29.0.5", + "typescript": "~5.0.2" + }, + "jest": { + "preset": "ts-jest", + "testRunner": "jest-jasmine2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@capacitor/core/LICENSE b/node_modules/@capacitor/core/LICENSE new file mode 100644 index 0000000..c3e903b --- /dev/null +++ b/node_modules/@capacitor/core/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017-present Drifty Co. + +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/@capacitor/core/README.md b/node_modules/@capacitor/core/README.md new file mode 100644 index 0000000..e877ef3 --- /dev/null +++ b/node_modules/@capacitor/core/README.md @@ -0,0 +1,3 @@ +# Capacitor Core JS + +See the [Capacitor website](https://capacitorjs.com) for more information. diff --git a/node_modules/@capacitor/core/cordova.js b/node_modules/@capacitor/core/cordova.js new file mode 100644 index 0000000..3c42fca --- /dev/null +++ b/node_modules/@capacitor/core/cordova.js @@ -0,0 +1,1689 @@ +// Platform: Capacitor +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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 at + + 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 () { + var PLATFORM_VERSION_BUILD_LABEL = '1.0.0'; + // file: src/scripts/require.js + + /* jshint -W079 */ + /* jshint -W020 */ + + var require; + var define; + + (function () { + var modules = {}; + // Stack of moduleIds currently being built. + var requireStack = []; + // Map of module ID -> index into requireStack of modules currently being built. + var inProgressModules = {}; + var SEPARATOR = '.'; + + function build(module) { + var factory = module.factory; + var localRequire = function (id) { + var resultantId = id; + // Its a relative path, so lop off the last portion and add the id (minus "./") + if (id.charAt(0) === '.') { + resultantId = + module.id.slice(0, module.id.lastIndexOf(SEPARATOR)) + + SEPARATOR + + id.slice(2); + } + return require(resultantId); + }; + module.exports = {}; + delete module.factory; + factory(localRequire, module.exports, module); + return module.exports; + } + + require = function (id) { + if (!modules[id]) { + throw 'module ' + id + ' not found'; + } else if (id in inProgressModules) { + var cycle = + requireStack.slice(inProgressModules[id]).join('->') + '->' + id; + throw 'Cycle in require graph: ' + cycle; + } + if (modules[id].factory) { + try { + inProgressModules[id] = requireStack.length; + requireStack.push(id); + return build(modules[id]); + } finally { + delete inProgressModules[id]; + requireStack.pop(); + } + } + return modules[id].exports; + }; + + define = function (id, factory) { + if (modules[id]) { + throw 'module ' + id + ' already defined'; + } + + modules[id] = { + id: id, + factory: factory, + }; + }; + + define.remove = function (id) { + delete modules[id]; + }; + + define.moduleMap = modules; + })(); + + // Export for use in node + if (typeof module === 'object' && typeof require === 'function') { + module.exports.require = require; + module.exports.define = define; + } + + // file: src/cordova.js + define('cordova', function (require, exports, module) { + var channel = require('cordova/channel'); + var platform = require('cordova/platform'); + + /** + * Intercept calls to addEventListener + removeEventListener and handle deviceready, + * resume, and pause events. + */ + var m_document_addEventListener = document.addEventListener; + var m_document_removeEventListener = document.removeEventListener; + var m_window_addEventListener = window.addEventListener; + var m_window_removeEventListener = window.removeEventListener; + + /** + * Houses custom event handlers to intercept on document + window event listeners. + */ + var documentEventHandlers = {}; + var windowEventHandlers = {}; + + document.addEventListener = function (evt, handler, capture) { + var e = evt.toLowerCase(); + if (typeof documentEventHandlers[e] !== 'undefined') { + documentEventHandlers[e].subscribe(handler); + } else { + m_document_addEventListener.call(document, evt, handler, capture); + } + }; + + window.addEventListener = function (evt, handler, capture) { + var e = evt.toLowerCase(); + if (typeof windowEventHandlers[e] !== 'undefined') { + windowEventHandlers[e].subscribe(handler); + } else { + m_window_addEventListener.call(window, evt, handler, capture); + } + }; + + document.removeEventListener = function (evt, handler, capture) { + var e = evt.toLowerCase(); + // If unsubscribing from an event that is handled by a plugin + if (typeof documentEventHandlers[e] !== 'undefined') { + documentEventHandlers[e].unsubscribe(handler); + } else { + m_document_removeEventListener.call(document, evt, handler, capture); + } + }; + + window.removeEventListener = function (evt, handler, capture) { + var e = evt.toLowerCase(); + // If unsubscribing from an event that is handled by a plugin + if (typeof windowEventHandlers[e] !== 'undefined') { + windowEventHandlers[e].unsubscribe(handler); + } else { + m_window_removeEventListener.call(window, evt, handler, capture); + } + }; + + /* eslint-disable no-undef */ + var cordova = { + define: define, + require: require, + version: PLATFORM_VERSION_BUILD_LABEL, + platformVersion: PLATFORM_VERSION_BUILD_LABEL, + platformId: platform.id, + + /* eslint-enable no-undef */ + + /** + * Methods to add/remove your own addEventListener hijacking on document + window. + */ + addWindowEventHandler: function (event) { + return (windowEventHandlers[event] = channel.create(event)); + }, + addStickyDocumentEventHandler: function (event) { + return (documentEventHandlers[event] = channel.createSticky(event)); + }, + addDocumentEventHandler: function (event) { + return (documentEventHandlers[event] = channel.create(event)); + }, + removeWindowEventHandler: function (event) { + delete windowEventHandlers[event]; + }, + removeDocumentEventHandler: function (event) { + delete documentEventHandlers[event]; + }, + /** + * Retrieve original event handlers that were replaced by Cordova + * + * @return object + */ + getOriginalHandlers: function () { + return { + document: { + addEventListener: m_document_addEventListener, + removeEventListener: m_document_removeEventListener, + }, + window: { + addEventListener: m_window_addEventListener, + removeEventListener: m_window_removeEventListener, + }, + }; + }, + /** + * Method to fire event from native code + * bNoDetach is required for events which cause an exception which needs to be caught in native code + */ + fireDocumentEvent: function (type, data, bNoDetach) { + var evt = Capacitor.createEvent(type, data); + if (typeof documentEventHandlers[type] !== 'undefined') { + if (bNoDetach) { + documentEventHandlers[type].fire(evt); + } else { + setTimeout(function () { + // Fire deviceready on listeners that were registered before cordova.js was loaded. + if (type === 'deviceready') { + document.dispatchEvent(evt); + } + documentEventHandlers[type].fire(evt); + }, 0); + } + } else { + document.dispatchEvent(evt); + } + }, + fireWindowEvent: function (type, data) { + var evt = Capacitor.createEvent(type, data); + if (typeof windowEventHandlers[type] !== 'undefined') { + setTimeout(function () { + windowEventHandlers[type].fire(evt); + }, 0); + } else { + window.dispatchEvent(evt); + } + }, + + /** + * Plugin callback mechanism. + */ + // Randomize the starting callbackId to avoid collisions after refreshing or navigating. + // This way, it's very unlikely that any new callback would get the same callbackId as an old callback. + callbackId: Math.floor(Math.random() * 2000000000), + callbacks: {}, + callbackStatus: { + NO_RESULT: 0, + OK: 1, + CLASS_NOT_FOUND_EXCEPTION: 2, + ILLEGAL_ACCESS_EXCEPTION: 3, + INSTANTIATION_EXCEPTION: 4, + MALFORMED_URL_EXCEPTION: 5, + IO_EXCEPTION: 6, + INVALID_ACTION: 7, + JSON_EXCEPTION: 8, + ERROR: 9, + }, + + /** + * Called by native code when returning successful result from an action. + */ + callbackSuccess: function (callbackId, args) { + cordova.callbackFromNative( + callbackId, + true, + args.status, + [args.message], + args.keepCallback, + ); + }, + + /** + * Called by native code when returning error result from an action. + */ + callbackError: function (callbackId, args) { + // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative. + // Derive success from status. + cordova.callbackFromNative( + callbackId, + false, + args.status, + [args.message], + args.keepCallback, + ); + }, + + /** + * Called by native code when returning the result from an action. + */ + callbackFromNative: function ( + callbackId, + isSuccess, + status, + args, + keepCallback, + ) { + try { + var callback = cordova.callbacks[callbackId]; + if (callback) { + if (isSuccess && status === cordova.callbackStatus.OK) { + callback.success && callback.success.apply(null, args); + } else if (!isSuccess) { + callback.fail && callback.fail.apply(null, args); + } + /* + else + Note, this case is intentionally not caught. + this can happen if isSuccess is true, but callbackStatus is NO_RESULT + which is used to remove a callback from the list without calling the callbacks + typically keepCallback is false in this case + */ + // Clear callback if not expecting any more results + if (!keepCallback) { + delete cordova.callbacks[callbackId]; + } + } + } catch (err) { + var msg = + 'Error in ' + + (isSuccess ? 'Success' : 'Error') + + ' callbackId: ' + + callbackId + + ' : ' + + err; + console && console.log && console.log(msg); + cordova.fireWindowEvent('cordovacallbackerror', { message: msg }); + throw err; + } + }, + addConstructor: function (func) { + channel.onCordovaReady.subscribe(function () { + try { + func(); + } catch (e) { + console.log('Failed to run constructor: ' + e); + } + }); + }, + }; + + module.exports = cordova; + }); + + // file: src/common/argscheck.js + define('cordova/argscheck', function (require, exports, module) { + var utils = require('cordova/utils'); + + var moduleExports = module.exports; + + var typeMap = { + A: 'Array', + D: 'Date', + N: 'Number', + S: 'String', + F: 'Function', + O: 'Object', + }; + + function extractParamName(callee, argIndex) { + return /.*?\((.*?)\)/.exec(callee)[1].split(', ')[argIndex]; + } + + function checkArgs(spec, functionName, args, opt_callee) { + if (!moduleExports.enableChecks) { + return; + } + var errMsg = null; + var typeName; + for (var i = 0; i < spec.length; ++i) { + var c = spec.charAt(i); + var cUpper = c.toUpperCase(); + var arg = args[i]; + // Asterix means allow anything. + if (c === '*') { + continue; + } + typeName = utils.typeName(arg); + if ((arg === null || arg === undefined) && c === cUpper) { + continue; + } + if (typeName !== typeMap[cUpper]) { + errMsg = 'Expected ' + typeMap[cUpper]; + break; + } + } + if (errMsg) { + errMsg += ', but got ' + typeName + '.'; + errMsg = + 'Wrong type for parameter "' + + extractParamName(opt_callee || args.callee, i) + + '" of ' + + functionName + + ': ' + + errMsg; + // Don't log when running unit tests. + if (typeof jasmine === 'undefined') { + console.error(errMsg); + } + throw TypeError(errMsg); + } + } + + function getValue(value, defaultValue) { + return value === undefined ? defaultValue : value; + } + + moduleExports.checkArgs = checkArgs; + moduleExports.getValue = getValue; + moduleExports.enableChecks = true; + }); + + // file: src/common/base64.js + define('cordova/base64', function (require, exports, module) { + var base64 = exports; + + base64.fromArrayBuffer = function (arrayBuffer) { + var array = new Uint8Array(arrayBuffer); + return uint8ToBase64(array); + }; + + base64.toArrayBuffer = function (str) { + var decodedStr = + typeof atob !== 'undefined' + ? atob(str) + : Buffer.from(str, 'base64').toString('binary'); // eslint-disable-line no-undef + var arrayBuffer = new ArrayBuffer(decodedStr.length); + var array = new Uint8Array(arrayBuffer); + for (var i = 0, len = decodedStr.length; i < len; i++) { + array[i] = decodedStr.charCodeAt(i); + } + return arrayBuffer; + }; + + // ------------------------------------------------------------------------------ + + /* This code is based on the performance tests at http://jsperf.com/b64tests + * This 12-bit-at-a-time algorithm was the best performing version on all + * platforms tested. + */ + + var b64_6bit = + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + var b64_12bit; + + var b64_12bitTable = function () { + b64_12bit = []; + for (var i = 0; i < 64; i++) { + for (var j = 0; j < 64; j++) { + b64_12bit[i * 64 + j] = b64_6bit[i] + b64_6bit[j]; + } + } + b64_12bitTable = function () { + return b64_12bit; + }; + return b64_12bit; + }; + + function uint8ToBase64(rawData) { + var numBytes = rawData.byteLength; + var output = ''; + var segment; + var table = b64_12bitTable(); + for (var i = 0; i < numBytes - 2; i += 3) { + segment = (rawData[i] << 16) + (rawData[i + 1] << 8) + rawData[i + 2]; + output += table[segment >> 12]; + output += table[segment & 0xfff]; + } + if (numBytes - i === 2) { + segment = (rawData[i] << 16) + (rawData[i + 1] << 8); + output += table[segment >> 12]; + output += b64_6bit[(segment & 0xfff) >> 6]; + output += '='; + } else if (numBytes - i === 1) { + segment = rawData[i] << 16; + output += table[segment >> 12]; + output += '=='; + } + return output; + } + }); + + // file: src/common/builder.js + define('cordova/builder', function (require, exports, module) { + var utils = require('cordova/utils'); + + function each(objects, func, context) { + for (var prop in objects) { + if (objects.hasOwnProperty(prop)) { + func.apply(context, [objects[prop], prop]); + } + } + } + + function clobber(obj, key, value) { + exports.replaceHookForTesting(obj, key); + var needsProperty = false; + try { + obj[key] = value; + } catch (e) { + needsProperty = true; + } + // Getters can only be overridden by getters. + if (needsProperty || obj[key] !== value) { + utils.defineGetter(obj, key, function () { + return value; + }); + } + } + + function assignOrWrapInDeprecateGetter(obj, key, value, message) { + if (message) { + utils.defineGetter(obj, key, function () { + console.log(message); + delete obj[key]; + clobber(obj, key, value); + return value; + }); + } else { + clobber(obj, key, value); + } + } + + function include(parent, objects, clobber, merge) { + each(objects, function (obj, key) { + try { + var result = obj.path ? require(obj.path) : {}; + + if (clobber) { + // Clobber if it doesn't exist. + if (typeof parent[key] === 'undefined') { + assignOrWrapInDeprecateGetter( + parent, + key, + result, + obj.deprecated, + ); + } else if (typeof obj.path !== 'undefined') { + // If merging, merge properties onto parent, otherwise, clobber. + if (merge) { + recursiveMerge(parent[key], result); + } else { + assignOrWrapInDeprecateGetter( + parent, + key, + result, + obj.deprecated, + ); + } + } + result = parent[key]; + } else { + // Overwrite if not currently defined. + if (typeof parent[key] === 'undefined') { + assignOrWrapInDeprecateGetter( + parent, + key, + result, + obj.deprecated, + ); + } else { + // Set result to what already exists, so we can build children into it if they exist. + result = parent[key]; + } + } + + if (obj.children) { + include(result, obj.children, clobber, merge); + } + } catch (e) { + utils.alert( + 'Exception building Cordova JS globals: ' + + e + + ' for key "' + + key + + '"', + ); + } + }); + } + + /** + * Merge properties from one object onto another recursively. Properties from + * the src object will overwrite existing target property. + * + * @param target Object to merge properties into. + * @param src Object to merge properties from. + */ + function recursiveMerge(target, src) { + for (var prop in src) { + if (src.hasOwnProperty(prop)) { + if (target.prototype && target.prototype.constructor === target) { + // If the target object is a constructor override off prototype. + clobber(target.prototype, prop, src[prop]); + } else { + if ( + typeof src[prop] === 'object' && + typeof target[prop] === 'object' + ) { + recursiveMerge(target[prop], src[prop]); + } else { + clobber(target, prop, src[prop]); + } + } + } + } + } + + exports.buildIntoButDoNotClobber = function (objects, target) { + include(target, objects, false, false); + }; + exports.buildIntoAndClobber = function (objects, target) { + include(target, objects, true, false); + }; + exports.buildIntoAndMerge = function (objects, target) { + include(target, objects, true, true); + }; + exports.recursiveMerge = recursiveMerge; + exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter; + exports.replaceHookForTesting = function () {}; + }); + + // file: src/common/channel.js + define('cordova/channel', function (require, exports, module) { + var utils = require('cordova/utils'); + var nextGuid = 1; + + /** + * Custom pub-sub "channel" that can have functions subscribed to it + * This object is used to define and control firing of events for + * cordova initialization, as well as for custom events thereafter. + * + * The order of events during page load and Cordova startup is as follows: + * + * onDOMContentLoaded* Internal event that is received when the web page is loaded and parsed. + * onNativeReady* Internal event that indicates the Cordova native side is ready. + * onCordovaReady* Internal event fired when all Cordova JavaScript objects have been created. + * onDeviceReady* User event fired to indicate that Cordova is ready + * onResume User event fired to indicate a start/resume lifecycle event + * onPause User event fired to indicate a pause lifecycle event + * + * The events marked with an * are sticky. Once they have fired, they will stay in the fired state. + * All listeners that subscribe after the event is fired will be executed right away. + * + * The only Cordova events that user code should register for are: + * deviceready Cordova native code is initialized and Cordova APIs can be called from JavaScript + * pause App has moved to background + * resume App has returned to foreground + * + * Listeners can be registered as: + * document.addEventListener("deviceready", myDeviceReadyListener, false); + * document.addEventListener("resume", myResumeListener, false); + * document.addEventListener("pause", myPauseListener, false); + * + * The DOM lifecycle events should be used for saving and restoring state + * window.onload + * window.onunload + * + */ + + /** + * Channel + * @constructor + * @param type String the channel name + */ + var Channel = function (type, sticky) { + this.type = type; + // Map of guid -> function. + this.handlers = {}; + // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired. + this.state = sticky ? 1 : 0; + // Used in sticky mode to remember args passed to fire(). + this.fireArgs = null; + // Used by onHasSubscribersChange to know if there are any listeners. + this.numHandlers = 0; + // Function that is called when the first listener is subscribed, or when + // the last listener is unsubscribed. + this.onHasSubscribersChange = null; + }; + var channel = { + /** + * Calls the provided function only after all of the channels specified + * have been fired. All channels must be sticky channels. + */ + join: function (h, c) { + var len = c.length; + var i = len; + var f = function () { + if (!--i) h(); + }; + for (var j = 0; j < len; j++) { + if (c[j].state === 0) { + throw Error('Can only use join with sticky channels.'); + } + c[j].subscribe(f); + } + if (!len) h(); + }, + /* eslint-disable no-return-assign */ + create: function (type) { + return (channel[type] = new Channel(type, false)); + }, + createSticky: function (type) { + return (channel[type] = new Channel(type, true)); + }, + /* eslint-enable no-return-assign */ + /** + * cordova Channels that must fire before "deviceready" is fired. + */ + deviceReadyChannelsArray: [], + deviceReadyChannelsMap: {}, + + /** + * Indicate that a feature needs to be initialized before it is ready to be used. + * This holds up Cordova's "deviceready" event until the feature has been initialized + * and Cordova.initComplete(feature) is called. + * + * @param feature {String} The unique feature name + */ + waitForInitialization: function (feature) { + if (feature) { + var c = channel[feature] || this.createSticky(feature); + this.deviceReadyChannelsMap[feature] = c; + this.deviceReadyChannelsArray.push(c); + } + }, + + /** + * Indicate that initialization code has completed and the feature is ready to be used. + * + * @param feature {String} The unique feature name + */ + initializationComplete: function (feature) { + var c = this.deviceReadyChannelsMap[feature]; + if (c) { + c.fire(); + } + }, + }; + + function checkSubscriptionArgument(argument) { + if ( + typeof argument !== 'function' && + typeof argument.handleEvent !== 'function' + ) { + throw new Error( + 'Must provide a function or an EventListener object ' + + 'implementing the handleEvent interface.', + ); + } + } + + /** + * Subscribes the given function to the channel. Any time that + * Channel.fire is called so too will the function. + * Optionally specify an execution context for the function + * and a guid that can be used to stop subscribing to the channel. + * Returns the guid. + */ + Channel.prototype.subscribe = function ( + eventListenerOrFunction, + eventListener, + ) { + checkSubscriptionArgument(eventListenerOrFunction); + var handleEvent, guid; + + if ( + eventListenerOrFunction && + typeof eventListenerOrFunction === 'object' + ) { + // Received an EventListener object implementing the handleEvent interface + handleEvent = eventListenerOrFunction.handleEvent; + eventListener = eventListenerOrFunction; + } else { + // Received a function to handle event + handleEvent = eventListenerOrFunction; + } + + if (this.state === 2) { + handleEvent.apply(eventListener || this, this.fireArgs); + return; + } + + guid = eventListenerOrFunction.observer_guid; + if (typeof eventListener === 'object') { + handleEvent = utils.close(eventListener, handleEvent); + } + + if (!guid) { + // First time any channel has seen this subscriber + guid = '' + nextGuid++; + } + handleEvent.observer_guid = guid; + eventListenerOrFunction.observer_guid = guid; + + // Don't add the same handler more than once. + if (!this.handlers[guid]) { + this.handlers[guid] = handleEvent; + this.numHandlers++; + if (this.numHandlers === 1) { + this.onHasSubscribersChange && this.onHasSubscribersChange(); + } + } + }; + + /** + * Unsubscribes the function with the given guid from the channel. + */ + Channel.prototype.unsubscribe = function (eventListenerOrFunction) { + checkSubscriptionArgument(eventListenerOrFunction); + var handleEvent, guid, handler; + + if ( + eventListenerOrFunction && + typeof eventListenerOrFunction === 'object' + ) { + // Received an EventListener object implementing the handleEvent interface + handleEvent = eventListenerOrFunction.handleEvent; + } else { + // Received a function to handle event + handleEvent = eventListenerOrFunction; + } + + guid = handleEvent.observer_guid; + handler = this.handlers[guid]; + if (handler) { + delete this.handlers[guid]; + this.numHandlers--; + if (this.numHandlers === 0) { + this.onHasSubscribersChange && this.onHasSubscribersChange(); + } + } + }; + + /** + * Calls all functions subscribed to this channel. + */ + Channel.prototype.fire = function (e) { + var fail = false; // eslint-disable-line no-unused-vars + var fireArgs = Array.prototype.slice.call(arguments); + // Apply stickiness. + if (this.state === 1) { + this.state = 2; + this.fireArgs = fireArgs; + } + if (this.numHandlers) { + // Copy the values first so that it is safe to modify it from within + // callbacks. + var toCall = []; + for (var item in this.handlers) { + toCall.push(this.handlers[item]); + } + for (var i = 0; i < toCall.length; ++i) { + toCall[i].apply(this, fireArgs); + } + if (this.state === 2 && this.numHandlers) { + this.numHandlers = 0; + this.handlers = {}; + this.onHasSubscribersChange && this.onHasSubscribersChange(); + } + } + }; + + // defining them here so they are ready super fast! + // DOM event that is received when the web page is loaded and parsed. + channel.createSticky('onDOMContentLoaded'); + + // Event to indicate the Cordova native side is ready. + channel.createSticky('onNativeReady'); + + // Event to indicate that all Cordova JavaScript objects have been created + // and it's time to run plugin constructors. + channel.createSticky('onCordovaReady'); + + // Event to indicate that all automatically loaded JS plugins are loaded and ready. + // FIXME remove this + channel.createSticky('onPluginsReady'); + + // Event to indicate that Cordova is ready + channel.createSticky('onDeviceReady'); + + // Event to indicate a resume lifecycle event + channel.create('onResume'); + + // Event to indicate a pause lifecycle event + channel.create('onPause'); + + // Channels that must fire before "deviceready" is fired. + channel.waitForInitialization('onCordovaReady'); + channel.waitForInitialization('onDOMContentLoaded'); + + module.exports = channel; + }); + + define('cordova/exec', function (require, exports, module) { + /*global require, module, atob, document */ + + /** + * Creates a gap bridge iframe used to notify the native code about queued + * commands. + */ + var cordova = require('cordova'), + utils = require('cordova/utils'), + base64 = require('cordova/base64'), + execIframe, + commandQueue = [], // Contains pending JS->Native messages. + isInContextOfEvalJs = 0, + failSafeTimerId = 0; + + function massageArgsJsToNative(args) { + if (window.androidBridge) { + for (var i = 0; i < args.length; i++) { + if (utils.typeName(args[i]) == 'ArrayBuffer') { + args[i] = base64.fromArrayBuffer(args[i]); + } + } + return args; + } else { + if (!args || utils.typeName(args) !== 'Array') { + return args; + } + var ret = []; + args.forEach(function (arg, i) { + if (utils.typeName(arg) === 'ArrayBuffer') { + ret.push({ + CDVType: 'ArrayBuffer', + data: base64.fromArrayBuffer(arg), + }); + } else { + ret.push(arg); + } + }); + return ret; + } + } + + function massageMessageNativeToJs(message) { + if (message.CDVType === 'ArrayBuffer') { + var stringToArrayBuffer = function (str) { + var ret = new Uint8Array(str.length); + for (var i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret.buffer; + }; + var base64ToArrayBuffer = function (b64) { + return stringToArrayBuffer(atob(b64)); // eslint-disable-line no-undef + }; + message = base64ToArrayBuffer(message.data); + } + return message; + } + + function convertMessageToArgsNativeToJs(message) { + var args = []; + if (!message || !message.hasOwnProperty('CDVType')) { + args.push(message); + } else if (message.CDVType === 'MultiPart') { + message.messages.forEach(function (e) { + args.push(massageMessageNativeToJs(e)); + }); + } else { + args.push(massageMessageNativeToJs(message)); + } + return args; + } + + var capacitorExec = function () { + // detect change in bridge, if there is a change, we forward to new bridge + + var successCallback, failCallback, service, action, actionArgs; + var callbackId = null; + if (typeof arguments[0] !== 'string') { + // FORMAT ONE + successCallback = arguments[0]; + failCallback = arguments[1]; + service = arguments[2]; + action = arguments[3]; + actionArgs = arguments[4]; + + // Since we need to maintain backwards compatibility, we have to pass + // an invalid callbackId even if no callback was provided since plugins + // will be expecting it. The Cordova.exec() implementation allocates + // an invalid callbackId and passes it even if no callbacks were given. + callbackId = 'INVALID'; + } else { + throw new Error( + 'The old format of this exec call has been removed (deprecated since 2.1). Change to: ' + // eslint-disable-line + "cordova.exec(null, null, 'Service', 'action', [ arg1, arg2 ]);", + ); + } + + // If actionArgs is not provided, default to an empty array + actionArgs = actionArgs || []; + + // Register the callbacks and add the callbackId to the positional + // arguments if given. + if (successCallback || failCallback) { + callbackId = service + cordova.callbackId++; + cordova.callbacks[callbackId] = { + success: successCallback, + fail: failCallback, + }; + } + + // Properly encode ArrayBuffer action arguments + actionArgs = massageArgsJsToNative(actionArgs); + actionArgs = JSON.parse(JSON.stringify(actionArgs)); + var command = { + type: 'cordova', + callbackId: callbackId, + service: service, + action: action, + actionArgs: actionArgs, + }; + if (window.androidBridge) { + window.androidBridge.postMessage(JSON.stringify(command)); + } else if ( + window.webkit && + window.webkit.messageHandlers && + window.webkit.messageHandlers.bridge + ) { + window.webkit.messageHandlers.bridge.postMessage(command); + } + }; + + // CB-10530 + function proxyChanged() { + var cexec = cordovaExec(); + + return ( + execProxy !== cexec && capacitorExec !== cexec // proxy objects are different // proxy object is not the current capacitorExec + ); + } + + // CB-10106 + function handleBridgeChange() { + if (proxyChanged()) { + var commandString = commandQueue.shift(); + while (commandString) { + var command = JSON.parse(commandString); + var callbackId = command[0]; + var service = command[1]; + var action = command[2]; + var actionArgs = command[3]; + var callbacks = cordova.callbacks[callbackId] || {}; + + execProxy( + callbacks.success, + callbacks.fail, + service, + action, + actionArgs, + ); + + commandString = commandQueue.shift(); + } + return true; + } + + return false; + } + + function pokeNative() { + // CB-5488 - Don't attempt to create iframe before document.body is available. + if (!document.body) { + setTimeout(pokeNative); + return; + } + + // Check if they've removed it from the DOM, and put it back if so. + if (execIframe && execIframe.contentWindow) { + execIframe.contentWindow.location = 'gap://ready'; + } else { + execIframe = document.createElement('iframe'); + execIframe.style.display = 'none'; + execIframe.src = 'gap://ready'; + document.body.appendChild(execIframe); + } + // Use a timer to protect against iframe being unloaded during the poke (CB-7735). + // This makes the bridge ~ 7% slower, but works around the poke getting lost + // when the iframe is removed from the DOM. + // An onunload listener could be used in the case where the iframe has just been + // created, but since unload events fire only once, it doesn't work in the normal + // case of iframe reuse (where unload will have already fired due to the attempted + // navigation of the page). + failSafeTimerId = setTimeout(function () { + if (commandQueue.length) { + // CB-10106 - flush the queue on bridge change + if (!handleBridgeChange()) { + pokeNative(); + } + } + }, 50); // Making this > 0 improves performance (marginally) in the normal case (where it doesn't fire). + } + + capacitorExec.nativeFetchMessages = function () { + // Stop listing for window detatch once native side confirms poke. + if (failSafeTimerId) { + clearTimeout(failSafeTimerId); + failSafeTimerId = 0; + } + // Each entry in commandQueue is a JSON string already. + if (!commandQueue.length) { + return ''; + } + var json = '[' + commandQueue.join(',') + ']'; + commandQueue.length = 0; + return json; + }; + + capacitorExec.nativeCallback = function ( + callbackId, + status, + message, + keepCallback, + debug, + ) { + var success = status === 0 || status === 1; + var args = convertMessageToArgsNativeToJs(message); + Promise.resolve().then(function () { + cordova.callbackFromNative( + callbackId, + success, + status, + args, + keepCallback, + ); // eslint-disable-line + }); + }; + + // for backwards compatibility + capacitorExec.nativeEvalAndFetch = function (func) { + try { + func(); + } catch (e) { + console.log(e); + } + }; + + // Proxy the exec for bridge changes. See CB-10106 + function cordovaExec() { + var cexec = require('cordova/exec'); + var cexec_valid = + typeof cexec.nativeFetchMessages === 'function' && + typeof cexec.nativeEvalAndFetch === 'function' && + typeof cexec.nativeCallback === 'function'; + return cexec_valid && execProxy !== cexec ? cexec : capacitorExec; + } + function execProxy() { + cordovaExec().apply(null, arguments); + } + + execProxy.nativeFetchMessages = function () { + return cordovaExec().nativeFetchMessages.apply(null, arguments); + }; + + execProxy.nativeEvalAndFetch = function () { + return cordovaExec().nativeEvalAndFetch.apply(null, arguments); + }; + + execProxy.nativeCallback = function () { + return cordovaExec().nativeCallback.apply(null, arguments); + }; + + module.exports = execProxy; + }); + + // file: src/common/exec/proxy.js + define('cordova/exec/proxy', function (require, exports, module) { + // internal map of proxy function + var CommandProxyMap = {}; + + module.exports = { + // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...); + add: function (id, proxyObj) { + console.log('adding proxy for ' + id); + CommandProxyMap[id] = proxyObj; + return proxyObj; + }, + + // cordova.commandProxy.remove("Accelerometer"); + remove: function (id) { + var proxy = CommandProxyMap[id]; + delete CommandProxyMap[id]; + CommandProxyMap[id] = null; + return proxy; + }, + + get: function (service, action) { + return CommandProxyMap[service] + ? CommandProxyMap[service][action] + : null; + }, + }; + }); + + // file: src/common/init.js + define('cordova/init', function (require, exports, module) { + var channel = require('cordova/channel'); + var cordova = require('cordova'); + var modulemapper = require('cordova/modulemapper'); + var platform = require('cordova/platform'); + var pluginloader = require('cordova/pluginloader'); + var utils = require('cordova/utils'); + + var platformInitChannelsArray = [ + channel.onNativeReady, + channel.onPluginsReady, + ]; + + function logUnfiredChannels(arr) { + for (var i = 0; i < arr.length; ++i) { + if (arr[i].state !== 2) { + console.log('Channel not fired: ' + arr[i].type); + } + } + } + + window.setTimeout(function () { + if (channel.onDeviceReady.state !== 2) { + console.log('deviceready has not fired after 5 seconds.'); + logUnfiredChannels(platformInitChannelsArray); + logUnfiredChannels(channel.deviceReadyChannelsArray); + } + }, 5000); + + // Replace navigator before any modules are required(), to ensure it happens as soon as possible. + // We replace it so that properties that can't be clobbered can instead be overridden. + function replaceNavigator(origNavigator) { + var CordovaNavigator = function () {}; + CordovaNavigator.prototype = origNavigator; + var newNavigator = new CordovaNavigator(); + // This work-around really only applies to new APIs that are newer than Function.bind. + // Without it, APIs such as getGamepads() break. + if (CordovaNavigator.bind) { + for (var key in origNavigator) { + if (typeof origNavigator[key] === 'function') { + newNavigator[key] = origNavigator[key].bind(origNavigator); + } else { + (function (k) { + utils.defineGetterSetter(newNavigator, key, function () { + return origNavigator[k]; + }); + })(key); + } + } + } + return newNavigator; + } + + if (window.navigator) { + window.navigator = replaceNavigator(window.navigator); + } + + // Register pause, resume and deviceready channels as events on document. + channel.onPause = cordova.addDocumentEventHandler('pause'); + channel.onResume = cordova.addDocumentEventHandler('resume'); + channel.onActivated = cordova.addDocumentEventHandler('activated'); + channel.onDeviceReady = + cordova.addStickyDocumentEventHandler('deviceready'); + + // Listen for DOMContentLoaded and notify our channel subscribers. + if ( + document.readyState === 'complete' || + document.readyState === 'interactive' + ) { + channel.onDOMContentLoaded.fire(); + } else { + document.addEventListener( + 'DOMContentLoaded', + function () { + channel.onDOMContentLoaded.fire(); + }, + false, + ); + } + + // _nativeReady is global variable that the native side can set + // to signify that the native code is ready. It is a global since + // it may be called before any cordova JS is ready. + if (window._nativeReady) { + channel.onNativeReady.fire(); + } + + modulemapper.clobbers('cordova', 'cordova'); + modulemapper.clobbers('cordova/exec', 'cordova.exec'); + modulemapper.clobbers('cordova/exec', 'Cordova.exec'); + + // Call the platform-specific initialization. + platform.bootstrap && platform.bootstrap(); + + // Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js. + // The delay allows the attached modules to be defined before the plugin loader looks for them. + setTimeout(function () { + pluginloader.load(function () { + channel.onPluginsReady.fire(); + }); + }, 0); + + /** + * Create all cordova objects once native side is ready. + */ + channel.join(function () { + modulemapper.mapModules(window); + + platform.initialize && platform.initialize(); + + // Fire event to notify that all objects are created + channel.onCordovaReady.fire(); + + // Fire onDeviceReady event once page has fully loaded, all + // constructors have run and cordova info has been received from native + // side. + channel.join(function () { + require('cordova').fireDocumentEvent('deviceready'); + }, channel.deviceReadyChannelsArray); + }, platformInitChannelsArray); + }); + + // file: src/common/modulemapper.js + define('cordova/modulemapper', function (require, exports, module) { + var builder = require('cordova/builder'); + var moduleMap = define.moduleMap; // eslint-disable-line no-undef + var symbolList; + var deprecationMap; + + exports.reset = function () { + symbolList = []; + deprecationMap = {}; + }; + + function addEntry( + strategy, + moduleName, + symbolPath, + opt_deprecationMessage, + ) { + if (!(moduleName in moduleMap)) { + throw new Error('Module ' + moduleName + ' does not exist.'); + } + symbolList.push(strategy, moduleName, symbolPath); + if (opt_deprecationMessage) { + deprecationMap[symbolPath] = opt_deprecationMessage; + } + } + + // Note: Android 2.3 does have Function.bind(). + exports.clobbers = function ( + moduleName, + symbolPath, + opt_deprecationMessage, + ) { + addEntry('c', moduleName, symbolPath, opt_deprecationMessage); + }; + + exports.merges = function (moduleName, symbolPath, opt_deprecationMessage) { + addEntry('m', moduleName, symbolPath, opt_deprecationMessage); + }; + + exports.defaults = function ( + moduleName, + symbolPath, + opt_deprecationMessage, + ) { + addEntry('d', moduleName, symbolPath, opt_deprecationMessage); + }; + + exports.runs = function (moduleName) { + addEntry('r', moduleName, null); + }; + + function prepareNamespace(symbolPath, context) { + if (!symbolPath) { + return context; + } + var parts = symbolPath.split('.'); + var cur = context; + for (var i = 0, part; (part = parts[i]); ++i) { + // eslint-disable-line no-cond-assign + cur = cur[part] = cur[part] || {}; + } + return cur; + } + + exports.mapModules = function (context) { + var origSymbols = {}; + context.CDV_origSymbols = origSymbols; + for (var i = 0, len = symbolList.length; i < len; i += 3) { + var strategy = symbolList[i]; + var moduleName = symbolList[i + 1]; + var module = require(moduleName); + // + if (strategy === 'r') { + continue; + } + var symbolPath = symbolList[i + 2]; + var lastDot = symbolPath.lastIndexOf('.'); + var namespace = symbolPath.substr(0, lastDot); + var lastName = symbolPath.substr(lastDot + 1); + + var deprecationMsg = + symbolPath in deprecationMap + ? 'Access made to deprecated symbol: ' + + symbolPath + + '. ' + + deprecationMsg + : null; + var parentObj = prepareNamespace(namespace, context); + var target = parentObj[lastName]; + + if (strategy === 'm' && target) { + builder.recursiveMerge(target, module); + } else if ((strategy === 'd' && !target) || strategy !== 'd') { + if (!(symbolPath in origSymbols)) { + origSymbols[symbolPath] = target; + } + builder.assignOrWrapInDeprecateGetter( + parentObj, + lastName, + module, + deprecationMsg, + ); + } + } + }; + + exports.getOriginalSymbol = function (context, symbolPath) { + var origSymbols = context.CDV_origSymbols; + if (origSymbols && symbolPath in origSymbols) { + return origSymbols[symbolPath]; + } + var parts = symbolPath.split('.'); + var obj = context; + for (var i = 0; i < parts.length; ++i) { + obj = obj && obj[parts[i]]; + } + return obj; + }; + + exports.reset(); + }); + + define('cordova/platform', function (require, exports, module) { + module.exports = { + id: Capacitor.platform, + bootstrap: function () { + require('cordova/channel').onNativeReady.fire(); + }, + }; + }); + + // file: src/common/pluginloader.js + define('cordova/pluginloader', function (require, exports, module) { + var modulemapper = require('cordova/modulemapper'); + + function onScriptLoadingComplete(moduleList, finishPluginLoading) { + console.log('onscript loading complete'); + // Loop through all the plugins and then through their clobbers and merges. + for (var i = 0, module; (module = moduleList[i]); i++) { + // eslint-disable-line no-cond-assign + if (module.clobbers && module.clobbers.length) { + for (var j = 0; j < module.clobbers.length; j++) { + modulemapper.clobbers(module.id, module.clobbers[j]); + } + } + + if (module.merges && module.merges.length) { + for (var k = 0; k < module.merges.length; k++) { + modulemapper.merges(module.id, module.merges[k]); + } + } + + // Finally, if runs is truthy we want to simply require() the module. + if (module.runs) { + modulemapper.runs(module.id); + } + } + + finishPluginLoading(); + } + + // Tries to load all plugins' js-modules. + // This is an async process, but onDeviceReady is blocked on onPluginsReady. + // onPluginsReady is fired when there are no plugins to load, or they are all done. + exports.load = function (callback) { + var moduleList = require('cordova/plugin_list'); + onScriptLoadingComplete(moduleList, callback); + }; + }); + + // file: src/common/urlutil.js + define('cordova/urlutil', function (require, exports, module) { + /** + * For already absolute URLs, returns what is passed in. + * For relative URLs, converts them to absolute ones. + */ + exports.makeAbsolute = function makeAbsolute(url) { + var anchorEl = document.createElement('a'); + anchorEl.href = url; + return anchorEl.href; + }; + }); + + // file: src/common/utils.js + define('cordova/utils', function (require, exports, module) { + var utils = exports; + + /** + * Defines a property getter / setter for obj[key]. + */ + utils.defineGetterSetter = function (obj, key, getFunc, opt_setFunc) { + if (Object.defineProperty) { + var desc = { + get: getFunc, + configurable: true, + }; + if (opt_setFunc) { + desc.set = opt_setFunc; + } + Object.defineProperty(obj, key, desc); + } else { + obj.__defineGetter__(key, getFunc); + if (opt_setFunc) { + obj.__defineSetter__(key, opt_setFunc); + } + } + }; + + /** + * Defines a property getter for obj[key]. + */ + utils.defineGetter = utils.defineGetterSetter; + + utils.arrayIndexOf = function (a, item) { + if (a.indexOf) { + return a.indexOf(item); + } + var len = a.length; + for (var i = 0; i < len; ++i) { + if (a[i] === item) { + return i; + } + } + return -1; + }; + + /** + * Returns whether the item was found in the array. + */ + utils.arrayRemove = function (a, item) { + var index = utils.arrayIndexOf(a, item); + if (index !== -1) { + a.splice(index, 1); + } + return index !== -1; + }; + + utils.typeName = function (val) { + return Object.prototype.toString.call(val).slice(8, -1); + }; + + /** + * Returns an indication of whether the argument is an array or not + */ + utils.isArray = + Array.isArray || + function (a) { + return utils.typeName(a) === 'Array'; + }; + + /** + * Returns an indication of whether the argument is a Date or not + */ + utils.isDate = function (d) { + return d instanceof Date; + }; + + /** + * Does a deep clone of the object. + */ + utils.clone = function (obj) { + if ( + !obj || + typeof obj === 'function' || + utils.isDate(obj) || + typeof obj !== 'object' + ) { + return obj; + } + + var retVal, i; + + if (utils.isArray(obj)) { + retVal = []; + for (i = 0; i < obj.length; ++i) { + retVal.push(utils.clone(obj[i])); + } + return retVal; + } + + retVal = {}; + for (i in obj) { + // https://issues.apache.org/jira/browse/CB-11522 'unknown' type may be returned in + // custom protocol activation case on Windows Phone 8.1 causing "No such interface supported" exception + // on cloning. + if ( + (!(i in retVal) || retVal[i] !== obj[i]) && + typeof obj[i] !== 'undefined' && + typeof obj[i] !== 'unknown' + ) { + // eslint-disable-line valid-typeof + retVal[i] = utils.clone(obj[i]); + } + } + return retVal; + }; + + /** + * Returns a wrapped version of the function + */ + utils.close = function (context, func, params) { + return function () { + var args = params || arguments; + return func.apply(context, args); + }; + }; + + // ------------------------------------------------------------------------------ + function UUIDcreatePart(length) { + var uuidpart = ''; + for (var i = 0; i < length; i++) { + var uuidchar = parseInt(Math.random() * 256, 10).toString(16); + if (uuidchar.length === 1) { + uuidchar = '0' + uuidchar; + } + uuidpart += uuidchar; + } + return uuidpart; + } + + /** + * Create a UUID + */ + utils.createUUID = function () { + return ( + UUIDcreatePart(4) + + '-' + + UUIDcreatePart(2) + + '-' + + UUIDcreatePart(2) + + '-' + + UUIDcreatePart(2) + + '-' + + UUIDcreatePart(6) + ); + }; + + /** + * Extends a child object from a parent object using classical inheritance + * pattern. + */ + utils.extend = (function () { + // proxy used to establish prototype chain + var F = function () {}; + // extend Child from Parent + return function (Child, Parent) { + F.prototype = Parent.prototype; + Child.prototype = new F(); + Child.__super__ = Parent.prototype; + Child.prototype.constructor = Child; + }; + })(); + + /** + * Alerts a message in any available way: alert or console.log. + */ + utils.alert = function (msg) { + if (window.alert) { + window.alert(msg); + } else if (console && console.log) { + console.log(msg); + } + }; + }); + + window.cordova = require('cordova'); + // file: src/scripts/bootstrap.js + + require('cordova/init'); +})(); diff --git a/node_modules/@capacitor/core/dist/capacitor.js b/node_modules/@capacitor/core/dist/capacitor.js new file mode 100644 index 0000000..1ca63c1 --- /dev/null +++ b/node_modules/@capacitor/core/dist/capacitor.js @@ -0,0 +1,3 @@ +/*! Capacitor: https://capacitorjs.com/ - MIT License */ +var capacitorExports=function(e){"use strict";const t=(e=>e.CapacitorPlatforms=(e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t};return n.addPlatform=(e,t)=>{n.platforms.set(e,t)},n.setPlatform=e=>{n.platforms.has(e)&&(n.currentPlatform=n.platforms.get(e))},n})(e))("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),n=t.addPlatform,r=t.setPlatform;var i;e.ExceptionCode=void 0,(i=e.ExceptionCode||(e.ExceptionCode={})).Unimplemented="UNIMPLEMENTED",i.Unavailable="UNAVAILABLE";class o extends Error{constructor(e,t,n){super(e),this.message=e,this.code=t,this.data=n}}const s=t=>{var n,r,i,s,a;const l=t.CapacitorCustomPlatform||null,c=t.Capacitor||{},d=c.Plugins=c.Plugins||{},u=t.CapacitorPlatforms,p=(null===(n=null==u?void 0:u.currentPlatform)||void 0===n?void 0:n.getPlatform)||(()=>null!==l?l.name:(e=>{var t,n;return(null==e?void 0:e.androidBridge)?"android":(null===(n=null===(t=null==e?void 0:e.webkit)||void 0===t?void 0:t.messageHandlers)||void 0===n?void 0:n.bridge)?"ios":"web"})(t)),m=(null===(r=null==u?void 0:u.currentPlatform)||void 0===r?void 0:r.isNativePlatform)||(()=>"web"!==p()),f=(null===(i=null==u?void 0:u.currentPlatform)||void 0===i?void 0:i.isPluginAvailable)||(e=>{const t=w.get(e);return!!(null==t?void 0:t.platforms.has(p()))||!!g(e)}),g=(null===(s=null==u?void 0:u.currentPlatform)||void 0===s?void 0:s.getPluginHeader)||(e=>{var t;return null===(t=c.PluginHeaders)||void 0===t?void 0:t.find((t=>t.name===e))}),w=new Map,h=(null===(a=null==u?void 0:u.currentPlatform)||void 0===a?void 0:a.registerPlugin)||((t,n={})=>{const r=w.get(t);if(r)return console.warn(`Capacitor plugin "${t}" already registered. Cannot register plugins twice.`),r.proxy;const i=p(),s=g(t);let a;const u=r=>{let d;const u=(...u)=>{const p=(async()=>(!a&&i in n?a=a="function"==typeof n[i]?await n[i]():n[i]:null!==l&&!a&&"web"in n&&(a=a="function"==typeof n.web?await n.web():n.web),a))().then((n=>{const a=((n,r)=>{var a,l;if(!s){if(n)return null===(l=n[r])||void 0===l?void 0:l.bind(n);throw new o(`"${t}" plugin is not implemented on ${i}`,e.ExceptionCode.Unimplemented)}{const e=null==s?void 0:s.methods.find((e=>r===e.name));if(e)return"promise"===e.rtype?e=>c.nativePromise(t,r.toString(),e):(e,n)=>c.nativeCallback(t,r.toString(),e,n);if(n)return null===(a=n[r])||void 0===a?void 0:a.bind(n)}})(n,r);if(a){const e=a(...u);return d=null==e?void 0:e.remove,e}throw new o(`"${t}.${r}()" is not implemented on ${i}`,e.ExceptionCode.Unimplemented)}));return"addListener"===r&&(p.remove=async()=>d()),p};return u.toString=()=>`${r.toString()}() { [capacitor code] }`,Object.defineProperty(u,"name",{value:r,writable:!1,configurable:!1}),u},m=u("addListener"),f=u("removeListener"),h=(e,t)=>{const n=m({eventName:e},t),r=async()=>{const r=await n;f({eventName:e,callbackId:r},t)},i=new Promise((e=>n.then((()=>e({remove:r})))));return i.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await r()},i},v=new Proxy({},{get(e,t){switch(t){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return s?h:m;case"removeListener":return f;default:return u(t)}}});return d[t]=v,w.set(t,{name:t,proxy:v,platforms:new Set([...Object.keys(n),...s?[i]:[]])}),v});return c.convertFileSrc||(c.convertFileSrc=e=>e),c.getPlatform=p,c.handleError=e=>t.console.error(e),c.isNativePlatform=m,c.isPluginAvailable=f,c.pluginMethodNoop=(e,t,n)=>Promise.reject(`${n} does not have an implementation of "${t}".`),c.registerPlugin=h,c.Exception=o,c.DEBUG=!!c.DEBUG,c.isLoggingEnabled=!!c.isLoggingEnabled,c.platform=c.getPlatform(),c.isNative=c.isNativePlatform(),c},a=(e=>e.Capacitor=s(e))("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),l=a.registerPlugin,c=a.Plugins;class d{constructor(e){this.listeners={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t);const n=this.windowListeners[e];n&&!n.registered&&this.addWindowListener(n);const r=async()=>this.removeListener(e,t),i=Promise.resolve({remove:r});return Object.defineProperty(i,"remove",{value:async()=>{console.warn("Using addListener() without 'await' is deprecated."),await r()}}),i}async removeAllListeners(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,t){const n=this.listeners[e];n&&n.forEach((e=>e(t)))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,t){this.windowListeners[t]={registered:!1,windowEventName:e,pluginEventName:t,handler:e=>{this.notifyListeners(t,e)}}}unimplemented(t="not implemented"){return new a.Exception(t,e.ExceptionCode.Unimplemented)}unavailable(t="not available"){return new a.Exception(t,e.ExceptionCode.Unavailable)}async removeListener(e,t){const n=this.listeners[e];if(!n)return;const r=n.indexOf(t);this.listeners[e].splice(r,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const u=l("WebView"),p=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),m=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class f extends d{async getCookies(){const e=document.cookie,t={};return e.split(";").forEach((e=>{if(e.length<=0)return;let[n,r]=e.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");n=m(n).trim(),r=m(r).trim(),t[n]=r})),t}async setCookie(e){try{const t=p(e.key),n=p(e.value),r=`; expires=${(e.expires||"").replace("expires=","")}`,i=(e.path||"/").replace("path=",""),o=null!=e.url&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${t}=${n||""}${r}; path=${i}; ${o};`}catch(e){return Promise.reject(e)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(e){return Promise.reject(e)}}async clearCookies(){try{const e=document.cookie.split(";")||[];for(const t of e)document.cookie=t.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}}const g=l("CapacitorCookies",{web:()=>new f}),w=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),r=((e={})=>{const t=Object.keys(e);return Object.keys(e).map((e=>e.toLocaleLowerCase())).reduce(((n,r,i)=>(n[r]=e[t[i]],n)),{})})(e.headers)["content-type"]||"";if("string"==typeof e.data)n.body=e.data;else if(r.includes("application/x-www-form-urlencoded")){const t=new URLSearchParams;for(const[n,r]of Object.entries(e.data||{}))t.set(n,r);n.body=t.toString()}else if(r.includes("multipart/form-data")||e.data instanceof FormData){const t=new FormData;if(e.data instanceof FormData)e.data.forEach(((e,n)=>{t.append(n,e)}));else for(const n of Object.keys(e.data))t.append(n,e.data[n]);n.body=t;const r=new Headers(n.headers);r.delete("content-type"),n.headers=r}else(r.includes("application/json")||"object"==typeof e.data)&&(n.body=JSON.stringify(e.data));return n};class h extends d{async request(e){const t=w(e,e.webFetchExtra),n=((e,t=!0)=>e?Object.entries(e).reduce(((e,n)=>{const[r,i]=n;let o,s;return Array.isArray(i)?(s="",i.forEach((e=>{o=t?encodeURIComponent(e):e,s+=`${r}=${o}&`})),s.slice(0,-1)):(o=t?encodeURIComponent(i):i,s=`${r}=${o}`),`${e}&${s}`}),"").substr(1):null)(e.params,e.shouldEncodeUrlParams),r=n?`${e.url}?${n}`:e.url,i=await fetch(r,t),o=i.headers.get("content-type")||"";let s,a,{responseType:l="text"}=i.ok?e:{};switch(o.includes("application/json")&&(l="json"),l){case"arraybuffer":case"blob":a=await i.blob(),s=await(async e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=()=>{const e=r.result;t(e.indexOf(",")>=0?e.split(",")[1]:e)},r.onerror=e=>n(e),r.readAsDataURL(e)})))(a);break;case"json":s=await i.json();break;default:s=await i.text()}const c={};return i.headers.forEach(((e,t)=>{c[t]=e})),{data:s,headers:c,status:i.status,url:i.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}}const v=l("CapacitorHttp",{web:()=>new h});return e.Capacitor=a,e.CapacitorCookies=g,e.CapacitorException=o,e.CapacitorHttp=v,e.CapacitorPlatforms=t,e.Plugins=c,e.WebPlugin=d,e.WebView=u,e.addPlatform=n,e.buildRequestInit=w,e.registerPlugin=l,e.registerWebPlugin=e=>((e,t)=>{var n;const r=t.config,i=e.Plugins;if(!(null==r?void 0:r.name))throw new Error('Capacitor WebPlugin is using the deprecated "registerWebPlugin()" function, but without the config. Please use "registerPlugin()" instead to register this web plugin."');console.warn(`Capacitor plugin "${r.name}" is using the deprecated "registerWebPlugin()" function`),i[r.name]&&!(null===(n=null==r?void 0:r.platforms)||void 0===n?void 0:n.includes(e.getPlatform()))||(i[r.name]=t)})(a,e),e.setPlatform=r,Object.defineProperty(e,"__esModule",{value:!0}),e}({}); +//# sourceMappingURL=capacitor.js.map diff --git a/node_modules/@capacitor/core/dist/capacitor.js.map b/node_modules/@capacitor/core/dist/capacitor.js.map new file mode 100644 index 0000000..d866c14 --- /dev/null +++ b/node_modules/@capacitor/core/dist/capacitor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"capacitor.js","sources":["../build/platforms.js","../build/util.js","../build/runtime.js","../build/global.js","../build/web-plugin.js","../build/core-plugins.js","../build/legacy/legacy-web-plugin-merge.js"],"sourcesContent":["const createCapacitorPlatforms = (win) => {\n const defaultPlatformMap = new Map();\n defaultPlatformMap.set('web', { name: 'web' });\n const capPlatforms = win.CapacitorPlatforms || {\n currentPlatform: { name: 'web' },\n platforms: defaultPlatformMap,\n };\n const addPlatform = (name, platform) => {\n capPlatforms.platforms.set(name, platform);\n };\n const setPlatform = (name) => {\n if (capPlatforms.platforms.has(name)) {\n capPlatforms.currentPlatform = capPlatforms.platforms.get(name);\n }\n };\n capPlatforms.addPlatform = addPlatform;\n capPlatforms.setPlatform = setPlatform;\n return capPlatforms;\n};\nconst initPlatforms = (win) => (win.CapacitorPlatforms = createCapacitorPlatforms(win));\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const CapacitorPlatforms = /*#__PURE__*/ initPlatforms((typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {}));\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const addPlatform = CapacitorPlatforms.addPlatform;\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const setPlatform = CapacitorPlatforms.setPlatform;\n//# sourceMappingURL=platforms.js.map","export var ExceptionCode;\n(function (ExceptionCode) {\n /**\n * API is not implemented.\n *\n * This usually means the API can't be used because it is not implemented for\n * the current platform.\n */\n ExceptionCode[\"Unimplemented\"] = \"UNIMPLEMENTED\";\n /**\n * API is not available.\n *\n * This means the API can't be used right now because:\n * - it is currently missing a prerequisite, such as network connectivity\n * - it requires a particular platform or browser version\n */\n ExceptionCode[\"Unavailable\"] = \"UNAVAILABLE\";\n})(ExceptionCode || (ExceptionCode = {}));\nexport class CapacitorException extends Error {\n constructor(message, code, data) {\n super(message);\n this.message = message;\n this.code = code;\n this.data = data;\n }\n}\nexport const getPlatformId = (win) => {\n var _a, _b;\n if (win === null || win === void 0 ? void 0 : win.androidBridge) {\n return 'android';\n }\n else if ((_b = (_a = win === null || win === void 0 ? void 0 : win.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.bridge) {\n return 'ios';\n }\n else {\n return 'web';\n }\n};\n//# sourceMappingURL=util.js.map","import { CapacitorException, getPlatformId, ExceptionCode } from './util';\nexport const createCapacitor = (win) => {\n var _a, _b, _c, _d, _e;\n const capCustomPlatform = win.CapacitorCustomPlatform || null;\n const cap = win.Capacitor || {};\n const Plugins = (cap.Plugins = cap.Plugins || {});\n /**\n * @deprecated Use `capCustomPlatform` instead, default functions like registerPlugin will function with the new object.\n */\n const capPlatforms = win.CapacitorPlatforms;\n const defaultGetPlatform = () => {\n return capCustomPlatform !== null\n ? capCustomPlatform.name\n : getPlatformId(win);\n };\n const getPlatform = ((_a = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _a === void 0 ? void 0 : _a.getPlatform) || defaultGetPlatform;\n const defaultIsNativePlatform = () => getPlatform() !== 'web';\n const isNativePlatform = ((_b = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _b === void 0 ? void 0 : _b.isNativePlatform) || defaultIsNativePlatform;\n const defaultIsPluginAvailable = (pluginName) => {\n const plugin = registeredPlugins.get(pluginName);\n if (plugin === null || plugin === void 0 ? void 0 : plugin.platforms.has(getPlatform())) {\n // JS implementation available for the current platform.\n return true;\n }\n if (getPluginHeader(pluginName)) {\n // Native implementation available.\n return true;\n }\n return false;\n };\n const isPluginAvailable = ((_c = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _c === void 0 ? void 0 : _c.isPluginAvailable) ||\n defaultIsPluginAvailable;\n const defaultGetPluginHeader = (pluginName) => { var _a; return (_a = cap.PluginHeaders) === null || _a === void 0 ? void 0 : _a.find(h => h.name === pluginName); };\n const getPluginHeader = ((_d = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _d === void 0 ? void 0 : _d.getPluginHeader) || defaultGetPluginHeader;\n const handleError = (err) => win.console.error(err);\n const pluginMethodNoop = (_target, prop, pluginName) => {\n return Promise.reject(`${pluginName} does not have an implementation of \"${prop}\".`);\n };\n const registeredPlugins = new Map();\n const defaultRegisterPlugin = (pluginName, jsImplementations = {}) => {\n const registeredPlugin = registeredPlugins.get(pluginName);\n if (registeredPlugin) {\n console.warn(`Capacitor plugin \"${pluginName}\" already registered. Cannot register plugins twice.`);\n return registeredPlugin.proxy;\n }\n const platform = getPlatform();\n const pluginHeader = getPluginHeader(pluginName);\n let jsImplementation;\n const loadPluginImplementation = async () => {\n if (!jsImplementation && platform in jsImplementations) {\n jsImplementation =\n typeof jsImplementations[platform] === 'function'\n ? (jsImplementation = await jsImplementations[platform]())\n : (jsImplementation = jsImplementations[platform]);\n }\n else if (capCustomPlatform !== null &&\n !jsImplementation &&\n 'web' in jsImplementations) {\n jsImplementation =\n typeof jsImplementations['web'] === 'function'\n ? (jsImplementation = await jsImplementations['web']())\n : (jsImplementation = jsImplementations['web']);\n }\n return jsImplementation;\n };\n const createPluginMethod = (impl, prop) => {\n var _a, _b;\n if (pluginHeader) {\n const methodHeader = pluginHeader === null || pluginHeader === void 0 ? void 0 : pluginHeader.methods.find(m => prop === m.name);\n if (methodHeader) {\n if (methodHeader.rtype === 'promise') {\n return (options) => cap.nativePromise(pluginName, prop.toString(), options);\n }\n else {\n return (options, callback) => cap.nativeCallback(pluginName, prop.toString(), options, callback);\n }\n }\n else if (impl) {\n return (_a = impl[prop]) === null || _a === void 0 ? void 0 : _a.bind(impl);\n }\n }\n else if (impl) {\n return (_b = impl[prop]) === null || _b === void 0 ? void 0 : _b.bind(impl);\n }\n else {\n throw new CapacitorException(`\"${pluginName}\" plugin is not implemented on ${platform}`, ExceptionCode.Unimplemented);\n }\n };\n const createPluginMethodWrapper = (prop) => {\n let remove;\n const wrapper = (...args) => {\n const p = loadPluginImplementation().then(impl => {\n const fn = createPluginMethod(impl, prop);\n if (fn) {\n const p = fn(...args);\n remove = p === null || p === void 0 ? void 0 : p.remove;\n return p;\n }\n else {\n throw new CapacitorException(`\"${pluginName}.${prop}()\" is not implemented on ${platform}`, ExceptionCode.Unimplemented);\n }\n });\n if (prop === 'addListener') {\n p.remove = async () => remove();\n }\n return p;\n };\n // Some flair ✨\n wrapper.toString = () => `${prop.toString()}() { [capacitor code] }`;\n Object.defineProperty(wrapper, 'name', {\n value: prop,\n writable: false,\n configurable: false,\n });\n return wrapper;\n };\n const addListener = createPluginMethodWrapper('addListener');\n const removeListener = createPluginMethodWrapper('removeListener');\n const addListenerNative = (eventName, callback) => {\n const call = addListener({ eventName }, callback);\n const remove = async () => {\n const callbackId = await call;\n removeListener({\n eventName,\n callbackId,\n }, callback);\n };\n const p = new Promise(resolve => call.then(() => resolve({ remove })));\n p.remove = async () => {\n console.warn(`Using addListener() without 'await' is deprecated.`);\n await remove();\n };\n return p;\n };\n const proxy = new Proxy({}, {\n get(_, prop) {\n switch (prop) {\n // https://github.com/facebook/react/issues/20030\n case '$$typeof':\n return undefined;\n case 'toJSON':\n return () => ({});\n case 'addListener':\n return pluginHeader ? addListenerNative : addListener;\n case 'removeListener':\n return removeListener;\n default:\n return createPluginMethodWrapper(prop);\n }\n },\n });\n Plugins[pluginName] = proxy;\n registeredPlugins.set(pluginName, {\n name: pluginName,\n proxy,\n platforms: new Set([\n ...Object.keys(jsImplementations),\n ...(pluginHeader ? [platform] : []),\n ]),\n });\n return proxy;\n };\n const registerPlugin = ((_e = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _e === void 0 ? void 0 : _e.registerPlugin) || defaultRegisterPlugin;\n // Add in convertFileSrc for web, it will already be available in native context\n if (!cap.convertFileSrc) {\n cap.convertFileSrc = filePath => filePath;\n }\n cap.getPlatform = getPlatform;\n cap.handleError = handleError;\n cap.isNativePlatform = isNativePlatform;\n cap.isPluginAvailable = isPluginAvailable;\n cap.pluginMethodNoop = pluginMethodNoop;\n cap.registerPlugin = registerPlugin;\n cap.Exception = CapacitorException;\n cap.DEBUG = !!cap.DEBUG;\n cap.isLoggingEnabled = !!cap.isLoggingEnabled;\n // Deprecated props\n cap.platform = cap.getPlatform();\n cap.isNative = cap.isNativePlatform();\n return cap;\n};\nexport const initCapacitorGlobal = (win) => (win.Capacitor = createCapacitor(win));\n//# sourceMappingURL=runtime.js.map","import { legacyRegisterWebPlugin } from './legacy/legacy-web-plugin-merge';\nimport { initCapacitorGlobal } from './runtime';\nexport const Capacitor = /*#__PURE__*/ initCapacitorGlobal(typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {});\nexport const registerPlugin = Capacitor.registerPlugin;\n/**\n * @deprecated Provided for backwards compatibility for Capacitor v2 plugins.\n * Capacitor v3 plugins should import the plugin directly. This \"Plugins\"\n * export is deprecated in v3, and will be removed in v4.\n */\nexport const Plugins = Capacitor.Plugins;\n/**\n * Provided for backwards compatibility. Use the registerPlugin() API\n * instead, and provide the web plugin as the \"web\" implmenetation.\n * For example\n *\n * export const Example = registerPlugin('Example', {\n * web: () => import('./web').then(m => new m.Example())\n * })\n *\n * @deprecated Deprecated in v3, will be removed from v4.\n */\nexport const registerWebPlugin = (plugin) => legacyRegisterWebPlugin(Capacitor, plugin);\n//# sourceMappingURL=global.js.map","import { Capacitor } from './global';\nimport { ExceptionCode } from './util';\n/**\n * Base class web plugins should extend.\n */\nexport class WebPlugin {\n constructor(config) {\n this.listeners = {};\n this.windowListeners = {};\n if (config) {\n // TODO: add link to upgrade guide\n console.warn(`Capacitor WebPlugin \"${config.name}\" config object was deprecated in v3 and will be removed in v4.`);\n this.config = config;\n }\n }\n addListener(eventName, listenerFunc) {\n const listeners = this.listeners[eventName];\n if (!listeners) {\n this.listeners[eventName] = [];\n }\n this.listeners[eventName].push(listenerFunc);\n // If we haven't added a window listener for this event and it requires one,\n // go ahead and add it\n const windowListener = this.windowListeners[eventName];\n if (windowListener && !windowListener.registered) {\n this.addWindowListener(windowListener);\n }\n const remove = async () => this.removeListener(eventName, listenerFunc);\n const p = Promise.resolve({ remove });\n Object.defineProperty(p, 'remove', {\n value: async () => {\n console.warn(`Using addListener() without 'await' is deprecated.`);\n await remove();\n },\n });\n return p;\n }\n async removeAllListeners() {\n this.listeners = {};\n for (const listener in this.windowListeners) {\n this.removeWindowListener(this.windowListeners[listener]);\n }\n this.windowListeners = {};\n }\n notifyListeners(eventName, data) {\n const listeners = this.listeners[eventName];\n if (listeners) {\n listeners.forEach(listener => listener(data));\n }\n }\n hasListeners(eventName) {\n return !!this.listeners[eventName].length;\n }\n registerWindowListener(windowEventName, pluginEventName) {\n this.windowListeners[pluginEventName] = {\n registered: false,\n windowEventName,\n pluginEventName,\n handler: event => {\n this.notifyListeners(pluginEventName, event);\n },\n };\n }\n unimplemented(msg = 'not implemented') {\n return new Capacitor.Exception(msg, ExceptionCode.Unimplemented);\n }\n unavailable(msg = 'not available') {\n return new Capacitor.Exception(msg, ExceptionCode.Unavailable);\n }\n async removeListener(eventName, listenerFunc) {\n const listeners = this.listeners[eventName];\n if (!listeners) {\n return;\n }\n const index = listeners.indexOf(listenerFunc);\n this.listeners[eventName].splice(index, 1);\n // If there are no more listeners for this type of event,\n // remove the window listener\n if (!this.listeners[eventName].length) {\n this.removeWindowListener(this.windowListeners[eventName]);\n }\n }\n addWindowListener(handle) {\n window.addEventListener(handle.windowEventName, handle.handler);\n handle.registered = true;\n }\n removeWindowListener(handle) {\n if (!handle) {\n return;\n }\n window.removeEventListener(handle.windowEventName, handle.handler);\n handle.registered = false;\n }\n}\n//# sourceMappingURL=web-plugin.js.map","import { registerPlugin } from './global';\nimport { WebPlugin } from './web-plugin';\nexport const WebView = /*#__PURE__*/ registerPlugin('WebView');\n/******** END WEB VIEW PLUGIN ********/\n/******** COOKIES PLUGIN ********/\n/**\n * Safely web encode a string value (inspired by js-cookie)\n * @param str The string value to encode\n */\nconst encode = (str) => encodeURIComponent(str)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n/**\n * Safely web decode a string value (inspired by js-cookie)\n * @param str The string value to decode\n */\nconst decode = (str) => str.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent);\nexport class CapacitorCookiesPluginWeb extends WebPlugin {\n async getCookies() {\n const cookies = document.cookie;\n const cookieMap = {};\n cookies.split(';').forEach(cookie => {\n if (cookie.length <= 0)\n return;\n // Replace first \"=\" with CAP_COOKIE to prevent splitting on additional \"=\"\n let [key, value] = cookie.replace(/=/, 'CAP_COOKIE').split('CAP_COOKIE');\n key = decode(key).trim();\n value = decode(value).trim();\n cookieMap[key] = value;\n });\n return cookieMap;\n }\n async setCookie(options) {\n try {\n // Safely Encoded Key/Value\n const encodedKey = encode(options.key);\n const encodedValue = encode(options.value);\n // Clean & sanitize options\n const expires = `; expires=${(options.expires || '').replace('expires=', '')}`; // Default is \"; expires=\"\n const path = (options.path || '/').replace('path=', ''); // Default is \"path=/\"\n const domain = options.url != null && options.url.length > 0\n ? `domain=${options.url}`\n : '';\n document.cookie = `${encodedKey}=${encodedValue || ''}${expires}; path=${path}; ${domain};`;\n }\n catch (error) {\n return Promise.reject(error);\n }\n }\n async deleteCookie(options) {\n try {\n document.cookie = `${options.key}=; Max-Age=0`;\n }\n catch (error) {\n return Promise.reject(error);\n }\n }\n async clearCookies() {\n try {\n const cookies = document.cookie.split(';') || [];\n for (const cookie of cookies) {\n document.cookie = cookie\n .replace(/^ +/, '')\n .replace(/=.*/, `=;expires=${new Date().toUTCString()};path=/`);\n }\n }\n catch (error) {\n return Promise.reject(error);\n }\n }\n async clearAllCookies() {\n try {\n await this.clearCookies();\n }\n catch (error) {\n return Promise.reject(error);\n }\n }\n}\nexport const CapacitorCookies = registerPlugin('CapacitorCookies', {\n web: () => new CapacitorCookiesPluginWeb(),\n});\n// UTILITY FUNCTIONS\n/**\n * Read in a Blob value and return it as a base64 string\n * @param blob The blob value to convert to a base64 string\n */\nexport const readBlobAsBase64 = async (blob) => new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n const base64String = reader.result;\n // remove prefix \"data:application/pdf;base64,\"\n resolve(base64String.indexOf(',') >= 0\n ? base64String.split(',')[1]\n : base64String);\n };\n reader.onerror = (error) => reject(error);\n reader.readAsDataURL(blob);\n});\n/**\n * Normalize an HttpHeaders map by lowercasing all of the values\n * @param headers The HttpHeaders object to normalize\n */\nconst normalizeHttpHeaders = (headers = {}) => {\n const originalKeys = Object.keys(headers);\n const loweredKeys = Object.keys(headers).map(k => k.toLocaleLowerCase());\n const normalized = loweredKeys.reduce((acc, key, index) => {\n acc[key] = headers[originalKeys[index]];\n return acc;\n }, {});\n return normalized;\n};\n/**\n * Builds a string of url parameters that\n * @param params A map of url parameters\n * @param shouldEncode true if you should encodeURIComponent() the values (true by default)\n */\nconst buildUrlParams = (params, shouldEncode = true) => {\n if (!params)\n return null;\n const output = Object.entries(params).reduce((accumulator, entry) => {\n const [key, value] = entry;\n let encodedValue;\n let item;\n if (Array.isArray(value)) {\n item = '';\n value.forEach(str => {\n encodedValue = shouldEncode ? encodeURIComponent(str) : str;\n item += `${key}=${encodedValue}&`;\n });\n // last character will always be \"&\" so slice it off\n item.slice(0, -1);\n }\n else {\n encodedValue = shouldEncode ? encodeURIComponent(value) : value;\n item = `${key}=${encodedValue}`;\n }\n return `${accumulator}&${item}`;\n }, '');\n // Remove initial \"&\" from the reduce\n return output.substr(1);\n};\n/**\n * Build the RequestInit object based on the options passed into the initial request\n * @param options The Http plugin options\n * @param extra Any extra RequestInit values\n */\nexport const buildRequestInit = (options, extra = {}) => {\n const output = Object.assign({ method: options.method || 'GET', headers: options.headers }, extra);\n // Get the content-type\n const headers = normalizeHttpHeaders(options.headers);\n const type = headers['content-type'] || '';\n // If body is already a string, then pass it through as-is.\n if (typeof options.data === 'string') {\n output.body = options.data;\n }\n // Build request initializers based off of content-type\n else if (type.includes('application/x-www-form-urlencoded')) {\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(options.data || {})) {\n params.set(key, value);\n }\n output.body = params.toString();\n }\n else if (type.includes('multipart/form-data') ||\n options.data instanceof FormData) {\n const form = new FormData();\n if (options.data instanceof FormData) {\n options.data.forEach((value, key) => {\n form.append(key, value);\n });\n }\n else {\n for (const key of Object.keys(options.data)) {\n form.append(key, options.data[key]);\n }\n }\n output.body = form;\n const headers = new Headers(output.headers);\n headers.delete('content-type'); // content-type will be set by `window.fetch` to includy boundary\n output.headers = headers;\n }\n else if (type.includes('application/json') ||\n typeof options.data === 'object') {\n output.body = JSON.stringify(options.data);\n }\n return output;\n};\n// WEB IMPLEMENTATION\nexport class CapacitorHttpPluginWeb extends WebPlugin {\n /**\n * Perform an Http request given a set of options\n * @param options Options to build the HTTP request\n */\n async request(options) {\n const requestInit = buildRequestInit(options, options.webFetchExtra);\n const urlParams = buildUrlParams(options.params, options.shouldEncodeUrlParams);\n const url = urlParams ? `${options.url}?${urlParams}` : options.url;\n const response = await fetch(url, requestInit);\n const contentType = response.headers.get('content-type') || '';\n // Default to 'text' responseType so no parsing happens\n let { responseType = 'text' } = response.ok ? options : {};\n // If the response content-type is json, force the response to be json\n if (contentType.includes('application/json')) {\n responseType = 'json';\n }\n let data;\n let blob;\n switch (responseType) {\n case 'arraybuffer':\n case 'blob':\n blob = await response.blob();\n data = await readBlobAsBase64(blob);\n break;\n case 'json':\n data = await response.json();\n break;\n case 'document':\n case 'text':\n default:\n data = await response.text();\n }\n // Convert fetch headers to Capacitor HttpHeaders\n const headers = {};\n response.headers.forEach((value, key) => {\n headers[key] = value;\n });\n return {\n data,\n headers,\n status: response.status,\n url: response.url,\n };\n }\n /**\n * Perform an Http GET request given a set of options\n * @param options Options to build the HTTP request\n */\n async get(options) {\n return this.request(Object.assign(Object.assign({}, options), { method: 'GET' }));\n }\n /**\n * Perform an Http POST request given a set of options\n * @param options Options to build the HTTP request\n */\n async post(options) {\n return this.request(Object.assign(Object.assign({}, options), { method: 'POST' }));\n }\n /**\n * Perform an Http PUT request given a set of options\n * @param options Options to build the HTTP request\n */\n async put(options) {\n return this.request(Object.assign(Object.assign({}, options), { method: 'PUT' }));\n }\n /**\n * Perform an Http PATCH request given a set of options\n * @param options Options to build the HTTP request\n */\n async patch(options) {\n return this.request(Object.assign(Object.assign({}, options), { method: 'PATCH' }));\n }\n /**\n * Perform an Http DELETE request given a set of options\n * @param options Options to build the HTTP request\n */\n async delete(options) {\n return this.request(Object.assign(Object.assign({}, options), { method: 'DELETE' }));\n }\n}\nexport const CapacitorHttp = registerPlugin('CapacitorHttp', {\n web: () => new CapacitorHttpPluginWeb(),\n});\n/******** END HTTP PLUGIN ********/\n//# sourceMappingURL=core-plugins.js.map","export const legacyRegisterWebPlugin = (cap, webPlugin) => {\n var _a;\n const config = webPlugin.config;\n const Plugins = cap.Plugins;\n if (!(config === null || config === void 0 ? void 0 : config.name)) {\n // TODO: add link to upgrade guide\n throw new Error(`Capacitor WebPlugin is using the deprecated \"registerWebPlugin()\" function, but without the config. Please use \"registerPlugin()\" instead to register this web plugin.\"`);\n }\n // TODO: add link to upgrade guide\n console.warn(`Capacitor plugin \"${config.name}\" is using the deprecated \"registerWebPlugin()\" function`);\n if (!Plugins[config.name] || ((_a = config === null || config === void 0 ? void 0 : config.platforms) === null || _a === void 0 ? void 0 : _a.includes(cap.getPlatform()))) {\n // Add the web plugin into the plugins registry if there already isn't\n // an existing one. If it doesn't already exist, that means\n // there's no existing native implementation for it.\n // - OR -\n // If we already have a plugin registered (meaning it was defined in the native layer),\n // then we should only overwrite it if the corresponding web plugin activates on\n // a certain platform. For example: Geolocation uses the WebPlugin on Android but not iOS\n Plugins[config.name] = webPlugin;\n }\n};\n//# sourceMappingURL=legacy-web-plugin-merge.js.map"],"names":["CapacitorPlatforms","win","defaultPlatformMap","Map","set","name","capPlatforms","currentPlatform","platforms","addPlatform","platform","setPlatform","has","get","createCapacitorPlatforms","initPlatforms","globalThis","self","window","global","ExceptionCode","exports","CapacitorException","Error","constructor","message","code","data","super","this","createCapacitor","_a","_b","_c","_d","_e","capCustomPlatform","CapacitorCustomPlatform","cap","Capacitor","Plugins","getPlatform","androidBridge","webkit","messageHandlers","bridge","getPlatformId","isNativePlatform","isPluginAvailable","pluginName","plugin","registeredPlugins","getPluginHeader","PluginHeaders","find","h","registerPlugin","jsImplementations","registeredPlugin","console","warn","proxy","pluginHeader","jsImplementation","createPluginMethodWrapper","prop","remove","wrapper","args","p","async","loadPluginImplementation","then","impl","fn","bind","Unimplemented","methodHeader","methods","m","rtype","options","nativePromise","toString","callback","nativeCallback","createPluginMethod","Object","defineProperty","value","writable","configurable","addListener","removeListener","addListenerNative","eventName","call","callbackId","Promise","resolve","Proxy","_","Set","keys","convertFileSrc","filePath","handleError","err","error","pluginMethodNoop","_target","reject","Exception","DEBUG","isLoggingEnabled","isNative","initCapacitorGlobal","WebPlugin","config","listeners","windowListeners","listenerFunc","push","windowListener","registered","addWindowListener","removeAllListeners","listener","removeWindowListener","notifyListeners","forEach","hasListeners","length","registerWindowListener","windowEventName","pluginEventName","handler","event","unimplemented","msg","unavailable","Unavailable","index","indexOf","splice","handle","addEventListener","removeEventListener","WebView","encode","str","encodeURIComponent","replace","decodeURIComponent","escape","decode","CapacitorCookiesPluginWeb","getCookies","cookies","document","cookie","cookieMap","split","key","trim","setCookie","encodedKey","encodedValue","expires","path","domain","url","deleteCookie","clearCookies","Date","toUTCString","clearAllCookies","CapacitorCookies","web","buildRequestInit","extra","output","assign","method","headers","type","originalKeys","map","k","toLocaleLowerCase","reduce","acc","normalizeHttpHeaders","body","includes","params","URLSearchParams","entries","FormData","form","append","Headers","delete","JSON","stringify","CapacitorHttpPluginWeb","request","requestInit","webFetchExtra","urlParams","shouldEncode","accumulator","entry","item","Array","isArray","slice","substr","buildUrlParams","shouldEncodeUrlParams","response","fetch","contentType","blob","responseType","ok","reader","FileReader","onload","base64String","result","onerror","readAsDataURL","readBlobAsBase64","json","text","status","post","put","patch","CapacitorHttp","webPlugin","legacyRegisterWebPlugin"],"mappings":";8CAAA,MAuBaA,EAJS,CAACC,GAASA,EAAID,mB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EAAErG,GAAU,CAAEsG,OAAQ,SAC3E,CAKD,SAAMuD,CAAI7J,GACN,OAAOpD,KAAKiL,QAAQvH,OAAO+F,OAAO/F,OAAO+F,OAAO,CAAE,EAAErG,GAAU,CAAEsG,OAAQ,QAC3E,CAKD,WAAMwD,CAAM9J,GACR,OAAOpD,KAAKiL,QAAQvH,OAAO+F,OAAO/F,OAAO+F,OAAO,CAAE,EAAErG,GAAU,CAAEsG,OAAQ,UAC3E,CAKD,YAAM,CAAOtG,GACT,OAAOpD,KAAKiL,QAAQvH,OAAO+F,OAAO/F,OAAO+F,OAAO,CAAE,EAAErG,GAAU,CAAEsG,OAAQ,WAC3E,EAEO,MAACyD,EAAgBxL,EAAe,gBAAiB,CACzD0H,IAAK,IAAM,IAAI2B,gOFlPe3J,GG7BK,EAACZ,EAAK2M,KACzC,IAAIlN,EACJ,MAAMuF,EAAS2H,EAAU3H,OACnB9E,EAAUF,EAAIE,QACpB,KAAM8E,aAAuC,EAASA,EAAOjH,MAEzD,MAAM,IAAIkB,MAAM,2KAGpBoC,QAAQC,KAAK,qBAAqB0D,EAAOjH,gEACpCmC,EAAQ8E,EAAOjH,SAAsF,QAA3E0B,EAAKuF,aAAuC,EAASA,EAAO9G,iBAA8B,IAAPuB,OAAgB,EAASA,EAAGmK,SAAS5J,EAAIG,kBAQvJD,EAAQ8E,EAAOjH,MAAQ4O,EAC1B,EHUwCC,CAAwB3M,EAAWW"} \ No newline at end of file diff --git a/node_modules/@capacitor/core/dist/index.cjs.js b/node_modules/@capacitor/core/dist/index.cjs.js new file mode 100644 index 0000000..03cec5c --- /dev/null +++ b/node_modules/@capacitor/core/dist/index.cjs.js @@ -0,0 +1,698 @@ +/*! Capacitor: https://capacitorjs.com/ - MIT License */ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const createCapacitorPlatforms = (win) => { + const defaultPlatformMap = new Map(); + defaultPlatformMap.set('web', { name: 'web' }); + const capPlatforms = win.CapacitorPlatforms || { + currentPlatform: { name: 'web' }, + platforms: defaultPlatformMap, + }; + const addPlatform = (name, platform) => { + capPlatforms.platforms.set(name, platform); + }; + const setPlatform = (name) => { + if (capPlatforms.platforms.has(name)) { + capPlatforms.currentPlatform = capPlatforms.platforms.get(name); + } + }; + capPlatforms.addPlatform = addPlatform; + capPlatforms.setPlatform = setPlatform; + return capPlatforms; +}; +const initPlatforms = (win) => (win.CapacitorPlatforms = createCapacitorPlatforms(win)); +/** + * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead + */ +const CapacitorPlatforms = /*#__PURE__*/ initPlatforms((typeof globalThis !== 'undefined' + ? globalThis + : typeof self !== 'undefined' + ? self + : typeof window !== 'undefined' + ? window + : typeof global !== 'undefined' + ? global + : {})); +/** + * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead + */ +const addPlatform = CapacitorPlatforms.addPlatform; +/** + * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead + */ +const setPlatform = CapacitorPlatforms.setPlatform; + +const legacyRegisterWebPlugin = (cap, webPlugin) => { + var _a; + const config = webPlugin.config; + const Plugins = cap.Plugins; + if (!(config === null || config === void 0 ? void 0 : config.name)) { + // TODO: add link to upgrade guide + throw new Error(`Capacitor WebPlugin is using the deprecated "registerWebPlugin()" function, but without the config. Please use "registerPlugin()" instead to register this web plugin."`); + } + // TODO: add link to upgrade guide + console.warn(`Capacitor plugin "${config.name}" is using the deprecated "registerWebPlugin()" function`); + if (!Plugins[config.name] || ((_a = config === null || config === void 0 ? void 0 : config.platforms) === null || _a === void 0 ? void 0 : _a.includes(cap.getPlatform()))) { + // Add the web plugin into the plugins registry if there already isn't + // an existing one. If it doesn't already exist, that means + // there's no existing native implementation for it. + // - OR - + // If we already have a plugin registered (meaning it was defined in the native layer), + // then we should only overwrite it if the corresponding web plugin activates on + // a certain platform. For example: Geolocation uses the WebPlugin on Android but not iOS + Plugins[config.name] = webPlugin; + } +}; + +exports.ExceptionCode = void 0; +(function (ExceptionCode) { + /** + * API is not implemented. + * + * This usually means the API can't be used because it is not implemented for + * the current platform. + */ + ExceptionCode["Unimplemented"] = "UNIMPLEMENTED"; + /** + * API is not available. + * + * This means the API can't be used right now because: + * - it is currently missing a prerequisite, such as network connectivity + * - it requires a particular platform or browser version + */ + ExceptionCode["Unavailable"] = "UNAVAILABLE"; +})(exports.ExceptionCode || (exports.ExceptionCode = {})); +class CapacitorException extends Error { + constructor(message, code, data) { + super(message); + this.message = message; + this.code = code; + this.data = data; + } +} +const getPlatformId = (win) => { + var _a, _b; + if (win === null || win === void 0 ? void 0 : win.androidBridge) { + return 'android'; + } + else if ((_b = (_a = win === null || win === void 0 ? void 0 : win.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.bridge) { + return 'ios'; + } + else { + return 'web'; + } +}; + +const createCapacitor = (win) => { + var _a, _b, _c, _d, _e; + const capCustomPlatform = win.CapacitorCustomPlatform || null; + const cap = win.Capacitor || {}; + const Plugins = (cap.Plugins = cap.Plugins || {}); + /** + * @deprecated Use `capCustomPlatform` instead, default functions like registerPlugin will function with the new object. + */ + const capPlatforms = win.CapacitorPlatforms; + const defaultGetPlatform = () => { + return capCustomPlatform !== null + ? capCustomPlatform.name + : getPlatformId(win); + }; + const getPlatform = ((_a = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _a === void 0 ? void 0 : _a.getPlatform) || defaultGetPlatform; + const defaultIsNativePlatform = () => getPlatform() !== 'web'; + const isNativePlatform = ((_b = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _b === void 0 ? void 0 : _b.isNativePlatform) || defaultIsNativePlatform; + const defaultIsPluginAvailable = (pluginName) => { + const plugin = registeredPlugins.get(pluginName); + if (plugin === null || plugin === void 0 ? void 0 : plugin.platforms.has(getPlatform())) { + // JS implementation available for the current platform. + return true; + } + if (getPluginHeader(pluginName)) { + // Native implementation available. + return true; + } + return false; + }; + const isPluginAvailable = ((_c = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _c === void 0 ? void 0 : _c.isPluginAvailable) || + defaultIsPluginAvailable; + const defaultGetPluginHeader = (pluginName) => { var _a; return (_a = cap.PluginHeaders) === null || _a === void 0 ? void 0 : _a.find(h => h.name === pluginName); }; + const getPluginHeader = ((_d = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _d === void 0 ? void 0 : _d.getPluginHeader) || defaultGetPluginHeader; + const handleError = (err) => win.console.error(err); + const pluginMethodNoop = (_target, prop, pluginName) => { + return Promise.reject(`${pluginName} does not have an implementation of "${prop}".`); + }; + const registeredPlugins = new Map(); + const defaultRegisterPlugin = (pluginName, jsImplementations = {}) => { + const registeredPlugin = registeredPlugins.get(pluginName); + if (registeredPlugin) { + console.warn(`Capacitor plugin "${pluginName}" already registered. Cannot register plugins twice.`); + return registeredPlugin.proxy; + } + const platform = getPlatform(); + const pluginHeader = getPluginHeader(pluginName); + let jsImplementation; + const loadPluginImplementation = async () => { + if (!jsImplementation && platform in jsImplementations) { + jsImplementation = + typeof jsImplementations[platform] === 'function' + ? (jsImplementation = await jsImplementations[platform]()) + : (jsImplementation = jsImplementations[platform]); + } + else if (capCustomPlatform !== null && + !jsImplementation && + 'web' in jsImplementations) { + jsImplementation = + typeof jsImplementations['web'] === 'function' + ? (jsImplementation = await jsImplementations['web']()) + : (jsImplementation = jsImplementations['web']); + } + return jsImplementation; + }; + const createPluginMethod = (impl, prop) => { + var _a, _b; + if (pluginHeader) { + const methodHeader = pluginHeader === null || pluginHeader === void 0 ? void 0 : pluginHeader.methods.find(m => prop === m.name); + if (methodHeader) { + if (methodHeader.rtype === 'promise') { + return (options) => cap.nativePromise(pluginName, prop.toString(), options); + } + else { + return (options, callback) => cap.nativeCallback(pluginName, prop.toString(), options, callback); + } + } + else if (impl) { + return (_a = impl[prop]) === null || _a === void 0 ? void 0 : _a.bind(impl); + } + } + else if (impl) { + return (_b = impl[prop]) === null || _b === void 0 ? void 0 : _b.bind(impl); + } + else { + throw new CapacitorException(`"${pluginName}" plugin is not implemented on ${platform}`, exports.ExceptionCode.Unimplemented); + } + }; + const createPluginMethodWrapper = (prop) => { + let remove; + const wrapper = (...args) => { + const p = loadPluginImplementation().then(impl => { + const fn = createPluginMethod(impl, prop); + if (fn) { + const p = fn(...args); + remove = p === null || p === void 0 ? void 0 : p.remove; + return p; + } + else { + throw new CapacitorException(`"${pluginName}.${prop}()" is not implemented on ${platform}`, exports.ExceptionCode.Unimplemented); + } + }); + if (prop === 'addListener') { + p.remove = async () => remove(); + } + return p; + }; + // Some flair ✨ + wrapper.toString = () => `${prop.toString()}() { [capacitor code] }`; + Object.defineProperty(wrapper, 'name', { + value: prop, + writable: false, + configurable: false, + }); + return wrapper; + }; + const addListener = createPluginMethodWrapper('addListener'); + const removeListener = createPluginMethodWrapper('removeListener'); + const addListenerNative = (eventName, callback) => { + const call = addListener({ eventName }, callback); + const remove = async () => { + const callbackId = await call; + removeListener({ + eventName, + callbackId, + }, callback); + }; + const p = new Promise(resolve => call.then(() => resolve({ remove }))); + p.remove = async () => { + console.warn(`Using addListener() without 'await' is deprecated.`); + await remove(); + }; + return p; + }; + const proxy = new Proxy({}, { + get(_, prop) { + switch (prop) { + // https://github.com/facebook/react/issues/20030 + case '$$typeof': + return undefined; + case 'toJSON': + return () => ({}); + case 'addListener': + return pluginHeader ? addListenerNative : addListener; + case 'removeListener': + return removeListener; + default: + return createPluginMethodWrapper(prop); + } + }, + }); + Plugins[pluginName] = proxy; + registeredPlugins.set(pluginName, { + name: pluginName, + proxy, + platforms: new Set([ + ...Object.keys(jsImplementations), + ...(pluginHeader ? [platform] : []), + ]), + }); + return proxy; + }; + const registerPlugin = ((_e = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _e === void 0 ? void 0 : _e.registerPlugin) || defaultRegisterPlugin; + // Add in convertFileSrc for web, it will already be available in native context + if (!cap.convertFileSrc) { + cap.convertFileSrc = filePath => filePath; + } + cap.getPlatform = getPlatform; + cap.handleError = handleError; + cap.isNativePlatform = isNativePlatform; + cap.isPluginAvailable = isPluginAvailable; + cap.pluginMethodNoop = pluginMethodNoop; + cap.registerPlugin = registerPlugin; + cap.Exception = CapacitorException; + cap.DEBUG = !!cap.DEBUG; + cap.isLoggingEnabled = !!cap.isLoggingEnabled; + // Deprecated props + cap.platform = cap.getPlatform(); + cap.isNative = cap.isNativePlatform(); + return cap; +}; +const initCapacitorGlobal = (win) => (win.Capacitor = createCapacitor(win)); + +const Capacitor = /*#__PURE__*/ initCapacitorGlobal(typeof globalThis !== 'undefined' + ? globalThis + : typeof self !== 'undefined' + ? self + : typeof window !== 'undefined' + ? window + : typeof global !== 'undefined' + ? global + : {}); +const registerPlugin = Capacitor.registerPlugin; +/** + * @deprecated Provided for backwards compatibility for Capacitor v2 plugins. + * Capacitor v3 plugins should import the plugin directly. This "Plugins" + * export is deprecated in v3, and will be removed in v4. + */ +const Plugins = Capacitor.Plugins; +/** + * Provided for backwards compatibility. Use the registerPlugin() API + * instead, and provide the web plugin as the "web" implmenetation. + * For example + * + * export const Example = registerPlugin('Example', { + * web: () => import('./web').then(m => new m.Example()) + * }) + * + * @deprecated Deprecated in v3, will be removed from v4. + */ +const registerWebPlugin = (plugin) => legacyRegisterWebPlugin(Capacitor, plugin); + +/** + * Base class web plugins should extend. + */ +class WebPlugin { + constructor(config) { + this.listeners = {}; + this.windowListeners = {}; + if (config) { + // TODO: add link to upgrade guide + console.warn(`Capacitor WebPlugin "${config.name}" config object was deprecated in v3 and will be removed in v4.`); + this.config = config; + } + } + addListener(eventName, listenerFunc) { + const listeners = this.listeners[eventName]; + if (!listeners) { + this.listeners[eventName] = []; + } + this.listeners[eventName].push(listenerFunc); + // If we haven't added a window listener for this event and it requires one, + // go ahead and add it + const windowListener = this.windowListeners[eventName]; + if (windowListener && !windowListener.registered) { + this.addWindowListener(windowListener); + } + const remove = async () => this.removeListener(eventName, listenerFunc); + const p = Promise.resolve({ remove }); + Object.defineProperty(p, 'remove', { + value: async () => { + console.warn(`Using addListener() without 'await' is deprecated.`); + await remove(); + }, + }); + return p; + } + async removeAllListeners() { + this.listeners = {}; + for (const listener in this.windowListeners) { + this.removeWindowListener(this.windowListeners[listener]); + } + this.windowListeners = {}; + } + notifyListeners(eventName, data) { + const listeners = this.listeners[eventName]; + if (listeners) { + listeners.forEach(listener => listener(data)); + } + } + hasListeners(eventName) { + return !!this.listeners[eventName].length; + } + registerWindowListener(windowEventName, pluginEventName) { + this.windowListeners[pluginEventName] = { + registered: false, + windowEventName, + pluginEventName, + handler: event => { + this.notifyListeners(pluginEventName, event); + }, + }; + } + unimplemented(msg = 'not implemented') { + return new Capacitor.Exception(msg, exports.ExceptionCode.Unimplemented); + } + unavailable(msg = 'not available') { + return new Capacitor.Exception(msg, exports.ExceptionCode.Unavailable); + } + async removeListener(eventName, listenerFunc) { + const listeners = this.listeners[eventName]; + if (!listeners) { + return; + } + const index = listeners.indexOf(listenerFunc); + this.listeners[eventName].splice(index, 1); + // If there are no more listeners for this type of event, + // remove the window listener + if (!this.listeners[eventName].length) { + this.removeWindowListener(this.windowListeners[eventName]); + } + } + addWindowListener(handle) { + window.addEventListener(handle.windowEventName, handle.handler); + handle.registered = true; + } + removeWindowListener(handle) { + if (!handle) { + return; + } + window.removeEventListener(handle.windowEventName, handle.handler); + handle.registered = false; + } +} + +const WebView = /*#__PURE__*/ registerPlugin('WebView'); +/******** END WEB VIEW PLUGIN ********/ +/******** COOKIES PLUGIN ********/ +/** + * Safely web encode a string value (inspired by js-cookie) + * @param str The string value to encode + */ +const encode = (str) => encodeURIComponent(str) + .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent) + .replace(/[()]/g, escape); +/** + * Safely web decode a string value (inspired by js-cookie) + * @param str The string value to decode + */ +const decode = (str) => str.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent); +class CapacitorCookiesPluginWeb extends WebPlugin { + async getCookies() { + const cookies = document.cookie; + const cookieMap = {}; + cookies.split(';').forEach(cookie => { + if (cookie.length <= 0) + return; + // Replace first "=" with CAP_COOKIE to prevent splitting on additional "=" + let [key, value] = cookie.replace(/=/, 'CAP_COOKIE').split('CAP_COOKIE'); + key = decode(key).trim(); + value = decode(value).trim(); + cookieMap[key] = value; + }); + return cookieMap; + } + async setCookie(options) { + try { + // Safely Encoded Key/Value + const encodedKey = encode(options.key); + const encodedValue = encode(options.value); + // Clean & sanitize options + const expires = `; expires=${(options.expires || '').replace('expires=', '')}`; // Default is "; expires=" + const path = (options.path || '/').replace('path=', ''); // Default is "path=/" + const domain = options.url != null && options.url.length > 0 + ? `domain=${options.url}` + : ''; + document.cookie = `${encodedKey}=${encodedValue || ''}${expires}; path=${path}; ${domain};`; + } + catch (error) { + return Promise.reject(error); + } + } + async deleteCookie(options) { + try { + document.cookie = `${options.key}=; Max-Age=0`; + } + catch (error) { + return Promise.reject(error); + } + } + async clearCookies() { + try { + const cookies = document.cookie.split(';') || []; + for (const cookie of cookies) { + document.cookie = cookie + .replace(/^ +/, '') + .replace(/=.*/, `=;expires=${new Date().toUTCString()};path=/`); + } + } + catch (error) { + return Promise.reject(error); + } + } + async clearAllCookies() { + try { + await this.clearCookies(); + } + catch (error) { + return Promise.reject(error); + } + } +} +const CapacitorCookies = registerPlugin('CapacitorCookies', { + web: () => new CapacitorCookiesPluginWeb(), +}); +// UTILITY FUNCTIONS +/** + * Read in a Blob value and return it as a base64 string + * @param blob The blob value to convert to a base64 string + */ +const readBlobAsBase64 = async (blob) => new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onload = () => { + const base64String = reader.result; + // remove prefix "data:application/pdf;base64," + resolve(base64String.indexOf(',') >= 0 + ? base64String.split(',')[1] + : base64String); + }; + reader.onerror = (error) => reject(error); + reader.readAsDataURL(blob); +}); +/** + * Normalize an HttpHeaders map by lowercasing all of the values + * @param headers The HttpHeaders object to normalize + */ +const normalizeHttpHeaders = (headers = {}) => { + const originalKeys = Object.keys(headers); + const loweredKeys = Object.keys(headers).map(k => k.toLocaleLowerCase()); + const normalized = loweredKeys.reduce((acc, key, index) => { + acc[key] = headers[originalKeys[index]]; + return acc; + }, {}); + return normalized; +}; +/** + * Builds a string of url parameters that + * @param params A map of url parameters + * @param shouldEncode true if you should encodeURIComponent() the values (true by default) + */ +const buildUrlParams = (params, shouldEncode = true) => { + if (!params) + return null; + const output = Object.entries(params).reduce((accumulator, entry) => { + const [key, value] = entry; + let encodedValue; + let item; + if (Array.isArray(value)) { + item = ''; + value.forEach(str => { + encodedValue = shouldEncode ? encodeURIComponent(str) : str; + item += `${key}=${encodedValue}&`; + }); + // last character will always be "&" so slice it off + item.slice(0, -1); + } + else { + encodedValue = shouldEncode ? encodeURIComponent(value) : value; + item = `${key}=${encodedValue}`; + } + return `${accumulator}&${item}`; + }, ''); + // Remove initial "&" from the reduce + return output.substr(1); +}; +/** + * Build the RequestInit object based on the options passed into the initial request + * @param options The Http plugin options + * @param extra Any extra RequestInit values + */ +const buildRequestInit = (options, extra = {}) => { + const output = Object.assign({ method: options.method || 'GET', headers: options.headers }, extra); + // Get the content-type + const headers = normalizeHttpHeaders(options.headers); + const type = headers['content-type'] || ''; + // If body is already a string, then pass it through as-is. + if (typeof options.data === 'string') { + output.body = options.data; + } + // Build request initializers based off of content-type + else if (type.includes('application/x-www-form-urlencoded')) { + const params = new URLSearchParams(); + for (const [key, value] of Object.entries(options.data || {})) { + params.set(key, value); + } + output.body = params.toString(); + } + else if (type.includes('multipart/form-data') || + options.data instanceof FormData) { + const form = new FormData(); + if (options.data instanceof FormData) { + options.data.forEach((value, key) => { + form.append(key, value); + }); + } + else { + for (const key of Object.keys(options.data)) { + form.append(key, options.data[key]); + } + } + output.body = form; + const headers = new Headers(output.headers); + headers.delete('content-type'); // content-type will be set by `window.fetch` to includy boundary + output.headers = headers; + } + else if (type.includes('application/json') || + typeof options.data === 'object') { + output.body = JSON.stringify(options.data); + } + return output; +}; +// WEB IMPLEMENTATION +class CapacitorHttpPluginWeb extends WebPlugin { + /** + * Perform an Http request given a set of options + * @param options Options to build the HTTP request + */ + async request(options) { + const requestInit = buildRequestInit(options, options.webFetchExtra); + const urlParams = buildUrlParams(options.params, options.shouldEncodeUrlParams); + const url = urlParams ? `${options.url}?${urlParams}` : options.url; + const response = await fetch(url, requestInit); + const contentType = response.headers.get('content-type') || ''; + // Default to 'text' responseType so no parsing happens + let { responseType = 'text' } = response.ok ? options : {}; + // If the response content-type is json, force the response to be json + if (contentType.includes('application/json')) { + responseType = 'json'; + } + let data; + let blob; + switch (responseType) { + case 'arraybuffer': + case 'blob': + blob = await response.blob(); + data = await readBlobAsBase64(blob); + break; + case 'json': + data = await response.json(); + break; + case 'document': + case 'text': + default: + data = await response.text(); + } + // Convert fetch headers to Capacitor HttpHeaders + const headers = {}; + response.headers.forEach((value, key) => { + headers[key] = value; + }); + return { + data, + headers, + status: response.status, + url: response.url, + }; + } + /** + * Perform an Http GET request given a set of options + * @param options Options to build the HTTP request + */ + async get(options) { + return this.request(Object.assign(Object.assign({}, options), { method: 'GET' })); + } + /** + * Perform an Http POST request given a set of options + * @param options Options to build the HTTP request + */ + async post(options) { + return this.request(Object.assign(Object.assign({}, options), { method: 'POST' })); + } + /** + * Perform an Http PUT request given a set of options + * @param options Options to build the HTTP request + */ + async put(options) { + return this.request(Object.assign(Object.assign({}, options), { method: 'PUT' })); + } + /** + * Perform an Http PATCH request given a set of options + * @param options Options to build the HTTP request + */ + async patch(options) { + return this.request(Object.assign(Object.assign({}, options), { method: 'PATCH' })); + } + /** + * Perform an Http DELETE request given a set of options + * @param options Options to build the HTTP request + */ + async delete(options) { + return this.request(Object.assign(Object.assign({}, options), { method: 'DELETE' })); + } +} +const CapacitorHttp = registerPlugin('CapacitorHttp', { + web: () => new CapacitorHttpPluginWeb(), +}); +/******** END HTTP PLUGIN ********/ + +exports.Capacitor = Capacitor; +exports.CapacitorCookies = CapacitorCookies; +exports.CapacitorException = CapacitorException; +exports.CapacitorHttp = CapacitorHttp; +exports.CapacitorPlatforms = CapacitorPlatforms; +exports.Plugins = Plugins; +exports.WebPlugin = WebPlugin; +exports.WebView = WebView; +exports.addPlatform = addPlatform; +exports.buildRequestInit = buildRequestInit; +exports.registerPlugin = registerPlugin; +exports.registerWebPlugin = registerWebPlugin; +exports.setPlatform = setPlatform; +//# sourceMappingURL=index.cjs.js.map diff --git a/node_modules/@capacitor/core/dist/index.cjs.js.map b/node_modules/@capacitor/core/dist/index.cjs.js.map new file mode 100644 index 0000000..572310f --- /dev/null +++ b/node_modules/@capacitor/core/dist/index.cjs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.cjs.js","sources":["../build/platforms.js","../build/legacy/legacy-web-plugin-merge.js","../build/util.js","../build/runtime.js","../build/global.js","../build/web-plugin.js","../build/core-plugins.js"],"sourcesContent":["const createCapacitorPlatforms = (win) => {\n const defaultPlatformMap = new Map();\n defaultPlatformMap.set('web', { name: 'web' });\n const capPlatforms = win.CapacitorPlatforms || {\n currentPlatform: { name: 'web' },\n platforms: defaultPlatformMap,\n };\n const addPlatform = (name, platform) => {\n capPlatforms.platforms.set(name, platform);\n };\n const setPlatform = (name) => {\n if (capPlatforms.platforms.has(name)) {\n capPlatforms.currentPlatform = capPlatforms.platforms.get(name);\n }\n };\n capPlatforms.addPlatform = addPlatform;\n capPlatforms.setPlatform = setPlatform;\n return capPlatforms;\n};\nconst initPlatforms = (win) => (win.CapacitorPlatforms = createCapacitorPlatforms(win));\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const CapacitorPlatforms = /*#__PURE__*/ initPlatforms((typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {}));\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const addPlatform = CapacitorPlatforms.addPlatform;\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const setPlatform = CapacitorPlatforms.setPlatform;\n//# sourceMappingURL=platforms.js.map","export const legacyRegisterWebPlugin = (cap, webPlugin) => {\n var _a;\n const config = webPlugin.config;\n const Plugins = cap.Plugins;\n if (!(config === null || config === void 0 ? void 0 : config.name)) {\n // TODO: add link to upgrade guide\n throw new Error(`Capacitor WebPlugin is using the deprecated \"registerWebPlugin()\" function, but without the config. Please use \"registerPlugin()\" instead to register this web plugin.\"`);\n }\n // TODO: add link to upgrade guide\n console.warn(`Capacitor plugin \"${config.name}\" is using the deprecated \"registerWebPlugin()\" function`);\n if (!Plugins[config.name] || ((_a = config === null || config === void 0 ? void 0 : config.platforms) === null || _a === void 0 ? void 0 : _a.includes(cap.getPlatform()))) {\n // Add the web plugin into the plugins registry if there already isn't\n // an existing one. If it doesn't already exist, that means\n // there's no existing native implementation for it.\n // - OR -\n // If we already have a plugin registered (meaning it was defined in the native layer),\n // then we should only overwrite it if the corresponding web plugin activates on\n // a certain platform. For example: Geolocation uses the WebPlugin on Android but not iOS\n Plugins[config.name] = webPlugin;\n }\n};\n//# sourceMappingURL=legacy-web-plugin-merge.js.map","export var ExceptionCode;\n(function (ExceptionCode) {\n /**\n * API is not implemented.\n *\n * This usually means the API can't be used because it is not implemented for\n * the current platform.\n */\n ExceptionCode[\"Unimplemented\"] = \"UNIMPLEMENTED\";\n /**\n * API is not available.\n *\n * This means the API can't be used right now because:\n * - it is currently missing a prerequisite, such as network connectivity\n * - it requires a particular platform or browser version\n */\n ExceptionCode[\"Unavailable\"] = \"UNAVAILABLE\";\n})(ExceptionCode || (ExceptionCode = {}));\nexport class CapacitorException extends Error {\n constructor(message, code, data) {\n super(message);\n this.message = message;\n this.code = code;\n this.data = data;\n }\n}\nexport const getPlatformId = (win) => {\n var _a, _b;\n if (win === null || win === void 0 ? void 0 : win.androidBridge) {\n return 'android';\n }\n else if ((_b = (_a = win === null || win === void 0 ? void 0 : win.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.bridge) {\n return 'ios';\n }\n else {\n return 'web';\n }\n};\n//# sourceMappingURL=util.js.map","import { CapacitorException, getPlatformId, ExceptionCode } from './util';\nexport const createCapacitor = (win) => {\n var _a, _b, _c, _d, _e;\n const capCustomPlatform = win.CapacitorCustomPlatform || null;\n const cap = win.Capacitor || {};\n const Plugins = (cap.Plugins = cap.Plugins || {});\n /**\n * @deprecated Use `capCustomPlatform` instead, default functions like registerPlugin will function with the new object.\n */\n const capPlatforms = win.CapacitorPlatforms;\n const defaultGetPlatform = () => {\n return capCustomPlatform !== null\n ? capCustomPlatform.name\n : getPlatformId(win);\n };\n const getPlatform = ((_a = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _a === void 0 ? void 0 : _a.getPlatform) || defaultGetPlatform;\n const defaultIsNativePlatform = () => getPlatform() !== 'web';\n const isNativePlatform = ((_b = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _b === void 0 ? void 0 : _b.isNativePlatform) || defaultIsNativePlatform;\n const defaultIsPluginAvailable = (pluginName) => {\n const plugin = registeredPlugins.get(pluginName);\n if (plugin === null || plugin === void 0 ? void 0 : plugin.platforms.has(getPlatform())) {\n // JS implementation available for the current platform.\n return true;\n }\n if (getPluginHeader(pluginName)) {\n // Native implementation available.\n return true;\n }\n return false;\n };\n const isPluginAvailable = ((_c = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _c === void 0 ? void 0 : _c.isPluginAvailable) ||\n defaultIsPluginAvailable;\n const defaultGetPluginHeader = (pluginName) => { var _a; return (_a = cap.PluginHeaders) === null || _a === void 0 ? void 0 : _a.find(h => h.name === pluginName); };\n const getPluginHeader = ((_d = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _d === void 0 ? void 0 : _d.getPluginHeader) || defaultGetPluginHeader;\n const handleError = (err) => win.console.error(err);\n const pluginMethodNoop = (_target, prop, pluginName) => {\n return Promise.reject(`${pluginName} does not have an implementation of \"${prop}\".`);\n };\n const registeredPlugins = new Map();\n const defaultRegisterPlugin = (pluginName, jsImplementations = {}) => {\n const registeredPlugin = registeredPlugins.get(pluginName);\n if (registeredPlugin) {\n console.warn(`Capacitor plugin \"${pluginName}\" already registered. Cannot register plugins twice.`);\n return registeredPlugin.proxy;\n }\n const platform = getPlatform();\n const pluginHeader = getPluginHeader(pluginName);\n let jsImplementation;\n const loadPluginImplementation = async () => {\n if (!jsImplementation && platform in jsImplementations) {\n jsImplementation =\n typeof jsImplementations[platform] === 'function'\n ? (jsImplementation = await jsImplementations[platform]())\n : (jsImplementation = jsImplementations[platform]);\n }\n else if (capCustomPlatform !== null &&\n !jsImplementation &&\n 'web' in jsImplementations) {\n jsImplementation =\n typeof jsImplementations['web'] === 'function'\n ? (jsImplementation = await jsImplementations['web']())\n : (jsImplementation = jsImplementations['web']);\n }\n return jsImplementation;\n };\n const createPluginMethod = (impl, prop) => {\n var _a, _b;\n if (pluginHeader) {\n const methodHeader = pluginHeader === null || pluginHeader === void 0 ? void 0 : pluginHeader.methods.find(m => prop === m.name);\n if (methodHeader) {\n if (methodHeader.rtype === 'promise') {\n return (options) => cap.nativePromise(pluginName, prop.toString(), options);\n }\n else {\n return (options, callback) => cap.nativeCallback(pluginName, prop.toString(), options, callback);\n }\n }\n else if (impl) {\n return (_a = impl[prop]) === null || _a === void 0 ? void 0 : _a.bind(impl);\n }\n }\n else if (impl) {\n return (_b = impl[prop]) === null || _b === void 0 ? void 0 : _b.bind(impl);\n }\n else {\n throw new CapacitorException(`\"${pluginName}\" plugin is not implemented on ${platform}`, ExceptionCode.Unimplemented);\n }\n };\n const createPluginMethodWrapper = (prop) => {\n let remove;\n const wrapper = (...args) => {\n const p = loadPluginImplementation().then(impl => {\n const fn = createPluginMethod(impl, prop);\n if (fn) {\n const p = fn(...args);\n remove = p === null || p === void 0 ? void 0 : p.remove;\n return p;\n }\n else {\n throw new CapacitorException(`\"${pluginName}.${prop}()\" is not implemented on ${platform}`, ExceptionCode.Unimplemented);\n }\n });\n if (prop === 'addListener') {\n p.remove = async () => remove();\n }\n return p;\n };\n // Some flair ✨\n wrapper.toString = () => `${prop.toString()}() { [capacitor code] }`;\n Object.defineProperty(wrapper, 'name', {\n value: prop,\n writable: false,\n configurable: false,\n });\n return wrapper;\n };\n const addListener = createPluginMethodWrapper('addListener');\n const removeListener = createPluginMethodWrapper('removeListener');\n const addListenerNative = (eventName, callback) => {\n const call = addListener({ eventName }, callback);\n const remove = async () => {\n const callbackId = await call;\n removeListener({\n eventName,\n callbackId,\n }, callback);\n };\n const p = new Promise(resolve => call.then(() => resolve({ remove })));\n p.remove = async () => {\n console.warn(`Using addListener() without 'await' is deprecated.`);\n await remove();\n };\n return p;\n };\n const proxy = new Proxy({}, {\n get(_, prop) {\n switch (prop) {\n // https://github.com/facebook/react/issues/20030\n case '$$typeof':\n return undefined;\n case 'toJSON':\n return () => ({});\n case 'addListener':\n return pluginHeader ? addListenerNative : addListener;\n case 'removeListener':\n return removeListener;\n default:\n return createPluginMethodWrapper(prop);\n }\n },\n });\n Plugins[pluginName] = proxy;\n registeredPlugins.set(pluginName, {\n name: pluginName,\n proxy,\n platforms: new Set([\n ...Object.keys(jsImplementations),\n ...(pluginHeader ? [platform] : []),\n ]),\n });\n return proxy;\n };\n const registerPlugin = ((_e = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _e === void 0 ? void 0 : _e.registerPlugin) || defaultRegisterPlugin;\n // Add in convertFileSrc for web, it will already be available in native context\n if (!cap.convertFileSrc) {\n cap.convertFileSrc = filePath => filePath;\n }\n cap.getPlatform = getPlatform;\n cap.handleError = handleError;\n cap.isNativePlatform = isNativePlatform;\n cap.isPluginAvailable = isPluginAvailable;\n cap.pluginMethodNoop = pluginMethodNoop;\n cap.registerPlugin = registerPlugin;\n cap.Exception = CapacitorException;\n cap.DEBUG = !!cap.DEBUG;\n cap.isLoggingEnabled = !!cap.isLoggingEnabled;\n // Deprecated props\n cap.platform = cap.getPlatform();\n cap.isNative = cap.isNativePlatform();\n return cap;\n};\nexport const initCapacitorGlobal = (win) => (win.Capacitor = createCapacitor(win));\n//# sourceMappingURL=runtime.js.map","import { legacyRegisterWebPlugin } from './legacy/legacy-web-plugin-merge';\nimport { initCapacitorGlobal } from './runtime';\nexport const Capacitor = /*#__PURE__*/ initCapacitorGlobal(typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {});\nexport const registerPlugin = Capacitor.registerPlugin;\n/**\n * @deprecated Provided for backwards compatibility for Capacitor v2 plugins.\n * Capacitor v3 plugins should import the plugin directly. This \"Plugins\"\n * export is deprecated in v3, and will be removed in v4.\n */\nexport const Plugins = Capacitor.Plugins;\n/**\n * Provided for backwards compatibility. Use the registerPlugin() API\n * instead, and provide the web plugin as the \"web\" implmenetation.\n * For example\n *\n * export const Example = registerPlugin('Example', {\n * web: () => import('./web').then(m => new m.Example())\n * })\n *\n * @deprecated Deprecated in v3, will be removed from v4.\n */\nexport const registerWebPlugin = (plugin) => legacyRegisterWebPlugin(Capacitor, plugin);\n//# sourceMappingURL=global.js.map","import { Capacitor } from './global';\nimport { ExceptionCode } from './util';\n/**\n * Base class web plugins should extend.\n */\nexport class WebPlugin {\n constructor(config) {\n this.listeners = {};\n this.windowListeners = {};\n if (config) {\n // TODO: add link to upgrade guide\n console.warn(`Capacitor WebPlugin \"${config.name}\" config object was deprecated in v3 and will be removed in v4.`);\n this.config = config;\n }\n }\n addListener(eventName, listenerFunc) {\n const listeners = this.listeners[eventName];\n if (!listeners) {\n this.listeners[eventName] = [];\n }\n this.listeners[eventName].push(listenerFunc);\n // If we haven't added a window listener for this event and it requires one,\n // go ahead and add it\n const windowListener = this.windowListeners[eventName];\n if (windowListener && !windowListener.registered) {\n this.addWindowListener(windowListener);\n }\n const remove = async () => this.removeListener(eventName, listenerFunc);\n const p = Promise.resolve({ remove });\n Object.defineProperty(p, 'remove', {\n value: async () => {\n console.warn(`Using addListener() without 'await' is deprecated.`);\n await remove();\n },\n });\n return p;\n }\n async removeAllListeners() {\n this.listeners = {};\n for (const listener in this.windowListeners) {\n this.removeWindowListener(this.windowListeners[listener]);\n }\n this.windowListeners = {};\n }\n notifyListeners(eventName, data) {\n const listeners = this.listeners[eventName];\n if (listeners) {\n listeners.forEach(listener => listener(data));\n }\n }\n hasListeners(eventName) {\n return !!this.listeners[eventName].length;\n }\n registerWindowListener(windowEventName, pluginEventName) {\n this.windowListeners[pluginEventName] = {\n registered: false,\n windowEventName,\n pluginEventName,\n handler: event => {\n this.notifyListeners(pluginEventName, event);\n },\n };\n }\n unimplemented(msg = 'not implemented') {\n return new Capacitor.Exception(msg, ExceptionCode.Unimplemented);\n }\n unavailable(msg = 'not available') {\n return new Capacitor.Exception(msg, ExceptionCode.Unavailable);\n }\n async removeListener(eventName, listenerFunc) {\n const listeners = this.listeners[eventName];\n if (!listeners) {\n return;\n }\n const index = listeners.indexOf(listenerFunc);\n this.listeners[eventName].splice(index, 1);\n // If there are no more listeners for this type of event,\n // remove the window listener\n if (!this.listeners[eventName].length) {\n this.removeWindowListener(this.windowListeners[eventName]);\n }\n }\n addWindowListener(handle) {\n window.addEventListener(handle.windowEventName, handle.handler);\n handle.registered = true;\n }\n removeWindowListener(handle) {\n if (!handle) {\n return;\n }\n window.removeEventListener(handle.windowEventName, handle.handler);\n handle.registered = false;\n }\n}\n//# sourceMappingURL=web-plugin.js.map","import { registerPlugin } from './global';\nimport { WebPlugin } from './web-plugin';\nexport const WebView = /*#__PURE__*/ registerPlugin('WebView');\n/******** END WEB VIEW PLUGIN ********/\n/******** COOKIES PLUGIN ********/\n/**\n * Safely web encode a string value (inspired by js-cookie)\n * @param str The string value to encode\n */\nconst encode = (str) => encodeURIComponent(str)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n/**\n * Safely web decode a string value (inspired by js-cookie)\n * @param str The string value to decode\n */\nconst decode = (str) => str.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent);\nexport class CapacitorCookiesPluginWeb extends WebPlugin {\n async getCookies() {\n const cookies = document.cookie;\n const cookieMap = {};\n cookies.split(';').forEach(cookie => {\n if (cookie.length <= 0)\n return;\n // Replace first \"=\" with CAP_COOKIE to prevent splitting on additional \"=\"\n let [key, value] = cookie.replace(/=/, 'CAP_COOKIE').split('CAP_COOKIE');\n key = decode(key).trim();\n value = decode(value).trim();\n cookieMap[key] = value;\n });\n return cookieMap;\n }\n async setCookie(options) {\n try {\n // Safely Encoded Key/Value\n const encodedKey = encode(options.key);\n const encodedValue = encode(options.value);\n // Clean & sanitize options\n const expires = `; expires=${(options.expires || '').replace('expires=', '')}`; // Default is \"; expires=\"\n const path = (options.path || '/').replace('path=', ''); // Default is \"path=/\"\n const domain = options.url != null && options.url.length > 0\n ? `domain=${options.url}`\n : '';\n document.cookie = `${encodedKey}=${encodedValue || ''}${expires}; path=${path}; ${domain};`;\n }\n catch (error) {\n return Promise.reject(error);\n }\n }\n async deleteCookie(options) {\n try {\n document.cookie = `${options.key}=; Max-Age=0`;\n }\n catch (error) {\n return Promise.reject(error);\n }\n }\n async clearCookies() {\n try {\n const cookies = document.cookie.split(';') || [];\n for (const cookie of cookies) {\n document.cookie = cookie\n .replace(/^ +/, '')\n .replace(/=.*/, `=;expires=${new Date().toUTCString()};path=/`);\n }\n }\n catch (error) {\n return Promise.reject(error);\n }\n }\n async clearAllCookies() {\n try {\n await this.clearCookies();\n }\n catch (error) {\n return Promise.reject(error);\n }\n }\n}\nexport const CapacitorCookies = registerPlugin('CapacitorCookies', {\n web: () => new CapacitorCookiesPluginWeb(),\n});\n// UTILITY FUNCTIONS\n/**\n * Read in a Blob value and return it as a base64 string\n * @param blob The blob value to convert to a base64 string\n */\nexport const readBlobAsBase64 = async (blob) => new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n const base64String = reader.result;\n // remove prefix \"data:application/pdf;base64,\"\n resolve(base64String.indexOf(',') >= 0\n ? base64String.split(',')[1]\n : base64String);\n };\n reader.onerror = (error) => reject(error);\n reader.readAsDataURL(blob);\n});\n/**\n * Normalize an HttpHeaders map by lowercasing all of the values\n * @param headers The HttpHeaders object to normalize\n */\nconst normalizeHttpHeaders = (headers = {}) => {\n const originalKeys = Object.keys(headers);\n const loweredKeys = Object.keys(headers).map(k => k.toLocaleLowerCase());\n const normalized = loweredKeys.reduce((acc, key, index) => {\n acc[key] = headers[originalKeys[index]];\n return acc;\n }, {});\n return normalized;\n};\n/**\n * Builds a string of url parameters that\n * @param params A map of url parameters\n * @param shouldEncode true if you should encodeURIComponent() the values (true by default)\n */\nconst buildUrlParams = (params, shouldEncode = true) => {\n if (!params)\n return null;\n const output = Object.entries(params).reduce((accumulator, entry) => {\n const [key, value] = entry;\n let encodedValue;\n let item;\n if (Array.isArray(value)) {\n item = '';\n value.forEach(str => {\n encodedValue = shouldEncode ? encodeURIComponent(str) : str;\n item += `${key}=${encodedValue}&`;\n });\n // last character will always be \"&\" so slice it off\n item.slice(0, -1);\n }\n else {\n encodedValue = shouldEncode ? encodeURIComponent(value) : value;\n item = `${key}=${encodedValue}`;\n }\n return `${accumulator}&${item}`;\n }, '');\n // Remove initial \"&\" from the reduce\n return output.substr(1);\n};\n/**\n * Build the RequestInit object based on the options passed into the initial request\n * @param options The Http plugin options\n * @param extra Any extra RequestInit values\n */\nexport const buildRequestInit = (options, extra = {}) => {\n const output = Object.assign({ method: options.method || 'GET', headers: options.headers }, extra);\n // Get the content-type\n const headers = normalizeHttpHeaders(options.headers);\n const type = headers['content-type'] || '';\n // If body is already a string, then pass it through as-is.\n if (typeof options.data === 'string') {\n output.body = options.data;\n }\n // Build request initializers based off of content-type\n else if (type.includes('application/x-www-form-urlencoded')) {\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(options.data || {})) {\n params.set(key, value);\n }\n output.body = params.toString();\n }\n else if (type.includes('multipart/form-data') ||\n options.data instanceof FormData) {\n const form = new FormData();\n if (options.data instanceof FormData) {\n options.data.forEach((value, key) => {\n form.append(key, value);\n });\n }\n else {\n for (const key of Object.keys(options.data)) {\n form.append(key, options.data[key]);\n }\n }\n output.body = form;\n const headers = new Headers(output.headers);\n headers.delete('content-type'); // content-type will be set by `window.fetch` to includy boundary\n output.headers = headers;\n }\n else if (type.includes('application/json') ||\n typeof options.data === 'object') {\n output.body = JSON.stringify(options.data);\n }\n return output;\n};\n// WEB IMPLEMENTATION\nexport class CapacitorHttpPluginWeb extends WebPlugin {\n /**\n * Perform an Http request given a set of options\n * @param options Options to build the HTTP request\n */\n async request(options) {\n const requestInit = buildRequestInit(options, options.webFetchExtra);\n const urlParams = buildUrlParams(options.params, options.shouldEncodeUrlParams);\n const url = urlParams ? `${options.url}?${urlParams}` : options.url;\n const response = await fetch(url, requestInit);\n const contentType = response.headers.get('content-type') || '';\n // Default to 'text' responseType so no parsing happens\n let { responseType = 'text' } = response.ok ? options : {};\n // If the response content-type is json, force the response to be json\n if (contentType.includes('application/json')) {\n responseType = 'json';\n }\n let data;\n let blob;\n switch (responseType) {\n case 'arraybuffer':\n case 'blob':\n blob = await response.blob();\n data = await readBlobAsBase64(blob);\n break;\n case 'json':\n data = await response.json();\n break;\n case 'document':\n case 'text':\n default:\n data = await response.text();\n }\n // Convert fetch headers to Capacitor HttpHeaders\n const headers = {};\n response.headers.forEach((value, key) => {\n headers[key] = value;\n });\n return {\n data,\n headers,\n status: response.status,\n url: response.url,\n };\n }\n /**\n * Perform an Http GET request given a set of options\n * @param options Options to build the HTTP request\n */\n async get(options) {\n return this.request(Object.assign(Object.assign({}, options), { method: 'GET' }));\n }\n /**\n * Perform an Http POST request given a set of options\n * @param options Options to build the HTTP request\n */\n async post(options) {\n return this.request(Object.assign(Object.assign({}, options), { method: 'POST' }));\n }\n /**\n * Perform an Http PUT request given a set of options\n * @param options Options to build the HTTP request\n */\n async put(options) {\n return this.request(Object.assign(Object.assign({}, options), { method: 'PUT' }));\n }\n /**\n * Perform an Http PATCH request given a set of options\n * @param options Options to build the HTTP request\n */\n async patch(options) {\n return this.request(Object.assign(Object.assign({}, options), { method: 'PATCH' }));\n }\n /**\n * Perform an Http DELETE request given a set of options\n * @param options Options to build the HTTP request\n */\n async delete(options) {\n return this.request(Object.assign(Object.assign({}, options), { method: 'DELETE' }));\n }\n}\nexport const CapacitorHttp = registerPlugin('CapacitorHttp', {\n web: () => new CapacitorHttpPluginWeb(),\n});\n/******** END HTTP PLUGIN ********/\n//# sourceMappingURL=core-plugins.js.map"],"names":["ExceptionCode"],"mappings":";;;;;AAAA,MAAM,wBAAwB,GAAG,CAAC,GAAG,KAAK;AAC1C,IAAI,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAC;AACzC,IAAI,kBAAkB,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AACnD,IAAI,MAAM,YAAY,GAAG,GAAG,CAAC,kBAAkB,IAAI;AACnD,QAAQ,eAAe,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;AACxC,QAAQ,SAAS,EAAE,kBAAkB;AACrC,KAAK,CAAC;AACN,IAAI,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,QAAQ,KAAK;AAC5C,QAAQ,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACnD,KAAK,CAAC;AACN,IAAI,MAAM,WAAW,GAAG,CAAC,IAAI,KAAK;AAClC,QAAQ,IAAI,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;AAC9C,YAAY,YAAY,CAAC,eAAe,GAAG,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC5E,SAAS;AACT,KAAK,CAAC;AACN,IAAI,YA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C,CAAC;AAC1F,KAAK;AACL;AACA;AACA;AACA;AACA,IAAI,MAAM,KAAK,CAAC,OAAO,EAAE;AACzB,QAAQ,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;AAC5F,KAAK;AACL;AACA;AACA;AACA;AACA,IAAI,MAAM,MAAM,CAAC,OAAO,EAAE;AAC1B,QAAQ,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;AAC7F,KAAK;AACL,CAAC;AACW,MAAC,aAAa,GAAG,cAAc,CAAC,eAAe,EAAE;AAC7D,IAAI,GAAG,EAAE,MAAM,IAAI,sBAAsB,EAAE;AAC3C,CAAC,EAAE;AACH;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@capacitor/core/dist/index.js b/node_modules/@capacitor/core/dist/index.js new file mode 100644 index 0000000..8b53a4d --- /dev/null +++ b/node_modules/@capacitor/core/dist/index.js @@ -0,0 +1,682 @@ +/*! Capacitor: https://capacitorjs.com/ - MIT License */ +const createCapacitorPlatforms = (win) => { + const defaultPlatformMap = new Map(); + defaultPlatformMap.set('web', { name: 'web' }); + const capPlatforms = win.CapacitorPlatforms || { + currentPlatform: { name: 'web' }, + platforms: defaultPlatformMap, + }; + const addPlatform = (name, platform) => { + capPlatforms.platforms.set(name, platform); + }; + const setPlatform = (name) => { + if (capPlatforms.platforms.has(name)) { + capPlatforms.currentPlatform = capPlatforms.platforms.get(name); + } + }; + capPlatforms.addPlatform = addPlatform; + capPlatforms.setPlatform = setPlatform; + return capPlatforms; +}; +const initPlatforms = (win) => (win.CapacitorPlatforms = createCapacitorPlatforms(win)); +/** + * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead + */ +const CapacitorPlatforms = /*#__PURE__*/ initPlatforms((typeof globalThis !== 'undefined' + ? globalThis + : typeof self !== 'undefined' + ? self + : typeof window !== 'undefined' + ? window + : typeof global !== 'undefined' + ? global + : {})); +/** + * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead + */ +const addPlatform = CapacitorPlatforms.addPlatform; +/** + * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead + */ +const setPlatform = CapacitorPlatforms.setPlatform; + +const legacyRegisterWebPlugin = (cap, webPlugin) => { + var _a; + const config = webPlugin.config; + const Plugins = cap.Plugins; + if (!(config === null || config === void 0 ? void 0 : config.name)) { + // TODO: add link to upgrade guide + throw new Error(`Capacitor WebPlugin is using the deprecated "registerWebPlugin()" function, but without the config. Please use "registerPlugin()" instead to register this web plugin."`); + } + // TODO: add link to upgrade guide + console.warn(`Capacitor plugin "${config.name}" is using the deprecated "registerWebPlugin()" function`); + if (!Plugins[config.name] || ((_a = config === null || config === void 0 ? void 0 : config.platforms) === null || _a === void 0 ? void 0 : _a.includes(cap.getPlatform()))) { + // Add the web plugin into the plugins registry if there already isn't + // an existing one. If it doesn't already exist, that means + // there's no existing native implementation for it. + // - OR - + // If we already have a plugin registered (meaning it was defined in the native layer), + // then we should only overwrite it if the corresponding web plugin activates on + // a certain platform. For example: Geolocation uses the WebPlugin on Android but not iOS + Plugins[config.name] = webPlugin; + } +}; + +var ExceptionCode; +(function (ExceptionCode) { + /** + * API is not implemented. + * + * This usually means the API can't be used because it is not implemented for + * the current platform. + */ + ExceptionCode["Unimplemented"] = "UNIMPLEMENTED"; + /** + * API is not available. + * + * This means the API can't be used right now because: + * - it is currently missing a prerequisite, such as network connectivity + * - it requires a particular platform or browser version + */ + ExceptionCode["Unavailable"] = "UNAVAILABLE"; +})(ExceptionCode || (ExceptionCode = {})); +class CapacitorException extends Error { + constructor(message, code, data) { + super(message); + this.message = message; + this.code = code; + this.data = data; + } +} +const getPlatformId = (win) => { + var _a, _b; + if (win === null || win === void 0 ? void 0 : win.androidBridge) { + return 'android'; + } + else if ((_b = (_a = win === null || win === void 0 ? void 0 : win.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.bridge) { + return 'ios'; + } + else { + return 'web'; + } +}; + +const createCapacitor = (win) => { + var _a, _b, _c, _d, _e; + const capCustomPlatform = win.CapacitorCustomPlatform || null; + const cap = win.Capacitor || {}; + const Plugins = (cap.Plugins = cap.Plugins || {}); + /** + * @deprecated Use `capCustomPlatform` instead, default functions like registerPlugin will function with the new object. + */ + const capPlatforms = win.CapacitorPlatforms; + const defaultGetPlatform = () => { + return capCustomPlatform !== null + ? capCustomPlatform.name + : getPlatformId(win); + }; + const getPlatform = ((_a = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _a === void 0 ? void 0 : _a.getPlatform) || defaultGetPlatform; + const defaultIsNativePlatform = () => getPlatform() !== 'web'; + const isNativePlatform = ((_b = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _b === void 0 ? void 0 : _b.isNativePlatform) || defaultIsNativePlatform; + const defaultIsPluginAvailable = (pluginName) => { + const plugin = registeredPlugins.get(pluginName); + if (plugin === null || plugin === void 0 ? void 0 : plugin.platforms.has(getPlatform())) { + // JS implementation available for the current platform. + return true; + } + if (getPluginHeader(pluginName)) { + // Native implementation available. + return true; + } + return false; + }; + const isPluginAvailable = ((_c = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _c === void 0 ? void 0 : _c.isPluginAvailable) || + defaultIsPluginAvailable; + const defaultGetPluginHeader = (pluginName) => { var _a; return (_a = cap.PluginHeaders) === null || _a === void 0 ? void 0 : _a.find(h => h.name === pluginName); }; + const getPluginHeader = ((_d = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _d === void 0 ? void 0 : _d.getPluginHeader) || defaultGetPluginHeader; + const handleError = (err) => win.console.error(err); + const pluginMethodNoop = (_target, prop, pluginName) => { + return Promise.reject(`${pluginName} does not have an implementation of "${prop}".`); + }; + const registeredPlugins = new Map(); + const defaultRegisterPlugin = (pluginName, jsImplementations = {}) => { + const registeredPlugin = registeredPlugins.get(pluginName); + if (registeredPlugin) { + console.warn(`Capacitor plugin "${pluginName}" already registered. Cannot register plugins twice.`); + return registeredPlugin.proxy; + } + const platform = getPlatform(); + const pluginHeader = getPluginHeader(pluginName); + let jsImplementation; + const loadPluginImplementation = async () => { + if (!jsImplementation && platform in jsImplementations) { + jsImplementation = + typeof jsImplementations[platform] === 'function' + ? (jsImplementation = await jsImplementations[platform]()) + : (jsImplementation = jsImplementations[platform]); + } + else if (capCustomPlatform !== null && + !jsImplementation && + 'web' in jsImplementations) { + jsImplementation = + typeof jsImplementations['web'] === 'function' + ? (jsImplementation = await jsImplementations['web']()) + : (jsImplementation = jsImplementations['web']); + } + return jsImplementation; + }; + const createPluginMethod = (impl, prop) => { + var _a, _b; + if (pluginHeader) { + const methodHeader = pluginHeader === null || pluginHeader === void 0 ? void 0 : pluginHeader.methods.find(m => prop === m.name); + if (methodHeader) { + if (methodHeader.rtype === 'promise') { + return (options) => cap.nativePromise(pluginName, prop.toString(), options); + } + else { + return (options, callback) => cap.nativeCallback(pluginName, prop.toString(), options, callback); + } + } + else if (impl) { + return (_a = impl[prop]) === null || _a === void 0 ? void 0 : _a.bind(impl); + } + } + else if (impl) { + return (_b = impl[prop]) === null || _b === void 0 ? void 0 : _b.bind(impl); + } + else { + throw new CapacitorException(`"${pluginName}" plugin is not implemented on ${platform}`, ExceptionCode.Unimplemented); + } + }; + const createPluginMethodWrapper = (prop) => { + let remove; + const wrapper = (...args) => { + const p = loadPluginImplementation().then(impl => { + const fn = createPluginMethod(impl, prop); + if (fn) { + const p = fn(...args); + remove = p === null || p === void 0 ? void 0 : p.remove; + return p; + } + else { + throw new CapacitorException(`"${pluginName}.${prop}()" is not implemented on ${platform}`, ExceptionCode.Unimplemented); + } + }); + if (prop === 'addListener') { + p.remove = async () => remove(); + } + return p; + }; + // Some flair ✨ + wrapper.toString = () => `${prop.toString()}() { [capacitor code] }`; + Object.defineProperty(wrapper, 'name', { + value: prop, + writable: false, + configurable: false, + }); + return wrapper; + }; + const addListener = createPluginMethodWrapper('addListener'); + const removeListener = createPluginMethodWrapper('removeListener'); + const addListenerNative = (eventName, callback) => { + const call = addListener({ eventName }, callback); + const remove = async () => { + const callbackId = await call; + removeListener({ + eventName, + callbackId, + }, callback); + }; + const p = new Promise(resolve => call.then(() => resolve({ remove }))); + p.remove = async () => { + console.warn(`Using addListener() without 'await' is deprecated.`); + await remove(); + }; + return p; + }; + const proxy = new Proxy({}, { + get(_, prop) { + switch (prop) { + // https://github.com/facebook/react/issues/20030 + case '$$typeof': + return undefined; + case 'toJSON': + return () => ({}); + case 'addListener': + return pluginHeader ? addListenerNative : addListener; + case 'removeListener': + return removeListener; + default: + return createPluginMethodWrapper(prop); + } + }, + }); + Plugins[pluginName] = proxy; + registeredPlugins.set(pluginName, { + name: pluginName, + proxy, + platforms: new Set([ + ...Object.keys(jsImplementations), + ...(pluginHeader ? [platform] : []), + ]), + }); + return proxy; + }; + const registerPlugin = ((_e = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _e === void 0 ? void 0 : _e.registerPlugin) || defaultRegisterPlugin; + // Add in convertFileSrc for web, it will already be available in native context + if (!cap.convertFileSrc) { + cap.convertFileSrc = filePath => filePath; + } + cap.getPlatform = getPlatform; + cap.handleError = handleError; + cap.isNativePlatform = isNativePlatform; + cap.isPluginAvailable = isPluginAvailable; + cap.pluginMethodNoop = pluginMethodNoop; + cap.registerPlugin = registerPlugin; + cap.Exception = CapacitorException; + cap.DEBUG = !!cap.DEBUG; + cap.isLoggingEnabled = !!cap.isLoggingEnabled; + // Deprecated props + cap.platform = cap.getPlatform(); + cap.isNative = cap.isNativePlatform(); + return cap; +}; +const initCapacitorGlobal = (win) => (win.Capacitor = createCapacitor(win)); + +const Capacitor = /*#__PURE__*/ initCapacitorGlobal(typeof globalThis !== 'undefined' + ? globalThis + : typeof self !== 'undefined' + ? self + : typeof window !== 'undefined' + ? window + : typeof global !== 'undefined' + ? global + : {}); +const registerPlugin = Capacitor.registerPlugin; +/** + * @deprecated Provided for backwards compatibility for Capacitor v2 plugins. + * Capacitor v3 plugins should import the plugin directly. This "Plugins" + * export is deprecated in v3, and will be removed in v4. + */ +const Plugins = Capacitor.Plugins; +/** + * Provided for backwards compatibility. Use the registerPlugin() API + * instead, and provide the web plugin as the "web" implmenetation. + * For example + * + * export const Example = registerPlugin('Example', { + * web: () => import('./web').then(m => new m.Example()) + * }) + * + * @deprecated Deprecated in v3, will be removed from v4. + */ +const registerWebPlugin = (plugin) => legacyRegisterWebPlugin(Capacitor, plugin); + +/** + * Base class web plugins should extend. + */ +class WebPlugin { + constructor(config) { + this.listeners = {}; + this.windowListeners = {}; + if (config) { + // TODO: add link to upgrade guide + console.warn(`Capacitor WebPlugin "${config.name}" config object was deprecated in v3 and will be removed in v4.`); + this.config = config; + } + } + addListener(eventName, listenerFunc) { + const listeners = this.listeners[eventName]; + if (!listeners) { + this.listeners[eventName] = []; + } + this.listeners[eventName].push(listenerFunc); + // If we haven't added a window listener for this event and it requires one, + // go ahead and add it + const windowListener = this.windowListeners[eventName]; + if (windowListener && !windowListener.registered) { + this.addWindowListener(windowListener); + } + const remove = async () => this.removeListener(eventName, listenerFunc); + const p = Promise.resolve({ remove }); + Object.defineProperty(p, 'remove', { + value: async () => { + console.warn(`Using addListener() without 'await' is deprecated.`); + await remove(); + }, + }); + return p; + } + async removeAllListeners() { + this.listeners = {}; + for (const listener in this.windowListeners) { + this.removeWindowListener(this.windowListeners[listener]); + } + this.windowListeners = {}; + } + notifyListeners(eventName, data) { + const listeners = this.listeners[eventName]; + if (listeners) { + listeners.forEach(listener => listener(data)); + } + } + hasListeners(eventName) { + return !!this.listeners[eventName].length; + } + registerWindowListener(windowEventName, pluginEventName) { + this.windowListeners[pluginEventName] = { + registered: false, + windowEventName, + pluginEventName, + handler: event => { + this.notifyListeners(pluginEventName, event); + }, + }; + } + unimplemented(msg = 'not implemented') { + return new Capacitor.Exception(msg, ExceptionCode.Unimplemented); + } + unavailable(msg = 'not available') { + return new Capacitor.Exception(msg, ExceptionCode.Unavailable); + } + async removeListener(eventName, listenerFunc) { + const listeners = this.listeners[eventName]; + if (!listeners) { + return; + } + const index = listeners.indexOf(listenerFunc); + this.listeners[eventName].splice(index, 1); + // If there are no more listeners for this type of event, + // remove the window listener + if (!this.listeners[eventName].length) { + this.removeWindowListener(this.windowListeners[eventName]); + } + } + addWindowListener(handle) { + window.addEventListener(handle.windowEventName, handle.handler); + handle.registered = true; + } + removeWindowListener(handle) { + if (!handle) { + return; + } + window.removeEventListener(handle.windowEventName, handle.handler); + handle.registered = false; + } +} + +const WebView = /*#__PURE__*/ registerPlugin('WebView'); +/******** END WEB VIEW PLUGIN ********/ +/******** COOKIES PLUGIN ********/ +/** + * Safely web encode a string value (inspired by js-cookie) + * @param str The string value to encode + */ +const encode = (str) => encodeURIComponent(str) + .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent) + .replace(/[()]/g, escape); +/** + * Safely web decode a string value (inspired by js-cookie) + * @param str The string value to decode + */ +const decode = (str) => str.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent); +class CapacitorCookiesPluginWeb extends WebPlugin { + async getCookies() { + const cookies = document.cookie; + const cookieMap = {}; + cookies.split(';').forEach(cookie => { + if (cookie.length <= 0) + return; + // Replace first "=" with CAP_COOKIE to prevent splitting on additional "=" + let [key, value] = cookie.replace(/=/, 'CAP_COOKIE').split('CAP_COOKIE'); + key = decode(key).trim(); + value = decode(value).trim(); + cookieMap[key] = value; + }); + return cookieMap; + } + async setCookie(options) { + try { + // Safely Encoded Key/Value + const encodedKey = encode(options.key); + const encodedValue = encode(options.value); + // Clean & sanitize options + const expires = `; expires=${(options.expires || '').replace('expires=', '')}`; // Default is "; expires=" + const path = (options.path || '/').replace('path=', ''); // Default is "path=/" + const domain = options.url != null && options.url.length > 0 + ? `domain=${options.url}` + : ''; + document.cookie = `${encodedKey}=${encodedValue || ''}${expires}; path=${path}; ${domain};`; + } + catch (error) { + return Promise.reject(error); + } + } + async deleteCookie(options) { + try { + document.cookie = `${options.key}=; Max-Age=0`; + } + catch (error) { + return Promise.reject(error); + } + } + async clearCookies() { + try { + const cookies = document.cookie.split(';') || []; + for (const cookie of cookies) { + document.cookie = cookie + .replace(/^ +/, '') + .replace(/=.*/, `=;expires=${new Date().toUTCString()};path=/`); + } + } + catch (error) { + return Promise.reject(error); + } + } + async clearAllCookies() { + try { + await this.clearCookies(); + } + catch (error) { + return Promise.reject(error); + } + } +} +const CapacitorCookies = registerPlugin('CapacitorCookies', { + web: () => new CapacitorCookiesPluginWeb(), +}); +// UTILITY FUNCTIONS +/** + * Read in a Blob value and return it as a base64 string + * @param blob The blob value to convert to a base64 string + */ +const readBlobAsBase64 = async (blob) => new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onload = () => { + const base64String = reader.result; + // remove prefix "data:application/pdf;base64," + resolve(base64String.indexOf(',') >= 0 + ? base64String.split(',')[1] + : base64String); + }; + reader.onerror = (error) => reject(error); + reader.readAsDataURL(blob); +}); +/** + * Normalize an HttpHeaders map by lowercasing all of the values + * @param headers The HttpHeaders object to normalize + */ +const normalizeHttpHeaders = (headers = {}) => { + const originalKeys = Object.keys(headers); + const loweredKeys = Object.keys(headers).map(k => k.toLocaleLowerCase()); + const normalized = loweredKeys.reduce((acc, key, index) => { + acc[key] = headers[originalKeys[index]]; + return acc; + }, {}); + return normalized; +}; +/** + * Builds a string of url parameters that + * @param params A map of url parameters + * @param shouldEncode true if you should encodeURIComponent() the values (true by default) + */ +const buildUrlParams = (params, shouldEncode = true) => { + if (!params) + return null; + const output = Object.entries(params).reduce((accumulator, entry) => { + const [key, value] = entry; + let encodedValue; + let item; + if (Array.isArray(value)) { + item = ''; + value.forEach(str => { + encodedValue = shouldEncode ? encodeURIComponent(str) : str; + item += `${key}=${encodedValue}&`; + }); + // last character will always be "&" so slice it off + item.slice(0, -1); + } + else { + encodedValue = shouldEncode ? encodeURIComponent(value) : value; + item = `${key}=${encodedValue}`; + } + return `${accumulator}&${item}`; + }, ''); + // Remove initial "&" from the reduce + return output.substr(1); +}; +/** + * Build the RequestInit object based on the options passed into the initial request + * @param options The Http plugin options + * @param extra Any extra RequestInit values + */ +const buildRequestInit = (options, extra = {}) => { + const output = Object.assign({ method: options.method || 'GET', headers: options.headers }, extra); + // Get the content-type + const headers = normalizeHttpHeaders(options.headers); + const type = headers['content-type'] || ''; + // If body is already a string, then pass it through as-is. + if (typeof options.data === 'string') { + output.body = options.data; + } + // Build request initializers based off of content-type + else if (type.includes('application/x-www-form-urlencoded')) { + const params = new URLSearchParams(); + for (const [key, value] of Object.entries(options.data || {})) { + params.set(key, value); + } + output.body = params.toString(); + } + else if (type.includes('multipart/form-data') || + options.data instanceof FormData) { + const form = new FormData(); + if (options.data instanceof FormData) { + options.data.forEach((value, key) => { + form.append(key, value); + }); + } + else { + for (const key of Object.keys(options.data)) { + form.append(key, options.data[key]); + } + } + output.body = form; + const headers = new Headers(output.headers); + headers.delete('content-type'); // content-type will be set by `window.fetch` to includy boundary + output.headers = headers; + } + else if (type.includes('application/json') || + typeof options.data === 'object') { + output.body = JSON.stringify(options.data); + } + return output; +}; +// WEB IMPLEMENTATION +class CapacitorHttpPluginWeb extends WebPlugin { + /** + * Perform an Http request given a set of options + * @param options Options to build the HTTP request + */ + async request(options) { + const requestInit = buildRequestInit(options, options.webFetchExtra); + const urlParams = buildUrlParams(options.params, options.shouldEncodeUrlParams); + const url = urlParams ? `${options.url}?${urlParams}` : options.url; + const response = await fetch(url, requestInit); + const contentType = response.headers.get('content-type') || ''; + // Default to 'text' responseType so no parsing happens + let { responseType = 'text' } = response.ok ? options : {}; + // If the response content-type is json, force the response to be json + if (contentType.includes('application/json')) { + responseType = 'json'; + } + let data; + let blob; + switch (responseType) { + case 'arraybuffer': + case 'blob': + blob = await response.blob(); + data = await readBlobAsBase64(blob); + break; + case 'json': + data = await response.json(); + break; + case 'document': + case 'text': + default: + data = await response.text(); + } + // Convert fetch headers to Capacitor HttpHeaders + const headers = {}; + response.headers.forEach((value, key) => { + headers[key] = value; + }); + return { + data, + headers, + status: response.status, + url: response.url, + }; + } + /** + * Perform an Http GET request given a set of options + * @param options Options to build the HTTP request + */ + async get(options) { + return this.request(Object.assign(Object.assign({}, options), { method: 'GET' })); + } + /** + * Perform an Http POST request given a set of options + * @param options Options to build the HTTP request + */ + async post(options) { + return this.request(Object.assign(Object.assign({}, options), { method: 'POST' })); + } + /** + * Perform an Http PUT request given a set of options + * @param options Options to build the HTTP request + */ + async put(options) { + return this.request(Object.assign(Object.assign({}, options), { method: 'PUT' })); + } + /** + * Perform an Http PATCH request given a set of options + * @param options Options to build the HTTP request + */ + async patch(options) { + return this.request(Object.assign(Object.assign({}, options), { method: 'PATCH' })); + } + /** + * Perform an Http DELETE request given a set of options + * @param options Options to build the HTTP request + */ + async delete(options) { + return this.request(Object.assign(Object.assign({}, options), { method: 'DELETE' })); + } +} +const CapacitorHttp = registerPlugin('CapacitorHttp', { + web: () => new CapacitorHttpPluginWeb(), +}); +/******** END HTTP PLUGIN ********/ + +export { Capacitor, CapacitorCookies, CapacitorException, CapacitorHttp, CapacitorPlatforms, ExceptionCode, Plugins, WebPlugin, WebView, addPlatform, buildRequestInit, registerPlugin, registerWebPlugin, setPlatform }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@capacitor/core/dist/index.js.map b/node_modules/@capacitor/core/dist/index.js.map new file mode 100644 index 0000000..a9313b0 --- /dev/null +++ b/node_modules/@capacitor/core/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../build/platforms.js","../build/legacy/legacy-web-plugin-merge.js","../build/util.js","../build/runtime.js","../build/global.js","../build/web-plugin.js","../build/core-plugins.js"],"sourcesContent":["const createCapacitorPlatforms = (win) => {\n const defaultPlatformMap = new Map();\n defaultPlatformMap.set('web', { name: 'web' });\n const capPlatforms = win.CapacitorPlatforms || {\n currentPlatform: { name: 'web' },\n platforms: defaultPlatformMap,\n };\n const addPlatform = (name, platform) => {\n capPlatforms.platforms.set(name, platform);\n };\n const setPlatform = (name) => {\n if (capPlatforms.platforms.has(name)) {\n capPlatforms.currentPlatform = capPlatforms.platforms.get(name);\n }\n };\n capPlatforms.addPlatform = addPlatform;\n capPlatforms.setPlatform = setPlatform;\n return capPlatforms;\n};\nconst initPlatforms = (win) => (win.CapacitorPlatforms = createCapacitorPlatforms(win));\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const CapacitorPlatforms = /*#__PURE__*/ initPlatforms((typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {}));\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const addPlatform = CapacitorPlatforms.addPlatform;\n/**\n * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead\n */\nexport const setPlatform = CapacitorPlatforms.setPlatform;\n//# sourceMappingURL=platforms.js.map","export const legacyRegisterWebPlugin = (cap, webPlugin) => {\n var _a;\n const config = webPlugin.config;\n const Plugins = cap.Plugins;\n if (!(config === null || config === void 0 ? void 0 : config.name)) {\n // TODO: add link to upgrade guide\n throw new Error(`Capacitor WebPlugin is using the deprecated \"registerWebPlugin()\" function, but without the config. Please use \"registerPlugin()\" instead to register this web plugin.\"`);\n }\n // TODO: add link to upgrade guide\n console.warn(`Capacitor plugin \"${config.name}\" is using the deprecated \"registerWebPlugin()\" function`);\n if (!Plugins[config.name] || ((_a = config === null || config === void 0 ? void 0 : config.platforms) === null || _a === void 0 ? void 0 : _a.includes(cap.getPlatform()))) {\n // Add the web plugin into the plugins registry if there already isn't\n // an existing one. If it doesn't already exist, that means\n // there's no existing native implementation for it.\n // - OR -\n // If we already have a plugin registered (meaning it was defined in the native layer),\n // then we should only overwrite it if the corresponding web plugin activates on\n // a certain platform. For example: Geolocation uses the WebPlugin on Android but not iOS\n Plugins[config.name] = webPlugin;\n }\n};\n//# sourceMappingURL=legacy-web-plugin-merge.js.map","export var ExceptionCode;\n(function (ExceptionCode) {\n /**\n * API is not implemented.\n *\n * This usually means the API can't be used because it is not implemented for\n * the current platform.\n */\n ExceptionCode[\"Unimplemented\"] = \"UNIMPLEMENTED\";\n /**\n * API is not available.\n *\n * This means the API can't be used right now because:\n * - it is currently missing a prerequisite, such as network connectivity\n * - it requires a particular platform or browser version\n */\n ExceptionCode[\"Unavailable\"] = \"UNAVAILABLE\";\n})(ExceptionCode || (ExceptionCode = {}));\nexport class CapacitorException extends Error {\n constructor(message, code, data) {\n super(message);\n this.message = message;\n this.code = code;\n this.data = data;\n }\n}\nexport const getPlatformId = (win) => {\n var _a, _b;\n if (win === null || win === void 0 ? void 0 : win.androidBridge) {\n return 'android';\n }\n else if ((_b = (_a = win === null || win === void 0 ? void 0 : win.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.bridge) {\n return 'ios';\n }\n else {\n return 'web';\n }\n};\n//# sourceMappingURL=util.js.map","import { CapacitorException, getPlatformId, ExceptionCode } from './util';\nexport const createCapacitor = (win) => {\n var _a, _b, _c, _d, _e;\n const capCustomPlatform = win.CapacitorCustomPlatform || null;\n const cap = win.Capacitor || {};\n const Plugins = (cap.Plugins = cap.Plugins || {});\n /**\n * @deprecated Use `capCustomPlatform` instead, default functions like registerPlugin will function with the new object.\n */\n const capPlatforms = win.CapacitorPlatforms;\n const defaultGetPlatform = () => {\n return capCustomPlatform !== null\n ? capCustomPlatform.name\n : getPlatformId(win);\n };\n const getPlatform = ((_a = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _a === void 0 ? void 0 : _a.getPlatform) || defaultGetPlatform;\n const defaultIsNativePlatform = () => getPlatform() !== 'web';\n const isNativePlatform = ((_b = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _b === void 0 ? void 0 : _b.isNativePlatform) || defaultIsNativePlatform;\n const defaultIsPluginAvailable = (pluginName) => {\n const plugin = registeredPlugins.get(pluginName);\n if (plugin === null || plugin === void 0 ? void 0 : plugin.platforms.has(getPlatform())) {\n // JS implementation available for the current platform.\n return true;\n }\n if (getPluginHeader(pluginName)) {\n // Native implementation available.\n return true;\n }\n return false;\n };\n const isPluginAvailable = ((_c = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _c === void 0 ? void 0 : _c.isPluginAvailable) ||\n defaultIsPluginAvailable;\n const defaultGetPluginHeader = (pluginName) => { var _a; return (_a = cap.PluginHeaders) === null || _a === void 0 ? void 0 : _a.find(h => h.name === pluginName); };\n const getPluginHeader = ((_d = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _d === void 0 ? void 0 : _d.getPluginHeader) || defaultGetPluginHeader;\n const handleError = (err) => win.console.error(err);\n const pluginMethodNoop = (_target, prop, pluginName) => {\n return Promise.reject(`${pluginName} does not have an implementation of \"${prop}\".`);\n };\n const registeredPlugins = new Map();\n const defaultRegisterPlugin = (pluginName, jsImplementations = {}) => {\n const registeredPlugin = registeredPlugins.get(pluginName);\n if (registeredPlugin) {\n console.warn(`Capacitor plugin \"${pluginName}\" already registered. Cannot register plugins twice.`);\n return registeredPlugin.proxy;\n }\n const platform = getPlatform();\n const pluginHeader = getPluginHeader(pluginName);\n let jsImplementation;\n const loadPluginImplementation = async () => {\n if (!jsImplementation && platform in jsImplementations) {\n jsImplementation =\n typeof jsImplementations[platform] === 'function'\n ? (jsImplementation = await jsImplementations[platform]())\n : (jsImplementation = jsImplementations[platform]);\n }\n else if (capCustomPlatform !== null &&\n !jsImplementation &&\n 'web' in jsImplementations) {\n jsImplementation =\n typeof jsImplementations['web'] === 'function'\n ? (jsImplementation = await jsImplementations['web']())\n : (jsImplementation = jsImplementations['web']);\n }\n return jsImplementation;\n };\n const createPluginMethod = (impl, prop) => {\n var _a, _b;\n if (pluginHeader) {\n const methodHeader = pluginHeader === null || pluginHeader === void 0 ? void 0 : pluginHeader.methods.find(m => prop === m.name);\n if (methodHeader) {\n if (methodHeader.rtype === 'promise') {\n return (options) => cap.nativePromise(pluginName, prop.toString(), options);\n }\n else {\n return (options, callback) => cap.nativeCallback(pluginName, prop.toString(), options, callback);\n }\n }\n else if (impl) {\n return (_a = impl[prop]) === null || _a === void 0 ? void 0 : _a.bind(impl);\n }\n }\n else if (impl) {\n return (_b = impl[prop]) === null || _b === void 0 ? void 0 : _b.bind(impl);\n }\n else {\n throw new CapacitorException(`\"${pluginName}\" plugin is not implemented on ${platform}`, ExceptionCode.Unimplemented);\n }\n };\n const createPluginMethodWrapper = (prop) => {\n let remove;\n const wrapper = (...args) => {\n const p = loadPluginImplementation().then(impl => {\n const fn = createPluginMethod(impl, prop);\n if (fn) {\n const p = fn(...args);\n remove = p === null || p === void 0 ? void 0 : p.remove;\n return p;\n }\n else {\n throw new CapacitorException(`\"${pluginName}.${prop}()\" is not implemented on ${platform}`, ExceptionCode.Unimplemented);\n }\n });\n if (prop === 'addListener') {\n p.remove = async () => remove();\n }\n return p;\n };\n // Some flair ✨\n wrapper.toString = () => `${prop.toString()}() { [capacitor code] }`;\n Object.defineProperty(wrapper, 'name', {\n value: prop,\n writable: false,\n configurable: false,\n });\n return wrapper;\n };\n const addListener = createPluginMethodWrapper('addListener');\n const removeListener = createPluginMethodWrapper('removeListener');\n const addListenerNative = (eventName, callback) => {\n const call = addListener({ eventName }, callback);\n const remove = async () => {\n const callbackId = await call;\n removeListener({\n eventName,\n callbackId,\n }, callback);\n };\n const p = new Promise(resolve => call.then(() => resolve({ remove })));\n p.remove = async () => {\n console.warn(`Using addListener() without 'await' is deprecated.`);\n await remove();\n };\n return p;\n };\n const proxy = new Proxy({}, {\n get(_, prop) {\n switch (prop) {\n // https://github.com/facebook/react/issues/20030\n case '$$typeof':\n return undefined;\n case 'toJSON':\n return () => ({});\n case 'addListener':\n return pluginHeader ? addListenerNative : addListener;\n case 'removeListener':\n return removeListener;\n default:\n return createPluginMethodWrapper(prop);\n }\n },\n });\n Plugins[pluginName] = proxy;\n registeredPlugins.set(pluginName, {\n name: pluginName,\n proxy,\n platforms: new Set([\n ...Object.keys(jsImplementations),\n ...(pluginHeader ? [platform] : []),\n ]),\n });\n return proxy;\n };\n const registerPlugin = ((_e = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _e === void 0 ? void 0 : _e.registerPlugin) || defaultRegisterPlugin;\n // Add in convertFileSrc for web, it will already be available in native context\n if (!cap.convertFileSrc) {\n cap.convertFileSrc = filePath => filePath;\n }\n cap.getPlatform = getPlatform;\n cap.handleError = handleError;\n cap.isNativePlatform = isNativePlatform;\n cap.isPluginAvailable = isPluginAvailable;\n cap.pluginMethodNoop = pluginMethodNoop;\n cap.registerPlugin = registerPlugin;\n cap.Exception = CapacitorException;\n cap.DEBUG = !!cap.DEBUG;\n cap.isLoggingEnabled = !!cap.isLoggingEnabled;\n // Deprecated props\n cap.platform = cap.getPlatform();\n cap.isNative = cap.isNativePlatform();\n return cap;\n};\nexport const initCapacitorGlobal = (win) => (win.Capacitor = createCapacitor(win));\n//# sourceMappingURL=runtime.js.map","import { legacyRegisterWebPlugin } from './legacy/legacy-web-plugin-merge';\nimport { initCapacitorGlobal } from './runtime';\nexport const Capacitor = /*#__PURE__*/ initCapacitorGlobal(typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {});\nexport const registerPlugin = Capacitor.registerPlugin;\n/**\n * @deprecated Provided for backwards compatibility for Capacitor v2 plugins.\n * Capacitor v3 plugins should import the plugin directly. This \"Plugins\"\n * export is deprecated in v3, and will be removed in v4.\n */\nexport const Plugins = Capacitor.Plugins;\n/**\n * Provided for backwards compatibility. Use the registerPlugin() API\n * instead, and provide the web plugin as the \"web\" implmenetation.\n * For example\n *\n * export const Example = registerPlugin('Example', {\n * web: () => import('./web').then(m => new m.Example())\n * })\n *\n * @deprecated Deprecated in v3, will be removed from v4.\n */\nexport const registerWebPlugin = (plugin) => legacyRegisterWebPlugin(Capacitor, plugin);\n//# sourceMappingURL=global.js.map","import { Capacitor } from './global';\nimport { ExceptionCode } from './util';\n/**\n * Base class web plugins should extend.\n */\nexport class WebPlugin {\n constructor(config) {\n this.listeners = {};\n this.windowListeners = {};\n if (config) {\n // TODO: add link to upgrade guide\n console.warn(`Capacitor WebPlugin \"${config.name}\" config object was deprecated in v3 and will be removed in v4.`);\n this.config = config;\n }\n }\n addListener(eventName, listenerFunc) {\n const listeners = this.listeners[eventName];\n if (!listeners) {\n this.listeners[eventName] = [];\n }\n this.listeners[eventName].push(listenerFunc);\n // If we haven't added a window listener for this event and it requires one,\n // go ahead and add it\n const windowListener = this.windowListeners[eventName];\n if (windowListener && !windowListener.registered) {\n this.addWindowListener(windowListener);\n }\n const remove = async () => this.removeListener(eventName, listenerFunc);\n const p = Promise.resolve({ remove });\n Object.defineProperty(p, 'remove', {\n value: async () => {\n console.warn(`Using addListener() without 'await' is deprecated.`);\n await remove();\n },\n });\n return p;\n }\n async removeAllListeners() {\n this.listeners = {};\n for (const listener in this.windowListeners) {\n this.removeWindowListener(this.windowListeners[listener]);\n }\n this.windowListeners = {};\n }\n notifyListeners(eventName, data) {\n const listeners = this.listeners[eventName];\n if (listeners) {\n listeners.forEach(listener => listener(data));\n }\n }\n hasListeners(eventName) {\n return !!this.listeners[eventName].length;\n }\n registerWindowListener(windowEventName, pluginEventName) {\n this.windowListeners[pluginEventName] = {\n registered: false,\n windowEventName,\n pluginEventName,\n handler: event => {\n this.notifyListeners(pluginEventName, event);\n },\n };\n }\n unimplemented(msg = 'not implemented') {\n return new Capacitor.Exception(msg, ExceptionCode.Unimplemented);\n }\n unavailable(msg = 'not available') {\n return new Capacitor.Exception(msg, ExceptionCode.Unavailable);\n }\n async removeListener(eventName, listenerFunc) {\n const listeners = this.listeners[eventName];\n if (!listeners) {\n return;\n }\n const index = listeners.indexOf(listenerFunc);\n this.listeners[eventName].splice(index, 1);\n // If there are no more listeners for this type of event,\n // remove the window listener\n if (!this.listeners[eventName].length) {\n this.removeWindowListener(this.windowListeners[eventName]);\n }\n }\n addWindowListener(handle) {\n window.addEventListener(handle.windowEventName, handle.handler);\n handle.registered = true;\n }\n removeWindowListener(handle) {\n if (!handle) {\n return;\n }\n window.removeEventListener(handle.windowEventName, handle.handler);\n handle.registered = false;\n }\n}\n//# sourceMappingURL=web-plugin.js.map","import { registerPlugin } from './global';\nimport { WebPlugin } from './web-plugin';\nexport const WebView = /*#__PURE__*/ registerPlugin('WebView');\n/******** END WEB VIEW PLUGIN ********/\n/******** COOKIES PLUGIN ********/\n/**\n * Safely web encode a string value (inspired by js-cookie)\n * @param str The string value to encode\n */\nconst encode = (str) => encodeURIComponent(str)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n/**\n * Safely web decode a string value (inspired by js-cookie)\n * @param str The string value to decode\n */\nconst decode = (str) => str.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent);\nexport class CapacitorCookiesPluginWeb extends WebPlugin {\n async getCookies() {\n const cookies = document.cookie;\n const cookieMap = {};\n cookies.split(';').forEach(cookie => {\n if (cookie.length <= 0)\n return;\n // Replace first \"=\" with CAP_COOKIE to prevent splitting on additional \"=\"\n let [key, value] = cookie.replace(/=/, 'CAP_COOKIE').split('CAP_COOKIE');\n key = decode(key).trim();\n value = decode(value).trim();\n cookieMap[key] = value;\n });\n return cookieMap;\n }\n async setCookie(options) {\n try {\n // Safely Encoded Key/Value\n const encodedKey = encode(options.key);\n const encodedValue = encode(options.value);\n // Clean & sanitize options\n const expires = `; expires=${(options.expires || '').replace('expires=', '')}`; // Default is \"; expires=\"\n const path = (options.path || '/').replace('path=', ''); // Default is \"path=/\"\n const domain = options.url != null && options.url.length > 0\n ? `domain=${options.url}`\n : '';\n document.cookie = `${encodedKey}=${encodedValue || ''}${expires}; path=${path}; ${domain};`;\n }\n catch (error) {\n return Promise.reject(error);\n }\n }\n async deleteCookie(options) {\n try {\n document.cookie = `${options.key}=; Max-Age=0`;\n }\n catch (error) {\n return Promise.reject(error);\n }\n }\n async clearCookies() {\n try {\n const cookies = document.cookie.split(';') || [];\n for (const cookie of cookies) {\n document.cookie = cookie\n .replace(/^ +/, '')\n .replace(/=.*/, `=;expires=${new Date().toUTCString()};path=/`);\n }\n }\n catch (error) {\n return Promise.reject(error);\n }\n }\n async clearAllCookies() {\n try {\n await this.clearCookies();\n }\n catch (error) {\n return Promise.reject(error);\n }\n }\n}\nexport const CapacitorCookies = registerPlugin('CapacitorCookies', {\n web: () => new CapacitorCookiesPluginWeb(),\n});\n// UTILITY FUNCTIONS\n/**\n * Read in a Blob value and return it as a base64 string\n * @param blob The blob value to convert to a base64 string\n */\nexport const readBlobAsBase64 = async (blob) => new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n const base64String = reader.result;\n // remove prefix \"data:application/pdf;base64,\"\n resolve(base64String.indexOf(',') >= 0\n ? base64String.split(',')[1]\n : base64String);\n };\n reader.onerror = (error) => reject(error);\n reader.readAsDataURL(blob);\n});\n/**\n * Normalize an HttpHeaders map by lowercasing all of the values\n * @param headers The HttpHeaders object to normalize\n */\nconst normalizeHttpHeaders = (headers = {}) => {\n const originalKeys = Object.keys(headers);\n const loweredKeys = Object.keys(headers).map(k => k.toLocaleLowerCase());\n const normalized = loweredKeys.reduce((acc, key, index) => {\n acc[key] = headers[originalKeys[index]];\n return acc;\n }, {});\n return normalized;\n};\n/**\n * Builds a string of url parameters that\n * @param params A map of url parameters\n * @param shouldEncode true if you should encodeURIComponent() the values (true by default)\n */\nconst buildUrlParams = (params, shouldEncode = true) => {\n if (!params)\n return null;\n const output = Object.entries(params).reduce((accumulator, entry) => {\n const [key, value] = entry;\n let encodedValue;\n let item;\n if (Array.isArray(value)) {\n item = '';\n value.forEach(str => {\n encodedValue = shouldEncode ? encodeURIComponent(str) : str;\n item += `${key}=${encodedValue}&`;\n });\n // last character will always be \"&\" so slice it off\n item.slice(0, -1);\n }\n else {\n encodedValue = shouldEncode ? encodeURIComponent(value) : value;\n item = `${key}=${encodedValue}`;\n }\n return `${accumulator}&${item}`;\n }, '');\n // Remove initial \"&\" from the reduce\n return output.substr(1);\n};\n/**\n * Build the RequestInit object based on the options passed into the initial request\n * @param options The Http plugin options\n * @param extra Any extra RequestInit values\n */\nexport const buildRequestInit = (options, extra = {}) => {\n const output = Object.assign({ method: options.method || 'GET', headers: options.headers }, extra);\n // Get the content-type\n const headers = normalizeHttpHeaders(options.headers);\n const type = headers['content-type'] || '';\n // If body is already a string, then pass it through as-is.\n if (typeof options.data === 'string') {\n output.body = options.data;\n }\n // Build request initializers based off of content-type\n else if (type.includes('application/x-www-form-urlencoded')) {\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(options.data || {})) {\n params.set(key, value);\n }\n output.body = params.toString();\n }\n else if (type.includes('multipart/form-data') ||\n options.data instanceof FormData) {\n const form = new FormData();\n if (options.data instanceof FormData) {\n options.data.forEach((value, key) => {\n form.append(key, value);\n });\n }\n else {\n for (const key of Object.keys(options.data)) {\n form.append(key, options.data[key]);\n }\n }\n output.body = form;\n const headers = new Headers(output.headers);\n headers.delete('content-type'); // content-type will be set by `window.fetch` to includy boundary\n output.headers = headers;\n }\n else if (type.includes('application/json') ||\n typeof options.data === 'object') {\n output.body = JSON.stringify(options.data);\n }\n return output;\n};\n// WEB IMPLEMENTATION\nexport class CapacitorHttpPluginWeb extends WebPlugin {\n /**\n * Perform an Http request given a set of options\n * @param options Options to build the HTTP request\n */\n async request(options) {\n const requestInit = buildRequestInit(options, options.webFetchExtra);\n const urlParams = buildUrlParams(options.params, options.shouldEncodeUrlParams);\n const url = urlParams ? `${options.url}?${urlParams}` : options.url;\n const response = await fetch(url, requestInit);\n const contentType = response.headers.get('content-type') || '';\n // Default to 'text' responseType so no parsing happens\n let { responseType = 'text' } = response.ok ? options : {};\n // If the response content-type is json, force the response to be json\n if (contentType.includes('application/json')) {\n responseType = 'json';\n }\n let data;\n let blob;\n switch (responseType) {\n case 'arraybuffer':\n case 'blob':\n blob = await response.blob();\n data = await readBlobAsBase64(blob);\n break;\n case 'json':\n data = await response.json();\n break;\n case 'document':\n case 'text':\n default:\n data = await response.text();\n }\n // Convert fetch headers to Capacitor HttpHeaders\n const headers = {};\n response.headers.forEach((value, key) => {\n headers[key] = value;\n });\n return {\n data,\n headers,\n status: response.status,\n url: response.url,\n };\n }\n /**\n * Perform an Http GET request given a set of options\n * @param options Options to build the HTTP request\n */\n async get(options) {\n return this.request(Object.assign(Object.assign({}, options), { method: 'GET' }));\n }\n /**\n * Perform an Http POST request given a set of options\n * @param options Options to build the HTTP request\n */\n async post(options) {\n return this.request(Object.assign(Object.assign({}, options), { method: 'POST' }));\n }\n /**\n * Perform an Http PUT request given a set of options\n * @param options Options to build the HTTP request\n */\n async put(options) {\n return this.request(Object.assign(Object.assign({}, options), { method: 'PUT' }));\n }\n /**\n * Perform an Http PATCH request given a set of options\n * @param options Options to build the HTTP request\n */\n async patch(options) {\n return this.request(Object.assign(Object.assign({}, options), { method: 'PATCH' }));\n }\n /**\n * Perform an Http DELETE request given a set of options\n * @param options Options to build the HTTP request\n */\n async delete(options) {\n return this.request(Object.assign(Object.assign({}, options), { method: 'DELETE' }));\n }\n}\nexport const CapacitorHttp = registerPlugin('CapacitorHttp', {\n web: () => new CapacitorHttpPluginWeb(),\n});\n/******** END HTTP PLUGIN ********/\n//# sourceMappingURL=core-plugins.js.map"],"names":[],"mappings":";AAAA,MAAM,wBAAwB,GAAG,CAAC,GAAG,KAAK;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,CAAC;AACW,MAAC,aAAa,GAAG,cAAc,CAAC,eAAe,EAAE;AAC7D,IAAI,GAAG,EAAE,MAAM,IAAI,sBAAsB,EAAE;AAC3C,CAAC,EAAE;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/@capacitor/core/package.json b/node_modules/@capacitor/core/package.json new file mode 100644 index 0000000..0cf6c56 --- /dev/null +++ b/node_modules/@capacitor/core/package.json @@ -0,0 +1,57 @@ +{ + "name": "@capacitor/core", + "version": "5.7.8", + "description": "Capacitor: Cross-platform apps with JavaScript and the web", + "homepage": "https://capacitorjs.com", + "author": "Ionic Team (https://ionic.io)", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/ionic-team/capacitor.git" + }, + "bugs": { + "url": "https://github.com/ionic-team/capacitor/issues" + }, + "files": [ + "dist/", + "types/", + "cordova.js" + ], + "main": "dist/index.cjs.js", + "module": "dist/index.js", + "types": "types/index.d.ts", + "unpkg": "dist/capacitor.js", + "scripts": { + "build": "npm run clean && npm run transpile && npm run rollup", + "build:nativebridge": "tsc native-bridge.ts --target es2017 --moduleResolution node --outDir build && rollup --config rollup.bridge.config.js", + "clean": "rimraf dist", + "prepublishOnly": "npm run build", + "rollup": "rollup --config rollup.config.js", + "transpile": "tsc", + "test": "jest", + "test.watch": "jest --watchAll", + "test.treeshaking": "node src/tests/build-treeshaking.js" + }, + "dependencies": { + "tslib": "^2.1.0" + }, + "devDependencies": { + "@rollup/plugin-node-resolve": "^10.0.0", + "@rollup/plugin-replace": "^2.4.2", + "@types/jest": "^29.5.0", + "jest": "^29.5.0", + "jest-environment-jsdom": "^29.5.0", + "jest-jasmine2": "^29.5.0", + "rimraf": "^4.4.1", + "rollup": "^2.21.0", + "rollup-plugin-terser": "^7.0.2", + "typescript": "~5.0.2" + }, + "jest": { + "preset": "ts-jest", + "testRunner": "jest-jasmine2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@capacitor/core/types/core-plugins.d.ts b/node_modules/@capacitor/core/types/core-plugins.d.ts new file mode 100644 index 0000000..45db640 --- /dev/null +++ b/node_modules/@capacitor/core/types/core-plugins.d.ts @@ -0,0 +1,160 @@ +import type { Plugin } from './definitions'; +import { WebPlugin } from './web-plugin'; +/******** WEB VIEW PLUGIN ********/ +export interface WebViewPlugin extends Plugin { + setServerAssetPath(options: WebViewPath): Promise; + setServerBasePath(options: WebViewPath): Promise; + getServerBasePath(): Promise; + persistServerBasePath(): Promise; +} +export interface WebViewPath { + path: string; +} +export declare const WebView: WebViewPlugin; +export interface CapacitorCookiesPlugin { + getCookies(options?: GetCookieOptions): Promise; + setCookie(options: SetCookieOptions): Promise; + deleteCookie(options: DeleteCookieOptions): Promise; + clearCookies(options: ClearCookieOptions): Promise; + clearAllCookies(): Promise; +} +interface HttpCookie { + url?: string; + key: string; + value: string; +} +interface HttpCookieMap { + [key: string]: string; +} +interface HttpCookieExtras { + path?: string; + expires?: string; +} +export type GetCookieOptions = Omit; +export type SetCookieOptions = HttpCookie & HttpCookieExtras; +export type DeleteCookieOptions = Omit; +export type ClearCookieOptions = Omit; +export declare class CapacitorCookiesPluginWeb extends WebPlugin implements CapacitorCookiesPlugin { + getCookies(): Promise; + setCookie(options: SetCookieOptions): Promise; + deleteCookie(options: DeleteCookieOptions): Promise; + clearCookies(): Promise; + clearAllCookies(): Promise; +} +export declare const CapacitorCookies: CapacitorCookiesPlugin; +/******** END COOKIES PLUGIN ********/ +/******** HTTP PLUGIN ********/ +export interface CapacitorHttpPlugin { + request(options: HttpOptions): Promise; + get(options: HttpOptions): Promise; + post(options: HttpOptions): Promise; + put(options: HttpOptions): Promise; + patch(options: HttpOptions): Promise; + delete(options: HttpOptions): Promise; +} +export type HttpResponseType = 'arraybuffer' | 'blob' | 'json' | 'text' | 'document'; +export interface HttpOptions { + url: string; + method?: string; + params?: HttpParams; + /** + * Note: On Android and iOS, data can only be a string or a JSON. + * FormData, Blob, ArrayBuffer, and other complex types are only directly supported on web + * or through enabling `CapacitorHttp` in the config and using the patched `window.fetch` or `XMLHttpRequest`. + * + * If you need to send a complex type, you should serialize the data to base64 + * and set the `headers["Content-Type"]` and `dataType` attributes accordingly. + */ + data?: any; + headers?: HttpHeaders; + /** + * How long to wait to read additional data. Resets each time new + * data is received + */ + readTimeout?: number; + /** + * How long to wait for the initial connection. + */ + connectTimeout?: number; + /** + * Sets whether automatic HTTP redirects should be disabled + */ + disableRedirects?: boolean; + /** + * Extra arguments for fetch when running on the web + */ + webFetchExtra?: RequestInit; + /** + * This is used to parse the response appropriately before returning it to + * the requestee. If the response content-type is "json", this value is ignored. + */ + responseType?: HttpResponseType; + /** + * Use this option if you need to keep the URL unencoded in certain cases + * (already encoded, azure/firebase testing, etc.). The default is _true_. + */ + shouldEncodeUrlParams?: boolean; + /** + * This is used if we've had to convert the data from a JS type that needs + * special handling in the native layer + */ + dataType?: 'file' | 'formData'; +} +export interface HttpParams { + [key: string]: string | string[]; +} +export interface HttpHeaders { + [key: string]: string; +} +export interface HttpResponse { + data: any; + status: number; + headers: HttpHeaders; + url: string; +} +/** + * Read in a Blob value and return it as a base64 string + * @param blob The blob value to convert to a base64 string + */ +export declare const readBlobAsBase64: (blob: Blob) => Promise; +/** + * Build the RequestInit object based on the options passed into the initial request + * @param options The Http plugin options + * @param extra Any extra RequestInit values + */ +export declare const buildRequestInit: (options: HttpOptions, extra?: RequestInit) => RequestInit; +export declare class CapacitorHttpPluginWeb extends WebPlugin implements CapacitorHttpPlugin { + /** + * Perform an Http request given a set of options + * @param options Options to build the HTTP request + */ + request(options: HttpOptions): Promise; + /** + * Perform an Http GET request given a set of options + * @param options Options to build the HTTP request + */ + get(options: HttpOptions): Promise; + /** + * Perform an Http POST request given a set of options + * @param options Options to build the HTTP request + */ + post(options: HttpOptions): Promise; + /** + * Perform an Http PUT request given a set of options + * @param options Options to build the HTTP request + */ + put(options: HttpOptions): Promise; + /** + * Perform an Http PATCH request given a set of options + * @param options Options to build the HTTP request + */ + patch(options: HttpOptions): Promise; + /** + * Perform an Http DELETE request given a set of options + * @param options Options to build the HTTP request + */ + delete(options: HttpOptions): Promise; +} +export declare const CapacitorHttp: CapacitorHttpPlugin; +export {}; +/******** END HTTP PLUGIN ********/ diff --git a/node_modules/@capacitor/core/types/definitions-internal.d.ts b/node_modules/@capacitor/core/types/definitions-internal.d.ts new file mode 100644 index 0000000..eb08101 --- /dev/null +++ b/node_modules/@capacitor/core/types/definitions-internal.d.ts @@ -0,0 +1,175 @@ +import type { CapacitorGlobal, PluginCallback, PluginResultData, PluginResultError } from './definitions'; +import type { CapacitorPlatformsInstance } from './platforms'; +export interface PluginHeaderMethod { + readonly name: string; + readonly rtype?: 'promise' | 'callback'; +} +export interface PluginHeader { + readonly name: string; + readonly methods: readonly PluginHeaderMethod[]; +} +/** + * Has all instance properties that are available and used + * by the native layer. The "Capacitor" interface it extends + * is the public one. + */ +export interface CapacitorInstance extends CapacitorGlobal { + /** + * Internal registry for all plugins assigned to the Capacitor global. + * Legacy Capacitor referenced this property directly, but as of v3 + * it should be an internal API. Still exporting on the Capacitor + * type, but with the deprecated JSDoc tag. + */ + Plugins: { + [pluginName: string]: { + [prop: string]: any; + }; + }; + PluginHeaders?: readonly PluginHeader[]; + /** + * Gets the WebView server urls set by the native web view. Defaults + * to "" if not running from a native platform. + */ + getServerUrl: () => string; + /** + * Low-level API to send data to the native layer. + * Prefer using `nativeCallback()` or `nativePromise()` instead. + * Returns the Callback Id. + */ + toNative?: (pluginName: string, methodName: string, options: any, storedCallback?: StoredCallback) => string; + /** + * Sends data over the bridge to the native layer. + * Returns the Callback Id. + */ + nativeCallback: (pluginName: string, methodName: string, options?: O, callback?: PluginCallback) => string; + /** + * Sends data over the bridge to the native layer and + * resolves the promise when it receives the data from + * the native implementation. + */ + nativePromise: (pluginName: string, methodName: string, options?: O) => Promise; + /** + * Low-level API used by the native layers to send + * data back to the webview runtime. + */ + fromNative?: (result: PluginResult) => void; + /** + * Low-level API for backwards compatibility. + */ + createEvent?: (eventName: string, eventData?: any) => Event; + /** + * Low-level API triggered from native implementations. + */ + triggerEvent?: (eventName: string, target: string, eventData?: any) => boolean; + handleError: (err: Error) => void; + handleWindowError: (msg: string | Event, url: string, lineNo: number, columnNo: number, err: Error) => void; + /** + * Low-level API used by the native bridge to log messages. + */ + logJs: (message: string, level: 'error' | 'warn' | 'info' | 'log') => void; + logToNative: (data: MessageCallData) => void; + logFromNative: (results: PluginResult) => void; + /** + * Low-level API used by the native bridge. + */ + withPlugin?: (pluginName: string, fn: (...args: any[]) => any) => void; +} +export interface MessageCallData { + type?: 'message'; + callbackId: string; + pluginId: string; + methodName: string; + options: any; +} +export interface ErrorCallData { + type: 'js.error'; + error: { + message: string; + url: string; + line: number; + col: number; + errorObject: string; + }; +} +export type CallData = MessageCallData | ErrorCallData; +/** + * A resulting call back from the native layer. + */ +export interface PluginResult { + callbackId?: string; + methodName?: string; + data: PluginResultData; + success: boolean; + error?: PluginResultError; + pluginId?: string; + save?: boolean; +} +/** + * Callback data kept on the client + * to be called after native response + */ +export interface StoredCallback { + callback?: PluginCallback; + resolve?: (...args: any[]) => any; + reject?: (...args: any[]) => any; +} +export interface CapacitorCustomPlatformInstance { + name: string; + plugins: { + [pluginName: string]: any; + }; +} +export interface WindowCapacitor { + Capacitor?: CapacitorInstance; + CapacitorCookiesAndroidInterface?: any; + CapacitorCookiesDescriptor?: PropertyDescriptor; + CapacitorHttpAndroidInterface?: any; + CapacitorWebFetch?: any; + CapacitorWebXMLHttpRequest?: any; + /** + * @deprecated Use `CapacitorCustomPlatform` instead + */ + CapacitorPlatforms?: CapacitorPlatformsInstance; + CapacitorCustomPlatform?: CapacitorCustomPlatformInstance; + Ionic?: { + WebView?: { + getServerBasePath?: any; + setServerBasePath?: any; + setServerAssetPath?: any; + persistServerBasePath?: any; + convertFileSrc?: any; + }; + }; + WEBVIEW_SERVER_URL?: string; + androidBridge?: { + postMessage(data: string): void; + onmessage?: (event: { + data: string; + }) => void; + }; + webkit?: { + messageHandlers?: { + bridge: { + postMessage(data: any): void; + }; + }; + }; + console?: Console; + cordova?: { + fireDocumentEvent?: (eventName: string, eventData: any) => void; + }; + dispatchEvent?: any; + document?: any; + navigator?: { + app?: { + exitApp?: () => void; + }; + }; +} +export interface CapFormDataEntry { + key: string; + value: string; + type: 'base64File' | 'string'; + contentType?: string; + fileName?: string; +} diff --git a/node_modules/@capacitor/core/types/definitions.d.ts b/node_modules/@capacitor/core/types/definitions.d.ts new file mode 100644 index 0000000..6054f14 --- /dev/null +++ b/node_modules/@capacitor/core/types/definitions.d.ts @@ -0,0 +1,96 @@ +import type { PluginRegistry } from './legacy/legacy-definitions'; +import type { CapacitorException } from './util'; +export interface CapacitorGlobal { + /** + * The Exception class used when generating plugin Exceptions + * from bridge calls. + */ + Exception: typeof CapacitorException; + /** + * Utility function to convert a file path into a usable src depending + * on the native WebView implementation value and environment. + */ + convertFileSrc: (filePath: string) => string; + /** + * Gets the name of the platform, such as `android`, `ios`, or `web`. + */ + getPlatform: () => string; + /** + * Boolean if the platform is native or not. `android` and `ios` + * would return `true`, otherwise `false`. + */ + isNativePlatform: () => boolean; + /** + * Used to check if a platform is registered and available. + */ + isPluginAvailable: (name: string) => boolean; + registerPlugin: RegisterPlugin; + /** + * Add a listener for a plugin event. + */ + addListener?: (pluginName: string, eventName: string, callback: PluginCallback) => PluginListenerHandle; + /** + * Remove a listener to a plugin event. + */ + removeListener?: (pluginName: string, callbackId: string, eventName: string, callback: PluginCallback) => void; + DEBUG?: boolean; + isLoggingEnabled?: boolean; + /** + * @deprecated Plugins should be imported instead. Deprecated in + * v3 and Capacitor.Plugins property definition will not be exported in v4. + */ + Plugins: PluginRegistry; + /** + * Called when a plugin method is not available. Defaults to console + * logging a warning. Provided for backwards compatibility. + * @deprecated Deprecated in v3, will be removed from v4 + */ + pluginMethodNoop: (target: any, key: PropertyKey, pluginName: string) => Promise; + /** + * @deprecated Use `isNativePlatform()` instead + */ + isNative?: boolean; + /** + * @deprecated Use `getPlatform()` instead + */ + platform?: string; +} +/** + * Register plugin implementations with Capacitor. + * + * This function will create and register an instance that contains the + * implementations of the plugin. + * + * Each plugin has multiple implementations, one per platform. Each + * implementation must adhere to a common interface to ensure client code + * behaves consistently across each platform. + * + * @param pluginName The unique CamelCase name of this plugin. + * @param implementations The map of plugin implementations. + */ +export type RegisterPlugin = (pluginName: string, implementations?: Readonly) => T; +/** + * A map of plugin implementations. + * + * Each key should be the lowercased platform name as recognized by Capacitor, + * e.g. 'android', 'ios', and 'web'. Each value must be an instance of a plugin + * implementation for the respective platform. + */ +export type PluginImplementations = { + [platform: string]: (() => Promise) | any; +}; +export interface Plugin { + addListener(eventName: string, listenerFunc: (...args: any[]) => any): Promise; + removeAllListeners(): Promise; +} +export type PermissionState = 'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'; +export interface PluginListenerHandle { + remove: () => Promise; +} +export interface PluginResultData { + [key: string]: any; +} +export interface PluginResultError { + message: string; +} +export type PluginCallback = (data: PluginResultData, error?: PluginResultError) => void; diff --git a/node_modules/@capacitor/core/types/global.d.ts b/node_modules/@capacitor/core/types/global.d.ts new file mode 100644 index 0000000..405b442 --- /dev/null +++ b/node_modules/@capacitor/core/types/global.d.ts @@ -0,0 +1,21 @@ +import type { WebPlugin } from './web-plugin'; +export declare const Capacitor: import("./definitions").CapacitorGlobal; +export declare const registerPlugin: import("./definitions").RegisterPlugin; +/** + * @deprecated Provided for backwards compatibility for Capacitor v2 plugins. + * Capacitor v3 plugins should import the plugin directly. This "Plugins" + * export is deprecated in v3, and will be removed in v4. + */ +export declare const Plugins: import(".").PluginRegistry; +/** + * Provided for backwards compatibility. Use the registerPlugin() API + * instead, and provide the web plugin as the "web" implmenetation. + * For example + * + * export const Example = registerPlugin('Example', { + * web: () => import('./web').then(m => new m.Example()) + * }) + * + * @deprecated Deprecated in v3, will be removed from v4. + */ +export declare const registerWebPlugin: (plugin: WebPlugin) => void; diff --git a/node_modules/@capacitor/core/types/index.d.ts b/node_modules/@capacitor/core/types/index.d.ts new file mode 100644 index 0000000..467e181 --- /dev/null +++ b/node_modules/@capacitor/core/types/index.d.ts @@ -0,0 +1,9 @@ +export type { CapacitorGlobal, PermissionState, Plugin, PluginCallback, PluginImplementations, PluginListenerHandle, PluginResultData, PluginResultError, } from './definitions'; +export { CapacitorPlatforms, addPlatform, setPlatform } from './platforms'; +export { Capacitor, registerPlugin } from './global'; +export { WebPlugin, WebPluginConfig, ListenerCallback } from './web-plugin'; +export { CapacitorCookies, CapacitorHttp, WebView, buildRequestInit, } from './core-plugins'; +export type { ClearCookieOptions, DeleteCookieOptions, SetCookieOptions, HttpHeaders, HttpOptions, HttpParams, HttpResponse, HttpResponseType, WebViewPath, WebViewPlugin, } from './core-plugins'; +export { CapacitorException, ExceptionCode } from './util'; +export { Plugins, registerWebPlugin } from './global'; +export type { CallbackID, CancellableCallback, ISODateString, PluginConfig, PluginRegistry, } from './legacy/legacy-definitions'; diff --git a/node_modules/@capacitor/core/types/legacy/legacy-definitions.d.ts b/node_modules/@capacitor/core/types/legacy/legacy-definitions.d.ts new file mode 100644 index 0000000..8eca9ce --- /dev/null +++ b/node_modules/@capacitor/core/types/legacy/legacy-definitions.d.ts @@ -0,0 +1,37 @@ +/** + * @deprecated + */ +export interface PluginRegistry { + [pluginName: string]: { + [prop: string]: any; + }; +} +/** + * @deprecated + */ +export interface PluginConfig { + id: string; + name: string; +} +/** + * @deprecated + */ +export type ISODateString = string; +/** + * @deprecated + */ +export type CallbackID = string; +/** + * CancellableCallback is a simple wrapper that a method will + * return to make it easy to cancel any repeated callback the method + * might have set up. For example: a geolocation watch. + * @deprecated + */ +export interface CancellableCallback { + /** + * The cancel function for this method + * + * @deprecated + */ + cancel: (...args: any[]) => any; +} diff --git a/node_modules/@capacitor/core/types/legacy/legacy-web-plugin-merge.d.ts b/node_modules/@capacitor/core/types/legacy/legacy-web-plugin-merge.d.ts new file mode 100644 index 0000000..c49ca11 --- /dev/null +++ b/node_modules/@capacitor/core/types/legacy/legacy-web-plugin-merge.d.ts @@ -0,0 +1,3 @@ +import type { CapacitorGlobal } from '../definitions'; +import type { WebPlugin } from '../web-plugin'; +export declare const legacyRegisterWebPlugin: (cap: CapacitorGlobal, webPlugin: WebPlugin) => void; diff --git a/node_modules/@capacitor/core/types/platforms.d.ts b/node_modules/@capacitor/core/types/platforms.d.ts new file mode 100644 index 0000000..4e11989 --- /dev/null +++ b/node_modules/@capacitor/core/types/platforms.d.ts @@ -0,0 +1,28 @@ +import type { PluginImplementations } from './definitions'; +import type { PluginHeader } from './definitions-internal'; +export interface CapacitorPlatform { + name: string; + getPlatform?(): string; + isPluginAvailable?(pluginName: string): boolean; + getPluginHeader?(pluginName: string): PluginHeader | undefined; + registerPlugin?(pluginName: string, jsImplementations: PluginImplementations): any; + isNativePlatform?(): boolean; +} +export interface CapacitorPlatformsInstance { + currentPlatform: CapacitorPlatform; + platforms: Map; + addPlatform(name: string, platform: CapacitorPlatform): void; + setPlatform(name: string): void; +} +/** + * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead + */ +export declare const CapacitorPlatforms: CapacitorPlatformsInstance; +/** + * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead + */ +export declare const addPlatform: (name: string, platform: CapacitorPlatform) => void; +/** + * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead + */ +export declare const setPlatform: (name: string) => void; diff --git a/node_modules/@capacitor/core/types/runtime.d.ts b/node_modules/@capacitor/core/types/runtime.d.ts new file mode 100644 index 0000000..969ee48 --- /dev/null +++ b/node_modules/@capacitor/core/types/runtime.d.ts @@ -0,0 +1,9 @@ +import type { CapacitorGlobal } from './definitions'; +import type { CapacitorInstance, WindowCapacitor } from './definitions-internal'; +export interface RegisteredPlugin { + readonly name: string; + readonly proxy: any; + readonly platforms: ReadonlySet; +} +export declare const createCapacitor: (win: WindowCapacitor) => CapacitorInstance; +export declare const initCapacitorGlobal: (win: any) => CapacitorGlobal; diff --git a/node_modules/@capacitor/core/types/util.d.ts b/node_modules/@capacitor/core/types/util.d.ts new file mode 100644 index 0000000..5b9647c --- /dev/null +++ b/node_modules/@capacitor/core/types/util.d.ts @@ -0,0 +1,28 @@ +import type { WindowCapacitor } from './definitions-internal'; +export declare enum ExceptionCode { + /** + * API is not implemented. + * + * This usually means the API can't be used because it is not implemented for + * the current platform. + */ + Unimplemented = "UNIMPLEMENTED", + /** + * API is not available. + * + * This means the API can't be used right now because: + * - it is currently missing a prerequisite, such as network connectivity + * - it requires a particular platform or browser version + */ + Unavailable = "UNAVAILABLE" +} +export interface ExceptionData { + [key: string]: any; +} +export declare class CapacitorException extends Error { + readonly message: string; + readonly code?: ExceptionCode; + readonly data?: ExceptionData; + constructor(message: string, code?: ExceptionCode, data?: ExceptionData); +} +export declare const getPlatformId: (win: WindowCapacitor) => 'android' | 'ios' | 'web'; diff --git a/node_modules/@capacitor/core/types/web-plugin.d.ts b/node_modules/@capacitor/core/types/web-plugin.d.ts new file mode 100644 index 0000000..5e2b1b5 --- /dev/null +++ b/node_modules/@capacitor/core/types/web-plugin.d.ts @@ -0,0 +1,48 @@ +import type { PluginListenerHandle, Plugin } from './definitions'; +import type { CapacitorException } from './util'; +/** + * Base class web plugins should extend. + */ +export declare class WebPlugin implements Plugin { + /** + * @deprecated WebPluginConfig deprecated in v3 and will be removed in v4. + */ + config?: WebPluginConfig; + protected listeners: { + [eventName: string]: ListenerCallback[]; + }; + protected windowListeners: { + [eventName: string]: WindowListenerHandle; + }; + constructor(config?: WebPluginConfig); + addListener(eventName: string, listenerFunc: ListenerCallback): Promise & PluginListenerHandle; + removeAllListeners(): Promise; + protected notifyListeners(eventName: string, data: any): void; + protected hasListeners(eventName: string): boolean; + protected registerWindowListener(windowEventName: string, pluginEventName: string): void; + protected unimplemented(msg?: string): CapacitorException; + protected unavailable(msg?: string): CapacitorException; + private removeListener; + private addWindowListener; + private removeWindowListener; +} +export type ListenerCallback = (err: any, ...args: any[]) => void; +export interface WindowListenerHandle { + registered: boolean; + windowEventName: string; + pluginEventName: string; + handler: (event: any) => void; +} +/** + * @deprecated Deprecated in v3, removing in v4. + */ +export interface WebPluginConfig { + /** + * @deprecated Deprecated in v3, removing in v4. + */ + readonly name: string; + /** + * @deprecated Deprecated in v3, removing in v4. + */ + platforms?: string[]; +} diff --git a/node_modules/@ionic/cli-framework-output/LICENSE b/node_modules/@ionic/cli-framework-output/LICENSE new file mode 100644 index 0000000..62cadf7 --- /dev/null +++ b/node_modules/@ionic/cli-framework-output/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Drifty Co + +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/@ionic/cli-framework-output/README.md b/node_modules/@ionic/cli-framework-output/README.md new file mode 100644 index 0000000..178c151 --- /dev/null +++ b/node_modules/@ionic/cli-framework-output/README.md @@ -0,0 +1 @@ +# @ionic/cli-framework-output diff --git a/node_modules/@ionic/cli-framework-output/dist/colors.d.ts b/node_modules/@ionic/cli-framework-output/dist/colors.d.ts new file mode 100644 index 0000000..eb33b06 --- /dev/null +++ b/node_modules/@ionic/cli-framework-output/dist/colors.d.ts @@ -0,0 +1,33 @@ +import { LoggerLevel } from './logger'; +export declare type ColorFunction = (...text: string[]) => string; +export declare type LoggerColors = { + [L in LoggerLevel]: ColorFunction; +}; +export interface Colors { + /** + * Used to mark text as important. Comparable to HTML's . + */ + strong: ColorFunction; + /** + * Used to mark text as less important. + */ + weak: ColorFunction; + /** + * Used to mark text as input such as commands, inputs, options, etc. + */ + input: ColorFunction; + /** + * Used to mark text as successful. + */ + success: ColorFunction; + /** + * Used to mark text as failed. + */ + failure: ColorFunction; + /** + * Used to mark text as ancillary or supportive. + */ + ancillary: ColorFunction; + log: LoggerColors; +} +export declare const NO_COLORS: Colors; diff --git a/node_modules/@ionic/cli-framework-output/dist/colors.js b/node_modules/@ionic/cli-framework-output/dist/colors.js new file mode 100644 index 0000000..60be071 --- /dev/null +++ b/node_modules/@ionic/cli-framework-output/dist/colors.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NO_COLORS = void 0; +const utils_1 = require("./utils"); +exports.NO_COLORS = Object.freeze({ + strong: utils_1.identity, + weak: utils_1.identity, + input: utils_1.identity, + success: utils_1.identity, + failure: utils_1.identity, + ancillary: utils_1.identity, + log: Object.freeze({ + DEBUG: utils_1.identity, + INFO: utils_1.identity, + WARN: utils_1.identity, + ERROR: utils_1.identity, + }), +}); diff --git a/node_modules/@ionic/cli-framework-output/dist/index.d.ts b/node_modules/@ionic/cli-framework-output/dist/index.d.ts new file mode 100644 index 0000000..78cc2e4 --- /dev/null +++ b/node_modules/@ionic/cli-framework-output/dist/index.d.ts @@ -0,0 +1,24 @@ +import { TTY_WIDTH, indent, sliceAnsi, stringWidth, stripAnsi, wordWrap } from '@ionic/utils-terminal'; +import { Logger, CreateTaggedFormatterOptions } from './logger'; +import { OutputStrategy } from './output'; +export { TTY_WIDTH, indent, sliceAnsi, stringWidth, stripAnsi, wordWrap }; +export * from './colors'; +export * from './logger'; +export * from './output'; +export * from './tasks'; +export interface CreateDefaultLoggerOptions { + /** + * Specify a custom output strategy to use for the logger. + * + * By default, the logger uses a output strategy with process.stdout and no colors. + */ + output?: OutputStrategy; + /** + * Specify custom logger formatter options. + */ + formatterOptions?: CreateTaggedFormatterOptions; +} +/** + * Creates a logger instance with good defaults. + */ +export declare function createDefaultLogger({ output, formatterOptions }?: CreateDefaultLoggerOptions): Logger; diff --git a/node_modules/@ionic/cli-framework-output/dist/index.js b/node_modules/@ionic/cli-framework-output/dist/index.js new file mode 100644 index 0000000..017bc65 --- /dev/null +++ b/node_modules/@ionic/cli-framework-output/dist/index.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDefaultLogger = exports.wordWrap = exports.stripAnsi = exports.stringWidth = exports.sliceAnsi = exports.indent = exports.TTY_WIDTH = void 0; +const tslib_1 = require("tslib"); +const utils_terminal_1 = require("@ionic/utils-terminal"); +Object.defineProperty(exports, "TTY_WIDTH", { enumerable: true, get: function () { return utils_terminal_1.TTY_WIDTH; } }); +Object.defineProperty(exports, "indent", { enumerable: true, get: function () { return utils_terminal_1.indent; } }); +Object.defineProperty(exports, "sliceAnsi", { enumerable: true, get: function () { return utils_terminal_1.sliceAnsi; } }); +Object.defineProperty(exports, "stringWidth", { enumerable: true, get: function () { return utils_terminal_1.stringWidth; } }); +Object.defineProperty(exports, "stripAnsi", { enumerable: true, get: function () { return utils_terminal_1.stripAnsi; } }); +Object.defineProperty(exports, "wordWrap", { enumerable: true, get: function () { return utils_terminal_1.wordWrap; } }); +const colors_1 = require("./colors"); +const logger_1 = require("./logger"); +const output_1 = require("./output"); +tslib_1.__exportStar(require("./colors"), exports); +tslib_1.__exportStar(require("./logger"), exports); +tslib_1.__exportStar(require("./output"), exports); +tslib_1.__exportStar(require("./tasks"), exports); +/** + * Creates a logger instance with good defaults. + */ +function createDefaultLogger({ output = new output_1.StreamOutputStrategy({ colors: colors_1.NO_COLORS, stream: process.stdout }), formatterOptions } = {}) { + const { weak } = output.colors; + const prefix = process.argv.includes('--log-timestamps') ? () => `${weak('[' + new Date().toISOString() + ']')}` : ''; + const formatter = (0, logger_1.createTaggedFormatter)({ colors: output.colors, prefix, titleize: true, wrap: true, ...formatterOptions }); + const handlers = new Set([new logger_1.StreamHandler({ stream: output.stream, formatter })]); + return new logger_1.Logger({ handlers }); +} +exports.createDefaultLogger = createDefaultLogger; diff --git a/node_modules/@ionic/cli-framework-output/dist/logger.d.ts b/node_modules/@ionic/cli-framework-output/dist/logger.d.ts new file mode 100644 index 0000000..4d2aebf --- /dev/null +++ b/node_modules/@ionic/cli-framework-output/dist/logger.d.ts @@ -0,0 +1,105 @@ +/// +import { WordWrapOptions } from '@ionic/utils-terminal'; +import { ColorFunction, Colors } from './colors'; +export interface LogRecord { + msg: string; + logger: Logger; + level?: LoggerLevelWeight; + format?: boolean; +} +export declare type LoggerLevel = 'DEBUG' | 'INFO' | 'WARN' | 'ERROR'; +export declare type LoggerLevelWeight = number; +export declare type LoggerFormatter = (record: LogRecord) => string; +export declare const LOGGER_LEVELS: { + readonly [L in LoggerLevel]: LoggerLevelWeight; +}; +export declare const LOGGER_LEVEL_NAMES: ReadonlyMap; +export declare function getLoggerLevelName(level?: LoggerLevelWeight): LoggerLevel | undefined; +export declare function getLoggerLevelColor(colors: Colors, level?: LoggerLevelWeight): ColorFunction | undefined; +export interface LoggerHandler { + formatter?: LoggerFormatter; + clone(): LoggerHandler; + handle(record: LogRecord): void; +} +export interface StreamHandlerOptions { + readonly stream: NodeJS.WritableStream; + readonly filter?: (record: LogRecord) => boolean; + readonly formatter?: LoggerFormatter; +} +export declare class StreamHandler implements LoggerHandler { + readonly stream: NodeJS.WritableStream; + readonly filter?: (record: LogRecord) => boolean; + formatter?: LoggerFormatter; + constructor({ stream, filter, formatter }: StreamHandlerOptions); + clone(opts?: Partial): StreamHandler; + handle(record: LogRecord): void; +} +export declare const DEFAULT_LOGGER_HANDLERS: ReadonlySet; +export interface LoggerOptions { + readonly handlers?: Set; + readonly level?: LoggerLevelWeight; +} +export declare class Logger { + handlers: Set; + level: LoggerLevelWeight; + constructor({ level, handlers }?: LoggerOptions); + static cloneHandlers(handlers: ReadonlySet): Set; + /** + * Clone this logger, optionally overriding logger options. + * + * @param opts Logger options to override from this logger. + */ + clone(opts?: Partial): Logger; + /** + * Log a message as-is. + * + * @param msg The string to log. + */ + msg(msg: string): void; + /** + * Log a message using the `debug` logger level. + * + * @param msg The string to log. + */ + debug(msg: string): void; + /** + * Log a message using the `info` logger level. + * + * @param msg The string to log. + */ + info(msg: string): void; + /** + * Log a message using the `warn` logger level. + * + * @param msg The string to log. + */ + warn(msg: string): void; + /** + * Log a message using the `error` logger level. + * + * @param msg The string to log. + */ + error(msg: string): void; + createRecord(msg: string, level?: LoggerLevelWeight, format?: boolean): LogRecord; + /** + * Log newlines using a logger output found via `level`. + * + * @param num The number of newlines to log. + * @param level The logger level. If omitted, the default output is used. + */ + nl(num?: number, level?: LoggerLevelWeight): void; + /** + * Log a record using a logger output found via `level`. + */ + log(record: LogRecord): void; + createWriteStream(level?: LoggerLevelWeight, format?: boolean): NodeJS.WritableStream; +} +export interface CreateTaggedFormatterOptions { + prefix?: string | (() => string); + titleize?: boolean; + wrap?: boolean | WordWrapOptions; + colors?: Colors; + tags?: ReadonlyMap; +} +export declare function createTaggedFormatter({ colors, prefix, tags, titleize, wrap }?: CreateTaggedFormatterOptions): LoggerFormatter; +export declare function createPrefixedFormatter(prefix: string | (() => string)): LoggerFormatter; diff --git a/node_modules/@ionic/cli-framework-output/dist/logger.js b/node_modules/@ionic/cli-framework-output/dist/logger.js new file mode 100644 index 0000000..19f5be3 --- /dev/null +++ b/node_modules/@ionic/cli-framework-output/dist/logger.js @@ -0,0 +1,203 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createPrefixedFormatter = exports.createTaggedFormatter = exports.Logger = exports.DEFAULT_LOGGER_HANDLERS = exports.StreamHandler = exports.getLoggerLevelColor = exports.getLoggerLevelName = exports.LOGGER_LEVEL_NAMES = exports.LOGGER_LEVELS = void 0; +const tslib_1 = require("tslib"); +const utils_terminal_1 = require("@ionic/utils-terminal"); +const stream_1 = require("stream"); +const util = tslib_1.__importStar(require("util")); +const colors_1 = require("./colors"); +const utils_1 = require("./utils"); +exports.LOGGER_LEVELS = Object.freeze({ + DEBUG: 10, + INFO: 20, + WARN: 30, + ERROR: 40, +}); +exports.LOGGER_LEVEL_NAMES = new Map([ + [exports.LOGGER_LEVELS.DEBUG, 'DEBUG'], + [exports.LOGGER_LEVELS.INFO, 'INFO'], + [exports.LOGGER_LEVELS.WARN, 'WARN'], + [exports.LOGGER_LEVELS.ERROR, 'ERROR'], +]); +function getLoggerLevelName(level) { + if (level) { + const levelName = exports.LOGGER_LEVEL_NAMES.get(level); + if (levelName) { + return levelName; + } + } +} +exports.getLoggerLevelName = getLoggerLevelName; +function getLoggerLevelColor(colors, level) { + const levelName = getLoggerLevelName(level); + if (levelName) { + return colors.log[levelName]; + } +} +exports.getLoggerLevelColor = getLoggerLevelColor; +class StreamHandler { + constructor({ stream, filter, formatter }) { + this.stream = stream; + this.filter = filter; + this.formatter = formatter; + } + clone(opts) { + const { stream, filter, formatter } = this; + return new StreamHandler({ stream, filter, formatter, ...opts }); + } + handle(record) { + if (this.filter && !this.filter(record)) { + return; + } + const msg = this.formatter && record.format !== false ? this.formatter(record) : record.msg; + this.stream.write((0, utils_1.enforceLF)(msg)); + } +} +exports.StreamHandler = StreamHandler; +const stdoutLogRecordFilter = (record) => !record.level || record.level === exports.LOGGER_LEVELS.INFO; +const stderrLogRecordFilter = (record) => !!record.level && record.level !== exports.LOGGER_LEVELS.INFO; +exports.DEFAULT_LOGGER_HANDLERS = new Set([ + new StreamHandler({ stream: process.stdout, filter: stdoutLogRecordFilter }), + new StreamHandler({ stream: process.stderr, filter: stderrLogRecordFilter }), +]); +class Logger { + constructor({ level = exports.LOGGER_LEVELS.INFO, handlers } = {}) { + this.level = level; + this.handlers = handlers ? handlers : Logger.cloneHandlers(exports.DEFAULT_LOGGER_HANDLERS); + } + static cloneHandlers(handlers) { + return new Set([...handlers].map(handler => handler.clone())); + } + /** + * Clone this logger, optionally overriding logger options. + * + * @param opts Logger options to override from this logger. + */ + clone(opts = {}) { + const { level, handlers } = this; + return new Logger({ level, handlers: Logger.cloneHandlers(handlers), ...opts }); + } + /** + * Log a message as-is. + * + * @param msg The string to log. + */ + msg(msg) { + this.log(this.createRecord(msg)); + } + /** + * Log a message using the `debug` logger level. + * + * @param msg The string to log. + */ + debug(msg) { + this.log(this.createRecord(msg, exports.LOGGER_LEVELS.DEBUG)); + } + /** + * Log a message using the `info` logger level. + * + * @param msg The string to log. + */ + info(msg) { + this.log(this.createRecord(msg, exports.LOGGER_LEVELS.INFO)); + } + /** + * Log a message using the `warn` logger level. + * + * @param msg The string to log. + */ + warn(msg) { + this.log(this.createRecord(msg, exports.LOGGER_LEVELS.WARN)); + } + /** + * Log a message using the `error` logger level. + * + * @param msg The string to log. + */ + error(msg) { + this.log(this.createRecord(msg, exports.LOGGER_LEVELS.ERROR)); + } + createRecord(msg, level, format) { + return { + // If the logger is used to quickly print something, let's pretty-print + // it into a string. + msg: util.format(msg), + level, + logger: this, + format, + }; + } + /** + * Log newlines using a logger output found via `level`. + * + * @param num The number of newlines to log. + * @param level The logger level. If omitted, the default output is used. + */ + nl(num = 1, level) { + this.log({ ...this.createRecord('\n'.repeat(num), level), format: false }); + } + /** + * Log a record using a logger output found via `level`. + */ + log(record) { + if (typeof record.level === 'number' && this.level > record.level) { + return; + } + for (const handler of this.handlers) { + handler.handle(record); + } + } + createWriteStream(level, format) { + const self = this; + return new class extends stream_1.Writable { + _write(chunk, encoding, callback) { + self.log(self.createRecord(chunk.toString(), level, format)); + callback(); + } + }(); + } +} +exports.Logger = Logger; +function createTaggedFormatter({ colors = colors_1.NO_COLORS, prefix = '', tags, titleize, wrap } = {}) { + const { strong, weak } = colors; + const getLevelTag = (level) => { + if (!level) { + return ''; + } + if (tags) { + const tag = tags.get(level); + return tag ? tag : ''; + } + const levelName = getLoggerLevelName(level); + if (!levelName) { + return ''; + } + const levelColor = getLoggerLevelColor(colors, level); + return `${weak('[')}\x1b[40m${strong(levelColor ? levelColor(levelName) : levelName)}\x1b[49m${weak(']')}`; + }; + return ({ msg, level, format }) => { + if (format === false) { + return msg; + } + const [firstLine, ...lines] = msg.split('\n'); + const levelColor = getLoggerLevelColor(colors, level); + const tag = (typeof prefix === 'function' ? prefix() : prefix) + getLevelTag(level); + const title = titleize && lines.length > 0 ? `${strong(levelColor ? levelColor(firstLine) : firstLine)}\n` : firstLine; + const indentation = tag ? (0, utils_terminal_1.stringWidth)(tag) + 1 : 0; + const pulledLines = titleize ? (0, utils_1.dropWhile)(lines, l => l === '') : lines; + return ((tag ? `${tag} ` : '') + + (wrap + ? (0, utils_terminal_1.wordWrap)([title, ...pulledLines].join('\n'), { indentation, ...(typeof wrap === 'object' ? wrap : {}) }) + : [title, ...pulledLines.map(l => l ? ' '.repeat(indentation) + l : '')].join('\n'))); + }; +} +exports.createTaggedFormatter = createTaggedFormatter; +function createPrefixedFormatter(prefix) { + return ({ msg, format }) => { + if (format === false) { + return msg; + } + return `${typeof prefix === 'function' ? prefix() : prefix} ${msg}`; + }; +} +exports.createPrefixedFormatter = createPrefixedFormatter; diff --git a/node_modules/@ionic/cli-framework-output/dist/output.d.ts b/node_modules/@ionic/cli-framework-output/dist/output.d.ts new file mode 100644 index 0000000..954cce8 --- /dev/null +++ b/node_modules/@ionic/cli-framework-output/dist/output.d.ts @@ -0,0 +1,41 @@ +/// +/// +import { Colors } from './colors'; +import { TaskChain } from './tasks'; +export interface OutputStrategy { + readonly stream: NodeJS.WritableStream; + readonly colors: Colors; + write(msg: string): boolean; + createTaskChain(): TaskChain; +} +export interface StreamOutputStrategyOptions { + readonly stream?: NodeJS.WritableStream; + readonly colors?: Colors; +} +export declare class StreamOutputStrategy implements OutputStrategy { + readonly stream: NodeJS.WritableStream; + readonly colors: Colors; + constructor({ stream, colors }: StreamOutputStrategyOptions); + write(msg: string): boolean; + createTaskChain(): TaskChain; +} +export interface TTYOutputStrategyOptions extends StreamOutputStrategyOptions { + readonly stream?: NodeJS.WriteStream; +} +export declare class TTYOutputStrategy extends StreamOutputStrategy implements OutputStrategy { + readonly stream: NodeJS.WriteStream; + protected readonly redrawer: TTYOutputRedrawer; + constructor({ stream, colors }?: TTYOutputStrategyOptions); + createTaskChain(): TaskChain; +} +export interface TTYOutputRedrawerOptions { + readonly stream?: NodeJS.WriteStream; +} +export declare class TTYOutputRedrawer { + readonly stream: NodeJS.WriteStream; + constructor({ stream }: TTYOutputRedrawerOptions); + get width(): number; + redraw(msg: string): void; + clear(): void; + end(): void; +} diff --git a/node_modules/@ionic/cli-framework-output/dist/output.js b/node_modules/@ionic/cli-framework-output/dist/output.js new file mode 100644 index 0000000..5ad1109 --- /dev/null +++ b/node_modules/@ionic/cli-framework-output/dist/output.js @@ -0,0 +1,86 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TTYOutputRedrawer = exports.TTYOutputStrategy = exports.StreamOutputStrategy = void 0; +const utils_terminal_1 = require("@ionic/utils-terminal"); +const colors_1 = require("./colors"); +const tasks_1 = require("./tasks"); +const utils_1 = require("./utils"); +class StreamOutputStrategy { + constructor({ stream = process.stdout, colors = colors_1.NO_COLORS }) { + this.stream = stream; + this.colors = colors; + } + write(msg) { + return this.stream.write(msg); + } + createTaskChain() { + const { failure, success, weak } = this.colors; + const chain = new tasks_1.TaskChain(); + chain.on('next', task => { + task.on('end', result => { + if (result.success) { + this.write(`${success(tasks_1.ICON_SUCCESS)} ${task.msg} ${weak(`in ${(0, utils_1.formatHrTime)(result.elapsedTime)}`)}\n`); + } + else { + this.write(`${failure(tasks_1.ICON_FAILURE)} ${task.msg} ${failure(weak('- failed!'))}\n`); + } + }); + }); + return chain; + } +} +exports.StreamOutputStrategy = StreamOutputStrategy; +class TTYOutputStrategy extends StreamOutputStrategy { + constructor({ stream = process.stdout, colors = colors_1.NO_COLORS } = {}) { + super({ stream, colors }); + this.stream = stream; + this.redrawer = new TTYOutputRedrawer({ stream }); + } + createTaskChain() { + const { failure, strong, success, weak } = this.colors; + const chain = new tasks_1.TaskChain({ taskOptions: { tickInterval: 50 } }); + chain.on('next', task => { + task.on('end', result => { + if (result.success) { + this.write(`${success(tasks_1.ICON_SUCCESS)} ${task.msg} ${weak(`in ${(0, utils_1.formatHrTime)(result.elapsedTime)}`)}\n`); + } + else { + this.write(`${failure(tasks_1.ICON_FAILURE)} ${task.msg} ${failure(weak('- failed!'))}\n`); + } + }); + const spinner = new tasks_1.Spinner(); + task.on('tick', () => { + const progress = task.progressRatio ? (task.progressRatio * 100).toFixed(2) : ''; + const frame = spinner.frame(); + this.redrawer.redraw(`${strong(frame)} ${task.msg}${progress ? ' (' + strong(String(progress) + '%') + ')' : ''} `); + }); + task.on('clear', () => { + this.redrawer.clear(); + }); + }); + chain.on('end', () => { + this.redrawer.end(); + }); + return chain; + } +} +exports.TTYOutputStrategy = TTYOutputStrategy; +class TTYOutputRedrawer { + constructor({ stream = process.stdout }) { + this.stream = stream; + } + get width() { + return this.stream.columns || 80; + } + redraw(msg) { + utils_terminal_1.Cursor.hide(); + this.stream.write(utils_terminal_1.EscapeCode.eraseLines(1) + msg.replace(/[\r\n]+$/, '')); + } + clear() { + this.stream.write(utils_terminal_1.EscapeCode.eraseLines(1)); + } + end() { + utils_terminal_1.Cursor.show(); + } +} +exports.TTYOutputRedrawer = TTYOutputRedrawer; diff --git a/node_modules/@ionic/cli-framework-output/dist/tasks.d.ts b/node_modules/@ionic/cli-framework-output/dist/tasks.d.ts new file mode 100644 index 0000000..3ce8b89 --- /dev/null +++ b/node_modules/@ionic/cli-framework-output/dist/tasks.d.ts @@ -0,0 +1,79 @@ +/// +/// +import { EventEmitter } from 'events'; +export declare const ICON_SUCCESS: string; +export declare const ICON_FAILURE: string; +export declare class Spinner { + frames: string[]; + i: number; + constructor(frames?: string[]); + frame(): string; +} +export interface TaskOptions { + readonly msg?: string; + readonly tickInterval?: number; +} +export interface TaskResult { + /** + * Elapsed time from process.hrtime() + */ + elapsedTime: [number, number]; + /** + * Whether the task succeeded or not + */ + success: boolean; +} +export interface Task extends EventEmitter { + on(name: 'success', handler: () => void): this; + on(name: 'failure', handler: () => void): this; + on(name: 'clear', handler: () => void): this; + on(name: 'tick', handler: () => void): this; + on(name: 'end', handler: (result: TaskResult) => void): this; + emit(name: 'success'): boolean; + emit(name: 'failure'): boolean; + emit(name: 'clear'): boolean; + emit(name: 'tick'): boolean; + emit(name: 'end', result: TaskResult): boolean; +} +export declare class Task extends EventEmitter { + tickInterval?: number; + intervalId?: NodeJS.Timer; + running: boolean; + progressRatio?: number; + protected _msg: string; + protected _startTime?: [number, number]; + protected _success: boolean; + constructor({ msg, tickInterval }?: TaskOptions); + get msg(): string; + set msg(msg: string); + start(): this; + tick(): this; + progress(prog: number, total: number): this; + clear(): this; + end(): this; + succeed(): this; + fail(): this; +} +export interface TaskChain extends EventEmitter { + on(name: 'end', handler: (lastTask?: Task) => void): this; + on(name: 'failure', handler: (failedTask?: Task) => void): this; + on(name: 'next', handler: (task: Task) => void): this; + emit(name: 'end', lastTask?: Task): boolean; + emit(name: 'failure', failedTask?: Task): boolean; + emit(name: 'next', task: Task): boolean; +} +export interface TaskChainOptions { + readonly taskOptions?: Partial; +} +export declare class TaskChain extends EventEmitter { + protected current?: Task; + protected readonly tasks: Task[]; + protected readonly taskOptions: Partial; + constructor({ taskOptions }?: TaskChainOptions); + next(msg: string): Task; + createTask(options: TaskOptions): Task; + nextTask(task: Task): Task; + end(): this; + fail(): this; + cleanup(): this; +} diff --git a/node_modules/@ionic/cli-framework-output/dist/tasks.js b/node_modules/@ionic/cli-framework-output/dist/tasks.js new file mode 100644 index 0000000..21f323e --- /dev/null +++ b/node_modules/@ionic/cli-framework-output/dist/tasks.js @@ -0,0 +1,141 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TaskChain = exports.Task = exports.Spinner = exports.ICON_FAILURE = exports.ICON_SUCCESS = void 0; +const events_1 = require("events"); +const isWindows = process.platform === 'win32'; +exports.ICON_SUCCESS = isWindows ? '√' : '✔'; +exports.ICON_FAILURE = isWindows ? '×' : '✖'; +const SPINNER_FRAMES = isWindows ? + ['-', '\\', '|', '/'] : + ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']; +class Spinner { + constructor(frames = SPINNER_FRAMES) { + this.frames = frames; + this.i = 0; + } + frame() { + return this.frames[this.i = ++this.i % this.frames.length]; + } +} +exports.Spinner = Spinner; +class Task extends events_1.EventEmitter { + constructor({ msg = '', tickInterval } = {}) { + super(); + this.running = false; + this._msg = ''; + this._success = false; + this.msg = msg; + this.tickInterval = tickInterval; + } + get msg() { + return this._msg; + } + set msg(msg) { + this._msg = msg; + this.tick(); + } + start() { + if (!this.running && this.tickInterval) { + this.intervalId = setInterval(() => { this.tick(); }, this.tickInterval); + } + this.running = true; + this._startTime = process.hrtime(); + return this; + } + tick() { + this.emit('tick'); + return this; + } + progress(prog, total) { + this.progressRatio = prog / total; + this.tick(); + return this; + } + clear() { + if (this.intervalId) { + clearInterval(this.intervalId); + this.intervalId = undefined; + } + this.emit('clear'); + return this; + } + end() { + this.running = false; + this.tick(); + this.clear(); + this.emit('end', { + elapsedTime: process.hrtime(this._startTime), + success: this._success, + }); + return this; + } + succeed() { + if (this.running) { + this._success = true; + this.end(); + this.emit('success'); + } + return this; + } + fail() { + if (this.running) { + this._success = false; + this.end(); + this.emit('failure'); + } + return this; + } +} +exports.Task = Task; +class TaskChain extends events_1.EventEmitter { + constructor({ taskOptions = {} } = {}) { + super(); + this.tasks = []; + this.taskOptions = taskOptions; + } + next(msg) { + return this.nextTask(this.createTask({ msg, ...this.taskOptions })); + } + createTask(options) { + return new Task(options); + } + nextTask(task) { + if (this.current) { + this.current.succeed(); + } + this.tasks.push(task); + this.current = task; + task.start(); + this.emit('next', task); + return task; + } + end() { + const task = this.current; + if (task) { + task.succeed(); + } + this.current = undefined; + this.emit('end', task); + return this; + } + fail() { + const task = this.current; + if (task) { + task.fail(); + } + this.emit('failure', task); + return this; + } + cleanup() { + for (const task of this.tasks) { + if (task.running) { + task.fail(); + } + else { + task.clear(); + } + } + return this; + } +} +exports.TaskChain = TaskChain; diff --git a/node_modules/@ionic/cli-framework-output/dist/utils.d.ts b/node_modules/@ionic/cli-framework-output/dist/utils.d.ts new file mode 100644 index 0000000..9aa60df --- /dev/null +++ b/node_modules/@ionic/cli-framework-output/dist/utils.d.ts @@ -0,0 +1,4 @@ +export declare function identity(v: T): T; +export declare function enforceLF(str: string): string; +export declare function dropWhile(array: readonly T[], predicate?: (item: T) => boolean): T[]; +export declare function formatHrTime(hrtime: [number, number]): string; diff --git a/node_modules/@ionic/cli-framework-output/dist/utils.js b/node_modules/@ionic/cli-framework-output/dist/utils.js new file mode 100644 index 0000000..7cf77aa --- /dev/null +++ b/node_modules/@ionic/cli-framework-output/dist/utils.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.formatHrTime = exports.dropWhile = exports.enforceLF = exports.identity = void 0; +function identity(v) { + return v; +} +exports.identity = identity; +function enforceLF(str) { + return str.match(/[\r\n]$/) ? str : str + '\n'; +} +exports.enforceLF = enforceLF; +function dropWhile(array, predicate = v => !!v) { + let done = false; + return array.filter(item => { + if (done) { + return true; + } + if (predicate(item)) { + return false; + } + else { + done = true; + return true; + } + }); +} +exports.dropWhile = dropWhile; +const TIME_UNITS = ['s', 'ms', 'μs']; +function formatHrTime(hrtime) { + let time = hrtime[0] + hrtime[1] / 1e9; + let index = 0; + for (; index < TIME_UNITS.length - 1; index++, time *= 1000) { + if (time >= 1) { + break; + } + } + return time.toFixed(2) + TIME_UNITS[index]; +} +exports.formatHrTime = formatHrTime; diff --git a/node_modules/@ionic/cli-framework-output/package.json b/node_modules/@ionic/cli-framework-output/package.json new file mode 100644 index 0000000..76bab15 --- /dev/null +++ b/node_modules/@ionic/cli-framework-output/package.json @@ -0,0 +1,50 @@ +{ + "name": "@ionic/cli-framework-output", + "version": "2.2.8", + "description": "The log/tasks/spinners portion of Ionic CLI Framework", + "homepage": "https://ionicframework.com/", + "author": "Ionic Team (https://ionicframework.com)", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "engines": { + "node": ">=16.0.0" + }, + "files": [ + "dist/", + "LICENSE", + "README.md" + ], + "repository": { + "type": "git", + "url": "https://github.com/ionic-team/ionic-cli.git" + }, + "bugs": { + "url": "https://github.com/ionic-team/ionic-cli/issues" + }, + "scripts": { + "clean": "rimraf dist", + "lint": "true", + "build": "npm run clean && tsc", + "watch": "tsc -w --preserveWatchOutput", + "test": "jest --maxWorkers=4", + "prepublishOnly": "npm run build" + }, + "license": "MIT", + "dependencies": { + "@ionic/utils-terminal": "2.3.5", + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "devDependencies": { + "@ionic/utils-stream": "3.1.7", + "@types/debug": "^4.1.1", + "@types/inquirer": "0.0.43", + "@types/jest": "^26.0.10", + "@types/node": "~16.0.0", + "jest": "^26.4.2", + "jest-cli": "^26.0.1", + "lint-staged": "^10.0.2", + "ts-jest": "~26.3.0", + "typescript": "~4.8.0" + } +} diff --git a/node_modules/@ionic/utils-array/CHANGELOG.md b/node_modules/@ionic/utils-array/CHANGELOG.md new file mode 100644 index 0000000..18837bc --- /dev/null +++ b/node_modules/@ionic/utils-array/CHANGELOG.md @@ -0,0 +1,185 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [2.1.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@2.1.5...@ionic/utils-array@2.1.6) (2023-03-29) + +**Note:** Version bump only for package @ionic/utils-array + + + + + +## [2.1.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@2.1.4...@ionic/utils-array@2.1.5) (2020-08-28) + +**Note:** Version bump only for package @ionic/utils-array + + + + + +## [2.1.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@2.1.3...@ionic/utils-array@2.1.4) (2020-08-25) + +**Note:** Version bump only for package @ionic/utils-array + + + + + +## [2.1.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@2.1.2...@ionic/utils-array@2.1.3) (2020-05-12) + + +### Bug Fixes + +* pin tslib to avoid "Cannot set property pathExists" error ([689e1f0](https://github.com/ionic-team/ionic-cli/commit/689e1f038b907356ef855a067a76d4822e7072a8)) + + + + + +## [2.1.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@2.1.1...@ionic/utils-array@2.1.2) (2020-05-06) + +**Note:** Version bump only for package @ionic/utils-array + + + + + +## [2.1.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@2.1.0...@ionic/utils-array@2.1.1) (2020-03-03) + +**Note:** Version bump only for package @ionic/utils-array + + + + + +# 2.1.0 (2020-02-11) + + +### Features + +* **start:** add new list starter option ([#4315](https://github.com/ionic-team/ionic-cli/issues/4315)) ([1df44c1](https://github.com/ionic-team/ionic-cli/commit/1df44c1591f37b89f2b672857740edd6cb2aea67)) + + + + + +## [2.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@2.0.1...@ionic/utils-array@2.0.2) (2020-02-10) + +**Note:** Version bump only for package @ionic/utils-array + + + + + +## [2.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@2.0.0...@ionic/utils-array@2.0.1) (2020-02-03) + +**Note:** Version bump only for package @ionic/utils-array + + + + + +# [2.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@1.2.2...@ionic/utils-array@2.0.0) (2020-01-25) + + +### chore + +* require Node 10 ([5a47874](https://github.com/ionic-team/ionic-cli/commit/5a478746c074207b6dc96aa8771f04a606deb1ef)) + + +### BREAKING CHANGES + +* A minimum of Node.js 10.3.0 is required. + + + + + +## [1.2.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@1.2.1...@ionic/utils-array@1.2.2) (2019-12-05) + +**Note:** Version bump only for package @ionic/utils-array + + + + + +## [1.2.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@1.2.0...@ionic/utils-array@1.2.1) (2019-09-18) + +**Note:** Version bump only for package @ionic/utils-array + + + + + +# [1.2.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@1.1.1...@ionic/utils-array@1.2.0) (2019-08-28) + + +### Features + +* **replace:** add replace item in array by index function ([011ddf7](https://github.com/ionic-team/ionic-cli/commit/011ddf7)) +* **splice:** add non-mutating splice function ([758d287](https://github.com/ionic-team/ionic-cli/commit/758d287)) + + + + + +## [1.1.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@1.1.0...@ionic/utils-array@1.1.1) (2019-08-23) + +**Note:** Version bump only for package @ionic/utils-array + + + + + +# [1.1.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@1.0.2...@ionic/utils-array@1.1.0) (2019-08-14) + + +### Features + +* add new `move` function ([ba8da3b](https://github.com/ionic-team/ionic-cli/commit/ba8da3b)) + + + + + +## [1.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@1.0.1...@ionic/utils-array@1.0.2) (2019-08-07) + +**Note:** Version bump only for package @ionic/utils-array + + + + + +## [1.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@1.0.0...@ionic/utils-array@1.0.1) (2019-06-05) + +**Note:** Version bump only for package @ionic/utils-array + + + + + +# [1.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-array@0.0.1...@ionic/utils-array@1.0.0) (2019-05-29) + + +### chore + +* require Node 8 ([5670e68](https://github.com/ionic-team/ionic-cli/commit/5670e68)) + + +### BREAKING CHANGES + +* A minimum of Node.js 8.9.4 is required. + + + + + + +## 0.0.1 (2019-02-27) + + + + +**Note:** Version bump only for package @ionic/utils-array diff --git a/node_modules/@ionic/utils-array/LICENSE b/node_modules/@ionic/utils-array/LICENSE new file mode 100644 index 0000000..7c5808c --- /dev/null +++ b/node_modules/@ionic/utils-array/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Drifty Co + +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/@ionic/utils-array/README.md b/node_modules/@ionic/utils-array/README.md new file mode 100644 index 0000000..f43b97c --- /dev/null +++ b/node_modules/@ionic/utils-array/README.md @@ -0,0 +1 @@ +# @ionic/utils-array diff --git a/node_modules/@ionic/utils-array/dist/index.d.ts b/node_modules/@ionic/utils-array/dist/index.d.ts new file mode 100644 index 0000000..0f7388e --- /dev/null +++ b/node_modules/@ionic/utils-array/dist/index.d.ts @@ -0,0 +1,39 @@ +export declare function conform(t?: T | T[]): T[]; +export declare function concurrentFilter(array: T[], callback: (currentValue: T) => Promise): Promise; +export declare function filter(array: T[], callback: (currentValue: T, currentIndex: number, array: readonly T[]) => Promise): Promise; +export declare function filter(array: readonly T[], callback: (currentValue: T, currentIndex: number, array: readonly T[]) => Promise): Promise; +export declare function map(array: T[], callback: (currentValue: T, currentIndex: number, array: readonly T[]) => Promise): Promise; +export declare function map(array: T[], callback: (currentValue: T, currentIndex: number, array: readonly T[]) => Promise): Promise; +export declare function map(array: readonly T[], callback: (currentValue: T, currentIndex: number, array: readonly T[]) => Promise): Promise; +export declare function map(array: readonly T[], callback: (currentValue: T, currentIndex: number, array: readonly T[]) => Promise): Promise; +export declare function reduce(array: T[], callback: (accumulator: T, currentValue: T, currentIndex: number, array: readonly T[]) => Promise): Promise; +export declare function reduce(array: T[], callback: (accumulator: T, currentValue: T, currentIndex: number, array: readonly T[]) => Promise, initialValue: T): Promise; +export declare function reduce(array: T[], callback: (accumulator: R, currentValue: T, currentIndex: number, array: readonly T[]) => Promise): Promise; +export declare function reduce(array: T[], callback: (accumulator: U, currentValue: T, currentIndex: number, array: readonly T[]) => Promise, initialValue: U): Promise; +export declare function reduce(array: readonly T[], callback: (accumulator: T, currentValue: T, currentIndex: number, array: readonly T[]) => Promise): Promise; +export declare function reduce(array: readonly T[], callback: (accumulator: T, currentValue: T, currentIndex: number, array: readonly T[]) => Promise, initialValue: T): Promise; +export declare function reduce(array: readonly T[], callback: (accumulator: R, currentValue: T, currentIndex: number, array: readonly T[]) => Promise): Promise; +export declare function reduce(array: readonly T[], callback: (accumulator: U, currentValue: T, currentIndex: number, array: readonly T[]) => Promise, initialValue: U): Promise; +/** + * Splice an array. + * + * This function will return a new array with the standard splice behavior + * applied. Unlike the standard array splice, the array of removed items is not + * returned. + */ +export declare function splice(array: readonly T[], start: number, deleteCount?: number, ...items: T[]): T[]; +/** + * Move an item in an array by index. + * + * This function will return a new array with the item in the `fromIndex` + * position moved to the `toIndex` position. If `fromIndex` or `toIndex` are + * out of bounds, the array items remain unmoved. + */ +export declare function move(array: readonly T[], fromIndex: number, toIndex: number): T[]; +/** + * Replace an item in an array by index. + * + * This function will return a new array with the item in the `index` position + * replaced with `item`. If `index` is out of bounds, the item is not replaced. + */ +export declare function replace(array: readonly T[], index: number, item: T): T[]; diff --git a/node_modules/@ionic/utils-array/dist/index.js b/node_modules/@ionic/utils-array/dist/index.js new file mode 100644 index 0000000..b4cfaa7 --- /dev/null +++ b/node_modules/@ionic/utils-array/dist/index.js @@ -0,0 +1,97 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.replace = exports.move = exports.splice = exports.reduce = exports.map = exports.filter = exports.concurrentFilter = exports.conform = void 0; +function conform(t) { + if (typeof t === 'undefined') { + return []; + } + if (!Array.isArray(t)) { + return [t]; + } + return t; +} +exports.conform = conform; +async function concurrentFilter(array, callback) { + const mapper = async (v) => [v, await callback(v)]; + const mapped = await Promise.all(array.map(mapper)); + return mapped + .filter(([, f]) => f) + .map(([v]) => v); +} +exports.concurrentFilter = concurrentFilter; +async function filter(array, callback) { + const initial = []; + return reduce(array, async (acc, v, i, arr) => { + if (await callback(v, i, arr)) { + acc.push(v); + } + return acc; + }, initial); +} +exports.filter = filter; +async function map(array, callback) { + const initial = []; + return reduce(array, async (acc, v, i, arr) => { + acc.push(await callback(v, i, arr)); + return acc; + }, initial); +} +exports.map = map; +async function reduce(array, callback, initialValue) { + const hadInitialValue = typeof initialValue === 'undefined'; + const startingIndex = hadInitialValue ? 1 : 0; + if (typeof initialValue === 'undefined') { + if (array.length === 0) { + throw new TypeError('Reduce of empty array with no initial value'); + } + initialValue = array[0]; + } + let value = initialValue; + for (let i = startingIndex; i < array.length; i++) { + const v = await callback(value, array[i], i, array); + value = v; + } + return value; +} +exports.reduce = reduce; +/** + * Splice an array. + * + * This function will return a new array with the standard splice behavior + * applied. Unlike the standard array splice, the array of removed items is not + * returned. + */ +function splice(array, start, deleteCount = array.length - start, ...items) { + const result = [...array]; + result.splice(start, deleteCount, ...items); + return result; +} +exports.splice = splice; +/** + * Move an item in an array by index. + * + * This function will return a new array with the item in the `fromIndex` + * position moved to the `toIndex` position. If `fromIndex` or `toIndex` are + * out of bounds, the array items remain unmoved. + */ +function move(array, fromIndex, toIndex) { + const element = array[fromIndex]; + if (fromIndex < 0 || toIndex < 0 || fromIndex >= array.length || toIndex >= array.length) { + return [...array]; + } + return splice(splice(array, fromIndex, 1), toIndex, 0, element); +} +exports.move = move; +/** + * Replace an item in an array by index. + * + * This function will return a new array with the item in the `index` position + * replaced with `item`. If `index` is out of bounds, the item is not replaced. + */ +function replace(array, index, item) { + if (index < 0 || index > array.length) { + return [...array]; + } + return splice(array, index, 1, item); +} +exports.replace = replace; diff --git a/node_modules/@ionic/utils-array/package.json b/node_modules/@ionic/utils-array/package.json new file mode 100644 index 0000000..a4c5452 --- /dev/null +++ b/node_modules/@ionic/utils-array/package.json @@ -0,0 +1,49 @@ +{ + "name": "@ionic/utils-array", + "version": "2.1.6", + "description": "Array utils", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "homepage": "https://ionicframework.com/", + "author": "Ionic Team (https://ionic.io)", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + }, + "files": [ + "dist/", + "LICENSE", + "README.md" + ], + "repository": { + "type": "git", + "url": "https://github.com/ionic-team/ionic-cli.git" + }, + "bugs": { + "url": "https://github.com/ionic-team/ionic-cli/issues" + }, + "scripts": { + "clean": "rimraf dist", + "lint": "true", + "build": "npm run clean && tsc", + "watch": "tsc -w --preserveWatchOutput", + "test": "jest --maxWorkers=4", + "prepublishOnly": "npm run build" + }, + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "devDependencies": { + "@types/debug": "^4.1.1", + "@types/jest": "^26.0.10", + "@types/node": "~16.0.0", + "jest": "^26.4.2", + "jest-cli": "^26.0.1", + "lint-staged": "^10.0.2", + "rimraf": "^3.0.0", + "ts-jest": "~26.3.0", + "typescript": "~4.8.0" + }, + "gitHead": "15ef6e7da4eace4fd55d16fd9508d156a4bc8203" +} diff --git a/node_modules/@ionic/utils-fs/CHANGELOG.md b/node_modules/@ionic/utils-fs/CHANGELOG.md new file mode 100644 index 0000000..872cb72 --- /dev/null +++ b/node_modules/@ionic/utils-fs/CHANGELOG.md @@ -0,0 +1,318 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [3.1.7](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@3.1.6...@ionic/utils-fs@3.1.7) (2023-03-29) + +**Note:** Version bump only for package @ionic/utils-fs + + + + + +## [3.1.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@3.1.5...@ionic/utils-fs@3.1.6) (2022-06-16) + +**Note:** Version bump only for package @ionic/utils-fs + + + + + +## [3.1.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@3.1.4...@ionic/utils-fs@3.1.5) (2020-08-28) + +**Note:** Version bump only for package @ionic/utils-fs + + + + + +## [3.1.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@3.1.3...@ionic/utils-fs@3.1.4) (2020-08-25) + +**Note:** Version bump only for package @ionic/utils-fs + + + + + +## [3.1.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@3.1.2...@ionic/utils-fs@3.1.3) (2020-05-12) + + +### Bug Fixes + +* pin tslib to avoid "Cannot set property pathExists" error ([689e1f0](https://github.com/ionic-team/ionic-cli/commit/689e1f038b907356ef855a067a76d4822e7072a8)) + + + + + +## [3.1.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@3.1.1...@ionic/utils-fs@3.1.2) (2020-05-06) + +**Note:** Version bump only for package @ionic/utils-fs + + + + + +## [3.1.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@3.1.0...@ionic/utils-fs@3.1.1) (2020-03-03) + +**Note:** Version bump only for package @ionic/utils-fs + + + + + +# 3.1.0 (2020-02-11) + + +### Features + +* **start:** add new list starter option ([#4315](https://github.com/ionic-team/ionic-cli/issues/4315)) ([1df44c1](https://github.com/ionic-team/ionic-cli/commit/1df44c1591f37b89f2b672857740edd6cb2aea67)) + + + + + +## [3.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@3.0.1...@ionic/utils-fs@3.0.2) (2020-02-10) + +**Note:** Version bump only for package @ionic/utils-fs + + + + + +## [3.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@3.0.0...@ionic/utils-fs@3.0.1) (2020-02-03) + +**Note:** Version bump only for package @ionic/utils-fs + + + + + +# [3.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@2.0.9...@ionic/utils-fs@3.0.0) (2020-01-25) + + +### chore + +* require Node 10 ([5a47874](https://github.com/ionic-team/ionic-cli/commit/5a478746c074207b6dc96aa8771f04a606deb1ef)) + + +### BREAKING CHANGES + +* A minimum of Node.js 10.3.0 is required. + + + + + +## [2.0.9](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@2.0.8...@ionic/utils-fs@2.0.9) (2019-12-05) + +**Note:** Version bump only for package @ionic/utils-fs + + + + + +## [2.0.8](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@2.0.7...@ionic/utils-fs@2.0.8) (2019-10-14) + + +### Bug Fixes + +* **fileToString:** handle ENOTDIR errors ([fab07d8](https://github.com/ionic-team/ionic-cli/commit/fab07d8c6e3d6756d633ada4c81165d11c70eb8f)) + + + + + +## [2.0.7](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@2.0.6...@ionic/utils-fs@2.0.7) (2019-09-18) + +**Note:** Version bump only for package @ionic/utils-fs + + + + + +## [2.0.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@2.0.5...@ionic/utils-fs@2.0.6) (2019-08-23) + +**Note:** Version bump only for package @ionic/utils-fs + + + + + +## [2.0.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@2.0.4...@ionic/utils-fs@2.0.5) (2019-08-14) + +**Note:** Version bump only for package @ionic/utils-fs + + + + + +## [2.0.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@2.0.3...@ionic/utils-fs@2.0.4) (2019-08-07) + +**Note:** Version bump only for package @ionic/utils-fs + + + + + +## [2.0.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@2.0.2...@ionic/utils-fs@2.0.3) (2019-06-28) + +**Note:** Version bump only for package @ionic/utils-fs + + + + + +## [2.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@2.0.1...@ionic/utils-fs@2.0.2) (2019-06-10) + +**Note:** Version bump only for package @ionic/utils-fs + + + + + +## [2.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@2.0.0...@ionic/utils-fs@2.0.1) (2019-06-05) + +**Note:** Version bump only for package @ionic/utils-fs + + + + + +# [2.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@1.2.0...@ionic/utils-fs@2.0.0) (2019-05-29) + + +### chore + +* require Node 8 ([5670e68](https://github.com/ionic-team/ionic-cli/commit/5670e68)) + + +### BREAKING CHANGES + +* A minimum of Node.js 8.9.4 is required. + + + + + + +# [1.2.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@1.1.1...@ionic/utils-fs@1.2.0) (2019-03-06) + + +### Features + +* **fs:** add `isExecutableFile` utility ([53d9626](https://github.com/ionic-team/ionic-cli/commit/53d9626)) +* **fs:** add `pathReadable`, `pathWritable`, and `pathExecutable` ([5412791](https://github.com/ionic-team/ionic-cli/commit/5412791)) + + + + + +## [1.1.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@1.1.0...@ionic/utils-fs@1.1.1) (2019-02-27) + + + + +**Note:** Version bump only for package @ionic/utils-fs + + +# [1.1.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@1.0.0...@ionic/utils-fs@1.1.0) (2019-02-15) + + +### Bug Fixes + +* **walk:** stat symlinks themselves while walking ([92f2cee](https://github.com/ionic-team/ionic-cli/commit/92f2cee)) + + +### Features + +* **fs:** `onError` option for `readdirp` and `getFileTree` ([90bcfcd](https://github.com/ionic-team/ionic-cli/commit/90bcfcd)) +* **fs:** `onFileNode` and `onDirectoryNode` options for `getFileTree` ([1858e96](https://github.com/ionic-team/ionic-cli/commit/1858e96)) +* **fs:** add `getFileTree` for creating file tree object structures ([c14b46b](https://github.com/ionic-team/ionic-cli/commit/c14b46b)) + + + + + +# [1.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@0.0.7...@ionic/utils-fs@1.0.0) (2019-01-08) + + +### Bug Fixes + +* rimraf is a full dependency ([962ad94](https://github.com/ionic-team/ionic-cli/commit/962ad94)) + + +### Features + +* switch to fs-extra ([c17d8d8](https://github.com/ionic-team/ionic-cli/commit/c17d8d8)) + + +### BREAKING CHANGES + +* `readDir`, `readDirp`, `readDirSafe` were renamed to be +consistent with fs and fs-extra. `readJsonFile` and `writeJsonFile` have +been renamed to `readJson` and `writeJson` and use the fs-extra version +directly. `isDir` was removed (use stat). `copyFile` and `copyDirectory` +were removed (use `copy`). `removeDirectory` was removed (use `remove`). + + + + + +## [0.0.7](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@0.0.6...@ionic/utils-fs@0.0.7) (2019-01-07) + + + + +**Note:** Version bump only for package @ionic/utils-fs + + +## [0.0.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@0.0.5...@ionic/utils-fs@0.0.6) (2018-12-19) + + + + +**Note:** Version bump only for package @ionic/utils-fs + + +## [0.0.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@0.0.4...@ionic/utils-fs@0.0.5) (2018-11-20) + + + + +**Note:** Version bump only for package @ionic/utils-fs + + +## [0.0.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@0.0.3...@ionic/utils-fs@0.0.4) (2018-10-31) + + + + +**Note:** Version bump only for package @ionic/utils-fs + + +## [0.0.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@0.0.2...@ionic/utils-fs@0.0.3) (2018-10-05) + + + + +**Note:** Version bump only for package @ionic/utils-fs + + +## [0.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-fs@0.0.1...@ionic/utils-fs@0.0.2) (2018-10-03) + + + + +**Note:** Version bump only for package @ionic/utils-fs + + +## 0.0.1 (2018-09-05) + + + + +**Note:** Version bump only for package @ionic/utils-fs + +# Change Log diff --git a/node_modules/@ionic/utils-fs/LICENSE b/node_modules/@ionic/utils-fs/LICENSE new file mode 100644 index 0000000..7c5808c --- /dev/null +++ b/node_modules/@ionic/utils-fs/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Drifty Co + +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/@ionic/utils-fs/README.md b/node_modules/@ionic/utils-fs/README.md new file mode 100644 index 0000000..8370453 --- /dev/null +++ b/node_modules/@ionic/utils-fs/README.md @@ -0,0 +1 @@ +# @ionic/utils-fs diff --git a/node_modules/@ionic/utils-fs/dist/index.d.ts b/node_modules/@ionic/utils-fs/dist/index.d.ts new file mode 100644 index 0000000..dc2c140 --- /dev/null +++ b/node_modules/@ionic/utils-fs/dist/index.d.ts @@ -0,0 +1,148 @@ +/// +/// +/// +import * as fs from 'fs-extra'; +import * as stream from 'stream'; +export * from 'fs-extra'; +export { stat as statSafe, readdir as readdirSafe } from './safe'; +export interface ReaddirPOptions { + /** + * Filter out items from the walk process from the final result. + * + * @return `true` to keep, otherwise the item is filtered out + */ + readonly filter?: (item: WalkerItem) => boolean; + /** + * Called whenever an error occurs during the walk process. + * + * If excluded, the function will throw an error when first encountered. + */ + readonly onError?: (err: Error) => void; + readonly walkerOptions?: WalkerOptions; +} +export declare function readdirp(dir: string, { filter, onError, walkerOptions }?: ReaddirPOptions): Promise; +export declare const enum FileType { + FILE = "file", + DIRECTORY = "directory" +} +export interface RegularFileNode { + path: string; + type: FileType.FILE; + parent: FileNode; +} +export interface DirectoryNode { + path: string; + type: FileType.DIRECTORY; + parent?: FileNode; + children: FileNode[]; +} +export declare type FileNode = RegularFileNode | DirectoryNode; +export interface GetFileTreeOptions { + /** + * Called whenever an error occurs during the walk process. + * + * If excluded, the function will throw an error when first encountered. + */ + readonly onError?: (err: Error) => void; + /** + * Called whenever a file node is added to the tree. + * + * File nodes can be supplemented by returning a new object from this + * function. + */ + readonly onFileNode?: (node: RegularFileNode) => RegularFileNode & RE; + /** + * Called whenever a directory node is added to the tree. + * + * Directory nodes can be supplemented by returning a new object from this + * function. + */ + readonly onDirectoryNode?: (node: DirectoryNode) => DirectoryNode & DE; + readonly walkerOptions?: WalkerOptions; +} +/** + * Compile and return a file tree structure. + * + * This function walks a directory structure recursively, building a nested + * object structure in memory that represents it. When finished, the root + * directory node is returned. + * + * @param dir The root directory from which to compile the file tree + */ +export declare function getFileTree(dir: string, { onError, onFileNode, onDirectoryNode, walkerOptions }?: GetFileTreeOptions): Promise; +export declare function fileToString(filePath: string): Promise; +export declare function getFileChecksum(filePath: string): Promise; +/** + * Return true and cached checksums for a file by its path. + * + * Cached checksums are stored as `.md5` files next to the original file. If + * the cache file is missing, the cached checksum is undefined. + * + * @param p The file path + * @return Promise<[true checksum, cached checksum or undefined if cache file missing]> + */ +export declare function getFileChecksums(p: string): Promise<[string, string | undefined]>; +/** + * Store a cache file containing the source file's md5 checksum hash. + * + * @param p The file path + * @param checksum The checksum. If excluded, the checksum is computed + */ +export declare function cacheFileChecksum(p: string, checksum?: string): Promise; +export declare function writeStreamToFile(stream: NodeJS.ReadableStream, destination: string): Promise; +export declare function pathAccessible(filePath: string, mode: number): Promise; +export declare function pathExists(filePath: string): Promise; +export declare function pathReadable(filePath: string): Promise; +export declare function pathWritable(filePath: string): Promise; +export declare function pathExecutable(filePath: string): Promise; +export declare function isExecutableFile(filePath: string): Promise; +/** + * Find the base directory based on the path given and a marker file to look for. + */ +export declare function findBaseDirectory(dir: string, file: string): Promise; +/** + * Generate a random file path within the computer's temporary directory. + * + * @param prefix Optionally provide a filename prefix. + */ +export declare function tmpfilepath(prefix?: string): string; +/** + * Given an absolute system path, compile an array of paths working backwards + * one directory at a time, always ending in the root directory. + * + * For example, `'/some/dir'` => `['/some/dir', '/some', '/']` + * + * @param filePath Absolute system base path. + */ +export declare function compilePaths(filePath: string): string[]; +export interface WalkerItem { + path: string; + stats: fs.Stats; +} +export interface WalkerOptions { + /** + * Filter out file paths during walk. + * + * As the file tree is walked, this function can be used to exclude files and + * directories from the final result. + * + * It can also be used to tune performance. If a subdirectory is excluded, it + * is not walked. + * + * @param p The file path. + * @return `true` to include file path, otherwise it is excluded + */ + readonly pathFilter?: (p: string) => boolean; +} +export interface Walker extends stream.Readable { + on(event: 'data', callback: (item: WalkerItem) => void): this; + on(event: string, callback: (...args: any[]) => any): this; +} +export declare class Walker extends stream.Readable { + readonly p: string; + readonly options: WalkerOptions; + readonly paths: string[]; + constructor(p: string, options?: WalkerOptions); + _read(): void; +} +export declare function walk(p: string, options?: WalkerOptions): Walker; diff --git a/node_modules/@ionic/utils-fs/dist/index.js b/node_modules/@ionic/utils-fs/dist/index.js new file mode 100644 index 0000000..1a7868e --- /dev/null +++ b/node_modules/@ionic/utils-fs/dist/index.js @@ -0,0 +1,286 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.walk = exports.Walker = exports.compilePaths = exports.tmpfilepath = exports.findBaseDirectory = exports.isExecutableFile = exports.pathExecutable = exports.pathWritable = exports.pathReadable = exports.pathExists = exports.pathAccessible = exports.writeStreamToFile = exports.cacheFileChecksum = exports.getFileChecksums = exports.getFileChecksum = exports.fileToString = exports.getFileTree = exports.readdirp = exports.readdirSafe = exports.statSafe = void 0; +const tslib_1 = require("tslib"); +const fs = require("fs-extra"); +const os = require("os"); +const path = require("path"); +const stream = require("stream"); +const safe = require("./safe"); +tslib_1.__exportStar(require("fs-extra"), exports); +var safe_1 = require("./safe"); +Object.defineProperty(exports, "statSafe", { enumerable: true, get: function () { return safe_1.stat; } }); +Object.defineProperty(exports, "readdirSafe", { enumerable: true, get: function () { return safe_1.readdir; } }); +async function readdirp(dir, { filter, onError, walkerOptions } = {}) { + return new Promise((resolve, reject) => { + const items = []; + let rs = walk(dir, walkerOptions); + if (filter) { + rs = rs.pipe(new stream.Transform({ + objectMode: true, + transform(obj, enc, cb) { + if (!filter || filter(obj)) { + this.push(obj); + } + cb(); + }, + })); + } + rs + .on('error', (err) => onError ? onError(err) : reject(err)) + .on('data', (item) => items.push(item.path)) + .on('end', () => resolve(items)); + }); +} +exports.readdirp = readdirp; +/** + * Compile and return a file tree structure. + * + * This function walks a directory structure recursively, building a nested + * object structure in memory that represents it. When finished, the root + * directory node is returned. + * + * @param dir The root directory from which to compile the file tree + */ +async function getFileTree(dir, { onError, onFileNode = n => n, onDirectoryNode = n => n, walkerOptions } = {}) { + const fileMap = new Map([]); + const getOrCreateParent = (item) => { + const parentPath = path.dirname(item.path); + const parent = fileMap.get(parentPath); + if (parent && parent.type === "directory" /* FileType.DIRECTORY */) { + return parent; + } + return onDirectoryNode({ path: parentPath, type: "directory" /* FileType.DIRECTORY */, children: [] }); + }; + const createFileNode = (item, parent) => { + const node = { path: item.path, parent }; + return item.stats.isDirectory() ? + onDirectoryNode({ ...node, type: "directory" /* FileType.DIRECTORY */, children: [] }) : + onFileNode({ ...node, type: "file" /* FileType.FILE */ }); + }; + return new Promise((resolve, reject) => { + dir = path.resolve(dir); + const rs = walk(dir, walkerOptions); + rs + .on('error', err => onError ? onError(err) : reject(err)) + .on('data', item => { + const parent = getOrCreateParent(item); + const node = createFileNode(item, parent); + parent.children.push(node); + fileMap.set(item.path, node); + fileMap.set(parent.path, parent); + }) + .on('end', () => { + const root = fileMap.get(dir); + if (!root) { + return reject(new Error('No root node found after walking directory structure.')); + } + delete root.parent; + resolve(root); + }); + }); +} +exports.getFileTree = getFileTree; +async function fileToString(filePath) { + try { + return await fs.readFile(filePath, { encoding: 'utf8' }); + } + catch (e) { + if (e.code === 'ENOENT' || e.code === 'ENOTDIR') { + return ''; + } + throw e; + } +} +exports.fileToString = fileToString; +async function getFileChecksum(filePath) { + const crypto = await Promise.resolve().then(() => require('crypto')); + return new Promise((resolve, reject) => { + const hash = crypto.createHash('md5'); + const input = fs.createReadStream(filePath); + input.on('error', (err) => { + reject(err); + }); + hash.once('readable', () => { + const fullChecksum = hash.read().toString('hex'); + resolve(fullChecksum); + }); + input.pipe(hash); + }); +} +exports.getFileChecksum = getFileChecksum; +/** + * Return true and cached checksums for a file by its path. + * + * Cached checksums are stored as `.md5` files next to the original file. If + * the cache file is missing, the cached checksum is undefined. + * + * @param p The file path + * @return Promise<[true checksum, cached checksum or undefined if cache file missing]> + */ +async function getFileChecksums(p) { + return Promise.all([ + getFileChecksum(p), + (async () => { + try { + const md5 = await fs.readFile(`${p}.md5`, { encoding: 'utf8' }); + return md5.trim(); + } + catch (e) { + if (e.code !== 'ENOENT') { + throw e; + } + } + })(), + ]); +} +exports.getFileChecksums = getFileChecksums; +/** + * Store a cache file containing the source file's md5 checksum hash. + * + * @param p The file path + * @param checksum The checksum. If excluded, the checksum is computed + */ +async function cacheFileChecksum(p, checksum) { + const md5 = await getFileChecksum(p); + await fs.writeFile(`${p}.md5`, md5, { encoding: 'utf8' }); +} +exports.cacheFileChecksum = cacheFileChecksum; +function writeStreamToFile(stream, destination) { + return new Promise((resolve, reject) => { + const dest = fs.createWriteStream(destination); + stream.pipe(dest); + dest.on('error', reject); + dest.on('finish', resolve); + }); +} +exports.writeStreamToFile = writeStreamToFile; +async function pathAccessible(filePath, mode) { + try { + await fs.access(filePath, mode); + } + catch (e) { + return false; + } + return true; +} +exports.pathAccessible = pathAccessible; +async function pathExists(filePath) { + return pathAccessible(filePath, fs.constants.F_OK); +} +exports.pathExists = pathExists; +async function pathReadable(filePath) { + return pathAccessible(filePath, fs.constants.R_OK); +} +exports.pathReadable = pathReadable; +async function pathWritable(filePath) { + return pathAccessible(filePath, fs.constants.W_OK); +} +exports.pathWritable = pathWritable; +async function pathExecutable(filePath) { + return pathAccessible(filePath, fs.constants.X_OK); +} +exports.pathExecutable = pathExecutable; +async function isExecutableFile(filePath) { + const [stats, executable] = await (Promise.all([ + safe.stat(filePath), + pathExecutable(filePath), + ])); + return !!stats && (stats.isFile() || stats.isSymbolicLink()) && executable; +} +exports.isExecutableFile = isExecutableFile; +/** + * Find the base directory based on the path given and a marker file to look for. + */ +async function findBaseDirectory(dir, file) { + if (!dir || !file) { + return; + } + for (const d of compilePaths(dir)) { + const results = await safe.readdir(d); + if (results.includes(file)) { + return d; + } + } +} +exports.findBaseDirectory = findBaseDirectory; +/** + * Generate a random file path within the computer's temporary directory. + * + * @param prefix Optionally provide a filename prefix. + */ +function tmpfilepath(prefix) { + const rn = Math.random().toString(16).substring(2, 8); + const p = path.resolve(os.tmpdir(), prefix ? `${prefix}-${rn}` : rn); + return p; +} +exports.tmpfilepath = tmpfilepath; +/** + * Given an absolute system path, compile an array of paths working backwards + * one directory at a time, always ending in the root directory. + * + * For example, `'/some/dir'` => `['/some/dir', '/some', '/']` + * + * @param filePath Absolute system base path. + */ +function compilePaths(filePath) { + filePath = path.normalize(filePath); + if (!path.isAbsolute(filePath)) { + throw new Error(`${filePath} is not an absolute path`); + } + const parsed = path.parse(filePath); + if (filePath === parsed.root) { + return [filePath]; + } + return filePath + .slice(parsed.root.length) + .split(path.sep) + .map((segment, i, array) => parsed.root + path.join(...array.slice(0, array.length - i))) + .concat(parsed.root); +} +exports.compilePaths = compilePaths; +class Walker extends stream.Readable { + constructor(p, options = {}) { + super({ objectMode: true }); + this.p = p; + this.options = options; + this.paths = [this.p]; + } + _read() { + const p = this.paths.shift(); + const { pathFilter } = this.options; + if (!p) { + this.push(null); + return; + } + fs.lstat(p, (err, stats) => { + if (err) { + this.emit('error', err); + return; + } + const item = { path: p, stats }; + if (stats.isDirectory()) { + fs.readdir(p, (err, contents) => { + if (err) { + this.emit('error', err); + return; + } + let paths = contents.map(file => path.join(p, file)); + if (pathFilter) { + paths = paths.filter(p => pathFilter(p.substring(this.p.length + 1))); + } + this.paths.push(...paths); + this.push(item); + }); + } + else { + this.push(item); + } + }); + } +} +exports.Walker = Walker; +function walk(p, options = {}) { + return new Walker(p, options); +} +exports.walk = walk; diff --git a/node_modules/@ionic/utils-fs/dist/safe.d.ts b/node_modules/@ionic/utils-fs/dist/safe.d.ts new file mode 100644 index 0000000..e891d2e --- /dev/null +++ b/node_modules/@ionic/utils-fs/dist/safe.d.ts @@ -0,0 +1,4 @@ +/// +import * as fs from 'fs-extra'; +export declare function stat(p: string): Promise; +export declare function readdir(dir: string): Promise; diff --git a/node_modules/@ionic/utils-fs/dist/safe.js b/node_modules/@ionic/utils-fs/dist/safe.js new file mode 100644 index 0000000..79befb8 --- /dev/null +++ b/node_modules/@ionic/utils-fs/dist/safe.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readdir = exports.stat = void 0; +const fs = require("fs-extra"); +async function stat(p) { + try { + return await fs.stat(p); + } + catch (e) { + // ignore + } +} +exports.stat = stat; +async function readdir(dir) { + try { + return await fs.readdir(dir); + } + catch (e) { + return []; + } +} +exports.readdir = readdir; diff --git a/node_modules/@ionic/utils-fs/package.json b/node_modules/@ionic/utils-fs/package.json new file mode 100644 index 0000000..4059cb6 --- /dev/null +++ b/node_modules/@ionic/utils-fs/package.json @@ -0,0 +1,51 @@ +{ + "name": "@ionic/utils-fs", + "version": "3.1.7", + "description": "Filesystem utils for Node", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "homepage": "https://ionicframework.com/", + "author": "Ionic Team (https://ionic.io)", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + }, + "files": [ + "dist/", + "LICENSE", + "README.md" + ], + "repository": { + "type": "git", + "url": "https://github.com/ionic-team/ionic-cli.git" + }, + "bugs": { + "url": "https://github.com/ionic-team/ionic-cli/issues" + }, + "scripts": { + "clean": "rimraf dist", + "lint": "true", + "build": "npm run clean && tsc", + "watch": "tsc -w --preserveWatchOutput", + "test": "jest --maxWorkers=4", + "prepublishOnly": "npm run build" + }, + "dependencies": { + "@types/fs-extra": "^8.0.0", + "debug": "^4.0.0", + "fs-extra": "^9.0.0", + "tslib": "^2.0.1" + }, + "devDependencies": { + "@types/debug": "^4.1.1", + "@types/jest": "^26.0.10", + "@types/node": "~16.0.0", + "jest": "^26.4.2", + "jest-cli": "^26.0.1", + "lint-staged": "^10.0.2", + "rimraf": "^3.0.0", + "ts-jest": "~26.3.0", + "typescript": "~4.8.0" + }, + "gitHead": "15ef6e7da4eace4fd55d16fd9508d156a4bc8203" +} diff --git a/node_modules/@ionic/utils-object/CHANGELOG.md b/node_modules/@ionic/utils-object/CHANGELOG.md new file mode 100644 index 0000000..c93d509 --- /dev/null +++ b/node_modules/@ionic/utils-object/CHANGELOG.md @@ -0,0 +1,170 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [2.1.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-object@2.1.5...@ionic/utils-object@2.1.6) (2023-03-29) + +**Note:** Version bump only for package @ionic/utils-object + + + + + +## [2.1.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-object@2.1.4...@ionic/utils-object@2.1.5) (2020-08-28) + +**Note:** Version bump only for package @ionic/utils-object + + + + + +## [2.1.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-object@2.1.3...@ionic/utils-object@2.1.4) (2020-08-25) + +**Note:** Version bump only for package @ionic/utils-object + + + + + +## [2.1.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-object@2.1.2...@ionic/utils-object@2.1.3) (2020-05-12) + + +### Bug Fixes + +* pin tslib to avoid "Cannot set property pathExists" error ([689e1f0](https://github.com/ionic-team/ionic-cli/commit/689e1f038b907356ef855a067a76d4822e7072a8)) + + + + + +## [2.1.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-object@2.1.1...@ionic/utils-object@2.1.2) (2020-05-06) + +**Note:** Version bump only for package @ionic/utils-object + + + + + +## [2.1.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-object@2.1.0...@ionic/utils-object@2.1.1) (2020-03-03) + +**Note:** Version bump only for package @ionic/utils-object + + + + + +# 2.1.0 (2020-02-11) + + +### Features + +* **start:** add new list starter option ([#4315](https://github.com/ionic-team/ionic-cli/issues/4315)) ([1df44c1](https://github.com/ionic-team/ionic-cli/commit/1df44c1591f37b89f2b672857740edd6cb2aea67)) + + + + + +## [2.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-object@2.0.1...@ionic/utils-object@2.0.2) (2020-02-10) + +**Note:** Version bump only for package @ionic/utils-object + + + + + +## [2.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-object@2.0.0...@ionic/utils-object@2.0.1) (2020-02-03) + +**Note:** Version bump only for package @ionic/utils-object + + + + + +# [2.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-object@1.0.6...@ionic/utils-object@2.0.0) (2020-01-25) + + +### chore + +* require Node 10 ([5a47874](https://github.com/ionic-team/ionic-cli/commit/5a478746c074207b6dc96aa8771f04a606deb1ef)) + + +### BREAKING CHANGES + +* A minimum of Node.js 10.3.0 is required. + + + + + +## [1.0.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-object@1.0.5...@ionic/utils-object@1.0.6) (2019-12-05) + +**Note:** Version bump only for package @ionic/utils-object + + + + + +## [1.0.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-object@1.0.4...@ionic/utils-object@1.0.5) (2019-09-18) + +**Note:** Version bump only for package @ionic/utils-object + + + + + +## [1.0.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-object@1.0.3...@ionic/utils-object@1.0.4) (2019-08-23) + +**Note:** Version bump only for package @ionic/utils-object + + + + + +## [1.0.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-object@1.0.2...@ionic/utils-object@1.0.3) (2019-08-14) + +**Note:** Version bump only for package @ionic/utils-object + + + + + +## [1.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-object@1.0.1...@ionic/utils-object@1.0.2) (2019-08-07) + +**Note:** Version bump only for package @ionic/utils-object + + + + + +## [1.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-object@1.0.0...@ionic/utils-object@1.0.1) (2019-06-05) + +**Note:** Version bump only for package @ionic/utils-object + + + + + +# [1.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-object@0.0.1...@ionic/utils-object@1.0.0) (2019-05-29) + + +### chore + +* require Node 8 ([5670e68](https://github.com/ionic-team/ionic-cli/commit/5670e68)) + + +### BREAKING CHANGES + +* A minimum of Node.js 8.9.4 is required. + + + + + + +## 0.0.1 (2019-02-27) + + + + +**Note:** Version bump only for package @ionic/utils-object diff --git a/node_modules/@ionic/utils-object/LICENSE b/node_modules/@ionic/utils-object/LICENSE new file mode 100644 index 0000000..7c5808c --- /dev/null +++ b/node_modules/@ionic/utils-object/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Drifty Co + +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/@ionic/utils-object/README.md b/node_modules/@ionic/utils-object/README.md new file mode 100644 index 0000000..08999f9 --- /dev/null +++ b/node_modules/@ionic/utils-object/README.md @@ -0,0 +1 @@ +# @ionic/utils-object diff --git a/node_modules/@ionic/utils-object/dist/index.d.ts b/node_modules/@ionic/utils-object/dist/index.d.ts new file mode 100644 index 0000000..cd1d061 --- /dev/null +++ b/node_modules/@ionic/utils-object/dist/index.d.ts @@ -0,0 +1,10 @@ +export declare function createCaseInsensitiveObject(): { + [key: string]: T; +}; +export declare const CaseInsensitiveProxyHandler: ProxyHandler; +export declare type AliasedMapKey = string | symbol; +export declare class AliasedMap extends Map { + getAliases(): Map; + resolveAlias(key: AliasedMapKey | K): V | undefined; + keysWithoutAliases(): K[]; +} diff --git a/node_modules/@ionic/utils-object/dist/index.js b/node_modules/@ionic/utils-object/dist/index.js new file mode 100644 index 0000000..62ccb67 --- /dev/null +++ b/node_modules/@ionic/utils-object/dist/index.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AliasedMap = exports.CaseInsensitiveProxyHandler = exports.createCaseInsensitiveObject = void 0; +function createCaseInsensitiveObject() { + return new Proxy({}, exports.CaseInsensitiveProxyHandler); +} +exports.createCaseInsensitiveObject = createCaseInsensitiveObject; +exports.CaseInsensitiveProxyHandler = { + has: (obj, prop) => { + return conformPropertyKey(prop) in obj; + }, + get: (obj, prop) => { + return obj[conformPropertyKey(prop)]; + }, + set: (obj, prop, value) => { + obj[conformPropertyKey(prop)] = value; + return true; + }, + deleteProperty: (obj, prop) => { + return delete obj[conformPropertyKey(prop)]; + }, +}; +const conformPropertyKey = (prop) => typeof prop === 'string' ? prop.toLowerCase() : prop; +class AliasedMap extends Map { + getAliases() { + const aliasmap = new Map(); + // TODO: waiting for https://github.com/Microsoft/TypeScript/issues/18562 + const aliases = [...this.entries()].filter(([, v]) => typeof v === 'string' || typeof v === 'symbol'); + aliases.forEach(([alias, cmd]) => { + const cmdaliases = aliasmap.get(cmd) || []; + cmdaliases.push(alias); + aliasmap.set(cmd, cmdaliases); + }); + return aliasmap; + } + resolveAlias(key) { + const r = this.get(key); + if (typeof r !== 'string' && typeof r !== 'symbol') { + return r; + } + return this.resolveAlias(r); + } + keysWithoutAliases() { + return [...this.entries()] + .filter((entry) => typeof entry[1] !== 'string' && typeof entry[1] !== 'symbol') + .map(([k, v]) => k); + } +} +exports.AliasedMap = AliasedMap; diff --git a/node_modules/@ionic/utils-object/package.json b/node_modules/@ionic/utils-object/package.json new file mode 100644 index 0000000..5ce07ef --- /dev/null +++ b/node_modules/@ionic/utils-object/package.json @@ -0,0 +1,49 @@ +{ + "name": "@ionic/utils-object", + "version": "2.1.6", + "description": "Object utils", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "homepage": "https://ionicframework.com/", + "author": "Ionic Team (https://ionic.io)", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + }, + "files": [ + "dist/", + "LICENSE", + "README.md" + ], + "repository": { + "type": "git", + "url": "https://github.com/ionic-team/ionic-cli.git" + }, + "bugs": { + "url": "https://github.com/ionic-team/ionic-cli/issues" + }, + "scripts": { + "clean": "rimraf dist", + "lint": "true", + "build": "npm run clean && tsc", + "watch": "tsc -w --preserveWatchOutput", + "test": "jest --maxWorkers=4", + "prepublishOnly": "npm run build" + }, + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "devDependencies": { + "@types/debug": "^4.1.1", + "@types/jest": "^26.0.10", + "@types/node": "~16.0.0", + "jest": "^26.4.2", + "jest-cli": "^26.0.1", + "lint-staged": "^10.0.2", + "rimraf": "^3.0.0", + "ts-jest": "~26.3.0", + "typescript": "~4.8.0" + }, + "gitHead": "15ef6e7da4eace4fd55d16fd9508d156a4bc8203" +} diff --git a/node_modules/@ionic/utils-process/CHANGELOG.md b/node_modules/@ionic/utils-process/CHANGELOG.md new file mode 100644 index 0000000..5dde8de --- /dev/null +++ b/node_modules/@ionic/utils-process/CHANGELOG.md @@ -0,0 +1,253 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [2.1.11](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@2.1.10...@ionic/utils-process@2.1.11) (2023-03-29) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [2.1.10](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@2.1.9...@ionic/utils-process@2.1.10) (2022-06-16) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [2.1.9](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@2.1.8...@ionic/utils-process@2.1.9) (2022-05-09) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [2.1.8](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@2.1.7...@ionic/utils-process@2.1.8) (2020-09-29) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [2.1.7](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@2.1.6...@ionic/utils-process@2.1.7) (2020-09-24) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [2.1.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@2.1.5...@ionic/utils-process@2.1.6) (2020-08-28) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [2.1.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@2.1.4...@ionic/utils-process@2.1.5) (2020-08-27) + + +### Bug Fixes + +* **onExit:** switch to signal-exit implementation ([95521e2](https://github.com/ionic-team/ionic-cli/commit/95521e2d4d47795020dc20b53bd4ce99e87e4f73)) + + + + + +## [2.1.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@2.1.3...@ionic/utils-process@2.1.4) (2020-08-25) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [2.1.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@2.1.2...@ionic/utils-process@2.1.3) (2020-05-12) + + +### Bug Fixes + +* pin tslib to avoid "Cannot set property pathExists" error ([689e1f0](https://github.com/ionic-team/ionic-cli/commit/689e1f038b907356ef855a067a76d4822e7072a8)) + + + + + +## [2.1.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@2.1.1...@ionic/utils-process@2.1.2) (2020-05-06) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [2.1.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@2.1.0...@ionic/utils-process@2.1.1) (2020-03-03) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +# 2.1.0 (2020-02-11) + + +### Features + +* **start:** add new list starter option ([#4315](https://github.com/ionic-team/ionic-cli/issues/4315)) ([1df44c1](https://github.com/ionic-team/ionic-cli/commit/1df44c1591f37b89f2b672857740edd6cb2aea67)) + + + + + +## [2.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@2.0.1...@ionic/utils-process@2.0.2) (2020-02-10) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [2.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@2.0.0...@ionic/utils-process@2.0.1) (2020-02-03) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +# [2.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@1.0.9...@ionic/utils-process@2.0.0) (2020-01-25) + + +### chore + +* require Node 10 ([5a47874](https://github.com/ionic-team/ionic-cli/commit/5a478746c074207b6dc96aa8771f04a606deb1ef)) + + +### BREAKING CHANGES + +* A minimum of Node.js 10.3.0 is required. + + + + + +## [1.0.9](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@1.0.8...@ionic/utils-process@1.0.9) (2020-01-13) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [1.0.8](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@1.0.7...@ionic/utils-process@1.0.8) (2019-12-10) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [1.0.7](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@1.0.6...@ionic/utils-process@1.0.7) (2019-12-05) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [1.0.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@1.0.5...@ionic/utils-process@1.0.6) (2019-11-21) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [1.0.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@1.0.4...@ionic/utils-process@1.0.5) (2019-09-18) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [1.0.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@1.0.3...@ionic/utils-process@1.0.4) (2019-08-23) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [1.0.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@1.0.2...@ionic/utils-process@1.0.3) (2019-08-14) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [1.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@1.0.1...@ionic/utils-process@1.0.2) (2019-08-07) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +## [1.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@1.0.0...@ionic/utils-process@1.0.1) (2019-06-05) + +**Note:** Version bump only for package @ionic/utils-process + + + + + +# [1.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@0.1.0...@ionic/utils-process@1.0.0) (2019-05-29) + + +### Bug Fixes + +* **process:** re-raise captured signals ([d82bfde](https://github.com/ionic-team/ionic-cli/commit/d82bfde)) + + +### chore + +* require Node 8 ([5670e68](https://github.com/ionic-team/ionic-cli/commit/5670e68)) + + +### BREAKING CHANGES + +* A minimum of Node.js 8.9.4 is required. + + + + + + +# [0.1.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-process@0.0.1...@ionic/utils-process@0.1.0) (2019-03-06) + + +### Features + +* **process:** add `getPathParts` to split path into parts ([7dfbbc2](https://github.com/ionic-team/ionic-cli/commit/7dfbbc2)) + + + + + +## 0.0.1 (2019-02-27) + + + + +**Note:** Version bump only for package @ionic/utils-process diff --git a/node_modules/@ionic/utils-process/LICENSE b/node_modules/@ionic/utils-process/LICENSE new file mode 100644 index 0000000..7c5808c --- /dev/null +++ b/node_modules/@ionic/utils-process/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Drifty Co + +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/@ionic/utils-process/README.md b/node_modules/@ionic/utils-process/README.md new file mode 100644 index 0000000..b4f5a77 --- /dev/null +++ b/node_modules/@ionic/utils-process/README.md @@ -0,0 +1 @@ +# @ionic/utils-process diff --git a/node_modules/@ionic/utils-process/dist/index.d.ts b/node_modules/@ionic/utils-process/dist/index.d.ts new file mode 100644 index 0000000..41e2e18 --- /dev/null +++ b/node_modules/@ionic/utils-process/dist/index.d.ts @@ -0,0 +1,63 @@ +/// +export declare const ERROR_TIMEOUT_REACHED: Error; +export declare function killProcessTree(pid: number, signal?: string | number): Promise; +/** + * Creates an alternative implementation of `process.env` object. + * + * On a Windows shell, `process.env` is a magic object that offers + * case-insensitive environment variable access. On other platforms, case + * sensitivity matters. This method creates an empty "`process.env`" object + * type that works for all platforms. + */ +export declare function createProcessEnv(...sources: { + [key: string]: string | undefined; +}[]): NodeJS.ProcessEnv; +/** + * Split a PATH string into path parts. + */ +export declare function getPathParts(envpath?: string): string[]; +/** + * Resolves when the given amount of milliseconds has passed. + */ +export declare function sleep(ms: number): Promise; +/** + * Resolves when a given predicate is true or a timeout is reached. + * + * Configure `interval` to set how often the `predicate` is called. + * + * By default, `timeout` is Infinity. If given a value (in ms), and that + * timeout value is reached, this function will reject with + * the `ERROR_TIMEOUT_REACHED` error. + */ +export declare function sleepUntil(predicate: () => boolean, { interval, timeout }: { + interval?: number; + timeout?: number; +}): Promise; +/** + * Never resolves and keeps Node running. + */ +export declare function sleepForever(): Promise; +/** + * Register a synchronous function to be called once the process exits. + */ +export declare function onExit(fn: () => void): void; +export declare type ExitFn = () => Promise; +/** + * Register an asynchronous function to be called when the process wants to + * exit. + * + * A handler will be registered for the 'SIGINT', 'SIGTERM', 'SIGHUP', + * 'SIGBREAK' signals. If any of the signal events is emitted, `fn` will be + * called exactly once, awaited upon, and then the process will exit once all + * registered functions are resolved. + */ +export declare function onBeforeExit(fn: ExitFn): void; +/** + * Remove a function that was registered with `onBeforeExit`. + */ +export declare function offBeforeExit(fn: ExitFn): void; +/** + * Asynchronous `process.exit()`, for running functions registered with + * `onBeforeExit`. + */ +export declare function processExit(exitCode?: number): Promise; diff --git a/node_modules/@ionic/utils-process/dist/index.js b/node_modules/@ionic/utils-process/dist/index.js new file mode 100644 index 0000000..270bcc7 --- /dev/null +++ b/node_modules/@ionic/utils-process/dist/index.js @@ -0,0 +1,158 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.processExit = exports.offBeforeExit = exports.onBeforeExit = exports.onExit = exports.sleepForever = exports.sleepUntil = exports.sleep = exports.getPathParts = exports.createProcessEnv = exports.killProcessTree = exports.ERROR_TIMEOUT_REACHED = void 0; +const utils_object_1 = require("@ionic/utils-object"); +const utils_terminal_1 = require("@ionic/utils-terminal"); +const Debug = require("debug"); +const pathlib = require("path"); +const onSignalExit = require("signal-exit"); +const kill = require("tree-kill"); +const debug = Debug('ionic:utils-process'); +exports.ERROR_TIMEOUT_REACHED = new Error('TIMEOUT_REACHED'); +function killProcessTree(pid, signal = 'SIGTERM') { + return new Promise((resolve, reject) => { + kill(pid, signal, err => { + if (err) { + debug('error while killing process tree for %d: %O', pid, err); + return reject(err); + } + resolve(); + }); + }); +} +exports.killProcessTree = killProcessTree; +/** + * Creates an alternative implementation of `process.env` object. + * + * On a Windows shell, `process.env` is a magic object that offers + * case-insensitive environment variable access. On other platforms, case + * sensitivity matters. This method creates an empty "`process.env`" object + * type that works for all platforms. + */ +function createProcessEnv(...sources) { + return Object.assign(utils_terminal_1.TERMINAL_INFO.windows ? (0, utils_object_1.createCaseInsensitiveObject)() : {}, ...sources); +} +exports.createProcessEnv = createProcessEnv; +/** + * Split a PATH string into path parts. + */ +function getPathParts(envpath = process.env.PATH || '') { + return envpath.split(pathlib.delimiter); +} +exports.getPathParts = getPathParts; +/** + * Resolves when the given amount of milliseconds has passed. + */ +async function sleep(ms) { + return new Promise(resolve => { + setTimeout(resolve, ms); + }); +} +exports.sleep = sleep; +/** + * Resolves when a given predicate is true or a timeout is reached. + * + * Configure `interval` to set how often the `predicate` is called. + * + * By default, `timeout` is Infinity. If given a value (in ms), and that + * timeout value is reached, this function will reject with + * the `ERROR_TIMEOUT_REACHED` error. + */ +async function sleepUntil(predicate, { interval = 30, timeout = Infinity }) { + let ms = 0; + while (!predicate()) { + await sleep(interval); + ms += interval; + if (ms > timeout) { + throw exports.ERROR_TIMEOUT_REACHED; + } + } +} +exports.sleepUntil = sleepUntil; +/** + * Never resolves and keeps Node running. + */ +async function sleepForever() { + return new Promise(() => { + setInterval(() => { }, 1000); + }); +} +exports.sleepForever = sleepForever; +/** + * Register a synchronous function to be called once the process exits. + */ +function onExit(fn) { + onSignalExit(() => { + debug('onExit: process.exit/normal shutdown'); + fn(); + }); +} +exports.onExit = onExit; +const exitFns = new Set(); +/** + * Register an asynchronous function to be called when the process wants to + * exit. + * + * A handler will be registered for the 'SIGINT', 'SIGTERM', 'SIGHUP', + * 'SIGBREAK' signals. If any of the signal events is emitted, `fn` will be + * called exactly once, awaited upon, and then the process will exit once all + * registered functions are resolved. + */ +function onBeforeExit(fn) { + exitFns.add(fn); +} +exports.onBeforeExit = onBeforeExit; +/** + * Remove a function that was registered with `onBeforeExit`. + */ +function offBeforeExit(fn) { + exitFns.delete(fn); +} +exports.offBeforeExit = offBeforeExit; +const once = (fn) => { + let called = false; + return async () => { + if (!called) { + await fn(); + called = true; + } + }; +}; +const beforeExitHandlerWrapper = (signal) => once(async () => { + debug('onBeforeExit handler: %O received', signal); + debug('onBeforeExit handler: running %O functions', exitFns.size); + await Promise.all([...exitFns.values()].map(async (fn) => { + try { + await fn(); + } + catch (e) { + debug('onBeforeExit handler: error from function: %O', e); + } + })); + if (signal !== 'process.exit') { + debug('onBeforeExit handler: killing self (exit code %O, signal %O)', process.exitCode ? process.exitCode : 0, signal); + process.removeListener(signal, BEFORE_EXIT_SIGNAL_LISTENERS[signal]); + process.kill(process.pid, signal); + } +}); +const BEFORE_EXIT_SIGNAL_LISTENERS = { + SIGINT: beforeExitHandlerWrapper('SIGINT'), + SIGTERM: beforeExitHandlerWrapper('SIGTERM'), + SIGHUP: beforeExitHandlerWrapper('SIGHUP'), + SIGBREAK: beforeExitHandlerWrapper('SIGBREAK'), +}; +for (const [signal, fn] of Object.entries(BEFORE_EXIT_SIGNAL_LISTENERS)) { + process.on(signal, fn); +} +const processExitHandler = beforeExitHandlerWrapper('process.exit'); +/** + * Asynchronous `process.exit()`, for running functions registered with + * `onBeforeExit`. + */ +async function processExit(exitCode = 0) { + process.exitCode = exitCode; + await processExitHandler(); + debug('processExit: exiting (exit code: %O)', process.exitCode); + process.exit(); +} +exports.processExit = processExit; diff --git a/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/CHANGELOG.md b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/CHANGELOG.md new file mode 100644 index 0000000..4b306df --- /dev/null +++ b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/CHANGELOG.md @@ -0,0 +1,252 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [2.3.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.3.3...@ionic/utils-terminal@2.3.4) (2023-03-29) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [2.3.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.3.2...@ionic/utils-terminal@2.3.3) (2022-06-16) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [2.3.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.3.1...@ionic/utils-terminal@2.3.2) (2022-05-09) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [2.3.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.3.0...@ionic/utils-terminal@2.3.1) (2020-09-29) + + +### Bug Fixes + +* add signal-exit dependency in correct place ([178e5e5](https://github.com/ionic-team/ionic-cli/commit/178e5e51cdc3593e3d096a5197e1dc0e17292bbd)) + + + + + +# [2.3.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.2.1...@ionic/utils-terminal@2.3.0) (2020-09-24) + + +### Features + +* **format:** add more formatting utilities ([d30f099](https://github.com/ionic-team/ionic-cli/commit/d30f099f50df18816fb1d3064c434f1b318518a2)) +* **format:** terminal prose formatting utils ([8912348](https://github.com/ionic-team/ionic-cli/commit/8912348ca348ae6192ddfff1af88f9c9443d205d)) + + + + + +## [2.2.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.2.0...@ionic/utils-terminal@2.2.1) (2020-08-28) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +# [2.2.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.1.4...@ionic/utils-terminal@2.2.0) (2020-08-27) + + +### Features + +* add some ansi escape codes + cursor wrapper ([edbdb57](https://github.com/ionic-team/ionic-cli/commit/edbdb572bfe2fb5710eff7e49a483c86601ba425)) + + + + + +## [2.1.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.1.3...@ionic/utils-terminal@2.1.4) (2020-08-25) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [2.1.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.1.2...@ionic/utils-terminal@2.1.3) (2020-05-12) + + +### Bug Fixes + +* pin tslib to avoid "Cannot set property pathExists" error ([689e1f0](https://github.com/ionic-team/ionic-cli/commit/689e1f038b907356ef855a067a76d4822e7072a8)) + + + + + +## [2.1.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.1.1...@ionic/utils-terminal@2.1.2) (2020-05-06) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [2.1.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.1.0...@ionic/utils-terminal@2.1.1) (2020-03-03) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +# 2.1.0 (2020-02-11) + + +### Features + +* **start:** add new list starter option ([#4315](https://github.com/ionic-team/ionic-cli/issues/4315)) ([1df44c1](https://github.com/ionic-team/ionic-cli/commit/1df44c1591f37b89f2b672857740edd6cb2aea67)) + + + + + +## [2.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.0.1...@ionic/utils-terminal@2.0.2) (2020-02-10) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [2.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.0.0...@ionic/utils-terminal@2.0.1) (2020-02-03) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +# [2.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.1.2...@ionic/utils-terminal@2.0.0) (2020-01-25) + + +### chore + +* require Node 10 ([5a47874](https://github.com/ionic-team/ionic-cli/commit/5a478746c074207b6dc96aa8771f04a606deb1ef)) + + +### BREAKING CHANGES + +* A minimum of Node.js 10.3.0 is required. + + + + + +## [1.1.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.1.1...@ionic/utils-terminal@1.1.2) (2019-12-10) + + +### Bug Fixes + +* **windows:** do not check TERM for windows detection ([ac4b417](https://github.com/ionic-team/ionic-cli/commit/ac4b417385c0c7859674e2ba59e495e9abc5bce4)) + + + + + +## [1.1.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.1.0...@ionic/utils-terminal@1.1.1) (2019-12-05) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +# [1.1.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.0.5...@ionic/utils-terminal@1.1.0) (2019-11-21) + + +### Bug Fixes + +* **shell:** use shell from NodeJS if available ([53d0afa](https://github.com/ionic-team/ionic-cli/commit/53d0afaea8966f7742220896a98da570c706fb63)) + + +### Features + +* **ci:** support GitHub Actions detection ([5646c8e](https://github.com/ionic-team/ionic-cli/commit/5646c8e083862dbf976cd6cdecabe209c0ad8cfd)) + + + + + +## [1.0.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.0.4...@ionic/utils-terminal@1.0.5) (2019-09-18) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [1.0.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.0.3...@ionic/utils-terminal@1.0.4) (2019-08-23) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [1.0.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.0.2...@ionic/utils-terminal@1.0.3) (2019-08-14) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [1.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.0.1...@ionic/utils-terminal@1.0.2) (2019-08-07) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [1.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.0.0...@ionic/utils-terminal@1.0.1) (2019-06-05) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +# [1.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@0.0.1...@ionic/utils-terminal@1.0.0) (2019-05-29) + + +### chore + +* require Node 8 ([5670e68](https://github.com/ionic-team/ionic-cli/commit/5670e68)) + + +### Features + +* include path to shell in terminal info ([79480b9](https://github.com/ionic-team/ionic-cli/commit/79480b9)) + + +### BREAKING CHANGES + +* A minimum of Node.js 8.9.4 is required. + + + + + + +## 0.0.1 (2019-02-27) + + + + +**Note:** Version bump only for package @ionic/utils-terminal diff --git a/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/LICENSE b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/LICENSE new file mode 100644 index 0000000..7c5808c --- /dev/null +++ b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Drifty Co + +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/@ionic/utils-process/node_modules/@ionic/utils-terminal/README.md b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/README.md new file mode 100644 index 0000000..735a564 --- /dev/null +++ b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/README.md @@ -0,0 +1 @@ +# @ionic/utils-terminal diff --git a/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/ansi.d.ts b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/ansi.d.ts new file mode 100644 index 0000000..6cacec4 --- /dev/null +++ b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/ansi.d.ts @@ -0,0 +1,19 @@ +/** + * ANSI escape codes (WIP) + * + * @see https://en.wikipedia.org/wiki/ANSI_escape_code + */ +export declare class EscapeCode { + static readonly cursorLeft: () => string; + static readonly cursorUp: (count?: number) => string; + static readonly cursorDown: (count?: number) => string; + static readonly cursorForward: (count?: number) => string; + static readonly cursorBackward: (count?: number) => string; + static readonly cursorHide: () => string; + static readonly cursorShow: () => string; + static readonly eraseLine: () => string; + static readonly eraseLines: (count: number) => string; + static readonly eraseUp: () => string; + static readonly eraseDown: () => string; + static readonly eraseScreen: () => string; +} diff --git a/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/ansi.js b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/ansi.js new file mode 100644 index 0000000..3f5ca57 --- /dev/null +++ b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/ansi.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EscapeCode = void 0; +const ESC = '\u001B['; +/** + * ANSI escape codes (WIP) + * + * @see https://en.wikipedia.org/wiki/ANSI_escape_code + */ +class EscapeCode { +} +exports.EscapeCode = EscapeCode; +EscapeCode.cursorLeft = () => `${ESC}G`; +EscapeCode.cursorUp = (count = 1) => `${ESC}${count}A`; +EscapeCode.cursorDown = (count = 1) => `${ESC}${count}B`; +EscapeCode.cursorForward = (count = 1) => `${ESC}${count}C`; +EscapeCode.cursorBackward = (count = 1) => `${ESC}${count}D`; +EscapeCode.cursorHide = () => `${ESC}?25l`; +EscapeCode.cursorShow = () => `${ESC}?25h`; +EscapeCode.eraseLine = () => `${ESC}2K`; +EscapeCode.eraseLines = (count) => { + let seq = ''; + for (let i = 0; i < count; i++) { + seq += EscapeCode.eraseLine(); + if (i < count - 1) { + seq += EscapeCode.cursorUp(); + } + } + return `${seq}${EscapeCode.cursorLeft()}`; +}; +EscapeCode.eraseUp = () => `${ESC}1J`; +EscapeCode.eraseDown = () => `${ESC}J`; +EscapeCode.eraseScreen = () => `${ESC}2J`; diff --git a/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/cursor.d.ts b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/cursor.d.ts new file mode 100644 index 0000000..1ca8e6a --- /dev/null +++ b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/cursor.d.ts @@ -0,0 +1,9 @@ +/// +export declare class Cursor { + static stream: NodeJS.WriteStream; + private static _isVisible; + private static _listenerAttached; + static show(): void; + static hide(): void; + static toggle(): void; +} diff --git a/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/cursor.js b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/cursor.js new file mode 100644 index 0000000..b7a3b53 --- /dev/null +++ b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/cursor.js @@ -0,0 +1,37 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Cursor = void 0; +const onExit = require("signal-exit"); +const ansi_1 = require("./ansi"); +class Cursor { + static show() { + if (Cursor.stream.isTTY) { + Cursor._isVisible = true; + Cursor.stream.write(ansi_1.EscapeCode.cursorShow()); + } + } + static hide() { + if (Cursor.stream.isTTY) { + if (!Cursor._listenerAttached) { + onExit(() => { + Cursor.show(); + }); + Cursor._listenerAttached = true; + } + Cursor._isVisible = false; + Cursor.stream.write(ansi_1.EscapeCode.cursorHide()); + } + } + static toggle() { + if (Cursor._isVisible) { + Cursor.hide(); + } + else { + Cursor.show(); + } + } +} +exports.Cursor = Cursor; +Cursor.stream = process.stderr; +Cursor._isVisible = true; +Cursor._listenerAttached = false; diff --git a/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/format.d.ts b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/format.d.ts new file mode 100644 index 0000000..61d4cee --- /dev/null +++ b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/format.d.ts @@ -0,0 +1,35 @@ +import sliceAnsi = require('slice-ansi'); +import stringWidth = require('string-width'); +import stripAnsi = require('strip-ansi'); +export { sliceAnsi, stringWidth, stripAnsi }; +export declare const TTY_WIDTH: number; +export declare function indent(n?: number): string; +export interface WordWrapOptions { + width?: number; + indentation?: number; + append?: string; +} +export declare function wordWrap(msg: string, { width, indentation, append }: WordWrapOptions): string; +export declare function prettyPath(p: string): string; +export declare function expandPath(p: string): string; +export declare function generateFillSpaceStringList(list: string[], optimalLength?: number, fillCharacter?: string): string[]; +export interface ColumnarOptions { + hsep?: string; + vsep?: string; + headers?: string[]; +} +/** + * Basic CLI table generator with support for ANSI colors. + * + * @param rows 2-dimensional matrix containing cells. An array of columns, + * which are arrays of cells. + * @param options.vsep The vertical separator character, default is + * `chalk.dim('|')`. Supply an empty string to hide + * the separator altogether. + * @param options.hsep The horizontal separator character, default is + * `chalk.dim('-')`. This is used under the headers, + * if supplied. Supply an empty string to hide the + * separator altogether. + * @param options.headers An array of header cells. + */ +export declare function columnar(rows: string[][], { hsep, vsep, headers }: ColumnarOptions): string; diff --git a/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/format.js b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/format.js new file mode 100644 index 0000000..6e1d2c4 --- /dev/null +++ b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/format.js @@ -0,0 +1,122 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.columnar = exports.generateFillSpaceStringList = exports.expandPath = exports.prettyPath = exports.wordWrap = exports.indent = exports.TTY_WIDTH = exports.stripAnsi = exports.stringWidth = exports.sliceAnsi = void 0; +const os = require("os"); +const path = require("path"); +const sliceAnsi = require("slice-ansi"); +exports.sliceAnsi = sliceAnsi; +const stringWidth = require("string-width"); +exports.stringWidth = stringWidth; +const stripAnsi = require("strip-ansi"); +exports.stripAnsi = stripAnsi; +const wrapAnsi = require("wrap-ansi"); +const untildify = require("untildify"); +const MIN_TTY_WIDTH = 80; +const MAX_TTY_WIDTH = 120; +exports.TTY_WIDTH = process.stdout.columns ? Math.max(MIN_TTY_WIDTH, Math.min(process.stdout.columns, MAX_TTY_WIDTH)) : Infinity; +function indent(n = 4) { + return ' '.repeat(n); +} +exports.indent = indent; +function wordWrap(msg, { width = exports.TTY_WIDTH, indentation = 0, append = '' }) { + return wrapAnsi(msg, width - indentation - append.length, { trim: true }).split('\n').join(`${append}\n${indent(indentation)}`); +} +exports.wordWrap = wordWrap; +function prettyPath(p) { + p = expandPath(p); + const cwd = process.cwd(); + const d = path.dirname(p); + const h = os.homedir(); + const distanceFromCwd = Math.abs(d.split(path.sep).length - cwd.split(path.sep).length); + if (cwd === d) { + return '.' + path.sep + path.basename(p); + } + else if (d.startsWith(cwd)) { + return '.' + path.sep + p.substring(cwd.length + 1); + } + else if (distanceFromCwd <= 2) { + const rel = path.relative(cwd, p); + return rel ? rel : '.'; + } + else if (p === h) { + return '~'; + } + else if (p.indexOf(h) === 0) { + return '~' + path.sep + p.substring(h.length + 1); + } + return p; +} +exports.prettyPath = prettyPath; +function expandPath(p) { + return path.resolve(untildify(p)); +} +exports.expandPath = expandPath; +function generateFillSpaceStringList(list, optimalLength = 1, fillCharacter = ' ') { + if (optimalLength < 2) { + optimalLength = 2; + } + const longestItem = Math.max(...list.map(item => stringWidth(item))); + const fullLength = longestItem > optimalLength ? longestItem + 1 : optimalLength; + const fullLengthString = fillCharacter.repeat(fullLength); + return list.map(item => sliceAnsi(fullLengthString, 0, fullLength - stringWidth(item))); +} +exports.generateFillSpaceStringList = generateFillSpaceStringList; +/** + * Basic CLI table generator with support for ANSI colors. + * + * @param rows 2-dimensional matrix containing cells. An array of columns, + * which are arrays of cells. + * @param options.vsep The vertical separator character, default is + * `chalk.dim('|')`. Supply an empty string to hide + * the separator altogether. + * @param options.hsep The horizontal separator character, default is + * `chalk.dim('-')`. This is used under the headers, + * if supplied. Supply an empty string to hide the + * separator altogether. + * @param options.headers An array of header cells. + */ +function columnar(rows, { hsep = '-', vsep = '|', headers }) { + const includeHeaders = headers ? true : false; + if (!rows[0]) { + return ''; + } + const columnCount = headers ? headers.length : rows[0].length; + const columns = headers ? + headers.map(header => [header]) : + rows[0].map(() => []); + for (const row of rows) { + let highestLineCount = 0; + const splitRows = row.map(cell => { + const lines = cell.split('\n'); + highestLineCount = Math.max(highestLineCount, lines.length); + return lines; + }); + for (const rowIndex in row) { + if (columns[rowIndex]) { + columns[rowIndex].push(...splitRows[rowIndex], ...Array(highestLineCount - splitRows[rowIndex].length).fill('')); + } + } + } + const paddedColumns = columns.map((col, columnIndex) => { + if (columnIndex < columnCount - 1) { + const spaceCol = generateFillSpaceStringList(col); + return col.map((cell, cellIndex) => `${cell}${spaceCol[cellIndex]}${vsep === '' ? '' : `${vsep} `}`); + } + else { + return col; + } + }); + let longestRowLength = 0; + const singleColumn = paddedColumns.reduce((a, b) => { + return a.map((_, i) => { + const r = a[i] + b[i]; + longestRowLength = Math.max(longestRowLength, stringWidth(r)); + return r; + }); + }); + if (includeHeaders && hsep !== '') { + singleColumn.splice(1, 0, hsep.repeat(longestRowLength)); + } + return singleColumn.join('\n'); +} +exports.columnar = columnar; diff --git a/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/index.d.ts b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/index.d.ts new file mode 100644 index 0000000..f3632e2 --- /dev/null +++ b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/index.d.ts @@ -0,0 +1,4 @@ +export * from './ansi'; +export * from './cursor'; +export * from './format'; +export * from './info'; diff --git a/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/index.js b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/index.js new file mode 100644 index 0000000..94a3118 --- /dev/null +++ b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/index.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("tslib"); +tslib_1.__exportStar(require("./ansi"), exports); +tslib_1.__exportStar(require("./cursor"), exports); +tslib_1.__exportStar(require("./format"), exports); +tslib_1.__exportStar(require("./info"), exports); diff --git a/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/info.d.ts b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/info.d.ts new file mode 100644 index 0000000..614bc03 --- /dev/null +++ b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/info.d.ts @@ -0,0 +1,26 @@ +/** + * These environment variables work for: GitHub Actions, Travis CI, CircleCI, + * Gitlab CI, AppVeyor, CodeShip, Jenkins, TeamCity, Bitbucket Pipelines, AWS + * CodeBuild + */ +export declare const CI_ENVIRONMENT_VARIABLES: readonly string[]; +export declare const CI_ENVIRONMENT_VARIABLES_DETECTED: string[]; +export interface TerminalInfo { + /** + * Whether this is in CI or not. + */ + readonly ci: boolean; + /** + * Path to the user's shell program. + */ + readonly shell: string; + /** + * Whether the terminal is an interactive TTY or not. + */ + readonly tty: boolean; + /** + * Whether this is a Windows shell or not. + */ + readonly windows: boolean; +} +export declare const TERMINAL_INFO: TerminalInfo; diff --git a/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/info.js b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/info.js new file mode 100644 index 0000000..94b3b70 --- /dev/null +++ b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/dist/info.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TERMINAL_INFO = exports.CI_ENVIRONMENT_VARIABLES_DETECTED = exports.CI_ENVIRONMENT_VARIABLES = void 0; +const Debug = require("debug"); +const os = require("os"); +const debug = Debug('ionic:utils-terminal:info'); +/** + * These environment variables work for: GitHub Actions, Travis CI, CircleCI, + * Gitlab CI, AppVeyor, CodeShip, Jenkins, TeamCity, Bitbucket Pipelines, AWS + * CodeBuild + */ +exports.CI_ENVIRONMENT_VARIABLES = ['CI', 'BUILD_ID', 'BUILD_NUMBER', 'BITBUCKET_COMMIT', 'CODEBUILD_BUILD_ARN', 'GITHUB_ACTIONS']; +exports.CI_ENVIRONMENT_VARIABLES_DETECTED = exports.CI_ENVIRONMENT_VARIABLES.filter(v => !!process.env[v]); +function getShell() { + const { shell } = os.userInfo(); + if (shell) { + return shell; + } + if (process.env.SHELL) { + return process.env.SHELL; + } + if (process.platform === 'darwin') { + return '/bin/bash'; + } + if (process.platform === 'win32') { + return process.env.COMSPEC ? process.env.COMSPEC : 'cmd.exe'; + } + return '/bin/sh'; +} +if (exports.CI_ENVIRONMENT_VARIABLES_DETECTED.length > 0) { + debug(`Environment variables for CI detected: ${exports.CI_ENVIRONMENT_VARIABLES_DETECTED.join(', ')}`); +} +exports.TERMINAL_INFO = Object.freeze({ + ci: exports.CI_ENVIRONMENT_VARIABLES_DETECTED.length > 0, + shell: getShell(), + tty: Boolean(process.stdin.isTTY && process.stdout.isTTY && process.stderr.isTTY), + windows: process.platform === 'win32' || !!(process.env.OSTYPE && /^(msys|cygwin)$/.test(process.env.OSTYPE) || + process.env.MSYSTEM && /^MINGW(32|64)$/.test(process.env.MSYSTEM)), +}); diff --git a/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/package.json b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/package.json new file mode 100644 index 0000000..631891c --- /dev/null +++ b/node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal/package.json @@ -0,0 +1,58 @@ +{ + "name": "@ionic/utils-terminal", + "version": "2.3.4", + "description": "Terminal utils for NodeJS", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "homepage": "https://ionicframework.com/", + "author": "Ionic Team (https://ionic.io)", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + }, + "files": [ + "dist/", + "LICENSE", + "README.md" + ], + "repository": { + "type": "git", + "url": "https://github.com/ionic-team/ionic-cli.git" + }, + "bugs": { + "url": "https://github.com/ionic-team/ionic-cli/issues" + }, + "scripts": { + "clean": "rimraf dist", + "lint": "true", + "build": "npm run clean && tsc", + "watch": "tsc -w --preserveWatchOutput", + "test": "jest --maxWorkers=4", + "prepublishOnly": "npm run build" + }, + "dependencies": { + "@types/slice-ansi": "^4.0.0", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "tslib": "^2.0.1", + "untildify": "^4.0.0", + "wrap-ansi": "^7.0.0" + }, + "devDependencies": { + "@types/debug": "^4.1.1", + "@types/jest": "^26.0.10", + "@types/node": "~16.0.0", + "@types/signal-exit": "^3.0.0", + "@types/wrap-ansi": "^3.0.0", + "jest": "^26.4.2", + "jest-cli": "^26.0.1", + "lint-staged": "^10.0.2", + "rimraf": "^3.0.0", + "ts-jest": "~26.3.0", + "typescript": "~4.8.0" + }, + "gitHead": "15ef6e7da4eace4fd55d16fd9508d156a4bc8203" +} diff --git a/node_modules/@ionic/utils-process/package.json b/node_modules/@ionic/utils-process/package.json new file mode 100644 index 0000000..3e6cc30 --- /dev/null +++ b/node_modules/@ionic/utils-process/package.json @@ -0,0 +1,54 @@ +{ + "name": "@ionic/utils-process", + "version": "2.1.11", + "description": "Process utils for NodeJS", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "homepage": "https://ionicframework.com/", + "author": "Ionic Team (https://ionic.io)", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + }, + "files": [ + "dist/", + "LICENSE", + "README.md" + ], + "repository": { + "type": "git", + "url": "https://github.com/ionic-team/ionic-cli.git" + }, + "bugs": { + "url": "https://github.com/ionic-team/ionic-cli/issues" + }, + "scripts": { + "clean": "rimraf dist", + "lint": "true", + "build": "npm run clean && tsc", + "watch": "tsc -w --preserveWatchOutput", + "test": "jest --maxWorkers=4", + "prepublishOnly": "npm run build" + }, + "dependencies": { + "@ionic/utils-object": "2.1.6", + "@ionic/utils-terminal": "2.3.4", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "tree-kill": "^1.2.2", + "tslib": "^2.0.1" + }, + "devDependencies": { + "@types/debug": "^4.1.1", + "@types/jest": "^26.0.10", + "@types/node": "~16.0.0", + "@types/signal-exit": "^3.0.0", + "jest": "^26.4.2", + "jest-cli": "^26.0.1", + "lint-staged": "^10.0.2", + "rimraf": "^3.0.0", + "ts-jest": "~26.3.0", + "typescript": "~4.8.0" + }, + "gitHead": "15ef6e7da4eace4fd55d16fd9508d156a4bc8203" +} diff --git a/node_modules/@ionic/utils-stream/CHANGELOG.md b/node_modules/@ionic/utils-stream/CHANGELOG.md new file mode 100644 index 0000000..82c1f2c --- /dev/null +++ b/node_modules/@ionic/utils-stream/CHANGELOG.md @@ -0,0 +1,187 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [3.1.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@3.1.5...@ionic/utils-stream@3.1.6) (2023-03-29) + +**Note:** Version bump only for package @ionic/utils-stream + + + + + +## [3.1.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@3.1.4...@ionic/utils-stream@3.1.5) (2020-08-28) + +**Note:** Version bump only for package @ionic/utils-stream + + + + + +## [3.1.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@3.1.3...@ionic/utils-stream@3.1.4) (2020-08-25) + +**Note:** Version bump only for package @ionic/utils-stream + + + + + +## [3.1.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@3.1.2...@ionic/utils-stream@3.1.3) (2020-05-12) + + +### Bug Fixes + +* pin tslib to avoid "Cannot set property pathExists" error ([689e1f0](https://github.com/ionic-team/ionic-cli/commit/689e1f038b907356ef855a067a76d4822e7072a8)) + + + + + +## [3.1.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@3.1.1...@ionic/utils-stream@3.1.2) (2020-05-06) + +**Note:** Version bump only for package @ionic/utils-stream + + + + + +## [3.1.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@3.1.0...@ionic/utils-stream@3.1.1) (2020-03-03) + +**Note:** Version bump only for package @ionic/utils-stream + + + + + +# 3.1.0 (2020-02-11) + + +### Features + +* **start:** add new list starter option ([#4315](https://github.com/ionic-team/ionic-cli/issues/4315)) ([1df44c1](https://github.com/ionic-team/ionic-cli/commit/1df44c1591f37b89f2b672857740edd6cb2aea67)) + + + + + +## [3.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@3.0.1...@ionic/utils-stream@3.0.2) (2020-02-10) + +**Note:** Version bump only for package @ionic/utils-stream + + + + + +## [3.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@3.0.0...@ionic/utils-stream@3.0.1) (2020-02-03) + +**Note:** Version bump only for package @ionic/utils-stream + + + + + +# [3.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@2.0.5...@ionic/utils-stream@3.0.0) (2020-01-25) + + +### chore + +* require Node 10 ([5a47874](https://github.com/ionic-team/ionic-cli/commit/5a478746c074207b6dc96aa8771f04a606deb1ef)) + + +### BREAKING CHANGES + +* A minimum of Node.js 10.3.0 is required. + + + + + +## [2.0.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@2.0.4...@ionic/utils-stream@2.0.5) (2019-12-05) + +**Note:** Version bump only for package @ionic/utils-stream + + + + + +## [2.0.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@2.0.3...@ionic/utils-stream@2.0.4) (2019-09-18) + +**Note:** Version bump only for package @ionic/utils-stream + + + + + +## [2.0.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@2.0.2...@ionic/utils-stream@2.0.3) (2019-08-23) + +**Note:** Version bump only for package @ionic/utils-stream + + + + + +## [2.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@2.0.1...@ionic/utils-stream@2.0.2) (2019-08-14) + +**Note:** Version bump only for package @ionic/utils-stream + + + + + +## [2.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@2.0.0...@ionic/utils-stream@2.0.1) (2019-08-07) + +**Note:** Version bump only for package @ionic/utils-stream + + + + + +# [2.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@1.0.1...@ionic/utils-stream@2.0.0) (2019-06-10) + + +### Code Refactoring + +* remove combineStreams ([93f4ff2](https://github.com/ionic-team/ionic-cli/commit/93f4ff2)) + + +### BREAKING CHANGES + +* `combineStreams` has been removed. Use +`stream-combiner2` directly. + + + + + +## [1.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@1.0.0...@ionic/utils-stream@1.0.1) (2019-06-05) + +**Note:** Version bump only for package @ionic/utils-stream + + + + + +# [1.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-stream@0.0.1...@ionic/utils-stream@1.0.0) (2019-05-29) + + +### chore + +* require Node 8 ([5670e68](https://github.com/ionic-team/ionic-cli/commit/5670e68)) + + +### BREAKING CHANGES + +* A minimum of Node.js 8.9.4 is required. + + + + + + +## 0.0.1 (2019-02-27) + + + + +**Note:** Version bump only for package @ionic/utils-stream diff --git a/node_modules/@ionic/utils-stream/LICENSE b/node_modules/@ionic/utils-stream/LICENSE new file mode 100644 index 0000000..7c5808c --- /dev/null +++ b/node_modules/@ionic/utils-stream/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Drifty Co + +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/@ionic/utils-stream/README.md b/node_modules/@ionic/utils-stream/README.md new file mode 100644 index 0000000..fce2c8f --- /dev/null +++ b/node_modules/@ionic/utils-stream/README.md @@ -0,0 +1 @@ +# @ionic/utils-stream diff --git a/node_modules/@ionic/utils-stream/dist/index.d.ts b/node_modules/@ionic/utils-stream/dist/index.d.ts new file mode 100644 index 0000000..85afe64 --- /dev/null +++ b/node_modules/@ionic/utils-stream/dist/index.d.ts @@ -0,0 +1,39 @@ +/// +/// +import { Readable, ReadableOptions, Writable, WritableOptions } from 'stream'; +export declare class NullStream extends Writable { + _write(chunk: any, encoding: string, callback: () => void): void; +} +export interface ReadableStreamBufferOptions extends ReadableOptions { + chunkSize?: number; + allocSize?: number; + growSize?: number; +} +export declare class ReadableStreamBuffer extends Readable { + protected buffer: Buffer; + protected _size: number; + protected _stopped: boolean; + protected chunkSize: number; + protected growSize: number; + constructor(opts?: ReadableStreamBufferOptions); + get size(): number; + get stopped(): boolean; + _read(): void; + feed(data: Buffer | string, encoding?: BufferEncoding): void; + stop(): void; + protected _send(): void; +} +export interface WritableStreamBufferOptions extends WritableOptions { + allocSize?: number; + growSize?: number; +} +export declare class WritableStreamBuffer extends Writable { + protected buffer: Buffer; + protected _size: number; + protected growSize: number; + constructor(opts?: WritableStreamBufferOptions); + get size(): number; + _write(chunk: any, encoding: string, callback: () => void): void; + consume(bytes?: number): Buffer; +} +export declare function growBufferForAppendedData(buf: Buffer, actualsize: number, appendsize: number): Buffer; diff --git a/node_modules/@ionic/utils-stream/dist/index.js b/node_modules/@ionic/utils-stream/dist/index.js new file mode 100644 index 0000000..295b7d3 --- /dev/null +++ b/node_modules/@ionic/utils-stream/dist/index.js @@ -0,0 +1,108 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.growBufferForAppendedData = exports.WritableStreamBuffer = exports.ReadableStreamBuffer = exports.NullStream = void 0; +const stream_1 = require("stream"); +const DEFAULT_CHUNK_SIZE = 4; +const DEFAULT_ALLOC_SIZE = 32; +const DEFAULT_GROW_SIZE = 16; +class NullStream extends stream_1.Writable { + _write(chunk, encoding, callback) { + callback(); + } +} +exports.NullStream = NullStream; +class ReadableStreamBuffer extends stream_1.Readable { + constructor(opts) { + super(opts); + this._size = 0; + this._stopped = false; + this.buffer = Buffer.alloc(opts && opts.allocSize ? opts.allocSize : DEFAULT_ALLOC_SIZE); + this.chunkSize = opts && opts.chunkSize ? opts.chunkSize : DEFAULT_CHUNK_SIZE; + this.growSize = opts && opts.growSize ? opts.growSize : DEFAULT_GROW_SIZE; + } + get size() { + return this._size; + } + get stopped() { + return this._stopped; + } + _read() { + this._send(); + } + feed(data, encoding = 'utf8') { + if (this._stopped) { + throw new Error('ReadableStreamBuffer is stopped. Can no longer feed.'); + } + const datasize = typeof data === 'string' ? Buffer.byteLength(data) : data.length; + this.buffer = growBufferForAppendedData(this.buffer, this._size, Math.ceil(datasize / this.growSize) * this.growSize); + if (typeof data === 'string') { + this.buffer.write(data, this._size, datasize, encoding); + } + else { + this.buffer.copy(data, this._size, 0); + } + this._size += datasize; + } + stop() { + if (this._stopped) { + return; + } + this._stopped = true; + if (this._size === 0) { + this.push(null); + } + } + _send() { + const chunkSize = Math.min(this.chunkSize, this._size); + let done = false; + if (chunkSize > 0) { + const chunk = Buffer.alloc(chunkSize); + this.buffer.copy(chunk, 0, 0, chunkSize); + done = !this.push(chunk); + this.buffer.copy(this.buffer, 0, chunkSize, this._size); + this._size -= chunkSize; + } + if (this._size === 0 && this._stopped) { + this.push(null); + } + if (!done) { + setTimeout(() => this._send(), 1); + } + } +} +exports.ReadableStreamBuffer = ReadableStreamBuffer; +class WritableStreamBuffer extends stream_1.Writable { + constructor(opts) { + super(opts); + this._size = 0; + this.buffer = Buffer.alloc(opts && opts.allocSize ? opts.allocSize : DEFAULT_ALLOC_SIZE); + this.growSize = opts && opts.growSize ? opts.growSize : DEFAULT_GROW_SIZE; + } + get size() { + return this._size; + } + _write(chunk, encoding, callback) { + this.buffer = growBufferForAppendedData(this.buffer, this._size, Math.ceil(chunk.length / this.growSize) * this.growSize); + chunk.copy(this.buffer, this._size, 0); + this._size += chunk.length; + callback(); + } + consume(bytes) { + bytes = typeof bytes === 'number' ? bytes : this._size; + const data = Buffer.alloc(bytes); + this.buffer.copy(data, 0, 0, data.length); + this.buffer.copy(this.buffer, 0, data.length); + this._size -= data.length; + return data; + } +} +exports.WritableStreamBuffer = WritableStreamBuffer; +function growBufferForAppendedData(buf, actualsize, appendsize) { + if ((buf.length - actualsize) >= appendsize) { + return buf; + } + const newbuffer = Buffer.alloc(buf.length + appendsize); + buf.copy(newbuffer, 0, 0, actualsize); + return newbuffer; +} +exports.growBufferForAppendedData = growBufferForAppendedData; diff --git a/node_modules/@ionic/utils-stream/package.json b/node_modules/@ionic/utils-stream/package.json new file mode 100644 index 0000000..a0f3ac8 --- /dev/null +++ b/node_modules/@ionic/utils-stream/package.json @@ -0,0 +1,50 @@ +{ + "name": "@ionic/utils-stream", + "version": "3.1.6", + "description": "Stream utils for NodeJS", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "homepage": "https://ionicframework.com/", + "author": "Ionic Team (https://ionic.io)", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + }, + "files": [ + "dist/", + "LICENSE", + "README.md" + ], + "repository": { + "type": "git", + "url": "https://github.com/ionic-team/ionic-cli.git" + }, + "bugs": { + "url": "https://github.com/ionic-team/ionic-cli/issues" + }, + "scripts": { + "clean": "rimraf dist", + "lint": "true", + "build": "npm run clean && tsc", + "watch": "tsc -w --preserveWatchOutput", + "test": "jest --maxWorkers=4", + "prepublishOnly": "npm run build" + }, + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "devDependencies": { + "@types/debug": "^4.1.1", + "@types/jest": "^26.0.10", + "@types/node": "~16.0.0", + "jest": "^26.4.2", + "jest-cli": "^26.0.1", + "lint-staged": "^10.0.2", + "rimraf": "^3.0.0", + "stream-combiner2": "^1.1.1", + "ts-jest": "~26.3.0", + "typescript": "~4.8.0" + }, + "gitHead": "15ef6e7da4eace4fd55d16fd9508d156a4bc8203" +} diff --git a/node_modules/@ionic/utils-subprocess/LICENSE b/node_modules/@ionic/utils-subprocess/LICENSE new file mode 100644 index 0000000..7c5808c --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Drifty Co + +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/@ionic/utils-subprocess/README.md b/node_modules/@ionic/utils-subprocess/README.md new file mode 100644 index 0000000..b4f5a77 --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/README.md @@ -0,0 +1 @@ +# @ionic/utils-process diff --git a/node_modules/@ionic/utils-subprocess/dist/index.d.ts b/node_modules/@ionic/utils-subprocess/dist/index.d.ts new file mode 100644 index 0000000..97a2f63 --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/dist/index.d.ts @@ -0,0 +1,102 @@ +/// +import { ChildProcess, ForkOptions, SpawnOptions } from 'child_process'; +export declare const ERROR_COMMAND_NOT_FOUND = "ERR_SUBPROCESS_COMMAND_NOT_FOUND"; +export declare const ERROR_NON_ZERO_EXIT = "ERR_SUBPROCESS_NON_ZERO_EXIT"; +export declare const ERROR_SIGNAL_EXIT = "ERR_SUBPROCESS_SIGNAL_EXIT"; +export declare const TILDE_PATH_REGEX: RegExp; +export declare function expandTildePath(p: string): string; +/** + * Prepare the PATH environment variable for use with subprocesses. + * + * If a raw tilde is found in PATH, e.g. `~/.bin`, it is expanded. The raw + * tilde works in Bash, but not in Node's `child_process` outside of a shell. + * + * This is a utility method. You do not need to use it with `Subprocess`. + * + * @param path Defaults to `process.env.PATH` + */ +export declare function convertPATH(path?: string): string; +export declare class SubprocessError extends Error { + readonly name = "SubprocessError"; + message: string; + stack: string; + code?: typeof ERROR_COMMAND_NOT_FOUND | typeof ERROR_NON_ZERO_EXIT | typeof ERROR_SIGNAL_EXIT; + error?: Error; + output?: string; + signal?: string; + exitCode?: number; + constructor(message: string); +} +export interface SubprocessOptions extends SpawnOptions { +} +export interface SubprocessBashifyOptions { + /** + * Mask file path to first argument. + * + * The first argument to subprocesses is the program name or path, e.g. + * `/path/to/bin/my-program`. If `true`, `bashify()` will return the program + * name without a file path, e.g. `my-program`. + * + * The default is `true`. + */ + maskArgv0?: boolean; + /** + * Mask file path to second argument. + * + * In some subprocesses, the second argument is a script file to run, e.g. + * `node ./scripts/post-install`. If `true`, `bashify()` will return the + * script name without a file path, e.g. `node post-install`. + * + * The default is `false`. + */ + maskArgv1?: boolean; + /** + * Remove the first argument from output. + * + * Useful to make a command such as `node ./scripts/post-install` appear as + * simply `post-install`. + * + * The default is `false`. + */ + shiftArgv0?: boolean; +} +export declare class Subprocess { + name: string; + args: readonly string[]; + protected readonly path?: string; + protected _options: SpawnOptions; + constructor(name: string, args: readonly string[], options?: SubprocessOptions); + get options(): Readonly; + output(): Promise; + combinedOutput(): Promise; + run(): Promise & { + p: ChildProcess; + }; + spawn(): ChildProcess; + bashify({ maskArgv0, maskArgv1, shiftArgv0 }?: SubprocessBashifyOptions): string; + bashifyArg(arg: string): string; + maskArg(arg: string): string; +} +export declare function spawn(command: string, args?: readonly string[], options?: SpawnOptions): ChildProcess; +export declare function fork(modulePath: string, args?: readonly string[], options?: ForkOptions & Pick): ChildProcess; +export interface WhichOptions { + PATH?: string; + PATHEXT?: string; +} +/** + * Find the first instance of a program in PATH. + * + * If `program` contains a path separator, this function will merely return it. + * + * @param program A command name, such as `ionic` + */ +export declare function which(program: string, { PATH, PATHEXT }?: WhichOptions): Promise; +/** + * Find all instances of a program in PATH. + * + * If `program` contains a path separator, this function will merely return it + * inside an array. + * + * @param program A command name, such as `ionic` + */ +export declare function findExecutables(program: string, { PATH, PATHEXT }?: WhichOptions): Promise; diff --git a/node_modules/@ionic/utils-subprocess/dist/index.js b/node_modules/@ionic/utils-subprocess/dist/index.js new file mode 100644 index 0000000..bd702d2 --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/dist/index.js @@ -0,0 +1,230 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.findExecutables = exports.which = exports.fork = exports.spawn = exports.Subprocess = exports.SubprocessError = exports.convertPATH = exports.expandTildePath = exports.TILDE_PATH_REGEX = exports.ERROR_SIGNAL_EXIT = exports.ERROR_NON_ZERO_EXIT = exports.ERROR_COMMAND_NOT_FOUND = void 0; +const utils_array_1 = require("@ionic/utils-array"); +const utils_fs_1 = require("@ionic/utils-fs"); +const utils_process_1 = require("@ionic/utils-process"); +const utils_stream_1 = require("@ionic/utils-stream"); +const utils_terminal_1 = require("@ionic/utils-terminal"); +const child_process_1 = require("child_process"); +const crossSpawn = require("cross-spawn"); +const os = require("os"); +const pathlib = require("path"); +exports.ERROR_COMMAND_NOT_FOUND = 'ERR_SUBPROCESS_COMMAND_NOT_FOUND'; +exports.ERROR_NON_ZERO_EXIT = 'ERR_SUBPROCESS_NON_ZERO_EXIT'; +exports.ERROR_SIGNAL_EXIT = 'ERR_SUBPROCESS_SIGNAL_EXIT'; +exports.TILDE_PATH_REGEX = /^~($|\/|\\)/; +function expandTildePath(p) { + const h = os.homedir(); + return p.replace(exports.TILDE_PATH_REGEX, `${h}$1`); +} +exports.expandTildePath = expandTildePath; +/** + * Prepare the PATH environment variable for use with subprocesses. + * + * If a raw tilde is found in PATH, e.g. `~/.bin`, it is expanded. The raw + * tilde works in Bash, but not in Node's `child_process` outside of a shell. + * + * This is a utility method. You do not need to use it with `Subprocess`. + * + * @param path Defaults to `process.env.PATH` + */ +function convertPATH(path = process.env.PATH || '') { + return path.split(pathlib.delimiter).map(expandTildePath).join(pathlib.delimiter); +} +exports.convertPATH = convertPATH; +class SubprocessError extends Error { + constructor(message) { + super(message); + this.name = 'SubprocessError'; + this.message = message; + this.stack = (new Error()).stack || ''; + } +} +exports.SubprocessError = SubprocessError; +class Subprocess { + constructor(name, args, options = {}) { + this.name = name; + this.args = args; + const masked = this.maskArg(name); + if (masked !== name) { + this.name = masked; + this.path = name; + } + this._options = options; + } + get options() { + const opts = this._options; + if (!opts.env) { + opts.env = process.env; + } + const env = (0, utils_process_1.createProcessEnv)(opts.env || {}, { + PATH: convertPATH(typeof opts.env.PATH === 'string' ? opts.env.PATH : process.env.PATH), + }); + return { ...opts, env }; + } + async output() { + this._options.stdio = 'pipe'; + const promise = this.run(); + const stdoutBuf = new utils_stream_1.WritableStreamBuffer(); + const stderrBuf = new utils_stream_1.WritableStreamBuffer(); + const combinedBuf = new utils_stream_1.WritableStreamBuffer(); + promise.p.stdout?.pipe(stdoutBuf); + promise.p.stdout?.pipe(combinedBuf); + promise.p.stderr?.pipe(stderrBuf); + promise.p.stderr?.pipe(combinedBuf); + try { + await promise; + } + catch (e) { + stdoutBuf.end(); + stderrBuf.end(); + e.output = combinedBuf.consume().toString(); + throw e; + } + stderrBuf.end(); + combinedBuf.end(); + return stdoutBuf.consume().toString(); + } + async combinedOutput() { + this._options.stdio = 'pipe'; + const promise = this.run(); + const buf = new utils_stream_1.WritableStreamBuffer(); + promise.p.stdout?.pipe(buf); + promise.p.stderr?.pipe(buf); + try { + await promise; + } + catch (e) { + e.output = buf.consume().toString(); + throw e; + } + return buf.consume().toString(); + } + run() { + const p = this.spawn(); + const promise = new Promise((resolve, reject) => { + p.on('error', (error) => { + let err; + if (error.code === 'ENOENT') { + err = new SubprocessError('Command not found.'); + err.code = exports.ERROR_COMMAND_NOT_FOUND; + } + else { + err = new SubprocessError('Command error.'); + } + err.error = error; + reject(err); + }); + p.on('close', (code, signal) => { + let err; + if (code === 0) { + return resolve(); + } + else if (signal) { + err = new SubprocessError('Signal exit from subprocess.'); + err.code = exports.ERROR_SIGNAL_EXIT; + err.signal = signal; + } + else if (code) { + err = new SubprocessError('Non-zero exit from subprocess.'); + err.code = exports.ERROR_NON_ZERO_EXIT; + err.exitCode = code; + } + else { + return resolve(); + } + reject(err); + }); + }); + Object.defineProperties(promise, { + p: { value: p }, + }); + return promise; + } + spawn() { + return spawn(this.path ? this.path : this.name, this.args, this.options); + } + bashify({ maskArgv0 = true, maskArgv1 = false, shiftArgv0 = false } = {}) { + const args = [this.path ? this.path : this.name, ...this.args]; + if (shiftArgv0) { + args.shift(); + } + if (args[0] && maskArgv0) { + args[0] = this.maskArg(args[0]); + } + if (args[1] && maskArgv1) { + args[1] = this.maskArg(args[1]); + } + return args.length > 0 + ? args.map(arg => this.bashifyArg(arg)).join(' ') + : ''; + } + bashifyArg(arg) { + return arg.includes(' ') ? `"${arg.replace(/\"/g, '\\"')}"` : arg; + } + maskArg(arg) { + const i = arg.lastIndexOf(pathlib.sep); + return i >= 0 ? arg.substring(i + 1) : arg; + } +} +exports.Subprocess = Subprocess; +function spawn(command, args = [], options) { + return crossSpawn(command, [...args], options); +} +exports.spawn = spawn; +function fork(modulePath, args = [], options = {}) { + return (0, child_process_1.fork)(modulePath, [...args], options); +} +exports.fork = fork; +const DEFAULT_PATHEXT = utils_terminal_1.TERMINAL_INFO.windows ? '.COM;.EXE;.BAT;.CMD' : undefined; +/** + * Find the first instance of a program in PATH. + * + * If `program` contains a path separator, this function will merely return it. + * + * @param program A command name, such as `ionic` + */ +async function which(program, { PATH = process.env.PATH, PATHEXT = process.env.PATHEXT || DEFAULT_PATHEXT } = {}) { + if (program.includes(pathlib.sep)) { + return program; + } + const results = await _findExecutables(program, { PATH }); + if (!results.length) { + const err = new Error(`${program} cannot be found within PATH`); + err.code = 'ENOENT'; + throw err; + } + return results[0]; +} +exports.which = which; +/** + * Find all instances of a program in PATH. + * + * If `program` contains a path separator, this function will merely return it + * inside an array. + * + * @param program A command name, such as `ionic` + */ +async function findExecutables(program, { PATH = process.env.PATH, PATHEXT = process.env.PATHEXT || DEFAULT_PATHEXT } = {}) { + if (program.includes(pathlib.sep)) { + return [program]; + } + return _findExecutables(program, { PATH }); +} +exports.findExecutables = findExecutables; +async function _findExecutables(program, { PATH = process.env.PATH, PATHEXT = process.env.PATHEXT || DEFAULT_PATHEXT } = {}) { + const pathParts = (0, utils_process_1.getPathParts)(PATH); + let programNames; + // if windows, cycle through all possible executable extensions + // ex: node.exe, npm.cmd, etc. + if (utils_terminal_1.TERMINAL_INFO.windows) { + const exts = (0, utils_process_1.getPathParts)(PATHEXT).map(ext => ext.toLowerCase()); + // don't append extensions if one has already been provided + programNames = exts.includes(pathlib.extname(program).toLowerCase()) ? [program] : exts.map(ext => program + ext); + } + else { + programNames = [program]; + } + return [].concat(...await (0, utils_array_1.map)(programNames, async (programName) => (0, utils_array_1.concurrentFilter)(pathParts.map(p => pathlib.join(p, programName)), async (p) => (0, utils_fs_1.isExecutableFile)(p)))); +} diff --git a/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/CHANGELOG.md b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/CHANGELOG.md new file mode 100644 index 0000000..4b306df --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/CHANGELOG.md @@ -0,0 +1,252 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [2.3.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.3.3...@ionic/utils-terminal@2.3.4) (2023-03-29) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [2.3.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.3.2...@ionic/utils-terminal@2.3.3) (2022-06-16) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [2.3.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.3.1...@ionic/utils-terminal@2.3.2) (2022-05-09) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [2.3.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.3.0...@ionic/utils-terminal@2.3.1) (2020-09-29) + + +### Bug Fixes + +* add signal-exit dependency in correct place ([178e5e5](https://github.com/ionic-team/ionic-cli/commit/178e5e51cdc3593e3d096a5197e1dc0e17292bbd)) + + + + + +# [2.3.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.2.1...@ionic/utils-terminal@2.3.0) (2020-09-24) + + +### Features + +* **format:** add more formatting utilities ([d30f099](https://github.com/ionic-team/ionic-cli/commit/d30f099f50df18816fb1d3064c434f1b318518a2)) +* **format:** terminal prose formatting utils ([8912348](https://github.com/ionic-team/ionic-cli/commit/8912348ca348ae6192ddfff1af88f9c9443d205d)) + + + + + +## [2.2.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.2.0...@ionic/utils-terminal@2.2.1) (2020-08-28) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +# [2.2.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.1.4...@ionic/utils-terminal@2.2.0) (2020-08-27) + + +### Features + +* add some ansi escape codes + cursor wrapper ([edbdb57](https://github.com/ionic-team/ionic-cli/commit/edbdb572bfe2fb5710eff7e49a483c86601ba425)) + + + + + +## [2.1.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.1.3...@ionic/utils-terminal@2.1.4) (2020-08-25) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [2.1.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.1.2...@ionic/utils-terminal@2.1.3) (2020-05-12) + + +### Bug Fixes + +* pin tslib to avoid "Cannot set property pathExists" error ([689e1f0](https://github.com/ionic-team/ionic-cli/commit/689e1f038b907356ef855a067a76d4822e7072a8)) + + + + + +## [2.1.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.1.1...@ionic/utils-terminal@2.1.2) (2020-05-06) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [2.1.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.1.0...@ionic/utils-terminal@2.1.1) (2020-03-03) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +# 2.1.0 (2020-02-11) + + +### Features + +* **start:** add new list starter option ([#4315](https://github.com/ionic-team/ionic-cli/issues/4315)) ([1df44c1](https://github.com/ionic-team/ionic-cli/commit/1df44c1591f37b89f2b672857740edd6cb2aea67)) + + + + + +## [2.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.0.1...@ionic/utils-terminal@2.0.2) (2020-02-10) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [2.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@2.0.0...@ionic/utils-terminal@2.0.1) (2020-02-03) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +# [2.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.1.2...@ionic/utils-terminal@2.0.0) (2020-01-25) + + +### chore + +* require Node 10 ([5a47874](https://github.com/ionic-team/ionic-cli/commit/5a478746c074207b6dc96aa8771f04a606deb1ef)) + + +### BREAKING CHANGES + +* A minimum of Node.js 10.3.0 is required. + + + + + +## [1.1.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.1.1...@ionic/utils-terminal@1.1.2) (2019-12-10) + + +### Bug Fixes + +* **windows:** do not check TERM for windows detection ([ac4b417](https://github.com/ionic-team/ionic-cli/commit/ac4b417385c0c7859674e2ba59e495e9abc5bce4)) + + + + + +## [1.1.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.1.0...@ionic/utils-terminal@1.1.1) (2019-12-05) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +# [1.1.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.0.5...@ionic/utils-terminal@1.1.0) (2019-11-21) + + +### Bug Fixes + +* **shell:** use shell from NodeJS if available ([53d0afa](https://github.com/ionic-team/ionic-cli/commit/53d0afaea8966f7742220896a98da570c706fb63)) + + +### Features + +* **ci:** support GitHub Actions detection ([5646c8e](https://github.com/ionic-team/ionic-cli/commit/5646c8e083862dbf976cd6cdecabe209c0ad8cfd)) + + + + + +## [1.0.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.0.4...@ionic/utils-terminal@1.0.5) (2019-09-18) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [1.0.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.0.3...@ionic/utils-terminal@1.0.4) (2019-08-23) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [1.0.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.0.2...@ionic/utils-terminal@1.0.3) (2019-08-14) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [1.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.0.1...@ionic/utils-terminal@1.0.2) (2019-08-07) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +## [1.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@1.0.0...@ionic/utils-terminal@1.0.1) (2019-06-05) + +**Note:** Version bump only for package @ionic/utils-terminal + + + + + +# [1.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/utils-terminal@0.0.1...@ionic/utils-terminal@1.0.0) (2019-05-29) + + +### chore + +* require Node 8 ([5670e68](https://github.com/ionic-team/ionic-cli/commit/5670e68)) + + +### Features + +* include path to shell in terminal info ([79480b9](https://github.com/ionic-team/ionic-cli/commit/79480b9)) + + +### BREAKING CHANGES + +* A minimum of Node.js 8.9.4 is required. + + + + + + +## 0.0.1 (2019-02-27) + + + + +**Note:** Version bump only for package @ionic/utils-terminal diff --git a/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/LICENSE b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/LICENSE new file mode 100644 index 0000000..7c5808c --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Drifty Co + +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/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/README.md b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/README.md new file mode 100644 index 0000000..735a564 --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/README.md @@ -0,0 +1 @@ +# @ionic/utils-terminal diff --git a/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/ansi.d.ts b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/ansi.d.ts new file mode 100644 index 0000000..6cacec4 --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/ansi.d.ts @@ -0,0 +1,19 @@ +/** + * ANSI escape codes (WIP) + * + * @see https://en.wikipedia.org/wiki/ANSI_escape_code + */ +export declare class EscapeCode { + static readonly cursorLeft: () => string; + static readonly cursorUp: (count?: number) => string; + static readonly cursorDown: (count?: number) => string; + static readonly cursorForward: (count?: number) => string; + static readonly cursorBackward: (count?: number) => string; + static readonly cursorHide: () => string; + static readonly cursorShow: () => string; + static readonly eraseLine: () => string; + static readonly eraseLines: (count: number) => string; + static readonly eraseUp: () => string; + static readonly eraseDown: () => string; + static readonly eraseScreen: () => string; +} diff --git a/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/ansi.js b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/ansi.js new file mode 100644 index 0000000..3f5ca57 --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/ansi.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EscapeCode = void 0; +const ESC = '\u001B['; +/** + * ANSI escape codes (WIP) + * + * @see https://en.wikipedia.org/wiki/ANSI_escape_code + */ +class EscapeCode { +} +exports.EscapeCode = EscapeCode; +EscapeCode.cursorLeft = () => `${ESC}G`; +EscapeCode.cursorUp = (count = 1) => `${ESC}${count}A`; +EscapeCode.cursorDown = (count = 1) => `${ESC}${count}B`; +EscapeCode.cursorForward = (count = 1) => `${ESC}${count}C`; +EscapeCode.cursorBackward = (count = 1) => `${ESC}${count}D`; +EscapeCode.cursorHide = () => `${ESC}?25l`; +EscapeCode.cursorShow = () => `${ESC}?25h`; +EscapeCode.eraseLine = () => `${ESC}2K`; +EscapeCode.eraseLines = (count) => { + let seq = ''; + for (let i = 0; i < count; i++) { + seq += EscapeCode.eraseLine(); + if (i < count - 1) { + seq += EscapeCode.cursorUp(); + } + } + return `${seq}${EscapeCode.cursorLeft()}`; +}; +EscapeCode.eraseUp = () => `${ESC}1J`; +EscapeCode.eraseDown = () => `${ESC}J`; +EscapeCode.eraseScreen = () => `${ESC}2J`; diff --git a/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/cursor.d.ts b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/cursor.d.ts new file mode 100644 index 0000000..1ca8e6a --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/cursor.d.ts @@ -0,0 +1,9 @@ +/// +export declare class Cursor { + static stream: NodeJS.WriteStream; + private static _isVisible; + private static _listenerAttached; + static show(): void; + static hide(): void; + static toggle(): void; +} diff --git a/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/cursor.js b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/cursor.js new file mode 100644 index 0000000..b7a3b53 --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/cursor.js @@ -0,0 +1,37 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Cursor = void 0; +const onExit = require("signal-exit"); +const ansi_1 = require("./ansi"); +class Cursor { + static show() { + if (Cursor.stream.isTTY) { + Cursor._isVisible = true; + Cursor.stream.write(ansi_1.EscapeCode.cursorShow()); + } + } + static hide() { + if (Cursor.stream.isTTY) { + if (!Cursor._listenerAttached) { + onExit(() => { + Cursor.show(); + }); + Cursor._listenerAttached = true; + } + Cursor._isVisible = false; + Cursor.stream.write(ansi_1.EscapeCode.cursorHide()); + } + } + static toggle() { + if (Cursor._isVisible) { + Cursor.hide(); + } + else { + Cursor.show(); + } + } +} +exports.Cursor = Cursor; +Cursor.stream = process.stderr; +Cursor._isVisible = true; +Cursor._listenerAttached = false; diff --git a/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/format.d.ts b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/format.d.ts new file mode 100644 index 0000000..61d4cee --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/format.d.ts @@ -0,0 +1,35 @@ +import sliceAnsi = require('slice-ansi'); +import stringWidth = require('string-width'); +import stripAnsi = require('strip-ansi'); +export { sliceAnsi, stringWidth, stripAnsi }; +export declare const TTY_WIDTH: number; +export declare function indent(n?: number): string; +export interface WordWrapOptions { + width?: number; + indentation?: number; + append?: string; +} +export declare function wordWrap(msg: string, { width, indentation, append }: WordWrapOptions): string; +export declare function prettyPath(p: string): string; +export declare function expandPath(p: string): string; +export declare function generateFillSpaceStringList(list: string[], optimalLength?: number, fillCharacter?: string): string[]; +export interface ColumnarOptions { + hsep?: string; + vsep?: string; + headers?: string[]; +} +/** + * Basic CLI table generator with support for ANSI colors. + * + * @param rows 2-dimensional matrix containing cells. An array of columns, + * which are arrays of cells. + * @param options.vsep The vertical separator character, default is + * `chalk.dim('|')`. Supply an empty string to hide + * the separator altogether. + * @param options.hsep The horizontal separator character, default is + * `chalk.dim('-')`. This is used under the headers, + * if supplied. Supply an empty string to hide the + * separator altogether. + * @param options.headers An array of header cells. + */ +export declare function columnar(rows: string[][], { hsep, vsep, headers }: ColumnarOptions): string; diff --git a/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/format.js b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/format.js new file mode 100644 index 0000000..6e1d2c4 --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/format.js @@ -0,0 +1,122 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.columnar = exports.generateFillSpaceStringList = exports.expandPath = exports.prettyPath = exports.wordWrap = exports.indent = exports.TTY_WIDTH = exports.stripAnsi = exports.stringWidth = exports.sliceAnsi = void 0; +const os = require("os"); +const path = require("path"); +const sliceAnsi = require("slice-ansi"); +exports.sliceAnsi = sliceAnsi; +const stringWidth = require("string-width"); +exports.stringWidth = stringWidth; +const stripAnsi = require("strip-ansi"); +exports.stripAnsi = stripAnsi; +const wrapAnsi = require("wrap-ansi"); +const untildify = require("untildify"); +const MIN_TTY_WIDTH = 80; +const MAX_TTY_WIDTH = 120; +exports.TTY_WIDTH = process.stdout.columns ? Math.max(MIN_TTY_WIDTH, Math.min(process.stdout.columns, MAX_TTY_WIDTH)) : Infinity; +function indent(n = 4) { + return ' '.repeat(n); +} +exports.indent = indent; +function wordWrap(msg, { width = exports.TTY_WIDTH, indentation = 0, append = '' }) { + return wrapAnsi(msg, width - indentation - append.length, { trim: true }).split('\n').join(`${append}\n${indent(indentation)}`); +} +exports.wordWrap = wordWrap; +function prettyPath(p) { + p = expandPath(p); + const cwd = process.cwd(); + const d = path.dirname(p); + const h = os.homedir(); + const distanceFromCwd = Math.abs(d.split(path.sep).length - cwd.split(path.sep).length); + if (cwd === d) { + return '.' + path.sep + path.basename(p); + } + else if (d.startsWith(cwd)) { + return '.' + path.sep + p.substring(cwd.length + 1); + } + else if (distanceFromCwd <= 2) { + const rel = path.relative(cwd, p); + return rel ? rel : '.'; + } + else if (p === h) { + return '~'; + } + else if (p.indexOf(h) === 0) { + return '~' + path.sep + p.substring(h.length + 1); + } + return p; +} +exports.prettyPath = prettyPath; +function expandPath(p) { + return path.resolve(untildify(p)); +} +exports.expandPath = expandPath; +function generateFillSpaceStringList(list, optimalLength = 1, fillCharacter = ' ') { + if (optimalLength < 2) { + optimalLength = 2; + } + const longestItem = Math.max(...list.map(item => stringWidth(item))); + const fullLength = longestItem > optimalLength ? longestItem + 1 : optimalLength; + const fullLengthString = fillCharacter.repeat(fullLength); + return list.map(item => sliceAnsi(fullLengthString, 0, fullLength - stringWidth(item))); +} +exports.generateFillSpaceStringList = generateFillSpaceStringList; +/** + * Basic CLI table generator with support for ANSI colors. + * + * @param rows 2-dimensional matrix containing cells. An array of columns, + * which are arrays of cells. + * @param options.vsep The vertical separator character, default is + * `chalk.dim('|')`. Supply an empty string to hide + * the separator altogether. + * @param options.hsep The horizontal separator character, default is + * `chalk.dim('-')`. This is used under the headers, + * if supplied. Supply an empty string to hide the + * separator altogether. + * @param options.headers An array of header cells. + */ +function columnar(rows, { hsep = '-', vsep = '|', headers }) { + const includeHeaders = headers ? true : false; + if (!rows[0]) { + return ''; + } + const columnCount = headers ? headers.length : rows[0].length; + const columns = headers ? + headers.map(header => [header]) : + rows[0].map(() => []); + for (const row of rows) { + let highestLineCount = 0; + const splitRows = row.map(cell => { + const lines = cell.split('\n'); + highestLineCount = Math.max(highestLineCount, lines.length); + return lines; + }); + for (const rowIndex in row) { + if (columns[rowIndex]) { + columns[rowIndex].push(...splitRows[rowIndex], ...Array(highestLineCount - splitRows[rowIndex].length).fill('')); + } + } + } + const paddedColumns = columns.map((col, columnIndex) => { + if (columnIndex < columnCount - 1) { + const spaceCol = generateFillSpaceStringList(col); + return col.map((cell, cellIndex) => `${cell}${spaceCol[cellIndex]}${vsep === '' ? '' : `${vsep} `}`); + } + else { + return col; + } + }); + let longestRowLength = 0; + const singleColumn = paddedColumns.reduce((a, b) => { + return a.map((_, i) => { + const r = a[i] + b[i]; + longestRowLength = Math.max(longestRowLength, stringWidth(r)); + return r; + }); + }); + if (includeHeaders && hsep !== '') { + singleColumn.splice(1, 0, hsep.repeat(longestRowLength)); + } + return singleColumn.join('\n'); +} +exports.columnar = columnar; diff --git a/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/index.d.ts b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/index.d.ts new file mode 100644 index 0000000..f3632e2 --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/index.d.ts @@ -0,0 +1,4 @@ +export * from './ansi'; +export * from './cursor'; +export * from './format'; +export * from './info'; diff --git a/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/index.js b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/index.js new file mode 100644 index 0000000..94a3118 --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/index.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("tslib"); +tslib_1.__exportStar(require("./ansi"), exports); +tslib_1.__exportStar(require("./cursor"), exports); +tslib_1.__exportStar(require("./format"), exports); +tslib_1.__exportStar(require("./info"), exports); diff --git a/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/info.d.ts b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/info.d.ts new file mode 100644 index 0000000..614bc03 --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/info.d.ts @@ -0,0 +1,26 @@ +/** + * These environment variables work for: GitHub Actions, Travis CI, CircleCI, + * Gitlab CI, AppVeyor, CodeShip, Jenkins, TeamCity, Bitbucket Pipelines, AWS + * CodeBuild + */ +export declare const CI_ENVIRONMENT_VARIABLES: readonly string[]; +export declare const CI_ENVIRONMENT_VARIABLES_DETECTED: string[]; +export interface TerminalInfo { + /** + * Whether this is in CI or not. + */ + readonly ci: boolean; + /** + * Path to the user's shell program. + */ + readonly shell: string; + /** + * Whether the terminal is an interactive TTY or not. + */ + readonly tty: boolean; + /** + * Whether this is a Windows shell or not. + */ + readonly windows: boolean; +} +export declare const TERMINAL_INFO: TerminalInfo; diff --git a/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/info.js b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/info.js new file mode 100644 index 0000000..94b3b70 --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/dist/info.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TERMINAL_INFO = exports.CI_ENVIRONMENT_VARIABLES_DETECTED = exports.CI_ENVIRONMENT_VARIABLES = void 0; +const Debug = require("debug"); +const os = require("os"); +const debug = Debug('ionic:utils-terminal:info'); +/** + * These environment variables work for: GitHub Actions, Travis CI, CircleCI, + * Gitlab CI, AppVeyor, CodeShip, Jenkins, TeamCity, Bitbucket Pipelines, AWS + * CodeBuild + */ +exports.CI_ENVIRONMENT_VARIABLES = ['CI', 'BUILD_ID', 'BUILD_NUMBER', 'BITBUCKET_COMMIT', 'CODEBUILD_BUILD_ARN', 'GITHUB_ACTIONS']; +exports.CI_ENVIRONMENT_VARIABLES_DETECTED = exports.CI_ENVIRONMENT_VARIABLES.filter(v => !!process.env[v]); +function getShell() { + const { shell } = os.userInfo(); + if (shell) { + return shell; + } + if (process.env.SHELL) { + return process.env.SHELL; + } + if (process.platform === 'darwin') { + return '/bin/bash'; + } + if (process.platform === 'win32') { + return process.env.COMSPEC ? process.env.COMSPEC : 'cmd.exe'; + } + return '/bin/sh'; +} +if (exports.CI_ENVIRONMENT_VARIABLES_DETECTED.length > 0) { + debug(`Environment variables for CI detected: ${exports.CI_ENVIRONMENT_VARIABLES_DETECTED.join(', ')}`); +} +exports.TERMINAL_INFO = Object.freeze({ + ci: exports.CI_ENVIRONMENT_VARIABLES_DETECTED.length > 0, + shell: getShell(), + tty: Boolean(process.stdin.isTTY && process.stdout.isTTY && process.stderr.isTTY), + windows: process.platform === 'win32' || !!(process.env.OSTYPE && /^(msys|cygwin)$/.test(process.env.OSTYPE) || + process.env.MSYSTEM && /^MINGW(32|64)$/.test(process.env.MSYSTEM)), +}); diff --git a/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/package.json b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/package.json new file mode 100644 index 0000000..631891c --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal/package.json @@ -0,0 +1,58 @@ +{ + "name": "@ionic/utils-terminal", + "version": "2.3.4", + "description": "Terminal utils for NodeJS", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "homepage": "https://ionicframework.com/", + "author": "Ionic Team (https://ionic.io)", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + }, + "files": [ + "dist/", + "LICENSE", + "README.md" + ], + "repository": { + "type": "git", + "url": "https://github.com/ionic-team/ionic-cli.git" + }, + "bugs": { + "url": "https://github.com/ionic-team/ionic-cli/issues" + }, + "scripts": { + "clean": "rimraf dist", + "lint": "true", + "build": "npm run clean && tsc", + "watch": "tsc -w --preserveWatchOutput", + "test": "jest --maxWorkers=4", + "prepublishOnly": "npm run build" + }, + "dependencies": { + "@types/slice-ansi": "^4.0.0", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "tslib": "^2.0.1", + "untildify": "^4.0.0", + "wrap-ansi": "^7.0.0" + }, + "devDependencies": { + "@types/debug": "^4.1.1", + "@types/jest": "^26.0.10", + "@types/node": "~16.0.0", + "@types/signal-exit": "^3.0.0", + "@types/wrap-ansi": "^3.0.0", + "jest": "^26.4.2", + "jest-cli": "^26.0.1", + "lint-staged": "^10.0.2", + "rimraf": "^3.0.0", + "ts-jest": "~26.3.0", + "typescript": "~4.8.0" + }, + "gitHead": "15ef6e7da4eace4fd55d16fd9508d156a4bc8203" +} diff --git a/node_modules/@ionic/utils-subprocess/package.json b/node_modules/@ionic/utils-subprocess/package.json new file mode 100644 index 0000000..e6d19ce --- /dev/null +++ b/node_modules/@ionic/utils-subprocess/package.json @@ -0,0 +1,55 @@ +{ + "name": "@ionic/utils-subprocess", + "version": "2.1.14", + "description": "Subprocess utils for NodeJS", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "homepage": "https://ionicframework.com/", + "author": "Ionic Team (https://ionic.io)", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + }, + "files": [ + "dist/", + "LICENSE", + "README.md" + ], + "repository": { + "type": "git", + "url": "https://github.com/ionic-team/ionic-cli.git" + }, + "bugs": { + "url": "https://github.com/ionic-team/ionic-cli/issues" + }, + "scripts": { + "clean": "rimraf dist", + "lint": "true", + "build": "npm run clean && tsc", + "watch": "tsc -w --preserveWatchOutput", + "test": "jest --maxWorkers=4", + "prepublishOnly": "npm run build" + }, + "dependencies": { + "@ionic/utils-array": "2.1.6", + "@ionic/utils-fs": "3.1.7", + "@ionic/utils-process": "2.1.11", + "@ionic/utils-stream": "3.1.6", + "@ionic/utils-terminal": "2.3.4", + "cross-spawn": "^7.0.3", + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "devDependencies": { + "@types/cross-spawn": "^6.0.0", + "@types/debug": "^4.1.1", + "@types/jest": "^26.0.10", + "@types/node": "~16.0.0", + "jest": "^26.4.2", + "jest-cli": "^26.0.1", + "lint-staged": "^10.0.2", + "rimraf": "^3.0.0", + "ts-jest": "~26.3.0", + "typescript": "~4.8.0" + } +} diff --git a/node_modules/@ionic/utils-terminal/LICENSE b/node_modules/@ionic/utils-terminal/LICENSE new file mode 100644 index 0000000..7c5808c --- /dev/null +++ b/node_modules/@ionic/utils-terminal/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Drifty Co + +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/@ionic/utils-terminal/README.md b/node_modules/@ionic/utils-terminal/README.md new file mode 100644 index 0000000..735a564 --- /dev/null +++ b/node_modules/@ionic/utils-terminal/README.md @@ -0,0 +1 @@ +# @ionic/utils-terminal diff --git a/node_modules/@ionic/utils-terminal/dist/ansi.d.ts b/node_modules/@ionic/utils-terminal/dist/ansi.d.ts new file mode 100644 index 0000000..6cacec4 --- /dev/null +++ b/node_modules/@ionic/utils-terminal/dist/ansi.d.ts @@ -0,0 +1,19 @@ +/** + * ANSI escape codes (WIP) + * + * @see https://en.wikipedia.org/wiki/ANSI_escape_code + */ +export declare class EscapeCode { + static readonly cursorLeft: () => string; + static readonly cursorUp: (count?: number) => string; + static readonly cursorDown: (count?: number) => string; + static readonly cursorForward: (count?: number) => string; + static readonly cursorBackward: (count?: number) => string; + static readonly cursorHide: () => string; + static readonly cursorShow: () => string; + static readonly eraseLine: () => string; + static readonly eraseLines: (count: number) => string; + static readonly eraseUp: () => string; + static readonly eraseDown: () => string; + static readonly eraseScreen: () => string; +} diff --git a/node_modules/@ionic/utils-terminal/dist/ansi.js b/node_modules/@ionic/utils-terminal/dist/ansi.js new file mode 100644 index 0000000..3f5ca57 --- /dev/null +++ b/node_modules/@ionic/utils-terminal/dist/ansi.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EscapeCode = void 0; +const ESC = '\u001B['; +/** + * ANSI escape codes (WIP) + * + * @see https://en.wikipedia.org/wiki/ANSI_escape_code + */ +class EscapeCode { +} +exports.EscapeCode = EscapeCode; +EscapeCode.cursorLeft = () => `${ESC}G`; +EscapeCode.cursorUp = (count = 1) => `${ESC}${count}A`; +EscapeCode.cursorDown = (count = 1) => `${ESC}${count}B`; +EscapeCode.cursorForward = (count = 1) => `${ESC}${count}C`; +EscapeCode.cursorBackward = (count = 1) => `${ESC}${count}D`; +EscapeCode.cursorHide = () => `${ESC}?25l`; +EscapeCode.cursorShow = () => `${ESC}?25h`; +EscapeCode.eraseLine = () => `${ESC}2K`; +EscapeCode.eraseLines = (count) => { + let seq = ''; + for (let i = 0; i < count; i++) { + seq += EscapeCode.eraseLine(); + if (i < count - 1) { + seq += EscapeCode.cursorUp(); + } + } + return `${seq}${EscapeCode.cursorLeft()}`; +}; +EscapeCode.eraseUp = () => `${ESC}1J`; +EscapeCode.eraseDown = () => `${ESC}J`; +EscapeCode.eraseScreen = () => `${ESC}2J`; diff --git a/node_modules/@ionic/utils-terminal/dist/cursor.d.ts b/node_modules/@ionic/utils-terminal/dist/cursor.d.ts new file mode 100644 index 0000000..1ca8e6a --- /dev/null +++ b/node_modules/@ionic/utils-terminal/dist/cursor.d.ts @@ -0,0 +1,9 @@ +/// +export declare class Cursor { + static stream: NodeJS.WriteStream; + private static _isVisible; + private static _listenerAttached; + static show(): void; + static hide(): void; + static toggle(): void; +} diff --git a/node_modules/@ionic/utils-terminal/dist/cursor.js b/node_modules/@ionic/utils-terminal/dist/cursor.js new file mode 100644 index 0000000..16a1921 --- /dev/null +++ b/node_modules/@ionic/utils-terminal/dist/cursor.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Cursor = void 0; +const tslib_1 = require("tslib"); +const signal_exit_1 = tslib_1.__importDefault(require("signal-exit")); +const ansi_1 = require("./ansi"); +class Cursor { + static show() { + if (Cursor.stream.isTTY) { + Cursor._isVisible = true; + Cursor.stream.write(ansi_1.EscapeCode.cursorShow()); + } + } + static hide() { + if (Cursor.stream.isTTY) { + if (!Cursor._listenerAttached) { + (0, signal_exit_1.default)(() => { + Cursor.show(); + }); + Cursor._listenerAttached = true; + } + Cursor._isVisible = false; + Cursor.stream.write(ansi_1.EscapeCode.cursorHide()); + } + } + static toggle() { + if (Cursor._isVisible) { + Cursor.hide(); + } + else { + Cursor.show(); + } + } +} +exports.Cursor = Cursor; +Cursor.stream = process.stderr; +Cursor._isVisible = true; +Cursor._listenerAttached = false; diff --git a/node_modules/@ionic/utils-terminal/dist/format.d.ts b/node_modules/@ionic/utils-terminal/dist/format.d.ts new file mode 100644 index 0000000..61d4cee --- /dev/null +++ b/node_modules/@ionic/utils-terminal/dist/format.d.ts @@ -0,0 +1,35 @@ +import sliceAnsi = require('slice-ansi'); +import stringWidth = require('string-width'); +import stripAnsi = require('strip-ansi'); +export { sliceAnsi, stringWidth, stripAnsi }; +export declare const TTY_WIDTH: number; +export declare function indent(n?: number): string; +export interface WordWrapOptions { + width?: number; + indentation?: number; + append?: string; +} +export declare function wordWrap(msg: string, { width, indentation, append }: WordWrapOptions): string; +export declare function prettyPath(p: string): string; +export declare function expandPath(p: string): string; +export declare function generateFillSpaceStringList(list: string[], optimalLength?: number, fillCharacter?: string): string[]; +export interface ColumnarOptions { + hsep?: string; + vsep?: string; + headers?: string[]; +} +/** + * Basic CLI table generator with support for ANSI colors. + * + * @param rows 2-dimensional matrix containing cells. An array of columns, + * which are arrays of cells. + * @param options.vsep The vertical separator character, default is + * `chalk.dim('|')`. Supply an empty string to hide + * the separator altogether. + * @param options.hsep The horizontal separator character, default is + * `chalk.dim('-')`. This is used under the headers, + * if supplied. Supply an empty string to hide the + * separator altogether. + * @param options.headers An array of header cells. + */ +export declare function columnar(rows: string[][], { hsep, vsep, headers }: ColumnarOptions): string; diff --git a/node_modules/@ionic/utils-terminal/dist/format.js b/node_modules/@ionic/utils-terminal/dist/format.js new file mode 100644 index 0000000..eb37448 --- /dev/null +++ b/node_modules/@ionic/utils-terminal/dist/format.js @@ -0,0 +1,123 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.columnar = exports.generateFillSpaceStringList = exports.expandPath = exports.prettyPath = exports.wordWrap = exports.indent = exports.TTY_WIDTH = exports.stripAnsi = exports.stringWidth = exports.sliceAnsi = void 0; +const tslib_1 = require("tslib"); +const os = tslib_1.__importStar(require("os")); +const path = tslib_1.__importStar(require("path")); +const sliceAnsi = require("slice-ansi"); +exports.sliceAnsi = sliceAnsi; +const stringWidth = require("string-width"); +exports.stringWidth = stringWidth; +const stripAnsi = require("strip-ansi"); +exports.stripAnsi = stripAnsi; +const wrapAnsi = require("wrap-ansi"); +const untildify = require("untildify"); +const MIN_TTY_WIDTH = 80; +const MAX_TTY_WIDTH = 120; +exports.TTY_WIDTH = process.stdout.columns ? Math.max(MIN_TTY_WIDTH, Math.min(process.stdout.columns, MAX_TTY_WIDTH)) : Infinity; +function indent(n = 4) { + return ' '.repeat(n); +} +exports.indent = indent; +function wordWrap(msg, { width = exports.TTY_WIDTH, indentation = 0, append = '' }) { + return wrapAnsi(msg, width - indentation - append.length, { trim: true }).split('\n').join(`${append}\n${indent(indentation)}`); +} +exports.wordWrap = wordWrap; +function prettyPath(p) { + p = expandPath(p); + const cwd = process.cwd(); + const d = path.dirname(p); + const h = os.homedir(); + const distanceFromCwd = Math.abs(d.split(path.sep).length - cwd.split(path.sep).length); + if (cwd === d) { + return '.' + path.sep + path.basename(p); + } + else if (d.startsWith(cwd)) { + return '.' + path.sep + p.substring(cwd.length + 1); + } + else if (distanceFromCwd <= 2) { + const rel = path.relative(cwd, p); + return rel ? rel : '.'; + } + else if (p === h) { + return '~'; + } + else if (p.indexOf(h) === 0) { + return '~' + path.sep + p.substring(h.length + 1); + } + return p; +} +exports.prettyPath = prettyPath; +function expandPath(p) { + return path.resolve(untildify(p)); +} +exports.expandPath = expandPath; +function generateFillSpaceStringList(list, optimalLength = 1, fillCharacter = ' ') { + if (optimalLength < 2) { + optimalLength = 2; + } + const longestItem = Math.max(...list.map(item => stringWidth(item))); + const fullLength = longestItem > optimalLength ? longestItem + 1 : optimalLength; + const fullLengthString = fillCharacter.repeat(fullLength); + return list.map(item => sliceAnsi(fullLengthString, 0, fullLength - stringWidth(item))); +} +exports.generateFillSpaceStringList = generateFillSpaceStringList; +/** + * Basic CLI table generator with support for ANSI colors. + * + * @param rows 2-dimensional matrix containing cells. An array of columns, + * which are arrays of cells. + * @param options.vsep The vertical separator character, default is + * `chalk.dim('|')`. Supply an empty string to hide + * the separator altogether. + * @param options.hsep The horizontal separator character, default is + * `chalk.dim('-')`. This is used under the headers, + * if supplied. Supply an empty string to hide the + * separator altogether. + * @param options.headers An array of header cells. + */ +function columnar(rows, { hsep = '-', vsep = '|', headers }) { + const includeHeaders = headers ? true : false; + if (!rows[0]) { + return ''; + } + const columnCount = headers ? headers.length : rows[0].length; + const columns = headers ? + headers.map(header => [header]) : + rows[0].map(() => []); + for (const row of rows) { + let highestLineCount = 0; + const splitRows = row.map(cell => { + const lines = cell.split('\n'); + highestLineCount = Math.max(highestLineCount, lines.length); + return lines; + }); + for (const rowIndex in row) { + if (columns[rowIndex]) { + columns[rowIndex].push(...splitRows[rowIndex], ...Array(highestLineCount - splitRows[rowIndex].length).fill('')); + } + } + } + const paddedColumns = columns.map((col, columnIndex) => { + if (columnIndex < columnCount - 1) { + const spaceCol = generateFillSpaceStringList(col); + return col.map((cell, cellIndex) => `${cell}${spaceCol[cellIndex]}${vsep === '' ? '' : `${vsep} `}`); + } + else { + return col; + } + }); + let longestRowLength = 0; + const singleColumn = paddedColumns.reduce((a, b) => { + return a.map((_, i) => { + const r = a[i] + b[i]; + longestRowLength = Math.max(longestRowLength, stringWidth(r)); + return r; + }); + }); + if (includeHeaders && hsep !== '') { + singleColumn.splice(1, 0, hsep.repeat(longestRowLength)); + } + return singleColumn.join('\n'); +} +exports.columnar = columnar; diff --git a/node_modules/@ionic/utils-terminal/dist/index.d.ts b/node_modules/@ionic/utils-terminal/dist/index.d.ts new file mode 100644 index 0000000..f3632e2 --- /dev/null +++ b/node_modules/@ionic/utils-terminal/dist/index.d.ts @@ -0,0 +1,4 @@ +export * from './ansi'; +export * from './cursor'; +export * from './format'; +export * from './info'; diff --git a/node_modules/@ionic/utils-terminal/dist/index.js b/node_modules/@ionic/utils-terminal/dist/index.js new file mode 100644 index 0000000..94a3118 --- /dev/null +++ b/node_modules/@ionic/utils-terminal/dist/index.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("tslib"); +tslib_1.__exportStar(require("./ansi"), exports); +tslib_1.__exportStar(require("./cursor"), exports); +tslib_1.__exportStar(require("./format"), exports); +tslib_1.__exportStar(require("./info"), exports); diff --git a/node_modules/@ionic/utils-terminal/dist/info.d.ts b/node_modules/@ionic/utils-terminal/dist/info.d.ts new file mode 100644 index 0000000..614bc03 --- /dev/null +++ b/node_modules/@ionic/utils-terminal/dist/info.d.ts @@ -0,0 +1,26 @@ +/** + * These environment variables work for: GitHub Actions, Travis CI, CircleCI, + * Gitlab CI, AppVeyor, CodeShip, Jenkins, TeamCity, Bitbucket Pipelines, AWS + * CodeBuild + */ +export declare const CI_ENVIRONMENT_VARIABLES: readonly string[]; +export declare const CI_ENVIRONMENT_VARIABLES_DETECTED: string[]; +export interface TerminalInfo { + /** + * Whether this is in CI or not. + */ + readonly ci: boolean; + /** + * Path to the user's shell program. + */ + readonly shell: string; + /** + * Whether the terminal is an interactive TTY or not. + */ + readonly tty: boolean; + /** + * Whether this is a Windows shell or not. + */ + readonly windows: boolean; +} +export declare const TERMINAL_INFO: TerminalInfo; diff --git a/node_modules/@ionic/utils-terminal/dist/info.js b/node_modules/@ionic/utils-terminal/dist/info.js new file mode 100644 index 0000000..2140ffb --- /dev/null +++ b/node_modules/@ionic/utils-terminal/dist/info.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TERMINAL_INFO = exports.CI_ENVIRONMENT_VARIABLES_DETECTED = exports.CI_ENVIRONMENT_VARIABLES = void 0; +const tslib_1 = require("tslib"); +const debug_1 = require("debug"); +const os = tslib_1.__importStar(require("os")); +const debug = (0, debug_1.debug)('ionic:utils-terminal:info'); +/** + * These environment variables work for: GitHub Actions, Travis CI, CircleCI, + * Gitlab CI, AppVeyor, CodeShip, Jenkins, TeamCity, Bitbucket Pipelines, AWS + * CodeBuild + */ +exports.CI_ENVIRONMENT_VARIABLES = ['CI', 'BUILD_ID', 'BUILD_NUMBER', 'BITBUCKET_COMMIT', 'CODEBUILD_BUILD_ARN', 'GITHUB_ACTIONS']; +exports.CI_ENVIRONMENT_VARIABLES_DETECTED = exports.CI_ENVIRONMENT_VARIABLES.filter(v => !!process.env[v]); +function getShell() { + const { shell } = os.userInfo(); + if (shell) { + return shell; + } + if (process.env.SHELL) { + return process.env.SHELL; + } + if (process.platform === 'darwin') { + return '/bin/bash'; + } + if (process.platform === 'win32') { + return process.env.COMSPEC ? process.env.COMSPEC : 'cmd.exe'; + } + return '/bin/sh'; +} +if (exports.CI_ENVIRONMENT_VARIABLES_DETECTED.length > 0) { + debug(`Environment variables for CI detected: ${exports.CI_ENVIRONMENT_VARIABLES_DETECTED.join(', ')}`); +} +exports.TERMINAL_INFO = Object.freeze({ + ci: exports.CI_ENVIRONMENT_VARIABLES_DETECTED.length > 0, + shell: getShell(), + tty: Boolean(process.stdin.isTTY && process.stdout.isTTY && process.stderr.isTTY), + windows: process.platform === 'win32' || !!(process.env.OSTYPE && /^(msys|cygwin)$/.test(process.env.OSTYPE) || + process.env.MSYSTEM && /^MINGW(32|64)$/.test(process.env.MSYSTEM)), +}); diff --git a/node_modules/@ionic/utils-terminal/package.json b/node_modules/@ionic/utils-terminal/package.json new file mode 100644 index 0000000..d4e3e53 --- /dev/null +++ b/node_modules/@ionic/utils-terminal/package.json @@ -0,0 +1,57 @@ +{ + "name": "@ionic/utils-terminal", + "version": "2.3.5", + "description": "Terminal utils for NodeJS", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "homepage": "https://ionicframework.com/", + "author": "Ionic Team (https://ionic.io)", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + }, + "files": [ + "dist/", + "LICENSE", + "README.md" + ], + "repository": { + "type": "git", + "url": "https://github.com/ionic-team/ionic-cli.git" + }, + "bugs": { + "url": "https://github.com/ionic-team/ionic-cli/issues" + }, + "scripts": { + "clean": "rimraf dist", + "lint": "true", + "build": "npm run clean && tsc", + "watch": "tsc -w --preserveWatchOutput", + "test": "jest --maxWorkers=4", + "prepublishOnly": "npm run build" + }, + "dependencies": { + "@types/slice-ansi": "^4.0.0", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "tslib": "^2.0.1", + "untildify": "^4.0.0", + "wrap-ansi": "^7.0.0" + }, + "devDependencies": { + "@types/debug": "^4.1.1", + "@types/jest": "^26.0.10", + "@types/node": "~16.0.0", + "@types/signal-exit": "^3.0.0", + "@types/wrap-ansi": "^3.0.0", + "jest": "^26.4.2", + "jest-cli": "^26.0.1", + "lint-staged": "^10.0.2", + "rimraf": "^3.0.0", + "ts-jest": "~26.3.0", + "typescript": "~4.8.0" + } +} diff --git a/node_modules/@types/fs-extra/LICENSE b/node_modules/@types/fs-extra/LICENSE new file mode 100644 index 0000000..9e841e7 --- /dev/null +++ b/node_modules/@types/fs-extra/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + 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/@types/fs-extra/README.md b/node_modules/@types/fs-extra/README.md new file mode 100644 index 0000000..e6ec032 --- /dev/null +++ b/node_modules/@types/fs-extra/README.md @@ -0,0 +1,15 @@ +# Installation +> `npm install --save @types/fs-extra` + +# Summary +This package contains type definitions for fs-extra (https://github.com/jprichardson/node-fs-extra). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra/v8. + +### Additional Details + * Last updated: Tue, 07 Nov 2023 20:08:00 GMT + * Dependencies: [@types/node](https://npmjs.com/package/@types/node) + +# Credits +These definitions were written by [Alan Agius](https://github.com/alan-agius4), [midknight41](https://github.com/midknight41), [Brendan Forster](https://github.com/shiftkey), [Mees van Dijk](https://github.com/mees-), [Justin Rockwood](https://github.com/jrockwood), [Sang Dang](https://github.com/sangdth), [Florian Keller](https://github.com/ffflorian), and [Piotr Błażejewicz](https://github.com/peterblazejewicz). diff --git a/node_modules/@types/fs-extra/index.d.ts b/node_modules/@types/fs-extra/index.d.ts new file mode 100644 index 0000000..1271afd --- /dev/null +++ b/node_modules/@types/fs-extra/index.d.ts @@ -0,0 +1,465 @@ +/// + +import * as fs from "fs"; +import Stats = fs.Stats; + +export * from "fs"; + +export function copy(src: string, dest: string, options?: CopyOptions): Promise; +export function copy(src: string, dest: string, callback: (err: Error) => void): void; +export function copy(src: string, dest: string, options: CopyOptions, callback: (err: Error) => void): void; +export function copySync(src: string, dest: string, options?: CopyOptionsSync): void; + +export function copyFile(src: string, dest: string, flags?: number): Promise; +export function copyFile(src: string, dest: string, callback: (err: Error) => void): void; +export function copyFile(src: string, dest: string, flags: number, callback: (err: Error) => void): void; + +export function move(src: string, dest: string, options?: MoveOptions): Promise; +export function move(src: string, dest: string, callback: (err: Error) => void): void; +export function move(src: string, dest: string, options: MoveOptions, callback: (err: Error) => void): void; +export function moveSync(src: string, dest: string, options?: MoveOptions): void; + +export function createFile(file: string): Promise; +export function createFile(file: string, callback: (err: Error) => void): void; +export function createFileSync(file: string): void; + +export function createSymlink(src: string, dest: string, type: SymlinkType): Promise; +export function createSymlink(src: string, dest: string, type: SymlinkType, callback?: (err: Error) => void): void; +export function createSymlinkSync(src: string, dest: string, type: SymlinkType): void; + +export function ensureDir(path: string, options?: EnsureOptions | number): Promise; +export function ensureDir(path: string, options?: EnsureOptions | number, callback?: (err: Error) => void): void; +export function ensureDirSync(path: string, options?: EnsureOptions | number): void; + +export function mkdirs(dir: string): Promise; +export function mkdirs(dir: string, callback: (err: Error) => void): void; +export function mkdirp(dir: string): Promise; +export function mkdirp(dir: string, callback: (err: Error) => void): void; +export function mkdirsSync(dir: string): void; +export function mkdirpSync(dir: string): void; + +export function outputFile(file: string, data: any, options?: WriteFileOptions | string): Promise; +export function outputFile(file: string, data: any, callback: (err: Error) => void): void; +export function outputFile( + file: string, + data: any, + options: WriteFileOptions | string, + callback: (err: Error) => void, +): void; +export function outputFileSync(file: string, data: any, options?: WriteFileOptions | string): void; + +export function readJson(file: string, options?: ReadOptions): Promise; +export function readJson(file: string, callback: (err: Error, jsonObject: any) => void): void; +export function readJson(file: string, options: ReadOptions, callback: (err: Error, jsonObject: any) => void): void; +export function readJSON(file: string, options?: ReadOptions): Promise; +export function readJSON(file: string, callback: (err: Error, jsonObject: any) => void): void; +export function readJSON(file: string, options: ReadOptions, callback: (err: Error, jsonObject: any) => void): void; + +export function readJsonSync(file: string, options?: ReadOptions): any; +export function readJSONSync(file: string, options?: ReadOptions): any; + +export function remove(dir: string): Promise; +export function remove(dir: string, callback: (err: Error) => void): void; +export function removeSync(dir: string): void; + +export function outputJSON(file: string, data: any, options?: WriteOptions): Promise; +export function outputJSON(file: string, data: any, options: WriteOptions, callback: (err: Error) => void): void; +export function outputJSON(file: string, data: any, callback: (err: Error) => void): void; +export function outputJson(file: string, data: any, options?: WriteOptions): Promise; +export function outputJson(file: string, data: any, options: WriteOptions, callback: (err: Error) => void): void; +export function outputJson(file: string, data: any, callback: (err: Error) => void): void; +export function outputJsonSync(file: string, data: any, options?: WriteOptions): void; +export function outputJSONSync(file: string, data: any, options?: WriteOptions): void; + +export function writeJSON(file: string, object: any, options?: WriteOptions): Promise; +export function writeJSON(file: string, object: any, callback: (err: Error) => void): void; +export function writeJSON(file: string, object: any, options: WriteOptions, callback: (err: Error) => void): void; +export function writeJson(file: string, object: any, options?: WriteOptions): Promise; +export function writeJson(file: string, object: any, callback: (err: Error) => void): void; +export function writeJson(file: string, object: any, options: WriteOptions, callback: (err: Error) => void): void; + +export function writeJsonSync(file: string, object: any, options?: WriteOptions): void; +export function writeJSONSync(file: string, object: any, options?: WriteOptions): void; + +export function ensureFile(path: string): Promise; +export function ensureFile(path: string, callback: (err: Error) => void): void; +export function ensureFileSync(path: string): void; + +export function ensureLink(src: string, dest: string): Promise; +export function ensureLink(src: string, dest: string, callback: (err: Error) => void): void; +export function ensureLinkSync(src: string, dest: string): void; + +export function ensureSymlink(src: string, dest: string, type?: SymlinkType): Promise; +export function ensureSymlink(src: string, dest: string, type: SymlinkType, callback: (err: Error) => void): void; +export function ensureSymlink(src: string, dest: string, callback: (err: Error) => void): void; +export function ensureSymlinkSync(src: string, dest: string, type?: SymlinkType): void; + +export function emptyDir(path: string): Promise; +export function emptyDir(path: string, callback: (err: Error) => void): void; +export function emptyDirSync(path: string): void; + +export function pathExists(path: string): Promise; +export function pathExists(path: string, callback: (err: Error, exists: boolean) => void): void; +export function pathExistsSync(path: string): boolean; + +// fs async methods +// copied from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v6/index.d.ts + +export function access(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; +export function access(path: string | Buffer, mode: number, callback: (err: NodeJS.ErrnoException) => void): void; +export function access(path: string | Buffer, mode?: number): Promise; + +export function appendFile( + file: string | Buffer | number, + data: any, + options: { encoding?: string | undefined; mode?: number | string | undefined; flag?: string | undefined }, + callback: (err: NodeJS.ErrnoException) => void, +): void; +export function appendFile( + file: string | Buffer | number, + data: any, + callback: (err: NodeJS.ErrnoException) => void, +): void; +export function appendFile( + file: string | Buffer | number, + data: any, + options?: { encoding?: string | undefined; mode?: number | string | undefined; flag?: string | undefined }, +): Promise; + +export function chmod( + path: string | Buffer, + mode: string | number, + callback: (err: NodeJS.ErrnoException) => void, +): void; +export function chmod(path: string | Buffer, mode: string | number): Promise; + +export function chown(path: string | Buffer, uid: number, gid: number): Promise; +export function chown( + path: string | Buffer, + uid: number, + gid: number, + callback: (err: NodeJS.ErrnoException) => void, +): void; + +export function close(fd: number, callback: (err: NodeJS.ErrnoException) => void): void; +export function close(fd: number): Promise; + +export function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void; +export function fchmod(fd: number, mode: string | number): Promise; + +export function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void; +export function fchown(fd: number, uid: number, gid: number): Promise; + +export function fdatasync(fd: number, callback: () => void): void; +export function fdatasync(fd: number): Promise; + +export function fstat(fd: number, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void; +export function fstat(fd: number): Promise; + +export function fsync(fd: number, callback: (err: NodeJS.ErrnoException) => void): void; +export function fsync(fd: number): Promise; + +export function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException) => void): void; +export function ftruncate(fd: number, len: number, callback: (err: NodeJS.ErrnoException) => void): void; +export function ftruncate(fd: number, len?: number): Promise; + +export function futimes(fd: number, atime: number, mtime: number, callback: (err: NodeJS.ErrnoException) => void): void; +export function futimes(fd: number, atime: Date, mtime: Date, callback: (err: NodeJS.ErrnoException) => void): void; +export function futimes(fd: number, atime: number, mtime: number): Promise; +export function futimes(fd: number, atime: Date, mtime: Date): Promise; + +export function lchown( + path: string | Buffer, + uid: number, + gid: number, + callback: (err: NodeJS.ErrnoException) => void, +): void; +export function lchown(path: string | Buffer, uid: number, gid: number): Promise; + +export function link( + srcpath: string | Buffer, + dstpath: string | Buffer, + callback: (err: NodeJS.ErrnoException) => void, +): void; +export function link(srcpath: string | Buffer, dstpath: string | Buffer): Promise; + +export function lstat(path: string | Buffer, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void; +export function lstat(path: string | Buffer): Promise; + +/** + * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. + * + * @param callback No arguments other than a possible exception are given to the completion callback. + */ +export function mkdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; +/** + * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. + * + * @param callback No arguments other than a possible exception are given to the completion callback. + */ +export function mkdir( + path: string | Buffer, + mode: number | string, + callback: (err: NodeJS.ErrnoException) => void, +): void; +export function mkdir(path: string | Buffer): Promise; + +export function open( + path: string | Buffer, + flags: string | number, + callback: (err: NodeJS.ErrnoException, fd: number) => void, +): void; +export function open( + path: string | Buffer, + flags: string | number, + mode: number, + callback: (err: NodeJS.ErrnoException, fd: number) => void, +): void; +export function open(path: string | Buffer, flags: string | number, mode?: number): Promise; + +export function read( + fd: number, + buffer: Buffer, + offset: number, + length: number, + position: number | null, + callback: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void, +): void; +export function read( + fd: number, + buffer: Buffer, + offset: number, + length: number, + position: number | null, +): Promise; + +export function readFile( + file: string | Buffer | number, + callback: (err: NodeJS.ErrnoException, data: Buffer) => void, +): void; +export function readFile( + file: string | Buffer | number, + encoding: string, + callback: (err: NodeJS.ErrnoException, data: string) => void, +): void; +export function readFile( + file: string | Buffer | number, + options: { flag?: string | undefined } | { encoding: string; flag?: string | undefined }, + callback: (err: NodeJS.ErrnoException, data: Buffer) => void, +): void; +export function readFile( + file: string | Buffer | number, + options: { flag?: string | undefined } | { encoding: string; flag?: string | undefined }, +): Promise; +// tslint:disable-next-line:unified-signatures +export function readFile(file: string | Buffer | number, encoding: string): Promise; +export function readFile(file: string | Buffer | number): Promise; + +export function readdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void; +export function readdir(path: string | Buffer): Promise; + +export function readlink( + path: string | Buffer, + callback: (err: NodeJS.ErrnoException, linkString: string) => any, +): void; +export function readlink(path: string | Buffer): Promise; + +export function realpath( + path: string | Buffer, + callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any, +): void; +export function realpath( + path: string | Buffer, + cache: { [path: string]: string }, + callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any, +): void; +export function realpath(path: string | Buffer, cache?: { [path: string]: string }): Promise; + +export function rename(oldPath: string, newPath: string, callback: (err: NodeJS.ErrnoException) => void): void; +export function rename(oldPath: string, newPath: string): Promise; + +/** + * Asynchronous rmdir - removes the directory specified in {path} + * + * @param callback No arguments other than a possible exception are given to the completion callback. + */ +export function rmdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; +export function rmdir(path: string | Buffer): Promise; + +export function stat(path: string | Buffer, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void; +export function stat(path: string | Buffer): Promise; + +export function symlink( + srcpath: string | Buffer, + dstpath: string | Buffer, + type: FsSymlinkType | undefined, + callback: (err: NodeJS.ErrnoException) => void, +): void; +export function symlink( + srcpath: string | Buffer, + dstpath: string | Buffer, + callback: (err: NodeJS.ErrnoException) => void, +): void; +export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type?: FsSymlinkType): Promise; + +export function truncate(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; +export function truncate(path: string | Buffer, len: number, callback: (err: NodeJS.ErrnoException) => void): void; +export function truncate(path: string | Buffer, len?: number): Promise; + +/** + * Asynchronous unlink - deletes the file specified in {path} + * + * @param callback No arguments other than a possible exception are given to the completion callback. + */ +export function unlink(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; +export function unlink(path: string | Buffer): Promise; + +export function utimes( + path: string | Buffer, + atime: number, + mtime: number, + callback: (err: NodeJS.ErrnoException) => void, +): void; +export function utimes( + path: string | Buffer, + atime: Date, + mtime: Date, + callback: (err: NodeJS.ErrnoException) => void, +): void; +export function utimes(path: string | Buffer, atime: number, mtime: number): Promise; +export function utimes(path: string | Buffer, atime: Date, mtime: Date): Promise; + +export function write( + fd: number, + buffer: Buffer, + offset: number, + length: number, + position: number | null, + callback: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void, +): void; +export function write( + fd: number, + buffer: Buffer, + offset: number, + length: number, + callback: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void, +): void; +export function write( + fd: number, + data: any, + callback: (err: NodeJS.ErrnoException, written: number, str: string) => void, +): void; +export function write( + fd: number, + data: any, + offset: number, + callback: (err: NodeJS.ErrnoException, written: number, str: string) => void, +): void; +export function write( + fd: number, + data: any, + offset: number, + encoding: string, + callback: (err: NodeJS.ErrnoException, written: number, str: string) => void, +): void; +export function write( + fd: number, + buffer: Buffer, + offset?: number, + length?: number, + position?: number | null, +): Promise; +export function write(fd: number, data: any, offset?: number, encoding?: string): Promise; + +export function writeFile( + file: string | Buffer | number, + data: any, + callback: (err: NodeJS.ErrnoException) => void, +): void; +export function writeFile( + file: string | Buffer | number, + data: any, + options?: WriteFileOptions | string, +): Promise; +export function writeFile( + file: string | Buffer | number, + data: any, + options: WriteFileOptions | string, + callback: (err: NodeJS.ErrnoException) => void, +): void; + +/** + * Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * + * @param callback The created folder path is passed as a string to the callback's second parameter. + */ +export function mkdtemp(prefix: string): Promise; +export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException, folder: string) => void): void; + +export interface PathEntry { + path: string; + stats: Stats; +} + +export interface PathEntryStream { + read(): PathEntry | null; +} + +export type CopyFilterSync = (src: string, dest: string) => boolean; +export type CopyFilterAsync = (src: string, dest: string) => Promise; + +export type SymlinkType = "dir" | "file"; +export type FsSymlinkType = "dir" | "file" | "junction"; + +export interface CopyOptions { + dereference?: boolean | undefined; + overwrite?: boolean | undefined; + preserveTimestamps?: boolean | undefined; + errorOnExist?: boolean | undefined; + filter?: CopyFilterSync | CopyFilterAsync | undefined; + recursive?: boolean | undefined; +} + +export interface CopyOptionsSync extends CopyOptions { + filter?: CopyFilterSync | undefined; +} + +export interface EnsureOptions { + mode?: number | undefined; +} + +export interface MoveOptions { + overwrite?: boolean | undefined; + limit?: number | undefined; +} + +export interface ReadOptions { + throws?: boolean | undefined; + fs?: object | undefined; + reviver?: any; + encoding?: string | undefined; + flag?: string | undefined; +} + +export interface WriteFileOptions { + encoding?: string | undefined; + flag?: string | undefined; + mode?: number | undefined; +} + +export interface WriteOptions extends WriteFileOptions { + fs?: object | undefined; + replacer?: any; + spaces?: number | string | undefined; + EOL?: string | undefined; +} + +export interface ReadResult { + bytesRead: number; + buffer: Buffer; +} + +export interface WriteResult { + bytesWritten: number; + buffer: Buffer; +} diff --git a/node_modules/@types/fs-extra/package.json b/node_modules/@types/fs-extra/package.json new file mode 100644 index 0000000..baa2b94 --- /dev/null +++ b/node_modules/@types/fs-extra/package.json @@ -0,0 +1,62 @@ +{ + "name": "@types/fs-extra", + "version": "8.1.5", + "description": "TypeScript definitions for fs-extra", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra", + "license": "MIT", + "contributors": [ + { + "name": "Alan Agius", + "githubUsername": "alan-agius4", + "url": "https://github.com/alan-agius4" + }, + { + "name": "midknight41", + "githubUsername": "midknight41", + "url": "https://github.com/midknight41" + }, + { + "name": "Brendan Forster", + "githubUsername": "shiftkey", + "url": "https://github.com/shiftkey" + }, + { + "name": "Mees van Dijk", + "githubUsername": "mees-", + "url": "https://github.com/mees-" + }, + { + "name": "Justin Rockwood", + "githubUsername": "jrockwood", + "url": "https://github.com/jrockwood" + }, + { + "name": "Sang Dang", + "githubUsername": "sangdth", + "url": "https://github.com/sangdth" + }, + { + "name": "Florian Keller", + "githubUsername": "ffflorian", + "url": "https://github.com/ffflorian" + }, + { + "name": "Piotr Błażejewicz", + "githubUsername": "peterblazejewicz", + "url": "https://github.com/peterblazejewicz" + } + ], + "main": "", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/fs-extra" + }, + "scripts": {}, + "dependencies": { + "@types/node": "*" + }, + "typesPublisherContentHash": "1cc8d75d0201806b11427d94e9dc44be9a30f85f63c161c66d7bd9798d1a6386", + "typeScriptVersion": "4.5" +} \ No newline at end of file diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE new file mode 100644 index 0000000..9e841e7 --- /dev/null +++ b/node_modules/@types/node/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + 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/@types/node/README.md b/node_modules/@types/node/README.md new file mode 100644 index 0000000..f60da35 --- /dev/null +++ b/node_modules/@types/node/README.md @@ -0,0 +1,15 @@ +# Installation +> `npm install --save @types/node` + +# Summary +This package contains type definitions for node (https://nodejs.org/). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. + +### Additional Details + * Last updated: Thu, 01 Oct 2026 22:35:12 GMT + * Dependencies: [undici-types](https://npmjs.com/package/undici-types) + +# Credits +These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), [René](https://github.com/Renegade334), and [Yagiz Nizipli](https://github.com/anonrig). diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts new file mode 100644 index 0000000..72cc91d --- /dev/null +++ b/node_modules/@types/node/assert.d.ts @@ -0,0 +1,1077 @@ +declare module "node:assert" { + import strict = require("node:assert/strict"); + /** + * An alias of {@link assert.ok}. + * @since v0.5.9 + * @param value The input that is checked for being truthy. + */ + function assert( + value: unknown, + message?: Error | assert.AssertMessageFunction, + ): asserts value; + function assert( + value: unknown, + message: string, + ...args: unknown[] + ): asserts value; + const kOptions: unique symbol; + namespace assert { + type AssertMethodNames = + | "deepEqual" + | "deepStrictEqual" + | "doesNotMatch" + | "doesNotReject" + | "doesNotThrow" + | "equal" + | "fail" + | "ifError" + | "match" + | "notDeepEqual" + | "notDeepStrictEqual" + | "notEqual" + | "notStrictEqual" + | "ok" + | "partialDeepStrictEqual" + | "rejects" + | "strictEqual" + | "throws"; + interface AssertOptions { + /** + * If set to `'full'`, shows the full diff in assertion errors. + * @default 'simple' + */ + diff?: "simple" | "full" | undefined; + /** + * If set to `true`, non-strict methods behave like their + * corresponding strict methods. + * @default true + */ + strict?: boolean | undefined; + /** + * If set to `true`, skips prototype and constructor + * comparison in deep equality checks. + * @since v24.9.0 + * @default false + */ + skipPrototype?: boolean | undefined; + } + interface Assert extends Pick { + readonly [kOptions]: AssertOptions & { strict: false }; + } + interface AssertStrict extends Pick { + readonly [kOptions]: AssertOptions & { strict: true }; + } + /** + * The `Assert` class allows creating independent assertion instances with custom options. + * @since v24.6.0 + */ + var Assert: { + /** + * Creates a new assertion instance. The `diff` option controls the verbosity of diffs in assertion error messages. + * + * ```js + * const { Assert } = require('node:assert'); + * const assertInstance = new Assert({ diff: 'full' }); + * assertInstance.deepStrictEqual({ a: 1 }, { a: 2 }); + * // Shows a full diff in the error message. + * ``` + * + * **Important**: When destructuring assertion methods from an `Assert` instance, + * the methods lose their connection to the instance's configuration options (such + * as `diff`, `strict`, and `skipPrototype` settings). + * The destructured methods will fall back to default behavior instead. + * + * ```js + * const myAssert = new Assert({ diff: 'full' }); + * + * // This works as expected - uses 'full' diff + * myAssert.strictEqual({ a: 1 }, { b: { c: 1 } }); + * + * // This loses the 'full' diff setting - falls back to default 'simple' diff + * const { strictEqual } = myAssert; + * strictEqual({ a: 1 }, { b: { c: 1 } }); + * ``` + * + * The `skipPrototype` option affects all deep equality methods: + * + * ```js + * class Foo { + * constructor(a) { + * this.a = a; + * } + * } + * + * class Bar { + * constructor(a) { + * this.a = a; + * } + * } + * + * const foo = new Foo(1); + * const bar = new Bar(1); + * + * // Default behavior - fails due to different constructors + * const assert1 = new Assert(); + * assert1.deepStrictEqual(foo, bar); // AssertionError + * + * // Skip prototype comparison - passes if properties are equal + * const assert2 = new Assert({ skipPrototype: true }); + * assert2.deepStrictEqual(foo, bar); // OK + * ``` + * + * When destructured, methods lose access to the instance's `this` context and revert to default assertion behavior + * (diff: 'simple', non-strict mode). + * To maintain custom options when using destructured methods, avoid + * destructuring and call methods directly on the instance. + * @since v24.6.0 + */ + new( + options?: AssertOptions & { strict?: true | undefined }, + ): AssertStrict; + new( + options: AssertOptions, + ): Assert; + }; + interface AssertionErrorOptions { + /** + * If provided, the error message is set to this value. + */ + message?: string | undefined; + /** + * The `actual` property on the error instance. + */ + actual?: unknown; + /** + * The `expected` property on the error instance. + */ + expected?: unknown; + /** + * The `operator` property on the error instance. + */ + operator?: string | undefined; + /** + * If provided, the generated stack trace omits frames before this function. + */ + stackStartFn?: Function | undefined; + /** + * If set to `'full'`, shows the full diff in assertion errors. + * @default 'simple' + */ + diff?: "simple" | "full" | undefined; + } + /** + * Indicates the failure of an assertion. All errors thrown by the `node:assert` module will be instances of the `AssertionError` class. + */ + class AssertionError extends Error { + constructor(options: AssertionErrorOptions); + /** + * Set to the `actual` argument for methods such as {@link assert.strictEqual()}. + */ + actual: unknown; + /** + * Set to the `expected` argument for methods such as {@link assert.strictEqual()}. + */ + expected: unknown; + /** + * Indicates if the message was auto-generated (`true`) or not. + */ + generatedMessage: boolean; + /** + * Value is always `ERR_ASSERTION` to show that the error is an assertion error. + */ + code: "ERR_ASSERTION"; + /** + * Set to the passed in operator value. + */ + operator: string; + } + type AssertMessageFunction = (actual: unknown, expected: unknown) => string; + type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error; + /** + * Throws an `AssertionError` with the provided error message or a default + * error message. If the `message` parameter is an instance of an `Error` then + * it will be thrown instead of the `AssertionError`. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.fail(); + * // AssertionError [ERR_ASSERTION]: Failed + * + * assert.fail('boom'); + * // AssertionError [ERR_ASSERTION]: boom + * + * assert.fail(new TypeError('need array')); + * // TypeError: need array + * ``` + * @since v0.1.21 + * @param [message='Failed'] + */ + function fail(message?: string | Error): never; + /** + * Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`. + * + * If `value` is not truthy, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is `undefined`, a default + * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. + * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``. + * + * Be aware that in the `repl` the error message will be different to the one + * thrown in a file! See below for further details. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.ok(true); + * // OK + * assert.ok(1); + * // OK + * + * assert.ok(); + * // AssertionError: No value argument passed to `assert.ok()` + * + * assert.ok(false, 'it\'s false'); + * // AssertionError: it's false + * + * // In the repl: + * assert.ok(typeof 123 === 'string'); + * // AssertionError: false == true + * + * // In a file (e.g. test.js): + * assert.ok(typeof 123 === 'string'); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(typeof 123 === 'string') + * + * assert.ok(false); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(false) + * + * assert.ok(0); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(0) + * ``` + * + * ```js + * import assert from 'node:assert/strict'; + * + * // Using `assert()` works the same: + * assert(2 + 2 > 5);; + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert(2 + 2 > 5) + * ``` + * @since v0.1.21 + */ + function ok( + value: unknown, + message?: Error | AssertMessageFunction, + ): asserts value; + function ok( + value: unknown, + message: string, + ...args: unknown[] + ): asserts value; + /** + * **Strict assertion mode** + * + * An alias of {@link strictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link strictEqual} instead. + * + * Tests shallow, coercive equality between the `actual` and `expected` parameters + * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled + * and treated as being identical if both sides are `NaN`. + * + * ```js + * import assert from 'node:assert'; + * + * assert.equal(1, 1); + * // OK, 1 == 1 + * assert.equal(1, '1'); + * // OK, 1 == '1' + * assert.equal(NaN, NaN); + * // OK + * + * assert.equal(1, 2); + * // AssertionError: 1 == 2 + * assert.equal({ a: { b: 1 } }, { a: { b: 1 } }); + * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } } + * ``` + * + * If the values are not equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default + * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. + * @since v0.1.21 + */ + function equal( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function equal( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * **Strict assertion mode** + * + * An alias of {@link notStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead. + * + * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is + * specially handled and treated as being identical if both sides are `NaN`. + * + * ```js + * import assert from 'node:assert'; + * + * assert.notEqual(1, 2); + * // OK + * + * assert.notEqual(1, 1); + * // AssertionError: 1 != 1 + * + * assert.notEqual(1, '1'); + * // AssertionError: 1 != '1' + * ``` + * + * If the values are equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default error + * message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. + * @since v0.1.21 + */ + function notEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function notEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * **Strict assertion mode** + * + * An alias of {@link deepStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead. + * + * Tests for deep equality between the `actual` and `expected` parameters. Consider + * using {@link deepStrictEqual} instead. {@link deepEqual} can have + * surprising results. + * + * _Deep equality_ means that the enumerable "own" properties of child objects + * are also recursively evaluated by the following rules. + * @since v0.1.21 + */ + function deepEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function deepEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * **Strict assertion mode** + * + * An alias of {@link notDeepStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead. + * + * Tests for any deep inequality. Opposite of {@link deepEqual}. + * + * ```js + * import assert from 'node:assert'; + * + * const obj1 = { + * a: { + * b: 1, + * }, + * }; + * const obj2 = { + * a: { + * b: 2, + * }, + * }; + * const obj3 = { + * a: { + * b: 1, + * }, + * }; + * const obj4 = { __proto__: obj1 }; + * + * assert.notDeepEqual(obj1, obj1); + * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } + * + * assert.notDeepEqual(obj1, obj2); + * // OK + * + * assert.notDeepEqual(obj1, obj3); + * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } + * + * assert.notDeepEqual(obj1, obj4); + * // OK + * ``` + * + * If the values are deeply equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default + * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function notDeepEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function notDeepEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * Tests strict equality between the `actual` and `expected` parameters as + * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.strictEqual(1, 2); + * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: + * // + * // 1 !== 2 + * + * assert.strictEqual(1, 1); + * // OK + * + * assert.strictEqual('Hello foobar', 'Hello World!'); + * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: + * // + actual - expected + * // + * // + 'Hello foobar' + * // - 'Hello World!' + * // ^ + * + * const apples = 1; + * const oranges = 2; + * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`); + * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2 + * + * assert.strictEqual(1, '1', new TypeError('Inputs are not identical')); + * // TypeError: Inputs are not identical + * ``` + * + * If the values are not strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a + * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function strictEqual( + actual: unknown, + expected: T, + message?: Error | AssertMessageFunction, + ): asserts actual is T; + function strictEqual( + actual: unknown, + expected: T, + message: string, + ...args: unknown[] + ): asserts actual is T; + /** + * Tests strict inequality between the `actual` and `expected` parameters as + * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.notStrictEqual(1, 2); + * // OK + * + * assert.notStrictEqual(1, 1); + * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to: + * // + * // 1 + * + * assert.notStrictEqual(1, '1'); + * // OK + * ``` + * + * If the values are strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a + * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function notStrictEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function notStrictEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * Tests for deep equality between the `actual` and `expected` parameters. + * "Deep" equality means that the enumerable "own" properties of child objects + * are recursively evaluated also by the following rules. + * @since v1.2.0 + */ + function deepStrictEqual( + actual: unknown, + expected: T, + message?: Error | AssertMessageFunction, + ): asserts actual is T; + function deepStrictEqual( + actual: unknown, + expected: T, + message: string, + ...args: unknown[] + ): asserts actual is T; + /** + * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.notDeepStrictEqual({ a: 1 }, { a: '1' }); + * // OK + * ``` + * + * If the values are deeply and strictly equal, an `AssertionError` is thrown + * with a `message` property set equal to the value of the `message` parameter. If + * the `message` parameter is undefined, a default error message is assigned. If + * the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v1.2.0 + */ + function notDeepStrictEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function notDeepStrictEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * Expects the function `fn` to throw an error. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, + * a validation object where each property will be tested for strict deep equality, + * or an instance of error where each property will be tested for strict deep + * equality including the non-enumerable `message` and `name` properties. When + * using an object, it is also possible to use a regular expression, when + * validating against a string property. See below for examples. + * + * If specified, `message` will be appended to the message provided by the `AssertionError` if the `fn` call fails to throw or in case the error validation + * fails. + * + * Custom validation object/error instance: + * + * ```js + * import assert from 'node:assert/strict'; + * + * const err = new TypeError('Wrong value'); + * err.code = 404; + * err.foo = 'bar'; + * err.info = { + * nested: true, + * baz: 'text', + * }; + * err.reg = /abc/i; + * + * assert.throws( + * () => { + * throw err; + * }, + * { + * name: 'TypeError', + * message: 'Wrong value', + * info: { + * nested: true, + * baz: 'text', + * }, + * // Only properties on the validation object will be tested for. + * // Using nested objects requires all properties to be present. Otherwise + * // the validation is going to fail. + * }, + * ); + * + * // Using regular expressions to validate error properties: + * assert.throws( + * () => { + * throw err; + * }, + * { + * // The `name` and `message` properties are strings and using regular + * // expressions on those will match against the string. If they fail, an + * // error is thrown. + * name: /^TypeError$/, + * message: /Wrong/, + * foo: 'bar', + * info: { + * nested: true, + * // It is not possible to use regular expressions for nested properties! + * baz: 'text', + * }, + * // The `reg` property contains a regular expression and only if the + * // validation object contains an identical regular expression, it is going + * // to pass. + * reg: /abc/i, + * }, + * ); + * + * // Fails due to the different `message` and `name` properties: + * assert.throws( + * () => { + * const otherErr = new Error('Not found'); + * // Copy all enumerable properties from `err` to `otherErr`. + * for (const [key, value] of Object.entries(err)) { + * otherErr[key] = value; + * } + * throw otherErr; + * }, + * // The error's `message` and `name` properties will also be checked when using + * // an error as validation object. + * err, + * ); + * ``` + * + * Validate instanceof using constructor: + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * Error, + * ); + * ``` + * + * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions): + * + * Using a regular expression runs `.toString` on the error object, and will + * therefore also include the error name. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * /^Error: Wrong value$/, + * ); + * ``` + * + * Custom error validation: + * + * The function must return `true` to indicate all internal validations passed. + * It will otherwise fail with an `AssertionError`. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * (err) => { + * assert(err instanceof Error); + * assert(/value/.test(err)); + * // Avoid returning anything from validation functions besides `true`. + * // Otherwise, it's not clear what part of the validation failed. Instead, + * // throw an error about the specific validation that failed (as done in this + * // example) and add as much helpful debugging information to that error as + * // possible. + * return true; + * }, + * 'unexpected error', + * ); + * ``` + * + * `error` cannot be a string. If a string is provided as the second + * argument, then `error` is assumed to be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Using the same + * message as the thrown error message is going to result in an `ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using + * a string as the second argument gets considered: + * + * ```js + * import assert from 'node:assert/strict'; + * + * function throwingFirst() { + * throw new Error('First'); + * } + * + * function throwingSecond() { + * throw new Error('Second'); + * } + * + * function notThrowing() {} + * + * // The second argument is a string and the input function threw an Error. + * // The first case will not throw as it does not match for the error message + * // thrown by the input function! + * assert.throws(throwingFirst, 'Second'); + * // In the next example the message has no benefit over the message from the + * // error and since it is not clear if the user intended to actually match + * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error. + * assert.throws(throwingSecond, 'Second'); + * // TypeError [ERR_AMBIGUOUS_ARGUMENT] + * + * // The string is only used (as message) in case the function does not throw: + * assert.throws(notThrowing, 'Second'); + * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second + * + * // If it was intended to match for the error message do this instead: + * // It does not throw because the error messages match. + * assert.throws(throwingSecond, /Second$/); + * + * // If the error message does not match, an AssertionError is thrown. + * assert.throws(throwingFirst, /Second$/); + * // AssertionError [ERR_ASSERTION] + * ``` + * + * Due to the confusing error-prone notation, avoid a string as the second + * argument. + * @since v0.1.21 + */ + function throws(block: () => unknown, message?: string | Error): void; + function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void; + /** + * Asserts that the function `fn` does not throw an error. + * + * Using `assert.doesNotThrow()` is actually not useful because there + * is no benefit in catching an error and then rethrowing it. Instead, consider + * adding a comment next to the specific code path that should not throw and keep + * error messages as expressive as possible. + * + * When `assert.doesNotThrow()` is called, it will immediately call the `fn` function. + * + * If an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a + * different type, or if the `error` parameter is undefined, the error is + * propagated back to the caller. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation + * function. See {@link throws} for more details. + * + * The following, for instance, will throw the `TypeError` because there is no + * matching error type in the assertion: + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * SyntaxError, + * ); + * ``` + * + * However, the following will result in an `AssertionError` with the message + * 'Got unwanted exception...': + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * TypeError, + * ); + * ``` + * + * If an `AssertionError` is thrown and a value is provided for the `message` parameter, the value of `message` will be appended to the `AssertionError` message: + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * /Wrong value/, + * 'Whoops', + * ); + * // Throws: AssertionError: Got unwanted exception: Whoops + * ``` + * @since v0.1.21 + */ + function doesNotThrow(block: () => unknown, message?: string | Error): void; + function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void; + /** + * Throws `value` if `value` is not `undefined` or `null`. This is useful when + * testing the `error` argument in callbacks. The stack trace contains all frames + * from the error passed to `ifError()` including the potential new frames for `ifError()` itself. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.ifError(null); + * // OK + * assert.ifError(0); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0 + * assert.ifError('error'); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error' + * assert.ifError(new Error()); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error + * + * // Create some random error frames. + * let err; + * (function errorFrame() { + * err = new Error('test error'); + * })(); + * + * (function ifErrorFrame() { + * assert.ifError(err); + * })(); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error + * // at ifErrorFrame + * // at errorFrame + * ``` + * @since v0.1.97 + */ + function ifError(value: unknown): asserts value is null | undefined; + /** + * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately + * calls the function and awaits the returned promise to complete. It will then + * check that the promise is rejected. + * + * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the + * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v26.x/api/errors.html#err_invalid_return_value) + * error. In both cases the error handler is skipped. + * + * Besides the async nature to await the completion behaves identically to {@link throws}. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, + * an object where each property will be tested for, or an instance of error where + * each property will be tested for including the non-enumerable `message` and `name` properties. + * + * If specified, `message` will be the message provided by the `{@link AssertionError}` if the `asyncFn` fails to reject. + * + * ```js + * import assert from 'node:assert/strict'; + * + * await assert.rejects( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * { + * name: 'TypeError', + * message: 'Wrong value', + * }, + * ); + * ``` + * + * ```js + * import assert from 'node:assert/strict'; + * + * await assert.rejects( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * (err) => { + * assert.strictEqual(err.name, 'TypeError'); + * assert.strictEqual(err.message, 'Wrong value'); + * return true; + * }, + * ); + * ``` + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.rejects( + * Promise.reject(new Error('Wrong value')), + * Error, + * ).then(() => { + * // ... + * }); + * ``` + * + * `error` cannot be a string. If a string is provided as the second argument, then `error` is assumed to + * be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Please read the + * example in {@link throws} carefully if using a string as the second argument gets considered. + * @since v10.0.0 + */ + function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; + function rejects( + block: (() => Promise) | Promise, + error: AssertPredicate, + message?: string | Error, + ): Promise; + /** + * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately + * calls the function and awaits the returned promise to complete. It will then + * check that the promise is not rejected. + * + * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If + * the function does not return a promise, `assert.doesNotReject()` will return a + * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v26.x/api/errors.html#err_invalid_return_value) error. In both cases + * the error handler is skipped. + * + * Using `assert.doesNotReject()` is actually not useful because there is little + * benefit in catching a rejection and then rejecting it again. Instead, consider + * adding a comment next to the specific code path that should not reject and keep + * error messages as expressive as possible. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation + * function. See {@link throws} for more details. + * + * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}. + * + * ```js + * import assert from 'node:assert/strict'; + * + * await assert.doesNotReject( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * SyntaxError, + * ); + * ``` + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotReject(Promise.reject(new TypeError('Wrong value'))) + * .then(() => { + * // ... + * }); + * ``` + * @since v10.0.0 + */ + function doesNotReject( + block: (() => Promise) | Promise, + message?: string | Error, + ): Promise; + function doesNotReject( + block: (() => Promise) | Promise, + error: AssertPredicate, + message?: string | Error, + ): Promise; + /** + * Expects the `string` input to match the regular expression. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.match('I will fail', /pass/); + * // AssertionError [ERR_ASSERTION]: The input did not match the regular ... + * + * assert.match(123, /pass/); + * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. + * + * assert.match('I will pass', /pass/); + * // OK + * ``` + * + * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal + * to the value of the `message` parameter. If the `message` parameter is + * undefined, a default error message is assigned. If the `message` parameter is an + * instance of an [Error](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. + * @since v13.6.0, v12.16.0 + */ + function match( + value: string, + regExp: RegExp, + message?: Error | AssertMessageFunction, + ): void; + function match( + value: string, + regExp: RegExp, + message: string, + ...args: unknown[] + ): void; + /** + * Expects the `string` input not to match the regular expression. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotMatch('I will fail', /fail/); + * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ... + * + * assert.doesNotMatch(123, /pass/); + * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. + * + * assert.doesNotMatch('I will pass', /different/); + * // OK + * ``` + * + * If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal + * to the value of the `message` parameter. If the `message` parameter is + * undefined, a default error message is assigned. If the `message` parameter is an + * instance of an [Error](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. + * @since v13.6.0, v12.16.0 + */ + function doesNotMatch( + value: string, + regExp: RegExp, + message?: Error | AssertMessageFunction, + ): void; + function doesNotMatch( + value: string, + regExp: RegExp, + message: string, + ...args: unknown[] + ): void; + /** + * Tests for partial deep equality between the `actual` and `expected` parameters. + * "Deep" equality means that the enumerable "own" properties of child objects + * are recursively evaluated also by the following rules. "Partial" equality means + * that only properties that exist on the `expected` parameter are going to be + * compared. + * + * This method always passes the same test cases as `assert.deepStrictEqual()`, + * behaving as a super set of it. + * @since v22.13.0 + */ + function partialDeepStrictEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function partialDeepStrictEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + } + namespace assert { + export { strict }; + } + export = assert; +} +declare module "assert" { + import assert = require("node:assert"); + export = assert; +} diff --git a/node_modules/@types/node/assert/strict.d.ts b/node_modules/@types/node/assert/strict.d.ts new file mode 100644 index 0000000..d4ea390 --- /dev/null +++ b/node_modules/@types/node/assert/strict.d.ts @@ -0,0 +1,68 @@ +declare module "node:assert/strict" { + import { + Assert, + AssertionError, + AssertionErrorOptions, + AssertMessageFunction, + AssertOptions, + AssertPredicate, + AssertStrict, + deepStrictEqual, + doesNotMatch, + doesNotReject, + doesNotThrow, + fail, + ifError, + match, + notDeepStrictEqual, + notStrictEqual, + ok, + partialDeepStrictEqual, + rejects, + strictEqual, + throws, + } from "node:assert"; + function strict( + value: unknown, + message?: Error | AssertMessageFunction, + ): asserts value; + function strict( + value: unknown, + message: string, + ...args: unknown[] + ): asserts value; + namespace strict { + export { + Assert, + AssertionError, + AssertionErrorOptions, + AssertOptions, + AssertPredicate, + AssertStrict, + deepStrictEqual, + deepStrictEqual as deepEqual, + doesNotMatch, + doesNotReject, + doesNotThrow, + fail, + ifError, + match, + notDeepStrictEqual, + notDeepStrictEqual as notDeepEqual, + notStrictEqual, + notStrictEqual as notEqual, + ok, + partialDeepStrictEqual, + rejects, + strict, + strictEqual, + strictEqual as equal, + throws, + }; + } + export = strict; +} +declare module "assert/strict" { + import strict = require("node:assert/strict"); + export = strict; +} diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts new file mode 100644 index 0000000..d38fcf0 --- /dev/null +++ b/node_modules/@types/node/async_hooks.d.ts @@ -0,0 +1,711 @@ +declare module "node:async_hooks" { + /** + * ```js + * import { executionAsyncId } from 'node:async_hooks'; + * import fs from 'node:fs'; + * + * console.log(executionAsyncId()); // 1 - bootstrap + * const path = '.'; + * fs.open(path, 'r', (err, fd) => { + * console.log(executionAsyncId()); // 6 - open() + * }); + * ``` + * + * The ID returned from `executionAsyncId()` is related to execution timing, not + * causality (which is covered by `triggerAsyncId()`): + * + * ```js + * const server = net.createServer((conn) => { + * // Returns the ID of the server, not of the new connection, because the + * // callback runs in the execution scope of the server's MakeCallback(). + * async_hooks.executionAsyncId(); + * + * }).listen(port, () => { + * // Returns the ID of a TickObject (process.nextTick()) because all + * // callbacks passed to .listen() are wrapped in a nextTick(). + * async_hooks.executionAsyncId(); + * }); + * ``` + * + * Promise contexts may not get precise `executionAsyncIds` by default. + * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#promise-execution-tracking). + * @since v8.1.0 + * @return The `asyncId` of the current execution context. Useful to track when something calls. + */ + function executionAsyncId(): number; + /** + * Resource objects returned by `executionAsyncResource()` are most often internal + * Node.js handle objects with undocumented APIs. Using any functions or properties + * on the object is likely to crash your application and should be avoided. + * + * Using `executionAsyncResource()` in the top-level execution context will + * return an empty object as there is no handle or request object to use, + * but having an object representing the top-level can be helpful. + * + * ```js + * import { open } from 'node:fs'; + * import { executionAsyncId, executionAsyncResource } from 'node:async_hooks'; + * + * console.log(executionAsyncId(), executionAsyncResource()); // 1 {} + * open(new URL(import.meta.url), 'r', (err, fd) => { + * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap + * }); + * ``` + * + * This can be used to implement continuation local storage without the + * use of a tracking `Map` to store the metadata: + * + * ```js + * import { createServer } from 'node:http'; + * import { + * executionAsyncId, + * executionAsyncResource, + * createHook, + * } from 'node:async_hooks'; + * const sym = Symbol('state'); // Private symbol to avoid pollution + * + * createHook({ + * init(asyncId, type, triggerAsyncId, resource) { + * const cr = executionAsyncResource(); + * if (cr) { + * resource[sym] = cr[sym]; + * } + * }, + * }).enable(); + * + * const server = createServer((req, res) => { + * executionAsyncResource()[sym] = { state: req.url }; + * setTimeout(function() { + * res.end(JSON.stringify(executionAsyncResource()[sym])); + * }, 100); + * }).listen(3000); + * ``` + * @since v13.9.0, v12.17.0 + * @return The resource representing the current execution. Useful to store data within the resource. + */ + function executionAsyncResource(): object; + /** + * ```js + * const server = net.createServer((conn) => { + * // The resource that caused (or triggered) this callback to be called + * // was that of the new connection. Thus the return value of triggerAsyncId() + * // is the asyncId of "conn". + * async_hooks.triggerAsyncId(); + * + * }).listen(port, () => { + * // Even though all callbacks passed to .listen() are wrapped in a nextTick() + * // the callback itself exists because the call to the server's .listen() + * // was made. So the return value would be the ID of the server. + * async_hooks.triggerAsyncId(); + * }); + * ``` + * + * Promise contexts may not get valid `triggerAsyncId`s by default. See + * the section on [promise execution tracking](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#promise-execution-tracking). + * @return The ID of the resource responsible for calling the callback that is currently being executed. + */ + function triggerAsyncId(): number; + interface HookCallbacks { + /** + * The [`init` callback](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#initasyncid-type-triggerasyncid-resource). + */ + init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void; + /** + * The [`before` callback](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#beforeasyncid). + */ + before?(asyncId: number): void; + /** + * The [`after` callback](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#afterasyncid). + */ + after?(asyncId: number): void; + /** + * The [`promiseResolve` callback](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#promiseresolveasyncid). + */ + promiseResolve?(asyncId: number): void; + /** + * The [`destroy` callback](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#destroyasyncid). + */ + destroy?(asyncId: number): void; + /** + * Whether the hook should track `Promise`s. Cannot be `false` if + * `promiseResolve` is set. + * @default true + */ + trackPromises?: boolean | undefined; + } + interface AsyncHook { + /** + * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop. + */ + enable(): this; + /** + * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled. + */ + disable(): this; + } + /** + * Registers functions to be called for different lifetime events of each async + * operation. + * + * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the + * respective asynchronous event during a resource's lifetime. + * + * All callbacks are optional. For example, if only resource cleanup needs to + * be tracked, then only the `destroy` callback needs to be passed. The + * specifics of all functions that can be passed to `callbacks` is in the + * [Hook Callbacks](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#hook-callbacks) section. + * + * ```js + * import { createHook } from 'node:async_hooks'; + * + * const asyncHook = createHook({ + * init(asyncId, type, triggerAsyncId, resource) { }, + * destroy(asyncId) { }, + * }); + * ``` + * + * The callbacks will be inherited via the prototype chain: + * + * ```js + * class MyAsyncCallbacks { + * init(asyncId, type, triggerAsyncId, resource) { } + * destroy(asyncId) {} + * } + * + * class MyAddedCallbacks extends MyAsyncCallbacks { + * before(asyncId) { } + * after(asyncId) { } + * } + * + * const asyncHook = async_hooks.createHook(new MyAddedCallbacks()); + * ``` + * + * Because promises are asynchronous resources whose lifecycle is tracked + * via the async hooks mechanism, the `init()`, `before()`, `after()`, and + * `destroy()` callbacks _must not_ be async functions that return promises. + * @since v8.1.0 + * @param options The [Hook Callbacks](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#hook-callbacks) to register + * @returns Instance used for disabling and enabling hooks + */ + function createHook(options: HookCallbacks): AsyncHook; + interface AsyncResourceOptions { + /** + * The ID of the execution context that created this async event. + * @default executionAsyncId() + */ + triggerAsyncId?: number | undefined; + /** + * Disables automatic `emitDestroy` when the object is garbage collected. + * This usually does not need to be set (even if `emitDestroy` is called + * manually), unless the resource's `asyncId` is retrieved and the + * sensitive API's `emitDestroy` is called with it. + * @default false + */ + requireManualDestroy?: boolean | undefined; + } + /** + * The class `AsyncResource` is designed to be extended by the embedder's async + * resources. Using this, users can easily trigger the lifetime events of their + * own resources. + * + * The `init` hook will trigger when an `AsyncResource` is instantiated. + * + * The following is an overview of the `AsyncResource` API. + * + * ```js + * import { AsyncResource, executionAsyncId } from 'node:async_hooks'; + * + * // AsyncResource() is meant to be extended. Instantiating a + * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then + * // async_hook.executionAsyncId() is used. + * const asyncResource = new AsyncResource( + * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }, + * ); + * + * // Run a function in the execution context of the resource. This will + * // * establish the context of the resource + * // * trigger the AsyncHooks before callbacks + * // * call the provided function `fn` with the supplied arguments + * // * trigger the AsyncHooks after callbacks + * // * restore the original execution context + * asyncResource.runInAsyncScope(fn, thisArg, ...args); + * + * // Call AsyncHooks destroy callbacks. + * asyncResource.emitDestroy(); + * + * // Return the unique ID assigned to the AsyncResource instance. + * asyncResource.asyncId(); + * + * // Return the trigger ID for the AsyncResource instance. + * asyncResource.triggerAsyncId(); + * ``` + */ + class AsyncResource { + /** + * AsyncResource() is meant to be extended. Instantiating a + * new AsyncResource() also triggers init. If triggerAsyncId is omitted then + * async_hook.executionAsyncId() is used. + * @param type The type of async event. + * @param triggerAsyncId The ID of the execution context that created + * this async event (default: `executionAsyncId()`), or an + * AsyncResourceOptions object (since v9.3.0) + */ + constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions); + /** + * Binds the given function to the current execution context. + * @since v14.8.0, v12.19.0 + * @param fn The function to bind to the current execution context. + * @param type An optional name to associate with the underlying `AsyncResource`. + */ + static bind any, ThisArg>( + fn: Func, + type?: string, + thisArg?: ThisArg, + ): Func; + /** + * Binds the given function to execute to this `AsyncResource`'s scope. + * @since v14.8.0, v12.19.0 + * @param fn The function to bind to the current `AsyncResource`. + */ + bind any>(fn: Func): Func; + /** + * Call the provided function with the provided arguments in the execution context + * of the async resource. This will establish the context, trigger the AsyncHooks + * before callbacks, call the function, trigger the AsyncHooks after callbacks, and + * then restore the original execution context. + * @since v9.6.0 + * @param fn The function to call in the execution context of this async resource. + * @param thisArg The receiver to be used for the function call. + * @param args Optional arguments to pass to the function. + */ + runInAsyncScope( + fn: (this: This, ...args: any[]) => Result, + thisArg?: This, + ...args: any[] + ): Result; + /** + * Call all `destroy` hooks. This should only ever be called once. An error will + * be thrown if it is called more than once. This **must** be manually called. If + * the resource is left to be collected by the GC then the `destroy` hooks will + * never be called. + * @return A reference to `asyncResource`. + */ + emitDestroy(): this; + /** + * @return The unique `asyncId` assigned to the resource. + */ + asyncId(): number; + /** + * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor. + */ + triggerAsyncId(): number; + } + interface AsyncLocalStorageOptions { + /** + * The default value to be used when no store is provided. + */ + defaultValue?: any; + /** + * A name for the `AsyncLocalStorage` value. + */ + name?: string | undefined; + } + /** + * This class creates stores that stay coherent through asynchronous operations. + * + * While you can create your own implementation on top of the `node:async_hooks` module, `AsyncLocalStorage` should be preferred as it is a performant and memory + * safe implementation that involves significant optimizations that are non-obvious + * to implement. + * + * The following example uses `AsyncLocalStorage` to build a simple logger + * that assigns IDs to incoming HTTP requests and includes them in messages + * logged within each request. + * + * ```js + * import http from 'node:http'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * function logWithId(msg) { + * const id = asyncLocalStorage.getStore(); + * console.log(`${id !== undefined ? id : '-'}:`, msg); + * } + * + * let idSeq = 0; + * http.createServer((req, res) => { + * asyncLocalStorage.run(idSeq++, () => { + * logWithId('start'); + * // Imagine any chain of async operations here + * setImmediate(() => { + * logWithId('finish'); + * res.end(); + * }); + * }); + * }).listen(8080); + * + * http.get('http://localhost:8080'); + * http.get('http://localhost:8080'); + * // Prints: + * // 0: start + * // 0: finish + * // 1: start + * // 1: finish + * ``` + * + * Each instance of `AsyncLocalStorage` maintains an independent storage context. + * Multiple instances can safely exist simultaneously without risk of interfering + * with each other's data. + * @since v13.10.0, v12.17.0 + */ + class AsyncLocalStorage { + /** + * Creates a new instance of `AsyncLocalStorage`. Store is only provided within a + * `run()` call or after an `enterWith()` call. + */ + constructor(options?: AsyncLocalStorageOptions); + /** + * Binds the given function to the current execution context. + * @since v19.8.0 + * @param fn The function to bind to the current execution context. + * @return A new function that calls `fn` within the captured execution context. + */ + static bind any>(fn: Func): Func; + /** + * Captures the current execution context and returns a function that accepts a + * function as an argument. Whenever the returned function is called, it + * calls the function passed to it within the captured context. + * + * ```js + * const asyncLocalStorage = new AsyncLocalStorage(); + * const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot()); + * const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore())); + * console.log(result); // returns 123 + * ``` + * + * AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple + * async context tracking purposes, for example: + * + * ```js + * class Foo { + * #runInAsyncScope = AsyncLocalStorage.snapshot(); + * + * get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); } + * } + * + * const foo = asyncLocalStorage.run(123, () => new Foo()); + * console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123 + * ``` + * @since v19.8.0 + * @return A new function with the signature `(fn: (...args) : R, ...args) : R`. + */ + static snapshot(): (fn: (...args: TArgs) => R, ...args: TArgs) => R; + /** + * Disables the instance of `AsyncLocalStorage`. All subsequent calls + * to `asyncLocalStorage.getStore()` will return `undefined` until `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again. + * + * When calling `asyncLocalStorage.disable()`, all current contexts linked to the + * instance will be exited. + * + * Calling `asyncLocalStorage.disable()` is required before the `asyncLocalStorage` can be garbage collected. This does not apply to stores + * provided by the `asyncLocalStorage`, as those objects are garbage collected + * along with the corresponding async resources. + * + * Use this method when the `asyncLocalStorage` is not in use anymore + * in the current process. + * @since v13.10.0, v12.17.0 + * @experimental + */ + disable(): void; + /** + * Returns the current store. + * If called outside of an asynchronous context initialized by + * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it + * returns `undefined`. + * @since v13.10.0, v12.17.0 + */ + getStore(): T | undefined; + /** + * The name of the `AsyncLocalStorage` instance if provided. + * @since v24.0.0 + */ + readonly name: string; + /** + * Runs a function synchronously within a context and returns its + * return value. The store is not accessible outside of the callback function. + * The store is accessible to any asynchronous operations created within the + * callback. + * + * The optional `args` are passed to the callback function. + * + * If the callback function throws an error, the error is thrown by `run()` too. + * The stacktrace is not impacted by this call and the context is exited. + * + * Example: + * + * ```js + * const store = { id: 2 }; + * try { + * asyncLocalStorage.run(store, () => { + * asyncLocalStorage.getStore(); // Returns the store object + * setTimeout(() => { + * asyncLocalStorage.getStore(); // Returns the store object + * }, 200); + * throw new Error(); + * }); + * } catch (e) { + * asyncLocalStorage.getStore(); // Returns undefined + * // The error will be caught here + * } + * ``` + * @since v13.10.0, v12.17.0 + */ + run(store: T, callback: () => R): R; + run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R; + /** + * Runs a function synchronously outside of a context and returns its + * return value. The store is not accessible within the callback function or + * the asynchronous operations created within the callback. Any `getStore()` call done within the callback function will always return `undefined`. + * + * The optional `args` are passed to the callback function. + * + * If the callback function throws an error, the error is thrown by `exit()` too. + * The stacktrace is not impacted by this call and the context is re-entered. + * + * Example: + * + * ```js + * // Within a call to run + * try { + * asyncLocalStorage.getStore(); // Returns the store object or value + * asyncLocalStorage.exit(() => { + * asyncLocalStorage.getStore(); // Returns undefined + * throw new Error(); + * }); + * } catch (e) { + * asyncLocalStorage.getStore(); // Returns the same object or value + * // The error will be caught here + * } + * ``` + * @since v13.10.0, v12.17.0 + * @experimental + */ + exit(callback: (...args: TArgs) => R, ...args: TArgs): R; + /** + * Creates a disposable scope that enters the given store and automatically + * restores the previous store value when the scope is disposed. This method is + * designed to work with JavaScript's explicit resource management (`using` syntax). + * + * Example: + * + * ```js + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * { + * using _ = asyncLocalStorage.withScope('my-store'); + * console.log(asyncLocalStorage.getStore()); // Prints: my-store + * } + * + * console.log(asyncLocalStorage.getStore()); // Prints: undefined + * ``` + * + * The `withScope()` method is particularly useful for managing context in + * synchronous code where you want to ensure the previous store value is restored + * when exiting a block, even if an error is thrown. + * + * ```js + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * try { + * using _ = asyncLocalStorage.withScope('my-store'); + * console.log(asyncLocalStorage.getStore()); // Prints: my-store + * throw new Error('test'); + * } catch (e) { + * // Store is automatically restored even after error + * console.log(asyncLocalStorage.getStore()); // Prints: undefined + * } + * ``` + * + * **Important:** When using `withScope()` in async functions before the first + * `await`, be aware that the scope change will affect the caller's context. The + * synchronous portion of an async function (before the first `await`) runs + * immediately when called, and when it reaches the first `await`, it returns the + * promise to the caller. At that point, the scope change becomes visible in the + * caller's context and will persist in subsequent synchronous code until something + * else changes the scope value. For async operations, prefer using `run()` which + * properly isolates context across async boundaries. + * + * ```js + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * async function example() { + * using _ = asyncLocalStorage.withScope('my-store'); + * console.log(asyncLocalStorage.getStore()); // Prints: my-store + * await someAsyncOperation(); // Function pauses here and returns promise + * console.log(asyncLocalStorage.getStore()); // Prints: my-store + * } + * + * // Calling without await + * example(); // Synchronous portion runs, then pauses at first await + * // After the promise is returned, the scope 'my-store' is now active in caller! + * console.log(asyncLocalStorage.getStore()); // Prints: my-store (unexpected!) + * ``` + * @since v25.9.0 + * @experimental + */ + withScope(store: T): RunScope; + /** + * Transitions into the context for the remainder of the current + * synchronous execution and then persists the store through any following + * asynchronous calls. + * + * Example: + * + * ```js + * const store = { id: 1 }; + * // Replaces previous store with the given store object + * asyncLocalStorage.enterWith(store); + * asyncLocalStorage.getStore(); // Returns the store object + * someAsyncOperation(() => { + * asyncLocalStorage.getStore(); // Returns the same object + * }); + * ``` + * + * This transition will continue for the _entire_ synchronous execution. + * This means that if, for example, the context is entered within an event + * handler subsequent event handlers will also run within that context unless + * specifically bound to another context with an `AsyncResource`. That is why `run()` should be preferred over `enterWith()` unless there are strong reasons + * to use the latter method. + * + * ```js + * const store = { id: 1 }; + * + * emitter.on('my-event', () => { + * asyncLocalStorage.enterWith(store); + * }); + * emitter.on('my-event', () => { + * asyncLocalStorage.getStore(); // Returns the same object + * }); + * + * asyncLocalStorage.getStore(); // Returns undefined + * emitter.emit('my-event'); + * asyncLocalStorage.getStore(); // Returns the same object + * ``` + * @since v13.11.0, v12.17.0 + * @experimental + */ + enterWith(store: T): void; + } + /** + * A disposable scope returned by `asyncLocalStorage.withScope()` that + * automatically restores the previous store value when disposed. This class + * implements the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) protocol and is designed to work + * with JavaScript's `using` syntax. + * + * The scope automatically restores the previous store value when the `using` block + * exits, whether through normal completion or by throwing an error. + * @since v25.9.0 + * @experimental + */ + interface RunScope extends Disposable { + /** + * Explicitly ends the scope and restores the previous store value. This method + * is idempotent: calling it multiple times has the same effect as calling it once. + * + * The `[Symbol.dispose]()` method defers to `dispose()`. + * + * If `withScope()` is called without the `using` keyword, `dispose()` must be + * called manually to restore the previous store value. Forgetting to call + * `dispose()` will cause the store value to persist for the remainder of the + * current execution context: + * + * ```js + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const storage = new AsyncLocalStorage(); + * + * // Without using, the scope must be disposed manually + * const scope = storage.withScope('my-store'); + * // storage.getStore() === 'my-store' here + * + * scope.dispose(); // Restore previous value + * // storage.getStore() === undefined here + * ``` + * @since v25.9.0 + */ + dispose(): void; + } + /** + * @since v17.2.0, v16.14.0 + * @return A map of provider types to the corresponding numeric id. + * This map contains all the event types that might be emitted by the `async_hooks.init()` event. + */ + namespace asyncWrapProviders { + const NONE: number; + const DIRHANDLE: number; + const DNSCHANNEL: number; + const ELDHISTOGRAM: number; + const FILEHANDLE: number; + const FILEHANDLECLOSEREQ: number; + const FIXEDSIZEBLOBCOPY: number; + const FSEVENTWRAP: number; + const FSREQCALLBACK: number; + const FSREQPROMISE: number; + const GETADDRINFOREQWRAP: number; + const GETNAMEINFOREQWRAP: number; + const HEAPSNAPSHOT: number; + const HTTP2SESSION: number; + const HTTP2STREAM: number; + const HTTP2PING: number; + const HTTP2SETTINGS: number; + const HTTPINCOMINGMESSAGE: number; + const HTTPCLIENTREQUEST: number; + const JSSTREAM: number; + const JSUDPWRAP: number; + const MESSAGEPORT: number; + const PIPECONNECTWRAP: number; + const PIPESERVERWRAP: number; + const PIPEWRAP: number; + const PROCESSWRAP: number; + const PROMISE: number; + const QUERYWRAP: number; + const SHUTDOWNWRAP: number; + const SIGNALWRAP: number; + const STATWATCHER: number; + const STREAMPIPE: number; + const TCPCONNECTWRAP: number; + const TCPSERVERWRAP: number; + const TCPWRAP: number; + const TTYWRAP: number; + const UDPSENDWRAP: number; + const UDPWRAP: number; + const SIGINTWATCHDOG: number; + const WORKER: number; + const WORKERHEAPSNAPSHOT: number; + const WRITEWRAP: number; + const ZLIB: number; + const CHECKPRIMEREQUEST: number; + const PBKDF2REQUEST: number; + const KEYPAIRGENREQUEST: number; + const KEYGENREQUEST: number; + const KEYEXPORTREQUEST: number; + const CIPHERREQUEST: number; + const DERIVEBITSREQUEST: number; + const HASHREQUEST: number; + const RANDOMBYTESREQUEST: number; + const RANDOMPRIMEREQUEST: number; + const SCRYPTREQUEST: number; + const SIGNREQUEST: number; + const TLSWRAP: number; + const VERIFYREQUEST: number; + } +} +declare module "async_hooks" { + export * from "node:async_hooks"; +} diff --git a/node_modules/@types/node/buffer.buffer.d.ts b/node_modules/@types/node/buffer.buffer.d.ts new file mode 100644 index 0000000..47f1fac --- /dev/null +++ b/node_modules/@types/node/buffer.buffer.d.ts @@ -0,0 +1,471 @@ +declare module "node:buffer" { + type ImplicitArrayBuffer> = T extends + { valueOf(): infer V extends ArrayBufferLike } ? V : T; + global { + interface BufferConstructor { + // see buffer.d.ts for implementation shared with all TypeScript versions + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. + */ + new(str: string, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). + */ + new(size: number): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + new(array: ArrayLike): Buffer; + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}/{SharedArrayBuffer}. + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. + */ + new(arrayBuffer: TArrayBuffer): Buffer; + /** + * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. + * Array entries outside that range will be truncated to fit into it. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. + * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); + * ``` + * + * If `array` is an `Array`-like object (that is, one with a `length` property of + * type `number`), it is treated as if it is an array, unless it is a `Buffer` or + * a `Uint8Array`. This means all other `TypedArray` variants get treated as an + * `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use + * `Buffer.copyBytesFrom()`. + * + * A `TypeError` will be thrown if `array` is not an `Array` or another type + * appropriate for `Buffer.from()` variants. + * + * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal + * `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v5.10.0 + */ + from(array: WithImplicitCoercion>): Buffer; + /** + * This creates a view of the `ArrayBuffer` without copying the underlying + * memory. For example, when passed a reference to the `.buffer` property of a + * `TypedArray` instance, the newly created `Buffer` will share the same + * allocated memory as the `TypedArray`'s underlying `ArrayBuffer`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const arr = new Uint16Array(2); + * + * arr[0] = 5000; + * arr[1] = 4000; + * + * // Shares memory with `arr`. + * const buf = Buffer.from(arr.buffer); + * + * console.log(buf); + * // Prints: + * + * // Changing the original Uint16Array changes the Buffer also. + * arr[1] = 6000; + * + * console.log(buf); + * // Prints: + * ``` + * + * The optional `byteOffset` and `length` arguments specify a memory range within + * the `arrayBuffer` that will be shared by the `Buffer`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const ab = new ArrayBuffer(10); + * const buf = Buffer.from(ab, 0, 2); + * + * console.log(buf.length); + * // Prints: 2 + * ``` + * + * A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a + * `SharedArrayBuffer` or another type appropriate for `Buffer.from()` + * variants. + * + * It is important to remember that a backing `ArrayBuffer` can cover a range + * of memory that extends beyond the bounds of a `TypedArray` view. A new + * `Buffer` created using the `buffer` property of a `TypedArray` may extend + * beyond the range of the `TypedArray`: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements + * const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements + * console.log(arrA.buffer === arrB.buffer); // true + * + * const buf = Buffer.from(arrB.buffer); + * console.log(buf); + * // Prints: + * ``` + * @since v5.10.0 + * @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the + * `.buffer` property of a `TypedArray`. + * @param byteOffset Index of first byte to expose. **Default:** `0`. + * @param length Number of bytes to expose. **Default:** + * `arrayBuffer.byteLength - byteOffset`. + */ + from>( + arrayBuffer: TArrayBuffer, + byteOffset?: number, + length?: number, + ): Buffer>; + /** + * Creates a new `Buffer` containing `string`. The `encoding` parameter identifies + * the character encoding to be used when converting `string` into bytes. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('this is a tést'); + * const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); + * + * console.log(buf1.toString()); + * // Prints: this is a tést + * console.log(buf2.toString()); + * // Prints: this is a tést + * console.log(buf1.toString('latin1')); + * // Prints: this is a tést + * ``` + * + * A `TypeError` will be thrown if `string` is not a string or another type + * appropriate for `Buffer.from()` variants. + * + * `Buffer.from(string)` may also use the internal `Buffer` pool like + * `Buffer.allocUnsafe()` does. + * @since v5.10.0 + * @param string A string to encode. + * @param encoding The encoding of `string`. **Default:** `'utf8'`. + */ + from(string: WithImplicitCoercion, encoding?: BufferEncoding): Buffer; + from(arrayOrString: WithImplicitCoercion | string>): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param values to create a new Buffer + */ + of(...items: number[]): Buffer; + /** + * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together. + * + * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned. + * + * If `totalLength` is not provided, it is calculated from the `Buffer` instances + * in `list` by adding their lengths. + * + * If `totalLength` is provided, it must be an unsigned integer. If the + * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is + * truncated to `totalLength`. If the combined length of the `Buffer`s in `list` is + * less than `totalLength`, the remaining space is filled with zeros. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a single `Buffer` from a list of three `Buffer` instances. + * + * const buf1 = Buffer.alloc(10); + * const buf2 = Buffer.alloc(14); + * const buf3 = Buffer.alloc(18); + * const totalLength = buf1.length + buf2.length + buf3.length; + * + * console.log(totalLength); + * // Prints: 42 + * + * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); + * + * console.log(bufA); + * // Prints: + * console.log(bufA.length); + * // Prints: 42 + * ``` + * + * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v0.7.11 + * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. + * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. + */ + concat(list: readonly Uint8Array[], totalLength?: number): Buffer; + /** + * Copies the underlying memory of `view` into a new `Buffer`. + * + * ```js + * const u16 = new Uint16Array([0, 0xffff]); + * const buf = Buffer.copyBytesFrom(u16, 1, 1); + * u16[1] = 0; + * console.log(buf.length); // 2 + * console.log(buf[0]); // 255 + * console.log(buf[1]); // 255 + * ``` + * @since v19.8.0 + * @param view The {TypedArray} to copy. + * @param [offset=0] The starting offset within `view`. + * @param [length=view.length - offset] The number of elements from `view` to copy. + */ + copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(5); + * + * console.log(buf); + * // Prints: + * ``` + * + * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. + * + * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(5, 'a'); + * + * console.log(buf); + * // Prints: + * ``` + * + * If both `fill` and `encoding` are specified, the allocated `Buffer` will be + * initialized by calling `buf.fill(fill, encoding)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); + * + * console.log(buf); + * // Prints: + * ``` + * + * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance + * contents will never contain sensitive data from previous allocations, including + * data that might not have been allocated for `Buffer`s. + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + * @param [fill=0] A value to pre-fill the new `Buffer` with. + * @param [encoding='utf8'] If `fill` is a string, this is its encoding. + */ + alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(10); + * + * console.log(buf); + * // Prints (contents may vary): + * + * buf.fill(0); + * + * console.log(buf); + * // Prints: + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * + * The `Buffer` module pre-allocates an internal `Buffer` instance of + * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`, + * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two). + * + * Use of this pre-allocated internal memory pool is a key difference between + * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. + * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less + * than or equal to half `Buffer.poolSize`. The + * difference is subtle but can be important when an application requires the + * additional performance that `Buffer.allocUnsafe()` provides. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafe(size: number): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if + * `size` is 0. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize + * such `Buffer` instances with zeroes. + * + * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, + * allocations less than `Buffer.poolSize >>> 1` (32KiB when default poolSize is used) are sliced + * from a single pre-allocated `Buffer`. This allows applications to avoid the + * garbage collection overhead of creating many individually allocated `Buffer` + * instances. This approach improves both performance and memory usage by + * eliminating the need to track and clean up as many individual `ArrayBuffer` objects. + * + * However, in the case where a developer may need to retain a small chunk of + * memory from a pool for an indeterminate amount of time, it may be appropriate + * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and + * then copying out the relevant bits. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Need to keep around a few small chunks of memory. + * const store = []; + * + * socket.on('readable', () => { + * let data; + * while (null !== (data = readable.read())) { + * // Allocate for retained data. + * const sb = Buffer.allocUnsafeSlow(10); + * + * // Copy the data into the new allocation. + * data.copy(sb, 0, 0, 10); + * + * store.push(sb); + * } + * }); + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.12.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafeSlow(size: number): Buffer; + } + interface Buffer extends Uint8Array { + // see buffer.d.ts for implementation shared with all TypeScript versions + + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * This method is not compatible with the `Uint8Array.prototype.slice()`, + * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('buffer'); + * + * const copiedBuf = Uint8Array.prototype.slice.call(buf); + * copiedBuf[0]++; + * console.log(copiedBuf.toString()); + * // Prints: cuffer + * + * console.log(buf.toString()); + * // Prints: buffer + * + * // With buf.slice(), the original buffer is modified. + * const notReallyCopiedBuf = buf.slice(); + * notReallyCopiedBuf[0]++; + * console.log(notReallyCopiedBuf.toString()); + * // Prints: cuffer + * console.log(buf.toString()); + * // Also prints: cuffer (!) + * ``` + * @since v0.3.0 + * @deprecated Use `subarray` instead. + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + slice(start?: number, end?: number): Buffer; + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * Specifying `end` greater than `buf.length` will return the same result as + * that of `end` equal to `buf.length`. + * + * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). + * + * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte + * // from the original `Buffer`. + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * const buf2 = buf1.subarray(0, 3); + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: abc + * + * buf1[0] = 33; + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: !bc + * ``` + * + * Specifying negative indexes causes the slice to be generated relative to the + * end of `buf` rather than the beginning. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('buffer'); + * + * console.log(buf.subarray(-6, -1).toString()); + * // Prints: buffe + * // (Equivalent to buf.subarray(0, 5).) + * + * console.log(buf.subarray(-6, -2).toString()); + * // Prints: buff + * // (Equivalent to buf.subarray(0, 4).) + * + * console.log(buf.subarray(-5, -2).toString()); + * // Prints: uff + * // (Equivalent to buf.subarray(1, 4).) + * ``` + * @since v3.0.0 + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + subarray(start?: number, end?: number): Buffer; + } + // TODO: remove globals in future version + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedBuffer = Buffer; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type AllowSharedBuffer = Buffer; + } + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type BufferView = T extends NodeJS.ArrayBufferView ? Buffer : never; +} diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts new file mode 100644 index 0000000..59f8a45 --- /dev/null +++ b/node_modules/@types/node/buffer.d.ts @@ -0,0 +1,1800 @@ +declare module "node:buffer" { + import { ReadableStream } from "node:stream/web"; + /** + * This function returns `true` if `input` contains only valid UTF-8-encoded data, + * including the case in which `input` is empty. + * + * Throws if the `input` is a detached array buffer. + * @since v19.4.0, v18.14.0 + * @param input The input to validate. + */ + export function isUtf8(input: ArrayBuffer | NodeJS.TypedArray): boolean; + /** + * This function returns `true` if `input` contains only valid ASCII-encoded data, + * including the case in which `input` is empty. + * + * Throws if the `input` is a detached array buffer. + * @since v19.6.0, v18.15.0 + * @param input The input to validate. + */ + export function isAscii(input: ArrayBuffer | NodeJS.TypedArray): boolean; + export let INSPECT_MAX_BYTES: number; + export const kMaxLength: number; + export const kStringMaxLength: number; + export const constants: { + MAX_LENGTH: number; + MAX_STRING_LENGTH: number; + }; + export type TranscodeEncoding = + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "latin1" + | "binary"; + /** + * Re-encodes the given `Buffer` or `Uint8Array` instance from one character + * encoding to another. Returns a new `Buffer` instance. + * + * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if + * conversion from `fromEnc` to `toEnc` is not permitted. + * + * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`, `'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`. + * + * The transcoding process will use substitution characters if a given byte + * sequence cannot be adequately represented in the target encoding. For instance: + * + * ```js + * import { Buffer, transcode } from 'node:buffer'; + * + * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii'); + * console.log(newBuf.toString('ascii')); + * // Prints: '?' + * ``` + * + * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced + * with `?` in the transcoded `Buffer`. + * @since v7.1.0 + * @param source A `Buffer` or `Uint8Array` instance. + * @param fromEnc The current encoding. + * @param toEnc To target encoding. + */ + export function transcode( + source: Uint8Array, + fromEnc: TranscodeEncoding, + toEnc: TranscodeEncoding, + ): NonSharedBuffer; + /** + * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using + * a prior call to `URL.createObjectURL()`. + * @since v16.7.0 + * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. + */ + export function resolveObjectURL(id: string): Blob | undefined; + export { type AllowSharedBuffer, Buffer, type NonSharedBuffer }; + export type WithImplicitCoercion = + | T + | { valueOf(): T } + | (T extends string ? { [Symbol.toPrimitive](hint: "string"): T } : never); + global { + namespace NodeJS { + export { BufferEncoding }; + } + // Buffer class + type BufferEncoding = + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex"; + /** + * Raw data is stored in instances of the Buffer class. + * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. + * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex' + */ + interface BufferConstructor { + // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later + // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier + + /** + * Returns `true` if `obj` is a `Buffer`, `false` otherwise. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * Buffer.isBuffer(Buffer.alloc(10)); // true + * Buffer.isBuffer(Buffer.from('foo')); // true + * Buffer.isBuffer('a string'); // false + * Buffer.isBuffer([]); // false + * Buffer.isBuffer(new Uint8Array(1024)); // false + * ``` + * @since v0.1.101 + */ + isBuffer(obj: any): obj is Buffer; + /** + * Returns `true` if `encoding` is the name of a supported character encoding, + * or `false` otherwise. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * console.log(Buffer.isEncoding('utf8')); + * // Prints: true + * + * console.log(Buffer.isEncoding('hex')); + * // Prints: true + * + * console.log(Buffer.isEncoding('utf/8')); + * // Prints: false + * + * console.log(Buffer.isEncoding('')); + * // Prints: false + * ``` + * @since v0.9.1 + * @param encoding A character encoding name to check. + */ + isEncoding(encoding: string): encoding is BufferEncoding; + /** + * Returns the byte length of a string when encoded using `encoding`. + * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account + * for the encoding that is used to convert the string into bytes. + * + * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input. + * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the + * return value might be greater than the length of a `Buffer` created from the + * string. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const str = '\u00bd + \u00bc = \u00be'; + * + * console.log(`${str}: ${str.length} characters, ` + + * `${Buffer.byteLength(str, 'utf8')} bytes`); + * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes + * ``` + * + * When `string` is a + * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/- + * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop- + * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned. + * @since v0.1.90 + * @param string A value to calculate the length of. + * @param [encoding='utf8'] If `string` is a string, this is its encoding. + * @return The number of bytes contained within `string`. + */ + byteLength( + string: string | NodeJS.ArrayBufferView | ArrayBufferLike, + encoding?: BufferEncoding, + ): number; + /** + * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of `Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('1234'); + * const buf2 = Buffer.from('0123'); + * const arr = [buf1, buf2]; + * + * console.log(arr.sort(Buffer.compare)); + * // Prints: [ , ] + * // (This result is equal to: [buf2, buf1].) + * ``` + * @since v0.11.13 + * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details. + */ + compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1; + /** + * This is the size (in bytes) of pre-allocated internal `Buffer` instances used + * for pooling. This value may be modified. + * @since v0.11.3 + */ + poolSize: number; + } + interface Buffer { + // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later + // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier + + /** + * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did + * not contain enough space to fit the entire string, only part of `string` will be + * written. However, partially encoded characters will not be written. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(256); + * + * const len = buf.write('\u00bd + \u00bc = \u00be', 0); + * + * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`); + * // Prints: 12 bytes: ½ + ¼ = ¾ + * + * const buffer = Buffer.alloc(10); + * + * const length = buffer.write('abcd', 8); + * + * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`); + * // Prints: 2 bytes : ab + * ``` + * @since v0.1.90 + * @param string String to write to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write `string`. + * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`). + * @param [encoding='utf8'] The character encoding of `string`. + * @return Number of bytes written. + */ + write(string: string, encoding?: BufferEncoding): number; + write(string: string, offset: number, encoding?: BufferEncoding): number; + write(string: string, offset: number, length: number, encoding?: BufferEncoding): number; + /** + * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`. + * + * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8, + * then each invalid byte is replaced with the replacement character `U+FFFD`. + * + * The maximum length of a string instance (in UTF-16 code units) is available + * as {@link constants.MAX_STRING_LENGTH}. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * console.log(buf1.toString('utf8')); + * // Prints: abcdefghijklmnopqrstuvwxyz + * console.log(buf1.toString('utf8', 0, 5)); + * // Prints: abcde + * + * const buf2 = Buffer.from('tést'); + * + * console.log(buf2.toString('hex')); + * // Prints: 74c3a97374 + * console.log(buf2.toString('utf8', 0, 3)); + * // Prints: té + * console.log(buf2.toString(undefined, 0, 3)); + * // Prints: té + * ``` + * @since v0.1.90 + * @param [encoding='utf8'] The character encoding to use. + * @param [start=0] The byte offset to start decoding at. + * @param [end=buf.length] The byte offset to stop decoding at (not inclusive). + */ + toString(encoding?: BufferEncoding, start?: number, end?: number): string; + /** + * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls + * this function when stringifying a `Buffer` instance. + * + * `Buffer.from()` accepts objects in the format returned from this method. + * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]); + * const json = JSON.stringify(buf); + * + * console.log(json); + * // Prints: {"type":"Buffer","data":[1,2,3,4,5]} + * + * const copy = JSON.parse(json, (key, value) => { + * return value && value.type === 'Buffer' ? + * Buffer.from(value) : + * value; + * }); + * + * console.log(copy); + * // Prints: + * ``` + * @since v0.9.2 + */ + toJSON(): { + type: "Buffer"; + data: number[]; + }; + /** + * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('ABC'); + * const buf2 = Buffer.from('414243', 'hex'); + * const buf3 = Buffer.from('ABCD'); + * + * console.log(buf1.equals(buf2)); + * // Prints: true + * console.log(buf1.equals(buf3)); + * // Prints: false + * ``` + * @since v0.11.13 + * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`. + */ + equals(otherBuffer: Uint8Array): boolean; + /** + * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order. + * Comparison is based on the actual sequence of bytes in each `Buffer`. + * + * * `0` is returned if `target` is the same as `buf` + * * `1` is returned if `target` should come _before_`buf` when sorted. + * * `-1` is returned if `target` should come _after_`buf` when sorted. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('ABC'); + * const buf2 = Buffer.from('BCD'); + * const buf3 = Buffer.from('ABCD'); + * + * console.log(buf1.compare(buf1)); + * // Prints: 0 + * console.log(buf1.compare(buf2)); + * // Prints: -1 + * console.log(buf1.compare(buf3)); + * // Prints: -1 + * console.log(buf2.compare(buf1)); + * // Prints: 1 + * console.log(buf2.compare(buf3)); + * // Prints: 1 + * console.log([buf1, buf2, buf3].sort(Buffer.compare)); + * // Prints: [ , , ] + * // (This result is equal to: [buf1, buf3, buf2].) + * ``` + * + * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd` arguments can be used to limit the comparison to specific ranges within `target` and `buf` respectively. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]); + * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]); + * + * console.log(buf1.compare(buf2, 5, 9, 0, 4)); + * // Prints: 0 + * console.log(buf1.compare(buf2, 0, 6, 4)); + * // Prints: -1 + * console.log(buf1.compare(buf2, 5, 6, 5)); + * // Prints: 1 + * ``` + * + * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`, `targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`. + * @since v0.11.13 + * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`. + * @param [targetStart=0] The offset within `target` at which to begin comparison. + * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive). + * @param [sourceStart=0] The offset within `buf` at which to begin comparison. + * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive). + */ + compare( + target: Uint8Array, + targetStart?: number, + targetEnd?: number, + sourceStart?: number, + sourceEnd?: number, + ): -1 | 0 | 1; + /** + * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`. + * + * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available + * for all TypedArrays, including Node.js `Buffer`s, although it takes + * different function arguments. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create two `Buffer` instances. + * const buf1 = Buffer.allocUnsafe(26); + * const buf2 = Buffer.allocUnsafe(26).fill('!'); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`. + * buf1.copy(buf2, 8, 16, 20); + * // This is equivalent to: + * // buf2.set(buf1.subarray(16, 20), 8); + * + * console.log(buf2.toString('ascii', 0, 25)); + * // Prints: !!!!!!!!qrst!!!!!!!!!!!!! + * ``` + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a `Buffer` and copy data from one region to an overlapping region + * // within the same `Buffer`. + * + * const buf = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf[i] = i + 97; + * } + * + * buf.copy(buf, 0, 4, 10); + * + * console.log(buf.toString()); + * // Prints: efghijghijklmnopqrstuvwxyz + * ``` + * @since v0.1.90 + * @param target A `Buffer` or {@link Uint8Array} to copy into. + * @param [targetStart=0] The offset within `target` at which to begin writing. + * @param [sourceStart=0] The offset within `buf` from which to begin copying. + * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive). + * @return The number of bytes copied. + */ + copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigInt64BE(0x0102030405060708n, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigInt64BE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigInt64LE(0x0102030405060708n, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigInt64LE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. + * + * This function is also available under the `writeBigUint64BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigUInt64BE(0xdecafafecacefaden, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigUInt64BE(value: bigint, offset?: number): number; + /** + * @alias Buffer.writeBigUInt64BE + * @since v14.10.0, v12.19.0 + */ + writeBigUint64BE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigUInt64LE(0xdecafafecacefaden, 0); + * + * console.log(buf); + * // Prints: + * ``` + * + * This function is also available under the `writeBigUint64LE` alias. + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigUInt64LE(value: bigint, offset?: number): number; + /** + * @alias Buffer.writeBigUInt64LE + * @since v14.10.0, v12.19.0 + */ + writeBigUint64LE(value: bigint, offset?: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than an unsigned integer. + * + * This function is also available under the `writeUintLE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeUIntLE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeUIntLE(value: number, offset: number, byteLength: number): number; + /** + * @alias Buffer.writeUIntLE + * @since v14.9.0, v12.19.0 + */ + writeUintLE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than an unsigned integer. + * + * This function is also available under the `writeUintBE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeUIntBE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeUIntBE(value: number, offset: number, byteLength: number): number; + /** + * @alias Buffer.writeUIntBE + * @since v14.9.0, v12.19.0 + */ + writeUintBE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than a signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeIntLE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeIntLE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a + * signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeIntBE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeIntBE(value: number, offset: number, byteLength: number): number; + /** + * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readBigUint64BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); + * + * console.log(buf.readBigUInt64BE(0)); + * // Prints: 4294967295n + * ``` + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigUInt64BE(offset?: number): bigint; + /** + * @alias Buffer.readBigUInt64BE + * @since v14.10.0, v12.19.0 + */ + readBigUint64BE(offset?: number): bigint; + /** + * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readBigUint64LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); + * + * console.log(buf.readBigUInt64LE(0)); + * // Prints: 18446744069414584320n + * ``` + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigUInt64LE(offset?: number): bigint; + /** + * @alias Buffer.readBigUInt64LE + * @since v14.10.0, v12.19.0 + */ + readBigUint64LE(offset?: number): bigint; + /** + * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed + * values. + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigInt64BE(offset?: number): bigint; + /** + * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed + * values. + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigInt64LE(offset?: number): bigint; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned, little-endian integer supporting + * up to 48 bits of accuracy. + * + * This function is also available under the `readUintLE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readUIntLE(0, 6).toString(16)); + * // Prints: ab9078563412 + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readUIntLE(offset: number, byteLength: number): number; + /** + * @alias Buffer.readUIntLE + * @since v14.9.0, v12.19.0 + */ + readUintLE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned big-endian integer supporting + * up to 48 bits of accuracy. + * + * This function is also available under the `readUintBE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readUIntBE(0, 6).toString(16)); + * // Prints: 1234567890ab + * console.log(buf.readUIntBE(1, 6).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readUIntBE(offset: number, byteLength: number): number; + /** + * @alias Buffer.readUIntBE + * @since v14.9.0, v12.19.0 + */ + readUintBE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a little-endian, two's complement signed value + * supporting up to 48 bits of accuracy. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readIntLE(0, 6).toString(16)); + * // Prints: -546f87a9cbee + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readIntLE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a big-endian, two's complement signed value + * supporting up to 48 bits of accuracy. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readIntBE(0, 6).toString(16)); + * // Prints: 1234567890ab + * console.log(buf.readIntBE(1, 6).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * console.log(buf.readIntBE(1, 0).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readIntBE(offset: number, byteLength: number): number; + /** + * Reads an unsigned 8-bit integer from `buf` at the specified `offset`. + * + * This function is also available under the `readUint8` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, -2]); + * + * console.log(buf.readUInt8(0)); + * // Prints: 1 + * console.log(buf.readUInt8(1)); + * // Prints: 254 + * console.log(buf.readUInt8(2)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. + */ + readUInt8(offset?: number): number; + /** + * @alias Buffer.readUInt8 + * @since v14.9.0, v12.19.0 + */ + readUint8(offset?: number): number; + /** + * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified `offset`. + * + * This function is also available under the `readUint16LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56]); + * + * console.log(buf.readUInt16LE(0).toString(16)); + * // Prints: 3412 + * console.log(buf.readUInt16LE(1).toString(16)); + * // Prints: 5634 + * console.log(buf.readUInt16LE(2).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readUInt16LE(offset?: number): number; + /** + * @alias Buffer.readUInt16LE + * @since v14.9.0, v12.19.0 + */ + readUint16LE(offset?: number): number; + /** + * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint16BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56]); + * + * console.log(buf.readUInt16BE(0).toString(16)); + * // Prints: 1234 + * console.log(buf.readUInt16BE(1).toString(16)); + * // Prints: 3456 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readUInt16BE(offset?: number): number; + /** + * @alias Buffer.readUInt16BE + * @since v14.9.0, v12.19.0 + */ + readUint16BE(offset?: number): number; + /** + * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint32LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); + * + * console.log(buf.readUInt32LE(0).toString(16)); + * // Prints: 78563412 + * console.log(buf.readUInt32LE(1).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readUInt32LE(offset?: number): number; + /** + * @alias Buffer.readUInt32LE + * @since v14.9.0, v12.19.0 + */ + readUint32LE(offset?: number): number; + /** + * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint32BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); + * + * console.log(buf.readUInt32BE(0).toString(16)); + * // Prints: 12345678 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readUInt32BE(offset?: number): number; + /** + * @alias Buffer.readUInt32BE + * @since v14.9.0, v12.19.0 + */ + readUint32BE(offset?: number): number; + /** + * Reads a signed 8-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([-1, 5]); + * + * console.log(buf.readInt8(0)); + * // Prints: -1 + * console.log(buf.readInt8(1)); + * // Prints: 5 + * console.log(buf.readInt8(2)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. + */ + readInt8(offset?: number): number; + /** + * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0, 5]); + * + * console.log(buf.readInt16LE(0)); + * // Prints: 1280 + * console.log(buf.readInt16LE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readInt16LE(offset?: number): number; + /** + * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0, 5]); + * + * console.log(buf.readInt16BE(0)); + * // Prints: 5 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readInt16BE(offset?: number): number; + /** + * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0, 0, 0, 5]); + * + * console.log(buf.readInt32LE(0)); + * // Prints: 83886080 + * console.log(buf.readInt32LE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readInt32LE(offset?: number): number; + /** + * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0, 0, 0, 5]); + * + * console.log(buf.readInt32BE(0)); + * // Prints: 5 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readInt32BE(offset?: number): number; + /** + * Reads a 32-bit, little-endian float from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4]); + * + * console.log(buf.readFloatLE(0)); + * // Prints: 1.539989614439558e-36 + * console.log(buf.readFloatLE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readFloatLE(offset?: number): number; + /** + * Reads a 32-bit, big-endian float from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4]); + * + * console.log(buf.readFloatBE(0)); + * // Prints: 2.387939260590663e-38 + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readFloatBE(offset?: number): number; + /** + * Reads a 64-bit, little-endian double from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); + * + * console.log(buf.readDoubleLE(0)); + * // Prints: 5.447603722011605e-270 + * console.log(buf.readDoubleLE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. + */ + readDoubleLE(offset?: number): number; + /** + * Reads a 64-bit, big-endian double from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); + * + * console.log(buf.readDoubleBE(0)); + * // Prints: 8.20788039913184e-304 + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. + */ + readDoubleBE(offset?: number): number; + reverse(): this; + /** + * Interprets `buf` as an array of unsigned 16-bit integers and swaps the + * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap16(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap16(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * + * One convenient use of `buf.swap16()` is to perform a fast in-place conversion + * between UTF-16 little-endian and UTF-16 big-endian: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le'); + * buf.swap16(); // Convert to big-endian UTF-16 text. + * ``` + * @since v5.10.0 + * @return A reference to `buf`. + */ + swap16(): this; + /** + * Interprets `buf` as an array of unsigned 32-bit integers and swaps the + * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap32(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap32(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * @since v5.10.0 + * @return A reference to `buf`. + */ + swap32(): this; + /** + * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_. + * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap64(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap64(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * @since v6.3.0 + * @return A reference to `buf`. + */ + swap64(): this; + /** + * Writes `value` to `buf` at the specified `offset`. `value` must be a + * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything + * other than an unsigned 8-bit integer. + * + * This function is also available under the `writeUint8` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt8(0x3, 0); + * buf.writeUInt8(0x4, 1); + * buf.writeUInt8(0x23, 2); + * buf.writeUInt8(0x42, 3); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. + * @return `offset` plus the number of bytes written. + */ + writeUInt8(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt8 + * @since v14.9.0, v12.19.0 + */ + writeUint8(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is + * anything other than an unsigned 16-bit integer. + * + * This function is also available under the `writeUint16LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt16LE(0xdead, 0); + * buf.writeUInt16LE(0xbeef, 2); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeUInt16LE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt16LE + * @since v14.9.0, v12.19.0 + */ + writeUint16LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an + * unsigned 16-bit integer. + * + * This function is also available under the `writeUint16BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt16BE(0xdead, 0); + * buf.writeUInt16BE(0xbeef, 2); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeUInt16BE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt16BE + * @since v14.9.0, v12.19.0 + */ + writeUint16BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is + * anything other than an unsigned 32-bit integer. + * + * This function is also available under the `writeUint32LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt32LE(0xfeedface, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeUInt32LE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt32LE + * @since v14.9.0, v12.19.0 + */ + writeUint32LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an + * unsigned 32-bit integer. + * + * This function is also available under the `writeUint32BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt32BE(0xfeedface, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeUInt32BE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt32BE + * @since v14.9.0, v12.19.0 + */ + writeUint32BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset`. `value` must be a valid + * signed 8-bit integer. Behavior is undefined when `value` is anything other than + * a signed 8-bit integer. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt8(2, 0); + * buf.writeInt8(-2, 1); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. + * @return `offset` plus the number of bytes written. + */ + writeInt8(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is + * anything other than a signed 16-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt16LE(0x0304, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeInt16LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is + * anything other than a signed 16-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt16BE(0x0102, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeInt16BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is + * anything other than a signed 32-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeInt32LE(0x05060708, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeInt32LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is + * anything other than a signed 32-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeInt32BE(0x01020304, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeInt32BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is + * undefined when `value` is anything other than a JavaScript number. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeFloatLE(0xcafebabe, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeFloatLE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is + * undefined when `value` is anything other than a JavaScript number. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeFloatBE(0xcafebabe, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeFloatBE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything + * other than a JavaScript number. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeDoubleLE(123.456, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeDoubleLE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything + * other than a JavaScript number. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeDoubleBE(123.456, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeDoubleBE(value: number, offset?: number): number; + /** + * Fills `buf` with the specified `value`. If the `offset` and `end` are not given, + * the entire `buf` will be filled: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Fill a `Buffer` with the ASCII character 'h'. + * + * const b = Buffer.allocUnsafe(50).fill('h'); + * + * console.log(b.toString()); + * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh + * + * // Fill a buffer with empty string + * const c = Buffer.allocUnsafe(5).fill(''); + * + * console.log(c.fill('')); + * // Prints: + * ``` + * + * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or + * integer. If the resulting integer is greater than `255` (decimal), `buf` will be + * filled with `value & 255`. + * + * If the final write of a `fill()` operation falls on a multi-byte character, + * then only the bytes of that character that fit into `buf` are written: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Fill a `Buffer` with character that takes up two bytes in UTF-8. + * + * console.log(Buffer.allocUnsafe(5).fill('\u0222')); + * // Prints: + * ``` + * + * If `value` contains invalid characters, it is truncated; if no valid + * fill data remains, an exception is thrown: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(5); + * + * console.log(buf.fill('a')); + * // Prints: + * console.log(buf.fill('aazz', 'hex')); + * // Prints: + * console.log(buf.fill('zz', 'hex')); + * // Throws an exception. + * ``` + * @since v0.5.0 + * @param value The value with which to fill `buf`. Empty value (string, Uint8Array, Buffer) is coerced to `0`. + * @param [offset=0] Number of bytes to skip before starting to fill `buf`. + * @param [end=buf.length] Where to stop filling `buf` (not inclusive). + * @param [encoding='utf8'] The encoding for `value` if `value` is a string. + * @return A reference to `buf`. + */ + fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; + fill(value: string | Uint8Array | number, offset: number, encoding: BufferEncoding): this; + fill(value: string | Uint8Array | number, encoding: BufferEncoding): this; + /** + * If `value` is: + * + * * a string, `value` is interpreted according to the character encoding in + * `encoding`. + * * a `Buffer` or `Uint8Array`, `value` will be used in its entirety. + * To compare a partial `Buffer`, use `buf.subarray`. + * * a number, `value` will be interpreted as an unsigned 8-bit integer + * value between `0` and `255`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('this is a buffer'); + * + * console.log(buf.indexOf('this')); + * // Prints: 0 + * console.log(buf.indexOf('is')); + * // Prints: 2 + * console.log(buf.indexOf(Buffer.from('a buffer'))); + * // Prints: 8 + * console.log(buf.indexOf(97)); + * // Prints: 8 (97 is the decimal ASCII value for 'a') + * console.log(buf.indexOf(Buffer.from('a buffer example'))); + * // Prints: -1 + * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8))); + * // Prints: 8 + * + * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); + * + * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le')); + * // Prints: 4 + * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le')); + * // Prints: 6 + * ``` + * + * If `value` is not a string, number, or `Buffer`, this method will throw a + * `TypeError`. If `value` is a number, it will be coerced to a valid byte value, + * an integer between 0 and 255. + * + * If `byteOffset` is not a number, it will be coerced to a number. If the result + * of coercion is `NaN` or `0`, then the entire buffer will be searched. This + * behavior matches `String.prototype.indexOf()`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const b = Buffer.from('abcdef'); + * + * // Passing a value that's a number, but not a valid byte. + * // Prints: 2, equivalent to searching for 99 or 'c'. + * console.log(b.indexOf(99.9)); + * console.log(b.indexOf(256 + 99)); + * + * // Passing a byteOffset that coerces to NaN or 0. + * // Prints: 1, searching the whole buffer. + * console.log(b.indexOf('b', undefined)); + * console.log(b.indexOf('b', {})); + * console.log(b.indexOf('b', null)); + * console.log(b.indexOf('b', [])); + * ``` + * + * If `value` is an empty string or empty `Buffer` and `byteOffset` is less + * than `buf.length`, `byteOffset` will be returned. If `value` is empty and + * `byteOffset` is at least `buf.length`, `buf.length` will be returned. + * @since v1.5.0 + * @param value What to search for. + * @param start Where to begin searching in `buf`. If negative, then + * offset is calculated from the end of `buf`. **Default:** `0`. + * @param end Where to stop searching in `buf` (exclusive). **Default:** + * `buf.length`. + * @param encoding If `value` is a string, this is the encoding used to + * determine the binary representation of the string that will be searched for in + * `buf`. **Default:** `'utf8'`. + * @returns The index of the first occurrence of `value` in `buf`, or + * `-1` if `buf` does not contain `value`. + */ + indexOf( + value: string | number | Uint8Array, + start?: number, + end?: number, + encoding?: BufferEncoding, + ): number; + indexOf(value: string | number | Uint8Array, start: number, encoding: BufferEncoding): number; + indexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number; + /** + * Identical to `buf.indexOf()`, except the last occurrence of `value` is found + * rather than the first occurrence. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('this buffer is a buffer'); + * + * console.log(buf.lastIndexOf('this')); + * // Prints: 0 + * console.log(buf.lastIndexOf('buffer')); + * // Prints: 17 + * console.log(buf.lastIndexOf(Buffer.from('buffer'))); + * // Prints: 17 + * console.log(buf.lastIndexOf(97)); + * // Prints: 15 (97 is the decimal ASCII value for 'a') + * console.log(buf.lastIndexOf(Buffer.from('yolo'))); + * // Prints: -1 + * console.log(buf.lastIndexOf('buffer', 5)); + * // Prints: 5 + * console.log(buf.lastIndexOf('buffer', 4)); + * // Prints: -1 + * + * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); + * + * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le')); + * // Prints: 6 + * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le')); + * // Prints: 4 + * ``` + * + * If `value` is not a string, number, or `Buffer`, this method will throw a + * `TypeError`. If `value` is a number, it will be coerced to a valid byte value, + * an integer between 0 and 255. + * + * If `byteOffset` is not a number, it will be coerced to a number. Any arguments + * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer. + * This behavior matches `String.prototype.lastIndexOf()`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const b = Buffer.from('abcdef'); + * + * // Passing a value that's a number, but not a valid byte. + * // Prints: 2, equivalent to searching for 99 or 'c'. + * console.log(b.lastIndexOf(99.9)); + * console.log(b.lastIndexOf(256 + 99)); + * + * // Passing a byteOffset that coerces to NaN. + * // Prints: 1, searching the whole buffer. + * console.log(b.lastIndexOf('b', undefined)); + * console.log(b.lastIndexOf('b', {})); + * + * // Passing a byteOffset that coerces to 0. + * // Prints: -1, equivalent to passing 0. + * console.log(b.lastIndexOf('b', null)); + * console.log(b.lastIndexOf('b', [])); + * ``` + * + * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned. + * @since v6.0.0 + * @param value What to search for. + * @param start Where to begin searching in `buf`. If negative, then + * offset is calculated from the end of `buf`. **Default:** + * `buf.length - 1`. + * @param end Where to stop searching in `buf` (exclusive). **Default:** + * `buf.length`. + * @param encoding If `value` is a string, this is the encoding used to + * determine the binary representation of the string that will be searched for in + * `buf`. **Default:** `'utf8'`. + * @returns The index of the last occurrence of `value` in `buf`, or + * `-1` if `buf` does not contain `value`. + */ + lastIndexOf( + value: string | number | Uint8Array, + start?: number, + end?: number, + encoding?: BufferEncoding, + ): number; + lastIndexOf(value: string | number | Uint8Array, start: number, encoding: BufferEncoding): number; + lastIndexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number; + /** + * Equivalent to `buf.indexOf() !== -1`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('this is a buffer'); + * + * console.log(buf.includes('this')); + * // Prints: true + * console.log(buf.includes('is')); + * // Prints: true + * console.log(buf.includes(Buffer.from('a buffer'))); + * // Prints: true + * console.log(buf.includes(97)); + * // Prints: true (97 is the decimal ASCII value for 'a') + * console.log(buf.includes(Buffer.from('a buffer example'))); + * // Prints: false + * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8))); + * // Prints: true + * console.log(buf.includes('this', 4)); + * // Prints: false + * ``` + * @since v5.3.0 + * @param value What to search for. + * @param start Where to begin searching in `buf`. If negative, then + * offset is calculated from the end of `buf`. **Default:** `0`. + * @param end Where to stop searching in `buf` (exclusive). **Default:** + * `buf.length`. + * @param encoding If `value` is a string, this is its encoding. + * **Default:** `'utf8'`. + * @returns `true` if `value` was found in `buf`, `false` otherwise. + */ + includes( + value: string | number | Uint8Array, + start?: number, + end?: number, + encoding?: BufferEncoding, + ): boolean; + includes(value: string | number | Uint8Array, start: number, encoding: BufferEncoding): boolean; + includes(value: string | number | Uint8Array, encoding: BufferEncoding): boolean; + } + var Buffer: BufferConstructor; + } + // #region web types + export type BlobPart = NodeJS.BufferSource | Blob | string; + export interface BlobPropertyBag { + endings?: "native" | "transparent"; + type?: string; + } + export interface FilePropertyBag extends BlobPropertyBag { + lastModified?: number; + } + export interface Blob { + readonly size: number; + readonly type: string; + arrayBuffer(): Promise; + bytes(): Promise; + slice(start?: number, end?: number, contentType?: string): Blob; + stream(): ReadableStream; + text(): Promise; + textStream(): ReadableStream; + } + export var Blob: { + prototype: Blob; + new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob; + }; + export interface File extends Blob { + readonly lastModified: number; + readonly name: string; + readonly webkitRelativePath: string; + } + export var File: { + prototype: File; + new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File; + }; + export import atob = globalThis.atob; + export import btoa = globalThis.btoa; + // #endregion +} +declare module "buffer" { + export * from "node:buffer"; +} diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts new file mode 100644 index 0000000..f89e415 --- /dev/null +++ b/node_modules/@types/node/child_process.d.ts @@ -0,0 +1,1361 @@ +declare module "node:child_process" { + import { NonSharedBuffer } from "node:buffer"; + import * as dgram from "node:dgram"; + import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; + import * as net from "node:net"; + import { Readable, Stream, Writable } from "node:stream"; + import { URL } from "node:url"; + type Serializable = string | object | number | boolean | bigint; + type SendHandle = net.Socket | net.Server | dgram.Socket | undefined; + interface ChildProcessEventMap { + "close": [code: number | null, signal: NodeJS.Signals | null]; + "disconnect": []; + "error": [err: Error]; + "exit": [code: number | null, signal: NodeJS.Signals | null]; + "message": [message: Serializable, sendHandle: SendHandle]; + "spawn": []; + } + /** + * Instances of the `ChildProcess` represent spawned child processes. + * + * Instances of `ChildProcess` are not intended to be created directly. Rather, + * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create + * instances of `ChildProcess`. + * @since v2.2.0 + */ + class ChildProcess implements EventEmitter { + /** + * A `Writable Stream` that represents the child process's `stdin`. + * + * If a child process waits to read all of its input, the child will not continue + * until this stream has been closed via `end()`. + * + * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will + * refer to the same value. + * + * The `subprocess.stdin` property can be `null` or `undefined` if the child process could not be successfully spawned. + * @since v0.1.90 + */ + stdin: Writable | null; + /** + * A `Readable Stream` that represents the child process's `stdout`. + * + * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will + * refer to the same value. + * + * ```js + * import { spawn } from 'node:child_process'; + * + * const subprocess = spawn('ls'); + * + * subprocess.stdout.on('data', (data) => { + * console.log(`Received chunk ${data}`); + * }); + * ``` + * + * The `subprocess.stdout` property can be `null` or `undefined` if the child process could not be successfully spawned. + * @since v0.1.90 + */ + stdout: Readable | null; + /** + * A `Readable Stream` that represents the child process's `stderr`. + * + * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will + * refer to the same value. + * + * The `subprocess.stderr` property can be `null` or `undefined` if the child process could not be successfully spawned. + * @since v0.1.90 + */ + stderr: Readable | null; + /** + * The `subprocess.channel` property is a reference to the child's IPC channel. If + * no IPC channel exists, this property is `undefined`. + * @since v7.1.0 + */ + readonly channel?: Control | null; + /** + * A sparse array of pipes to the child process, corresponding with positions in + * the `stdio` option passed to {@link spawn} that have been set + * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and `subprocess.stdio[2]` are also available as `subprocess.stdin`, `subprocess.stdout`, and `subprocess.stderr`, + * respectively. + * + * In the following example, only the child's fd `1` (stdout) is configured as a + * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values + * in the array are `null`. + * + * ```js + * import assert from 'node:assert'; + * import fs from 'node:fs'; + * import child_process from 'node:child_process'; + * + * const subprocess = child_process.spawn('ls', { + * stdio: [ + * 0, // Use parent's stdin for child. + * 'pipe', // Pipe child's stdout to parent. + * fs.openSync('err.out', 'w'), // Direct child's stderr to a file. + * ], + * }); + * + * assert.strictEqual(subprocess.stdio[0], null); + * assert.strictEqual(subprocess.stdio[0], subprocess.stdin); + * + * assert(subprocess.stdout); + * assert.strictEqual(subprocess.stdio[1], subprocess.stdout); + * + * assert.strictEqual(subprocess.stdio[2], null); + * assert.strictEqual(subprocess.stdio[2], subprocess.stderr); + * ``` + * + * The `subprocess.stdio` property can be `undefined` if the child process could + * not be successfully spawned. + * @since v0.7.10 + */ + readonly stdio: [ + Writable | null, + // stdin + Readable | null, + // stdout + Readable | null, + // stderr + Readable | Writable | null | undefined, + // extra + Readable | Writable | null | undefined, // extra + ]; + /** + * The `subprocess.killed` property indicates whether the child process + * successfully received a signal from `subprocess.kill()`. The `killed` property + * does not indicate that the child process has been terminated. + * @since v0.5.10 + */ + readonly killed: boolean; + /** + * Returns the process identifier (PID) of the child process. If the child process + * fails to spawn due to errors, then the value is `undefined` and `error` is + * emitted. + * + * ```js + * import { spawn } from 'node:child_process'; + * const grep = spawn('grep', ['ssh']); + * + * console.log(`Spawned child pid: ${grep.pid}`); + * grep.stdin.end(); + * ``` + * @since v0.1.90 + */ + readonly pid?: number | undefined; + /** + * The `subprocess.connected` property indicates whether it is still possible to + * send and receive messages from a child process. When `subprocess.connected` is `false`, it is no longer possible to send or receive messages. + * @since v0.7.2 + */ + readonly connected: boolean; + /** + * The `subprocess.exitCode` property indicates the exit code of the child process. + * If the child process is still running, the field will be `null`. + * + * When the child process is terminated by a signal, `subprocess.exitCode` will be + * `null` and `subprocess.signalCode` will be set. To get the corresponding + * POSIX exit code, use + * `util.convertProcessSignalToExitCode(subprocess.signalCode)`. + */ + readonly exitCode: number | null; + /** + * The `subprocess.signalCode` property indicates the signal received by + * the child process if any, else `null`. + */ + readonly signalCode: NodeJS.Signals | null; + /** + * The `subprocess.spawnargs` property represents the full list of command-line + * arguments the child process was launched with. + */ + readonly spawnargs: string[]; + /** + * The `subprocess.spawnfile` property indicates the executable file name of + * the child process that is launched. + * + * For {@link fork}, its value will be equal to `process.execPath`. + * For {@link spawn}, its value will be the name of + * the executable file. + * For {@link exec}, its value will be the name of the shell + * in which the child process is launched. + */ + readonly spawnfile: string; + /** + * The `subprocess.kill()` method sends a signal to the child process. If no + * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function + * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise. + * + * ```js + * import { spawn } from 'node:child_process'; + * const grep = spawn('grep', ['ssh']); + * + * grep.on('close', (code, signal) => { + * console.log( + * `child process terminated due to receipt of signal ${signal}`); + * }); + * + * // Send SIGHUP to process. + * grep.kill('SIGHUP'); + * ``` + * + * The `ChildProcess` object may emit an `'error'` event if the signal + * cannot be delivered. Sending a signal to a child process that has already exited + * is not an error but may have unforeseen consequences. Specifically, if the + * process identifier (PID) has been reassigned to another process, the signal will + * be delivered to that process instead which can have unexpected results. + * + * While the function is called `kill`, the signal delivered to the child process + * may not actually terminate the process. + * + * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference. + * + * On Windows, where POSIX signals do not exist, the `signal` argument will be + * ignored, and the process will be killed forcefully and abruptly (similar to `'SIGKILL'`). + * See `Signal Events` for more details. + * + * On Linux, child processes of child processes will not be terminated + * when attempting to kill their parent. This is likely to happen when running a + * new process in a shell or with the use of the `shell` option of `ChildProcess`: + * + * ```js + * import { spawn } from 'node:child_process'; + * + * const subprocess = spawn( + * 'sh', + * [ + * '-c', + * `node -e "setInterval(() => { + * console.log(process.pid, 'is alive') + * }, 500);"`, + * ], { + * stdio: ['inherit', 'inherit', 'inherit'], + * }, + * ); + * + * setTimeout(() => { + * subprocess.kill(); // Does not terminate the Node.js process in the shell. + * }, 2000); + * ``` + * @since v0.1.90 + */ + kill(signal?: NodeJS.Signals | number): boolean; + /** + * Calls {@link ChildProcess.kill} with `'SIGTERM'`. + * @since v20.5.0 + */ + [Symbol.dispose](): void; + /** + * When an IPC channel has been established between the parent and child ( + * i.e. when using {@link fork}), the `subprocess.send()` method can + * be used to send messages to the child process. When the child process is a + * Node.js instance, these messages can be received via the `'message'` event. + * + * The message goes through serialization and parsing. The resulting + * message might not be the same as what is originally sent. + * + * For example, in the parent script: + * + * ```js + * import cp from 'node:child_process'; + * const n = cp.fork(`${__dirname}/sub.js`); + * + * n.on('message', (m) => { + * console.log('PARENT got message:', m); + * }); + * + * // Causes the child to print: CHILD got message: { hello: 'world' } + * n.send({ hello: 'world' }); + * ``` + * + * And then the child script, `'sub.js'` might look like this: + * + * ```js + * process.on('message', (m) => { + * console.log('CHILD got message:', m); + * }); + * + * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null } + * process.send({ foo: 'bar', baz: NaN }); + * ``` + * + * Child Node.js processes will have a `process.send()` method of their own + * that allows the child to send messages back to the parent. + * + * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages + * containing a `NODE_` prefix in the `cmd` property are reserved for use within + * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the `'internalMessage'` event and are consumed internally by Node.js. + * Applications should avoid using such messages or listening for `'internalMessage'` events as it is subject to change without notice. + * + * The optional `sendHandle` argument that may be passed to `subprocess.send()` is + * for passing a TCP server or socket object to the child process. The child will + * receive the object as the second argument passed to the callback function + * registered on the `'message'` event. Any data that is received and buffered in + * the socket will not be sent to the child. Sending IPC sockets is not supported on Windows. + * + * The optional `callback` is a function that is invoked after the message is + * sent but before the child may have received it. The function is called with a + * single argument: `null` on success, or an `Error` object on failure. + * + * If no `callback` function is provided and the message cannot be sent, an `'error'` event will be emitted by the `ChildProcess` object. This can + * happen, for instance, when the child process has already exited. + * + * `subprocess.send()` will return `false` if the channel has closed or when the + * backlog of unsent messages exceeds a threshold that makes it unwise to send + * more. Otherwise, the method returns `true`. The `callback` function can be + * used to implement flow control. + * + * #### Example: sending a server object + * + * The `sendHandle` argument can be used, for instance, to pass the handle of + * a TCP server object to the child process as illustrated in the example below: + * + * ```js + * import { createServer } from 'node:net'; + * import { fork } from 'node:child_process'; + * const subprocess = fork('subprocess.js'); + * + * // Open up the server object and send the handle. + * const server = createServer(); + * server.on('connection', (socket) => { + * socket.end('handled by parent'); + * }); + * server.listen(1337, () => { + * subprocess.send('server', server); + * }); + * ``` + * + * The child would then receive the server object as: + * + * ```js + * process.on('message', (m, server) => { + * if (m === 'server') { + * server.on('connection', (socket) => { + * socket.end('handled by child'); + * }); + * } + * }); + * ``` + * + * Once the server is now shared between the parent and child, some connections + * can be handled by the parent and some by the child. + * + * While the example above uses a server created using the `node:net` module, `node:dgram` module servers use exactly the same workflow with the exceptions of + * listening on a `'message'` event instead of `'connection'` and using `server.bind()` instead of `server.listen()`. This is, however, only + * supported on Unix platforms. + * + * #### Example: sending a socket object + * + * Similarly, the `sendHandler` argument can be used to pass the handle of a + * socket to the child process. The example below spawns two children that each + * handle connections with "normal" or "special" priority: + * + * ```js + * import { createServer } from 'node:net'; + * import { fork } from 'node:child_process'; + * const normal = fork('subprocess.js', ['normal']); + * const special = fork('subprocess.js', ['special']); + * + * // Open up the server and send sockets to child. Use pauseOnConnect to prevent + * // the sockets from being read before they are sent to the child process. + * const server = createServer({ pauseOnConnect: true }); + * server.on('connection', (socket) => { + * + * // If this is special priority... + * if (socket.remoteAddress === '74.125.127.100') { + * special.send('socket', socket); + * return; + * } + * // This is normal priority. + * normal.send('socket', socket); + * }); + * server.listen(1337); + * ``` + * + * The `subprocess.js` would receive the socket handle as the second argument + * passed to the event callback function: + * + * ```js + * process.on('message', (m, socket) => { + * if (m === 'socket') { + * if (socket) { + * // Check that the client socket exists. + * // It is possible for the socket to be closed between the time it is + * // sent and the time it is received in the child process. + * socket.end(`Request handled with ${process.argv[2]} priority`); + * } + * } + * }); + * ``` + * + * Do not use `.maxConnections` on a socket that has been passed to a subprocess. + * The parent cannot track when the socket is destroyed. + * + * Any `'message'` handlers in the subprocess should verify that `socket` exists, + * as the connection may have been closed during the time it takes to send the + * connection to the child. + * @since v0.5.9 + * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v26.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v26.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v26.x/api/dgram.html#class-dgramsocket) object. + * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties: + */ + send(message: Serializable, callback?: (error: Error | null) => void): boolean; + send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean; + send( + message: Serializable, + sendHandle?: SendHandle, + options?: MessageOptions, + callback?: (error: Error | null) => void, + ): boolean; + /** + * Closes the IPC channel between parent and child, allowing the child to exit + * gracefully once there are no other connections keeping it alive. After calling + * this method the `subprocess.connected` and `process.connected` properties in + * both the parent and child (respectively) will be set to `false`, and it will be + * no longer possible to pass messages between the processes. + * + * The `'disconnect'` event will be emitted when there are no messages in the + * process of being received. This will most often be triggered immediately after + * calling `subprocess.disconnect()`. + * + * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked + * within the child process to close the IPC channel as well. + * @since v0.7.2 + */ + disconnect(): void; + /** + * By default, the parent will wait for the detached child to exit. To prevent the + * parent from waiting for a given `subprocess` to exit, use the `subprocess.unref()` method. Doing so will cause the parent's event loop to not + * include the child in its reference count, allowing the parent to exit + * independently of the child, unless there is an established IPC channel between + * the child and the parent. + * + * ```js + * import { spawn } from 'node:child_process'; + * + * const subprocess = spawn(process.argv[0], ['child_program.js'], { + * detached: true, + * stdio: 'ignore', + * }); + * + * subprocess.unref(); + * ``` + * @since v0.7.10 + */ + unref(): void; + /** + * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will + * restore the removed reference count for the child process, forcing the parent + * to wait for the child to exit before exiting itself. + * + * ```js + * import { spawn } from 'node:child_process'; + * + * const subprocess = spawn(process.argv[0], ['child_program.js'], { + * detached: true, + * stdio: 'ignore', + * }); + * + * subprocess.unref(); + * subprocess.ref(); + * ``` + * @since v0.7.10 + */ + ref(): void; + } + interface ChildProcess extends InternalEventEmitter {} + // return this object when stdio option is undefined or not specified + interface ChildProcessWithoutNullStreams extends ChildProcess { + stdin: Writable; + stdout: Readable; + stderr: Readable; + readonly stdio: [ + Writable, + Readable, + Readable, + // stderr + Readable | Writable | null | undefined, + // extra, no modification + Readable | Writable | null | undefined, // extra, no modification + ]; + } + // return this object when stdio option is a tuple of 3 + interface ChildProcessByStdio + extends ChildProcess + { + stdin: I; + stdout: O; + stderr: E; + readonly stdio: [ + I, + O, + E, + Readable | Writable | null | undefined, + // extra, no modification + Readable | Writable | null | undefined, // extra, no modification + ]; + } + interface Control extends EventEmitter { + ref(): void; + unref(): void; + } + interface MessageOptions { + keepOpen?: boolean | undefined; + } + type IOType = "overlapped" | "pipe" | "ignore" | "inherit"; + type StdioOptions = IOType | Array; + type SerializationType = "json" | "advanced"; + interface MessagingOptions extends Abortable { + /** + * Specify the kind of serialization used for sending messages between processes. + * @default 'json' + */ + serialization?: SerializationType | undefined; + /** + * The signal value to be used when the spawned process will be killed by the abort signal. + * @default 'SIGTERM' + */ + killSignal?: NodeJS.Signals | number | undefined; + /** + * In milliseconds the maximum amount of time the process is allowed to run. + */ + timeout?: number | undefined; + } + interface ProcessEnvOptions { + uid?: number | undefined; + gid?: number | undefined; + cwd?: string | URL | undefined; + env?: NodeJS.ProcessEnv | undefined; + } + interface CommonOptions extends ProcessEnvOptions { + /** + * @default false + */ + windowsHide?: boolean | undefined; + /** + * @default 0 + */ + timeout?: number | undefined; + } + interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable { + argv0?: string | undefined; + /** + * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings. + * If passed as an array, the first element is used for `stdin`, the second for + * `stdout`, and the third for `stderr`. A fourth element can be used to + * specify the `stdio` behavior beyond the standard streams. See + * {@link ChildProcess.stdio} for more information. + * + * @default 'pipe' + */ + stdio?: StdioOptions | undefined; + shell?: boolean | string | undefined; + windowsVerbatimArguments?: boolean | undefined; + } + interface SpawnOptions extends CommonSpawnOptions { + detached?: boolean | undefined; + } + interface SpawnOptionsWithoutStdio extends SpawnOptions { + stdio?: StdioPipeNamed | StdioPipe[] | undefined; + } + type StdioNull = "inherit" | "ignore" | Stream; + type StdioPipeNamed = "pipe" | "overlapped"; + type StdioPipe = undefined | null | StdioPipeNamed; + interface SpawnOptionsWithStdioTuple< + Stdin extends StdioNull | StdioPipe, + Stdout extends StdioNull | StdioPipe, + Stderr extends StdioNull | StdioPipe, + > extends SpawnOptions { + stdio: [Stdin, Stdout, Stderr]; + } + /** + * The `child_process.spawn()` method spawns a new process using the given `command`, with command-line arguments in `args`. If omitted, `args` defaults + * to an empty array. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * + * A third argument may be used to specify additional options, with these defaults: + * + * ```js + * const defaults = { + * cwd: undefined, + * env: process.env, + * }; + * ``` + * + * Use `cwd` to specify the working directory from which the process is spawned. + * If not given, the default is to inherit the current working directory. If given, + * but the path does not exist, the child process emits an `ENOENT` error + * and exits immediately. `ENOENT` is also emitted when the command + * does not exist. + * + * Use `env` to specify environment variables that will be visible to the new + * process, the default is `process.env`. + * + * `undefined` values in `env` will be ignored. + * + * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the + * exit code: + * + * ```js + * import { spawn } from 'node:child_process'; + * import { once } from 'node:events'; + * const ls = spawn('ls', ['-lh', '/usr']); + * + * ls.stdout.on('data', (data) => { + * console.log(`stdout: ${data}`); + * }); + * + * ls.stderr.on('data', (data) => { + * console.error(`stderr: ${data}`); + * }); + * + * const [code] = await once(ls, 'close'); + * console.log(`child process exited with code ${code}`); + * ``` + * + * Example: A very elaborate way to run `ps ax | grep ssh` + * + * ```js + * import { spawn } from 'node:child_process'; + * const ps = spawn('ps', ['ax']); + * const grep = spawn('grep', ['ssh']); + * + * ps.stdout.on('data', (data) => { + * grep.stdin.write(data); + * }); + * + * ps.stderr.on('data', (data) => { + * console.error(`ps stderr: ${data}`); + * }); + * + * ps.on('close', (code) => { + * if (code !== 0) { + * console.log(`ps process exited with code ${code}`); + * } + * grep.stdin.end(); + * }); + * + * grep.stdout.on('data', (data) => { + * console.log(data.toString()); + * }); + * + * grep.stderr.on('data', (data) => { + * console.error(`grep stderr: ${data}`); + * }); + * + * grep.on('close', (code) => { + * if (code !== 0) { + * console.log(`grep process exited with code ${code}`); + * } + * }); + * ``` + * + * Example of checking for failed `spawn`: + * + * ```js + * import { spawn } from 'node:child_process'; + * const subprocess = spawn('bad_command'); + * + * subprocess.on('error', (err) => { + * console.error('Failed to start subprocess.'); + * }); + * ``` + * + * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process + * title while others (Windows, SunOS) will use `command`. + * + * Node.js overwrites `argv[0]` with `process.execPath` on startup, so `process.argv[0]` in a Node.js child process will not match the `argv0` parameter passed to `spawn` from the parent. Retrieve + * it with the `process.argv0` property instead. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * import { spawn } from 'node:child_process'; + * const controller = new AbortController(); + * const { signal } = controller; + * const grep = spawn('grep', ['ssh'], { signal }); + * grep.on('error', (err) => { + * // This will be called with err being an AbortError if the controller aborts + * }); + * controller.abort(); // Stops the child process + * ``` + * @since v0.1.90 + * @param command The command to run. + * @param args List of string arguments. + */ + function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptions): ChildProcess; + // overloads of spawn with 'args' + function spawn( + command: string, + args?: readonly string[], + options?: SpawnOptionsWithoutStdio, + ): ChildProcessWithoutNullStreams; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn(command: string, args: readonly string[], options: SpawnOptions): ChildProcess; + interface ExecOptions extends CommonOptions { + shell?: string | undefined; + signal?: AbortSignal | undefined; + maxBuffer?: number | undefined; + killSignal?: NodeJS.Signals | number | undefined; + encoding?: string | null | undefined; + } + interface ExecOptionsWithStringEncoding extends ExecOptions { + encoding?: BufferEncoding | undefined; + } + interface ExecOptionsWithBufferEncoding extends ExecOptions { + encoding: "buffer" | null; + } + interface ExecException extends Omit { + cmd: string; + code?: number | string; + killed?: boolean; + signal?: NodeJS.Signals; + stdout?: string | NonSharedBuffer; + stderr?: string | NonSharedBuffer; + } + /** + * Spawns a shell then executes the `command` within that shell, buffering any + * generated output. The `command` string passed to the exec function is processed + * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters)) + * need to be dealt with accordingly: + * + * ```js + * import { exec } from 'node:child_process'; + * + * exec('"/path/to/test file/test.sh" arg1 arg2'); + * // Double quotes are used so that the space in the path is not interpreted as + * // a delimiter of multiple arguments. + * + * exec('echo "The \\$HOME variable is $HOME"'); + * // The $HOME variable is escaped in the first instance, but not in the second. + * ``` + * + * **Never pass unsanitized user input to this function. Any input containing shell** + * **metacharacters may be used to trigger arbitrary command execution.** + * + * If a `callback` function is provided, it is called with the arguments `(error, stdout, stderr)`. On success, `error` will be `null`. On error, `error` will be an instance of `Error`. The + * `error.code` property will be + * the exit code of the process. By convention, any exit code other than `0` indicates an error. `error.signal` will be the signal that terminated the + * process. + * + * The `stdout` and `stderr` arguments passed to the callback will contain the + * stdout and stderr output of the child process. By default, Node.js will decode + * the output as UTF-8 and pass strings to the callback. The `encoding` option + * can be used to specify the character encoding used to decode the stdout and + * stderr output. If `encoding` is `'buffer'`, or an unrecognized character + * encoding, `Buffer` objects will be passed to the callback instead. + * + * ```js + * import { exec } from 'node:child_process'; + * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => { + * if (error) { + * console.error(`exec error: ${error}`); + * return; + * } + * console.log(`stdout: ${stdout}`); + * console.error(`stderr: ${stderr}`); + * }); + * ``` + * + * If `timeout` is greater than `0`, the parent will send the signal + * identified by the `killSignal` property (the default is `'SIGTERM'`) if the + * child runs longer than `timeout` milliseconds. + * + * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace + * the existing process and uses a shell to execute the command. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In + * case of an error (including any error resulting in an exit code other than 0), a + * rejected promise is returned, with the same `error` object given in the + * callback, but with two additional properties `stdout` and `stderr`. + * + * ```js + * import util from 'node:util'; + * import child_process from 'node:child_process'; + * const exec = util.promisify(child_process.exec); + * + * async function lsExample() { + * const { stdout, stderr } = await exec('ls'); + * console.log('stdout:', stdout); + * console.error('stderr:', stderr); + * } + * lsExample(); + * ``` + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * import { exec } from 'node:child_process'; + * const controller = new AbortController(); + * const { signal } = controller; + * const child = exec('grep ssh', { signal }, (error) => { + * console.error(error); // an AbortError + * }); + * controller.abort(); + * ``` + * @since v0.1.90 + * @param command The command to run, with space-separated arguments. + * @param callback called with the output when process terminates. + */ + function exec( + command: string, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + function exec( + command: string, + options: ExecOptionsWithBufferEncoding, + callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, + ): ChildProcess; + // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`. + function exec( + command: string, + options: ExecOptionsWithStringEncoding, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function exec( + command: string, + options: ExecOptions | undefined | null, + callback?: ( + error: ExecException | null, + stdout: string | NonSharedBuffer, + stderr: string | NonSharedBuffer, + ) => void, + ): ChildProcess; + interface PromiseWithChild extends Promise { + child: ChildProcess; + } + namespace exec { + function __promisify__(command: string): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options: ExecOptionsWithBufferEncoding, + ): PromiseWithChild<{ + stdout: NonSharedBuffer; + stderr: NonSharedBuffer; + }>; + function __promisify__( + command: string, + options: ExecOptionsWithStringEncoding, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options: ExecOptions | undefined | null, + ): PromiseWithChild<{ + stdout: string | NonSharedBuffer; + stderr: string | NonSharedBuffer; + }>; + } + interface ExecFileOptions extends CommonOptions, Abortable { + maxBuffer?: number | undefined; + killSignal?: NodeJS.Signals | number | undefined; + windowsVerbatimArguments?: boolean | undefined; + shell?: boolean | string | undefined; + signal?: AbortSignal | undefined; + encoding?: string | null | undefined; + } + interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { + encoding?: BufferEncoding | undefined; + } + interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { + encoding: "buffer" | null; + } + /** @deprecated Use `ExecFileOptions` instead. */ + interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {} + /** + * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified + * executable `file` is spawned directly as a new process making it slightly more + * efficient than {@link exec}. + * + * The same options as {@link exec} are supported. Since a shell is + * not spawned, behaviors such as I/O redirection and file globbing are not + * supported. + * + * ```js + * import { execFile } from 'node:child_process'; + * const child = execFile('node', ['--version'], (error, stdout, stderr) => { + * if (error) { + * throw error; + * } + * console.log(stdout); + * }); + * ``` + * + * The `stdout` and `stderr` arguments passed to the callback will contain the + * stdout and stderr output of the child process. By default, Node.js will decode + * the output as UTF-8 and pass strings to the callback. The `encoding` option + * can be used to specify the character encoding used to decode the stdout and + * stderr output. If `encoding` is `'buffer'`, or an unrecognized character + * encoding, `Buffer` objects will be passed to the callback instead. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In + * case of an error (including any error resulting in an exit code other than 0), a + * rejected promise is returned, with the same `error` object given in the + * callback, but with two additional properties `stdout` and `stderr`. + * + * ```js + * import util from 'node:util'; + * import child_process from 'node:child_process'; + * const execFile = util.promisify(child_process.execFile); + * async function getVersion() { + * const { stdout } = await execFile('node', ['--version']); + * console.log(stdout); + * } + * getVersion(); + * ``` + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * import { execFile } from 'node:child_process'; + * const controller = new AbortController(); + * const { signal } = controller; + * const child = execFile('node', ['--version'], { signal }, (error) => { + * console.error(error); // an AbortError + * }); + * controller.abort(); + * ``` + * @since v0.1.91 + * @param file The name or path of the executable file to run. + * @param args List of string arguments. + * @param callback Called with the output when process terminates. + */ + // no `options` definitely means stdout/stderr are `string`. + function execFile( + file: string, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + function execFile( + file: string, + options: ExecFileOptionsWithBufferEncoding, + callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithBufferEncoding, + callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, + ): ChildProcess; + // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`. + function execFile( + file: string, + options: ExecFileOptionsWithStringEncoding, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithStringEncoding, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function execFile( + file: string, + options: ExecFileOptions | undefined | null, + callback: + | (( + error: ExecException | null, + stdout: string | NonSharedBuffer, + stderr: string | NonSharedBuffer, + ) => void) + | undefined + | null, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptions | undefined | null, + callback: + | (( + error: ExecException | null, + stdout: string | NonSharedBuffer, + stderr: string | NonSharedBuffer, + ) => void) + | undefined + | null, + ): ChildProcess; + namespace execFile { + function __promisify__(file: string): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithBufferEncoding, + ): PromiseWithChild<{ + stdout: NonSharedBuffer; + stderr: NonSharedBuffer; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithBufferEncoding, + ): PromiseWithChild<{ + stdout: NonSharedBuffer; + stderr: NonSharedBuffer; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithStringEncoding, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithStringEncoding, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: ExecFileOptions | undefined | null, + ): PromiseWithChild<{ + stdout: string | NonSharedBuffer; + stderr: string | NonSharedBuffer; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptions | undefined | null, + ): PromiseWithChild<{ + stdout: string | NonSharedBuffer; + stderr: string | NonSharedBuffer; + }>; + } + interface ForkOptions extends CommonOptions, MessagingOptions, Abortable { + execPath?: string | undefined; + execArgv?: string[] | undefined; + silent?: boolean | undefined; + /** + * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings. + * If passed as an array, the first element is used for `stdin`, the second for + * `stdout`, and the third for `stderr`. A fourth element can be used to + * specify the `stdio` behavior beyond the standard streams. See + * {@link ChildProcess.stdio} for more information. + * + * @default 'pipe' + */ + stdio?: StdioOptions | undefined; + detached?: boolean | undefined; + windowsVerbatimArguments?: boolean | undefined; + } + /** + * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes. + * Like {@link spawn}, a `ChildProcess` object is returned. The + * returned `ChildProcess` will have an additional communication channel + * built-in that allows messages to be passed back and forth between the parent and + * child. See `subprocess.send()` for details. + * + * Keep in mind that spawned Node.js child processes are + * independent of the parent with exception of the IPC communication channel + * that is established between the two. Each process has its own memory, with + * their own V8 instances. Because of the additional resource allocations + * required, spawning a large number of child Node.js processes is not + * recommended. + * + * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the `options` object allows for an alternative + * execution path to be used. + * + * Node.js processes launched with a custom `execPath` will communicate with the + * parent process using the file descriptor (fd) identified using the + * environment variable `NODE_CHANNEL_FD` on the child process. + * + * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the + * current process. + * + * The `shell` option available in {@link spawn} is not supported by `child_process.fork()` and will be ignored if set. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * if (process.argv[2] === 'child') { + * setTimeout(() => { + * console.log(`Hello from ${process.argv[2]}!`); + * }, 1_000); + * } else { + * import { fork } from 'node:child_process'; + * const controller = new AbortController(); + * const { signal } = controller; + * const child = fork(__filename, ['child'], { signal }); + * child.on('error', (err) => { + * // This will be called with err being an AbortError if the controller aborts + * }); + * controller.abort(); // Stops the child process + * } + * ``` + * @since v0.5.0 + * @param modulePath The module to run in the child. + * @param args List of string arguments. + */ + function fork(modulePath: string | URL, options?: ForkOptions): ChildProcess; + function fork(modulePath: string | URL, args?: readonly string[], options?: ForkOptions): ChildProcess; + interface SpawnSyncOptions extends CommonSpawnOptions { + input?: string | NodeJS.ArrayBufferView | undefined; + maxBuffer?: number | undefined; + encoding?: BufferEncoding | "buffer" | null | undefined; + } + interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { + encoding: BufferEncoding; + } + interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { + encoding?: "buffer" | null | undefined; + } + interface SpawnSyncReturns { + pid: number; + output: Array; + stdout: T; + stderr: T; + status: number | null; + signal: NodeJS.Signals | null; + error?: Error; + } + /** + * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return + * until the child process has fully closed. When a timeout has been encountered + * and `killSignal` is sent, the method won't return until the process has + * completely exited. If the process intercepts and handles the `SIGTERM` signal + * and doesn't exit, the parent process will wait until the child process has + * exited. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * @since v0.11.12 + * @param command The command to run. + * @param args List of string arguments. + */ + function spawnSync(command: string): SpawnSyncReturns; + function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; + function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns; + function spawnSync( + command: string, + args: readonly string[], + options: SpawnSyncOptionsWithStringEncoding, + ): SpawnSyncReturns; + function spawnSync( + command: string, + args: readonly string[], + options: SpawnSyncOptionsWithBufferEncoding, + ): SpawnSyncReturns; + function spawnSync( + command: string, + args?: readonly string[], + options?: SpawnSyncOptions, + ): SpawnSyncReturns; + interface CommonExecOptions extends CommonOptions { + input?: string | NodeJS.ArrayBufferView | undefined; + /** + * Can be set to 'pipe', 'inherit, or 'ignore', or an array of these strings. + * If passed as an array, the first element is used for `stdin`, the second for + * `stdout`, and the third for `stderr`. A fourth element can be used to + * specify the `stdio` behavior beyond the standard streams. See + * {@link ChildProcess.stdio} for more information. + * + * @default 'pipe' + */ + stdio?: StdioOptions | undefined; + killSignal?: NodeJS.Signals | number | undefined; + maxBuffer?: number | undefined; + encoding?: BufferEncoding | "buffer" | null | undefined; + } + interface ExecSyncOptions extends CommonExecOptions { + shell?: string | undefined; + } + interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { + encoding: BufferEncoding; + } + interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { + encoding?: "buffer" | null | undefined; + } + /** + * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return + * until the child process has fully closed. When a timeout has been encountered + * and `killSignal` is sent, the method won't return until the process has + * completely exited. If the child process intercepts and handles the `SIGTERM` signal and doesn't exit, the parent process will wait until the child process + * has exited. + * + * If the process times out or has a non-zero exit code, this method will throw. + * The `Error` object will contain the entire result from {@link spawnSync}. + * + * **Never pass unsanitized user input to this function. Any input containing shell** + * **metacharacters may be used to trigger arbitrary command execution.** + * @since v0.11.12 + * @param command The command to run. + * @return The stdout from the command. + */ + function execSync(command: string): NonSharedBuffer; + function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string; + function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): NonSharedBuffer; + function execSync(command: string, options?: ExecSyncOptions): string | NonSharedBuffer; + interface ExecFileSyncOptions extends CommonExecOptions { + shell?: boolean | string | undefined; + } + interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { + encoding: BufferEncoding; + } + interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { + encoding?: "buffer" | null | undefined; // specify `null`. + } + /** + * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not + * return until the child process has fully closed. When a timeout has been + * encountered and `killSignal` is sent, the method won't return until the process + * has completely exited. + * + * If the child process intercepts and handles the `SIGTERM` signal and + * does not exit, the parent process will still wait until the child process has + * exited. + * + * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * @since v0.11.12 + * @param file The name or path of the executable file to run. + * @param args List of string arguments. + * @return The stdout from the command. + */ + function execFileSync(file: string): NonSharedBuffer; + function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): NonSharedBuffer; + function execFileSync(file: string, options?: ExecFileSyncOptions): string | NonSharedBuffer; + function execFileSync(file: string, args: readonly string[]): NonSharedBuffer; + function execFileSync( + file: string, + args: readonly string[], + options: ExecFileSyncOptionsWithStringEncoding, + ): string; + function execFileSync( + file: string, + args: readonly string[], + options: ExecFileSyncOptionsWithBufferEncoding, + ): NonSharedBuffer; + function execFileSync( + file: string, + args?: readonly string[], + options?: ExecFileSyncOptions, + ): string | NonSharedBuffer; + /** @deprecated This deprecated alias will be removed in a future version. Use `ExecException` instead. */ + interface ExecFileException extends ExecException {} +} +declare module "child_process" { + export * from "node:child_process"; +} diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts new file mode 100644 index 0000000..b9dbc8c --- /dev/null +++ b/node_modules/@types/node/cluster.d.ts @@ -0,0 +1,432 @@ +declare module "node:cluster" { + import * as child_process from "node:child_process"; + import { EventEmitter, InternalEventEmitter } from "node:events"; + class Worker implements EventEmitter { + constructor(options?: cluster.WorkerOptions); + /** + * Each new worker is given its own unique id, this id is stored in the `id`. + * + * While a worker is alive, this is the key that indexes it in `cluster.workers`. + * @since v0.8.0 + */ + id: number; + /** + * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object + * from this function is stored as `.process`. In a worker, the global `process` is stored. + * + * See: [Child Process module](https://nodejs.org/docs/latest-v26.x/api/child_process.html#child_processforkmodulepath-args-options). + * + * Workers will call `process.exit(0)` if the `'disconnect'` event occurs + * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against + * accidental disconnection. + * @since v0.7.0 + */ + process: child_process.ChildProcess; + /** + * Send a message to a worker or primary, optionally with a handle. + * + * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback). + * + * In a worker, this sends a message to the primary. It is identical to `process.send()`. + * + * This example will echo back all messages from the primary: + * + * ```js + * if (cluster.isPrimary) { + * const worker = cluster.fork(); + * worker.send('hi there'); + * + * } else if (cluster.isWorker) { + * process.on('message', (msg) => { + * process.send(msg); + * }); + * } + * ``` + * @since v0.7.0 + * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. + */ + send(message: child_process.Serializable, callback?: (error: Error | null) => void): boolean; + send( + message: child_process.Serializable, + sendHandle: child_process.SendHandle, + callback?: (error: Error | null) => void, + ): boolean; + send( + message: child_process.Serializable, + sendHandle: child_process.SendHandle, + options?: child_process.MessageOptions, + callback?: (error: Error | null) => void, + ): boolean; + /** + * This function will kill the worker. In the primary worker, it does this by + * disconnecting the `worker.process`, and once disconnected, killing with `signal`. In the worker, it does it by killing the process with `signal`. + * + * The `kill()` function kills the worker process without waiting for a graceful + * disconnect, it has the same behavior as `worker.process.kill()`. + * + * This method is aliased as `worker.destroy()` for backwards compatibility. + * + * In a worker, `process.kill()` exists, but it is not this function; + * it is [`kill()`](https://nodejs.org/docs/latest-v26.x/api/process.html#processkillpid-signal). + * @since v0.9.12 + * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process. + */ + kill(signal?: string): void; + destroy(signal?: string): void; + /** + * In a worker, this function will close all servers, wait for the `'close'` event + * on those servers, and then disconnect the IPC channel. + * + * In the primary, an internal message is sent to the worker causing it to call `.disconnect()` on itself. + * + * Causes `.exitedAfterDisconnect` to be set. + * + * After a server is closed, it will no longer accept new connections, + * but connections may be accepted by any other listening worker. Existing + * connections will be allowed to close as usual. When no more connections exist, + * see `server.close()`, the IPC channel to the worker will close allowing it + * to die gracefully. + * + * The above applies _only_ to server connections, client connections are not + * automatically closed by workers, and disconnect does not wait for them to close + * before exiting. + * + * In a worker, `process.disconnect` exists, but it is not this function; + * it is `disconnect()`. + * + * Because long living server connections may block workers from disconnecting, it + * may be useful to send a message, so application specific actions may be taken to + * close them. It also may be useful to implement a timeout, killing a worker if + * the `'disconnect'` event has not been emitted after some time. + * + * ```js + * import net from 'node:net'; + * + * if (cluster.isPrimary) { + * const worker = cluster.fork(); + * let timeout; + * + * worker.on('listening', (address) => { + * worker.send('shutdown'); + * worker.disconnect(); + * timeout = setTimeout(() => { + * worker.kill(); + * }, 2000); + * }); + * + * worker.on('disconnect', () => { + * clearTimeout(timeout); + * }); + * + * } else if (cluster.isWorker) { + * const server = net.createServer((socket) => { + * // Connections never end + * }); + * + * server.listen(8000); + * + * process.on('message', (msg) => { + * if (msg === 'shutdown') { + * // Initiate graceful close of any connections to server + * } + * }); + * } + * ``` + * @since v0.7.7 + * @return A reference to `worker`. + */ + disconnect(): this; + /** + * This function returns `true` if the worker is connected to its primary via its + * IPC channel, `false` otherwise. A worker is connected to its primary after it + * has been created. It is disconnected after the `'disconnect'` event is emitted. + * @since v0.11.14 + */ + isConnected(): boolean; + /** + * This function returns `true` if the worker's process has terminated (either + * because of exiting or being signaled). Otherwise, it returns `false`. + * + * ```js + * import cluster from 'node:cluster'; + * import http from 'node:http'; + * import { availableParallelism } from 'node:os'; + * import process from 'node:process'; + * + * const numCPUs = availableParallelism(); + * + * if (cluster.isPrimary) { + * console.log(`Primary ${process.pid} is running`); + * + * // Fork workers. + * for (let i = 0; i < numCPUs; i++) { + * cluster.fork(); + * } + * + * cluster.on('fork', (worker) => { + * console.log('worker is dead:', worker.isDead()); + * }); + * + * cluster.on('exit', (worker, code, signal) => { + * console.log('worker is dead:', worker.isDead()); + * }); + * } else { + * // Workers can share any TCP connection. In this case, it is an HTTP server. + * http.createServer((req, res) => { + * res.writeHead(200); + * res.end(`Current process\n ${process.pid}`); + * process.kill(process.pid); + * }).listen(8000); + * } + * ``` + * @since v0.11.14 + */ + isDead(): boolean; + /** + * This property is `true` if the worker exited due to `.disconnect()`. + * If the worker exited any other way, it is `false`. If the + * worker has not exited, it is `undefined`. + * + * The boolean `worker.exitedAfterDisconnect` allows distinguishing between + * voluntary and accidental exit, the primary may choose not to respawn a worker + * based on this value. + * + * ```js + * cluster.on('exit', (worker, code, signal) => { + * if (worker.exitedAfterDisconnect === true) { + * console.log('Oh, it was just voluntary – no need to worry'); + * } + * }); + * + * // kill worker + * worker.kill(); + * ``` + * @since v6.0.0 + */ + exitedAfterDisconnect: boolean; + } + interface Worker extends InternalEventEmitter {} + type _Worker = Worker; + namespace cluster { + interface Worker extends _Worker {} + interface WorkerOptions { + id?: number | undefined; + process?: child_process.ChildProcess | undefined; + state?: string | undefined; + } + interface WorkerEventMap { + "disconnect": []; + "error": [error: Error]; + "exit": [code: number, signal: string]; + "listening": [address: Address]; + "message": [message: any, handle: child_process.SendHandle]; + "online": []; + } + interface ClusterSettings { + /** + * List of string arguments passed to the Node.js executable. + * @default process.execArgv + */ + execArgv?: string[] | undefined; + /** + * File path to worker file. + * @default process.argv[1] + */ + exec?: string | undefined; + /** + * String arguments passed to worker. + * @default process.argv.slice(2) + */ + args?: readonly string[] | undefined; + /** + * Whether or not to send output to parent's stdio. + * @default false + */ + silent?: boolean | undefined; + /** + * Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must + * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#child_processspawncommand-args-options)'s + * [`stdio`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#optionsstdio). + */ + stdio?: any[] | undefined; + /** + * Sets the user identity of the process. (See [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html).) + */ + uid?: number | undefined; + /** + * Sets the group identity of the process. (See [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html).) + */ + gid?: number | undefined; + /** + * Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number. + * By default each worker gets its own port, incremented from the primary's `process.debugPort`. + */ + inspectPort?: number | (() => number) | undefined; + /** + * Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`. + * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#advanced-serialization) for more details. + * @default false + */ + serialization?: "json" | "advanced" | undefined; + /** + * Current working directory of the worker process. + * @default undefined (inherits from parent process) + */ + cwd?: string | undefined; + /** + * Hide the forked processes console window that would normally be created on Windows systems. + * @default false + */ + windowsHide?: boolean | undefined; + } + interface Address { + address: string; + port: number; + /** + * The `addressType` is one of: + * + * * `4` (TCPv4) + * * `6` (TCPv6) + * * `-1` (Unix domain socket) + * * `'udp4'` or `'udp6'` (UDPv4 or UDPv6) + */ + addressType: 4 | 6 | -1 | "udp4" | "udp6"; + } + interface ClusterEventMap { + "disconnect": [worker: Worker]; + "exit": [worker: Worker, code: number, signal: string]; + "fork": [worker: Worker]; + "listening": [worker: Worker, address: Address]; + "message": [worker: Worker, message: any, handle: child_process.SendHandle]; + "online": [worker: Worker]; + "setup": [settings: ClusterSettings]; + } + interface Cluster extends InternalEventEmitter { + /** + * A `Worker` object contains all public information and method about a worker. + * In the primary it can be obtained using `cluster.workers`. In a worker + * it can be obtained using `cluster.worker`. + * @since v0.7.0 + */ + Worker: typeof Worker; + disconnect(callback?: () => void): void; + /** + * Spawn a new worker process. + * + * This can only be called from the primary process. + * @param env Key/value pairs to add to worker process environment. + * @since v0.6.0 + */ + fork(env?: any): Worker; + /** @deprecated since v16.0.0 - use isPrimary. */ + readonly isMaster: boolean; + /** + * True if the process is a primary. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID` + * is undefined, then `isPrimary` is `true`. + * @since v16.0.0 + */ + readonly isPrimary: boolean; + /** + * True if the process is not a primary (it is the negation of `cluster.isPrimary`). + * @since v0.6.0 + */ + readonly isWorker: boolean; + /** + * The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a + * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clustersetupprimarysettings) + * is called, whichever comes first. + * + * `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute + * IOCP handles without incurring a large performance hit. + * + * `cluster.schedulingPolicy` can also be set through the `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid values are `'rr'` and `'none'`. + * @since v0.11.2 + */ + schedulingPolicy: number; + /** + * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clustersetupprimarysettings) + * (or [`.fork()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clusterforkenv)) this settings object will contain + * the settings, including the default values. + * + * This object is not intended to be changed or set manually. + * @since v0.7.1 + */ + readonly settings: ClusterSettings; + /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clustersetupprimarysettings) instead. */ + setupMaster(settings?: ClusterSettings): void; + /** + * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`. + * + * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clusterforkenv) + * and have no effect on workers that are already running. + * + * The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to + * [`.fork()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clusterforkenv). + * + * The defaults above apply to the first call only; the defaults for later calls are the current values at the time of + * `cluster.setupPrimary()` is called. + * + * ```js + * import cluster from 'node:cluster'; + * + * cluster.setupPrimary({ + * exec: 'worker.js', + * args: ['--use', 'https'], + * silent: true, + * }); + * cluster.fork(); // https worker + * cluster.setupPrimary({ + * exec: 'worker.js', + * args: ['--use', 'http'], + * }); + * cluster.fork(); // http worker + * ``` + * + * This can only be called from the primary process. + * @since v16.0.0 + */ + setupPrimary(settings?: ClusterSettings): void; + /** + * A reference to the current worker object. Not available in the primary process. + * + * ```js + * import cluster from 'node:cluster'; + * + * if (cluster.isPrimary) { + * console.log('I am primary'); + * cluster.fork(); + * cluster.fork(); + * } else if (cluster.isWorker) { + * console.log(`I am worker #${cluster.worker.id}`); + * } + * ``` + * @since v0.7.0 + */ + readonly worker?: Worker; + /** + * A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process. + * + * A worker is removed from `cluster.workers` after the worker has disconnected _and_ exited. The order between these two events cannot be determined in advance. However, it + * is guaranteed that the removal from the `cluster.workers` list happens before the last `'disconnect'` or `'exit'` event is emitted. + * + * ```js + * import cluster from 'node:cluster'; + * + * for (const worker of Object.values(cluster.workers)) { + * worker.send('big announcement to all workers'); + * } + * ``` + * @since v0.7.0 + */ + readonly workers?: NodeJS.Dict; + readonly SCHED_NONE: number; + readonly SCHED_RR: number; + } + } + var cluster: cluster.Cluster; + export = cluster; +} +declare module "cluster" { + import cluster = require("node:cluster"); + export = cluster; +} diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts new file mode 100644 index 0000000..5ba70b3 --- /dev/null +++ b/node_modules/@types/node/console.d.ts @@ -0,0 +1,93 @@ +declare module "node:console" { + import { InspectOptions } from "node:util"; + namespace console { + interface ConsoleOptions { + stdout: NodeJS.WritableStream; + stderr?: NodeJS.WritableStream | undefined; + /** + * Ignore errors when writing to the underlying streams. + * @default true + */ + ignoreErrors?: boolean | undefined; + /** + * Set color support for this `Console` instance. Setting to true enables coloring while inspecting + * values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color + * support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the + * respective stream. This option can not be used, if `inspectOptions.colors` is set as well. + * @default 'auto' + */ + colorMode?: boolean | "auto" | undefined; + /** + * Specifies options that are passed along to + * [`util.inspect()`](https://nodejs.org/docs/latest-v26.x/api/util.html#utilinspectobject-options). + */ + inspectOptions?: InspectOptions | ReadonlyMap | undefined; + /** + * Set group indentation. + * @default 2 + */ + groupIndentation?: number | undefined; + } + interface Console { + readonly Console: { + prototype: Console; + new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console; + new(options: ConsoleOptions): Console; + }; + assert(condition?: unknown, ...data: any[]): void; + clear(): void; + count(label?: string): void; + countReset(label?: string): void; + debug(...data: any[]): void; + dir(item?: any, options?: InspectOptions): void; + dirxml(...data: any[]): void; + error(...data: any[]): void; + group(...data: any[]): void; + groupCollapsed(...data: any[]): void; + groupEnd(): void; + info(...data: any[]): void; + log(...data: any[]): void; + table(tabularData?: any, properties?: string[]): void; + time(label?: string): void; + timeEnd(label?: string): void; + timeLog(label?: string, ...data: any[]): void; + trace(...data: any[]): void; + warn(...data: any[]): void; + /** + * This method does not display anything unless used in the inspector. The `console.profile()` + * method starts a JavaScript CPU profile with an optional label until {@link profileEnd} + * is called. The profile is then added to the Profile panel of the inspector. + * + * ```js + * console.profile('MyLabel'); + * // Some code + * console.profileEnd('MyLabel'); + * // Adds the profile 'MyLabel' to the Profiles panel of the inspector. + * ``` + * @since v8.0.0 + */ + profile(label?: string): void; + /** + * This method does not display anything unless used in the inspector. Stops the current + * JavaScript CPU profiling session if one has been started and prints the report to the + * Profiles panel of the inspector. See {@link profile} for an example. + * + * If this method is called without a label, the most recently started profile is stopped. + * @since v8.0.0 + */ + profileEnd(label?: string): void; + /** + * This method does not display anything unless used in the inspector. The `console.timeStamp()` + * method adds an event with the label `'label'` to the Timeline panel of the inspector. + * @since v8.0.0 + */ + timeStamp(label?: string): void; + } + } + var console: console.Console; + export = console; +} +declare module "console" { + import console = require("node:console"); + export = console; +} diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts new file mode 100644 index 0000000..a271f9a --- /dev/null +++ b/node_modules/@types/node/constants.d.ts @@ -0,0 +1,14 @@ +declare module "node:constants" { + const constants: + & typeof import("node:os").constants.dlopen + & typeof import("node:os").constants.errno + & typeof import("node:os").constants.priority + & typeof import("node:os").constants.signals + & typeof import("node:fs").constants + & typeof import("node:crypto").constants; + export = constants; +} +declare module "constants" { + import constants = require("node:constants"); + export = constants; +} diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts new file mode 100644 index 0000000..c628382 --- /dev/null +++ b/node_modules/@types/node/crypto.d.ts @@ -0,0 +1,3964 @@ +declare module "node:crypto" { + import { NonSharedBuffer } from "node:buffer"; + import { Transform, TransformOptions, Writable, WritableOptions } from "node:stream"; + import { PeerCertificate } from "node:tls"; + /** + * SPKAC is a Certificate Signing Request mechanism originally implemented by + * Netscape and was specified formally as part of HTML5's `keygen` element. + * + * `` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects + * should not use this element anymore. + * + * The `node:crypto` module provides the `Certificate` class for working with SPKAC + * data. The most common usage is handling output generated by the HTML5 `` element. Node.js uses [OpenSSL's SPKAC + * implementation](https://www.openssl.org/docs/man3.0/man1/openssl-spkac.html) internally. + * @since v0.11.8 + */ + class Certificate { + /** + * ```js + * const { Certificate } = await import('node:crypto'); + * const spkac = getSpkacSomehow(); + * const challenge = Certificate.exportChallenge(spkac); + * console.log(challenge.toString('utf8')); + * // Prints: the challenge as a UTF8 string + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge. + */ + static exportChallenge(spkac: BinaryLike, encoding?: BufferEncoding): NonSharedBuffer; + /** + * ```js + * const { Certificate } = await import('node:crypto'); + * const spkac = getSpkacSomehow(); + * const publicKey = Certificate.exportPublicKey(spkac); + * console.log(publicKey); + * // Prints: the public key as + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return The public key component of the `spkac` data structure, which includes a public key and a challenge. + */ + static exportPublicKey(spkac: BinaryLike, encoding?: BufferEncoding): NonSharedBuffer; + /** + * ```js + * import { Buffer } from 'node:buffer'; + * const { Certificate } = await import('node:crypto'); + * + * const spkac = getSpkacSomehow(); + * console.log(Certificate.verifySpkac(Buffer.from(spkac))); + * // Prints: true or false + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return `true` if the given `spkac` data structure is valid, `false` otherwise. + */ + static verifySpkac(spkac: BinaryLike, encoding?: BufferEncoding): boolean; + /** + * @deprecated + * @param encoding The `encoding` of the `spkac` string. + * @returns The challenge component of the `spkac` data structure, + * which includes a public key and a challenge. + */ + exportChallenge(spkac: BinaryLike, encoding?: BufferEncoding): NonSharedBuffer; + /** + * @deprecated + * @param encoding The encoding of the spkac string. + * @returns The public key component of the `spkac` data structure, + * which includes a public key and a challenge. + */ + exportPublicKey(spkac: BinaryLike, encoding?: BufferEncoding): NonSharedBuffer; + /** + * @deprecated + * @param encoding The `encoding` of the `spkac` string. + * @returns `true` if the given `spkac` data structure is valid, + * `false` otherwise. + */ + verifySpkac(spkac: BinaryLike, encoding?: BufferEncoding): boolean; + } + /** @deprecated This property is deprecated. Please use `crypto.setFips()` and `crypto.getFips()` instead. */ + var fips: boolean; + interface HashOptions extends TransformOptions { + outputLength?: number | undefined; + } + /** + * Creates and returns a `Hash` object that can be used to generate hash digests + * using the given `algorithm`. Optional `options` argument controls stream + * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option + * can be used to specify the desired output length in bytes. + * + * When the data is small (< 5MB) and readily available, `crypto.hash()` is usually faster. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms` will + * display the available digest algorithms. + * + * Example: generating the sha256 sum of a file + * + * ```js + * import { + * createReadStream, + * } from 'node:fs'; + * import { argv } from 'node:process'; + * const { + * createHash, + * } = await import('node:crypto'); + * + * const filename = argv[2]; + * + * const hash = createHash('sha256'); + * + * const input = createReadStream(filename); + * input.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = input.read(); + * if (data) + * hash.update(data); + * else { + * console.log(`${hash.digest('hex')} ${filename}`); + * } + * }); + * ``` + * @since v0.1.92 + * @param options `stream.transform` options + */ + function createHash(algorithm: string, options?: HashOptions): Hash; + interface HmacOptions extends TransformOptions { + encoding?: BufferEncoding | undefined; + } + /** + * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`. + * Optional `options` argument controls stream behavior. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms` will + * display the available digest algorithms. + * + * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is + * a `KeyObject`, its type must be `secret`. If it is a string, please consider `caveats when using strings as inputs to cryptographic APIs`. If it was + * obtained from a cryptographically secure source of entropy, such as {@link randomBytes} or {@link generateKey}, its length should not + * exceed the block size of `algorithm` (e.g., 512 bits for SHA-256). + * + * Example: generating the sha256 HMAC of a file + * + * ```js + * import { + * createReadStream, + * } from 'node:fs'; + * import { argv } from 'node:process'; + * const { + * createHmac, + * } = await import('node:crypto'); + * + * const filename = argv[2]; + * + * const hmac = createHmac('sha256', 'a secret'); + * + * const input = createReadStream(filename); + * input.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = input.read(); + * if (data) + * hmac.update(data); + * else { + * console.log(`${hmac.digest('hex')} ${filename}`); + * } + * }); + * ``` + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createHmac(algorithm: string, key: KeyLike, options?: HmacOptions): Hmac; + /** + * The `Hash` class is a utility for creating hash digests of data. It can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where data is written + * to produce a computed hash digest on the readable side, or + * * Using the `hash.update()` and `hash.digest()` methods to produce the + * computed hash. + * + * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword. + * + * Example: Using `Hash` objects as streams: + * + * ```js + * const { + * createHash, + * } = await import('node:crypto'); + * + * const hash = createHash('sha256'); + * + * hash.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = hash.read(); + * if (data) { + * console.log(data.toString('hex')); + * // Prints: + * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 + * } + * }); + * + * hash.write('some data to hash'); + * hash.end(); + * ``` + * + * Example: Using `Hash` and piped streams: + * + * ```js + * import { createReadStream } from 'node:fs'; + * import { stdout } from 'node:process'; + * const { createHash } = await import('node:crypto'); + * + * const hash = createHash('sha256'); + * + * const input = createReadStream('test.js'); + * input.pipe(hash).setEncoding('hex').pipe(stdout); + * ``` + * + * Example: Using the `hash.update()` and `hash.digest()` methods: + * + * ```js + * const { + * createHash, + * } = await import('node:crypto'); + * + * const hash = createHash('sha256'); + * + * hash.update('some data to hash'); + * console.log(hash.digest('hex')); + * // Prints: + * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 + * ``` + * @since v0.1.92 + */ + class Hash extends Transform { + private constructor(); + /** + * Creates a new `Hash` object that contains a deep copy of the internal state + * of the current `Hash` object. + * + * The optional `options` argument controls stream behavior. For XOF hash + * functions such as `'shake256'`, the `outputLength` option can be used to + * specify the desired output length in bytes. + * + * An error is thrown when an attempt is made to copy the `Hash` object after + * its `hash.digest()` method has been called. + * + * ```js + * // Calculate a rolling hash. + * const { + * createHash, + * } = await import('node:crypto'); + * + * const hash = createHash('sha256'); + * + * hash.update('one'); + * console.log(hash.copy().digest('hex')); + * + * hash.update('two'); + * console.log(hash.copy().digest('hex')); + * + * hash.update('three'); + * console.log(hash.copy().digest('hex')); + * + * // Etc. + * ``` + * @since v13.1.0 + * @param options `stream.transform` options + */ + copy(options?: HashOptions): Hash; + /** + * Updates the hash content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): Hash; + /** + * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method). + * If `encoding` is provided a string will be returned; otherwise + * a `Buffer` is returned. + * + * The `Hash` object can not be used again after `hash.digest()` method has been + * called. Multiple calls will cause an error to be thrown. + * @since v0.1.92 + * @param encoding The `encoding` of the return value. + */ + digest(): NonSharedBuffer; + digest(encoding: BufferEncoding): string; + } + /** + * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can + * be used in one of two ways: + * + * * As a `stream` that is both readable and writable, where data is written + * to produce a computed HMAC digest on the readable side, or + * * Using the `hmac.update()` and `hmac.digest()` methods to produce the + * computed HMAC digest. + * + * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword. + * + * Example: Using `Hmac` objects as streams: + * + * ```js + * const { + * createHmac, + * } = await import('node:crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * hmac.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = hmac.read(); + * if (data) { + * console.log(data.toString('hex')); + * // Prints: + * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e + * } + * }); + * + * hmac.write('some data to hash'); + * hmac.end(); + * ``` + * + * Example: Using `Hmac` and piped streams: + * + * ```js + * import { createReadStream } from 'node:fs'; + * import { stdout } from 'node:process'; + * const { + * createHmac, + * } = await import('node:crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * const input = createReadStream('test.js'); + * input.pipe(hmac).pipe(stdout); + * ``` + * + * Example: Using the `hmac.update()` and `hmac.digest()` methods: + * + * ```js + * const { + * createHmac, + * } = await import('node:crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * hmac.update('some data to hash'); + * console.log(hmac.digest('hex')); + * // Prints: + * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e + * ``` + * @since v0.1.94 + */ + class Hmac extends Transform { + private constructor(); + /** + * Updates the `Hmac` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): Hmac; + /** + * Calculates the HMAC digest of all of the data passed using `hmac.update()`. + * If `encoding` is + * provided a string is returned; otherwise a `Buffer` is returned; + * + * The `Hmac` object can not be used again after `hmac.digest()` has been + * called. Multiple calls to `hmac.digest()` will result in an error being thrown. + * @since v0.1.94 + * @param encoding The `encoding` of the return value. + */ + digest(): NonSharedBuffer; + digest(encoding: BufferEncoding): string; + } + type KeyFormat = "pem" | "der" | "jwk" | "raw-public" | "raw-private" | "raw-seed"; + type KeyObjectType = "secret" | "public" | "private"; + type PublicKeyExportType = "pkcs1" | "spki"; + type PrivateKeyExportType = "pkcs1" | "pkcs8" | "sec1"; + type KeyExportOptions = + | SymmetricKeyExportOptions + | PublicKeyExportOptions + | PrivateKeyExportOptions + | JwkKeyExportOptions + | RawPublicKeyExportOptions + | RawPrivateKeyExportOptions; + interface SymmetricKeyExportOptions { + format?: "buffer" | undefined; + } + interface PublicKeyExportOptions { + type: T; + format: "pem" | "der"; + } + interface PrivateKeyExportOptions { + type: T; + format: "pem" | "der"; + cipher?: string | undefined; + passphrase?: BinaryLike | undefined; + } + interface JwkKeyExportOptions { + format: "jwk"; + } + interface RawPublicKeyExportOptions { + format: "raw-public"; + } + interface RawPrivateKeyExportOptions { + format: "raw-private" | "raw-seed"; + } + interface KeyPairExportOptions< + TPublic extends PublicKeyExportType = PublicKeyExportType, + TPrivate extends PrivateKeyExportType = PrivateKeyExportType, + > { + publicKeyEncoding?: + | PublicKeyExportOptions + | RawPublicKeyExportOptions + | JwkKeyExportOptions + | undefined; + privateKeyEncoding?: + | PrivateKeyExportOptions + | RawPrivateKeyExportOptions + | JwkKeyExportOptions + | undefined; + } + type KeyExportResult = T extends { format: infer F extends KeyFormat } ? { + "der": NonSharedBuffer; + "jwk": webcrypto.JsonWebKey; + "pem": string; + "raw-public": NonSharedBuffer; + "raw-private": NonSharedBuffer; + "raw-seed": NonSharedBuffer; + }[F] + : Default; + interface KeyPairExportResult { + publicKey: KeyExportResult; + privateKey: KeyExportResult; + } + type KeyPairExportCallback = ( + err: Error | null, + publicKey: KeyExportResult, + privateKey: KeyExportResult, + ) => void; + type MLDSAKeyType = `ml-dsa-${44 | 65 | 87}`; + type MLKEMKeyType = `ml-kem-${1024 | 512 | 768}`; + type SLHDSAKeyType = `slh-dsa-${"sha2" | "shake"}-${128 | 192 | 256}${"f" | "s"}`; + type AsymmetricKeyType = + | "dh" + | "dsa" + | "ec" + | "ed25519" + | "ed448" + | MLDSAKeyType + | MLKEMKeyType + | "rsa-pss" + | "rsa" + | SLHDSAKeyType + | "x25519" + | "x448"; + interface AsymmetricKeyDetails { + modulusLength?: number; + publicExponent?: bigint; + hashAlgorithm?: string; + mgf1HashAlgorithm?: string; + saltLength?: number; + divisorLength?: number; + namedCurve?: string; + } + /** + * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key, + * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject` + * objects are not to be created directly using the `new`keyword. + * + * Most applications should consider using the new `KeyObject` API instead of + * passing keys as strings or `Buffer`s due to improved security features. + * + * `KeyObject` instances can be passed to other threads via `postMessage()`. + * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to + * be listed in the `transferList` argument. + * @since v11.6.0 + */ + class KeyObject { + private constructor(); + /** + * Returns the underlying `KeyObject` of a `CryptoKey`. The returned `KeyObject` + * does not retain any of the restrictions imposed by the Web Crypto API on the + * original `CryptoKey`, such as the allowed key usages, the algorithm or hash + * algorithm bindings, and the extractability flag. In particular, the underlying + * key material of the returned `KeyObject` can always be exported. + * + * ```js + * const { KeyObject } = await import('node:crypto'); + * const { subtle } = globalThis.crypto; + * + * const key = await subtle.generateKey({ + * name: 'HMAC', + * hash: 'SHA-256', + * length: 256, + * }, true, ['sign', 'verify']); + * + * const keyObject = KeyObject.from(key); + * console.log(keyObject.symmetricKeySize); + * // Prints: 32 (symmetric key size in bytes) + * ``` + * @since v15.0.0 + */ + static from(key: webcrypto.CryptoKey): KeyObject; + /** + * For asymmetric keys, this property represents the type of the key. See the + * supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types). + * + * This property is `undefined` for unrecognized `KeyObject` types and symmetric + * keys. + * @since v11.6.0 + */ + asymmetricKeyType?: AsymmetricKeyType; + /** + * This property exists only on asymmetric keys. Depending on the type of the key, + * this object contains information about the key. None of the information obtained + * through this property can be used to uniquely identify a key or to compromise + * the security of the key. + * + * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence, + * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be + * set. + * + * Other key details might be exposed via this API using additional attributes. + * @since v15.7.0 + */ + asymmetricKeyDetails?: AsymmetricKeyDetails; + /** + * The result type depends on the selected encoding format, when PEM the + * result is a string, when DER it will be a buffer containing the data + * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object. Raw formats return a + * `Buffer` containing the raw key material. + * + * Private keys can be encrypted by specifying a `cipher` and `passphrase`. + * The PKCS#8 `type` supports encryption with both PEM and DER `format` for any + * key algorithm. PKCS#1 and SEC1 can only be encrypted when the PEM `format` is + * used. For maximum compatibility, use PKCS#8 for encrypted private keys. Since + * PKCS#8 defines its own encryption mechanism, PEM-level encryption is not + * supported when encrypting a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption + * and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for PKCS#1 and SEC1 encryption. + * @since v11.6.0 + */ + export(options?: T): KeyExportResult; + /** + * Returns `true` or `false` depending on whether the keys have exactly the same + * type, value, and parameters. This method is not [constant time](https://en.wikipedia.org/wiki/Timing_attack). + * @since v17.7.0, v16.15.0 + * @param otherKeyObject A `KeyObject` with which to compare `keyObject`. + */ + equals(otherKeyObject: KeyObject): boolean; + /** + * For secret keys, this property represents the size of the key in bytes. This + * property is `undefined` for asymmetric keys. + * @since v11.6.0 + */ + symmetricKeySize?: number; + /** + * Converts a `KeyObject` instance to a `CryptoKey`. + * @since 22.10.0 + */ + toCryptoKey( + algorithm: + | webcrypto.AlgorithmIdentifier + | webcrypto.RsaHashedImportParams + | webcrypto.EcKeyImportParams + | webcrypto.HmacImportParams, + extractable: boolean, + keyUsages: readonly webcrypto.KeyUsage[], + ): webcrypto.CryptoKey; + /** + * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys + * or `'private'` for private (asymmetric) keys. + * @since v11.6.0 + */ + type: KeyObjectType; + } + type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm"; + type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm"; + type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb"; + type CipherChaCha20Poly1305Types = "chacha20-poly1305"; + type BinaryLike = string | ArrayBufferLike | NodeJS.ArrayBufferView; + type KeyLike = BinaryLike | KeyObject; + interface CipherCCMOptions extends TransformOptions { + authTagLength: number; + } + interface CipherGCMOptions extends TransformOptions { + authTagLength?: number | undefined; + } + interface CipherOCBOptions extends TransformOptions { + authTagLength: number; + } + interface CipherChaCha20Poly1305Options extends TransformOptions { + authTagLength?: number | undefined; + } + /** + * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and + * initialization vector (`iv`). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication + * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms` will + * display the available cipher algorithms. + * + * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded + * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be + * a `KeyObject` of type `secret`. If the cipher does not need + * an initialization vector, `iv` may be `null`. + * + * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * Initialization vectors should be unpredictable and unique; ideally, they will be + * cryptographically random. They do not have to be secret: IVs are typically just + * added to ciphertext messages unencrypted. It may sound contradictory that + * something has to be unpredictable and unique, but does not have to be secret; + * remember that an attacker must not be able to predict ahead of time what a + * given IV will be. + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createCipheriv( + algorithm: CipherCCMTypes, + key: KeyLike, + iv: BinaryLike, + options: CipherCCMOptions, + ): CipherCCM; + function createCipheriv( + algorithm: CipherOCBTypes, + key: KeyLike, + iv: BinaryLike, + options: CipherOCBOptions, + ): CipherOCB; + function createCipheriv( + algorithm: CipherGCMTypes, + key: KeyLike, + iv: BinaryLike, + options?: CipherGCMOptions, + ): CipherGCM; + function createCipheriv( + algorithm: CipherChaCha20Poly1305Types, + key: KeyLike, + iv: BinaryLike, + options?: CipherChaCha20Poly1305Options, + ): CipherChaCha20Poly1305; + function createCipheriv( + algorithm: string, + key: KeyLike, + iv: BinaryLike | null, + options?: TransformOptions, + ): Cipheriv; + /** + * Instances of the `Cipheriv` class are used to encrypt data. The class can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where plain unencrypted + * data is written to produce encrypted data on the readable side, or + * * Using the `cipher.update()` and `cipher.final()` methods to produce + * the encrypted data. + * + * The {@link createCipheriv} method is + * used to create `Cipheriv` instances. `Cipheriv` objects are not to be created + * directly using the `new` keyword. + * + * Example: Using `Cipheriv` objects as streams: + * + * ```js + * const { + * scrypt, + * randomFill, + * createCipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * // Once we have the key and iv, we can create and use the cipher... + * const cipher = createCipheriv(algorithm, key, iv); + * + * let encrypted = ''; + * cipher.setEncoding('hex'); + * + * cipher.on('data', (chunk) => encrypted += chunk); + * cipher.on('end', () => console.log(encrypted)); + * + * cipher.write('some clear text data'); + * cipher.end(); + * }); + * }); + * ``` + * + * Example: Using `Cipheriv` and piped streams: + * + * ```js + * import { + * createReadStream, + * createWriteStream, + * } from 'node:fs'; + * + * import { + * pipeline, + * } from 'node:stream'; + * + * const { + * scrypt, + * randomFill, + * createCipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * const cipher = createCipheriv(algorithm, key, iv); + * + * const input = createReadStream('test.js'); + * const output = createWriteStream('test.enc'); + * + * pipeline(input, cipher, output, (err) => { + * if (err) throw err; + * }); + * }); + * }); + * ``` + * + * Example: Using the `cipher.update()` and `cipher.final()` methods: + * + * ```js + * const { + * scrypt, + * randomFill, + * createCipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * const cipher = createCipheriv(algorithm, key, iv); + * + * let encrypted = cipher.update('some clear text data', 'utf8', 'hex'); + * encrypted += cipher.final('hex'); + * console.log(encrypted); + * }); + * }); + * ``` + * @since v0.1.94 + */ + class Cipheriv extends Transform { + private constructor(); + /** + * Updates the cipher with `data`. If the `inputEncoding` argument is given, + * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or `DataView`. If `data` is a `Buffer`, + * `TypedArray`, or `DataView`, then `inputEncoding` is ignored. + * + * The `outputEncoding` specifies the output format of the enciphered + * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned. + * + * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being + * thrown. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the data. + * @param outputEncoding The `encoding` of the return value. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): NonSharedBuffer; + update( + data: string | NodeJS.ArrayBufferView, + inputEncoding: BufferEncoding | null | undefined, + outputEncoding: BufferEncoding, + ): string; + /** + * Once the `cipher.final()` method has been called, the `Cipheriv` object can no + * longer be used to encrypt data. Attempts to call `cipher.final()` more than + * once will result in an error being thrown. + * @since v0.1.94 + * @param outputEncoding The `encoding` of the return value. + * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. + */ + final(): NonSharedBuffer; + final(outputEncoding: BufferEncoding): string; + /** + * When using block encryption algorithms, the `Cipheriv` class will automatically + * add padding to the input data to the appropriate block size. To disable the + * default padding call `cipher.setAutoPadding(false)`. + * + * When `autoPadding` is `false`, the length of the entire input data must be a + * multiple of the cipher's block size or `cipher.final()` will throw an error. + * Disabling automatic padding is useful for non-standard padding, for instance + * using `0x0` instead of PKCS padding. + * + * The `cipher.setAutoPadding()` method must be called before `cipher.final()`. + * @since v0.7.1 + * @param [autoPadding=true] + * @return for method chaining. + */ + setAutoPadding(autoPadding?: boolean): this; + } + interface CipherAEADMethods { + getAuthTag(): NonSharedBuffer; + setAAD(buffer: BinaryLike, options?: { + plaintextLength?: number | undefined; + encoding?: BufferEncoding | undefined; + }): this; + } + interface CipherCCM extends Cipheriv, CipherAEADMethods { + setAAD(buffer: BinaryLike, options: { + plaintextLength: number; + encoding?: BufferEncoding | undefined; + }): this; + } + interface CipherGCM extends Cipheriv, CipherAEADMethods {} + interface CipherOCB extends Cipheriv, CipherAEADMethods {} + interface CipherChaCha20Poly1305 extends Cipheriv, CipherAEADMethods {} + /** + * Creates and returns a `Decipheriv` object that uses the given `algorithm`, `key` and initialization vector (`iv`). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the + * `authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see [CCM mode](https://nodejs.org/docs/latest-v26.x/api/crypto.html#ccm-mode). + * For AES-GCM and `chacha20-poly1305`, the `authTagLength` option defaults to 16 + * bytes and must be set to a different value if a different length is used. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms` will + * display the available cipher algorithms. + * + * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded + * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be + * a `KeyObject` of type `secret`. If the cipher does not need + * an initialization vector, `iv` may be `null`. + * + * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * Initialization vectors should be unpredictable and unique; ideally, they will be + * cryptographically random. They do not have to be secret: IVs are typically just + * added to ciphertext messages unencrypted. It may sound contradictory that + * something has to be unpredictable and unique, but does not have to be secret; + * remember that an attacker must not be able to predict ahead of time what a given + * IV will be. + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createDecipheriv( + algorithm: CipherCCMTypes, + key: KeyLike, + iv: BinaryLike, + options: CipherCCMOptions, + ): DecipherCCM; + function createDecipheriv( + algorithm: CipherOCBTypes, + key: KeyLike, + iv: BinaryLike, + options: CipherOCBOptions, + ): DecipherOCB; + function createDecipheriv( + algorithm: CipherGCMTypes, + key: KeyLike, + iv: BinaryLike, + options?: CipherGCMOptions, + ): DecipherGCM; + function createDecipheriv( + algorithm: CipherChaCha20Poly1305Types, + key: KeyLike, + iv: BinaryLike, + options?: CipherChaCha20Poly1305Options, + ): DecipherChaCha20Poly1305; + function createDecipheriv( + algorithm: string, + key: KeyLike, + iv: BinaryLike | null, + options?: TransformOptions, + ): Decipheriv; + /** + * Instances of the `Decipheriv` class are used to decrypt data. The class can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where plain encrypted + * data is written to produce unencrypted data on the readable side, or + * * Using the `decipher.update()` and `decipher.final()` methods to + * produce the unencrypted data. + * + * The {@link createDecipheriv} method is + * used to create `Decipheriv` instances. `Decipheriv` objects are not to be created + * directly using the `new` keyword. + * + * Example: Using `Decipheriv` objects as streams: + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { + * scryptSync, + * createDecipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Key length is dependent on the algorithm. In this case for aes192, it is + * // 24 bytes (192 bits). + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * let decrypted = ''; + * decipher.on('readable', () => { + * let chunk; + * while (null !== (chunk = decipher.read())) { + * decrypted += chunk.toString('utf8'); + * } + * }); + * decipher.on('end', () => { + * console.log(decrypted); + * // Prints: some clear text data + * }); + * + * // Encrypted with same algorithm, key and iv. + * const encrypted = + * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; + * decipher.write(encrypted, 'hex'); + * decipher.end(); + * ``` + * + * Example: Using `Decipheriv` and piped streams: + * + * ```js + * import { + * createReadStream, + * createWriteStream, + * } from 'node:fs'; + * import { Buffer } from 'node:buffer'; + * const { + * scryptSync, + * createDecipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * const input = createReadStream('test.enc'); + * const output = createWriteStream('test.js'); + * + * input.pipe(decipher).pipe(output); + * ``` + * + * Example: Using the `decipher.update()` and `decipher.final()` methods: + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { + * scryptSync, + * createDecipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * // Encrypted using same algorithm, key and iv. + * const encrypted = + * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; + * let decrypted = decipher.update(encrypted, 'hex', 'utf8'); + * decrypted += decipher.final('utf8'); + * console.log(decrypted); + * // Prints: some clear text data + * ``` + * @since v0.1.94 + */ + class Decipheriv extends Transform { + private constructor(); + /** + * Updates the decipher with `data`. If the `inputEncoding` argument is given, + * the `data` argument is a string using the specified encoding. If the `inputEncoding` argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is + * ignored. + * + * The `outputEncoding` specifies the output format of the enciphered + * data. If the `outputEncoding` is specified, a string using the specified encoding is returned. If no `outputEncoding` is provided, a `Buffer` is returned. + * + * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error + * being thrown. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the `data` string. + * @param outputEncoding The `encoding` of the return value. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): NonSharedBuffer; + update( + data: string | NodeJS.ArrayBufferView, + inputEncoding: BufferEncoding | null | undefined, + outputEncoding: BufferEncoding, + ): string; + /** + * Once the `decipher.final()` method has been called, the `Decipheriv` object can + * no longer be used to decrypt data. Attempts to call `decipher.final()` more + * than once will result in an error being thrown. + * @since v0.1.94 + * @param outputEncoding The `encoding` of the return value. + * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. + */ + final(): NonSharedBuffer; + final(outputEncoding: BufferEncoding): string; + /** + * When data has been encrypted without standard block padding, calling `decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and + * removing padding. + * + * Turning auto padding off will only work if the input data's length is a + * multiple of the ciphers block size. + * + * The `decipher.setAutoPadding()` method must be called before `decipher.final()`. + * @since v0.7.1 + * @param [autoPadding=true] + * @return for method chaining. + */ + setAutoPadding(auto_padding?: boolean): this; + } + interface DecipherAEADMethods { + setAAD( + buffer: BinaryLike, + options?: { + plaintextLength?: number | undefined; + encoding?: BufferEncoding | undefined; + }, + ): this; + setAuthTag(buffer: BinaryLike, encoding?: BufferEncoding): this; + } + interface DecipherCCM extends Decipheriv, DecipherAEADMethods { + setAAD( + buffer: BinaryLike, + options: { + plaintextLength: number; + encoding?: BufferEncoding | undefined; + }, + ): this; + } + interface DecipherGCM extends Decipheriv, DecipherAEADMethods {} + interface DecipherOCB extends Decipheriv, DecipherAEADMethods {} + interface DecipherChaCha20Poly1305 extends Decipheriv, DecipherAEADMethods {} + interface PrivateKeyInput { + key: BinaryLike; + format?: "pem" | "der" | undefined; + type?: PrivateKeyExportType | undefined; + passphrase?: BinaryLike | undefined; + encoding?: BufferEncoding | undefined; + } + interface PublicKeyInput { + key: BinaryLike; + format?: "pem" | "der" | undefined; + type?: PublicKeyExportType | undefined; + encoding?: BufferEncoding | undefined; + } + interface RawPrivateKeyInput { + key: ArrayBufferLike | NodeJS.ArrayBufferView; + format: "raw-private" | "raw-seed"; + asymmetricKeyType: AsymmetricKeyType; + namedCurve?: string | undefined; + } + interface RawPublicKeyInput { + key: ArrayBufferLike | NodeJS.ArrayBufferView; + format: "raw-public"; + asymmetricKeyType: AsymmetricKeyType; + namedCurve?: string | undefined; + } + interface JsonWebKeyInput { + key: webcrypto.JsonWebKey; + format: "jwk"; + } + interface SecretKeyOptions { + length: number; + } + /** + * Asynchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`. + * + * ```js + * const { + * generateKey, + * } = await import('node:crypto'); + * + * generateKey('hmac', { length: 512 }, (err, key) => { + * if (err) throw err; + * console.log(key.export().toString('hex')); // 46e..........620 + * }); + * ``` + * + * The size of a generated HMAC key should not exceed the block size of the + * underlying hash function. See {@link createHmac} for more information. + * @since v15.0.0 + * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. + */ + function generateKey( + type: "hmac" | "aes", + options: SecretKeyOptions, + callback: (err: Error | null, key: KeyObject) => void, + ): void; + /** + * Synchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`. + * + * ```js + * const { + * generateKeySync, + * } = await import('node:crypto'); + * + * const key = generateKeySync('hmac', { length: 512 }); + * console.log(key.export().toString('hex')); // e89..........41e + * ``` + * + * The size of a generated HMAC key should not exceed the block size of the + * underlying hash function. See {@link createHmac} for more information. + * @since v15.0.0 + * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. + */ + function generateKeySync(type: "hmac" | "aes", options: SecretKeyOptions): KeyObject; + /** + * Creates and returns a new key object containing a private key. If `key` is a + * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key` must be an object with the properties described above. + * + * If the private key is encrypted, a `passphrase` must be specified. The length + * of the passphrase is limited to 1024 bytes. + * @since v11.6.0 + */ + function createPrivateKey(key: PrivateKeyInput | RawPrivateKeyInput | JsonWebKeyInput | BinaryLike): KeyObject; + /** + * Creates and returns a new key object containing a public key. If `key` is a + * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject` with type `'private'`, the public key is derived from the given private key; + * otherwise, `key` must be an object with the properties described above. + * + * If the format is `'pem'`, the `'key'` may also be an X.509 certificate. + * + * Because public keys can be derived from private keys, a private key may be + * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the + * returned `KeyObject` will be `'public'` and that the private key cannot be + * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type `'private'` is given, a new `KeyObject` with type `'public'` will be returned + * and it will be impossible to extract the private key from the returned object. + * @since v11.6.0 + */ + function createPublicKey(key: PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput | KeyLike): KeyObject; + /** + * Creates and returns a new key object containing a secret key for symmetric + * encryption or `Hmac`. + * @since v11.6.0 + * @param encoding The string encoding when `key` is a string. + */ + function createSecretKey(key: BinaryLike, encoding?: BufferEncoding): KeyObject; + /** + * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms. + * Optional `options` argument controls the `stream.Writable` behavior. + * + * In some cases, a `Sign` instance can be created using the name of a signature + * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use + * the corresponding digest algorithm. This does not work for all signature + * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest + * algorithm names. + * @since v0.1.92 + * @param options `stream.Writable` options + */ + function createSign(algorithm: string, options?: WritableOptions): Sign; + type DSAEncoding = "der" | "ieee-p1363"; + interface SigningOptions { + padding?: number | undefined; + saltLength?: number | undefined; + dsaEncoding?: DSAEncoding | undefined; + context?: NodeJS.ArrayBufferView | undefined; + } + interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {} + interface SignRawPrivateKeyInput extends RawPrivateKeyInput, SigningOptions {} + interface SignJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {} + interface SignKeyObjectInput extends SigningOptions { + key: KeyObject; + } + interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {} + interface VerifyRawPublicKeyInput extends RawPublicKeyInput, SigningOptions {} + interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {} + interface VerifyKeyObjectInput extends SigningOptions { + key: KeyObject; + } + /** + * The `Sign` class is a utility for generating signatures. It can be used in one + * of two ways: + * + * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or + * * Using the `sign.update()` and `sign.sign()` methods to produce the + * signature. + * + * The {@link createSign} method is used to create `Sign` instances. The + * argument is the string name of the hash function to use. `Sign` objects are not + * to be created directly using the `new` keyword. + * + * Example: Using `Sign` and `Verify` objects as streams: + * + * ```js + * const { + * generateKeyPairSync, + * createSign, + * createVerify, + * } = await import('node:crypto'); + * + * const { privateKey, publicKey } = generateKeyPairSync('ec', { + * namedCurve: 'sect239k1', + * }); + * + * const sign = createSign('SHA256'); + * sign.write('some data to sign'); + * sign.end(); + * const signature = sign.sign(privateKey, 'hex'); + * + * const verify = createVerify('SHA256'); + * verify.write('some data to sign'); + * verify.end(); + * console.log(verify.verify(publicKey, signature, 'hex')); + * // Prints: true + * ``` + * + * Example: Using the `sign.update()` and `verify.update()` methods: + * + * ```js + * const { + * generateKeyPairSync, + * createSign, + * createVerify, + * } = await import('node:crypto'); + * + * const { privateKey, publicKey } = generateKeyPairSync('rsa', { + * modulusLength: 2048, + * }); + * + * const sign = createSign('SHA256'); + * sign.update('some data to sign'); + * sign.end(); + * const signature = sign.sign(privateKey); + * + * const verify = createVerify('SHA256'); + * verify.update('some data to sign'); + * verify.end(); + * console.log(verify.verify(publicKey, signature)); + * // Prints: true + * ``` + * @since v0.1.92 + */ + class Sign extends Writable { + private constructor(); + /** + * Updates the `Sign` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): this; + /** + * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if + * `privateKey` had been passed to `crypto.createPrivateKey()`. When + * `privateKey` is a string, `ArrayBuffer`, `Buffer`, `TypedArray`, or + * `DataView`, it must contain PEM-encoded key material. If it is an object, the + * following additional properties can be passed: + * + * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned. + * + * The `Sign` object can not be again used after `sign.sign()` method has been + * called. Multiple calls to `sign.sign()` will result in an error being thrown. + * @since v0.1.92 + */ + sign( + privateKey: + | KeyLike + | SignKeyObjectInput + | SignPrivateKeyInput + | SignRawPrivateKeyInput + | SignJsonWebKeyInput, + ): NonSharedBuffer; + sign( + privateKey: + | KeyLike + | SignKeyObjectInput + | SignPrivateKeyInput + | SignRawPrivateKeyInput + | SignJsonWebKeyInput, + outputFormat: BufferEncoding, + ): string; + } + /** + * Creates and returns a `Verify` object that uses the given algorithm. + * Use {@link getHashes} to obtain an array of names of the available + * signing algorithms. Optional `options` argument controls the `stream.Writable` behavior. + * + * In some cases, a `Verify` instance can be created using the name of a signature + * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use + * the corresponding digest algorithm. This does not work for all signature + * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest + * algorithm names. + * @since v0.1.92 + * @param options `stream.Writable` options + */ + function createVerify(algorithm: string, options?: WritableOptions): Verify; + /** + * The `Verify` class is a utility for verifying signatures. It can be used in one + * of two ways: + * + * * As a writable `stream` where written data is used to validate against the + * supplied signature, or + * * Using the `verify.update()` and `verify.verify()` methods to verify + * the signature. + * + * The {@link createVerify} method is used to create `Verify` instances. `Verify` objects are not to be created directly using the `new` keyword. + * + * See `Sign` for examples. + * @since v0.1.92 + */ + class Verify extends Writable { + private constructor(); + /** + * Updates the `Verify` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `inputEncoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or `DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): Verify; + /** + * Verifies the provided data using the given `key` and `signature`. + * + * If `key` is not a `KeyObject`, this function behaves as if + * `key` had been passed to `crypto.createPublicKey()`. When `key` is a string, + * `ArrayBuffer`, `Buffer`, `TypedArray`, or `DataView`, it must contain + * PEM-encoded key material. If it is an object, the following additional + * properties can be passed: + * + * The `signature` argument is the previously calculated signature for the data, in + * the `signatureEncoding`. + * If a `signatureEncoding` is specified, the `signature` is expected to be a + * string; otherwise `signature` is expected to be a `Buffer`, `TypedArray`, or `DataView`. + * + * The `verify` object can not be used again after `verify.verify()` has been + * called. Multiple calls to `verify.verify()` will result in an error being + * thrown. + * + * Because public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v0.1.92 + */ + verify( + key: + | KeyLike + | VerifyKeyObjectInput + | VerifyPublicKeyInput + | VerifyRawPublicKeyInput + | VerifyJsonWebKeyInput, + signature: BinaryLike, + signatureEncoding?: BufferEncoding, + ): boolean; + } + /** + * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an + * optional specific `generator`. + * + * The `generator` argument can be a number, string, or `Buffer`. If `generator` is not specified, the value `2` is used. + * + * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise + * a `Buffer`, `TypedArray`, or `DataView` is expected. + * + * If `generatorEncoding` is specified, `generator` is expected to be a string; + * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected. + * @since v0.11.12 + * @param primeEncoding The `encoding` of the `prime` string. + * @param [generator=2] + * @param generatorEncoding The `encoding` of the `generator` string. + */ + function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman; + function createDiffieHellman( + prime: BinaryLike, + primeEncoding?: BufferEncoding, + generator?: number | BinaryLike, + generatorEncoding?: BufferEncoding, + ): DiffieHellman; + function createDiffieHellman( + prime: BinaryLike, + generator: number | BinaryLike, + generatorEncoding?: BufferEncoding, + ): DiffieHellman; + /** + * The `DiffieHellman` class is a utility for creating Diffie-Hellman key + * exchanges. + * + * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function. + * + * ```js + * import assert from 'node:assert'; + * + * const { + * createDiffieHellman, + * } = await import('node:crypto'); + * + * // Generate Alice's keys... + * const alice = createDiffieHellman(2048); + * const aliceKey = alice.generateKeys(); + * + * // Generate Bob's keys... + * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator()); + * const bobKey = bob.generateKeys(); + * + * // Exchange and generate the secret... + * const aliceSecret = alice.computeSecret(bobKey); + * const bobSecret = bob.computeSecret(aliceKey); + * + * // OK + * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); + * ``` + * @since v0.5.0 + */ + class DiffieHellman { + private constructor(); + /** + * Generates private and public Diffie-Hellman key values unless they have been + * generated or computed already, and returns + * the public key in the specified `encoding`. This key should be + * transferred to the other party. + * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. + * + * This function is a thin wrapper around [`DH_generate_key()`](https://www.openssl.org/docs/man3.0/man3/DH_generate_key.html). In particular, + * once a private key has been generated or set, calling this function only + * recomputes the public key from the existing private key. Since the public key is + * determined by the private key, the result will be the same unless the private key + * has been changed via `diffieHellman.setPrivateKey()`. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + generateKeys(): NonSharedBuffer; + generateKeys(encoding: BufferEncoding): string; + /** + * Computes the shared secret using `otherPublicKey` as the other + * party's public key and returns the computed shared secret. The supplied + * key is interpreted using the specified `inputEncoding`, and secret is + * encoded using specified `outputEncoding`. + * If the `inputEncoding` is not + * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. + * + * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned. + * @since v0.5.0 + * @param inputEncoding The `encoding` of an `otherPublicKey` string. + * @param outputEncoding The `encoding` of the return value. + */ + computeSecret( + otherPublicKey: BinaryLike, + inputEncoding?: BufferEncoding, + ): NonSharedBuffer; + computeSecret( + otherPublicKey: BinaryLike, + inputEncoding: BufferEncoding | null | undefined, + outputEncoding: BufferEncoding, + ): string; + /** + * Returns the Diffie-Hellman prime in the specified `encoding`. + * If `encoding` is provided a string is + * returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPrime(): NonSharedBuffer; + getPrime(encoding: BufferEncoding): string; + /** + * Returns the Diffie-Hellman generator in the specified `encoding`. + * If `encoding` is provided a string is + * returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getGenerator(): NonSharedBuffer; + getGenerator(encoding: BufferEncoding): string; + /** + * Returns the Diffie-Hellman public key in the specified `encoding`. + * If `encoding` is provided a + * string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPublicKey(): NonSharedBuffer; + getPublicKey(encoding: BufferEncoding): string; + /** + * Returns the Diffie-Hellman private key in the specified `encoding`. + * If `encoding` is provided a + * string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPrivateKey(): NonSharedBuffer; + getPrivateKey(encoding: BufferEncoding): string; + /** + * Sets the Diffie-Hellman public key. If the `encoding` argument is provided, `publicKey` is expected + * to be a string. If no `encoding` is provided, `publicKey` is expected + * to be a `Buffer`, `TypedArray`, or `DataView`. + * @since v0.5.0 + * @param encoding The `encoding` of the `publicKey` string. + */ + setPublicKey(publicKey: BinaryLike, encoding?: BufferEncoding): void; + /** + * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected + * to be a string. If no `encoding` is provided, `privateKey` is expected + * to be a `Buffer`, `TypedArray`, or `DataView`. + * + * This function does not automatically compute the associated public key. Either `diffieHellman.setPublicKey()` or `diffieHellman.generateKeys()` can be + * used to manually provide the public key or to automatically derive it. + * @since v0.5.0 + * @param encoding The `encoding` of the `privateKey` string. + */ + setPrivateKey(privateKey: BinaryLike, encoding?: BufferEncoding): void; + /** + * A bit field containing any warnings and/or errors resulting from a check + * performed during initialization of the `DiffieHellman` object. + * + * The following values are valid for this property (as defined in `node:constants` module): + * + * * `DH_CHECK_P_NOT_SAFE_PRIME` + * * `DH_CHECK_P_NOT_PRIME` + * * `DH_UNABLE_TO_CHECK_GENERATOR` + * * `DH_NOT_SUITABLE_GENERATOR` + * @since v0.11.12 + */ + verifyError: number; + } + /** + * The `DiffieHellmanGroup` class takes a well-known modp group as its argument. + * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation. + * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods. + * + * ```js + * const { createDiffieHellmanGroup } = await import('node:crypto'); + * const dh = createDiffieHellmanGroup('modp1'); + * ``` + * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt): + * ```bash + * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h + * modp1 # 768 bits + * modp2 # 1024 bits + * modp5 # 1536 bits + * modp14 # 2048 bits + * modp15 # etc. + * modp16 + * modp17 + * modp18 + * ``` + * @since v0.7.5 + */ + class DiffieHellmanGroup { + private constructor(); + } + interface DiffieHellmanGroup extends Omit {} + /** + * Creates a predefined `DiffieHellmanGroup` key exchange object. The + * supported groups are listed in the documentation for `DiffieHellmanGroup`. + * + * The returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing + * the keys (with `diffieHellman.setPublicKey()`, for example). The + * advantage of using this method is that the parties do not have to + * generate nor exchange a group modulus beforehand, saving both processor + * and communication time. + * + * Example (obtaining a shared secret): + * + * ```js + * const { + * getDiffieHellman, + * } = await import('node:crypto'); + * const alice = getDiffieHellman('modp14'); + * const bob = getDiffieHellman('modp14'); + * + * alice.generateKeys(); + * bob.generateKeys(); + * + * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex'); + * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); + * + * // aliceSecret and bobSecret should be the same + * console.log(aliceSecret === bobSecret); + * ``` + * @since v0.7.5 + */ + function getDiffieHellman(groupName: string): DiffieHellmanGroup; + /** + * An alias for {@link getDiffieHellman} + * @since v0.9.3 + */ + function createDiffieHellmanGroup(name: string): DiffieHellmanGroup; + /** + * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2) + * implementation. A selected HMAC digest algorithm specified by `digest` is + * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`. + * + * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an error occurs while deriving the key, `err` will be set; + * otherwise `err` will be `null`. By default, the successfully generated `derivedKey` will be passed to the callback as a `Buffer`. An error will be + * thrown if any of the input arguments specify invalid values or types. + * + * The `iterations` argument must be a number set as high as possible. The + * higher the number of iterations, the more secure the derived key will be, + * but will take a longer amount of time to complete. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * ```js + * const { + * pbkdf2, + * } = await import('node:crypto'); + * + * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' + * }); + * ``` + * + * An array of supported digest functions can be retrieved using {@link getHashes}. + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * @since v0.5.5 + */ + function pbkdf2( + password: BinaryLike, + salt: BinaryLike, + iterations: number, + keylen: number, + digest: string, + callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, + ): void; + /** + * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2) + * implementation. A selected HMAC digest algorithm specified by `digest` is + * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`. + * + * If an error occurs an `Error` will be thrown, otherwise the derived key will be + * returned as a `Buffer`. + * + * The `iterations` argument must be a number set as high as possible. The + * higher the number of iterations, the more secure the derived key will be, + * but will take a longer amount of time to complete. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * ```js + * const { + * pbkdf2Sync, + * } = await import('node:crypto'); + * + * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512'); + * console.log(key.toString('hex')); // '3745e48...08d59ae' + * ``` + * + * An array of supported digest functions can be retrieved using {@link getHashes}. + * @since v0.9.3 + */ + function pbkdf2Sync( + password: BinaryLike, + salt: BinaryLike, + iterations: number, + keylen: number, + digest: string, + ): NonSharedBuffer; + /** + * Generates cryptographically strong pseudorandom data. The `size` argument + * is a number indicating the number of bytes to generate. + * + * If a `callback` function is provided, the bytes are generated asynchronously + * and the `callback` function is invoked with two arguments: `err` and `buf`. + * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The `buf` argument is a `Buffer` containing the generated bytes. + * + * ```js + * // Asynchronous + * const { + * randomBytes, + * } = await import('node:crypto'); + * + * randomBytes(256, (err, buf) => { + * if (err) throw err; + * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`); + * }); + * ``` + * + * If the `callback` function is not provided, the random bytes are generated + * synchronously and returned as a `Buffer`. An error will be thrown if + * there is a problem generating the bytes. + * + * ```js + * // Synchronous + * const { + * randomBytes, + * } = await import('node:crypto'); + * + * const buf = randomBytes(256); + * console.log( + * `${buf.length} bytes of random data: ${buf.toString('hex')}`); + * ``` + * + * The `crypto.randomBytes()` method will not complete until there is + * sufficient entropy available. + * This should normally never take longer than a few milliseconds. The only time + * when generating the random bytes may conceivably block for a longer period of + * time is right after boot, when the whole system is still low on entropy. + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * + * The asynchronous version of `crypto.randomBytes()` is carried out in a single + * threadpool request. To minimize threadpool task length variation, partition + * large `randomBytes` requests when doing so as part of fulfilling a client + * request. + * @since v0.5.8 + * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`. + * @return if the `callback` function is not provided. + */ + function randomBytes(size: number): NonSharedBuffer; + function randomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void; + function pseudoRandomBytes(size: number): NonSharedBuffer; + function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void; + /** + * Return a random integer `n` such that `min <= n < max`. This + * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias). + * + * The range (`max - min`) must be less than 2**48. `min` and `max` must + * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger). + * + * If the `callback` function is not provided, the random integer is + * generated synchronously. + * + * ```js + * // Asynchronous + * const { + * randomInt, + * } = await import('node:crypto'); + * + * randomInt(3, (err, n) => { + * if (err) throw err; + * console.log(`Random number chosen from (0, 1, 2): ${n}`); + * }); + * ``` + * + * ```js + * // Synchronous + * const { + * randomInt, + * } = await import('node:crypto'); + * + * const n = randomInt(3); + * console.log(`Random number chosen from (0, 1, 2): ${n}`); + * ``` + * + * ```js + * // With `min` argument + * const { + * randomInt, + * } = await import('node:crypto'); + * + * const n = randomInt(1, 7); + * console.log(`The dice rolled: ${n}`); + * ``` + * @since v14.10.0, v12.19.0 + * @param min Start of random range (inclusive). + * @param max End of random range (exclusive). + */ + function randomInt(max: number): number; + function randomInt(min: number, max: number): number; + function randomInt(max: number, callback: (err: Error | null, value: number) => void): void; + function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void; + /** + * Synchronous version of {@link randomFill}. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { randomFillSync } = await import('node:crypto'); + * + * const buf = Buffer.alloc(10); + * console.log(randomFillSync(buf).toString('hex')); + * + * randomFillSync(buf, 5); + * console.log(buf.toString('hex')); + * + * // The above is equivalent to the following: + * randomFillSync(buf, 5, 5); + * console.log(buf.toString('hex')); + * ``` + * + * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { randomFillSync } = await import('node:crypto'); + * + * const a = new Uint32Array(10); + * console.log(Buffer.from(randomFillSync(a).buffer, + * a.byteOffset, a.byteLength).toString('hex')); + * + * const b = new DataView(new ArrayBuffer(10)); + * console.log(Buffer.from(randomFillSync(b).buffer, + * b.byteOffset, b.byteLength).toString('hex')); + * + * const c = new ArrayBuffer(10); + * console.log(Buffer.from(randomFillSync(c)).toString('hex')); + * ``` + * @since v7.10.0, v6.13.0 + * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. + * @param [offset=0] + * @param [size=buffer.length - offset] + * @return The object passed as `buffer` argument. + */ + function randomFillSync( + buffer: T, + offset?: number, + size?: number, + ): T; + /** + * This function is similar to {@link randomBytes} but requires the first + * argument to be a `Buffer` that will be filled. It also + * requires that a callback is passed in. + * + * If the `callback` function is not provided, an error will be thrown. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { randomFill } = await import('node:crypto'); + * + * const buf = Buffer.alloc(10); + * randomFill(buf, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * + * randomFill(buf, 5, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * + * // The above is equivalent to the following: + * randomFill(buf, 5, 5, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * ``` + * + * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as `buffer`. + * + * While this includes instances of `Float32Array` and `Float64Array`, this + * function should not be used to generate random floating-point numbers. The + * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array + * contains finite numbers only, they are not drawn from a uniform random + * distribution and have no meaningful lower or upper bounds. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { randomFill } = await import('node:crypto'); + * + * const a = new Uint32Array(10); + * randomFill(a, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) + * .toString('hex')); + * }); + * + * const b = new DataView(new ArrayBuffer(10)); + * randomFill(b, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) + * .toString('hex')); + * }); + * + * const c = new ArrayBuffer(10); + * randomFill(c, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf).toString('hex')); + * }); + * ``` + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * + * The asynchronous version of `crypto.randomFill()` is carried out in a single + * threadpool request. To minimize threadpool task length variation, partition + * large `randomFill` requests when doing so as part of fulfilling a client + * request. + * @since v7.10.0, v6.13.0 + * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. + * @param [offset=0] + * @param [size=buffer.length - offset] + * @param callback `function(err, buf) {}`. + */ + function randomFill( + buffer: T, + callback: (err: Error | null, buf: T) => void, + ): void; + function randomFill( + buffer: T, + offset: number, + callback: (err: Error | null, buf: T) => void, + ): void; + function randomFill( + buffer: T, + offset: number, + size: number, + callback: (err: Error | null, buf: T) => void, + ): void; + interface ScryptOptions { + cost?: number | undefined; + blockSize?: number | undefined; + parallelization?: number | undefined; + N?: number | undefined; + r?: number | undefined; + p?: number | undefined; + maxmem?: number | undefined; + } + /** + * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * The `callback` function is called with two arguments: `err` and `derivedKey`. `err` is an exception object when key derivation fails, otherwise `err` is `null`. `derivedKey` is passed to the + * callback as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { + * scrypt, + * } = await import('node:crypto'); + * + * // Using the factory defaults. + * scrypt('password', 'salt', 64, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' + * }); + * // Using a custom N parameter. Must be a power of two. + * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34' + * }); + * ``` + * @since v10.5.0 + */ + function scrypt( + password: BinaryLike, + salt: BinaryLike, + keylen: number, + callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, + ): void; + function scrypt( + password: BinaryLike, + salt: BinaryLike, + keylen: number, + options: ScryptOptions, + callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, + ): void; + /** + * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * An exception is thrown when key derivation fails, otherwise the derived key is + * returned as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { + * scryptSync, + * } = await import('node:crypto'); + * // Using the factory defaults. + * + * const key1 = scryptSync('password', 'salt', 64); + * console.log(key1.toString('hex')); // '3745e48...08d59ae' + * // Using a custom N parameter. Must be a power of two. + * const key2 = scryptSync('password', 'salt', 64, { N: 1024 }); + * console.log(key2.toString('hex')); // '3745e48...aa39b34' + * ``` + * @since v10.5.0 + */ + function scryptSync( + password: BinaryLike, + salt: BinaryLike, + keylen: number, + options?: ScryptOptions, + ): NonSharedBuffer; + interface PublicDecryptOptions { + padding?: number | undefined; + encoding?: BufferEncoding | undefined; + } + interface PublicDecryptPrivateKeyInput extends PrivateKeyInput, PublicDecryptOptions {} + interface PublicDecryptPublicKeyInput extends PublicKeyInput, PublicDecryptOptions {} + interface PublicDecryptJsonWebKeyInput extends JsonWebKeyInput, PublicDecryptOptions {} + interface PublicDecryptKeyObjectInput extends PublicDecryptOptions { + key: KeyObject; + } + interface PublicEncryptOptions extends PublicDecryptOptions { + oaepHash?: string | undefined; + oaepLabel?: BinaryLike | undefined; + } + interface PublicEncryptPrivateKeyInput extends PrivateKeyInput, PublicEncryptOptions {} + interface PublicEncryptPublicKeyInput extends PublicKeyInput, PublicEncryptOptions {} + interface PublicEncryptJsonWebKeyInput extends JsonWebKeyInput, PublicEncryptOptions {} + interface PublicEncryptKeyObjectInput extends PublicEncryptOptions { + key: KeyObject; + } + /** + * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using + * the corresponding private key, for example using {@link privateDecrypt}. + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`. + * + * Because RSA public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v0.11.14 + */ + function publicEncrypt( + key: + | KeyLike + | PublicEncryptKeyObjectInput + | PublicEncryptPrivateKeyInput + | PublicEncryptPublicKeyInput + | PublicEncryptJsonWebKeyInput, + buffer: BinaryLike, + ): NonSharedBuffer; + /** + * Decrypts `buffer` with `key`.`buffer` was previously encrypted using + * the corresponding private key, for example using {@link privateEncrypt}. + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`. + * + * Because RSA public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v1.1.0 + */ + function publicDecrypt( + key: + | KeyLike + | PublicDecryptKeyObjectInput + | PublicDecryptPrivateKeyInput + | PublicDecryptPublicKeyInput + | PublicDecryptJsonWebKeyInput, + buffer: BinaryLike, + ): NonSharedBuffer; + /** + * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using + * the corresponding public key, for example using {@link publicEncrypt}. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`. + * @since v0.11.14 + */ + function privateDecrypt( + privateKey: + | KeyLike + | PublicEncryptKeyObjectInput + | PublicEncryptPrivateKeyInput + | PublicEncryptJsonWebKeyInput, + buffer: BinaryLike, + ): NonSharedBuffer; + /** + * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using + * the corresponding public key, for example using {@link publicDecrypt}. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`. + * @since v1.1.0 + */ + function privateEncrypt( + privateKey: + | KeyLike + | PublicDecryptKeyObjectInput + | PublicDecryptPrivateKeyInput + | PublicDecryptJsonWebKeyInput, + buffer: BinaryLike, + ): NonSharedBuffer; + /** + * ```js + * const { + * getCiphers, + * } = await import('node:crypto'); + * + * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...] + * ``` + * @since v0.9.3 + * @return An array with the names of the supported cipher algorithms. + */ + function getCiphers(): string[]; + /** + * ```js + * const { + * getCurves, + * } = await import('node:crypto'); + * + * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...] + * ``` + * @since v2.3.0 + * @return An array with the names of the supported elliptic curves. + */ + function getCurves(): string[]; + /** + * @since v10.0.0 + * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}. + */ + function getFips(): 1 | 0; + /** + * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. + * Throws an error if FIPS mode is not available. + * @since v10.0.0 + * @param bool `true` to enable FIPS mode. + */ + function setFips(bool: boolean): void; + /** + * ```js + * const { + * getHashes, + * } = await import('node:crypto'); + * + * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...] + * ``` + * @since v0.9.3 + * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms. + */ + function getHashes(): string[]; + type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; + /** + * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH) + * key exchanges. + * + * Instances of the `ECDH` class can be created using the {@link createECDH} function. + * + * ```js + * import assert from 'node:assert'; + * + * const { + * createECDH, + * } = await import('node:crypto'); + * + * // Generate Alice's keys... + * const alice = createECDH('secp521r1'); + * const aliceKey = alice.generateKeys(); + * + * // Generate Bob's keys... + * const bob = createECDH('secp521r1'); + * const bobKey = bob.generateKeys(); + * + * // Exchange and generate the secret... + * const aliceSecret = alice.computeSecret(bobKey); + * const bobSecret = bob.computeSecret(aliceKey); + * + * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); + * // OK + * ``` + * @since v0.11.14 + */ + class ECDH { + private constructor(); + /** + * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the + * format specified by `format`. The `format` argument specifies point encoding + * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is + * interpreted using the specified `inputEncoding`, and the returned key is encoded + * using the specified `outputEncoding`. + * + * Use {@link getCurves} to obtain a list of available curve names. + * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display + * the name and description of each available elliptic curve. + * + * If `format` is not specified the point will be returned in `'uncompressed'` format. + * + * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`, `TypedArray`, or `DataView`. + * + * Example (uncompressing a key): + * + * ```js + * const { + * createECDH, + * ECDH, + * } = await import('node:crypto'); + * + * const ecdh = createECDH('secp256k1'); + * ecdh.generateKeys(); + * + * const compressedKey = ecdh.getPublicKey('hex', 'compressed'); + * + * const uncompressedKey = ECDH.convertKey(compressedKey, + * 'secp256k1', + * 'hex', + * 'hex', + * 'uncompressed'); + * + * // The converted key and the uncompressed public key should be the same + * console.log(uncompressedKey === ecdh.getPublicKey('hex')); + * ``` + * @since v10.0.0 + * @param inputEncoding The `encoding` of the `key` string. + * @param outputEncoding The `encoding` of the return value. + */ + static convertKey( + key: BinaryLike, + curve: string, + inputEncoding?: BufferEncoding, + outputEncoding?: null, + format?: "uncompressed" | "compressed" | "hybrid", + ): NonSharedBuffer; + static convertKey( + key: BinaryLike, + curve: string, + inputEncoding: BufferEncoding | null | undefined, + outputEncoding: BufferEncoding, + format?: "uncompressed" | "compressed" | "hybrid", + ): string; + /** + * Generates private and public EC Diffie-Hellman key values, and returns + * the public key in the specified `format` and `encoding`. This key should be + * transferred to the other party. + * + * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format. + * + * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @param [format='uncompressed'] + */ + generateKeys(encoding?: null, format?: ECDHKeyFormat): NonSharedBuffer; + generateKeys(encoding: BufferEncoding, format?: ECDHKeyFormat): string; + /** + * Computes the shared secret using `otherPublicKey` as the other + * party's public key and returns the computed shared secret. The supplied + * key is interpreted using specified `inputEncoding`, and the returned secret + * is encoded using the specified `outputEncoding`. + * If the `inputEncoding` is not + * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. + * + * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned. + * + * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey` lies outside of the elliptic curve. Since `otherPublicKey` is + * usually supplied from a remote user over an insecure network, + * be sure to handle this exception accordingly. + * @since v0.11.14 + * @param inputEncoding The `encoding` of the `otherPublicKey` string. + * @param outputEncoding The `encoding` of the return value. + */ + computeSecret(otherPublicKey: BinaryLike, inputEncoding?: BufferEncoding): NonSharedBuffer; + computeSecret( + otherPublicKey: BinaryLike, + inputEncoding: BufferEncoding | null | undefined, + outputEncoding: BufferEncoding, + ): string; + /** + * If `encoding` is specified, a string is returned; otherwise a `Buffer` is + * returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @return The EC Diffie-Hellman in the specified `encoding`. + */ + getPrivateKey(): NonSharedBuffer; + getPrivateKey(encoding: BufferEncoding): string; + /** + * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format. + * + * If `encoding` is specified, a string is returned; otherwise a `Buffer` is + * returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @param [format='uncompressed'] + * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`. + */ + getPublicKey(encoding?: null, format?: ECDHKeyFormat): NonSharedBuffer; + getPublicKey(encoding: BufferEncoding, format?: ECDHKeyFormat): string; + /** + * Sets the EC Diffie-Hellman private key. + * If `encoding` is provided, `privateKey` is expected + * to be a string; otherwise `privateKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. + * + * If `privateKey` is not valid for the curve specified when the `ECDH` object was + * created, an error is thrown. Upon setting the private key, the associated + * public point (key) is also generated and set in the `ECDH` object. + * @since v0.11.14 + * @param encoding The `encoding` of the `privateKey` string. + */ + setPrivateKey(privateKey: BinaryLike, encoding?: BufferEncoding): void; + } + /** + * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a + * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent + * OpenSSL releases, `openssl ecparam -list_curves` will also display the name + * and description of each available elliptic curve. + * @since v0.11.14 + */ + function createECDH(curveName: string): ECDH; + /** + * This function compares the underlying bytes that represent the given `ArrayBuffer`, `TypedArray`, or `DataView` instances using a constant-time + * algorithm. + * + * This function does not leak timing information that + * would allow an attacker to guess one of the values. This is suitable for + * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/). + * + * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they + * must have the same byte length. An error is thrown if `a` and `b` have + * different byte lengths. + * + * If at least one of `a` and `b` is a `TypedArray` with more than one byte per + * entry, such as `Uint16Array`, the result will be computed using the platform + * byte order. + * + * **When both of the inputs are `Float32Array`s or `Float64Array`s, this function might return unexpected results due to IEEE 754** + * **encoding of floating-point numbers. In particular, neither `x === y` nor `Object.is(x, y)` implies that the byte representations of two floating-point** + * **numbers `x` and `y` are equal.** + * + * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code + * is timing-safe. Care should be taken to ensure that the surrounding code does + * not introduce timing vulnerabilities. + * @since v6.6.0 + */ + function timingSafeEqual( + a: ArrayBufferLike | NodeJS.ArrayBufferView, + b: ArrayBufferLike | NodeJS.ArrayBufferView, + ): boolean; + interface DHKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> { + prime?: NodeJS.ArrayBufferView | undefined; + primeLength?: number | undefined; + generator?: number | undefined; + groupName?: string | undefined; + } + interface DSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> { + modulusLength: number; + divisorLength?: number | undefined; + } + interface ECKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8" | "sec1"> { + namedCurve: string; + paramEncoding?: "explicit" | "named" | undefined; + } + interface ED25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface ED448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface MLDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface MLKEMKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface RSAPSSKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> { + modulusLength: number; + publicExponent?: number | undefined; + hashAlgorithm?: string | undefined; + mgf1HashAlgorithm?: string | undefined; + saltLength?: string | undefined; + } + interface RSAKeyPairOptions extends KeyPairExportOptions<"pkcs1" | "spki", "pkcs1" | "pkcs8"> { + modulusLength: number; + publicExponent?: number | undefined; + } + interface SLHDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface X25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface X448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + /** + * Generates a new asymmetric key pair of the given `type`. See the + * supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types). + * + * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function + * behaves as if `keyObject.export()` had been called on its result. Otherwise, + * the respective part of the key is returned as a `KeyObject`. + * + * When encoding public keys, it is recommended to use `'spki'`. When encoding + * private keys, it is recommended to use `'pkcs8'` with a strong passphrase, + * and to keep the passphrase confidential. + * + * ```js + * const { + * generateKeyPairSync, + * } = await import('node:crypto'); + * + * const { + * publicKey, + * privateKey, + * } = generateKeyPairSync('rsa', { + * modulusLength: 4096, + * publicKeyEncoding: { + * type: 'spki', + * format: 'pem', + * }, + * privateKeyEncoding: { + * type: 'pkcs8', + * format: 'pem', + * cipher: 'aes-256-cbc', + * passphrase: 'top secret', + * }, + * }); + * ``` + * + * The return value `{ publicKey, privateKey }` represents the generated key pair. + * When PEM encoding was selected, the respective key will be a string, otherwise + * it will be a buffer containing the data encoded as DER. + * @since v10.12.0 + * @param type The asymmetric key type to generate. See the + * supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types). + */ + function generateKeyPairSync( + type: "dh", + options: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "dsa", + options: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "ec", + options: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "ed25519", + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "ed448", + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: MLDSAKeyType, + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: MLKEMKeyType, + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "rsa-pss", + options: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "rsa", + options: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: SLHDSAKeyType, + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "x25519", + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "x448", + options?: T, + ): KeyPairExportResult; + /** + * Generates a new asymmetric key pair of the given `type`. See the + * supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types). + * + * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function + * behaves as if `keyObject.export()` had been called on its result. Otherwise, + * the respective part of the key is returned as a `KeyObject`. + * + * It is recommended to encode public keys as `'spki'` and private keys as `'pkcs8'` with encryption for long-term storage: + * + * ```js + * const { + * generateKeyPair, + * } = await import('node:crypto'); + * + * generateKeyPair('rsa', { + * modulusLength: 4096, + * publicKeyEncoding: { + * type: 'spki', + * format: 'pem', + * }, + * privateKeyEncoding: { + * type: 'pkcs8', + * format: 'pem', + * cipher: 'aes-256-cbc', + * passphrase: 'top secret', + * }, + * }, (err, publicKey, privateKey) => { + * // Handle errors and use the generated key pair. + * }); + * ``` + * + * On completion, `callback` will be called with `err` set to `undefined` and `publicKey` / `privateKey` representing the generated key pair. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `publicKey` and `privateKey` properties. + * @since v10.12.0 + * @param type The asymmetric key type to generate. See the + * supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types). + */ + function generateKeyPair( + type: "dh", + options: T, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "dsa", + options: T, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "ec", + options: T, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "ed25519", + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "ed25519", + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "ed448", + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "ed448", + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: MLDSAKeyType, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: MLDSAKeyType, + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: MLKEMKeyType, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: MLKEMKeyType, + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "rsa-pss", + options: T, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "rsa", + options: T, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: SLHDSAKeyType, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: SLHDSAKeyType, + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "x25519", + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "x25519", + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "x448", + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "x448", + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + namespace generateKeyPair { + function __promisify__( + type: "dh", + options: T, + ): Promise>; + function __promisify__( + type: "dsa", + options: T, + ): Promise>; + function __promisify__( + type: "ec", + options: T, + ): Promise>; + function __promisify__( + type: "ed25519", + options?: T, + ): Promise>; + function __promisify__( + type: "ed448", + options?: T, + ): Promise>; + function __promisify__( + type: MLDSAKeyType, + options?: T, + ): Promise>; + function __promisify__( + type: MLKEMKeyType, + options?: T, + ): Promise>; + function __promisify__( + type: "rsa-pss", + options: T, + ): Promise>; + function __promisify__( + type: "rsa", + options: T, + ): Promise>; + function __promisify__( + type: SLHDSAKeyType, + options?: T, + ): Promise>; + function __promisify__( + type: "x25519", + options?: T, + ): Promise>; + function __promisify__( + type: "x448", + options?: T, + ): Promise>; + } + /** + * Calculates and returns the signature for `data` using the given private key and + * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is + * dependent upon the key type. + * + * `algorithm` is required to be `null` or `undefined` for Ed25519, Ed448, and + * ML-DSA. + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been + * passed to `crypto.createPrivateKey()`. When `key` is a string, `ArrayBuffer`, + * `Buffer`, `TypedArray`, or `DataView`, it must contain PEM-encoded key + * material. If it is an object, the following additional properties can be + * passed: + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v12.0.0 + */ + function sign( + algorithm: string | null | undefined, + data: BinaryLike, + key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, + ): NonSharedBuffer; + function sign( + algorithm: string | null | undefined, + data: BinaryLike, + key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, + callback: (error: Error | null, data: NonSharedBuffer) => void, + ): void; + /** + * Verifies the given signature for `data` using the given key and algorithm. If + * `algorithm` is `null` or `undefined`, then the algorithm is dependent upon the + * key type. + * + * `algorithm` is required to be `null` or `undefined` for Ed25519, Ed448, and + * ML-DSA. + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been + * passed to `crypto.createPublicKey()`. When `key` is a string, `ArrayBuffer`, + * `Buffer`, `TypedArray`, or `DataView`, it must contain PEM-encoded key + * material. If it is an object, the following additional properties can be + * passed: + * + * The `signature` argument is the previously calculated signature for the `data`. + * + * Because public keys can be derived from private keys, a private key or a public + * key may be passed for `key`. + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v12.0.0 + */ + function verify( + algorithm: string | null | undefined, + data: BinaryLike, + key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, + signature: BinaryLike, + ): boolean; + function verify( + algorithm: string | null | undefined, + data: BinaryLike, + key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, + signature: BinaryLike, + callback: (error: Error | null, result: boolean) => void, + ): void; + /** + * Key decapsulation using a KEM algorithm with a private key. + * + * Supported key types and their KEM algorithms are: + * + * * `'rsa'` RSA Secret Value Encapsulation + * * `'ec'` DHKEM(P-256, HKDF-SHA256), DHKEM(P-384, HKDF-SHA256), DHKEM(P-521, HKDF-SHA256) + * * `'x25519'` DHKEM(X25519, HKDF-SHA256) + * * `'x448'` DHKEM(X448, HKDF-SHA512) + * * `'ml-kem-512'` ML-KEM + * * `'ml-kem-768'` ML-KEM + * * `'ml-kem-1024'` ML-KEM + * + * If `key` is not a {@link KeyObject}, this function behaves as if `key` had been + * passed to `crypto.createPrivateKey()`. + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v24.7.0 + */ + function decapsulate( + key: KeyLike | PrivateKeyInput | RawPrivateKeyInput | JsonWebKeyInput, + ciphertext: ArrayBufferLike | NodeJS.ArrayBufferView, + ): NonSharedBuffer; + function decapsulate( + key: KeyLike | PrivateKeyInput | RawPrivateKeyInput | JsonWebKeyInput, + ciphertext: ArrayBufferLike | NodeJS.ArrayBufferView, + callback: (err: Error, sharedKey: NonSharedBuffer) => void, + ): void; + interface DiffieHellmanOptions { + privateKey: KeyLike | PrivateKeyInput; + publicKey: KeyLike | PublicKeyInput; + } + /** + * Computes the Diffie-Hellman shared secret based on a `privateKey` and a `publicKey`. + * Both keys must have the same `asymmetricKeyType` and must support either the DH or + * ECDH operation. + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v13.9.0, v12.17.0 + */ + function diffieHellman(options: DiffieHellmanOptions): NonSharedBuffer; + function diffieHellman( + options: DiffieHellmanOptions, + callback: (err: Error | null, secret: NonSharedBuffer) => void, + ): void; + /** + * Key encapsulation using a KEM algorithm with a public key. + * + * Supported key types and their KEM algorithms are: + * + * * `'rsa'` RSA Secret Value Encapsulation + * * `'ec'` DHKEM(P-256, HKDF-SHA256), DHKEM(P-384, HKDF-SHA256), DHKEM(P-521, HKDF-SHA256) + * * `'x25519'` DHKEM(X25519, HKDF-SHA256) + * * `'x448'` DHKEM(X448, HKDF-SHA512) + * * `'ml-kem-512'` ML-KEM + * * `'ml-kem-768'` ML-KEM + * * `'ml-kem-1024'` ML-KEM + * + * If `key` is not a {@link KeyObject}, this function behaves as if `key` had been + * passed to `crypto.createPublicKey()`. + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v24.7.0 + */ + function encapsulate( + key: KeyLike | PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput, + ): { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer }; + function encapsulate( + key: KeyLike | PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput, + callback: (err: Error, result: { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer }) => void, + ): void; + interface OneShotDigestOptions { + /** + * Encoding used to encode the returned digest. + * @default 'hex' + */ + outputEncoding?: BufferEncoding | "buffer" | undefined; + /** + * For XOF hash functions such as 'shake256', the outputLength option + * can be used to specify the desired output length in bytes. + */ + outputLength?: number | undefined; + } + interface OneShotDigestOptionsWithStringEncoding extends OneShotDigestOptions { + outputEncoding?: BufferEncoding | undefined; + } + interface OneShotDigestOptionsWithBufferEncoding extends OneShotDigestOptions { + outputEncoding: "buffer"; + } + /** + * A utility for creating one-shot hash digests of data. It can be faster than + * the object-based `crypto.createHash()` when hashing a smaller amount of data + * (<= 5MB) that's readily available. If the data can be big or if it is streamed, + * it's still recommended to use `crypto.createHash()` instead. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms` will + * display the available digest algorithms. + * + * If `options` is a string, then it specifies the `outputEncoding`. + * + * Example: + * + * ```js + * import crypto from 'node:crypto'; + * import { Buffer } from 'node:buffer'; + * + * // Hashing a string and return the result as a hex-encoded string. + * const string = 'Node.js'; + * // 10b3493287f831e81a438811a1ffba01f8cec4b7 + * console.log(crypto.hash('sha1', string)); + * + * // Encode a base64-encoded string into a Buffer, hash it and return + * // the result as a buffer. + * const base64 = 'Tm9kZS5qcw=='; + * // + * console.log(crypto.hash('sha1', Buffer.from(base64, 'base64'), 'buffer')); + * ``` + * @since v21.7.0, v20.12.0 + * @param data When `data` is a string, it will be encoded as UTF-8 before being hashed. If a different + * input encoding is desired for a string input, user could encode the string + * into a `TypedArray` using either `TextEncoder` or `Buffer.from()` and passing + * the encoded `TypedArray` into this API instead. + */ + function hash( + algorithm: string, + data: BinaryLike, + options?: OneShotDigestOptionsWithStringEncoding | BufferEncoding, + ): string; + function hash( + algorithm: string, + data: BinaryLike, + options: OneShotDigestOptionsWithBufferEncoding | "buffer", + ): NonSharedBuffer; + function hash( + algorithm: string, + data: BinaryLike, + options: OneShotDigestOptions | BufferEncoding | "buffer", + ): string | NonSharedBuffer; + type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts"; + interface CipherInfoOptions { + /** + * A test key length. + */ + keyLength?: number | undefined; + /** + * A test IV length. + */ + ivLength?: number | undefined; + } + interface CipherInfo { + name: string; + nid: number; + blockSize?: number; + ivLength?: number; + keyLength: number; + mode: CipherMode; + } + /** + * Returns information about a given cipher. + * + * Some ciphers accept variable length keys and initialization vectors. By default, + * the `crypto.getCipherInfo()` method will return the default values for these + * ciphers. To test if a given key length or iv length is acceptable for given + * cipher, use the `keyLength` and `ivLength` options. If the given values are + * unacceptable, `undefined` will be returned. + * @since v15.0.0 + * @param nameOrNid The name or nid of the cipher to query. + */ + function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined; + /** + * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. + * + * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an errors occurs while deriving the key, `err` will be set; + * otherwise `err` will be `null`. The successfully generated `derivedKey` will + * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any + * of the input arguments specify invalid values or types. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { + * hkdf, + * } = await import('node:crypto'); + * + * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => { + * if (err) throw err; + * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' + * }); + * ``` + * @since v15.0.0 + * @param digest The digest algorithm to use. + * @param ikm The input keying material. Must be provided but can be zero-length. + * @param salt The salt value. Must be provided but can be zero-length. + * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. + * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` + * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). + */ + function hkdf( + digest: string, + ikm: KeyLike, + salt: BinaryLike, + info: BinaryLike, + keylen: number, + callback: (err: Error | null, derivedKey: ArrayBuffer) => void, + ): void; + /** + * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The + * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. + * + * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). + * + * An error will be thrown if any of the input arguments specify invalid values or + * types, or if the derived key cannot be generated. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { + * hkdfSync, + * } = await import('node:crypto'); + * + * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64); + * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' + * ``` + * @since v15.0.0 + * @param digest The digest algorithm to use. + * @param ikm The input keying material. Must be provided but can be zero-length. + * @param salt The salt value. Must be provided but can be zero-length. + * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. + * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` + * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). + */ + function hkdfSync( + digest: string, + ikm: KeyLike, + salt: BinaryLike, + info: BinaryLike, + keylen: number, + ): ArrayBuffer; + interface SecureHeapUsage { + total: number; + min: number; + used: number; + utilization: number; + } + /** + * @since v15.6.0 + */ + function secureHeapUsed(): SecureHeapUsage; + interface RandomUUIDOptions { + /** + * By default, to improve performance, + * Node.js will pre-emptively generate and persistently cache enough + * random data to generate up to 128 random UUIDs. To generate a UUID + * without using the cache, set `disableEntropyCache` to `true`. + * @default `false` + */ + disableEntropyCache?: boolean | undefined; + } + interface RandomUUIDV7Options extends RandomUUIDOptions {} + type UUID = `${string}-${string}-${string}-${string}-${string}`; + /** + * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a + * cryptographic pseudorandom number generator. + * @since v15.6.0, v14.17.0 + */ + function randomUUID(options?: RandomUUIDOptions): UUID; + /** + * Generates a random [RFC 9562](https://www.rfc-editor.org/rfc/rfc9562.txt) version 7 UUID. The UUID contains a millisecond + * precision Unix timestamp in the most significant 48 bits, followed by + * cryptographically secure random bits for the remaining fields, making it + * suitable for use as a database key with time-based sorting. The embedded + * timestamp relies on a non-monotonic clock and is not guaranteed to be strictly + * increasing. + * @since v26.1.0 + */ + function randomUUIDv7(options?: RandomUUIDV7Options): UUID; + interface X509CheckOptions { + subject?: "always" | "default" | "never" | undefined; + wildcards?: boolean | undefined; + partialWildcards?: boolean | undefined; + multiLabelWildcards?: boolean | undefined; + singleLabelSubdomains?: boolean | undefined; + } + /** + * Encapsulates an X509 certificate and provides read-only access to + * its information. + * + * ```js + * const { X509Certificate } = await import('node:crypto'); + * + * const x509 = new X509Certificate('{... pem encoded cert ...}'); + * + * console.log(x509.subject); + * ``` + * @since v15.6.0 + */ + class X509Certificate { + /** + * Will be \`true\` if this is a Certificate Authority (CA) certificate. + * @since v15.6.0 + */ + readonly ca: boolean; + /** + * The SHA-1 fingerprint of this certificate. + * + * Because SHA-1 is cryptographically broken and because the security of SHA-1 is + * significantly worse than that of algorithms that are commonly used to sign + * certificates, consider using `x509.fingerprint256` instead. + * @since v15.6.0 + */ + readonly fingerprint: string; + /** + * The SHA-256 fingerprint of this certificate. + * @since v15.6.0 + */ + readonly fingerprint256: string; + /** + * The SHA-512 fingerprint of this certificate. + * + * Because computing the SHA-256 fingerprint is usually faster and because it is + * only half the size of the SHA-512 fingerprint, `x509.fingerprint256` may be + * a better choice. While SHA-512 presumably provides a higher level of security in + * general, the security of SHA-256 matches that of most algorithms that are + * commonly used to sign certificates. + * @since v17.2.0, v16.14.0 + */ + readonly fingerprint512: string; + /** + * The complete subject of this certificate. + * @since v15.6.0 + */ + readonly subject: string; + /** + * The subject alternative name specified for this certificate. + * + * This is a comma-separated list of subject alternative names. Each entry begins + * with a string identifying the kind of the subject alternative name followed by + * a colon and the value associated with the entry. + * + * Earlier versions of Node.js incorrectly assumed that it is safe to split this + * property at the two-character sequence `', '` (see [CVE-2021-44532](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532)). However, + * both malicious and legitimate certificates can contain subject alternative names + * that include this sequence when represented as a string. + * + * After the prefix denoting the type of the entry, the remainder of each entry + * might be enclosed in quotes to indicate that the value is a JSON string literal. + * For backward compatibility, Node.js only uses JSON string literals within this + * property when necessary to avoid ambiguity. Third-party code should be prepared + * to handle both possible entry formats. + * @since v15.6.0 + */ + readonly subjectAltName: string | undefined; + /** + * A textual representation of the certificate's authority information access + * extension. + * + * This is a line feed separated list of access descriptions. Each line begins with + * the access method and the kind of the access location, followed by a colon and + * the value associated with the access location. + * + * After the prefix denoting the access method and the kind of the access location, + * the remainder of each line might be enclosed in quotes to indicate that the + * value is a JSON string literal. For backward compatibility, Node.js only uses + * JSON string literals within this property when necessary to avoid ambiguity. + * Third-party code should be prepared to handle both possible entry formats. + * @since v15.6.0 + */ + readonly infoAccess: string | undefined; + /** + * An array detailing the key usages for this certificate. + * @since v15.6.0 + */ + readonly keyUsage: string[]; + /** + * The issuer identification included in this certificate. + * @since v15.6.0 + */ + readonly issuer: string; + /** + * The issuer certificate or `undefined` if the issuer certificate is not + * available. + * @since v15.9.0 + */ + readonly issuerCertificate: X509Certificate | undefined; + /** + * The public key `KeyObject` for this certificate. + * @since v15.6.0 + */ + readonly publicKey: KeyObject; + /** + * A `Buffer` containing the DER encoding of this certificate. + * @since v15.6.0 + */ + readonly raw: NonSharedBuffer; + /** + * The serial number of this certificate. + * + * Serial numbers are assigned by certificate authorities and do not uniquely + * identify certificates. Consider using `x509.fingerprint256` as a unique + * identifier instead. + * @since v15.6.0 + */ + readonly serialNumber: string; + /** + * The algorithm used to sign the certificate or `undefined` if the signature algorithm is unknown by OpenSSL. + * @since v24.9.0 + */ + readonly signatureAlgorithm: string | undefined; + /** + * The OID of the algorithm used to sign the certificate. + * @since v24.9.0 + */ + readonly signatureAlgorithmOid: string; + /** + * The date/time from which this certificate is considered valid. + * @since v15.6.0 + */ + readonly validFrom: string; + /** + * The date/time from which this certificate is valid, encapsulated in a `Date` object. + * @since v22.10.0 + */ + readonly validFromDate: Date; + /** + * The date/time until which this certificate is considered valid. + * @since v15.6.0 + */ + readonly validTo: string; + /** + * The date/time until which this certificate is valid, encapsulated in a `Date` object. + * @since v22.10.0 + */ + readonly validToDate: Date; + constructor(buffer: string | NodeJS.ArrayBufferView); + /** + * Checks whether the certificate matches the given email address. + * + * If the `'subject'` option is undefined or set to `'default'`, the certificate + * subject is only considered if the subject alternative name extension either does + * not exist or does not contain any email addresses. + * + * If the `'subject'` option is set to `'always'` and if the subject alternative + * name extension either does not exist or does not contain a matching email + * address, the certificate subject is considered. + * + * If the `'subject'` option is set to `'never'`, the certificate subject is never + * considered, even if the certificate contains no subject alternative names. + * @since v15.6.0 + * @return Returns `email` if the certificate matches, `undefined` if it does not. + */ + checkEmail(email: string, options?: Pick): string | undefined; + /** + * Checks whether the certificate matches the given host name. + * + * If the certificate matches the given host name, the matching subject name is + * returned. The returned name might be an exact match (e.g., `foo.example.com`) + * or it might contain wildcards (e.g., `*.example.com`). Because host name + * comparisons are case-insensitive, the returned subject name might also differ + * from the given `name` in capitalization. + * + * If the `'subject'` option is undefined or set to `'default'`, the certificate + * subject is only considered if the subject alternative name extension either does + * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS"). + * + * If the `'subject'` option is set to `'always'` and if the subject alternative + * name extension either does not exist or does not contain a matching DNS name, + * the certificate subject is considered. + * + * If the `'subject'` option is set to `'never'`, the certificate subject is never + * considered, even if the certificate contains no subject alternative names. + * @since v15.6.0 + * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`. + */ + checkHost(name: string, options?: X509CheckOptions): string | undefined; + /** + * Checks whether the certificate matches the given IP address (IPv4 or IPv6). + * + * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they + * must match the given `ip` address exactly. Other subject alternative names as + * well as the subject field of the certificate are ignored. + * @since v15.6.0 + * @return Returns `ip` if the certificate matches, `undefined` if it does not. + */ + checkIP(ip: string): string | undefined; + /** + * Checks whether this certificate was potentially issued by the given `otherCert` + * by comparing the certificate metadata. + * + * This is useful for pruning a list of possible issuer certificates which have been + * selected using a more rudimentary filtering routine, i.e. just based on subject + * and issuer names. + * + * Finally, to verify that this certificate's signature was produced by a private key + * corresponding to `otherCert`'s public key use `x509.verify(publicKey)` + * with `otherCert`'s public key represented as a `KeyObject` + * like so + * + * ```js + * if (!x509.verify(otherCert.publicKey)) { + * throw new Error('otherCert did not issue x509'); + * } + * ``` + * @since v15.6.0 + */ + checkIssued(otherCert: X509Certificate): boolean; + /** + * Checks whether the public key for this certificate is consistent with + * the given private key. + * @since v15.6.0 + * @param privateKey A private key. + */ + checkPrivateKey(privateKey: KeyObject): boolean; + /** + * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded + * certificate. + * @since v15.6.0 + */ + toJSON(): string; + /** + * Returns information about this certificate using the legacy `certificate object` encoding. + * @since v15.6.0 + */ + toLegacyObject(): PeerCertificate; + /** + * Returns the PEM-encoded certificate. + * @since v15.6.0 + */ + toString(): string; + /** + * Verifies that this certificate was signed by the given public key. + * Does not perform any other validation checks on the certificate. + * @since v15.6.0 + * @param publicKey A public key. + */ + verify(publicKey: KeyObject): boolean; + } + type LargeNumberLike = ArrayBufferLike | NodeJS.ArrayBufferView | bigint; + interface GeneratePrimeOptions { + add?: LargeNumberLike | undefined; + rem?: LargeNumberLike | undefined; + safe?: boolean | undefined; + bigint?: boolean | undefined; + } + interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions { + bigint: true; + } + interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions { + bigint?: false | undefined; + } + /** + * Generates a pseudorandom prime of `size` bits. + * + * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime. + * + * The `options.add` and `options.rem` parameters can be used to enforce additional + * requirements, e.g., for Diffie-Hellman: + * + * * If `options.add` and `options.rem` are both set, the prime will satisfy the + * condition that `prime % add = rem`. + * * If only `options.add` is set and `options.safe` is not `true`, the prime will + * satisfy the condition that `prime % add = 1`. + * * If only `options.add` is set and `options.safe` is set to `true`, the prime + * will instead satisfy the condition that `prime % add = 3`. This is necessary + * because `prime % add = 1` for `options.add > 2` would contradict the condition + * enforced by `options.safe`. + * * `options.rem` is ignored if `options.add` is not given. + * + * Both `options.add` and `options.rem` must be encoded as big-endian sequences + * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`. + * + * By default, the prime is encoded as a big-endian sequence of octets + * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. + * @since v15.8.0 + * @param size The size (in bits) of the prime to generate. + */ + function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void; + function generatePrime( + size: number, + options: GeneratePrimeOptionsArrayBuffer, + callback: (err: Error | null, prime: ArrayBuffer) => void, + ): void; + function generatePrime( + size: number, + options: GeneratePrimeOptionsBigInt, + callback: (err: Error | null, prime: bigint) => void, + ): void; + function generatePrime( + size: number, + options: GeneratePrimeOptions, + callback: (err: Error | null, prime: ArrayBuffer | bigint) => void, + ): void; + /** + * Generates a pseudorandom prime of `size` bits. + * + * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime. + * + * The `options.add` and `options.rem` parameters can be used to enforce additional + * requirements, e.g., for Diffie-Hellman: + * + * * If `options.add` and `options.rem` are both set, the prime will satisfy the + * condition that `prime % add = rem`. + * * If only `options.add` is set and `options.safe` is not `true`, the prime will + * satisfy the condition that `prime % add = 1`. + * * If only `options.add` is set and `options.safe` is set to `true`, the prime + * will instead satisfy the condition that `prime % add = 3`. This is necessary + * because `prime % add = 1` for `options.add > 2` would contradict the condition + * enforced by `options.safe`. + * * `options.rem` is ignored if `options.add` is not given. + * + * Both `options.add` and `options.rem` must be encoded as big-endian sequences + * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`. + * + * By default, the prime is encoded as a big-endian sequence of octets + * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. + * @since v15.8.0 + * @param size The size (in bits) of the prime to generate. + */ + function generatePrimeSync(size: number): ArrayBuffer; + function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer; + function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint; + function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint; + interface CheckPrimeOptions { + /** + * The number of Miller-Rabin probabilistic primality iterations to perform. + * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most `2**-64` for random input. + * Care must be used when selecting a number of checks. + * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details. + * @default 0 + */ + checks?: number | undefined; + } + /** + * Checks the primality of the `candidate`. + * @since v15.8.0 + * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. + */ + function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void; + function checkPrime( + value: LargeNumberLike, + options: CheckPrimeOptions, + callback: (err: Error | null, result: boolean) => void, + ): void; + /** + * Checks the primality of the `candidate`. + * @since v15.8.0 + * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. + * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`. + */ + function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean; + /** + * Load and set the `engine` for some or all OpenSSL functions (selected by flags). + * + * `engine` could be either an id or a path to the engine's shared library. + * + * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. The `flags` is a bit field taking one of or a mix of the following flags (defined in `crypto.constants`): + * + * * `crypto.constants.ENGINE_METHOD_RSA` + * * `crypto.constants.ENGINE_METHOD_DSA` + * * `crypto.constants.ENGINE_METHOD_DH` + * * `crypto.constants.ENGINE_METHOD_RAND` + * * `crypto.constants.ENGINE_METHOD_EC` + * * `crypto.constants.ENGINE_METHOD_CIPHERS` + * * `crypto.constants.ENGINE_METHOD_DIGESTS` + * * `crypto.constants.ENGINE_METHOD_PKEY_METHS` + * * `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS` + * * `crypto.constants.ENGINE_METHOD_ALL` + * * `crypto.constants.ENGINE_METHOD_NONE` + * @since v0.11.11 + * @param flags + */ + function setEngine(engine: string, flags?: number): void; + /** + * A convenient alias for {@link webcrypto.getRandomValues}. This + * implementation is not compliant with the Web Crypto spec, to write + * web-compatible code use {@link webcrypto.getRandomValues} instead. + * @since v17.4.0 + * @return Returns `typedArray`. + */ + function getRandomValues< + T extends Exclude< + NodeJS.NonSharedTypedArray, + NodeJS.NonSharedFloat16Array | NodeJS.NonSharedFloat32Array | NodeJS.NonSharedFloat64Array + >, + >(typedArray: T): T; + type Argon2Algorithm = "argon2d" | "argon2i" | "argon2id"; + interface Argon2Parameters { + message: BinaryLike; + nonce: BinaryLike; + parallelism: number; + tagLength: number; + memory: number; + passes: number; + secret?: BinaryLike | undefined; + associatedData?: BinaryLike | undefined; + } + /** + * Provides an asynchronous [Argon2](https://www.rfc-editor.org/rfc/rfc9106.html) implementation. Argon2 is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `nonce` should be as unique as possible. It is recommended that a nonce is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `message`, `nonce`, `secret` or `associatedData`, please + * consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-v26.x/api/crypto.html#using-strings-as-inputs-to-cryptographic-apis). + * + * The `callback` function is called with two arguments: `err` and `derivedKey`. + * `err` is an exception object when key derivation fails, otherwise `err` is + * `null`. `derivedKey` is passed to the callback as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { argon2, randomBytes } = await import('node:crypto'); + * + * const parameters = { + * message: 'password', + * nonce: randomBytes(16), + * parallelism: 4, + * tagLength: 64, + * memory: 65536, + * passes: 3, + * }; + * + * argon2('argon2id', parameters, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // 'af91dad...9520f15' + * }); + * ``` + * @since v24.7.0 + * @param algorithm Variant of Argon2, one of `"argon2d"`, `"argon2i"` or `"argon2id"`. + */ + function argon2( + algorithm: Argon2Algorithm, + parameters: Argon2Parameters, + callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, + ): void; + /** + * Provides a synchronous [Argon2][] implementation. Argon2 is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `nonce` should be as unique as possible. It is recommended that a nonce is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `message`, `nonce`, `secret` or `associatedData`, please + * consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-v26.x/api/crypto.html#using-strings-as-inputs-to-cryptographic-apis). + * + * An exception is thrown when key derivation fails, otherwise the derived key is + * returned as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { argon2Sync, randomBytes } = await import('node:crypto'); + * + * const parameters = { + * message: 'password', + * nonce: randomBytes(16), + * parallelism: 4, + * tagLength: 64, + * memory: 65536, + * passes: 3, + * }; + * + * const derivedKey = argon2Sync('argon2id', parameters); + * console.log(derivedKey.toString('hex')); // 'af91dad...9520f15' + * ``` + * @since v24.7.0 + */ + function argon2Sync(algorithm: Argon2Algorithm, parameters: Argon2Parameters): NonSharedBuffer; + /** + * A convenient alias for `crypto.webcrypto.subtle`. + * @since v17.4.0 + */ + const subtle: webcrypto.SubtleCrypto; + /** + * An implementation of the Web Crypto API standard. + * + * See the {@link https://nodejs.org/docs/latest/api/webcrypto.html Web Crypto API documentation} for details. + * @since v15.0.0 + */ + const webcrypto: webcrypto.Crypto; + namespace webcrypto { + type AlgorithmIdentifier = Algorithm | string; + type BigInteger = NodeJS.NonSharedUint8Array; + type KeyFormat = "jwk" | "pkcs8" | "raw" | "raw-public" | "raw-secret" | "raw-seed" | "spki"; + type KeyType = "private" | "public" | "secret"; + type KeyUsage = + | "decapsulateBits" + | "decapsulateKey" + | "decrypt" + | "deriveBits" + | "deriveKey" + | "encapsulateBits" + | "encapsulateKey" + | "encrypt" + | "sign" + | "unwrapKey" + | "verify" + | "wrapKey"; + type HashAlgorithmIdentifier = AlgorithmIdentifier; + type NamedCurve = string; + interface AeadParams extends Algorithm { + additionalData?: NodeJS.BufferSource; + iv: NodeJS.BufferSource; + tagLength: number; + } + interface AesCbcParams extends Algorithm { + iv: NodeJS.BufferSource; + } + interface AesCtrParams extends Algorithm { + counter: NodeJS.BufferSource; + length: number; + } + interface AesDerivedKeyParams extends Algorithm { + length: number; + } + interface AesKeyAlgorithm extends KeyAlgorithm { + length: number; + } + interface AesKeyGenParams extends Algorithm { + length: number; + } + interface Algorithm { + name: string; + } + interface Argon2Params extends Algorithm { + associatedData?: NodeJS.BufferSource; + memory: number; + nonce: NodeJS.BufferSource; + parallelism: number; + passes: number; + secretValue?: NodeJS.BufferSource; + version?: number; + } + interface CShakeParams extends Algorithm { + customization?: NodeJS.BufferSource; + functionName?: NodeJS.BufferSource; + outputLength: number; + } + interface ContextParams extends Algorithm { + context?: NodeJS.BufferSource; + } + interface EcKeyAlgorithm extends KeyAlgorithm { + namedCurve: NamedCurve; + } + interface EcKeyGenParams extends Algorithm { + namedCurve: NamedCurve; + } + interface EcKeyImportParams extends Algorithm { + namedCurve: NamedCurve; + } + interface EcdhKeyDeriveParams extends Algorithm { + public: CryptoKey; + } + interface EcdsaParams extends Algorithm { + hash: HashAlgorithmIdentifier; + } + interface HkdfParams extends Algorithm { + hash: HashAlgorithmIdentifier; + info: NodeJS.BufferSource; + salt: NodeJS.BufferSource; + } + interface HmacImportParams extends Algorithm { + hash: HashAlgorithmIdentifier; + length?: number; + } + interface HmacKeyAlgorithm extends KeyAlgorithm { + hash: KeyAlgorithm; + length: number; + } + interface HmacKeyGenParams extends Algorithm { + hash: HashAlgorithmIdentifier; + length?: number; + } + interface KangarooTwelveParams extends Algorithm { + customization?: NodeJS.BufferSource; + outputLength: number; + } + interface JsonWebKey { + alg?: string; + crv?: string; + d?: string; + dp?: string; + dq?: string; + e?: string; + ext?: boolean; + k?: string; + key_ops?: string[]; + kty?: string; + n?: string; + oth?: RsaOtherPrimesInfo[]; + p?: string; + q?: string; + qi?: string; + use?: string; + x?: string; + y?: string; + } + interface KeyAlgorithm { + name: string; + } + interface KmacImportParams extends Algorithm { + length?: number; + } + interface KmacKeyAlgorithm extends KeyAlgorithm { + length: number; + } + interface KmacKeyGenParams extends Algorithm { + length?: number; + } + interface KmacParams extends Algorithm { + customization?: NodeJS.BufferSource; + outputLength: number; + } + interface Pbkdf2Params extends Algorithm { + hash: HashAlgorithmIdentifier; + iterations: number; + salt: NodeJS.BufferSource; + } + interface RsaHashedImportParams extends Algorithm { + hash: HashAlgorithmIdentifier; + } + interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm { + hash: KeyAlgorithm; + } + interface RsaHashedKeyGenParams extends RsaKeyGenParams { + hash: HashAlgorithmIdentifier; + } + interface RsaKeyAlgorithm extends KeyAlgorithm { + modulusLength: number; + publicExponent: BigInteger; + } + interface RsaKeyGenParams extends Algorithm { + modulusLength: number; + publicExponent: BigInteger; + } + interface RsaOaepParams extends Algorithm { + label?: NodeJS.BufferSource; + } + interface RsaOtherPrimesInfo { + d?: string; + r?: string; + t?: string; + } + interface RsaPssParams extends Algorithm { + saltLength: number; + } + interface TurboShakeParams extends Algorithm { + domainSeparation?: number; + outputLength: number; + } + interface Crypto { + readonly subtle: SubtleCrypto; + getRandomValues< + T extends Exclude< + NodeJS.NonSharedTypedArray, + NodeJS.NonSharedFloat16Array | NodeJS.NonSharedFloat32Array | NodeJS.NonSharedFloat64Array + >, + >( + typedArray: T, + ): T; + randomUUID(): UUID; + } + interface CryptoKey { + readonly algorithm: KeyAlgorithm; + readonly extractable: boolean; + readonly type: KeyType; + readonly usages: KeyUsage[]; + } + interface CryptoKeyPair { + privateKey: CryptoKey; + publicKey: CryptoKey; + } + interface EncapsulatedBits { + sharedKey: ArrayBuffer; + ciphertext: ArrayBuffer; + } + interface EncapsulatedKey { + sharedKey: CryptoKey; + ciphertext: ArrayBuffer; + } + interface SubtleCrypto { + decapsulateBits( + decapsulationAlgorithm: AlgorithmIdentifier, + decapsulationKey: CryptoKey, + ciphertext: NodeJS.BufferSource, + ): Promise; + decapsulateKey( + decapsulationAlgorithm: AlgorithmIdentifier, + decapsulationKey: CryptoKey, + ciphertext: NodeJS.BufferSource, + sharedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | AesDerivedKeyParams | KmacImportParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + decrypt( + algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, + key: CryptoKey, + data: NodeJS.BufferSource, + ): Promise; + deriveBits( + algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params, + baseKey: CryptoKey, + length?: number | null, + ): Promise; + deriveKey( + algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params, + baseKey: CryptoKey, + derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | KmacImportParams, + extractable: boolean, + keyUsages: readonly KeyUsage[], + ): Promise; + digest( + algorithm: AlgorithmIdentifier | CShakeParams | TurboShakeParams | KangarooTwelveParams, + data: NodeJS.BufferSource, + ): Promise; + encapsulateBits( + encapsulationAlgorithm: AlgorithmIdentifier, + encapsulationKey: CryptoKey, + ): Promise; + encapsulateKey( + encapsulationAlgorithm: AlgorithmIdentifier, + encapsulationKey: CryptoKey, + sharedKeyAlgorithm: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | KmacImportParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + encrypt( + algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, + key: CryptoKey, + data: NodeJS.BufferSource, + ): Promise; + exportKey(format: "jwk", key: CryptoKey): Promise; + exportKey(format: Exclude, key: CryptoKey): Promise; + exportKey(format: KeyFormat, key: CryptoKey): Promise; + generateKey( + algorithm: RsaHashedKeyGenParams | EcKeyGenParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + generateKey( + algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params | KmacKeyGenParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + generateKey( + algorithm: AlgorithmIdentifier, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + getPublicKey(key: CryptoKey, keyUsages: KeyUsage[]): Promise; + importKey( + format: "jwk", + keyData: JsonWebKey, + algorithm: + | AlgorithmIdentifier + | RsaHashedImportParams + | EcKeyImportParams + | HmacImportParams + | AesKeyAlgorithm + | KmacImportParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + importKey( + format: Exclude, + keyData: NodeJS.BufferSource, + algorithm: + | AlgorithmIdentifier + | RsaHashedImportParams + | EcKeyImportParams + | HmacImportParams + | AesKeyAlgorithm + | KmacImportParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + sign( + algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | ContextParams | KmacParams, + key: CryptoKey, + data: NodeJS.BufferSource, + ): Promise; + unwrapKey( + format: KeyFormat, + wrappedKey: NodeJS.BufferSource, + unwrappingKey: CryptoKey, + unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, + unwrappedKeyAlgorithm: + | AlgorithmIdentifier + | RsaHashedImportParams + | EcKeyImportParams + | HmacImportParams + | AesKeyAlgorithm + | KmacImportParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + verify( + algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | ContextParams | KmacParams, + key: CryptoKey, + signature: NodeJS.BufferSource, + data: NodeJS.BufferSource, + ): Promise; + wrapKey( + format: KeyFormat, + key: CryptoKey, + wrappingKey: CryptoKey, + wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, + ): Promise; + } + } + /** + * An object containing commonly used constants for crypto and security related + * operations. The specific constants currently defined are described in + * [Crypto constants](https://nodejs.org/docs/latest-v26.x/api/crypto.html#crypto-constants). + * @since v6.3.0 + */ + namespace constants { + const OPENSSL_VERSION_NUMBER: number; + const SSL_OP_ALL: number; + const SSL_OP_ALLOW_NO_DHE_KEX: number; + const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; + const SSL_OP_CIPHER_SERVER_PREFERENCE: number; + const SSL_OP_CISCO_ANYCONNECT: number; + const SSL_OP_COOKIE_EXCHANGE: number; + const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; + const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; + const SSL_OP_LEGACY_SERVER_CONNECT: number; + const SSL_OP_NO_COMPRESSION: number; + const SSL_OP_NO_ENCRYPT_THEN_MAC: number; + const SSL_OP_NO_QUERY_MTU: number; + const SSL_OP_NO_RENEGOTIATION: number; + const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; + const SSL_OP_NO_SSLv2: number; + const SSL_OP_NO_SSLv3: number; + const SSL_OP_NO_TICKET: number; + const SSL_OP_NO_TLSv1: number; + const SSL_OP_NO_TLSv1_1: number; + const SSL_OP_NO_TLSv1_2: number; + const SSL_OP_NO_TLSv1_3: number; + const SSL_OP_PRIORITIZE_CHACHA: number; + const SSL_OP_TLS_ROLLBACK_BUG: number; + const ENGINE_METHOD_RSA: number; + const ENGINE_METHOD_DSA: number; + const ENGINE_METHOD_DH: number; + const ENGINE_METHOD_RAND: number; + const ENGINE_METHOD_EC: number; + const ENGINE_METHOD_CIPHERS: number; + const ENGINE_METHOD_DIGESTS: number; + const ENGINE_METHOD_PKEY_METHS: number; + const ENGINE_METHOD_PKEY_ASN1_METHS: number; + const ENGINE_METHOD_ALL: number; + const ENGINE_METHOD_NONE: number; + const DH_CHECK_P_NOT_SAFE_PRIME: number; + const DH_CHECK_P_NOT_PRIME: number; + const DH_UNABLE_TO_CHECK_GENERATOR: number; + const DH_NOT_SUITABLE_GENERATOR: number; + const RSA_PKCS1_PADDING: number; + const RSA_NO_PADDING: number; + const RSA_PKCS1_OAEP_PADDING: number; + const RSA_X931_PADDING: number; + const RSA_PKCS1_PSS_PADDING: number; + const RSA_PSS_SALTLEN_DIGEST: number; + const RSA_PSS_SALTLEN_MAX_SIGN: number; + const RSA_PSS_SALTLEN_AUTO: number; + const TLS1_VERSION: number; + const TLS1_1_VERSION: number; + const TLS1_2_VERSION: number; + const TLS1_3_VERSION: number; + const POINT_CONVERSION_COMPRESSED: number; + const POINT_CONVERSION_UNCOMPRESSED: number; + const POINT_CONVERSION_HYBRID: number; + const defaultCipherList: string; + const defaultCoreCipherList: string; + } + // TODO: remove in future major version + /** @deprecated This type will be removed in a future version. Use `BufferEncoding` instead. */ + type BinaryToTextEncoding = "base64" | "base64url" | "hex" | "binary"; + /** @deprecated This type will be removed in a future version. Use `BufferEncoding` instead. */ + type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "utf-16le" | "latin1"; + /** @deprecated This type will be removed in a future version. Use `BufferEncoding` instead. */ + type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2"; + /** @deprecated This type will be removed in a future version. Use `BufferEncoding` instead. */ + type Encoding = BufferEncoding; + /** @deprecated This type will be removed in a future version. Use `KeyLike` instead. */ + type CipherKey = KeyLike; + /** @deprecated This type will be removed in a future version. */ + interface RsaPrivateKey { + key: KeyLike; + passphrase?: string | undefined; + oaepHash?: string | undefined; + oaepLabel?: NodeJS.TypedArray | undefined; + padding?: number | undefined; + } + /** @deprecated This type will be removed in a future version. */ + interface RsaPublicKey { + key: KeyLike; + padding?: number | undefined; + } +} +declare module "crypto" { + export * from "node:crypto"; +} diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts new file mode 100644 index 0000000..ca8586a --- /dev/null +++ b/node_modules/@types/node/dgram.d.ts @@ -0,0 +1,652 @@ +declare module "node:dgram" { + import { NonSharedBuffer } from "node:buffer"; + import * as dns from "node:dns"; + import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; + import { AddressInfo, BlockList } from "node:net"; + interface RemoteInfo { + address: string; + family: "IPv4" | "IPv6"; + port: number; + size: number; + } + interface BindOptions { + port?: number | undefined; + address?: string | undefined; + exclusive?: boolean | undefined; + fd?: number | undefined; + } + interface BindSyncOptions { + port?: number | undefined; + address?: string | undefined; + } + type SocketType = "udp4" | "udp6"; + interface SocketOptions extends Abortable { + type: SocketType; + reuseAddr?: boolean | undefined; + reusePort?: boolean | undefined; + /** + * @default false + */ + ipv6Only?: boolean | undefined; + recvBufferSize?: number | undefined; + sendBufferSize?: number | undefined; + lookup?: + | (( + hostname: string, + options: dns.LookupOneOptions, + callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, + ) => void) + | undefined; + receiveBlockList?: BlockList | undefined; + sendBlockList?: BlockList | undefined; + } + /** + * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram + * messages. When `address` and `port` are not passed to `socket.bind()` the + * method will bind the socket to the "all interfaces" address on a random port + * (it does the right thing for both `udp4` and `udp6` sockets). The bound address + * and port can be retrieved using `socket.address().address` and `socket.address().port`. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.close()` on the socket: + * + * ```js + * const controller = new AbortController(); + * const { signal } = controller; + * const server = dgram.createSocket({ type: 'udp4', signal }); + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * // Later, when you want to close the server. + * controller.abort(); + * ``` + * @since v0.11.13 + * @param options Available options are: + * @param callback Attached as a listener for `'message'` events. Optional. + */ + function createSocket(type: SocketType, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket; + function createSocket(options: SocketOptions, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket; + interface SocketEventMap { + "close": []; + "connect": []; + "error": [err: Error]; + "listening": []; + "message": [msg: NonSharedBuffer, rinfo: RemoteInfo]; + } + /** + * Encapsulates the datagram functionality. + * + * New instances of `dgram.Socket` are created using {@link createSocket}. + * The `new` keyword is not to be used to create `dgram.Socket` instances. + * @since v0.1.99 + */ + class Socket implements EventEmitter { + /** + * Tells the kernel to join a multicast group at the given `multicastAddress` and `multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the `multicastInterface` argument is not + * specified, the operating system will choose + * one interface and will add membership to it. To add membership to every + * available interface, call `addMembership` multiple times, once per interface. + * + * When called on an unbound socket, this method will implicitly bind to a random + * port, listening on all interfaces. + * + * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur: + * + * ```js + * import cluster from 'node:cluster'; + * import dgram from 'node:dgram'; + * + * if (cluster.isPrimary) { + * cluster.fork(); // Works ok. + * cluster.fork(); // Fails with EADDRINUSE. + * } else { + * const s = dgram.createSocket('udp4'); + * s.bind(1234, () => { + * s.addMembership('224.0.0.114'); + * }); + * } + * ``` + * @since v0.6.9 + */ + addMembership(multicastAddress: string, multicastInterface?: string): void; + /** + * Returns an object containing the address information for a socket. + * For UDP sockets, this object will contain `address`, `family`, and `port` properties. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.1.99 + */ + address(): AddressInfo; + /** + * For UDP sockets, causes the `dgram.Socket` to listen for datagram + * messages on a named `port` and optional `address`. If `port` is not + * specified or is `0`, the operating system will attempt to bind to a + * random port. If `address` is not specified, the operating system will + * attempt to listen on all addresses. Once binding is complete, a + * `'listening'` event is emitted and the optional `callback` function is + * called. + * + * Specifying both a `'listening'` event listener and passing a + * `callback` to the `socket.bind()` method is not harmful but not very + * useful. + * + * A bound datagram socket keeps the Node.js process running to receive + * datagram messages. + * + * If binding fails, an `'error'` event is generated. In rare case (e.g. + * attempting to bind with a closed socket), an `Error` may be thrown. + * + * Example of a UDP server listening on port 41234: + * + * ```js + * import dgram from 'node:dgram'; + * + * const server = dgram.createSocket('udp4'); + * + * server.on('error', (err) => { + * console.error(`server error:\n${err.stack}`); + * server.close(); + * }); + * + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * + * server.on('listening', () => { + * const address = server.address(); + * console.log(`server listening ${address.address}:${address.port}`); + * }); + * + * server.bind(41234); + * // Prints: server listening 0.0.0.0:41234 + * ``` + * @since v0.1.99 + * @param callback with no parameters. Called when binding is complete. + */ + bind(port?: number, address?: string, callback?: () => void): this; + bind(port: number, callback: () => void): this; + bind(callback: () => void): this; + /** + * For UDP sockets, causes the `dgram.Socket` to listen for datagram + * messages on a named `port` and optional `address` that are passed as + * properties of an `options` object passed as the first argument. If + * `port` is not specified or is `0`, the operating system will attempt + * to bind to a random port. If `address` is not specified, the operating + * system will attempt to listen on all addresses. Once binding is + * complete, a `'listening'` event is emitted and the optional `callback` + * function is called. + * + * The `options` object may contain a `fd` property. When a `fd` greater + * than `0` is set, it will wrap around an existing socket with the given + * file descriptor. In this case, the properties of `port` and `address` + * will be ignored. + * + * Specifying both a `'listening'` event listener and passing a + * `callback` to the `socket.bind()` method is not harmful but not very + * useful. + * + * The `options` object may contain an additional `exclusive` property that is + * used when using `dgram.Socket` objects with the [`cluster`](https://nodejs.org/docs/latest-v26.x/api/cluster.html) module. When + * `exclusive` is set to `false` (the default), cluster workers will use the same + * underlying socket handle allowing connection handling duties to be shared. + * When `exclusive` is `true`, however, the handle is not shared and attempted + * port sharing results in an error. Creating a `dgram.Socket` with the `reusePort` + * option set to `true` causes `exclusive` to always be `true` when `socket.bind()` + * is called. + * + * A bound datagram socket keeps the Node.js process running to receive + * datagram messages. + * + * If binding fails, an `'error'` event is generated. In rare case (e.g. + * attempting to bind with a closed socket), an `Error` may be thrown. + * + * An example socket listening on an exclusive port is shown below. + * + * ```js + * socket.bind({ + * address: 'localhost', + * port: 8000, + * exclusive: true, + * }); + * ``` + * @since v0.11.14 + * @param options Required. Supports the following properties: + */ + bind(options: BindOptions, callback?: () => void): this; + /** + * The synchronous counterpart of `socket.bind()`. `bind(2)` is a local, + * non-blocking system call, so the bind is performed inline and the resolved + * address is returned immediately, including the operating-system-assigned + * ephemeral port when `port` is `0`: + * + * ```js + * const dgram = require('node:dgram'); + * + * const socket = dgram.createSocket('udp4'); + * const address = socket.bindSync({ address: '0.0.0.0', port: 0 }); + * console.log(address); // e.g. { address: '0.0.0.0', family: 'IPv4', port: 53124 } + * ``` + * + * A bind failure such as `EADDRINUSE` is thrown synchronously rather than emitted + * as an `'error'` event. After `bindSync()` returns, `socket.address()` is + * valid synchronously and the `'listening'` event is emitted on the next tick. + * + * `address` must be a numeric IP literal; `bindSync()` never performs DNS + * resolution (asynchronous name resolution being the only genuinely blocking part + * of binding). Incoming datagrams continue to be delivered asynchronously via the + * `'message'` event. `bindSync()` always binds the socket's own handle and + * does not participate in [`cluster`](https://nodejs.org/docs/latest-v26.x/api/cluster.html) handle sharing. + * @since v26.4.0 + * @returns The bound address as returned by `socket.address()`. + */ + bindSync(options?: BindSyncOptions): AddressInfo; + /** + * Close the underlying socket and stop listening for data on it. If a callback is + * provided, it is added as a listener for the `'close'` event. + * @since v0.1.99 + * @param callback Called when the socket has been closed. + */ + close(callback?: () => void): this; + /** + * Associates the `dgram.Socket` to a remote address and port. Every + * message sent by this handle is automatically sent to that destination. Also, + * the socket will only receive messages from that remote peer. + * Trying to call `connect()` on an already connected socket will result + * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not + * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) + * will be used by default. Once the connection is complete, a `'connect'` event + * is emitted and the optional `callback` function is called. In case of failure, + * the `callback` is called or, failing this, an `'error'` event is emitted. + * @since v12.0.0 + * @param callback Called when the connection is completed or on error. + */ + connect(port: number, address?: string, callback?: () => void): void; + connect(port: number, callback: () => void): void; + /** + * The synchronous counterpart of `socket.connect()`. For a UDP socket + * `connect(2)` only records the default peer address and is a local, non-blocking + * system call, so the association is performed inline. Any error raised by the + * call itself (for example `EAFNOSUPPORT` for a mismatched address family) is + * thrown synchronously rather than reported via the `'error'` event. Because + * `connect(2)` does not probe reachability, errors such as `ECONNREFUSED` are + * still surfaced asynchronously on a later send or receive, exactly as for + * `socket.connect()`: + * + * ```js + * const dgram = require('node:dgram'); + * + * const socket = dgram.createSocket('udp4'); + * socket.connectSync(41234, '127.0.0.1'); + * console.log(socket.remoteAddress()); // { address: '127.0.0.1', family: 'IPv4', port: 41234 } + * ``` + * + * If the socket is still unbound it is bound synchronously first. After + * `connectSync()` returns, `socket.remoteAddress()` is valid synchronously + * and the `'connect'` event is emitted on the next tick. Trying to call + * `connectSync()` on an already connected socket throws an + * `ERR_SOCKET_DGRAM_IS_CONNECTED` exception, and calling it while an + * asynchronous `socket.bind()` is still in progress throws an + * `ERR_SOCKET_ALREADY_BOUND` exception. + * + * `address` must be a numeric IP literal; `connectSync()` never performs DNS + * resolution (asynchronous name resolution being the only genuinely blocking part + * of connecting). + * @since v26.4.0 + * @param address A numeric IP address to connect to. Unlike + * `socket.connect()`, no DNS resolution is performed, so a host name is not + * accepted. If omitted, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for + * `udp6` sockets) is used. + */ + connectSync(port: number, address?: string): void; + /** + * A synchronous function that disassociates a connected `dgram.Socket` from + * its remote address. Trying to call `disconnect()` on an unbound or already + * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception. + * @since v12.0.0 + */ + disconnect(): void; + /** + * Instructs the kernel to leave a multicast group at `multicastAddress` using the `IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the + * kernel when the socket is closed or the process terminates, so most apps will + * never have reason to call this. + * + * If `multicastInterface` is not specified, the operating system will attempt to + * drop membership on all valid interfaces. + * @since v0.6.9 + */ + dropMembership(multicastAddress: string, multicastInterface?: string): void; + /** + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + * @return the `SO_RCVBUF` socket receive buffer size in bytes. + */ + getRecvBufferSize(): number; + /** + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + * @return the `SO_SNDBUF` socket send buffer size in bytes. + */ + getSendBufferSize(): number; + /** + * @since v18.8.0, v16.19.0 + * @return Number of bytes queued for sending. + */ + getSendQueueSize(): number; + /** + * @since v18.8.0, v16.19.0 + * @return Number of send requests currently in the queue awaiting to be processed. + */ + getSendQueueCount(): number; + /** + * By default, binding a socket will cause it to block the Node.js process from + * exiting as long as the socket is open. The `socket.unref()` method can be used + * to exclude the socket from the reference counting that keeps the Node.js + * process active. The `socket.ref()` method adds the socket back to the reference + * counting and restores the default behavior. + * + * Calling `socket.ref()` multiples times will have no additional effect. + * + * The `socket.ref()` method returns a reference to the socket so calls can be + * chained. + * @since v0.9.1 + */ + ref(): this; + /** + * Returns an object containing the `address`, `family`, and `port` of the remote + * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception + * if the socket is not connected. + * @since v12.0.0 + */ + remoteAddress(): AddressInfo; + /** + * Broadcasts a datagram on the socket. + * For connectionless sockets, the destination `port` and `address` must be + * specified. Connected sockets, on the other hand, will use their associated + * remote endpoint, so the `port` and `address` arguments must not be set. + * + * The `msg` argument contains the message to be sent. + * Depending on its type, different behavior can apply. If `msg` is a `Buffer`, + * any `TypedArray` or a `DataView`, + * the `offset` and `length` specify the offset within the `Buffer` where the + * message begins and the number of bytes in the message, respectively. + * If `msg` is a `String`, then it is automatically converted to a `Buffer` with `'utf8'` encoding. With messages that + * contain multi-byte characters, `offset` and `length` will be calculated with + * respect to `byte length` and not the character position. + * If `msg` is an array, `offset` and `length` must not be specified. + * + * The `address` argument is a string. If the value of `address` is a host name, + * DNS will be used to resolve the address of the host. If `address` is not + * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) will be used by default. + * + * If the socket has not been previously bound with a call to `bind`, the socket + * is assigned a random port number and is bound to the "all interfaces" address + * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.) + * + * An optional `callback` function may be specified to as a way of reporting + * DNS errors or for determining when it is safe to reuse the `buf` object. + * DNS lookups delay the time to send for at least one tick of the + * Node.js event loop. + * + * The only way to know for sure that the datagram has been sent is by using a `callback`. If an error occurs and a `callback` is given, the error will be + * passed as the first argument to the `callback`. If a `callback` is not given, + * the error is emitted as an `'error'` event on the `socket` object. + * + * Offset and length are optional but both _must_ be set if either are used. + * They are supported only when the first argument is a `Buffer`, a `TypedArray`, + * or a `DataView`. + * + * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket. + * + * Example of sending a UDP packet to a port on `localhost`; + * + * ```js + * import dgram from 'node:dgram'; + * import { Buffer } from 'node:buffer'; + * + * const message = Buffer.from('Some bytes'); + * const client = dgram.createSocket('udp4'); + * client.send(message, 41234, 'localhost', (err) => { + * client.close(); + * }); + * ``` + * + * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`; + * + * ```js + * import dgram from 'node:dgram'; + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('Some '); + * const buf2 = Buffer.from('bytes'); + * const client = dgram.createSocket('udp4'); + * client.send([buf1, buf2], 41234, (err) => { + * client.close(); + * }); + * ``` + * + * Sending multiple buffers might be faster or slower depending on the + * application and operating system. Run benchmarks to + * determine the optimal strategy on a case-by-case basis. Generally speaking, + * however, sending multiple buffers is faster. + * + * Example of sending a UDP packet using a socket connected to a port on `localhost`: + * + * ```js + * import dgram from 'node:dgram'; + * import { Buffer } from 'node:buffer'; + * + * const message = Buffer.from('Some bytes'); + * const client = dgram.createSocket('udp4'); + * client.connect(41234, 'localhost', (err) => { + * client.send(message, (err) => { + * client.close(); + * }); + * }); + * ``` + * @since v0.1.99 + * @param msg Message to be sent. + * @param offset Offset in the buffer where the message starts. + * @param length Number of bytes in the message. + * @param port Destination port. + * @param address Destination host name or IP address. + * @param callback Called when the message has been sent. + */ + send( + msg: string | NodeJS.ArrayBufferView | readonly any[], + port?: number, + address?: string, + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | NodeJS.ArrayBufferView | readonly any[], + port?: number, + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | NodeJS.ArrayBufferView | readonly any[], + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | NodeJS.ArrayBufferView, + offset: number, + length: number, + port?: number, + address?: string, + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | NodeJS.ArrayBufferView, + offset: number, + length: number, + port?: number, + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | NodeJS.ArrayBufferView, + offset: number, + length: number, + callback?: (error: Error | null, bytes: number) => void, + ): void; + /** + * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP + * packets may be sent to a local interface's broadcast address. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.6.9 + */ + setBroadcast(flag: boolean): void; + /** + * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC + * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_ + * _with a scope index is written as `'IP%scope'` where scope is an interface name_ + * _or interface number._ + * + * Sets the default outgoing multicast interface of the socket to a chosen + * interface or back to system interface selection. The `multicastInterface` must + * be a valid string representation of an IP from the socket's family. + * + * For IPv4 sockets, this should be the IP configured for the desired physical + * interface. All packets sent to multicast on the socket will be sent on the + * interface determined by the most recent successful use of this call. + * + * For IPv6 sockets, `multicastInterface` should include a scope to indicate the + * interface as in the examples that follow. In IPv6, individual `send` calls can + * also use explicit scope in addresses, so only packets sent to a multicast + * address without specifying an explicit scope are affected by the most recent + * successful use of this call. + * + * This method throws `EBADF` if called on an unbound socket. + * + * #### Example: IPv6 outgoing multicast interface + * + * On most systems, where scope format uses the interface name: + * + * ```js + * const socket = dgram.createSocket('udp6'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('::%eth1'); + * }); + * ``` + * + * On Windows, where scope format uses an interface number: + * + * ```js + * const socket = dgram.createSocket('udp6'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('::%2'); + * }); + * ``` + * + * #### Example: IPv4 outgoing multicast interface + * + * All systems use an IP of the host on the desired physical interface: + * + * ```js + * const socket = dgram.createSocket('udp4'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('10.0.0.2'); + * }); + * ``` + * @since v8.6.0 + */ + setMulticastInterface(multicastInterface: string): void; + /** + * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`, + * multicast packets will also be received on the local interface. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.3.8 + */ + setMulticastLoopback(flag: boolean): boolean; + /** + * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for + * "Time to Live", in this context it specifies the number of IP hops that a + * packet is allowed to travel through, specifically for multicast traffic. Each + * router or gateway that forwards a packet decrements the TTL. If the TTL is + * decremented to 0 by a router, it will not be forwarded. + * + * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.3.8 + */ + setMulticastTTL(ttl: number): number; + /** + * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer + * in bytes. + * + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + */ + setRecvBufferSize(size: number): void; + /** + * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer + * in bytes. + * + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + */ + setSendBufferSize(size: number): void; + /** + * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live", + * in this context it specifies the number of IP hops that a packet is allowed to + * travel through. Each router or gateway that forwards a packet decrements the + * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. + * Changing TTL values is typically done for network probes or when multicasting. + * + * The `ttl` argument may be between 1 and 255\. The default on most systems + * is 64. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.1.101 + */ + setTTL(ttl: number): number; + /** + * By default, binding a socket will cause it to block the Node.js process from + * exiting as long as the socket is open. The `socket.unref()` method can be used + * to exclude the socket from the reference counting that keeps the Node.js + * process active, allowing the process to exit even if the socket is still + * listening. + * + * Calling `socket.unref()` multiple times will have no additional effect. + * + * The `socket.unref()` method returns a reference to the socket so calls can be + * chained. + * @since v0.9.1 + */ + unref(): this; + /** + * Tells the kernel to join a source-specific multicast channel at the given `sourceAddress` and `groupAddress`, using the `multicastInterface` with the `IP_ADD_SOURCE_MEMBERSHIP` socket + * option. If the `multicastInterface` argument + * is not specified, the operating system will choose one interface and will add + * membership to it. To add membership to every available interface, call `socket.addSourceSpecificMembership()` multiple times, once per interface. + * + * When called on an unbound socket, this method will implicitly bind to a random + * port, listening on all interfaces. + * @since v13.1.0, v12.16.0 + */ + addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; + /** + * Instructs the kernel to leave a source-specific multicast channel at the given `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP` socket option. This method is + * automatically called by the kernel when the + * socket is closed or the process terminates, so most apps will never have + * reason to call this. + * + * If `multicastInterface` is not specified, the operating system will attempt to + * drop membership on all valid interfaces. + * @since v13.1.0, v12.16.0 + */ + dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; + /** + * Calls `socket.close()` and returns a promise that fulfills when the socket has closed. + * @since v20.5.0 + */ + [Symbol.asyncDispose](): Promise; + } + interface Socket extends InternalEventEmitter {} +} +declare module "dgram" { + export * from "node:dgram"; +} diff --git a/node_modules/@types/node/diagnostics_channel.d.ts b/node_modules/@types/node/diagnostics_channel.d.ts new file mode 100644 index 0000000..3dee66a --- /dev/null +++ b/node_modules/@types/node/diagnostics_channel.d.ts @@ -0,0 +1,794 @@ +declare module "node:diagnostics_channel" { + import { AsyncLocalStorage } from "node:async_hooks"; + /** + * Check if there are active subscribers to the named channel. This is helpful if + * the message you want to send might be expensive to prepare. + * + * This API is optional but helpful when trying to publish messages from very + * performance-sensitive code. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * if (diagnostics_channel.hasSubscribers('my-channel')) { + * // There are subscribers, prepare and publish message + * } + * ``` + * @since v15.1.0, v14.17.0 + * @param name The channel name + * @return If there are active subscribers + */ + function hasSubscribers(name: string | symbol): boolean; + /** + * This is the primary entry-point for anyone wanting to publish to a named + * channel. It produces a channel object which is optimized to reduce overhead at + * publish time as much as possible. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * ``` + * @since v15.1.0, v14.17.0 + * @param name The channel name + * @return The named channel object + */ + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + function channel( + name: string | symbol, + ): Channel; + type ChannelListener = (message: unknown, name: string | symbol) => void; + /** + * Register a message handler to subscribe to this channel. This message handler + * will be run synchronously whenever a message is published to the channel. Any + * errors thrown in the message handler will trigger an `'uncaughtException'`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * diagnostics_channel.subscribe('my-channel', (message, name) => { + * // Received data + * }); + * ``` + * @since v18.7.0, v16.17.0 + * @param name The channel name + * @param onMessage The handler to receive channel messages + */ + function subscribe(name: string | symbol, onMessage: ChannelListener): void; + /** + * Remove a message handler previously registered to this channel with {@link subscribe}. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * function onMessage(message, name) { + * // Received data + * } + * + * diagnostics_channel.subscribe('my-channel', onMessage); + * + * diagnostics_channel.unsubscribe('my-channel', onMessage); + * ``` + * @since v18.7.0, v16.17.0 + * @param name The channel name + * @param onMessage The previous subscribed handler to remove + * @return `true` if the handler was found, `false` otherwise. + */ + function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean; + /** + * Creates a `TracingChannel` wrapper for the given `TracingChannel Channels`. If a name is given, the corresponding tracing + * channels will be created in the form of `tracing:${name}:${eventType}` where `eventType` corresponds to the types of `TracingChannel Channels`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channelsByName = diagnostics_channel.tracingChannel('my-channel'); + * + * // or... + * + * const channelsByCollection = diagnostics_channel.tracingChannel({ + * start: diagnostics_channel.channel('tracing:my-channel:start'), + * end: diagnostics_channel.channel('tracing:my-channel:end'), + * asyncStart: diagnostics_channel.channel('tracing:my-channel:asyncStart'), + * asyncEnd: diagnostics_channel.channel('tracing:my-channel:asyncEnd'), + * error: diagnostics_channel.channel('tracing:my-channel:error'), + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param nameOrChannels Channel name or object containing all the `TracingChannel Channels` + * @return Collection of channels to trace with + */ + function tracingChannel( + nameOrChannels: string | TracingChannelCollection, + ): TracingChannel; + /** + * Creates a {@link BoundedChannel} wrapper for the given channels. If a name is + * given, the corresponding channels will be created in the form of + * `tracing:${name}:${eventType}` where `eventType` is `start` or `end`. + * + * A `BoundedChannel` is a simplified version of {@link TracingChannel} that only + * traces synchronous operations. It only has `start` and `end` events, without + * `asyncStart`, `asyncEnd`, or `error` events, making it suitable for tracing + * operations that don't involve asynchronous continuations or error handling. + * + * ```js + * import { boundedChannel, channel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * // or... + * + * const wc2 = boundedChannel({ + * start: channel('tracing:my-operation:start'), + * end: channel('tracing:my-operation:end'), + * }); + * ``` + * @since v26.1.0 + * @experimental + * @param nameOrChannels Channel name or + * object containing all the [BoundedChannel Channels](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#boundedchannel-channels) + */ + function boundedChannel( + nameOrChannels: string | BoundedChannelCollection, + ): BoundedChannel; + /** + * The class `Channel` represents an individual named channel within the data + * pipeline. It is used to track subscribers and to publish messages when there + * are subscribers present. It exists as a separate object to avoid channel + * lookups at publish time, enabling very fast publish speeds and allowing + * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly + * with `new Channel(name)` is not supported. + * @since v15.1.0, v14.17.0 + */ + class Channel { + private constructor(); + readonly name: string | symbol; + /** + * Check if there are active subscribers to this channel. This is helpful if + * the message you want to send might be expensive to prepare. + * + * This API is optional but helpful when trying to publish messages from very + * performance-sensitive code. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * if (channel.hasSubscribers) { + * // There are subscribers, prepare and publish message + * } + * ``` + * @since v15.1.0, v14.17.0 + */ + readonly hasSubscribers: boolean; + /** + * Publish a message to any subscribers to the channel. This will trigger + * message handlers synchronously so they will execute within the same context. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.publish({ + * some: 'message', + * }); + * ``` + * @since v15.1.0, v14.17.0 + * @param message The message to send to the channel subscribers + */ + publish(message: unknown): void; + /** + * Register a message handler to subscribe to this channel. This message handler + * will be run synchronously whenever a message is published to the channel. Any + * errors thrown in the message handler will trigger an `'uncaughtException'`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.subscribe((message, name) => { + * // Received data + * }); + * ``` + * @since v15.1.0, v14.17.0 + * @param onMessage The handler to receive channel messages + */ + subscribe(onMessage: ChannelListener): void; + /** + * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * function onMessage(message, name) { + * // Received data + * } + * + * channel.subscribe(onMessage); + * + * channel.unsubscribe(onMessage); + * ``` + * @since v15.1.0, v14.17.0 + * @param onMessage The previous subscribed handler to remove + * @return `true` if the handler was found, `false` otherwise. + */ + unsubscribe(onMessage: ChannelListener): void; + /** + * When `channel.runStores(context, ...)` is called, the given context data + * will be applied to any store bound to the channel. If the store has already been + * bound the previous `transform` function will be replaced with the new one. + * The `transform` function may be omitted to set the given context data as the + * context directly. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const store = new AsyncLocalStorage(); + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.bindStore(store, (data) => { + * return { data }; + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param store The store to which to bind the context data + * @param transform Transform context data before setting the store context + */ + bindStore(store: AsyncLocalStorage, transform?: (context: ContextType) => StoreType): void; + /** + * Remove a message handler previously registered to this channel with `channel.bindStore(store)`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const store = new AsyncLocalStorage(); + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.bindStore(store); + * channel.unbindStore(store); + * ``` + * @since v19.9.0 + * @experimental + * @param store The store to unbind from the channel. + * @return `true` if the store was found, `false` otherwise. + */ + unbindStore(store: AsyncLocalStorage): boolean; + /** + * Applies the given data to any AsyncLocalStorage instances bound to the channel + * for the duration of the given function, then publishes to the channel within + * the scope of that data is applied to the stores. + * + * If a transform function was given to `channel.bindStore(store)` it will be + * applied to transform the message data before it becomes the context value for + * the store. The prior storage context is accessible from within the transform + * function in cases where context linking is required. + * + * The context applied to the store should be accessible in any async code which + * continues from execution which began during the given function, however + * there are some situations in which `context loss` may occur. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const store = new AsyncLocalStorage(); + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.bindStore(store, (message) => { + * const parent = store.getStore(); + * return new Span(message, parent); + * }); + * channel.runStores({ some: 'message' }, () => { + * store.getStore(); // Span({ some: 'message' }) + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param context Message to send to subscribers and bind to stores + * @param fn Handler to run within the entered storage context + * @param thisArg The receiver to be used for the function call. + * @param args Optional arguments to pass to the function. + */ + runStores( + context: ContextType, + fn: (this: ThisArg, ...args: Args) => Result, + thisArg?: ThisArg, + ...args: Args + ): Result; + /** + * Creates a disposable scope that binds the given data to any AsyncLocalStorage + * instances bound to the channel and publishes it to subscribers. The scope + * automatically restores the previous storage contexts when disposed. + * + * This method enables the use of JavaScript's explicit resource management + * (`using` syntax with `Symbol.dispose`) to manage store contexts without + * closure wrapping. + * + * ```js + * import { channel } from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const store = new AsyncLocalStorage(); + * const ch = channel('my-channel'); + * + * ch.bindStore(store, (message) => { + * return { ...message, timestamp: Date.now() }; + * }); + * + * { + * using scope = ch.withStoreScope({ request: 'data' }); + * // Store is entered, data is published + * console.log(store.getStore()); // { request: 'data', timestamp: ... } + * } + * // Store is automatically restored on scope exit + * ``` + * @since v26.1.0 + * @experimental + */ + withStoreScope(data: ContextType): RunStoresScope; + } + /** + * The class `RunStoresScope` represents a disposable scope created by + * `channel.withStoreScope(data)`. It manages the lifecycle of store + * contexts and ensures they are properly restored when the scope exits. + * + * The scope must be used with the `using` syntax to ensure proper disposal. + * @since v26.1.0 + * @experimental + */ + interface RunStoresScope extends Disposable {} + interface TracingChannelSubscribers { + start: (message: ContextType) => void; + end: ( + message: ContextType & { + error?: unknown; + result?: unknown; + }, + ) => void; + asyncStart: ( + message: ContextType & { + error?: unknown; + result?: unknown; + }, + ) => void; + asyncEnd: ( + message: ContextType & { + error?: unknown; + result?: unknown; + }, + ) => void; + error: ( + message: ContextType & { + error: unknown; + }, + ) => void; + } + interface TracingChannelCollection { + start: Channel; + end: Channel; + asyncStart: Channel; + asyncEnd: Channel; + error: Channel; + } + /** + * The class `TracingChannel` is a collection of `TracingChannel Channels` which + * together express a single traceable action. It is used to formalize and + * simplify the process of producing events for tracing application flow. {@link tracingChannel} is used to construct a `TracingChannel`. As with `Channel` it is recommended to create and reuse a + * single `TracingChannel` at the top-level of the file rather than creating them + * dynamically. + * @since v19.9.0 + * @experimental + */ + interface TracingChannel + extends TracingChannelCollection + { + /** + * Helper to subscribe a collection of functions to the corresponding channels. + * This is the same as calling `channel.subscribe(onMessage)` on each channel + * individually. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.subscribe({ + * start(message) { + * // Handle start message + * }, + * end(message) { + * // Handle end message + * }, + * asyncStart(message) { + * // Handle asyncStart message + * }, + * asyncEnd(message) { + * // Handle asyncEnd message + * }, + * error(message) { + * // Handle error message + * }, + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param subscribers Set of `TracingChannel Channels` subscribers + */ + subscribe(subscribers: NodeJS.PartialOptions>): void; + /** + * Helper to unsubscribe a collection of functions from the corresponding channels. + * This is the same as calling `channel.unsubscribe(onMessage)` on each channel + * individually. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.unsubscribe({ + * start(message) { + * // Handle start message + * }, + * end(message) { + * // Handle end message + * }, + * asyncStart(message) { + * // Handle asyncStart message + * }, + * asyncEnd(message) { + * // Handle asyncEnd message + * }, + * error(message) { + * // Handle error message + * }, + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param subscribers Set of `TracingChannel Channels` subscribers + * @return `true` if all handlers were successfully unsubscribed, and `false` otherwise. + */ + unsubscribe(subscribers: NodeJS.PartialOptions>): void; + /** + * Trace a synchronous function call. This will always produce a `start event` and `end event` around the execution and may produce an `error event` if the given function throws an error. + * This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all + * events should have any bound stores set to match this trace context. + * + * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions + * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.traceSync(() => { + * // Do something + * }, { + * some: 'thing', + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param fn Function to wrap a trace around + * @param context Shared object to correlate events through + * @param thisArg The receiver to be used for the function call + * @param args Optional arguments to pass to the function + * @return The return value of the given function + */ + traceSync( + fn: (this: ThisArg, ...args: Args) => Result, + context?: ContextType, + thisArg?: ThisArg, + ...args: Args + ): Result; + /** + * Trace an asynchronous function call which returns a `Promise` or + * [thenable object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables). This will always produce a [`start` event](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#startevent) and + * [`end` event](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#endevent) around the synchronous portion of the function execution, and + * will produce an [`asyncStart` event](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#asyncstartevent) and [`asyncEnd` event](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#asyncendevent) when the + * returned promise is resolved or rejected. It may also produce an + * [`error` event](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#errorevent) if the given function throws an error or the returned promise + * is rejected. This will run the given function using + * [`channel.runStores(context, ...)`](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html##channelrunstorescontext-fn-thisarg-args) on the `start` channel which ensures all + * events should have any bound stores set to match this trace context. + * + * If the value returned by `fn` is not a Promise or thenable, then it will be + * returned with a warning, and no `asyncStart` or `asyncEnd` events will be + * produced. + * + * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions + * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.tracePromise(async () => { + * // Do something + * }, { + * some: 'thing', + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param fn Function to wrap a trace around + * @param context Shared object to correlate trace events through + * @param thisArg The receiver to be used for the function call + * @param args Optional arguments to pass to the function + * @returns The return value of the given function. If the return value + * is a Promise or thenable, tracing events will be published when it settles. + * If the return value is not a Promise or thenable, it is returned as-is and + * a warning is emitted. + */ + tracePromise = any>( + fn: (this: ThisArg, ...args: Args) => Result, + context?: ContextType, + thisArg?: ThisArg, + ...args: Args + ): Result; + /** + * Trace a callback-receiving function call. This will always produce a `start event` and `end event` around the synchronous portion of the + * function execution, and will produce a `asyncStart event` and `asyncEnd event` around the callback execution. It may also produce an `error event` if the given function throws an error or + * the returned + * promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all + * events should have any bound stores set to match this trace context. + * + * The `position` will be -1 by default to indicate the final argument should + * be used as the callback. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.traceCallback((arg1, callback) => { + * // Do something + * callback(null, 'result'); + * }, 1, { + * some: 'thing', + * }, thisArg, arg1, callback); + * ``` + * + * The callback will also be run with `channel.runStores(context, ...)` which + * enables context loss recovery in some cases. + * + * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions + * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * const myStore = new AsyncLocalStorage(); + * + * // The start channel sets the initial store data to something + * // and stores that store data value on the trace context object + * channels.start.bindStore(myStore, (data) => { + * const span = new Span(data); + * data.span = span; + * return span; + * }); + * + * // Then asyncStart can restore from that data it stored previously + * channels.asyncStart.bindStore(myStore, (data) => { + * return data.span; + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param fn callback using function to wrap a trace around + * @param position Zero-indexed argument position of expected callback + * @param context Shared object to correlate trace events through + * @param thisArg The receiver to be used for the function call + * @param args Optional arguments to pass to the function + * @return The return value of the given function + */ + traceCallback( + fn: (this: ThisArg, ...args: Args) => Result, + position?: number, + context?: ContextType, + thisArg?: ThisArg, + ...args: Args + ): Result; + /** + * `true` if any of the individual channels has a subscriber, `false` if not. + * + * This is a helper method available on a {@link TracingChannel} instance to check + * if any of the [TracingChannel Channels](https://nodejs.org/api/diagnostics_channel.html#tracingchannel-channels) have subscribers. + * A `true` is returned if any of them have at least one subscriber, a `false` is returned otherwise. + * + * ```js + * const diagnostics_channel = require('node:diagnostics_channel'); + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * if (channels.hasSubscribers) { + * // Do something + * } + * ``` + * @since v22.0.0, v20.13.0 + */ + readonly hasSubscribers: boolean; + } + interface BoundedChannelSubscribers { + start: (message: ContextType) => void; + end: (message: ContextType) => void; + } + interface BoundedChannelCollection { + start: Channel; + end: Channel; + } + /** + * The class `BoundedChannel` is a simplified version of {@link TracingChannel} that + * only traces synchronous operations. It consists of two channels (`start` and + * `end`) instead of five, omitting the `asyncStart`, `asyncEnd`, and `error` + * events. This makes it suitable for tracing operations that don't involve + * asynchronous continuations or error handling. + * + * Like `TracingChannel`, it is recommended to create and reuse a single + * `BoundedChannel` at the top-level of the file rather than creating them + * dynamically. + * @since v26.1.0 + * @experimental + */ + interface BoundedChannel + extends BoundedChannelCollection + { + /** + * Check if any of the `start` or `end` channels have subscribers. + * + * ```js + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * if (wc.hasSubscribers) { + * // There are subscribers, perform traced operation + * } + * ``` + * @since v26.1.0 + */ + readonly hasSubscribers: boolean; + /** + * Subscribe to the bounded channel events. This is equivalent to calling + * [`channel.subscribe(onMessage)`][] on each channel individually. + * + * ```mjs + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * wc.subscribe({ + * start(message) { + * // Handle start + * }, + * end(message) { + * // Handle end + * }, + * }); + * ``` + * @since v26.1.0 + * @param handlers Set of channel subscribers + */ + subscribe(handlers: NodeJS.PartialOptions>): void; + /** + * Unsubscribe from the bounded channel events. This is equivalent to calling + * [`channel.unsubscribe(onMessage)`][] on each channel individually. + * + * ```js + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * const handlers = { + * start(message) {}, + * end(message) {}, + * }; + * + * wc.subscribe(handlers); + * wc.unsubscribe(handlers); + * ``` + * @since v26.1.0 + * @param handlers Set of channel subscribers + * @returns `true` if all handlers were successfully unsubscribed, + * `false` otherwise. + */ + unsubscribe(handlers: NodeJS.PartialOptions>): boolean; + /** + * Trace a synchronous function call. This will produce a `start` event and `end` + * event around the execution. This runs the given function using + * [`channel.runStores(context, ...)`][] on the `start` channel which ensures all + * events have any bound stores set to match this trace context. + * + * ```js + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * const result = wc.run({ operationId: '123' }, () => { + * // Perform operation + * return 42; + * }); + * ``` + * @since v26.1.0 + * @param context Shared object to correlate events through + * @param fn Function to wrap a trace around + * @param thisArg The receiver to be used for the function call + * @param args Optional arguments to pass to the function + * @returns The return value of the given function + */ + run( + fn: (this: ThisArg, ...args: Args) => Result, + context?: ContextType, + thisArg?: ThisArg, + ...args: Args + ): Result; + /** + * Create a disposable scope for tracing a synchronous operation using JavaScript's + * explicit resource management (`using` syntax). The scope automatically publishes + * `start` and `end` events, enters bound stores, and handles cleanup when disposed. + * + * ```js + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * const context = { operationId: '123' }; + * { + * using scope = wc.withScope(context); + * // Stores are entered, start event is published + * + * // Perform work and set result on context + * context.result = 42; + * } + * // End event is published, stores are restored automatically + * ``` + * @since v26.1.0 + * @param context Shared object to correlate events through + * @returns Disposable scope object + */ + withScope(context: ContextType): BoundedChannelScope; + } + /** + * The class `BoundedChannelScope` represents a disposable scope created by + * `boundedChannel.withScope(context)`. It manages the lifecycle of a traced + * operation, automatically publishing events and managing store contexts. + * + * The scope must be used with the `using` syntax to ensure proper disposal. + * + * ```js + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * const context = {}; + * { + * using scope = wc.withScope(context); + * // Start event is published, stores are entered + * context.result = performOperation(); + * // End event is automatically published at end of block + * } + * ``` + * @since v26.1.0 + * @experimental + */ + interface BoundedChannelScope extends Disposable {} +} +declare module "diagnostics_channel" { + export * from "node:diagnostics_channel"; +} diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts new file mode 100644 index 0000000..319ee96 --- /dev/null +++ b/node_modules/@types/node/dns.d.ts @@ -0,0 +1,876 @@ +declare module "node:dns" { + // Supported getaddrinfo flags. + /** + * Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are + * only returned if the current system has at least one IPv4 address configured. + */ + const ADDRCONFIG: number; + /** + * If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported + * on some operating systems (e.g. FreeBSD 10.1). + */ + const V4MAPPED: number; + /** + * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as + * well as IPv4 mapped IPv6 addresses. + */ + const ALL: number; + interface LookupOptions { + /** + * The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted + * as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used + * with `{ all: true } (see below)`, both IPv4 and IPv6 addresses are returned. + * @default 0 + */ + family?: number | "IPv4" | "IPv6" | undefined; + /** + * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v26.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be + * passed by bitwise `OR`ing their values. + */ + hints?: number | undefined; + /** + * When `true`, the callback returns all resolved addresses in an array. Otherwise, returns a single address. + * @default false + */ + all?: boolean | undefined; + /** + * When `verbatim`, the resolved addresses are returned unsorted. When `ipv4first`, the resolved addresses are sorted + * by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6 + * addresses before IPv4 addresses. Default value is configurable using + * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--dns-result-orderorder). + * @default `verbatim` (addresses are not reordered) + * @since v22.1.0 + */ + order?: "ipv4first" | "ipv6first" | "verbatim" | undefined; + /** + * When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4 + * addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified, + * `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder} + * @default true (addresses are not reordered) + * @deprecated Please use `order` option + */ + verbatim?: boolean | undefined; + } + interface LookupOneOptions extends LookupOptions { + all?: false | undefined; + } + interface LookupAllOptions extends LookupOptions { + all: true; + } + interface LookupAddress { + /** + * A string representation of an IPv4 or IPv6 address. + */ + address: string; + /** + * `4` or `6`, denoting the family of `address`, or `0` if the address is not an IPv4 or IPv6 address. `0` is a likely indicator of a + * bug in the name resolution service used by the operating system. + */ + family: number; + } + /** + * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or + * AAAA (IPv6) record. All `option` properties are optional. If `options` is an + * integer, then it must be `4` or `6` – if `options` is `0` or not provided, then + * IPv4 and IPv6 addresses are both returned if found. + * + * With the `all` option set to `true`, the arguments for `callback` change to `(err, addresses)`, with `addresses` being an array of objects with the + * properties `address` and `family`. + * + * On error, `err` is an `Error` object, where `err.code` is the error code. + * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when + * the host name does not exist but also when the lookup fails in other ways + * such as no available file descriptors. + * + * `dns.lookup()` does not necessarily have anything to do with the DNS protocol. + * The implementation uses an operating system facility that can associate names + * with addresses and vice versa. This implementation can have subtle but + * important consequences on the behavior of any Node.js program. Please take some + * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v26.x/api/dns.html#implementation-considerations) + * before using `dns.lookup()`. + * + * Example usage: + * + * ```js + * import dns from 'node:dns'; + * const options = { + * family: 6, + * hints: dns.ADDRCONFIG | dns.V4MAPPED, + * }; + * dns.lookup('example.com', options, (err, address, family) => + * console.log('address: %j family: IPv%s', address, family)); + * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 + * + * // When options.all is true, the result will be an Array. + * options.all = true; + * dns.lookup('example.com', options, (err, addresses) => + * console.log('addresses: %j', addresses)); + * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] + * ``` + * + * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v26.x/api/util.html#utilpromisifyoriginal) ed + * version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties. + * @since v0.1.90 + */ + function lookup( + hostname: string, + family: number, + callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, + ): void; + function lookup( + hostname: string, + options: LookupOneOptions, + callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, + ): void; + function lookup( + hostname: string, + options: LookupAllOptions, + callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void, + ): void; + function lookup( + hostname: string, + options: LookupOptions, + callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void, + ): void; + function lookup( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, + ): void; + namespace lookup { + function __promisify__(hostname: string, options: LookupAllOptions): Promise; + function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise; + function __promisify__(hostname: string, options: LookupOptions): Promise; + } + /** + * Resolves the given `address` and `port` into a host name and service using + * the operating system's underlying `getnameinfo` implementation. + * + * If `address` is not a valid IP address, a `TypeError` will be thrown. + * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. + * + * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-error) object, + * where `err.code` is the error code. + * + * ```js + * import dns from 'node:dns'; + * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { + * console.log(hostname, service); + * // Prints: localhost ssh + * }); + * ``` + * + * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v26.x/api/util.html#utilpromisifyoriginal) ed + * version, it returns a `Promise` for an `Object` with `hostname` and `service` properties. + * @since v0.11.14 + */ + function lookupService( + address: string, + port: number, + callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void, + ): void; + namespace lookupService { + function __promisify__( + address: string, + port: number, + ): Promise<{ + hostname: string; + service: string; + }>; + } + interface ResolveOptions { + ttl: boolean; + } + interface ResolveWithTtlOptions extends ResolveOptions { + ttl: true; + } + interface RecordWithTtl { + address: string; + ttl: number; + } + interface AnyARecord extends RecordWithTtl { + type: "A"; + } + interface AnyAaaaRecord extends RecordWithTtl { + type: "AAAA"; + } + interface CaaRecord { + critical: number; + issue?: string | undefined; + issuewild?: string | undefined; + iodef?: string | undefined; + contactemail?: string | undefined; + contactphone?: string | undefined; + } + interface AnyCaaRecord extends CaaRecord { + type: "CAA"; + } + interface MxRecord { + priority: number; + exchange: string; + } + interface AnyMxRecord extends MxRecord { + type: "MX"; + } + interface NaptrRecord { + flags: string; + service: string; + regexp: string; + replacement: string; + order: number; + preference: number; + } + interface AnyNaptrRecord extends NaptrRecord { + type: "NAPTR"; + } + interface SoaRecord { + nsname: string; + hostmaster: string; + serial: number; + refresh: number; + retry: number; + expire: number; + minttl: number; + } + interface AnySoaRecord extends SoaRecord { + type: "SOA"; + } + interface SrvRecord { + priority: number; + weight: number; + port: number; + name: string; + } + interface AnySrvRecord extends SrvRecord { + type: "SRV"; + } + interface TlsaRecord { + certUsage: number; + selector: number; + match: number; + data: ArrayBuffer; + } + interface AnyTlsaRecord extends TlsaRecord { + type: "TLSA"; + } + interface AnyTxtRecord { + type: "TXT"; + entries: string[]; + } + interface AnyNsRecord { + type: "NS"; + value: string; + } + interface AnyPtrRecord { + type: "PTR"; + value: string; + } + interface AnyCnameRecord { + type: "CNAME"; + value: string; + } + type AnyRecord = + | AnyARecord + | AnyAaaaRecord + | AnyCaaRecord + | AnyCnameRecord + | AnyMxRecord + | AnyNaptrRecord + | AnyNsRecord + | AnyPtrRecord + | AnySoaRecord + | AnySrvRecord + | AnyTlsaRecord + | AnyTxtRecord; + /** + * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array + * of the resource records. The `callback` function has arguments `(err, records)`. When successful, `records` will be an array of resource + * records. The type and structure of individual results varies based on `rrtype`: + * + * + * + * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-error) object, + * where `err.code` is one of the `DNS error codes`. + * @since v0.1.27 + * @param hostname Host name to resolve. + * @param [rrtype='A'] Resource record type. + */ + function resolve( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR", + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "ANY", + callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "CAA", + callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "MX", + callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "NAPTR", + callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "SOA", + callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void, + ): void; + function resolve( + hostname: string, + rrtype: "SRV", + callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "TLSA", + callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "TXT", + callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void, + ): void; + function resolve( + hostname: string, + rrtype: string, + callback: ( + err: NodeJS.ErrnoException | null, + addresses: + | string[] + | CaaRecord[] + | MxRecord[] + | NaptrRecord[] + | SoaRecord + | SrvRecord[] + | TlsaRecord[] + | string[][] + | AnyRecord[], + ) => void, + ): void; + namespace resolve { + function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; + function __promisify__(hostname: string, rrtype: "ANY"): Promise; + function __promisify__(hostname: string, rrtype: "CAA"): Promise; + function __promisify__(hostname: string, rrtype: "MX"): Promise; + function __promisify__(hostname: string, rrtype: "NAPTR"): Promise; + function __promisify__(hostname: string, rrtype: "SOA"): Promise; + function __promisify__(hostname: string, rrtype: "SRV"): Promise; + function __promisify__(hostname: string, rrtype: "TLSA"): Promise; + function __promisify__(hostname: string, rrtype: "TXT"): Promise; + function __promisify__( + hostname: string, + rrtype: string, + ): Promise< + | string[] + | CaaRecord[] + | MxRecord[] + | NaptrRecord[] + | SoaRecord + | SrvRecord[] + | TlsaRecord[] + | string[][] + | AnyRecord[] + >; + } + /** + * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the `hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`). + * @since v0.1.16 + * @param hostname Host name to resolve. + */ + function resolve4( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + function resolve4( + hostname: string, + options: ResolveWithTtlOptions, + callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void, + ): void; + function resolve4( + hostname: string, + options: ResolveOptions, + callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void, + ): void; + namespace resolve4 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + /** + * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of IPv6 addresses. + * @since v0.1.16 + * @param hostname Host name to resolve. + */ + function resolve6( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + function resolve6( + hostname: string, + options: ResolveWithTtlOptions, + callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void, + ): void; + function resolve6( + hostname: string, + options: ResolveOptions, + callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void, + ): void; + namespace resolve6 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + /** + * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`). + * @since v0.3.2 + */ + function resolveCname( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + namespace resolveCname { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of certification authority authorization records + * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`). + * @since v15.0.0, v14.17.0 + */ + function resolveCaa( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void, + ): void; + namespace resolveCaa { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. The `addresses` argument passed to the `callback` function will + * contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`). + * @since v0.1.27 + */ + function resolveMx( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void, + ): void; + namespace resolveMx { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will contain an array of + * objects with the following properties: + * + * * `flags` + * * `service` + * * `regexp` + * * `replacement` + * * `order` + * * `preference` + * + * ```js + * { + * flags: 's', + * service: 'SIP+D2U', + * regexp: '', + * replacement: '_sip._udp.example.com', + * order: 30, + * preference: 100, + * } + * ``` + * @since v0.9.12 + */ + function resolveNaptr( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void, + ): void; + namespace resolveNaptr { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. The `addresses` argument passed to the `callback` function will + * contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`). + * @since v0.1.90 + */ + function resolveNs( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + namespace resolveNs { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will + * be an array of strings containing the reply records. + * @since v6.0.0 + */ + function resolvePtr( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + namespace resolvePtr { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for + * the `hostname`. The `address` argument passed to the `callback` function will + * be an object with the following properties: + * + * * `nsname` + * * `hostmaster` + * * `serial` + * * `refresh` + * * `retry` + * * `expire` + * * `minttl` + * + * ```js + * { + * nsname: 'ns.example.com', + * hostmaster: 'root.example.com', + * serial: 2013101809, + * refresh: 10000, + * retry: 2400, + * expire: 604800, + * minttl: 3600, + * } + * ``` + * @since v0.11.10 + */ + function resolveSoa( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void, + ): void; + namespace resolveSoa { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. The `addresses` argument passed to the `callback` function will + * be an array of objects with the following properties: + * + * * `priority` + * * `weight` + * * `port` + * * `name` + * + * ```js + * { + * priority: 10, + * weight: 5, + * port: 21223, + * name: 'service.example.com', + * } + * ``` + * @since v0.1.27 + */ + function resolveSrv( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void, + ): void; + namespace resolveSrv { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for + * the `hostname`. The `records` argument passed to the `callback` function is an + * array of objects with these properties: + * + * * `certUsage` + * * `selector` + * * `match` + * * `data` + * + * ```js + * { + * certUsage: 3, + * selector: 1, + * match: 1, + * data: [ArrayBuffer], + * } + * ``` + * @since v23.9.0, v22.15.0 + */ + function resolveTlsa( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void, + ): void; + namespace resolveTlsa { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. The `records` argument passed to the `callback` function is a + * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of + * one record. Depending on the use case, these could be either joined together or + * treated separately. + * @since v0.1.27 + */ + function resolveTxt( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void, + ): void; + namespace resolveTxt { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). + * The `ret` argument passed to the `callback` function will be an array containing + * various types of records. Each object has a property `type` that indicates the + * type of the current record. And depending on the `type`, additional properties + * will be present on the object: + * + * + * + * Here is an example of the `ret` object passed to the callback: + * + * ```js + * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, + * { type: 'CNAME', value: 'example.com' }, + * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, + * { type: 'NS', value: 'ns1.example.com' }, + * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, + * { type: 'SOA', + * nsname: 'ns1.example.com', + * hostmaster: 'admin.example.com', + * serial: 156696742, + * refresh: 900, + * retry: 900, + * expire: 1800, + * minttl: 60 } ]; + * ``` + * + * DNS server operators may choose not to respond to `ANY` queries. It may be better to call individual methods like {@link resolve4}, {@link resolveMx}, and so on. For more details, see + * [RFC 8482](https://tools.ietf.org/html/rfc8482). + */ + function resolveAny( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void, + ): void; + namespace resolveAny { + function __promisify__(hostname: string): Promise; + } + /** + * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an + * array of host names. + * + * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-error) object, where `err.code` is + * one of the [DNS error codes](https://nodejs.org/docs/latest-v26.x/api/dns.html#error-codes). + * @since v0.1.16 + */ + function reverse( + ip: string, + callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void, + ): void; + /** + * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v26.x/api/dns.html#dnspromiseslookuphostname-options). + * The value could be: + * + * * `ipv4first`: for `order` defaulting to `ipv4first`. + * * `ipv6first`: for `order` defaulting to `ipv6first`. + * * `verbatim`: for `order` defaulting to `verbatim`. + * @since v18.17.0 + */ + function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim"; + /** + * Sets the IP address and port of servers to be used when performing DNS + * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted + * addresses. If the port is the IANA default DNS port (53) it can be omitted. + * + * ```js + * dns.setServers([ + * '4.4.4.4', + * '[2001:4860:4860::8888]', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ]); + * ``` + * + * An error will be thrown if an invalid address is provided. + * + * The `dns.setServers()` method must not be called while a DNS query is in + * progress. + * + * The {@link setServers} method affects only {@link resolve}, `dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}). + * + * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). + * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with + * subsequent servers provided. Fallback DNS servers will only be used if the + * earlier ones time out or result in some other error. + * @since v0.11.3 + * @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses + */ + function setServers(servers: readonly string[]): void; + /** + * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), + * that are currently configured for DNS resolution. A string will include a port + * section if a custom port is used. + * + * ```js + * [ + * '4.4.4.4', + * '2001:4860:4860::8888', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ] + * ``` + * @since v0.11.3 + */ + function getServers(): string[]; + /** + * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v26.x/api/dns.html#dnspromiseslookuphostname-options). + * The value could be: + * + * * `ipv4first`: sets default `order` to `ipv4first`. + * * `ipv6first`: sets default `order` to `ipv6first`. + * * `verbatim`: sets default `order` to `verbatim`. + * + * The default is `verbatim` and {@link setDefaultResultOrder} have higher + * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--dns-result-orderorder). When using + * [worker threads](https://nodejs.org/docs/latest-v26.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main + * thread won't affect the default dns orders in workers. + * @since v16.4.0, v14.18.0 + * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. + */ + function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; + // Error codes + const NODATA: "ENODATA"; + const FORMERR: "EFORMERR"; + const SERVFAIL: "ESERVFAIL"; + const NOTFOUND: "ENOTFOUND"; + const NOTIMP: "ENOTIMP"; + const REFUSED: "EREFUSED"; + const BADQUERY: "EBADQUERY"; + const BADNAME: "EBADNAME"; + const BADFAMILY: "EBADFAMILY"; + const BADRESP: "EBADRESP"; + const CONNREFUSED: "ECONNREFUSED"; + const TIMEOUT: "ETIMEOUT"; + const EOF: "EOF"; + const FILE: "EFILE"; + const NOMEM: "ENOMEM"; + const DESTRUCTION: "EDESTRUCTION"; + const BADSTR: "EBADSTR"; + const BADFLAGS: "EBADFLAGS"; + const NONAME: "ENONAME"; + const BADHINTS: "EBADHINTS"; + const NOTINITIALIZED: "ENOTINITIALIZED"; + const LOADIPHLPAPI: "ELOADIPHLPAPI"; + const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS"; + const CANCELLED: "ECANCELLED"; + interface ResolverOptions { + /** + * Query timeout in milliseconds, or `-1` to use the default timeout. + */ + timeout?: number | undefined; + /** + * The number of tries the resolver will try contacting each name server before giving up. + * @default 4 + */ + tries?: number | undefined; + /** + * The max retry timeout, in milliseconds. + * @default 0 + */ + maxTimeout?: number | undefined; + } + /** + * An independent resolver for DNS requests. + * + * Creating a new resolver uses the default server settings. Setting + * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v26.x/api/dns.html#dnssetserversservers) does not affect + * other resolvers: + * + * ```js + * import { Resolver } from 'node:dns'; + * const resolver = new Resolver(); + * resolver.setServers(['4.4.4.4']); + * + * // This request will use the server at 4.4.4.4, independent of global settings. + * resolver.resolve4('example.org', (err, addresses) => { + * // ... + * }); + * ``` + * + * The following methods from the `node:dns` module are available: + * + * * `resolver.getServers()` + * * `resolver.resolve()` + * * `resolver.resolve4()` + * * `resolver.resolve6()` + * * `resolver.resolveAny()` + * * `resolver.resolveCaa()` + * * `resolver.resolveCname()` + * * `resolver.resolveMx()` + * * `resolver.resolveNaptr()` + * * `resolver.resolveNs()` + * * `resolver.resolvePtr()` + * * `resolver.resolveSoa()` + * * `resolver.resolveSrv()` + * * `resolver.resolveTxt()` + * * `resolver.reverse()` + * * `resolver.setServers()` + * @since v8.3.0 + */ + class Resolver { + constructor(options?: ResolverOptions); + /** + * Cancel all outstanding DNS queries made by this resolver. The corresponding + * callbacks will be called with an error with code `ECANCELLED`. + * @since v8.3.0 + */ + cancel(): void; + getServers: typeof getServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCaa: typeof resolveCaa; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTlsa: typeof resolveTlsa; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + /** + * The resolver instance will send its requests from the specified IP address. + * This allows programs to specify outbound interfaces when used on multi-homed + * systems. + * + * If a v4 or v6 address is not specified, it is set to the default and the + * operating system will choose a local address automatically. + * + * The resolver will use the v4 local address when making requests to IPv4 DNS + * servers, and the v6 local address when making requests to IPv6 DNS servers. + * The `rrtype` of resolution requests has no impact on the local address used. + * @since v15.1.0, v14.17.0 + * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. + * @param [ipv6='::0'] A string representation of an IPv6 address. + */ + setLocalAddress(ipv4?: string, ipv6?: string): void; + setServers: typeof setServers; + } +} +declare module "node:dns" { + export * as promises from "node:dns/promises"; +} +declare module "dns" { + export * from "node:dns"; +} diff --git a/node_modules/@types/node/dns/promises.d.ts b/node_modules/@types/node/dns/promises.d.ts new file mode 100644 index 0000000..9e7e1c9 --- /dev/null +++ b/node_modules/@types/node/dns/promises.d.ts @@ -0,0 +1,497 @@ +declare module "node:dns/promises" { + import { + AnyRecord, + CaaRecord, + LookupAddress, + LookupAllOptions, + LookupOneOptions, + LookupOptions, + MxRecord, + NaptrRecord, + RecordWithTtl, + ResolveOptions, + ResolverOptions, + ResolveWithTtlOptions, + SoaRecord, + SrvRecord, + TlsaRecord, + } from "node:dns"; + /** + * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), + * that are currently configured for DNS resolution. A string will include a port + * section if a custom port is used. + * + * ```js + * [ + * '4.4.4.4', + * '2001:4860:4860::8888', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ] + * ``` + * @since v10.6.0 + */ + function getServers(): string[]; + /** + * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or + * AAAA (IPv6) record. All `option` properties are optional. If `options` is an + * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4 + * and IPv6 addresses are both returned if found. + * + * With the `all` option set to `true`, the `Promise` is resolved with `addresses` being an array of objects with the properties `address` and `family`. + * + * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. + * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when + * the host name does not exist but also when the lookup fails in other ways + * such as no available file descriptors. + * + * [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options) does not necessarily have anything to do with the DNS + * protocol. The implementation uses an operating system facility that can + * associate names with addresses and vice versa. This implementation can have + * subtle but important consequences on the behavior of any Node.js program. Please + * take some time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) before + * using `dnsPromises.lookup()`. + * + * Example usage: + * + * ```js + * import dns from 'node:dns'; + * const dnsPromises = dns.promises; + * const options = { + * family: 6, + * hints: dns.ADDRCONFIG | dns.V4MAPPED, + * }; + * + * dnsPromises.lookup('example.com', options).then((result) => { + * console.log('address: %j family: IPv%s', result.address, result.family); + * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 + * }); + * + * // When options.all is true, the result will be an Array. + * options.all = true; + * dnsPromises.lookup('example.com', options).then((result) => { + * console.log('addresses: %j', result); + * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] + * }); + * ``` + * @since v10.6.0 + */ + function lookup(hostname: string, family: number): Promise; + function lookup(hostname: string, options: LookupOneOptions): Promise; + function lookup(hostname: string, options: LookupAllOptions): Promise; + function lookup(hostname: string, options: LookupOptions): Promise; + function lookup(hostname: string): Promise; + /** + * Resolves the given `address` and `port` into a host name and service using + * the operating system's underlying `getnameinfo` implementation. + * + * If `address` is not a valid IP address, a `TypeError` will be thrown. + * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. + * + * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. + * + * ```js + * import dnsPromises from 'node:dns'; + * dnsPromises.lookupService('127.0.0.1', 22).then((result) => { + * console.log(result.hostname, result.service); + * // Prints: localhost ssh + * }); + * ``` + * @since v10.6.0 + */ + function lookupService( + address: string, + port: number, + ): Promise<{ + hostname: string; + service: string; + }>; + /** + * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array + * of the resource records. When successful, the `Promise` is resolved with an + * array of resource records. The type and structure of individual results vary + * based on `rrtype`: + * + * + * + * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` + * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). + * @since v10.6.0 + * @param hostname Host name to resolve. + * @param [rrtype='A'] Resource record type. + */ + function resolve(hostname: string): Promise; + function resolve(hostname: string, rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; + function resolve(hostname: string, rrtype: "ANY"): Promise; + function resolve(hostname: string, rrtype: "CAA"): Promise; + function resolve(hostname: string, rrtype: "MX"): Promise; + function resolve(hostname: string, rrtype: "NAPTR"): Promise; + function resolve(hostname: string, rrtype: "SOA"): Promise; + function resolve(hostname: string, rrtype: "SRV"): Promise; + function resolve(hostname: string, rrtype: "TLSA"): Promise; + function resolve(hostname: string, rrtype: "TXT"): Promise; + function resolve(hostname: string, rrtype: string): Promise< + | string[] + | CaaRecord[] + | MxRecord[] + | NaptrRecord[] + | SoaRecord + | SrvRecord[] + | TlsaRecord[] + | string[][] + | AnyRecord[] + >; + /** + * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4 + * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`). + * @since v10.6.0 + * @param hostname Host name to resolve. + */ + function resolve4(hostname: string): Promise; + function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve4(hostname: string, options: ResolveOptions): Promise; + /** + * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv6 + * addresses. + * @since v10.6.0 + * @param hostname Host name to resolve. + */ + function resolve6(hostname: string): Promise; + function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve6(hostname: string, options: ResolveOptions): Promise; + /** + * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). + * On success, the `Promise` is resolved with an array containing various types of + * records. Each object has a property `type` that indicates the type of the + * current record. And depending on the `type`, additional properties will be + * present on the object: + * + * + * + * Here is an example of the result object: + * + * ```js + * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, + * { type: 'CNAME', value: 'example.com' }, + * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, + * { type: 'NS', value: 'ns1.example.com' }, + * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, + * { type: 'SOA', + * nsname: 'ns1.example.com', + * hostmaster: 'admin.example.com', + * serial: 156696742, + * refresh: 900, + * retry: 900, + * expire: 1800, + * minttl: 60 } ]; + * ``` + * @since v10.6.0 + */ + function resolveAny(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success, + * the `Promise` is resolved with an array of objects containing available + * certification authority authorization records available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`). + * @since v15.0.0, v14.17.0 + */ + function resolveCaa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success, + * the `Promise` is resolved with an array of canonical name records available for + * the `hostname` (e.g. `['bar.example.com']`). + * @since v10.6.0 + */ + function resolveCname(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects + * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`). + * @since v10.6.0 + */ + function resolveMx(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. On success, the `Promise` is resolved with an array + * of objects with the following properties: + * + * * `flags` + * * `service` + * * `regexp` + * * `replacement` + * * `order` + * * `preference` + * + * ```js + * { + * flags: 's', + * service: 'SIP+D2U', + * regexp: '', + * replacement: '_sip._udp.example.com', + * order: 30, + * preference: 100, + * } + * ``` + * @since v10.6.0 + */ + function resolveNaptr(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. On success, the `Promise` is resolved with an array of name server + * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`). + * @since v10.6.0 + */ + function resolveNs(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. On success, the `Promise` is resolved with an array of strings + * containing the reply records. + * @since v10.6.0 + */ + function resolvePtr(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for + * the `hostname`. On success, the `Promise` is resolved with an object with the + * following properties: + * + * * `nsname` + * * `hostmaster` + * * `serial` + * * `refresh` + * * `retry` + * * `expire` + * * `minttl` + * + * ```js + * { + * nsname: 'ns.example.com', + * hostmaster: 'root.example.com', + * serial: 2013101809, + * refresh: 10000, + * retry: 2400, + * expire: 604800, + * minttl: 3600, + * } + * ``` + * @since v10.6.0 + */ + function resolveSoa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects with + * the following properties: + * + * * `priority` + * * `weight` + * * `port` + * * `name` + * + * ```js + * { + * priority: 10, + * weight: 5, + * port: 21223, + * name: 'service.example.com', + * } + * ``` + * @since v10.6.0 + */ + function resolveSrv(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for + * the `hostname`. On success, the `Promise` is resolved with an array of objectsAdd commentMore actions + * with these properties: + * + * * `certUsage` + * * `selector` + * * `match` + * * `data` + * + * ```js + * { + * certUsage: 3, + * selector: 1, + * match: 1, + * data: [ArrayBuffer], + * } + * ``` + * @since v23.9.0, v22.15.0 + */ + function resolveTlsa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with a two-dimensional array + * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of + * one record. Depending on the use case, these could be either joined together or + * treated separately. + * @since v10.6.0 + */ + function resolveTxt(hostname: string): Promise; + /** + * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an + * array of host names. + * + * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` + * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). + * @since v10.6.0 + */ + function reverse(ip: string): Promise; + /** + * Get the default value for `verbatim` in {@link lookup} and [dnsPromises.lookup()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options). + * The value could be: + * + * * `ipv4first`: for `verbatim` defaulting to `false`. + * * `verbatim`: for `verbatim` defaulting to `true`. + * @since v20.1.0 + */ + function getDefaultResultOrder(): "ipv4first" | "verbatim"; + /** + * Sets the IP address and port of servers to be used when performing DNS + * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted + * addresses. If the port is the IANA default DNS port (53) it can be omitted. + * + * ```js + * dnsPromises.setServers([ + * '4.4.4.4', + * '[2001:4860:4860::8888]', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ]); + * ``` + * + * An error will be thrown if an invalid address is provided. + * + * The `dnsPromises.setServers()` method must not be called while a DNS query is in + * progress. + * + * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). + * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with + * subsequent servers provided. Fallback DNS servers will only be used if the + * earlier ones time out or result in some other error. + * @since v10.6.0 + * @param servers array of `RFC 5952` formatted addresses + */ + function setServers(servers: readonly string[]): void; + /** + * Set the default value of `order` in `dns.lookup()` and `{@link lookup}`. The value could be: + * + * * `ipv4first`: sets default `order` to `ipv4first`. + * * `ipv6first`: sets default `order` to `ipv6first`. + * * `verbatim`: sets default `order` to `verbatim`. + * + * The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) + * have higher priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). + * When using [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), [`dnsPromises.setDefaultResultOrder()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) + * from the main thread won't affect the default dns orders in workers. + * @since v16.4.0, v14.18.0 + * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. + */ + function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; + // Error codes + const NODATA: "ENODATA"; + const FORMERR: "EFORMERR"; + const SERVFAIL: "ESERVFAIL"; + const NOTFOUND: "ENOTFOUND"; + const NOTIMP: "ENOTIMP"; + const REFUSED: "EREFUSED"; + const BADQUERY: "EBADQUERY"; + const BADNAME: "EBADNAME"; + const BADFAMILY: "EBADFAMILY"; + const BADRESP: "EBADRESP"; + const CONNREFUSED: "ECONNREFUSED"; + const TIMEOUT: "ETIMEOUT"; + const EOF: "EOF"; + const FILE: "EFILE"; + const NOMEM: "ENOMEM"; + const DESTRUCTION: "EDESTRUCTION"; + const BADSTR: "EBADSTR"; + const BADFLAGS: "EBADFLAGS"; + const NONAME: "ENONAME"; + const BADHINTS: "EBADHINTS"; + const NOTINITIALIZED: "ENOTINITIALIZED"; + const LOADIPHLPAPI: "ELOADIPHLPAPI"; + const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS"; + const CANCELLED: "ECANCELLED"; + + /** + * An independent resolver for DNS requests. + * + * Creating a new resolver uses the default server settings. Setting + * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetserversservers) does not affect + * other resolvers: + * + * ```js + * import { promises } from 'node:dns'; + * const resolver = new promises.Resolver(); + * resolver.setServers(['4.4.4.4']); + * + * // This request will use the server at 4.4.4.4, independent of global settings. + * resolver.resolve4('example.org').then((addresses) => { + * // ... + * }); + * + * // Alternatively, the same code can be written using async-await style. + * (async function() { + * const addresses = await resolver.resolve4('example.org'); + * })(); + * ``` + * + * The following methods from the `dnsPromises` API are available: + * + * * `resolver.getServers()` + * * `resolver.resolve()` + * * `resolver.resolve4()` + * * `resolver.resolve6()` + * * `resolver.resolveAny()` + * * `resolver.resolveCaa()` + * * `resolver.resolveCname()` + * * `resolver.resolveMx()` + * * `resolver.resolveNaptr()` + * * `resolver.resolveNs()` + * * `resolver.resolvePtr()` + * * `resolver.resolveSoa()` + * * `resolver.resolveSrv()` + * * `resolver.resolveTxt()` + * * `resolver.reverse()` + * * `resolver.setServers()` + * @since v10.6.0 + */ + class Resolver { + constructor(options?: ResolverOptions); + /** + * Cancel all outstanding DNS queries made by this resolver. The corresponding + * callbacks will be called with an error with code `ECANCELLED`. + * @since v8.3.0 + */ + cancel(): void; + getServers: typeof getServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCaa: typeof resolveCaa; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTlsa: typeof resolveTlsa; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + /** + * The resolver instance will send its requests from the specified IP address. + * This allows programs to specify outbound interfaces when used on multi-homed + * systems. + * + * If a v4 or v6 address is not specified, it is set to the default and the + * operating system will choose a local address automatically. + * + * The resolver will use the v4 local address when making requests to IPv4 DNS + * servers, and the v6 local address when making requests to IPv6 DNS servers. + * The `rrtype` of resolution requests has no impact on the local address used. + * @since v15.1.0, v14.17.0 + * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. + * @param [ipv6='::0'] A string representation of an IPv6 address. + */ + setLocalAddress(ipv4?: string, ipv6?: string): void; + setServers: typeof setServers; + } +} +declare module "dns/promises" { + export * from "node:dns/promises"; +} diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts new file mode 100644 index 0000000..8e03a7d --- /dev/null +++ b/node_modules/@types/node/domain.d.ts @@ -0,0 +1,150 @@ +declare module "node:domain" { + import { EventEmitter } from "node:events"; + /** + * The `Domain` class encapsulates the functionality of routing errors and + * uncaught exceptions to the active `Domain` object. + * + * To handle the errors that it catches, listen to its `'error'` event. + */ + class Domain extends EventEmitter { + /** + * An array of event emitters that have been explicitly added to the domain. + */ + members: EventEmitter[]; + /** + * The `enter()` method is plumbing used by the `run()`, `bind()`, and `intercept()` methods to set the active domain. It sets `domain.active` and `process.domain` to the domain, and implicitly + * pushes the domain onto the domain + * stack managed by the domain module (see {@link exit} for details on the + * domain stack). The call to `enter()` delimits the beginning of a chain of + * asynchronous calls and I/O operations bound to a domain. + * + * Calling `enter()` changes only the active domain, and does not alter the domain + * itself. `enter()` and `exit()` can be called an arbitrary number of times on a + * single domain. + */ + enter(): void; + /** + * The `exit()` method exits the current domain, popping it off the domain stack. + * Any time execution is going to switch to the context of a different chain of + * asynchronous calls, it's important to ensure that the current domain is exited. + * The call to `exit()` delimits either the end of or an interruption to the chain + * of asynchronous calls and I/O operations bound to a domain. + * + * If there are multiple, nested domains bound to the current execution context, `exit()` will exit any domains nested within this domain. + * + * Calling `exit()` changes only the active domain, and does not alter the domain + * itself. `enter()` and `exit()` can be called an arbitrary number of times on a + * single domain. + */ + exit(): void; + /** + * Run the supplied function in the context of the domain, implicitly + * binding all event emitters, timers, and low-level requests that are + * created in that context. Optionally, arguments can be passed to + * the function. + * + * This is the most basic way to use a domain. + * + * ```js + * import domain from 'node:domain'; + * import fs from 'node:fs'; + * const d = domain.create(); + * d.on('error', (er) => { + * console.error('Caught error!', er); + * }); + * d.run(() => { + * process.nextTick(() => { + * setTimeout(() => { // Simulating some various async stuff + * fs.open('non-existent file', 'r', (er, fd) => { + * if (er) throw er; + * // proceed... + * }); + * }, 100); + * }); + * }); + * ``` + * + * In this example, the `d.on('error')` handler will be triggered, rather + * than crashing the program. + */ + run(fn: (...args: any[]) => T, ...args: any[]): T; + /** + * Explicitly adds an emitter to the domain. If any event handlers called by + * the emitter throw an error, or if the emitter emits an `'error'` event, it + * will be routed to the domain's `'error'` event, just like with implicit + * binding. + * + * If the `EventEmitter` was already bound to a domain, it is removed from that + * one, and bound to this one instead. + * @param emitter emitter to be added to the domain + */ + add(emitter: EventEmitter): void; + /** + * The opposite of {@link add}. Removes domain handling from the + * specified emitter. + * @param emitter emitter to be removed from the domain + */ + remove(emitter: EventEmitter): void; + /** + * The returned function will be a wrapper around the supplied callback + * function. When the returned function is called, any errors that are + * thrown will be routed to the domain's `'error'` event. + * + * ```js + * const d = domain.create(); + * + * function readSomeFile(filename, cb) { + * fs.readFile(filename, 'utf8', d.bind((er, data) => { + * // If this throws, it will also be passed to the domain. + * return cb(er, data ? JSON.parse(data) : null); + * })); + * } + * + * d.on('error', (er) => { + * // An error occurred somewhere. If we throw it now, it will crash the program + * // with the normal line number and stack message. + * }); + * ``` + * @param callback The callback function + * @return The bound function + */ + bind(callback: T): T; + /** + * This method is almost identical to {@link bind}. However, in + * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function. + * + * In this way, the common `if (err) return callback(err);` pattern can be replaced + * with a single error handler in a single place. + * + * ```js + * const d = domain.create(); + * + * function readSomeFile(filename, cb) { + * fs.readFile(filename, 'utf8', d.intercept((data) => { + * // Note, the first argument is never passed to the + * // callback since it is assumed to be the 'Error' argument + * // and thus intercepted by the domain. + * + * // If this throws, it will also be passed to the domain + * // so the error-handling logic can be moved to the 'error' + * // event on the domain instead of being repeated throughout + * // the program. + * return cb(null, JSON.parse(data)); + * })); + * } + * + * d.on('error', (er) => { + * // An error occurred somewhere. If we throw it now, it will crash the program + * // with the normal line number and stack message. + * }); + * ``` + * @param callback The callback function + * @return The intercepted function + */ + intercept(callback: T): T; + } + function create(): Domain; +} +declare module "domain" { + export * from "node:domain"; +} diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts new file mode 100644 index 0000000..3191046 --- /dev/null +++ b/node_modules/@types/node/events.d.ts @@ -0,0 +1,1008 @@ +declare module "node:events" { + import { AsyncResource, AsyncResourceOptions } from "node:async_hooks"; + // #region Event map helpers + type EventMap = Record; + type IfEventMap, True, False> = {} extends Events ? False : True; + type Args, EventName extends string | symbol> = IfEventMap< + Events, + EventName extends keyof Events ? Events[EventName] + : EventName extends keyof EventEmitterEventMap ? EventEmitterEventMap[EventName] + : any[], + any[] + >; + type EventNames, EventName extends string | symbol> = IfEventMap< + Events, + EventName | (keyof Events & (string | symbol)) | keyof EventEmitterEventMap, + string | symbol + >; + type Listener, EventName extends string | symbol> = IfEventMap< + Events, + ( + ...args: EventName extends keyof Events ? Events[EventName] + : EventName extends keyof EventEmitterEventMap ? EventEmitterEventMap[EventName] + : any[] + ) => void, + (...args: any[]) => void + >; + interface EventEmitterEventMap { + newListener: [eventName: string | symbol, listener: (...args: any[]) => void]; + removeListener: [eventName: string | symbol, listener: (...args: any[]) => void]; + } + // #endregion + interface EventEmitterOptions { + /** + * It enables + * [automatic capturing of promise rejection](https://nodejs.org/docs/latest-v26.x/api/events.html#capture-rejections-of-promises). + * @default false + */ + captureRejections?: boolean | undefined; + } + /** + * The `EventEmitter` class is defined and exposed by the `node:events` module: + * + * ```js + * import { EventEmitter } from 'node:events'; + * ``` + * + * All `EventEmitter`s emit the event `'newListener'` when new listeners are + * added and `'removeListener'` when existing listeners are removed. + * + * It supports the following option: + * @since v0.1.26 + */ + class EventEmitter = any> { + constructor(options?: EventEmitterOptions); + } + interface EventEmitter = any> extends NodeJS.EventEmitter {} + global { + namespace NodeJS { + interface EventEmitter = any> { + /** + * The `Symbol.for('nodejs.rejection')` method is called in case a + * promise rejection happens when emitting an event and + * `captureRejections` is enabled on the emitter. + * It is possible to use `events.captureRejectionSymbol` in + * place of `Symbol.for('nodejs.rejection')`. + * + * ```js + * import { EventEmitter, captureRejectionSymbol } from 'node:events'; + * + * class MyClass extends EventEmitter { + * constructor() { + * super({ captureRejections: true }); + * } + * + * [captureRejectionSymbol](err, event, ...args) { + * console.log('rejection happened for', event, 'with', err, ...args); + * this.destroy(err); + * } + * + * destroy(err) { + * // Tear the resource down here. + * } + * } + * ``` + * @since v13.4.0, v12.16.0 + */ + [EventEmitter.captureRejectionSymbol]?(error: Error, event: string | symbol, ...args: any[]): void; + /** + * Alias for `emitter.on(eventName, listener)`. + * @since v0.1.26 + */ + addListener(eventName: EventNames, listener: Listener): this; + /** + * Synchronously calls each of the listeners registered for the event named + * `eventName`, in the order they were registered, passing the supplied arguments + * to each. + * + * Returns `true` if the event had listeners, `false` otherwise. + * + * ```js + * import { EventEmitter } from 'node:events'; + * const myEmitter = new EventEmitter(); + * + * // First listener + * myEmitter.on('event', function firstListener() { + * console.log('Helloooo! first listener'); + * }); + * // Second listener + * myEmitter.on('event', function secondListener(arg1, arg2) { + * console.log(`event with parameters ${arg1}, ${arg2} in second listener`); + * }); + * // Third listener + * myEmitter.on('event', function thirdListener(...args) { + * const parameters = args.join(', '); + * console.log(`event with parameters ${parameters} in third listener`); + * }); + * + * console.log(myEmitter.listeners('event')); + * + * myEmitter.emit('event', 1, 2, 3, 4, 5); + * + * // Prints: + * // [ + * // [Function: firstListener], + * // [Function: secondListener], + * // [Function: thirdListener] + * // ] + * // Helloooo! first listener + * // event with parameters 1, 2 in second listener + * // event with parameters 1, 2, 3, 4, 5 in third listener + * ``` + * @since v0.1.26 + */ + emit(eventName: EventNames, ...args: Args): boolean; + /** + * Returns an array listing the events for which the emitter has registered + * listeners. + * + * ```js + * import { EventEmitter } from 'node:events'; + * + * const myEE = new EventEmitter(); + * myEE.on('foo', () => {}); + * myEE.on('bar', () => {}); + * + * const sym = Symbol('symbol'); + * myEE.on(sym, () => {}); + * + * console.log(myEE.eventNames()); + * // Prints: [ 'foo', 'bar', Symbol(symbol) ] + * ``` + * @since v6.0.0 + */ + eventNames(): (string | symbol)[]; + /** + * Returns the current max listener value for the `EventEmitter` which is either + * set by `emitter.setMaxListeners(n)` or defaults to + * `events.defaultMaxListeners`. + * @since v1.0.0 + */ + getMaxListeners(): number; + /** + * Returns the number of listeners listening for the event named `eventName`. + * If `listener` is provided, it will return how many times the listener is found + * in the list of the listeners of the event. + * @since v3.2.0 + * @param eventName The name of the event being listened for + * @param listener The event handler function + */ + listenerCount( + eventName: EventNames, + listener?: Listener, + ): number; + /** + * Returns a copy of the array of listeners for the event named `eventName`. + * + * ```js + * server.on('connection', (stream) => { + * console.log('someone connected!'); + * }); + * console.log(util.inspect(server.listeners('connection'))); + * // Prints: [ [Function] ] + * ``` + * @since v0.1.26 + */ + listeners(eventName: EventNames): Listener[]; + /** + * Alias for `emitter.removeListener()`. + * @since v10.0.0 + */ + off(eventName: EventNames, listener: Listener): this; + /** + * Adds the `listener` function to the end of the listeners array for the + * event named `eventName`. No checks are made to see if the `listener` has + * already been added. Multiple calls passing the same combination of `eventName` + * and `listener` will result in the `listener` being added, and called, multiple + * times. + * + * ```js + * server.on('connection', (stream) => { + * console.log('someone connected!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * + * By default, event listeners are invoked in the order they are added. The + * `emitter.prependListener()` method can be used as an alternative to add the + * event listener to the beginning of the listeners array. + * + * ```js + * import { EventEmitter } from 'node:events'; + * const myEE = new EventEmitter(); + * myEE.on('foo', () => console.log('a')); + * myEE.prependListener('foo', () => console.log('b')); + * myEE.emit('foo'); + * // Prints: + * // b + * // a + * ``` + * @since v0.1.101 + * @param eventName The name of the event. + * @param listener The callback function + */ + on(eventName: EventNames, listener: Listener): this; + /** + * Adds a **one-time** `listener` function for the event named `eventName`. The + * next time `eventName` is triggered, this listener is removed and then invoked. + * + * ```js + * server.once('connection', (stream) => { + * console.log('Ah, we have our first user!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * + * By default, event listeners are invoked in the order they are added. The + * `emitter.prependOnceListener()` method can be used as an alternative to add the + * event listener to the beginning of the listeners array. + * + * ```js + * import { EventEmitter } from 'node:events'; + * const myEE = new EventEmitter(); + * myEE.once('foo', () => console.log('a')); + * myEE.prependOnceListener('foo', () => console.log('b')); + * myEE.emit('foo'); + * // Prints: + * // b + * // a + * ``` + * @since v0.3.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + once(eventName: EventNames, listener: Listener): this; + /** + * Adds the `listener` function to the _beginning_ of the listeners array for the + * event named `eventName`. No checks are made to see if the `listener` has + * already been added. Multiple calls passing the same combination of `eventName` + * and `listener` will result in the `listener` being added, and called, multiple + * times. + * + * ```js + * server.prependListener('connection', (stream) => { + * console.log('someone connected!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v6.0.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + prependListener(eventName: EventNames, listener: Listener): this; + /** + * Adds a **one-time** `listener` function for the event named `eventName` to the + * _beginning_ of the listeners array. The next time `eventName` is triggered, this + * listener is removed, and then invoked. + * + * ```js + * server.prependOnceListener('connection', (stream) => { + * console.log('Ah, we have our first user!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v6.0.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + prependOnceListener( + eventName: EventNames, + listener: Listener, + ): this; + /** + * Returns a copy of the array of listeners for the event named `eventName`, + * including any wrappers (such as those created by `.once()`). + * + * ```js + * import { EventEmitter } from 'node:events'; + * const emitter = new EventEmitter(); + * emitter.once('log', () => console.log('log once')); + * + * // Returns a new Array with a function `onceWrapper` which has a property + * // `listener` which contains the original listener bound above + * const listeners = emitter.rawListeners('log'); + * const logFnWrapper = listeners[0]; + * + * // Logs "log once" to the console and does not unbind the `once` event + * logFnWrapper.listener(); + * + * // Logs "log once" to the console and removes the listener + * logFnWrapper(); + * + * emitter.on('log', () => console.log('log persistently')); + * // Will return a new Array with a single function bound by `.on()` above + * const newListeners = emitter.rawListeners('log'); + * + * // Logs "log persistently" twice + * newListeners[0](); + * emitter.emit('log'); + * ``` + * @since v9.4.0 + */ + rawListeners(eventName: EventNames): Listener[]; + /** + * Removes all listeners, or those of the specified `eventName`. + * + * It is bad practice to remove listeners added elsewhere in the code, + * particularly when the `EventEmitter` instance was created by some other + * component or module (e.g. sockets or file streams). + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.1.26 + */ + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: EventNames): this; + /** + * Removes the specified `listener` from the listener array for the event named + * `eventName`. + * + * ```js + * const callback = (stream) => { + * console.log('someone connected!'); + * }; + * server.on('connection', callback); + * // ... + * server.removeListener('connection', callback); + * ``` + * + * `removeListener()` will remove, at most, one instance of a listener from the + * listener array. If any single listener has been added multiple times to the + * listener array for the specified `eventName`, then `removeListener()` must be + * called multiple times to remove each instance. + * + * Once an event is emitted, all listeners attached to it at the + * time of emitting are called in order. This implies that any + * `removeListener()` or `removeAllListeners()` calls _after_ emitting and + * _before_ the last listener finishes execution will not remove them from + * `emit()` in progress. Subsequent events behave as expected. + * + * ```js + * import { EventEmitter } from 'node:events'; + * class MyEmitter extends EventEmitter {} + * const myEmitter = new MyEmitter(); + * + * const callbackA = () => { + * console.log('A'); + * myEmitter.removeListener('event', callbackB); + * }; + * + * const callbackB = () => { + * console.log('B'); + * }; + * + * myEmitter.on('event', callbackA); + * + * myEmitter.on('event', callbackB); + * + * // callbackA removes listener callbackB but it will still be called. + * // Internal listener array at time of emit [callbackA, callbackB] + * myEmitter.emit('event'); + * // Prints: + * // A + * // B + * + * // callbackB is now removed. + * // Internal listener array [callbackA] + * myEmitter.emit('event'); + * // Prints: + * // A + * ``` + * + * Because listeners are managed using an internal array, calling this will + * change the position indexes of any listener registered _after_ the listener + * being removed. This will not impact the order in which listeners are called, + * but it means that any copies of the listener array as returned by + * the `emitter.listeners()` method will need to be recreated. + * + * When a single function has been added as a handler multiple times for a single + * event (as in the example below), `removeListener()` will remove the most + * recently added instance. In the example the `once('ping')` + * listener is removed: + * + * ```js + * import { EventEmitter } from 'node:events'; + * const ee = new EventEmitter(); + * + * function pong() { + * console.log('pong'); + * } + * + * ee.on('ping', pong); + * ee.once('ping', pong); + * ee.removeListener('ping', pong); + * + * ee.emit('ping'); + * ee.emit('ping'); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.1.26 + */ + removeListener(eventName: EventNames, listener: Listener): this; + /** + * By default `EventEmitter`s will print a warning if more than `10` listeners are + * added for a particular event. This is a useful default that helps finding + * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be + * modified for this specific `EventEmitter` instance. The value can be set to + * `Infinity` (or `0`) to indicate an unlimited number of listeners. + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.3.5 + */ + setMaxListeners(n: number): this; + } + } + } + namespace EventEmitter { + export { EventEmitter, EventEmitterEventMap, EventEmitterOptions }; + } + namespace EventEmitter { + interface Abortable { + signal?: AbortSignal | undefined; + } + /** + * See how to write a custom [rejection handler](https://nodejs.org/docs/latest-v26.x/api/events.html#emittersymbolfornodejsrejectionerr-eventname-args). + * @since v13.4.0, v12.16.0 + */ + const captureRejectionSymbol: unique symbol; + /** + * Change the default `captureRejections` option on all new `EventEmitter` objects. + * @since v13.4.0, v12.16.0 + */ + let captureRejections: boolean; + /** + * By default, a maximum of `10` listeners can be registered for any single + * event. This limit can be changed for individual `EventEmitter` instances + * using the `emitter.setMaxListeners(n)` method. To change the default + * for _all_ `EventEmitter` instances, the `events.defaultMaxListeners` + * property can be used. If this value is not a positive number, a `RangeError` + * is thrown. + * + * Take caution when setting the `events.defaultMaxListeners` because the + * change affects _all_ `EventEmitter` instances, including those created before + * the change is made. However, calling `emitter.setMaxListeners(n)` still has + * precedence over `events.defaultMaxListeners`. + * + * This is not a hard limit. The `EventEmitter` instance will allow + * more listeners to be added but will output a trace warning to stderr indicating + * that a "possible EventEmitter memory leak" has been detected. For any single + * `EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` + * methods can be used to temporarily avoid this warning: + * + * `defaultMaxListeners` has no effect on `AbortSignal` instances. While it is + * still possible to use `emitter.setMaxListeners(n)` to set a warning limit + * for individual `AbortSignal` instances, per default `AbortSignal` instances will not warn. + * + * ```js + * import { EventEmitter } from 'node:events'; + * const emitter = new EventEmitter(); + * emitter.setMaxListeners(emitter.getMaxListeners() + 1); + * emitter.once('event', () => { + * // do stuff + * emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); + * }); + * ``` + * + * The `--trace-warnings` command-line flag can be used to display the + * stack trace for such warnings. + * + * The emitted warning can be inspected with `process.on('warning')` and will + * have the additional `emitter`, `type`, and `count` properties, referring to + * the event emitter instance, the event's name and the number of attached + * listeners, respectively. + * Its `name` property is set to `'MaxListenersExceededWarning'`. + * @since v0.11.2 + */ + let defaultMaxListeners: number; + /** + * This symbol shall be used to install a listener for only monitoring `'error'` + * events. Listeners installed using this symbol are called before the regular + * `'error'` listeners are called. + * + * Installing a listener using this symbol does not change the behavior once an + * `'error'` event is emitted. Therefore, the process will still crash if no + * regular `'error'` listener is installed. + * @since v13.6.0, v12.17.0 + */ + const errorMonitor: unique symbol; + /** + * Listens once to the `abort` event on the provided `signal`. + * + * Listening to the `abort` event on abort signals is unsafe and may + * lead to resource leaks since another third party with the signal can + * call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change + * this since it would violate the web standard. Additionally, the original + * API makes it easy to forget to remove listeners. + * + * This API allows safely using `AbortSignal`s in Node.js APIs by solving these + * two issues by listening to the event such that `stopImmediatePropagation` does + * not prevent the listener from running. + * + * Returns a disposable so that it may be unsubscribed from more easily. + * + * ```js + * import { addAbortListener } from 'node:events'; + * + * function example(signal) { + * signal.addEventListener('abort', (e) => e.stopImmediatePropagation()); + * // addAbortListener() returns a disposable, so the `using` keyword ensures + * // the abort listener is automatically removed when this scope exits. + * using _ = addAbortListener(signal, (e) => { + * // Do something when signal is aborted. + * }); + * } + * ``` + * @since v20.5.0 + * @return Disposable that removes the `abort` listener. + */ + function addAbortListener(signal: AbortSignal, resource: (event: Event) => void): Disposable; + /** + * Returns a copy of the array of listeners for the event named `eventName`. + * + * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on + * the emitter. + * + * For `EventTarget`s this is the only way to get the event listeners for the + * event target. This is useful for debugging and diagnostic purposes. + * + * ```js + * import { getEventListeners, EventEmitter } from 'node:events'; + * + * { + * const ee = new EventEmitter(); + * const listener = () => console.log('Events are fun'); + * ee.on('foo', listener); + * console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ] + * } + * { + * const et = new EventTarget(); + * const listener = () => console.log('Events are fun'); + * et.addEventListener('foo', listener); + * console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ] + * } + * ``` + * @since v15.2.0, v14.17.0 + */ + function getEventListeners(emitter: EventEmitter, name: string | symbol): ((...args: any[]) => void)[]; + function getEventListeners(emitter: EventTarget, name: string): ((...args: any[]) => void)[]; + /** + * Returns the currently set max amount of listeners. + * + * For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on + * the emitter. + * + * For `EventTarget`s this is the only way to get the max event listeners for the + * event target. If the number of event handlers on a single EventTarget exceeds + * the max set, the EventTarget will print a warning. + * + * ```js + * import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events'; + * + * { + * const ee = new EventEmitter(); + * console.log(getMaxListeners(ee)); // 10 + * setMaxListeners(11, ee); + * console.log(getMaxListeners(ee)); // 11 + * } + * { + * const et = new EventTarget(); + * console.log(getMaxListeners(et)); // 10 + * setMaxListeners(11, et); + * console.log(getMaxListeners(et)); // 11 + * } + * ``` + * @since v19.9.0 + */ + function getMaxListeners(emitter: EventEmitter | EventTarget): number; + /** + * Returns the number of registered listeners for the event named `eventName`. + * + * For `EventEmitter`s this behaves exactly the same as calling `.listenerCount` + * on the emitter. + * + * For `EventTarget`s this is the only way to obtain the listener count. This can + * be useful for debugging and diagnostic purposes. + * @since v0.9.12 + */ + function listenerCount(emitter: EventEmitter, eventName: string | symbol): number; + function listenerCount(emitter: EventTarget, eventName: string): number; + interface OnOptions extends Abortable { + /** + * Names of events that will end the iteration. + */ + close?: readonly string[] | undefined; + /** + * The high watermark. The emitter is paused every time the size of events + * being buffered is higher than it. Supported only on emitters implementing + * `pause()` and `resume()` methods. + * @default Number.MAX_SAFE_INTEGER + */ + highWaterMark?: number | undefined; + /** + * The low watermark. The emitter is resumed every time the size of events + * being buffered is lower than it. Supported only on emitters implementing + * `pause()` and `resume()` methods. + * @default 1 + */ + lowWaterMark?: number | undefined; + } + /** + * ```js + * import { on, EventEmitter } from 'node:events'; + * import process from 'node:process'; + * + * const ee = new EventEmitter(); + * + * // Emit later on + * process.nextTick(() => { + * ee.emit('foo', 'bar'); + * ee.emit('foo', 42); + * }); + * + * for await (const event of on(ee, 'foo')) { + * // The execution of this inner block is synchronous and it + * // processes one event at a time (even with await). Do not use + * // if concurrent execution is required. + * console.log(event); // prints ['bar'] [42] + * } + * // Unreachable here + * ``` + * + * Returns an `AsyncIterator` that iterates `eventName` events. It will throw + * if the `EventEmitter` emits `'error'`. It removes all listeners when + * exiting the loop. The `value` returned by each iteration is an array + * composed of the emitted event arguments. + * + * An `AbortSignal` can be used to cancel waiting on events: + * + * ```js + * import { on, EventEmitter } from 'node:events'; + * import process from 'node:process'; + * + * const ac = new AbortController(); + * + * (async () => { + * const ee = new EventEmitter(); + * + * // Emit later on + * process.nextTick(() => { + * ee.emit('foo', 'bar'); + * ee.emit('foo', 42); + * }); + * + * for await (const event of on(ee, 'foo', { signal: ac.signal })) { + * // The execution of this inner block is synchronous and it + * // processes one event at a time (even with await). Do not use + * // if concurrent execution is required. + * console.log(event); // prints ['bar'] [42] + * } + * // Unreachable here + * })(); + * + * process.nextTick(() => ac.abort()); + * ``` + * @since v13.6.0, v12.16.0 + * @returns `AsyncIterator` that iterates `eventName` events emitted by the `emitter` + */ + function on( + emitter: EventEmitter, + eventName: string | symbol, + options?: OnOptions, + ): NodeJS.AsyncIterator; + function on( + emitter: EventTarget, + eventName: string, + options?: OnOptions, + ): NodeJS.AsyncIterator; + interface OnceOptions extends Abortable {} + /** + * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given + * event or that is rejected if the `EventEmitter` emits `'error'` while waiting. + * The `Promise` will resolve with an array of all the arguments emitted to the + * given event. + * + * This method is intentionally generic and works with the web platform + * [EventTarget][WHATWG-EventTarget] interface, which has no special + * `'error'` event semantics and does not listen to the `'error'` event. + * + * ```js + * import { once, EventEmitter } from 'node:events'; + * import process from 'node:process'; + * + * const ee = new EventEmitter(); + * + * process.nextTick(() => { + * ee.emit('myevent', 42); + * }); + * + * const [value] = await once(ee, 'myevent'); + * console.log(value); + * + * const err = new Error('kaboom'); + * process.nextTick(() => { + * ee.emit('error', err); + * }); + * + * try { + * await once(ee, 'myevent'); + * } catch (err) { + * console.error('error happened', err); + * } + * ``` + * + * The special handling of the `'error'` event is only used when `events.once()` + * is used to wait for another event. If `events.once()` is used to wait for the + * '`error'` event itself, then it is treated as any other kind of event without + * special handling: + * + * ```js + * import { EventEmitter, once } from 'node:events'; + * + * const ee = new EventEmitter(); + * + * once(ee, 'error') + * .then(([err]) => console.log('ok', err.message)) + * .catch((err) => console.error('error', err.message)); + * + * ee.emit('error', new Error('boom')); + * + * // Prints: ok boom + * ``` + * + * An `AbortSignal` can be used to cancel waiting for the event: + * + * ```js + * import { EventEmitter, once } from 'node:events'; + * + * const ee = new EventEmitter(); + * const ac = new AbortController(); + * + * async function foo(emitter, event, signal) { + * try { + * await once(emitter, event, { signal }); + * console.log('event emitted!'); + * } catch (error) { + * if (error.name === 'AbortError') { + * console.error('Waiting for the event was canceled!'); + * } else { + * console.error('There was an error', error.message); + * } + * } + * } + * + * foo(ee, 'foo', ac.signal); + * ac.abort(); // Prints: Waiting for the event was canceled! + * ``` + * @since v11.13.0, v10.16.0 + */ + function once( + emitter: EventEmitter, + eventName: string | symbol, + options?: OnceOptions, + ): Promise; + function once(emitter: EventTarget, eventName: string, options?: OnceOptions): Promise; + /** + * ```js + * import { setMaxListeners, EventEmitter } from 'node:events'; + * + * const target = new EventTarget(); + * const emitter = new EventEmitter(); + * + * setMaxListeners(5, target, emitter); + * ``` + * @since v15.4.0 + * @param n A non-negative number. The maximum number of listeners per `EventTarget` event. + * @param eventTargets Zero or more `EventTarget` + * or `EventEmitter` instances. If none are specified, `n` is set as the default + * max for all newly created `EventTarget` and `EventEmitter` objects. + * objects. + */ + function setMaxListeners(n: number, ...eventTargets: ReadonlyArray): void; + /** + * This is the interface from which event-emitting Node.js APIs inherit in the types package. + * **It is not intended for consumer use.** + * + * It provides event-mapped definitions similar to EventEmitter, except that its signatures + * are deliberately permissive: they provide type _hinting_, but not rigid type-checking, + * for compatibility reasons. + * + * Classes that inherit directly from EventEmitter in JavaScript can inherit directly from + * this interface in the type definitions. Classes that are more than one inheritance level + * away from EventEmitter (eg. `net.Socket` > `stream.Duplex` > `EventEmitter`) must instead + * copy these method definitions into the derived class. Search "#region InternalEventEmitter" + * for examples. + * @internal + */ + interface InternalEventEmitter> extends EventEmitter { + addListener(eventName: E, listener: (...args: T[E]) => void): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: T[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount(eventName: E, listener?: (...args: T[E]) => void): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: T[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: T[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: T[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: E, listener: (...args: T[E]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener(eventName: E, listener: (...args: T[E]) => void): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(eventName: E, listener: (...args: T[E]) => void): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: T[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener(eventName: E, listener: (...args: T[E]) => void): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + } + interface EventEmitterReferencingAsyncResource extends AsyncResource { + readonly eventEmitter: EventEmitterAsyncResource; + } + interface EventEmitterAsyncResourceOptions extends AsyncResourceOptions, EventEmitterOptions { + /** + * The type of async event. + * @default new.target.name + */ + name?: string | undefined; + } + /** + * Integrates `EventEmitter` with `AsyncResource` for `EventEmitter`s that + * require manual async tracking. Specifically, all events emitted by instances + * of `events.EventEmitterAsyncResource` will run within its [async context](https://nodejs.org/docs/latest-v26.x/api/async_context.html). + * + * ```js + * import { EventEmitterAsyncResource, EventEmitter } from 'node:events'; + * import { notStrictEqual, strictEqual } from 'node:assert'; + * import { executionAsyncId, triggerAsyncId } from 'node:async_hooks'; + * + * // Async tracking tooling will identify this as 'Q'. + * const ee1 = new EventEmitterAsyncResource({ name: 'Q' }); + * + * // 'foo' listeners will run in the EventEmitters async context. + * ee1.on('foo', () => { + * strictEqual(executionAsyncId(), ee1.asyncId); + * strictEqual(triggerAsyncId(), ee1.triggerAsyncId); + * }); + * + * const ee2 = new EventEmitter(); + * + * // 'foo' listeners on ordinary EventEmitters that do not track async + * // context, however, run in the same async context as the emit(). + * ee2.on('foo', () => { + * notStrictEqual(executionAsyncId(), ee2.asyncId); + * notStrictEqual(triggerAsyncId(), ee2.triggerAsyncId); + * }); + * + * Promise.resolve().then(() => { + * ee1.emit('foo'); + * ee2.emit('foo'); + * }); + * ``` + * + * The `EventEmitterAsyncResource` class has the same methods and takes the + * same options as `EventEmitter` and `AsyncResource` themselves. + * @since v17.4.0, v16.14.0 + */ + class EventEmitterAsyncResource extends EventEmitter { + constructor(options?: EventEmitterAsyncResourceOptions); + /** + * The unique `asyncId` assigned to the resource. + */ + readonly asyncId: number; + /** + * The returned `AsyncResource` object has an additional `eventEmitter` property + * that provides a reference to this `EventEmitterAsyncResource`. + */ + readonly asyncResource: EventEmitterReferencingAsyncResource; + /** + * Call all `destroy` hooks. This should only ever be called once. An error will + * be thrown if it is called more than once. This **must** be manually called. If + * the resource is left to be collected by the GC then the `destroy` hooks will + * never be called. + */ + emitDestroy(): void; + /** + * The same `triggerAsyncId` that is passed to the + * `AsyncResource` constructor. + */ + readonly triggerAsyncId: number; + } + /** + * The `NodeEventTarget` is a Node.js-specific extension to `EventTarget` + * that emulates a subset of the `EventEmitter` API. + * @since v14.5.0 + */ + interface NodeEventTarget extends EventTarget { + /** + * Node.js-specific extension to the `EventTarget` class that emulates the + * equivalent `EventEmitter` API. The only difference between `addListener()` and + * `addEventListener()` is that `addListener()` will return a reference to the + * `EventTarget`. + * @since v14.5.0 + */ + addListener(type: string, listener: (arg: any) => void): this; + /** + * Node.js-specific extension to the `EventTarget` class that dispatches the + * `arg` to the list of handlers for `type`. + * @since v15.2.0 + * @returns `true` if event listeners registered for the `type` exist, + * otherwise `false`. + */ + emit(type: string, arg: any): boolean; + /** + * Node.js-specific extension to the `EventTarget` class that returns an array + * of event `type` names for which event listeners are registered. + * @since 14.5.0 + */ + eventNames(): string[]; + /** + * Node.js-specific extension to the `EventTarget` class that returns the number + * of event listeners registered for the `type`. + * @since v14.5.0 + */ + listenerCount(type: string): number; + /** + * Node.js-specific extension to the `EventTarget` class that sets the number + * of max event listeners as `n`. + * @since v14.5.0 + */ + setMaxListeners(n: number): void; + /** + * Node.js-specific extension to the `EventTarget` class that returns the number + * of max event listeners. + * @since v14.5.0 + */ + getMaxListeners(): number; + /** + * Node.js-specific alias for `eventTarget.removeEventListener()`. + * @since v14.5.0 + */ + off(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this; + /** + * Node.js-specific alias for `eventTarget.addEventListener()`. + * @since v14.5.0 + */ + on(type: string, listener: (arg: any) => void): this; + /** + * Node.js-specific extension to the `EventTarget` class that adds a `once` + * listener for the given event `type`. This is equivalent to calling `on` + * with the `once` option set to `true`. + * @since v14.5.0 + */ + once(type: string, listener: (arg: any) => void): this; + /** + * Node.js-specific extension to the `EventTarget` class. If `type` is specified, + * removes all registered listeners for `type`, otherwise removes all registered + * listeners. + * @since v14.5.0 + */ + removeAllListeners(type?: string): this; + /** + * Node.js-specific extension to the `EventTarget` class that removes the + * `listener` for the given `type`. The only difference between `removeListener()` + * and `removeEventListener()` is that `removeListener()` will return a reference + * to the `EventTarget`. + * @since v14.5.0 + */ + removeListener(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this; + } + /** @internal */ + type InternalEventTargetEventProperties = { + [K in keyof T & string as `on${K}`]: ((ev: T[K]) => void) | null; + }; + } + export = EventEmitter; +} +declare module "events" { + import events = require("node:events"); + export = events; +} diff --git a/node_modules/@types/node/ffi.d.ts b/node_modules/@types/node/ffi.d.ts new file mode 100644 index 0000000..6b99320 --- /dev/null +++ b/node_modules/@types/node/ffi.d.ts @@ -0,0 +1,500 @@ +declare module "node:ffi" { + import { NonSharedBuffer } from "node:buffer"; + interface FunctionSignature { + return?: ReturnType | undefined; + arguments?: readonly ArgumentType[] | undefined; + } + interface FunctionDefinitions { + [symbol: string]: FunctionSignature; + } + type CallbackFunction = ( + ...args: { [K in keyof P]: ArgumentTypeMap[DataTypeMap[P[K]]] } + ) => ReturnTypeMap[DataTypeMap[R]]; + interface WrappedFunction + extends CallbackFunction + { + readonly pointer: bigint; + } + type CallbackFunctionFromSignature = CallbackFunction< + ReturnTypeFromFunctionSignature, + ArgumentTypesFromFunctionSignature + >; + type WrappedFunctionFromSignature = WrappedFunction< + ReturnTypeFromFunctionSignature, + ArgumentTypesFromFunctionSignature + >; + type WrappedFunctionsFromDefinitions = { + [K in keyof T]: WrappedFunctionFromSignature; + }; + type ReturnTypeFromFunctionSignature = "return" extends keyof T + ? T extends { return: infer R extends ReturnType } ? R : any + : "void"; + type ArgumentTypesFromFunctionSignature = "arguments" extends keyof T + ? T extends { arguments: infer P extends readonly ArgumentType[] } ? P : any[] + : []; + interface DynamicLibraryResult extends Disposable { + lib: DynamicLibrary; + functions: WrappedFunctionsFromDefinitions; + } + /** + * The native shared library suffix for the current platform: + * + * * `'dylib'` on macOS + * * `'so'` on Unix-like platforms + * * `'dll'` on Windows + * + * This can be used to build portable library paths: + * + * ```js + * const { suffix } = require('node:ffi'); + * + * const path = `libsqlite3.${suffix}`; + * ``` + * @since v26.1.0 + */ + const suffix: string; + /** + * Loads a dynamic library and resolves the requested function definitions. + * + * On Windows passing `null` is not supported. + * + * When `definitions` is omitted, `functions` is returned as an empty object until + * symbols are resolved explicitly. + * + * The returned object also implements the explicit resource management protocol, + * so it can be used with the `using` declaration. Disposing the returned + * object closes the library handle. + * + * ```js + * import { dlopen } from 'node:ffi'; + * + * { + * using handle = dlopen('./mylib.so', { + * add_i32: { arguments: ['i32', 'i32'], return: 'i32' }, + * }); + * console.log(handle.functions.add_i32(20, 22)); + * } // handle.lib.close() is invoked automatically here. + * ``` + * + * ```js + * import { dlopen } from 'node:ffi'; + * + * const { lib, functions } = dlopen('./mylib.so', { + * add_i32: { arguments: ['i32', 'i32'], return: 'i32' }, + * string_length: { arguments: ['pointer'], return: 'u64' }, + * }); + * + * console.log(functions.add_i32(20, 22)); + * ``` + * @since v26.1.0 + * @param path Path to a dynamic library, or `null` to resolve symbols + * from the current process image. + * @param definitions Symbol definitions to resolve immediately. + */ + function dlopen( + path: string | null, + definitions?: T, + ): DynamicLibraryResult; + /** + * Closes a dynamic library. + * + * This is equivalent to calling `handle.close()`. + * @since v26.1.0 + */ + function dlclose(handle: DynamicLibrary): void; + /** + * Resolves a symbol address from a loaded library. + * + * This is equivalent to calling `handle.getSymbol(symbol)`. + * @since v26.1.0 + */ + function dlsym(handle: DynamicLibrary, symbol: string): bigint; + /** + * @since v26.1.0 + */ + class DynamicLibrary { + /** + * Loads the dynamic library without resolving any functions eagerly. + * + * On Windows passing `null` is not supported. + * + * ```js + * const { DynamicLibrary } = require('node:ffi'); + * + * const lib = new DynamicLibrary('./mylib.so'); + * ``` + * @param path Path to a dynamic library, or `null` to resolve symbols + * from the current process image. + */ + constructor(path: string | null); + /** + * The path used to load the library. + */ + readonly path: string; + /** + * An object containing previously resolved symbol addresses as `bigint` values. + */ + readonly symbols: { [symbol: string]: bigint }; + /** + * Closes the library handle. + * + * `DynamicLibrary` implements the explicit resource management protocol, so a + * library instance can be managed with the `using` declaration. Leaving the + * enclosing scope invokes `library.close()` automatically. + * + * ```js + * import { DynamicLibrary } from 'node:ffi'; + * + * { + * using lib = new DynamicLibrary('./mylib.so'); + * // Use `lib` here; `lib.close()` is called when the block exits. + * } + * ``` + * + * Calling `library.close()` (or disposing the library) more than once is a no-op. + * + * After a library has been closed: + * + * * Resolved function wrappers become invalid. + * * Further symbol and function resolution throws. + * * Registered callbacks are invalidated. + * + * Closing a library does not make previously exported callback pointers safe to + * reuse. Node.js does not track or revoke callback pointers that have already + * been handed to native code. + * + * If native code still holds a callback pointer after `library.close()` or after + * `library.unregisterCallback(pointer)`, invoking that pointer has undefined + * behavior, is not allowed, and is dangerous: it can crash the process, produce + * incorrect output, or corrupt memory. Native code must stop using callback + * addresses before the library is closed or before the callback is unregistered. + * + * Calling `library.close()` from one of the library's active callbacks is + * unsupported and dangerous. The callback must return before the library is + * closed. + */ + close(): void; + /** + * Calls `library.close()`. This allows `DynamicLibrary` instances to be used with + * the `using` declaration for automatic cleanup when the enclosing scope + * exits. It is a no-op on a library that has already been closed. + * @since v26.1.0 + */ + [Symbol.dispose](): void; + /** + * Resolves a symbol and returns a callable JavaScript wrapper. + * + * The returned function has a `.pointer` property containing the native function + * address as a `bigint`. + * + * If the same symbol has already been resolved, requesting it again with a + * different signature throws. + * + * ```js + * const { DynamicLibrary } = require('node:ffi'); + * + * const lib = new DynamicLibrary('./mylib.so'); + * const add = lib.getFunction('add_i32', { + * arguments: ['i32', 'i32'], + * return: 'i32', + * }); + * + * console.log(add(20, 22)); + * console.log(add.pointer); + * ``` + */ + getFunction(name: string, signature: T): WrappedFunctionFromSignature; + /** + * When `definitions` is provided, resolves each named symbol and returns an + * object containing callable wrappers. + * + * When `definitions` is omitted, returns wrappers for all functions that have + * already been resolved on the library. + */ + getFunctions(): { [symbol: string]: WrappedFunction }; + getFunctions(definitions: T): WrappedFunctionsFromDefinitions; + /** + * Resolves a symbol and returns its native address as a `bigint`. + */ + getSymbol(name: string): bigint; + /** + * Returns an object containing all previously resolved symbol addresses. + */ + getSymbols(): Record; + /** + * Creates a native callback pointer backed by a JavaScript function. + * + * When `signature` is omitted, the callback uses a default `void ()` signature. + * + * The return value is the callback pointer address as a `bigint`. It can be + * passed to native functions expecting a callback pointer. + * + * ```js + * const { DynamicLibrary } = require('node:ffi'); + * + * const lib = new DynamicLibrary('./mylib.so'); + * + * const callback = lib.registerCallback( + * { arguments: ['i32'], return: 'i32' }, + * (value) => value * 2, + * ); + * ``` + * + * Callbacks are subject to the following restrictions: + * + * * They must be invoked on the same system thread where they were created. + * * They must not throw exceptions. + * * They must not return promises. + * * They must return a value compatible with the declared return type. + * * They must not call `library.close()` on their owning library while running. + * * They must not unregister themselves while running. + * + * Closing the owning library or unregistering the currently executing callback + * from inside the callback is unsupported and dangerous. Doing so may crash the + * process, produce incorrect output, or corrupt memory. + */ + registerCallback(callback: () => void): bigint; + registerCallback( + signature: T, + callback: CallbackFunctionFromSignature, + ): bigint; + /** + * Releases a callback previously created with `library.registerCallback()`. + * + * Calling `library.unregisterCallback(pointer)` for a callback that is currently + * executing is unsupported and dangerous. The callback must return before it is + * unregistered. + * + * After `library.unregisterCallback(pointer)` returns, invoking that callback + * pointer from native code has undefined behavior, is not allowed, and is + * dangerous: it can crash the process, produce incorrect output, or corrupt + * memory. + */ + unregisterCallback(pointer: bigint): void; + /** + * Keeps the callback strongly referenced by JavaScript. + */ + refCallback(pointer: bigint): void; + /** + * Allows the callback to become weakly referenced by JavaScript. + * + * If the callback function is later garbage collected, subsequent native + * invocations become a no-op. Non-void return values are zero-initialized before + * returning to native code. + */ + unrefCallback(pointer: bigint): void; + } + function getInt8(pointer: bigint, offset?: number): number; + function getUint8(pointer: bigint, offset?: number): number; + function getInt16(pointer: bigint, offset?: number): number; + function getUint16(pointer: bigint, offset?: number): number; + function getInt32(pointer: bigint, offset?: number): number; + function getUint32(pointer: bigint, offset?: number): number; + function getInt64(pointer: bigint, offset?: number): bigint; + function getUint64(pointer: bigint, offset?: number): bigint; + function getFloat32(pointer: bigint, offset?: number): number; + function getFloat64(pointer: bigint, offset?: number): number; + function setInt8(pointer: bigint, offset: number, value: number): void; + function setUint8(pointer: bigint, offset: number, value: number): void; + function setInt16(pointer: bigint, offset: number, value: number): void; + function setUint16(pointer: bigint, offset: number, value: number): void; + function setInt32(pointer: bigint, offset: number, value: number): void; + function setUint32(pointer: bigint, offset: number, value: number): void; + function setInt64(pointer: bigint, offset: number, value: number | bigint): void; + function setUint64(pointer: bigint, offset: number, value: number | bigint): void; + function setFloat32(pointer: bigint, offset: number, value: number): void; + function setFloat64(pointer: bigint, offset: number, value: number): void; + /** + * Reads a NUL-terminated UTF-8 string from native memory. + * + * If `pointer` is `0n`, `null` is returned. + * + * This function does not validate that `pointer` refers to readable memory or + * that the pointed-to data is terminated with `\0`. Passing an invalid pointer, + * a pointer to freed memory, or a pointer to bytes without a terminating NUL can + * read unrelated memory, crash the process, or produce truncated or garbled + * output. + * @since v26.1.0 + */ + function toString(pointer: bigint): string | null; + /** + * Creates a `Buffer` from native memory. + * + * When `copy` is `true`, the returned `Buffer` owns its own copied memory. + * When `copy` is `false`, the returned `Buffer` references the original native + * memory directly. + * + * Using `copy: false` is a zero-copy escape hatch. The returned `Buffer` is a + * writable view onto foreign memory, so writes in JavaScript update the original + * native memory directly. The caller must guarantee that: + * + * * `pointer` remains valid for the entire lifetime of the returned `Buffer`. + * * `length` stays within the allocated native region. + * * no native code frees or repurposes that memory while JavaScript still uses + * the `Buffer`. + * * Memory protection is observed. For example, read-only memory pages must not + * be written to. + * + * If these guarantees are not met, reading or writing the `Buffer` can corrupt + * memory or crash the process. + * @since v26.1.0 + * @param copy When `false`, creates a zero-copy view. **Default:** `true`. + */ + function toBuffer(pointer: bigint, length: number, copy?: boolean): NonSharedBuffer; + /** + * Creates an `ArrayBuffer` from native memory. + * + * When `copy` is `true`, the returned `ArrayBuffer` contains copied bytes. + * When `copy` is `false`, the returned `ArrayBuffer` references the original + * native memory directly. + * + * The same lifetime and bounds requirements described for + * `ffi.toBuffer(pointer, length, copy)` apply + * here. With `copy: false`, the + * returned `ArrayBuffer` is a zero-copy view of foreign memory and is only safe + * while that memory remains allocated, unchanged in layout, and valid for the + * entire exposed range. + * @since v26.1.0 + * @param copy When `false`, creates a zero-copy view. **Default:** `true`. + */ + function toArrayBuffer(pointer: bigint, length: number, copy?: boolean): ArrayBuffer; + /** + * Copies a JavaScript string into native memory and appends a trailing NUL + * terminator. + * + * `length` must be large enough to hold the full encoded string plus the trailing + * NUL terminator. For UTF-16 and UCS-2 encodings, the trailing terminator uses + * two zero bytes. + * + * `pointer` must refer to writable native memory with at least `length` bytes of + * available storage. This function does not allocate memory on its own. + * + * `string` must be a JavaScript string. `encoding` must be a string. + * @since v26.1.0 + * @param encoding **Default:** `'utf8'`. + */ + function exportString(string: string, pointer: bigint, length: number, encoding?: BufferEncoding): void; + /** + * Copies bytes from a `Buffer` into native memory. + * + * `length` must be at least `buffer.length`. + * + * `pointer` must refer to writable native memory with at least `length` bytes of + * available storage. This function does not allocate memory on its own. + * + * `buffer` must be a Node.js `Buffer`. + * @since v26.1.0 + */ + function exportBuffer(buffer: Buffer, pointer: bigint, length: number): void; + /** + * Copies bytes from an `ArrayBuffer` into native memory. + * + * `length` must be at least `arrayBuffer.byteLength`. + * + * `pointer` must refer to writable native memory with at least `length` bytes of + * available storage. This function does not allocate memory on its own. + * @since v26.1.0 + */ + function exportArrayBuffer(arrayBuffer: ArrayBuffer, pointer: bigint, length: number): void; + /** + * Copies bytes from an `ArrayBufferView` into native memory. + * + * `length` must be at least `arrayBufferView.byteLength`. + * + * `pointer` must refer to writable native memory with at least `length` bytes of + * available storage. This function does not allocate memory on its own. + * @since v26.1.0 + */ + function exportArrayBufferView(arrayBufferView: NodeJS.ArrayBufferView, pointer: bigint, length: number): void; + /** + * Returns the raw memory address of JavaScript-managed byte storage. + * + * This is unsafe and dangerous. The returned pointer can become invalid if the + * underlying memory is detached, resized, transferred, or otherwise invalidated. + * Using stale pointers can cause memory corruption or process crashes. + * @since v26.1.0 + */ + function getRawPointer(source: ArrayBuffer | NodeJS.ArrayBufferView): bigint; + /** + * Returns the address of the current thread's `uv_loop_t` as a `bigint`. + * + * The returned address is for the current Node.js environment. In the main thread, + * this is the main thread event loop. In a worker thread, this is that worker's + * event loop. + * + * This is unsafe and dangerous. The returned pointer is only valid for the lifetime + * of the current environment. Using it after the environment exits, or from native + * code that assumes a different thread or lifetime, can crash the process or + * corrupt memory. + * @since v26.6.0 + */ + function getCurrentEventLoop(): bigint; + type ReturnType = { [K in keyof DataTypeMap]: K }[keyof DataTypeMap]; + type ArgumentType = Exclude; + interface DataTypeMap { + void: "void"; + char: "number"; + bool: "number"; + i8: "number"; + int8: "number"; + u8: "number"; + uint8: "number"; + i16: "number"; + int16: "number"; + u16: "number"; + uint16: "number"; + i32: "number"; + int32: "number"; + u32: "number"; + uint32: "number"; + i64: "bigint"; + int64: "bigint"; + u64: "bigint"; + uint64: "bigint"; + float: "number"; + f32: "number"; + double: "number"; + f64: "number"; + pointer: "pointer"; + ptr: "pointer"; + function: "pointer"; + buffer: "pointer"; + arraybuffer: "pointer"; + string: "pointer"; + str: "pointer"; + } + interface ArgumentTypeMap { + "number": number; + "bigint": bigint; + "pointer": bigint | string | ArrayBuffer | NodeJS.ArrayBufferView | null; + } + interface ReturnTypeMap { + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type + "void": void; + "number": number; + "bigint": bigint; + "pointer": bigint; + } + enum types { + VOID = "void", + POINTER = "pointer", + BUFFER = "buffer", + ARRAY_BUFFER = "arraybuffer", + FUNCTION = "function", + BOOL = "bool", + CHAR = "char", + STRING = "string", + FLOAT = "float", + DOUBLE = "double", + INT_8 = "int8", + UINT_8 = "uint8", + INT_16 = "int16", + UINT_16 = "uint16", + INT_32 = "int32", + UINT_32 = "uint32", + INT_64 = "int64", + UINT_64 = "uint64", + FLOAT_32 = "float32", + FLOAT_64 = "float64", + } +} diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts new file mode 100644 index 0000000..e2626e6 --- /dev/null +++ b/node_modules/@types/node/fs.d.ts @@ -0,0 +1,4803 @@ +declare module "node:fs" { + import { BufferView, NonSharedBuffer } from "node:buffer"; + import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; + import { FileHandle } from "node:fs/promises"; + import * as stream from "node:stream"; + import { URL } from "node:url"; + /** + * Valid types for path values in "fs". + */ + type PathLike = string | Buffer | URL; + type PathOrFileDescriptor = PathLike | number; + type TimeLike = string | number | Date; + type NoParamCallback = (err: NodeJS.ErrnoException | null) => void; + type BufferEncodingOption = + | "buffer" + | { + encoding: "buffer"; + }; + interface ObjectEncodingOptions { + encoding?: BufferEncoding | null | undefined; + } + type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null; + type OpenMode = number | string; + type Mode = number | string; + interface StatsBase { + isFile(): boolean; + isDirectory(): boolean; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isSymbolicLink(): boolean; + isFIFO(): boolean; + isSocket(): boolean; + dev: T; + ino: T; + mode: T; + nlink: T; + uid: T; + gid: T; + rdev: T; + size: T; + blksize: T; + blocks: T; + atimeMs: T; + mtimeMs: T; + ctimeMs: T; + birthtimeMs: T; + atime: Date; + mtime: Date; + ctime: Date; + birthtime: Date; + // Deliberately not defining a type alias here... it'd be exported, and something in the ecosystem would inevitably start using it. + // TODO: replace with Temporal builtins once @types/node no longer supports TS <6.0. + atimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T : unknown; + mtimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T : unknown; + ctimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T : unknown; + birthtimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T + : unknown; + } + interface Stats extends StatsBase {} + /** + * A `fs.Stats` object provides information about a file. + * + * Objects returned from {@link stat}, {@link lstat}, {@link fstat}, and + * their synchronous counterparts are of this type. + * If `bigint` in the `options` passed to those methods is true, the numeric values + * will be `bigint` instead of `number`, and the object will contain additional + * nanosecond-precision properties suffixed with `Ns`. `Stat` objects are not to be created directly using the `new` keyword. + * + * ```console + * Stats { + * dev: 2114, + * ino: 48064969, + * mode: 33188, + * nlink: 1, + * uid: 85, + * gid: 100, + * rdev: 0, + * size: 527, + * blksize: 4096, + * blocks: 8, + * atimeMs: 1318289051000.1, + * mtimeMs: 1318289051000.1, + * ctimeMs: 1318289051000.1, + * birthtimeMs: 1318289051000.1, + * atime: Mon, 10 Oct 2011 23:24:11 GMT, + * mtime: Mon, 10 Oct 2011 23:24:11 GMT, + * ctime: Mon, 10 Oct 2011 23:24:11 GMT, + * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } + * ``` + * + * `bigint` version: + * + * ```console + * BigIntStats { + * dev: 2114n, + * ino: 48064969n, + * mode: 33188n, + * nlink: 1n, + * uid: 85n, + * gid: 100n, + * rdev: 0n, + * size: 527n, + * blksize: 4096n, + * blocks: 8n, + * atimeMs: 1318289051000n, + * mtimeMs: 1318289051000n, + * ctimeMs: 1318289051000n, + * birthtimeMs: 1318289051000n, + * atimeNs: 1318289051000000000n, + * mtimeNs: 1318289051000000000n, + * ctimeNs: 1318289051000000000n, + * birthtimeNs: 1318289051000000000n, + * atime: Mon, 10 Oct 2011 23:24:11 GMT, + * mtime: Mon, 10 Oct 2011 23:24:11 GMT, + * ctime: Mon, 10 Oct 2011 23:24:11 GMT, + * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } + * ``` + * @since v0.1.21 + */ + class Stats { + private constructor(); + } + interface StatsFsBase { + /** Type of file system. */ + type: T; + /** Optimal transfer block size. */ + bsize: T; + /** Total data blocks in file system. */ + blocks: T; + /** Free blocks in file system. */ + bfree: T; + /** Available blocks for unprivileged users */ + bavail: T; + /** Total file nodes in file system. */ + files: T; + /** Fundamental file system block size. */ + frsize: T; + /** Free file nodes in file system. */ + ffree: T; + } + interface StatsFs extends StatsFsBase {} + /** + * Provides information about a mounted file system. + * + * Objects returned from {@link statfs} and its synchronous counterpart are of + * this type. If `bigint` in the `options` passed to those methods is `true`, the + * numeric values will be `bigint` instead of `number`. + * + * ```console + * StatFs { + * type: 1397114950, + * bsize: 4096, + * blocks: 121938943, + * bfree: 61058895, + * bavail: 61058895, + * files: 999, + * ffree: 1000000 + * } + * ``` + * + * `bigint` version: + * + * ```console + * StatFs { + * type: 1397114950n, + * bsize: 4096n, + * blocks: 121938943n, + * bfree: 61058895n, + * bavail: 61058895n, + * files: 999n, + * ffree: 1000000n + * } + * ``` + * @since v19.6.0, v18.15.0 + */ + class StatsFs {} + interface BigIntStatsFs extends StatsFsBase {} + interface StatFsOptions { + bigint?: boolean | undefined; + } + /** + * A representation of a directory entry, which can be a file or a subdirectory + * within the directory, as returned by reading from an `fs.Dir`. The + * directory entry is a combination of the file name and file type pairs. + * + * Additionally, when {@link readdir} or {@link readdirSync} is called with + * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s. + * @since v10.10.0 + */ + class Dirent { + /** + * Returns `true` if the `fs.Dirent` object describes a regular file. + * @since v10.10.0 + */ + isFile(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a file system + * directory. + * @since v10.10.0 + */ + isDirectory(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a block device. + * @since v10.10.0 + */ + isBlockDevice(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a character device. + * @since v10.10.0 + */ + isCharacterDevice(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a symbolic link. + * @since v10.10.0 + */ + isSymbolicLink(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a first-in-first-out + * (FIFO) pipe. + * @since v10.10.0 + */ + isFIFO(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a socket. + * @since v10.10.0 + */ + isSocket(): boolean; + /** + * The file name that this `fs.Dirent` object refers to. The type of this + * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}. + * @since v10.10.0 + */ + name: Name; + /** + * The path to the parent directory of the file this `fs.Dirent` object refers to. + * @since v20.12.0, v18.20.0 + */ + parentPath: string; + } + /** + * A class representing a directory stream. + * + * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`. + * + * ```js + * import { opendir } from 'node:fs/promises'; + * + * try { + * const dir = await opendir('./'); + * for await (const dirent of dir) + * console.log(dirent.name); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * When using the async iterator, the `fs.Dir` object will be automatically + * closed after the iterator exits. + * @since v12.12.0 + */ + class Dir implements AsyncIterable { + /** + * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`. + * @since v12.12.0 + */ + readonly path: string; + /** + * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read. + */ + [Symbol.asyncIterator](): NodeJS.AsyncIterator; + /** + * Asynchronously close the directory's underlying resource handle. + * Subsequent reads will result in errors. + * + * A promise is returned that will be fulfilled after the resource has been + * closed. + * @since v12.12.0 + */ + close(): Promise; + close(cb: NoParamCallback): void; + /** + * Synchronously close the directory's underlying resource handle. + * Subsequent reads will result in errors. + * @since v12.12.0 + */ + closeSync(): void; + /** + * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`. + * + * A promise is returned that will be fulfilled with an `fs.Dirent`, or `null` if there are no more directory entries to read. + * + * Directory entries returned by this function are in no particular order as + * provided by the operating system's underlying directory mechanisms. + * Entries added or removed while iterating over the directory might not be + * included in the iteration results. + * @since v12.12.0 + * @return containing {fs.Dirent|null} + */ + read(): Promise; + read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void; + /** + * Synchronously read the next directory entry as an `fs.Dirent`. See the + * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail. + * + * If there are no more directory entries to read, `null` will be returned. + * + * Directory entries returned by this function are in no particular order as + * provided by the operating system's underlying directory mechanisms. + * Entries added or removed while iterating over the directory might not be + * included in the iteration results. + * @since v12.12.0 + */ + readSync(): Dirent | null; + /** + * Calls `dir.close()` if the directory handle is open, and returns a promise that + * fulfills when disposal is complete. + * @since v24.1.0 + */ + [Symbol.asyncDispose](): Promise; + /** + * Calls `dir.closeSync()` if the directory handle is open, and returns + * `undefined`. + * @since v24.1.0 + */ + [Symbol.dispose](): void; + } + /** + * Class: fs.StatWatcher + * @since v14.3.0, v12.20.0 + * Extends `EventEmitter` + * A successful call to {@link watchFile} method will return a new fs.StatWatcher object. + */ + interface StatWatcher extends EventEmitter { + /** + * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have + * no effect. + * + * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally + * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been + * called previously. + * @since v14.3.0, v12.20.0 + */ + ref(): this; + /** + * When called, the active `fs.StatWatcher` object will not require the Node.js + * event loop to remain active. If there is no other activity keeping the + * event loop running, the process may exit before the `fs.StatWatcher` object's + * callback is invoked. Calling `watcher.unref()` multiple times will have + * no effect. + * @since v14.3.0, v12.20.0 + */ + unref(): this; + } + interface FSWatcherEventMap { + "change": [eventType: string, filename: string | NonSharedBuffer]; + "close": []; + "error": [error: Error]; + } + interface FSWatcher extends InternalEventEmitter { + /** + * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable. + * @since v0.5.8 + */ + close(): void; + /** + * When called, requests that the Node.js event loop _not_ exit so long as the `fs.FSWatcher` is active. Calling `watcher.ref()` multiple times will have + * no effect. + * + * By default, all `fs.FSWatcher` objects are "ref'ed", making it normally + * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been + * called previously. + * @since v14.3.0, v12.20.0 + */ + ref(): this; + /** + * When called, the active `fs.FSWatcher` object will not require the Node.js + * event loop to remain active. If there is no other activity keeping the + * event loop running, the process may exit before the `fs.FSWatcher` object's + * callback is invoked. Calling `watcher.unref()` multiple times will have + * no effect. + * @since v14.3.0, v12.20.0 + */ + unref(): this; + } + interface ReadStreamEventMap extends stream.ReadableEventMap { + "close": []; + "data": [chunk: string | NonSharedBuffer]; + "open": [fd: number]; + "ready": []; + } + /** + * Instances of `fs.ReadStream` cannot be constructed directly. They are created and + * returned using the `fs.createReadStream()` function. + * @since v0.1.93 + */ + class ReadStream extends stream.Readable { + close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; + /** + * The number of bytes that have been read so far. + * @since v6.4.0 + */ + bytesRead: number; + /** + * The path to the file the stream is reading from as specified in the first + * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a + * `Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`. + * @since v0.1.93 + */ + path: string | Buffer; + /** + * This property is `true` if the underlying file has not been opened yet, + * i.e. before the `'ready'` event is emitted. + * @since v11.2.0, v10.16.0 + */ + pending: boolean; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ReadStreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ReadStreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ReadStreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: ReadStreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ReadStreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ReadStreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ReadStreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: ReadStreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ReadStreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface Utf8StreamOptions { + /** + * Appends writes to dest file instead of truncating it. + * @default true + */ + append?: boolean | undefined; + /** + * Which type of data you can send to the write + * function, supported values are `'utf8'` or `'buffer'`. + * @default 'utf8' + */ + contentMode?: "utf8" | "buffer" | undefined; + /** + * A path to a file to be written to (mode controlled by the + * append option). + */ + dest?: string | undefined; + /** + * A file descriptor, something that is returned by `fs.open()` + * or `fs.openSync()`. + */ + fd?: number | undefined; + /** + * An object that has the same API as the `fs` module, useful + * for mocking, testing, or customizing the behavior of the stream. + */ + fs?: object | undefined; + /** + * Perform a `fs.fsyncSync()` every time a write is + * completed. + */ + fsync?: boolean | undefined; + /** + * The maximum length of the internal buffer. If a write + * operation would cause the buffer to exceed `maxLength`, the data written is + * dropped and a drop event is emitted with the dropped data + */ + maxLength?: number | undefined; + /** + * The maximum number of bytes that can be written; + * @default 16384 + */ + maxWrite?: number | undefined; + /** + * The minimum length of the internal buffer that is + * required to be full before flushing. + */ + minLength?: number | undefined; + /** + * Ensure directory for `dest` file exists when true. + * @default false + */ + mkdir?: boolean | undefined; + /** + * Specify the creating file mode (see `fs.open()`). + */ + mode?: number | string | undefined; + /** + * Calls flush every `periodicFlush` milliseconds. + */ + periodicFlush?: number | undefined; + /** + * A function that will be called when `write()`, + * `writeSync()`, or `flushSync()` encounters an `EAGAIN` or `EBUSY` error. + * If the return value is `true` the operation will be retried, otherwise it + * will bubble the error. The `err` is the error that caused this function to + * be called, `writeBufferLen` is the length of the buffer that was written, + * and `remainingBufferLen` is the length of the remaining buffer that the + * stream did not try to write. + */ + retryEAGAIN?: ((err: Error | null, writeBufferLen: number, remainingBufferLen: number) => boolean) | undefined; + /** + * Perform writes synchronously. + */ + sync?: boolean | undefined; + } + interface Utf8StreamEventMap { + "close": []; + "drain": []; + "drop": [data: string | Buffer]; + "error": [error: Error]; + "finish": []; + "ready": []; + "write": [n: number]; + } + /** + * An optimized UTF-8 stream writer that allows for flushing all the internal + * buffering on demand. It handles `EAGAIN` errors correctly, allowing for + * customization, for example, by dropping content if the disk is busy. + * @since v24.6.0 + * @experimental + */ + class Utf8Stream implements EventEmitter { + constructor(options: Utf8StreamOptions); + /** + * Whether the stream is appending to the file or truncating it. + */ + readonly append: boolean; + /** + * The type of data that can be written to the stream. Supported + * values are `'utf8'` or `'buffer'`. + * @default 'utf8' + */ + readonly contentMode: "utf8" | "buffer"; + /** + * Close the stream immediately, without flushing the internal buffer. + */ + destroy(): void; + /** + * Close the stream gracefully, flushing the internal buffer before closing. + */ + end(): void; + /** + * The file descriptor that is being written to. + */ + readonly fd: number; + /** + * The file that is being written to. + */ + readonly file: string; + /** + * Writes the current buffer to the file if a write was not in progress. Do + * nothing if `minLength` is zero or if it is already writing. + */ + flush(callback: (err: Error | null) => void): void; + /** + * Flushes the buffered data synchronously. This is a costly operation. + */ + flushSync(): void; + /** + * Whether the stream is performing a `fs.fsyncSync()` after every + * write operation. + */ + readonly fsync: boolean; + /** + * The maximum length of the internal buffer. If a write + * operation would cause the buffer to exceed `maxLength`, the data written is + * dropped and a drop event is emitted with the dropped data. + */ + readonly maxLength: number; + /** + * The minimum length of the internal buffer that is required to be + * full before flushing. + */ + readonly minLength: number; + /** + * Whether the stream should ensure that the directory for the + * `dest` file exists. If `true`, it will create the directory if it does not + * exist. + * @default false + */ + readonly mkdir: boolean; + /** + * The mode of the file that is being written to. + */ + readonly mode: number | string; + /** + * The number of milliseconds between flushes. If set to `0`, no + * periodic flushes will be performed. + */ + readonly periodicFlush: number; + /** + * Reopen the file in place, useful for log rotation. + * @param file A path to a file to be written to (mode + * controlled by the append option). + */ + reopen(file: PathLike): void; + /** + * Whether the stream is writing synchronously or asynchronously. + */ + readonly sync: boolean; + /** + * When the `options.contentMode` is set to `'utf8'` when the stream is created, + * the `data` argument must be a string. If the `contentMode` is set to `'buffer'`, + * the `data` argument must be a `Buffer`. + * @param data The data to write. + */ + write(data: string | Buffer): boolean; + /** + * Whether the stream is currently writing data to the file. + */ + readonly writing: boolean; + /** + * Calls `utf8Stream.destroy()`. + */ + [Symbol.dispose](): void; + } + interface Utf8Stream extends InternalEventEmitter {} + interface WriteStreamEventMap extends stream.WritableEventMap { + "close": []; + "open": [fd: number]; + "ready": []; + } + /** + * Instances of `fs.WriteStream` cannot be constructed directly. They are created and + * returned using the `fs.createWriteStream()` function. + * @since v0.1.93 + */ + class WriteStream extends stream.Writable { + /** + * Closes `writeStream`. Optionally accepts a + * callback that will be executed once the `writeStream`is closed. + * @since v0.9.4 + */ + close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; + /** + * The number of bytes written so far. Does not include data that is still queued + * for writing. + * @since v0.4.7 + */ + bytesWritten: number; + /** + * The path to the file the stream is writing to as specified in the first + * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a + * `Buffer`. + * @since v0.1.93 + */ + path: string | Buffer; + /** + * This property is `true` if the underlying file has not been opened yet, + * i.e. before the `'ready'` event is emitted. + * @since v11.2.0 + */ + pending: boolean; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: WriteStreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: WriteStreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + /** + * Asynchronously rename file at `oldPath` to the pathname provided + * as `newPath`. In the case that `newPath` already exists, it will + * be overwritten. If there is a directory at `newPath`, an error will + * be raised instead. No arguments other than a possible exception are + * given to the completion callback. + * + * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html). + * + * ```js + * import { rename } from 'node:fs'; + * + * rename('oldFile.txt', 'newFile.txt', (err) => { + * if (err) throw err; + * console.log('Rename complete!'); + * }); + * ``` + * @since v0.0.2 + */ + function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; + namespace rename { + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(oldPath: PathLike, newPath: PathLike): Promise; + } + /** + * Renames the file from `oldPath` to `newPath`. Returns `undefined`. + * + * See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details. + * @since v0.1.21 + */ + function renameSync(oldPath: PathLike, newPath: PathLike): void; + /** + * Truncates the file. No arguments other than a possible exception are + * given to the completion callback. A file descriptor can also be passed as the + * first argument. In this case, `fs.ftruncate()` is called. + * + * ```js + * import { truncate } from 'node:fs'; + * // Assuming that 'path/file.txt' is a regular file. + * truncate('path/file.txt', (err) => { + * if (err) throw err; + * console.log('path/file.txt was truncated'); + * }); + * ``` + * + * Passing a file descriptor is deprecated and may result in an error being thrown + * in the future. + * + * See the POSIX [`truncate(2)`](http://man7.org/linux/man-pages/man2/truncate.2.html) documentation for more details. + * @since v0.8.6 + * @param [len=0] + */ + function truncate(path: PathLike, len: number | undefined, callback: NoParamCallback): void; + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function truncate(path: PathLike, callback: NoParamCallback): void; + namespace truncate { + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(path: PathLike, len?: number): Promise; + } + /** + * Truncates the file. Returns `undefined`. A file descriptor can also be + * passed as the first argument. In this case, `fs.ftruncateSync()` is called. + * + * Passing a file descriptor is deprecated and may result in an error being thrown + * in the future. + * @since v0.8.6 + * @param [len=0] + */ + function truncateSync(path: PathLike, len?: number): void; + /** + * Truncates the file descriptor. No arguments other than a possible exception are + * given to the completion callback. + * + * See the POSIX [`ftruncate(2)`](http://man7.org/linux/man-pages/man2/ftruncate.2.html) documentation for more detail. + * + * If the file referred to by the file descriptor was larger than `len` bytes, only + * the first `len` bytes will be retained in the file. + * + * For example, the following program retains only the first four bytes of the + * file: + * + * ```js + * import { open, close, ftruncate } from 'node:fs'; + * + * function closeFd(fd) { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * + * open('temp.txt', 'r+', (err, fd) => { + * if (err) throw err; + * + * try { + * ftruncate(fd, 4, (err) => { + * closeFd(fd); + * if (err) throw err; + * }); + * } catch (err) { + * closeFd(fd); + * if (err) throw err; + * } + * }); + * ``` + * + * If the file previously was shorter than `len` bytes, it is extended, and the + * extended part is filled with null bytes (`'\0'`): + * + * If `len` is negative then `0` will be used. + * @since v0.8.6 + * @param [len=0] + */ + function ftruncate(fd: number, len: number | undefined, callback: NoParamCallback): void; + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + */ + function ftruncate(fd: number, callback: NoParamCallback): void; + namespace ftruncate { + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(fd: number, len?: number): Promise; + } + /** + * Truncates the file descriptor. Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link ftruncate}. + * @since v0.8.6 + * @param [len=0] + */ + function ftruncateSync(fd: number, len?: number): void; + /** + * Asynchronously changes owner and group of a file. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. + * @since v0.1.97 + */ + function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; + namespace chown { + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + /** + * Synchronously changes owner and group of a file. Returns `undefined`. + * This is the synchronous version of {@link chown}. + * + * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. + * @since v0.1.97 + */ + function chownSync(path: PathLike, uid: number, gid: number): void; + /** + * Sets the owner of the file. No arguments other than a possible exception are + * given to the completion callback. + * + * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. + * @since v0.4.7 + */ + function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void; + namespace fchown { + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + function __promisify__(fd: number, uid: number, gid: number): Promise; + } + /** + * Sets the owner of the file. Returns `undefined`. + * + * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. + * @since v0.4.7 + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + */ + function fchownSync(fd: number, uid: number, gid: number): void; + /** + * Set the owner of the symbolic link. No arguments other than a possible + * exception are given to the completion callback. + * + * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail. + */ + function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; + namespace lchown { + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + /** + * Set the owner for the path. Returns `undefined`. + * + * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more details. + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + */ + function lchownSync(path: PathLike, uid: number, gid: number): void; + /** + * Changes the access and modification times of a file in the same way as {@link utimes}, with the difference that if the path refers to a symbolic + * link, then the link is not dereferenced: instead, the timestamps of the + * symbolic link itself are changed. + * + * No arguments other than a possible exception are given to the completion + * callback. + * @since v14.5.0, v12.19.0 + */ + function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + namespace lutimes { + /** + * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, + * with the difference that if the path refers to a symbolic link, then the link is not + * dereferenced: instead, the timestamps of the symbolic link itself are changed. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Change the file system timestamps of the symbolic link referenced by `path`. + * Returns `undefined`, or throws an exception when parameters are incorrect or + * the operation fails. This is the synchronous version of {@link lutimes}. + * @since v14.5.0, v12.19.0 + */ + function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; + /** + * Asynchronously changes the permissions of a file. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. + * + * ```js + * import { chmod } from 'node:fs'; + * + * chmod('my_file.txt', 0o775, (err) => { + * if (err) throw err; + * console.log('The permissions for file "my_file.txt" have been changed!'); + * }); + * ``` + * @since v0.1.30 + */ + function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; + namespace chmod { + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: Mode): Promise; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link chmod}. + * + * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. + * @since v0.6.7 + */ + function chmodSync(path: PathLike, mode: Mode): void; + /** + * Sets the permissions on the file. No arguments other than a possible exception + * are given to the completion callback. + * + * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. + * @since v0.4.7 + */ + function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void; + namespace fchmod { + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(fd: number, mode: Mode): Promise; + } + /** + * Sets the permissions on the file. Returns `undefined`. + * + * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. + * @since v0.4.7 + */ + function fchmodSync(fd: number, mode: Mode): void; + /** + * Changes the permissions on a symbolic link. No arguments other than a possible + * exception are given to the completion callback. + * + * This method is only implemented on macOS. + * + * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. + * @deprecated Since v0.4.7 + */ + function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; + /** @deprecated */ + namespace lchmod { + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: Mode): Promise; + } + /** + * Changes the permissions on a symbolic link. Returns `undefined`. + * + * This method is only implemented on macOS. + * + * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. + * @deprecated Since v0.4.7 + */ + function lchmodSync(path: PathLike, mode: Mode): void; + /** + * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object. + * + * In case of an error, the `err.code` will be one of `Common System Errors`. + * + * {@link stat} follows symbolic links. Use {@link lstat} to look at the + * links themselves. + * + * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. + * Instead, user code should open/read/write the file directly and handle the + * error raised if the file is not available. + * + * To check if a file exists without manipulating it afterwards, {@link access} is recommended. + * + * For example, given the following directory structure: + * + * ```text + * - txtDir + * -- file.txt + * - app.js + * ``` + * + * The next program will check for the stats of the given paths: + * + * ```js + * import { stat } from 'node:fs'; + * + * const pathsToCheck = ['./txtDir', './txtDir/file.txt']; + * + * for (let i = 0; i < pathsToCheck.length; i++) { + * stat(pathsToCheck[i], (err, stats) => { + * console.log(stats.isDirectory()); + * console.log(stats); + * }); + * } + * ``` + * + * The resulting output will resemble: + * + * ```console + * true + * Stats { + * dev: 16777220, + * mode: 16877, + * nlink: 3, + * uid: 501, + * gid: 20, + * rdev: 0, + * blksize: 4096, + * ino: 14214262, + * size: 96, + * blocks: 0, + * atimeMs: 1561174653071.963, + * mtimeMs: 1561174614583.3518, + * ctimeMs: 1561174626623.5366, + * birthtimeMs: 1561174126937.2893, + * atime: 2019-06-22T03:37:33.072Z, + * mtime: 2019-06-22T03:36:54.583Z, + * ctime: 2019-06-22T03:37:06.624Z, + * birthtime: 2019-06-22T03:28:46.937Z + * } + * false + * Stats { + * dev: 16777220, + * mode: 33188, + * nlink: 1, + * uid: 501, + * gid: 20, + * rdev: 0, + * blksize: 4096, + * ino: 14214074, + * size: 8, + * blocks: 8, + * atimeMs: 1561174616618.8555, + * mtimeMs: 1561174614584, + * ctimeMs: 1561174614583.8145, + * birthtimeMs: 1561174007710.7478, + * atime: 2019-06-22T03:36:56.619Z, + * mtime: 2019-06-22T03:36:54.584Z, + * ctime: 2019-06-22T03:36:54.584Z, + * birthtime: 2019-06-22T03:26:47.711Z + * } + * ``` + * @since v0.0.2 + */ + function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + function stat( + path: PathLike, + options: + | (StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | undefined) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats | undefined) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats | undefined) => void, + ): void; + namespace stat { + // TODO: aliased promisify signatures + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + function __promisify__( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function __promisify__(path: PathLike, options?: StatOptions): Promise; + } + /** @deprecated This orphaned interface will be removed in a future version. */ + interface StatSyncFn extends Function { + (path: PathLike, options?: undefined): Stats; + ( + path: PathLike, + options?: StatSyncOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Stats | undefined; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): BigIntStats | undefined; + ( + path: PathLike, + options?: StatSyncOptions & { + bigint?: false | undefined; + }, + ): Stats; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: true; + }, + ): BigIntStats; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: boolean; + throwIfNoEntry?: false | undefined; + }, + ): Stats | BigIntStats; + (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined; + } + /** + * Synchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function statSync(path: PathLike): Stats; + function statSync( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }, + ): Stats; + function statSync( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + ): BigIntStats; + function statSync( + path: PathLike, + options: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Stats | undefined; + function statSync( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): BigIntStats | undefined; + function statSync( + path: PathLike, + options: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + ): Stats | BigIntStats; + function statSync(path: PathLike, options?: StatOptions): Stats | BigIntStats | undefined; + /** + * Invokes the callback with the `fs.Stats` for the file descriptor. + * + * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. + * @since v0.1.95 + */ + function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + function fstat( + fd: number, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, + ): void; + function fstat( + fd: number, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, + ): void; + function fstat( + fd: number, + options: StatOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, + ): void; + namespace fstat { + /** + * Asynchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + function __promisify__( + fd: number, + options?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + function __promisify__( + fd: number, + options: StatOptions & { + bigint: true; + }, + ): Promise; + function __promisify__(fd: number, options?: StatOptions): Promise; + } + /** + * Retrieves the `fs.Stats` for the file descriptor. + * + * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. + * @since v0.1.95 + */ + function fstatSync( + fd: number, + options?: StatOptions & { + bigint?: false | undefined; + }, + ): Stats; + function fstatSync( + fd: number, + options: StatOptions & { + bigint: true; + }, + ): BigIntStats; + function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats; + /** + * Retrieves the `fs.Stats` for the symbolic link referred to by the path. + * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic + * link, then the link itself is stat-ed, not the file that it refers to. + * + * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details. + * @since v0.1.30 + */ + function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + function lstat( + path: PathLike, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, + ): void; + function lstat( + path: PathLike, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, + ): void; + function lstat( + path: PathLike, + options: StatOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, + ): void; + namespace lstat { + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + }, + ): Promise; + function __promisify__(path: PathLike, options?: StatOptions): Promise; + } + /** + * Asynchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which + * contains `path`. The callback gets two arguments `(err, stats)` where `stats`is an `fs.StatFs` object. + * + * In case of an error, the `err.code` will be one of `Common System Errors`. + * @since v19.6.0, v18.15.0 + * @param path A path to an existing file or directory on the file system to be queried. + */ + function statfs(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void): void; + function statfs( + path: PathLike, + options: + | (StatFsOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void, + ): void; + function statfs( + path: PathLike, + options: StatFsOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStatsFs) => void, + ): void; + function statfs( + path: PathLike, + options: StatFsOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: StatsFs | BigIntStatsFs) => void, + ): void; + namespace statfs { + /** + * Asynchronous statfs(2) - Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where stats is an object. + * @param path A path to an existing file or directory on the file system to be queried. + */ + function __promisify__( + path: PathLike, + options?: StatFsOptions & { + bigint?: false | undefined; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatFsOptions & { + bigint: true; + }, + ): Promise; + function __promisify__(path: PathLike, options?: StatFsOptions): Promise; + } + /** + * Synchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which + * contains `path`. + * + * In case of an error, the `err.code` will be one of `Common System Errors`. + * @since v19.6.0, v18.15.0 + * @param path A path to an existing file or directory on the file system to be queried. + */ + function statfsSync( + path: PathLike, + options?: StatFsOptions & { + bigint?: false | undefined; + }, + ): StatsFs; + function statfsSync( + path: PathLike, + options: StatFsOptions & { + bigint: true; + }, + ): BigIntStatsFs; + function statfsSync(path: PathLike, options?: StatFsOptions): StatsFs | BigIntStatsFs; + /** + * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lstatSync(path: PathLike): Stats; + function lstatSync( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }, + ): Stats; + function lstatSync( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + ): BigIntStats; + function lstatSync( + path: PathLike, + options: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Stats | undefined; + function lstatSync( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): BigIntStats | undefined; + function lstatSync( + path: PathLike, + options: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + ): Stats | BigIntStats; + function lstatSync(path: PathLike, options?: StatOptions): Stats | BigIntStats | undefined; + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than + * a possible + * exception are given to the completion callback. + * @since v0.1.31 + */ + function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; + namespace link { + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(existingPath: PathLike, newPath: PathLike): Promise; + } + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`. + * @since v0.1.31 + */ + function linkSync(existingPath: PathLike, newPath: PathLike): void; + /** + * Creates the link called `path` pointing to `target`. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`symlink(2)`](http://man7.org/linux/man-pages/man2/symlink.2.html) documentation for more details. + * + * The `type` argument is only available on Windows and ignored on other platforms. + * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is + * not a string, Node.js will autodetect `target` type and use `'file'` or `'dir'`. + * If the `target` does not exist, `'file'` will be used. Windows junction points + * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path. Junction + * points on NTFS volumes can only point to directories. + * + * Relative targets are relative to the link's parent directory. + * + * ```js + * import { symlink } from 'node:fs'; + * + * symlink('./mew', './mewtwo', callback); + * ``` + * + * The above example creates a symbolic link `mewtwo` which points to `mew` in the + * same directory: + * + * ```bash + * $ tree . + * . + * ├── mew + * └── mewtwo -> ./mew + * ``` + * @since v0.1.31 + * @param [type='null'] + */ + function symlink( + target: PathLike, + path: PathLike, + type: symlink.Type | undefined | null, + callback: NoParamCallback, + ): void; + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + */ + function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void; + namespace symlink { + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; + type Type = "dir" | "file" | "junction"; + } + /** + * Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link symlink}. + * @since v0.1.31 + * @param [type='null'] + */ + function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; + /** + * Reads the contents of the symbolic link referred to by `path`. The callback gets + * two arguments `(err, linkString)`. + * + * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path passed to the callback. If the `encoding` is set to `'buffer'`, + * the link path returned will be passed as a `Buffer` object. + * @since v0.1.31 + */ + function readlink( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, linkString: string) => void, + ): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink( + path: PathLike, + options: BufferEncodingOption, + callback: (err: NodeJS.ErrnoException | null, linkString: NonSharedBuffer) => void, + ): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, linkString: string | NonSharedBuffer) => void, + ): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function readlink( + path: PathLike, + callback: (err: NodeJS.ErrnoException | null, linkString: string) => void, + ): void; + namespace readlink { + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + } + /** + * Returns the symbolic link's string value. + * + * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path returned. If the `encoding` is set to `'buffer'`, + * the link path returned will be passed as a `Buffer` object. + * @since v0.1.31 + */ + function readlinkSync(path: PathLike, options?: EncodingOption): string; + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlinkSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlinkSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; + /** + * Asynchronously computes the canonical pathname by resolving `.`, `..`, and + * symbolic links. + * + * A canonical pathname is not necessarily unique. Hard links and bind mounts can + * expose a file system entity through many pathnames. + * + * This function behaves like [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html), with some exceptions: + * + * 1. No case conversion is performed on case-insensitive file systems. + * 2. The maximum number of symbolic links is platform-independent and generally + * (much) higher than what the native [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html) implementation supports. + * + * The `callback` gets two arguments `(err, resolvedPath)`. May use `process.cwd` to resolve relative paths. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path passed to the callback. If the `encoding` is set to `'buffer'`, + * the path returned will be passed as a `Buffer` object. + * + * If `path` resolves to a socket or a pipe, the function will return a system + * dependent name for that object. + * @since v0.1.31 + */ + function realpath( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, + ): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath( + path: PathLike, + options: BufferEncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void, + ): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void, + ): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function realpath( + path: PathLike, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, + ): void; + namespace realpath { + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html). + * + * The `callback` gets two arguments `(err, resolvedPath)`. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path passed to the callback. If the `encoding` is set to `'buffer'`, + * the path returned will be passed as a `Buffer` object. + * + * On Linux, when Node.js is linked against musl libc, the procfs file system must + * be mounted on `/proc` in order for this function to work. Glibc does not have + * this restriction. + * @since v9.2.0 + */ + function native( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, + ): void; + function native( + path: PathLike, + options: BufferEncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void, + ): void; + function native( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void, + ): void; + function native( + path: PathLike, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, + ): void; + } + /** + * Returns the resolved pathname. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link realpath}. + * @since v0.1.31 + */ + function realpathSync(path: PathLike, options?: EncodingOption): string; + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpathSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpathSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; + namespace realpathSync { + function native(path: PathLike, options?: EncodingOption): string; + function native(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; + function native(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; + } + /** + * Asynchronously removes a file or symbolic link. No arguments other than a + * possible exception are given to the completion callback. + * + * ```js + * import { unlink } from 'node:fs'; + * // Assuming that 'path/file.txt' is a regular file. + * unlink('path/file.txt', (err) => { + * if (err) throw err; + * console.log('path/file.txt was deleted'); + * }); + * ``` + * + * `fs.unlink()` will not work on a directory, empty or otherwise. To remove a + * directory, use {@link rmdir}. + * + * See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details. + * @since v0.0.2 + */ + function unlink(path: PathLike, callback: NoParamCallback): void; + namespace unlink { + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + /** + * Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`. + * @since v0.1.21 + */ + function unlinkSync(path: PathLike): void; + /** @deprecated `rmdir()` no longer provides any options. This interface will be removed in a future version. */ + // TODO: remove in future major + interface RmDirOptions {} + /** + * Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given + * to the completion callback. + * + * Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on + * Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`. + * @since v0.0.2 + */ + function rmdir(path: PathLike, callback: NoParamCallback): void; + namespace rmdir { + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + /** + * Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`. + * + * Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error + * on Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`. + * @since v0.1.21 + */ + function rmdirSync(path: PathLike): void; + interface RmOptions { + /** + * When `true`, exceptions will be ignored if `path` does not exist. + * @default false + */ + force?: boolean | undefined; + /** + * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or + * `EPERM` error is encountered, Node.js will retry the operation with a linear + * backoff wait of `retryDelay` ms longer on each try. This option represents the + * number of retries. This option is ignored if the `recursive` option is not + * `true`. + * @default 0 + */ + maxRetries?: number | undefined; + /** + * If `true`, perform a recursive directory removal. In + * recursive mode, operations are retried on failure. + * @default false + */ + recursive?: boolean | undefined; + /** + * The amount of time in milliseconds to wait between retries. + * This option is ignored if the `recursive` option is not `true`. + * @default 100 + */ + retryDelay?: number | undefined; + } + /** + * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). No arguments other than a possible exception are given to the + * completion callback. + * @since v14.14.0 + */ + function rm(path: PathLike, callback: NoParamCallback): void; + function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void; + namespace rm { + /** + * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). + */ + function __promisify__(path: PathLike, options?: RmOptions): Promise; + } + /** + * Synchronously removes files and directories (modeled on the standard POSIX `rm` utility). Returns `undefined`. + * @since v14.14.0 + */ + function rmSync(path: PathLike, options?: RmOptions): void; + interface MakeDirectoryOptions { + /** + * Indicates whether parent folders should be created. + * If a folder was created, the path to the first created folder will be returned. + * @default false + */ + recursive?: boolean | undefined; + /** + * A file mode. If a string is passed, it is parsed as an octal integer. If not specified + * @default 0o777 + */ + mode?: Mode | undefined; + } + /** + * Asynchronously creates a directory. + * + * The callback is given a possible exception and, if `recursive` is `true`, the + * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was + * created (for instance, if it was previously created). + * + * The optional `options` argument can be an integer specifying `mode` (permission + * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fs.mkdir()` when `path` is a directory that + * exists results in an error only + * when `recursive` is false. If `recursive` is false and the directory exists, + * an `EEXIST` error occurs. + * + * ```js + * import { mkdir } from 'node:fs'; + * + * // Create ./tmp/a/apple, regardless of whether ./tmp and ./tmp/a exist. + * mkdir('./tmp/a/apple', { recursive: true }, (err) => { + * if (err) throw err; + * }); + * ``` + * + * On Windows, using `fs.mkdir()` on the root directory even with recursion will + * result in an error: + * + * ```js + * import { mkdir } from 'node:fs'; + * + * mkdir('/', { recursive: true }, (err) => { + * // => [Error: EPERM: operation not permitted, mkdir 'C:\'] + * }); + * ``` + * + * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. + * @since v0.1.8 + */ + function mkdir( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + callback: (err: NodeJS.ErrnoException | null, path?: string) => void, + ): void; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir( + path: PathLike, + options: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null + | undefined, + callback: NoParamCallback, + ): void; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir( + path: PathLike, + options: Mode | MakeDirectoryOptions | null | undefined, + callback: (err: NodeJS.ErrnoException | null, path?: string) => void, + ): void; + /** + * Asynchronous mkdir(2) - create a directory with a mode of `0o777`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function mkdir(path: PathLike, callback: NoParamCallback): void; + namespace mkdir { + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null, + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__( + path: PathLike, + options?: Mode | MakeDirectoryOptions | null, + ): Promise; + } + /** + * Synchronously creates a directory. Returns `undefined`, or if `recursive` is `true`, the first directory path created. + * This is the synchronous version of {@link mkdir}. + * + * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. + * @since v0.1.21 + */ + function mkdirSync( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + ): string | undefined; + /** + * Synchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdirSync( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null, + ): void; + /** + * Synchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined; + /** + * Creates a unique temporary directory. + * + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. Due to platform + * inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms, + * notably the BSDs, can return more than six random characters, and replace + * trailing `X` characters in `prefix` with random characters. + * + * The created directory path is passed as a string to the callback's second + * parameter. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * + * ```js + * import { mkdtemp } from 'node:fs'; + * import { join } from 'node:path'; + * import { tmpdir } from 'node:os'; + * + * mkdtemp(join(tmpdir(), 'foo-'), (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2 + * }); + * ``` + * + * The `fs.mkdtemp()` method will append the six randomly selected characters + * directly to the `prefix` string. For instance, given a directory `/tmp`, if the + * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator + * (`import { sep } from 'node:path'`). + * + * ```js + * import { tmpdir } from 'node:os'; + * import { mkdtemp } from 'node:fs'; + * + * // The parent directory for the new temporary directory + * const tmpDir = tmpdir(); + * + * // This method is *INCORRECT*: + * mkdtemp(tmpDir, (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Will print something similar to `/tmpabc123`. + * // A new temporary directory is created at the file system root + * // rather than *within* the /tmp directory. + * }); + * + * // This method is *CORRECT*: + * import { sep } from 'node:path'; + * mkdtemp(`${tmpDir}${sep}`, (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Will print something similar to `/tmp/abc123`. + * // A new temporary directory is created within + * // the /tmp directory. + * }); + * ``` + * @since v5.10.0 + */ + function mkdtemp( + prefix: string, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, folder: string) => void, + ): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp( + prefix: string, + options: BufferEncodingOption, + callback: (err: NodeJS.ErrnoException | null, folder: NonSharedBuffer) => void, + ): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp( + prefix: string, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, folder: string | NonSharedBuffer) => void, + ): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + */ + function mkdtemp( + prefix: string, + callback: (err: NodeJS.ErrnoException | null, folder: string) => void, + ): void; + namespace mkdtemp { + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: EncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options: BufferEncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: EncodingOption): Promise; + } + /** + * Returns the created directory path. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link mkdtemp}. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * @since v5.10.0 + */ + function mkdtempSync(prefix: string, options?: EncodingOption): string; + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtempSync(prefix: string, options: BufferEncodingOption): NonSharedBuffer; + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtempSync(prefix: string, options?: EncodingOption): string | NonSharedBuffer; + interface DisposableTempDir extends Disposable { + /** + * The path of the created directory. + */ + path: string; + /** + * A function which removes the created directory. + */ + remove(): void; + /** + * The same as `remove`. + */ + [Symbol.dispose](): void; + } + /** + * Returns a disposable object whose `path` property holds the created directory + * path. When the object is disposed, the directory and its contents will be + * removed if it still exists. If the directory cannot be deleted, disposal will + * throw an error. The object has a `remove()` method which will perform the same + * task. + * + * + * + * For detailed information, see the documentation of `fs.mkdtemp()`. + * + * There is no callback-based version of this API because it is designed for use + * with the `using` syntax. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * @since v24.4.0 + */ + function mkdtempDisposableSync(prefix: string, options?: EncodingOption): DisposableTempDir; + /** + * Reads the contents of a directory. The callback gets two arguments `(err, files)` where `files` is an array of the names of the files in the directory excluding `'.'` and `'..'`. + * + * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames passed to the callback. If the `encoding` is set to `'buffer'`, + * the filenames returned will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects. + * @since v0.1.8 + */ + function readdir( + path: PathLike, + options: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: + | { + encoding: "buffer"; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | "buffer", + callback: (err: NodeJS.ErrnoException | null, files: NonSharedBuffer[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, files: string[] | NonSharedBuffer[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function readdir( + path: PathLike, + callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdir( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean | undefined; + }, + callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. + */ + function readdir( + path: PathLike, + options: { + encoding: "buffer"; + withFileTypes: true; + recursive?: boolean | undefined; + }, + callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void, + ): void; + namespace readdir { + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options?: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options: + | "buffer" + | { + encoding: "buffer"; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent + */ + function __promisify__( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. + */ + function __promisify__( + path: PathLike, + options: { + encoding: "buffer"; + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Promise[]>; + } + /** + * Reads the contents of the directory. + * + * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames returned. If the `encoding` is set to `'buffer'`, + * the filenames returned will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects. + * @since v0.1.21 + */ + function readdirSync( + path: PathLike, + options?: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | BufferEncoding + | null, + ): string[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdirSync( + path: PathLike, + options: + | { + encoding: "buffer"; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | "buffer", + ): NonSharedBuffer[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdirSync( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | null, + ): string[] | NonSharedBuffer[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdirSync( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Dirent[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. + */ + function readdirSync( + path: PathLike, + options: { + encoding: "buffer"; + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Dirent[]; + /** + * Closes the file descriptor. No arguments other than a possible exception are + * given to the completion callback. + * + * Calling `fs.close()` on any file descriptor (`fd`) that is currently in use + * through any other `fs` operation may lead to undefined behavior. + * + * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. + * @since v0.0.2 + */ + function close(fd: number, callback?: NoParamCallback): void; + namespace close { + /** + * Asynchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Closes the file descriptor. Returns `undefined`. + * + * Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use + * through any other `fs` operation may lead to undefined behavior. + * + * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. + * @since v0.1.21 + */ + function closeSync(fd: number): void; + /** + * Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details. + * + * `mode` sets the file mode (permission and sticky bits), but only if the file was + * created. On Windows, only the write permission can be manipulated; see {@link chmod}. + * + * The callback gets two arguments `(err, fd)`. + * + * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented + * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains + * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). + * + * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc. + * @since v0.0.2 + * @param [flags='r'] See `support of file system `flags``. + * @param [mode=0o666] + */ + function open( + path: PathLike, + flags: OpenMode | undefined, + mode: Mode | undefined | null, + callback: (err: NodeJS.ErrnoException | null, fd: number) => void, + ): void; + /** + * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param [flags='r'] See `support of file system `flags``. + */ + function open( + path: PathLike, + flags: OpenMode | undefined, + callback: (err: NodeJS.ErrnoException | null, fd: number) => void, + ): void; + /** + * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + namespace open { + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise; + } + /** + * Returns an integer representing the file descriptor. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link open}. + * @since v0.1.21 + * @param [flags='r'] + * @param [mode=0o666] + */ + function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number; + /** + * Change the file system timestamps of the object referenced by `path`. + * + * The `atime` and `mtime` arguments follow these rules: + * + * * Values can be either numbers representing Unix epoch time in seconds, `Date`s, or a numeric string like `'123456789.0'`. + * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown. + * @since v0.4.2 + */ + function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + namespace utimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link utimes}. + * @since v0.4.2 + */ + function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; + /** + * Change the file system timestamps of the object referenced by the supplied file + * descriptor. See {@link utimes}. + * @since v0.4.2 + */ + function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + namespace futimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Synchronous version of {@link futimes}. Returns `undefined`. + * @since v0.4.2 + */ + function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void; + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. No arguments other + * than a possible exception are given to the completion callback. + * @since v0.1.96 + */ + function fsync(fd: number, callback: NoParamCallback): void; + namespace fsync { + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`. + * @since v0.1.96 + */ + function fsyncSync(fd: number): void; + interface WriteOptions { + /** + * @default 0 + */ + offset?: number | undefined; + /** + * @default `buffer.byteLength - offset` + */ + length?: number | undefined; + /** + * @default null + */ + position?: number | null | undefined; + } + /** + * Write `buffer` to the file specified by `fd`. + * + * `offset` determines the part of the buffer to be written, and `length` is + * an integer specifying the number of bytes to write. + * + * `position` refers to the offset from the beginning of the file where this data + * should be written. If `typeof position !== 'number'`, the data will be written + * at the current position. See [`pwrite(2)`](http://man7.org/linux/man-pages/man2/pwrite.2.html). + * + * The callback will be given three arguments `(err, bytesWritten, buffer)` where `bytesWritten` specifies how many _bytes_ were written from `buffer`. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesWritten` and `buffer` properties. + * + * It is unsafe to use `fs.write()` multiple times on the same file without waiting + * for the callback. For this scenario, {@link createWriteStream} is + * recommended. + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v0.0.2 + * @param [offset=0] + * @param [length=buffer.byteLength - offset] + * @param [position='null'] + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + position: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + */ + function write( + fd: number, + buffer: TBuffer, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param options An object with the following properties: + * * `offset` The part of the buffer to be written. If not supplied, defaults to `0`. + * * `length` The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * * `position` The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function write( + fd: number, + buffer: TBuffer, + options: WriteOptions, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function write( + fd: number, + string: string, + position: number | undefined | null, + encoding: BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, + ): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function write( + fd: number, + string: string, + position: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, + ): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + */ + function write( + fd: number, + string: string, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, + ): void; + namespace write { + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function __promisify__( + fd: number, + buffer?: TBuffer, + offset?: number, + length?: number, + position?: number | null, + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param options An object with the following properties: + * * `offset` The part of the buffer to be written. If not supplied, defaults to `0`. + * * `length` The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * * `position` The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function __promisify__( + fd: number, + buffer?: TBuffer, + options?: WriteOptions, + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function __promisify__( + fd: number, + string: string, + position?: number | null, + encoding?: BufferEncoding | null, + ): Promise<{ + bytesWritten: number; + buffer: string; + }>; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link write}. + * @since v0.1.21 + * @param [offset=0] + * @param [length=buffer.byteLength - offset] + * @param [position='null'] + * @return The number of bytes written. + */ + function writeSync( + fd: number, + buffer: NodeJS.ArrayBufferView, + offset?: number | null, + length?: number | null, + position?: number | null, + ): number; + /** + * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function writeSync( + fd: number, + string: string, + position?: number | null, + encoding?: BufferEncoding | null, + ): number; + type ReadPosition = number | bigint; + interface ReadOptions { + /** + * @default 0 + */ + offset?: number | undefined; + /** + * @default `length of buffer` + */ + length?: number | undefined; + /** + * @default null + */ + position?: ReadPosition | null | undefined; + } + interface ReadOptionsWithBuffer extends ReadOptions { + buffer?: T | undefined; + } + /** + * Read data from the file specified by `fd`. + * + * The callback is given the three arguments, `(err, bytesRead, buffer)`. + * + * If the file is not modified concurrently, the end-of-file is reached when the + * number of bytes read is zero. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesRead` and `buffer` properties. + * @since v0.0.2 + * @param buffer The buffer that the data will be written to. + * @param offset The position in `buffer` to write the data to. + * @param length The number of bytes to read. + * @param position Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If + * `position` is an integer, the file position will be unchanged. + */ + function read( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: ReadPosition | null, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + /** + * Similar to the above `fs.read` function, this version takes an optional `options` object. + * If not otherwise specified in an `options` object, + * `buffer` defaults to `Buffer.alloc(16384)`, + * `offset` defaults to `0`, + * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0 + * `position` defaults to `null` + * @since v12.17.0, 13.11.0 + */ + function read( + fd: number, + options: ReadOptionsWithBuffer, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + function read( + fd: number, + buffer: TBuffer, + options: ReadOptions, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + function read( + fd: number, + buffer: TBuffer, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + function read( + fd: number, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NonSharedBuffer) => void, + ): void; + namespace read { + /** + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + function __promisify__( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: ReadPosition | null, + ): Promise<{ + bytesRead: number; + buffer: TBuffer; + }>; + function __promisify__( + fd: number, + options: ReadOptionsWithBuffer, + ): Promise<{ + bytesRead: number; + buffer: TBuffer; + }>; + function __promisify__(fd: number): Promise<{ + bytesRead: number; + buffer: NonSharedBuffer; + }>; + } + /** + * Returns the number of `bytesRead`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link read}. + * @since v0.1.21 + * @param [position='null'] + */ + function readSync( + fd: number, + buffer: NodeJS.ArrayBufferView, + offset: number, + length: number, + position: ReadPosition | null, + ): number; + /** + * Similar to the above `fs.readSync` function, this version takes an optional `options` object. + * If no `options` object is specified, it will default with the above values. + */ + function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadOptions): number; + interface ReadFileOptions extends Abortable { + encoding?: BufferEncoding | null | undefined; + flag?: OpenMode | undefined; + } + interface ReadFileOptionsWithStringEncoding extends ReadFileOptions { + encoding: BufferEncoding; + } + interface ReadFileOptionsWithBufferEncoding extends ReadFileOptions { + encoding?: null | undefined; + } + interface ReadFileOptionsWithBuffer extends ReadFileOptionsWithBufferEncoding { + buffer: T | ((size: number) => T); + } + /** + * Asynchronously reads the entire contents of a file. + * + * ```js + * import { readFile } from 'node:fs'; + * + * readFile('/etc/passwd', (err, data) => { + * if (err) throw err; + * console.log(data); + * }); + * ``` + * + * The callback is passed two arguments `(err, data)`, where `data` is the + * contents of the file. + * + * If no encoding is specified, then the raw buffer is returned. + * + * If `buffer` is provided and no encoding is specified, the returned `Buffer` is + * a view over the supplied buffer containing only the bytes read. If the + * supplied buffer is too small to contain the entire file, the callback is + * called with an error. + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { readFile } from 'node:fs'; + * + * readFile('/etc/passwd', 'utf8', callback); + * ``` + * + * When the path is a directory, the behavior of `fs.readFile()` and + * `fs.readFileSync()` is platform-specific. On macOS, Linux, and Windows, an + * error will be returned. On FreeBSD, a representation of the directory's contents + * will be returned. + * + * ```js + * import { readFile } from 'node:fs'; + * + * // macOS, Linux, and Windows + * readFile('', (err, data) => { + * // => [Error: EISDIR: illegal operation on a directory, read ] + * }); + * + * // FreeBSD + * readFile('', (err, data) => { + * // => null, + * }); + * ``` + * + * It is possible to abort an ongoing request using an `AbortSignal`. If a + * request is aborted the callback is called with an `AbortError`: + * + * ```js + * import { readFile } from 'node:fs'; + * + * const controller = new AbortController(); + * const signal = controller.signal; + * readFile(fileInfo[0].name, { signal }, (err, buf) => { + * // ... + * }); + * // When you want to abort the request + * controller.abort(); + * ``` + * + * The `fs.readFile()` function buffers the entire file. To minimize memory costs, + * when possible prefer streaming via `fs.createReadStream()`. + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.readFile` performs. + * + * An example using the `buffer` option with a pre-allocated buffer: + * + * ```js + * import { Buffer } from 'node:buffer'; + * import { readFile } from 'node:fs'; + * + * const buf = Buffer.alloc(16384); + * readFile('/path/to/file', { buffer: buf }, (err, data) => { + * if (err) throw err; + * console.log(data); // A view over `buf` containing only the bytes read + * }); + * ``` + * + * An example using the `buffer` option with a function returning a buffer: + * + * ```js + * import { Buffer } from 'node:buffer'; + * import { readFile } from 'node:fs'; + * + * readFile('/path/to/file', { + * buffer: (size) => Buffer.alloc(size), + * }, (err, data) => { + * if (err) throw err; + * console.log(data); + * }); + * ``` + * @since v0.1.29 + * @param path filename or file descriptor + */ + function readFile( + path: PathOrFileDescriptor, + options: ReadFileOptionsWithBuffer, + callback: (err: NodeJS.ErrnoException | null, data: BufferView) => void, + ): void; + function readFile( + path: PathOrFileDescriptor, + options: ReadFileOptionsWithBufferEncoding | null | undefined, + callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void, + ): void; + function readFile( + path: PathOrFileDescriptor, + options: ReadFileOptionsWithStringEncoding | BufferEncoding, + callback: (err: NodeJS.ErrnoException | null, data: string) => void, + ): void; + function readFile( + path: PathOrFileDescriptor, + options: ReadFileOptions | BufferEncoding | null | undefined, + callback: (err: NodeJS.ErrnoException | null, data: string | NonSharedBuffer) => void, + ): void; + function readFile( + path: PathOrFileDescriptor, + callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void, + ): void; + namespace readFile { + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options?: { + encoding?: null | undefined; + flag?: string | undefined; + } | null, + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options: + | { + encoding: BufferEncoding; + flag?: string | undefined; + } + | BufferEncoding, + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options?: + | (ObjectEncodingOptions & { + flag?: string | undefined; + }) + | BufferEncoding + | null, + ): Promise; + } + interface ReadFileSyncOptions { + encoding?: BufferEncoding | null | undefined; + flag?: OpenMode | undefined; + } + interface ReadFileSyncOptionsWithStringEncoding extends ReadFileSyncOptions { + encoding: BufferEncoding; + } + interface ReadFileSyncOptionsWithBufferEncoding extends ReadFileSyncOptions { + encoding?: null | undefined; + } + interface ReadFileSyncOptionsWithBuffer + extends ReadFileSyncOptionsWithBufferEncoding + { + buffer: T | ((size: number) => T); + } + /** + * Returns the contents of the `path`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: `fs.readFile()`. + * + * If the `encoding` option is specified then this function returns a + * string. Otherwise it returns a buffer. + * + * If `buffer` is provided and no encoding is specified, the returned {Buffer} is + * a view over the supplied buffer containing only the bytes read. If the + * supplied buffer is too small to contain the entire file, an error will be + * thrown. + * + * Similar to `fs.readFile()`, when the path is a directory, the behavior of + * `fs.readFileSync()` is platform-specific. + * + * ```js + * import { readFileSync } from 'node:fs'; + * + * // macOS, Linux, and Windows + * readFileSync(''); + * // => [Error: EISDIR: illegal operation on a directory, read ] + * + * // FreeBSD + * readFileSync(''); // => + * ``` + * @since v0.1.8 + * @param path filename or file descriptor + */ + function readFileSync( + path: PathOrFileDescriptor, + options: ReadFileSyncOptionsWithBuffer, + ): BufferView; + function readFileSync( + path: PathOrFileDescriptor, + options?: ReadFileSyncOptionsWithBufferEncoding | null, + ): NonSharedBuffer; + function readFileSync( + path: PathOrFileDescriptor, + options: ReadFileSyncOptionsWithStringEncoding | BufferEncoding, + ): string; + function readFileSync(path: PathOrFileDescriptor, options: ReadFileSyncOptions): string | NonSharedBuffer; + type WriteFileOptions = + | ( + & ObjectEncodingOptions + & Abortable + & { + mode?: Mode | undefined; + flag?: string | undefined; + flush?: boolean | undefined; + } + ) + | BufferEncoding + | null; + /** + * When `file` is a filename, asynchronously writes data to the file, replacing the + * file if it already exists. `data` can be a string or a buffer. + * + * When `file` is a file descriptor, the behavior is similar to calling `fs.write()` directly (which is recommended). See the notes below on using + * a file descriptor. + * + * The `encoding` option is ignored if `data` is a buffer. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { writeFile } from 'node:fs'; + * import { Buffer } from 'node:buffer'; + * + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * writeFile('message.txt', data, (err) => { + * if (err) throw err; + * console.log('The file has been saved!'); + * }); + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { writeFile } from 'node:fs'; + * + * writeFile('message.txt', 'Hello Node.js', 'utf8', callback); + * ``` + * + * It is unsafe to use `fs.writeFile()` multiple times on the same file without + * waiting for the callback. For this scenario, {@link createWriteStream} is + * recommended. + * + * Similarly to `fs.readFile` \- `fs.writeFile` is a convenience method that + * performs multiple `write` calls internally to write the buffer passed to it. + * For performance sensitive code consider using {@link createWriteStream}. + * + * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`. + * Cancelation is "best effort", and some amount of data is likely still + * to be written. + * + * ```js + * import { writeFile } from 'node:fs'; + * import { Buffer } from 'node:buffer'; + * + * const controller = new AbortController(); + * const { signal } = controller; + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * writeFile('message.txt', data, { signal }, (err) => { + * // When a request is aborted - the callback is called with an AbortError + * }); + * // When the request should be aborted + * controller.abort(); + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.writeFile` performs. + * @since v0.1.29 + * @param file filename or file descriptor + */ + function writeFile( + file: PathOrFileDescriptor, + data: string | NodeJS.ArrayBufferView, + options: WriteFileOptions, + callback: NoParamCallback, + ): void; + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + function writeFile( + path: PathOrFileDescriptor, + data: string | NodeJS.ArrayBufferView, + callback: NoParamCallback, + ): void; + namespace writeFile { + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function __promisify__( + path: PathOrFileDescriptor, + data: string | NodeJS.ArrayBufferView, + options?: WriteFileOptions, + ): Promise; + } + /** + * Returns `undefined`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link writeFile}. + * @since v0.1.29 + * @param file filename or file descriptor + */ + function writeFileSync( + file: PathOrFileDescriptor, + data: string | NodeJS.ArrayBufferView, + options?: WriteFileOptions, + ): void; + /** + * Asynchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { appendFile } from 'node:fs'; + * + * appendFile('message.txt', 'data to append', (err) => { + * if (err) throw err; + * console.log('The "data to append" was appended to file!'); + * }); + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { appendFile } from 'node:fs'; + * + * appendFile('message.txt', 'data to append', 'utf8', callback); + * ``` + * + * The `path` may be specified as a numeric file descriptor that has been opened + * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will + * not be closed automatically. + * + * ```js + * import { open, close, appendFile } from 'node:fs'; + * + * function closeFd(fd) { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * + * open('message.txt', 'a', (err, fd) => { + * if (err) throw err; + * + * try { + * appendFile(fd, 'data to append', 'utf8', (err) => { + * closeFd(fd); + * if (err) throw err; + * }); + * } catch (err) { + * closeFd(fd); + * throw err; + * } + * }); + * ``` + * @since v0.6.7 + * @param path filename or file descriptor + */ + function appendFile( + path: PathOrFileDescriptor, + data: string | Uint8Array, + options: WriteFileOptions, + callback: NoParamCallback, + ): void; + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void; + namespace appendFile { + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function __promisify__( + file: PathOrFileDescriptor, + data: string | Uint8Array, + options?: WriteFileOptions, + ): Promise; + } + /** + * Synchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { appendFileSync } from 'node:fs'; + * + * try { + * appendFileSync('message.txt', 'data to append'); + * console.log('The "data to append" was appended to file!'); + * } catch (err) { + * // Handle the error + * } + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { appendFileSync } from 'node:fs'; + * + * appendFileSync('message.txt', 'data to append', 'utf8'); + * ``` + * + * The `path` may be specified as a numeric file descriptor that has been opened + * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will + * not be closed automatically. + * + * ```js + * import { openSync, closeSync, appendFileSync } from 'node:fs'; + * + * let fd; + * + * try { + * fd = openSync('message.txt', 'a'); + * appendFileSync(fd, 'data to append', 'utf8'); + * } catch (err) { + * // Handle the error + * } finally { + * if (fd !== undefined) + * closeSync(fd); + * } + * ``` + * @since v0.6.7 + * @param path filename or file descriptor + */ + function appendFileSync( + path: PathOrFileDescriptor, + data: string | Uint8Array, + options?: WriteFileOptions, + ): void; + /** + * Watch for changes on `filename`. The callback `listener` will be called each + * time the file is accessed. + * + * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates + * whether the process should continue to run as long as files are being watched. + * The `options` object may specify an `interval` property indicating how often the + * target should be polled in milliseconds. + * + * The `listener` gets two arguments the current stat object and the previous + * stat object: + * + * ```js + * import { watchFile } from 'node:fs'; + * + * watchFile('message.text', (curr, prev) => { + * console.log(`the current mtime is: ${curr.mtime}`); + * console.log(`the previous mtime was: ${prev.mtime}`); + * }); + * ``` + * + * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, + * the numeric values in these objects are specified as `BigInt`s. + * + * To be notified when the file was modified, not just accessed, it is necessary + * to compare `curr.mtimeMs` and `prev.mtimeMs`. + * + * When an `fs.watchFile` operation results in an `ENOENT` error, it + * will invoke the listener once, with all the fields zeroed (or, for dates, the + * Unix Epoch). If the file is created later on, the listener will be called + * again, with the latest stat objects. This is a change in functionality since + * v0.10. + * + * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. + * + * When a file being watched by `fs.watchFile()` disappears and reappears, + * then the contents of `previous` in the second callback event (the file's + * reappearance) will be the same as the contents of `previous` in the first + * callback event (its disappearance). + * + * This happens when: + * + * * the file is deleted, followed by a restore + * * the file is renamed and then renamed a second time back to its original name + * @since v0.1.31 + */ + interface WatchFileOptions { + bigint?: boolean | undefined; + persistent?: boolean | undefined; + interval?: number | undefined; + } + /** + * Watch for changes on `filename`. The callback `listener` will be called each + * time the file is accessed. + * + * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates + * whether the process should continue to run as long as files are being watched. + * The `options` object may specify an `interval` property indicating how often the + * target should be polled in milliseconds. + * + * The `listener` gets two arguments the current stat object and the previous + * stat object: + * + * ```js + * import { watchFile } from 'node:fs'; + * + * watchFile('message.text', (curr, prev) => { + * console.log(`the current mtime is: ${curr.mtime}`); + * console.log(`the previous mtime was: ${prev.mtime}`); + * }); + * ``` + * + * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, + * the numeric values in these objects are specified as `BigInt`s. + * + * To be notified when the file was modified, not just accessed, it is necessary + * to compare `curr.mtimeMs` and `prev.mtimeMs`. + * + * When an `fs.watchFile` operation results in an `ENOENT` error, it + * will invoke the listener once, with all the fields zeroed (or, for dates, the + * Unix Epoch). If the file is created later on, the listener will be called + * again, with the latest stat objects. This is a change in functionality since + * v0.10. + * + * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. + * + * When a file being watched by `fs.watchFile()` disappears and reappears, + * then the contents of `previous` in the second callback event (the file's + * reappearance) will be the same as the contents of `previous` in the first + * callback event (its disappearance). + * + * This happens when: + * + * * the file is deleted, followed by a restore + * * the file is renamed and then renamed a second time back to its original name + * @since v0.1.31 + */ + function watchFile( + filename: PathLike, + options: + | (WatchFileOptions & { + bigint?: false | undefined; + }) + | undefined, + listener: StatsListener, + ): StatWatcher; + function watchFile( + filename: PathLike, + options: + | (WatchFileOptions & { + bigint: true; + }) + | undefined, + listener: BigIntStatsListener, + ): StatWatcher; + /** + * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + */ + function watchFile(filename: PathLike, listener: StatsListener): StatWatcher; + /** + * Stop watching for changes on `filename`. If `listener` is specified, only that + * particular listener is removed. Otherwise, _all_ listeners are removed, + * effectively stopping watching of `filename`. + * + * Calling `fs.unwatchFile()` with a filename that is not being watched is a + * no-op, not an error. + * + * Using {@link watch} is more efficient than `fs.watchFile()` and `fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()` and `fs.unwatchFile()` when possible. + * @since v0.1.31 + * @param listener Optional, a listener previously attached using `fs.watchFile()` + */ + function unwatchFile(filename: PathLike, listener?: StatsListener): void; + function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void; + type WatchIgnorePredicate = string | RegExp | ((filename: string) => boolean); + interface WatchOptions extends Abortable { + encoding?: BufferEncoding | "buffer" | undefined; + persistent?: boolean | undefined; + recursive?: boolean | undefined; + ignore?: WatchIgnorePredicate | readonly WatchIgnorePredicate[] | undefined; + } + interface WatchOptionsWithBufferEncoding extends WatchOptions { + encoding: "buffer"; + } + interface WatchOptionsWithStringEncoding extends WatchOptions { + encoding?: BufferEncoding | undefined; + } + type WatchEventType = "rename" | "change"; + type WatchListener = (event: WatchEventType, filename: T | null) => void; + type StatsListener = (curr: Stats, prev: Stats) => void; + type BigIntStatsListener = (curr: BigIntStats, prev: BigIntStats) => void; + /** + * Watch for changes on `filename`, where `filename` is either a file or a + * directory. + * + * The second argument is optional. If `options` is provided as a string, it + * specifies the `encoding`. Otherwise `options` should be passed as an object. + * + * The listener callback gets two arguments `(eventType, filename)`. `eventType`is either `'rename'` or `'change'`, and `filename` is the name of the file + * which triggered the event. + * + * On most platforms, `'rename'` is emitted whenever a filename appears or + * disappears in the directory. + * + * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of `eventType`. + * + * If a `signal` is passed, aborting the corresponding AbortController will close + * the returned `fs.FSWatcher`. + * @since v0.5.10 + * @param listener + */ + function watch( + filename: PathLike, + options?: WatchOptionsWithStringEncoding | BufferEncoding | null, + listener?: WatchListener, + ): FSWatcher; + function watch( + filename: PathLike, + options: WatchOptionsWithBufferEncoding | "buffer", + listener: WatchListener, + ): FSWatcher; + function watch( + filename: PathLike, + options: WatchOptions | BufferEncoding | "buffer" | null, + listener: WatchListener, + ): FSWatcher; + function watch(filename: PathLike, listener: WatchListener): FSWatcher; + /** + * Test whether or not the given path exists by checking with the file system. + * Then call the `callback` argument with either true or false: + * + * ```js + * import { exists } from 'node:fs'; + * + * exists('/etc/passwd', (e) => { + * console.log(e ? 'it exists' : 'no passwd!'); + * }); + * ``` + * + * **The parameters for this callback are not consistent with other Node.js** + * **callbacks.** Normally, the first parameter to a Node.js callback is an `err` parameter, optionally followed by other parameters. The `fs.exists()` callback + * has only one boolean parameter. This is one reason `fs.access()` is recommended + * instead of `fs.exists()`. + * + * Using `fs.exists()` to check for the existence of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. Doing + * so introduces a race condition, since other processes may change the file's + * state between the two calls. Instead, user code should open/read/write the + * file directly and handle the error raised if the file does not exist. + * + * **write (NOT RECOMMENDED)** + * + * ```js + * import { exists, open, close } from 'node:fs'; + * + * exists('myfile', (e) => { + * if (e) { + * console.error('myfile already exists'); + * } else { + * open('myfile', 'wx', (err, fd) => { + * if (err) throw err; + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * } + * }); + * ``` + * + * **write (RECOMMENDED)** + * + * ```js + * import { open, close } from 'node:fs'; + * open('myfile', 'wx', (err, fd) => { + * if (err) { + * if (err.code === 'EEXIST') { + * console.error('myfile already exists'); + * return; + * } + * + * throw err; + * } + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * **read (NOT RECOMMENDED)** + * + * ```js + * import { open, close, exists } from 'node:fs'; + * + * exists('myfile', (e) => { + * if (e) { + * open('myfile', 'r', (err, fd) => { + * if (err) throw err; + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * } else { + * console.error('myfile does not exist'); + * } + * }); + * ``` + * + * **read (RECOMMENDED)** + * + * ```js + * import { open, close } from 'node:fs'; + * + * open('myfile', 'r', (err, fd) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * The "not recommended" examples above check for existence and then use the + * file; the "recommended" examples are better because they use the file directly + * and handle the error, if any. + * + * In general, check for the existence of a file only if the file won't be + * used directly, for example when its existence is a signal from another + * process. + * @since v0.0.2 + * @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead. + */ + function exists(path: PathLike, callback: (exists: boolean) => void): void; + /** @deprecated */ + namespace exists { + /** + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike): Promise; + } + /** + * Returns `true` if the path exists, `false` otherwise. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link exists}. + * + * `fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback` parameter to `fs.exists()` accepts parameters that are inconsistent with other + * Node.js callbacks. `fs.existsSync()` does not use a callback. + * + * ```js + * import { existsSync } from 'node:fs'; + * + * if (existsSync('/etc/passwd')) + * console.log('The path exists.'); + * ``` + * @since v0.1.21 + */ + function existsSync(path: PathLike): boolean; + namespace constants { + // File Access Constants + /** Constant for fs.access(). File is visible to the calling process. */ + const F_OK: number; + /** Constant for fs.access(). File can be read by the calling process. */ + const R_OK: number; + /** Constant for fs.access(). File can be written by the calling process. */ + const W_OK: number; + /** Constant for fs.access(). File can be executed by the calling process. */ + const X_OK: number; + // File Copy Constants + /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ + const COPYFILE_EXCL: number; + /** + * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used. + */ + const COPYFILE_FICLONE: number; + /** + * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then the operation will fail with an error. + */ + const COPYFILE_FICLONE_FORCE: number; + // File Open Constants + /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ + const O_RDONLY: number; + /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ + const O_WRONLY: number; + /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ + const O_RDWR: number; + /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ + const O_CREAT: number; + /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ + const O_EXCL: number; + /** + * Constant for fs.open(). Flag indicating that if path identifies a terminal device, + * opening the path shall not cause that terminal to become the controlling terminal for the process + * (if the process does not already have one). + */ + const O_NOCTTY: number; + /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ + const O_TRUNC: number; + /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ + const O_APPEND: number; + /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ + const O_DIRECTORY: number; + /** + * constant for fs.open(). + * Flag indicating reading accesses to the file system will no longer result in + * an update to the atime information associated with the file. + * This flag is available on Linux operating systems only. + */ + const O_NOATIME: number; + /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ + const O_NOFOLLOW: number; + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ + const O_SYNC: number; + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */ + const O_DSYNC: number; + /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ + const O_SYMLINK: number; + /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ + const O_DIRECT: number; + /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ + const O_NONBLOCK: number; + // File Type Constants + /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ + const S_IFMT: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ + const S_IFREG: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ + const S_IFDIR: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ + const S_IFCHR: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ + const S_IFBLK: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ + const S_IFIFO: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ + const S_IFLNK: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ + const S_IFSOCK: number; + // File Mode Constants + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ + const S_IRWXU: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ + const S_IRUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ + const S_IWUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ + const S_IXUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ + const S_IRWXG: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ + const S_IRGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ + const S_IWGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ + const S_IXGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ + const S_IRWXO: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ + const S_IROTH: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ + const S_IWOTH: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ + const S_IXOTH: number; + /** + * When set, a memory file mapping is used to access the file. This flag + * is available on Windows operating systems only. On other operating systems, + * this flag is ignored. + */ + const UV_FS_O_FILEMAP: number; + } + /** + * Tests a user's permissions for the file or directory specified by `path`. + * The `mode` argument is an optional integer that specifies the accessibility + * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK` + * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * The final argument, `callback`, is a callback function that is invoked with + * a possible error argument. If any of the accessibility checks fail, the error + * argument will be an `Error` object. The following examples check if `package.json` exists, and if it is readable or writable. + * + * ```js + * import { access, constants } from 'node:fs'; + * + * const file = 'package.json'; + * + * // Check if the file exists in the current directory. + * access(file, constants.F_OK, (err) => { + * console.log(`${file} ${err ? 'does not exist' : 'exists'}`); + * }); + * + * // Check if the file is readable. + * access(file, constants.R_OK, (err) => { + * console.log(`${file} ${err ? 'is not readable' : 'is readable'}`); + * }); + * + * // Check if the file is writable. + * access(file, constants.W_OK, (err) => { + * console.log(`${file} ${err ? 'is not writable' : 'is writable'}`); + * }); + * + * // Check if the file is readable and writable. + * access(file, constants.R_OK | constants.W_OK, (err) => { + * console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`); + * }); + * ``` + * + * Do not use `fs.access()` to check for the accessibility of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()`. Doing + * so introduces a race condition, since other processes may change the file's + * state between the two calls. Instead, user code should open/read/write the + * file directly and handle the error raised if the file is not accessible. + * + * **write (NOT RECOMMENDED)** + * + * ```js + * import { access, open, close } from 'node:fs'; + * + * access('myfile', (err) => { + * if (!err) { + * console.error('myfile already exists'); + * return; + * } + * + * open('myfile', 'wx', (err, fd) => { + * if (err) throw err; + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * }); + * ``` + * + * **write (RECOMMENDED)** + * + * ```js + * import { open, close } from 'node:fs'; + * + * open('myfile', 'wx', (err, fd) => { + * if (err) { + * if (err.code === 'EEXIST') { + * console.error('myfile already exists'); + * return; + * } + * + * throw err; + * } + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * **read (NOT RECOMMENDED)** + * + * ```js + * import { access, open, close } from 'node:fs'; + * access('myfile', (err) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * open('myfile', 'r', (err, fd) => { + * if (err) throw err; + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * }); + * ``` + * + * **read (RECOMMENDED)** + * + * ```js + * import { open, close } from 'node:fs'; + * + * open('myfile', 'r', (err, fd) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * The "not recommended" examples above check for accessibility and then use the + * file; the "recommended" examples are better because they use the file directly + * and handle the error, if any. + * + * In general, check for the accessibility of a file only if the file will not be + * used directly, for example when its accessibility is a signal from another + * process. + * + * On Windows, access-control policies (ACLs) on a directory may limit access to + * a file or directory. The `fs.access()` function, however, does not check the + * ACL and therefore may report that a path is accessible even if the ACL restricts + * the user from reading or writing to it. + * @since v0.11.15 + * @param [mode=fs.constants.F_OK] + */ + function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void; + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + */ + function access(path: PathLike, callback: NoParamCallback): void; + namespace access { + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike, mode?: number): Promise; + } + /** + * Synchronously tests a user's permissions for the file or directory specified + * by `path`. The `mode` argument is an optional integer that specifies the + * accessibility checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and + * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise, + * the method will return `undefined`. + * + * ```js + * import { accessSync, constants } from 'node:fs'; + * + * try { + * accessSync('etc/passwd', constants.R_OK | constants.W_OK); + * console.log('can read/write'); + * } catch (err) { + * console.error('no access!'); + * } + * ``` + * @since v0.11.15 + * @param [mode=fs.constants.F_OK] + */ + function accessSync(path: PathLike, mode?: number): void; + interface StreamOptions { + flags?: string | undefined; + encoding?: BufferEncoding | undefined; + fd?: number | FileHandle | undefined; + mode?: number | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + signal?: AbortSignal | null | undefined; + highWaterMark?: number | undefined; + } + interface FSImplementation { + open?: (...args: any[]) => any; + close?: (...args: any[]) => any; + } + interface CreateReadStreamFSImplementation extends FSImplementation { + read: (...args: any[]) => any; + } + interface CreateWriteStreamFSImplementation extends FSImplementation { + write: (...args: any[]) => any; + writev?: (...args: any[]) => any; + } + interface ReadStreamOptions extends StreamOptions { + fs?: CreateReadStreamFSImplementation | null | undefined; + end?: number | undefined; + } + interface WriteStreamOptions extends StreamOptions { + fs?: CreateWriteStreamFSImplementation | null | undefined; + flush?: boolean | undefined; + } + /** + * `options` can include `start` and `end` values to read a range of bytes from + * the file instead of the entire file. Both `start` and `end` are inclusive and + * start counting at 0, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is + * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the + * current file position. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use + * the specified file descriptor. This means that no `'open'` event will be + * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`. + * + * If `fd` points to a character device that only supports blocking reads + * (such as keyboard or sound card), read operations do not finish until data is + * available. This can prevent the process from exiting and the stream from + * closing naturally. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * By providing the `fs` option, it is possible to override the corresponding `fs` implementations for `open`, `read`, and `close`. When providing the `fs` option, + * an override for `read` is required. If no `fd` is provided, an override for `open` is also required. If `autoClose` is `true`, an override for `close` is + * also required. + * + * ```js + * import { createReadStream } from 'node:fs'; + * + * // Create a stream from some character device. + * const stream = createReadStream('/dev/input/event0'); + * setTimeout(() => { + * stream.close(); // This may not close the stream. + * // Artificially marking end-of-stream, as if the underlying resource had + * // indicated end-of-file by itself, allows the stream to close. + * // This does not cancel pending read operations, and if there is such an + * // operation, the process may still not be able to exit successfully + * // until it finishes. + * stream.push(null); + * stream.read(0); + * }, 100); + * ``` + * + * If `autoClose` is false, then the file descriptor won't be closed, even if + * there's an error. It is the application's responsibility to close it and make + * sure there's no file descriptor leak. If `autoClose` is set to true (default + * behavior), on `'error'` or `'end'` the file descriptor will be closed + * automatically. + * + * `mode` sets the file mode (permission and sticky bits), but only if the + * file was created. + * + * An example to read the last 10 bytes of a file which is 100 bytes long: + * + * ```js + * import { createReadStream } from 'node:fs'; + * + * createReadStream('sample.txt', { start: 90, end: 99 }); + * ``` + * + * If `options` is a string, then it specifies the encoding. + * @since v0.1.31 + */ + function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream; + /** + * `options` may also include a `start` option to allow writing data at some + * position past the beginning of the file, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than + * replacing it may require the `flags` option to be set to `r+` rather than the + * default `w`. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, + * then the file descriptor won't be closed, even if there's an error. + * It is the application's responsibility to close it and make sure there's no + * file descriptor leak. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * By providing the `fs` option it is possible to override the corresponding `fs` implementations for `open`, `write`, `writev`, and `close`. Overriding `write()` without `writev()` can reduce + * performance as some optimizations (`_writev()`) + * will be disabled. When providing the `fs` option, overrides for at least one of `write` and `writev` are required. If no `fd` option is supplied, an override + * for `open` is also required. If `autoClose` is `true`, an override for `close` is also required. + * + * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the `path` argument and will use the specified file descriptor. This means that no `'open'` event will be + * emitted. `fd` should be blocking; non-blocking `fd`s + * should be passed to `net.Socket`. + * + * If `options` is a string, then it specifies the encoding. + * @since v0.1.31 + */ + function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream; + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other + * than a possible + * exception are given to the completion callback. + * @since v0.1.96 + */ + function fdatasync(fd: number, callback: NoParamCallback): void; + namespace fdatasync { + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Returns `undefined`. + * @since v0.1.96 + */ + function fdatasyncSync(fd: number): void; + /** + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. No arguments other than a possible exception are given to the + * callback function. Node.js makes no guarantees about the atomicity of the copy + * operation. If an error occurs after the destination file has been opened for + * writing, Node.js will attempt to remove the destination. + * + * `mode` is an optional integer that specifies the behavior + * of the copy operation. It is possible to create a mask consisting of the bitwise + * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). + * + * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already + * exists. + * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a + * copy-on-write reflink. If the platform does not support copy-on-write, then a + * fallback copy mechanism is used. + * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to + * create a copy-on-write reflink. If the platform does not support + * copy-on-write, then the operation will fail. + * + * ```js + * import { copyFile, constants } from 'node:fs'; + * + * function callback(err) { + * if (err) throw err; + * console.log('source.txt was copied to destination.txt'); + * } + * + * // destination.txt will be created or overwritten by default. + * copyFile('source.txt', 'destination.txt', callback); + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL, callback); + * ``` + * @since v8.5.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] modifiers for copy operation. + */ + function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void; + function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void; + namespace copyFile { + function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise; + } + /** + * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. Returns `undefined`. Node.js makes no guarantees about the + * atomicity of the copy operation. If an error occurs after the destination file + * has been opened for writing, Node.js will attempt to remove the destination. + * + * `mode` is an optional integer that specifies the behavior + * of the copy operation. It is possible to create a mask consisting of the bitwise + * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). + * + * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already + * exists. + * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a + * copy-on-write reflink. If the platform does not support copy-on-write, then a + * fallback copy mechanism is used. + * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to + * create a copy-on-write reflink. If the platform does not support + * copy-on-write, then the operation will fail. + * + * ```js + * import { copyFileSync, constants } from 'node:fs'; + * + * // destination.txt will be created or overwritten by default. + * copyFileSync('source.txt', 'destination.txt'); + * console.log('source.txt was copied to destination.txt'); + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * copyFileSync('source.txt', 'destination.txt', constants.COPYFILE_EXCL); + * ``` + * @since v8.5.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] modifiers for copy operation. + */ + function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void; + /** + * Write an array of `ArrayBufferView`s to the file specified by `fd` using `writev()`. + * + * `position` is the offset from the beginning of the file where this data + * should be written. If `typeof position !== 'number'`, the data will be written + * at the current position. + * + * The callback will be given three arguments: `err`, `bytesWritten`, and `buffers`. `bytesWritten` is how many bytes were written from `buffers`. + * + * If this method is `util.promisify()` ed, it returns a promise for an `Object` with `bytesWritten` and `buffers` properties. + * + * It is unsafe to use `fs.writev()` multiple times on the same file without + * waiting for the callback. For this scenario, use {@link createWriteStream}. + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v12.9.0 + * @param [position='null'] + */ + function writev( + fd: number, + buffers: TBuffers, + cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void, + ): void; + function writev( + fd: number, + buffers: TBuffers, + position: number | null, + cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void, + ): void; + // Providing a default type parameter doesn't provide true BC for userland consumers, but at least suppresses TS2314 + // TODO: remove default in future major version + interface WriteVResult { + bytesWritten: number; + buffers: T; + } + namespace writev { + function __promisify__( + fd: number, + buffers: TBuffers, + position?: number, + ): Promise>; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link writev}. + * @since v12.9.0 + * @param [position='null'] + * @return The number of bytes written. + */ + function writevSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number; + /** + * Read from a file specified by `fd` and write to an array of `ArrayBufferView`s + * using `readv()`. + * + * `position` is the offset from the beginning of the file from where data + * should be read. If `typeof position !== 'number'`, the data will be read + * from the current position. + * + * The callback will be given three arguments: `err`, `bytesRead`, and `buffers`. `bytesRead` is how many bytes were read from the file. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesRead` and `buffers` properties. + * @since v13.13.0, v12.17.0 + * @param [position='null'] + */ + function readv( + fd: number, + buffers: TBuffers, + cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void, + ): void; + function readv( + fd: number, + buffers: TBuffers, + position: number | null, + cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void, + ): void; + // Providing a default type parameter doesn't provide true BC for userland consumers, but at least suppresses TS2314 + // TODO: remove default in future major version + interface ReadVResult { + bytesRead: number; + buffers: T; + } + namespace readv { + function __promisify__( + fd: number, + buffers: TBuffers, + position?: number, + ): Promise>; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link readv}. + * @since v13.13.0, v12.17.0 + * @param [position='null'] + * @return The number of bytes read. + */ + function readvSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number; + + interface OpenAsBlobOptions { + /** + * An optional mime type for the blob. + * + * @default 'undefined' + */ + type?: string | undefined; + } + + /** + * Returns a `Blob` whose data is backed by the given file. + * + * The file must not be modified after the `Blob` is created. Any modifications + * will cause reading the `Blob` data to fail with a `DOMException` error. + * Synchronous stat operations on the file when the `Blob` is created, and before + * each read in order to detect whether the file data has been modified on disk. + * + * ```js + * import { openAsBlob } from 'node:fs'; + * + * const blob = await openAsBlob('the.file.txt'); + * const ab = await blob.arrayBuffer(); + * blob.stream(); + * ``` + * @since v19.8.0 + */ + function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise; + + interface OpenDirOptions { + /** + * @default 'utf8' + */ + encoding?: BufferEncoding | undefined; + /** + * Number of directory entries that are buffered + * internally when reading from the directory. Higher values lead to better + * performance but higher memory usage. + * @default 32 + */ + bufferSize?: number | undefined; + /** + * @default false + */ + recursive?: boolean | undefined; + } + /** + * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html). + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * @since v12.12.0 + */ + function opendirSync(path: PathLike, options?: OpenDirOptions): Dir; + /** + * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for + * more details. + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * @since v12.12.0 + */ + function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; + function opendir( + path: PathLike, + options: OpenDirOptions, + cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void, + ): void; + namespace opendir { + function __promisify__(path: PathLike, options?: OpenDirOptions): Promise

; + } + interface BigIntStats extends StatsBase { + atimeNs: bigint; + mtimeNs: bigint; + ctimeNs: bigint; + birthtimeNs: bigint; + } + interface BigIntOptions { + bigint: true; + } + interface StatOptions { + // TODO: add signal option once we sort its behavior out upstream + bigint?: boolean | undefined; + throwIfNoEntry?: boolean | undefined; + } + /** @deprecated This orphaned interface will be removed in a future version. Use `StatOptions` instead. */ + interface StatSyncOptions extends StatOptions {} + interface CopyOptionsBase { + /** + * Dereference symlinks + * @default false + */ + dereference?: boolean | undefined; + /** + * When `force` is `false`, and the destination + * exists, throw an error. + * @default false + */ + errorOnExist?: boolean | undefined; + /** + * Overwrite existing file or directory. _The copy + * operation will ignore errors if you set this to false and the destination + * exists. Use the `errorOnExist` option to change this behavior. + * @default true + */ + force?: boolean | undefined; + /** + * Modifiers for copy operation. See `mode` flag of {@link copyFileSync()} + */ + mode?: number | undefined; + /** + * When `true` timestamps from `src` will + * be preserved. + * @default false + */ + preserveTimestamps?: boolean | undefined; + /** + * Copy directories recursively. + * @default false + */ + recursive?: boolean | undefined; + /** + * When true, path resolution for symlinks will be skipped + * @default false + */ + verbatimSymlinks?: boolean | undefined; + } + interface CopyOptions extends CopyOptionsBase { + /** + * Function to filter copied files/directories. Return + * `true` to copy the item, `false` to ignore it. + */ + filter?: ((source: string, destination: string) => boolean | Promise) | undefined; + } + interface CopySyncOptions extends CopyOptionsBase { + /** + * Function to filter copied files/directories. Return + * `true` to copy the item, `false` to ignore it. + */ + filter?: ((source: string, destination: string) => boolean) | undefined; + } + /** + * Asynchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + */ + function cp( + source: string | URL, + destination: string | URL, + callback: (err: NodeJS.ErrnoException | null) => void, + ): void; + function cp( + source: string | URL, + destination: string | URL, + opts: CopyOptions, + callback: (err: NodeJS.ErrnoException | null) => void, + ): void; + /** + * Synchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + */ + function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void; + interface GlobOptions { + /** + * Current working directory. + * @default process.cwd() + */ + cwd?: string | URL | undefined; + /** + * Function to filter out files/directories or a + * list of glob patterns to be excluded. If a function is provided, return + * `true` to exclude the item, `false` to include it. + * If a string array is provided, each string should be a glob pattern that + * specifies paths to exclude. Note: Negation patterns (e.g., '!foo.js') are + * not supported. + * @default undefined + */ + exclude?: ((fileName: T) => boolean) | readonly string[] | undefined; + /** + * When `true`, symbolic links to directories are + * followed while expanding `**` patterns. + * @default false + */ + followSymlinks?: boolean | undefined; + /** + * `true` if the glob should return paths as `Dirent`s, `false` otherwise. + * @default false + * @since v22.2.0 + */ + withFileTypes?: boolean | undefined; + } + interface GlobOptionsWithFileTypes extends GlobOptions { + withFileTypes: true; + } + interface GlobOptionsWithoutFileTypes extends GlobOptions { + withFileTypes?: false | undefined; + } + + /** + * Retrieves the files matching the specified pattern. + * + * When `followSymlinks` is enabled, detected symbolic link cycles are not + * traversed recursively. + * + * ```js + * import { glob } from 'node:fs'; + * + * glob('*.js', (err, matches) => { + * if (err) throw err; + * console.log(matches); + * }); + * ``` + * @since v22.0.0 + */ + function glob( + pattern: string | readonly string[], + callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void, + ): void; + function glob( + pattern: string | readonly string[], + options: GlobOptionsWithFileTypes, + callback: ( + err: NodeJS.ErrnoException | null, + matches: Dirent[], + ) => void, + ): void; + function glob( + pattern: string | readonly string[], + options: GlobOptionsWithoutFileTypes, + callback: ( + err: NodeJS.ErrnoException | null, + matches: string[], + ) => void, + ): void; + function glob( + pattern: string | readonly string[], + options: GlobOptions, + callback: ( + err: NodeJS.ErrnoException | null, + matches: Dirent[] | string[], + ) => void, + ): void; + /** + * When `followSymlinks` is enabled, detected symbolic link cycles are not + * traversed recursively. + * + * ```js + * import { globSync } from 'node:fs'; + * + * console.log(globSync('*.js')); + * ``` + * @since v22.0.0 + * @returns paths of files that match the pattern. + */ + function globSync(pattern: string | readonly string[]): string[]; + function globSync( + pattern: string | readonly string[], + options: GlobOptionsWithFileTypes, + ): Dirent[]; + function globSync( + pattern: string | readonly string[], + options: GlobOptionsWithoutFileTypes, + ): string[]; + function globSync( + pattern: string | readonly string[], + options: GlobOptions, + ): Dirent[] | string[]; +} +declare module "node:fs" { + export * as promises from "node:fs/promises"; +} +declare module "fs" { + export * from "node:fs"; +} diff --git a/node_modules/@types/node/fs/promises.d.ts b/node_modules/@types/node/fs/promises.d.ts new file mode 100644 index 0000000..9366b97 --- /dev/null +++ b/node_modules/@types/node/fs/promises.d.ts @@ -0,0 +1,1477 @@ +declare module "node:fs/promises" { + import { BufferView, NonSharedBuffer } from "node:buffer"; + import { Abortable } from "node:events"; + import { Interface as ReadlineInterface } from "node:readline"; + import { + BigIntStats, + BigIntStatsFs, + BufferEncodingOption, + constants as fsConstants, + CopyOptions, + Dir, + Dirent, + EncodingOption, + GlobOptions, + GlobOptionsWithFileTypes, + GlobOptionsWithoutFileTypes, + MakeDirectoryOptions, + Mode, + ObjectEncodingOptions, + OpenDirOptions, + OpenMode, + PathLike, + ReadFileOptions, + ReadFileOptionsWithBuffer, + ReadFileOptionsWithBufferEncoding, + ReadFileOptionsWithStringEncoding, + ReadOptions, + ReadOptionsWithBuffer, + ReadPosition, + ReadStream, + ReadVResult, + RmOptions, + StatFsOptions, + StatOptions, + Stats, + StatsFs, + TimeLike, + WatchEventType, + WatchOptions as _WatchOptions, + WriteStream, + WriteVResult, + } from "node:fs"; + import { ByteReadableStream, Transform, Writer } from "node:stream/iter"; + import { ReadableStream } from "node:stream/web"; + interface FileChangeInfo { + eventType: WatchEventType; + filename: T | null; + } + interface FlagAndOpenMode { + mode?: Mode | undefined; + flag?: OpenMode | undefined; + } + interface FileReadResult { + bytesRead: number; + buffer: T; + } + /** @deprecated This interface will be removed in a future version. Use `import { ReadOptionsWithBuffer } from "node:fs"` instead. */ + interface FileReadOptions { + /** + * @default `Buffer.alloc(0xffff)` + */ + buffer?: T; + /** + * @default 0 + */ + offset?: number | null; + /** + * @default `buffer.byteLength` + */ + length?: number | null; + position?: ReadPosition | null; + } + interface CreateReadStreamOptions extends Abortable { + encoding?: BufferEncoding | null | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + end?: number | undefined; + highWaterMark?: number | undefined; + } + interface CreateWriteStreamOptions { + encoding?: BufferEncoding | null | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + highWaterMark?: number | undefined; + flush?: boolean | undefined; + } + interface ReadableWebStreamOptions { + autoClose?: boolean | undefined; + } + interface PullOptions extends Abortable { + /** + * Close the file handle when the stream ends. + * @default false + */ + autoClose?: boolean | undefined; + /** + * Byte offset to begin reading from. When specified, + * reads use explicit positioning (`pread` semantics). + */ + start?: number | undefined; + /** + * Maximum number of bytes to read before ending the + * iterator. Reads stop when `limit` bytes have been delivered or EOF is + * reached, whichever comes first. + */ + limit?: number | undefined; + /** + * Size in bytes of the buffer allocated for each + * read operation. + * @default 131072 + */ + chunkSize?: number | undefined; + } + interface WriterOptions { + /** + * Close the file handle when the writer ends or fails. + * @default false + */ + autoClose?: boolean | undefined; + /** + * Byte offset to start writing at. When specified, + * writes use explicit positioning. + */ + start?: number | undefined; + /** + * Maximum number of bytes the writer will accept. + * Async writes (`write()`, `writev()`) that would exceed the limit reject + * with `ERR_OUT_OF_RANGE`. Sync writes (`writeSync()`, `writevSync()`) + * return `false`. + */ + limit?: number | undefined; + /** + * Maximum chunk size in bytes for synchronous write + * operations. Writes larger than this threshold fall back to async I/O. + * Set this to match the reader's `chunkSize` for optimal `pipeTo()` + * performance. + * @default 131072 + */ + chunkSize?: number | undefined; + } + // TODO: Add `EventEmitter` close + interface FileHandle { + /** + * The numeric file descriptor managed by the {FileHandle} object. + * @since v10.0.0 + */ + readonly fd: number; + /** + * Alias of `filehandle.writeFile()`. + * + * When operating on file handles, the mode cannot be changed from what it was set + * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + appendFile( + data: + | string + | NodeJS.ArrayBufferView + | Iterable + | AsyncIterable, + options?: + | (ObjectEncodingOptions & Abortable) + | BufferEncoding + | null, + ): Promise; + /** + * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html). + * @since v10.0.0 + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + * @return Fulfills with `undefined` upon success. + */ + chown(uid: number, gid: number): Promise; + /** + * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html). + * @since v10.0.0 + * @param mode the file mode bit mask. + * @return Fulfills with `undefined` upon success. + */ + chmod(mode: Mode): Promise; + /** + * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream + * returned by this method has a default `highWaterMark` of 64 KiB. + * + * `options` can include `start` and `end` values to read a range of bytes from + * the file instead of the entire file. Both `start` and `end` are inclusive and + * start counting at 0, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is + * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from + * the current file position. The `encoding` can be any one of those accepted by `Buffer`. + * + * If the `FileHandle` points to a character device that only supports blocking + * reads (such as keyboard or sound card), read operations do not finish until data + * is available. This can prevent the process from exiting and the stream from + * closing naturally. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * ```js + * import { open } from 'node:fs/promises'; + * + * const fd = await open('/dev/input/event0'); + * // Create a stream from some character device. + * const stream = fd.createReadStream(); + * setTimeout(() => { + * stream.close(); // This may not close the stream. + * // Artificially marking end-of-stream, as if the underlying resource had + * // indicated end-of-file by itself, allows the stream to close. + * // This does not cancel pending read operations, and if there is such an + * // operation, the process may still not be able to exit successfully + * // until it finishes. + * stream.push(null); + * stream.read(0); + * }, 100); + * ``` + * + * If `autoClose` is false, then the file descriptor won't be closed, even if + * there's an error. It is the application's responsibility to close it and make + * sure there's no file descriptor leak. If `autoClose` is set to true (default + * behavior), on `'error'` or `'end'` the file descriptor will be closed + * automatically. + * + * An example to read the last 10 bytes of a file which is 100 bytes long: + * + * ```js + * import { open } from 'node:fs/promises'; + * + * const fd = await open('sample.txt'); + * fd.createReadStream({ start: 90, end: 99 }); + * ``` + * @since v16.11.0 + */ + createReadStream(options?: CreateReadStreamOptions): ReadStream; + /** + * `options` may also include a `start` option to allow writing data at some + * position past the beginning of the file, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than + * replacing it may require the `flags` `open` option to be set to `r+` rather than + * the default `r`. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, + * then the file descriptor won't be closed, even if there's an error. + * It is the application's responsibility to close it and make sure there's no + * file descriptor leak. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * @since v16.11.0 + */ + createWriteStream(options?: CreateWriteStreamOptions): WriteStream; + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. + * + * Unlike `filehandle.sync` this method does not flush modified metadata. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + datasync(): Promise; + /** + * Return the file contents as an async iterable using the + * [`node:stream/iter`](https://nodejs.org/docs/latest-v26.x/api/stream_iter.html) pull model. Reads are performed in `chunkSize`-byte + * chunks (default 128 KB). If transforms are provided, they are applied + * via [`stream/iter pull()`](https://nodejs.org/docs/latest-v26.x/api/stream_iter.html#pullsource-transforms-options). + * + * The file handle is locked while the iterable is being consumed and unlocked + * when iteration completes, an error occurs, or the consumer breaks. + * + * This function is only available when the `--experimental-stream-iter` flag is + * enabled. + * + * ```js + * import { open } from 'node:fs/promises'; + * import { text } from 'node:stream/iter'; + * import { compressGzip } from 'node:zlib/iter'; + * + * const fh = await open('input.txt', 'r'); + * + * // Read as text + * console.log(await text(fh.pull({ autoClose: true }))); + * + * // Read 1 KB starting at byte 100 + * const fh2 = await open('input.txt', 'r'); + * console.log(await text(fh2.pull({ start: 100, limit: 1024, autoClose: true }))); + * + * // Read with compression + * const fh3 = await open('input.txt', 'r'); + * const compressed = fh3.pull(compressGzip(), { autoClose: true }); + * ``` + * @since v25.9.0 + * @experimental + */ + pull(...transforms: Transform[]): ByteReadableStream; + pull(...args: [...transforms: Transform[], options: PullOptions]): ByteReadableStream; + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + sync(): Promise; + /** + * Reads data from the file and stores that in the given buffer. + * + * If the file is not modified concurrently, the end-of-file is reached when the + * number of bytes read is zero. + * @since v10.0.0 + * @param buffer A buffer that will be filled with the file data read. + * @param offset The location in the buffer at which to start filling. + * @param length The number of bytes to read. + * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an + * integer, the current file position will remain unchanged. + * @return Fulfills upon success with an object with two properties: + */ + read( + buffer: T, + offset?: number | null, + length?: number | null, + position?: ReadPosition | null, + ): Promise>; + read( + buffer: T, + options?: ReadOptions, + ): Promise>; + read( + options?: ReadOptionsWithBuffer, + ): Promise>; + /** + * Returns a byte-oriented `ReadableStream` that may be used to read the file's + * contents. + * + * An error will be thrown if this method is called more than once or is called + * after the `FileHandle` is closed or closing. + * + * ```js + * import { + * open, + * } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * + * for await (const chunk of file.readableWebStream()) + * console.log(chunk); + * + * await file.close(); + * ``` + * + * While the `ReadableStream` will read the file to completion, it will not + * close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method. + * @since v17.0.0 + */ + readableWebStream(options?: ReadableWebStreamOptions): ReadableStream; + /** + * Asynchronously reads the entire contents of a file. + * + * If `options` is a string, then it specifies the `encoding`. + * + * If `buffer` is provided and no encoding is specified, the returned {Buffer} is + * a view over the supplied buffer containing only the bytes read. If the + * supplied buffer is too small to contain the entire file, the operation will + * fail. + * + * The `FileHandle` has to support reading. + * + * If one or more `filehandle.read()` calls are made on a file handle and then a + * `filehandle.readFile()` call is made, the data will be read from the current + * position till the end of the file. It doesn't always read from the beginning + * of the file. + * + * An example using the `buffer` option with a pre-allocated buffer: + * + * ```js + * import { Buffer } from 'node:buffer'; + * import { open } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * try { + * const buf = Buffer.alloc(16384); + * const contents = await file.readFile({ buffer: buf }); + * console.log(contents); // A view over `buf` containing only the bytes read + * } finally { + * await file.close(); + * } + * ``` + * + * An example using the `buffer` option with a function returning a buffer: + * + * ```js + * import { Buffer } from 'node:buffer'; + * import { open } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * try { + * const contents = await file.readFile({ + * buffer: (size) => Buffer.alloc(size), + * }); + * console.log(contents); + * } finally { + * await file.close(); + * } + * ``` + * @since v10.0.0 + * @returns Fulfills upon a successful read with the contents of the + * file. If no encoding is specified (using `options.encoding`), the data is + * returned as a `Buffer` object. Otherwise, the data will be a string. + */ + readFile( + options: Omit, "flag">, + ): Promise>; + readFile(options?: Omit | null): Promise; + readFile(options: Omit | BufferEncoding): Promise; + readFile(options: Omit | BufferEncoding | null): Promise; + /** + * Convenience method to create a `readline` interface and stream over the file. + * See `filehandle.createReadStream()` for the options. + * + * ```js + * import { open } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * + * for await (const line of file.readLines()) { + * console.log(line); + * } + * ``` + * @since v18.11.0 + */ + readLines(options?: CreateReadStreamOptions): ReadlineInterface; + /** + * @since v10.0.0 + * @return Fulfills with an {fs.Stats} for the file. + */ + stat( + opts?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + stat( + opts: StatOptions & { + bigint: true; + }, + ): Promise; + stat(opts?: StatOptions): Promise; + /** + * Truncates the file. + * + * If the file was larger than `len` bytes, only the first `len` bytes will be + * retained in the file. + * + * The following example retains only the first four bytes of the file: + * + * ```js + * import { open } from 'node:fs/promises'; + * + * let filehandle = null; + * try { + * filehandle = await open('temp.txt', 'r+'); + * await filehandle.truncate(4); + * } finally { + * await filehandle?.close(); + * } + * ``` + * + * If the file previously was shorter than `len` bytes, it is extended, and the + * extended part is filled with null bytes (`'\0'`): + * + * If `len` is negative then `0` will be used. + * @since v10.0.0 + * @param [len=0] + * @return Fulfills with `undefined` upon success. + */ + truncate(len?: number): Promise; + /** + * Change the file system timestamps of the object referenced by the `FileHandle` then fulfills the promise with no arguments upon success. + * @since v10.0.0 + */ + utimes(atime: TimeLike, mtime: TimeLike): Promise; + /** + * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an + * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an + * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. + * The promise is fulfilled with no arguments upon success. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `FileHandle` has to support writing. + * + * It is unsafe to use `filehandle.writeFile()` multiple times on the same file + * without waiting for the promise to be fulfilled (or rejected). + * + * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the + * current position till the end of the file. It doesn't always write from the + * beginning of the file. + * @since v10.0.0 + */ + writeFile( + data: + | string + | NodeJS.ArrayBufferView + | Iterable + | AsyncIterable, + options?: + | (ObjectEncodingOptions & Abortable) + | BufferEncoding + | null, + ): Promise; + /** + * Write `buffer` to the file. + * + * The promise is fulfilled with an object containing two properties: + * + * It is unsafe to use `filehandle.write()` multiple times on the same file + * without waiting for the promise to be fulfilled (or rejected). For this + * scenario, use `filehandle.createWriteStream()`. + * + * On Linux, positional writes do not work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v10.0.0 + * @param offset The start position from within `buffer` where the data to write begins. + * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write. + * @param [position='null'] The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current + * position. See the POSIX pwrite(2) documentation for more detail. + */ + write( + buffer: TBuffer, + offset?: number | null, + length?: number | null, + position?: number | null, + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + write( + buffer: TBuffer, + options?: { offset?: number; length?: number; position?: number }, + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + write( + data: string, + position?: number | null, + encoding?: BufferEncoding | null, + ): Promise<{ + bytesWritten: number; + buffer: string; + }>; + /** + * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file. + * + * The promise is fulfilled with an object containing a two properties: + * + * It is unsafe to call `writev()` multiple times on the same file without waiting + * for the promise to be fulfilled (or rejected). + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v12.9.0 + * @param [position='null'] The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current + * position. + */ + writev( + buffers: TBuffers, + position?: number, + ): Promise>; + /** + * Return a [`node:stream/iter`](https://nodejs.org/docs/latest-v26.x/api/stream_iter.html) writer backed by this file handle. + * + * The writer supports both `Symbol.asyncDispose` and `Symbol.dispose`: + * + * * `await using w = fh.writer()` — if the writer is still open (no `end()` + * called), `asyncDispose` calls `fail()`. If `end()` is pending, it waits + * for it to complete. + * * `using w = fh.writer()` — calls `fail()` unconditionally. + * + * The `writeSync()` and `writevSync()` methods enable the try-sync fast path + * used by [`stream/iter pipeTo()`](https://nodejs.org/docs/latest-v26.x/api/stream_iter.html#pipetosource-transforms-writer). When the reader's chunk size matches the + * writer's `chunkSize`, all writes in a `pipeTo()` pipeline complete + * synchronously with zero promise overhead. + * + * This function is only available when the `--experimental-stream-iter` flag is + * enabled. + * + * ```js + * import { open } from 'node:fs/promises'; + * import { from, pipeTo } from 'node:stream/iter'; + * import { compressGzip } from 'node:zlib/iter'; + * + * // Async pipeline + * const fh = await open('output.gz', 'w'); + * await pipeTo(from('Hello!'), compressGzip(), fh.writer({ autoClose: true })); + * + * // Sync pipeline with limit + * const src = await open('input.txt', 'r'); + * const dst = await open('output.txt', 'w'); + * const w = dst.writer({ limit: 1024 * 1024 }); // Max 1 MB + * await pipeTo(src.pull({ autoClose: true }), w); + * await w.end(); + * await dst.close(); + * ``` + * @since v25.9.0 + * @experimental + */ + writer(options?: WriterOptions): Writer; + /** + * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s + * @since v13.13.0, v12.17.0 + * @param [position='null'] The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position. + * @return Fulfills upon success an object containing two properties: + */ + readv( + buffers: TBuffers, + position?: number, + ): Promise>; + /** + * Closes the file handle after waiting for any pending operation on the handle to + * complete. + * + * ```js + * import { open } from 'node:fs/promises'; + * + * let filehandle; + * try { + * filehandle = await open('thefile.txt', 'r'); + * } finally { + * await filehandle?.close(); + * } + * ``` + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + close(): Promise; + /** + * Calls `filehandle.close()` and returns a promise that fulfills when the + * filehandle is closed. + * @since v20.4.0, v18.8.0 + */ + [Symbol.asyncDispose](): Promise; + } + const constants: typeof fsConstants; + /** + * Tests a user's permissions for the file or directory specified by `path`. + * The `mode` argument is an optional integer that specifies the accessibility + * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK` + * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * If the accessibility check is successful, the promise is fulfilled with no + * value. If any of the accessibility checks fail, the promise is rejected + * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and + * written by the current process. + * + * ```js + * import { access, constants } from 'node:fs/promises'; + * + * try { + * await access('/etc/passwd', constants.R_OK | constants.W_OK); + * console.log('can access'); + * } catch { + * console.error('cannot access'); + * } + * ``` + * + * Using `fsPromises.access()` to check for the accessibility of a file before + * calling `fsPromises.open()` is not recommended. Doing so introduces a race + * condition, since other processes may change the file's state between the two + * calls. Instead, user code should open/read/write the file directly and handle + * the error raised if the file is not accessible. + * @since v10.0.0 + * @param [mode=fs.constants.F_OK] + * @return Fulfills with `undefined` upon success. + */ + function access(path: PathLike, mode?: number): Promise; + /** + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. + * + * No guarantees are made about the atomicity of the copy operation. If an + * error occurs after the destination file has been opened for writing, an attempt + * will be made to remove the destination. + * + * ```js + * import { copyFile, constants } from 'node:fs/promises'; + * + * try { + * await copyFile('source.txt', 'destination.txt'); + * console.log('source.txt was copied to destination.txt'); + * } catch { + * console.error('The file could not be copied'); + * } + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * try { + * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL); + * console.log('source.txt was copied to destination.txt'); + * } catch { + * console.error('The file could not be copied'); + * } + * ``` + * @since v10.0.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g. + * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`) + * @return Fulfills with `undefined` upon success. + */ + function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise; + /** + * Opens a `FileHandle`. + * + * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail. + * + * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented + * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains + * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). + * @since v10.0.0 + * @param [flags='r'] See `support of file system `flags``. + * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created. + * @return Fulfills with a {FileHandle} object. + */ + function open(path: PathLike, flags?: string | number, mode?: Mode): Promise; + /** + * Renames `oldPath` to `newPath`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function rename(oldPath: PathLike, newPath: PathLike): Promise; + /** + * Truncates (shortens or extends the length) of the content at `path` to `len` bytes. + * @since v10.0.0 + * @param [len=0] + * @return Fulfills with `undefined` upon success. + */ + function truncate(path: PathLike, len?: number): Promise; + /** + * Removes the directory identified by `path`. + * + * Using `fsPromises.rmdir()` on a file (not a directory) results in the + * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function rmdir(path: PathLike): Promise; + /** + * Removes files and directories (modeled on the standard POSIX `rm` utility). + * @since v14.14.0 + * @return Fulfills with `undefined` upon success. + */ + function rm(path: PathLike, options?: RmOptions): Promise; + /** + * Asynchronously creates a directory. + * + * The optional `options` argument can be an integer specifying `mode` (permission + * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fsPromises.mkdir()` when `path` is a directory + * that exists results in a + * rejection only when `recursive` is false. + * + * ```js + * import { mkdir } from 'node:fs/promises'; + * + * try { + * const projectFolder = new URL('./test/project/', import.meta.url); + * const createDir = await mkdir(projectFolder, { recursive: true }); + * + * console.log(`created ${createDir}`); + * } catch (err) { + * console.error(err.message); + * } + * ``` + * @since v10.0.0 + * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`. + */ + function mkdir( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null, + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise; + /** + * Reads the contents of a directory. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned + * will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the returned array will contain `fs.Dirent` objects. + * + * ```js + * import { readdir } from 'node:fs/promises'; + * + * try { + * const files = await readdir(path); + * for (const file of files) + * console.log(file); + * } catch (err) { + * console.error(err); + * } + * ``` + * @since v10.0.0 + * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`. + */ + function readdir( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: + | { + encoding: "buffer"; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | "buffer", + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdir( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a directory. If a URL is provided, it must use the `file:` protocol. + * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. + */ + function readdir( + path: PathLike, + options: { + encoding: "buffer"; + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Promise[]>; + /** + * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is + * fulfilled with the`linkString` upon success. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path returned. If the `encoding` is set to `'buffer'`, the link path + * returned will be passed as a `Buffer` object. + * @since v10.0.0 + * @return Fulfills with the `linkString` upon success. + */ + function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink( + path: PathLike, + options?: ObjectEncodingOptions | string | null, + ): Promise; + /** + * Creates a symbolic link. + * + * The `type` argument is only used on Windows platforms and can be one of `'dir'`, `'file'`, or `'junction'`. If the `type` argument is not a string, Node.js will + * autodetect `target` type and use `'file'` or `'dir'`. If the `target` does not + * exist, `'file'` will be used. Windows junction points require the destination + * path to be absolute. When using `'junction'`, the `target` argument will + * automatically be normalized to absolute path. Junction points on NTFS volumes + * can only point to directories. + * @since v10.0.0 + * @param [type='null'] + * @return Fulfills with `undefined` upon success. + */ + function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; + /** + * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link, + * in which case the link itself is stat-ed, not the file that it refers to. + * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail. + * @since v10.0.0 + * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`. + */ + function lstat( + path: PathLike, + opts?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + function lstat( + path: PathLike, + opts: StatOptions & { + bigint: true; + }, + ): Promise; + function lstat(path: PathLike, opts?: StatOptions): Promise; + /** + * @since v10.0.0 + * @return Fulfills with the {fs.Stats} object for the given `path`. + */ + function stat(path: PathLike): Promise; + function stat( + path: PathLike, + opts?: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function stat(path: PathLike, opts?: StatOptions): Promise; + /** + * @since v19.6.0, v18.15.0 + * @return Fulfills with the {fs.StatFs} object for the given `path`. + */ + function statfs( + path: PathLike, + opts?: StatFsOptions & { + bigint?: false | undefined; + }, + ): Promise; + function statfs( + path: PathLike, + opts: StatFsOptions & { + bigint: true; + }, + ): Promise; + function statfs(path: PathLike, opts?: StatFsOptions): Promise; + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function link(existingPath: PathLike, newPath: PathLike): Promise; + /** + * If `path` refers to a symbolic link, then the link is removed without affecting + * the file or directory to which that link refers. If the `path` refers to a file + * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function unlink(path: PathLike): Promise; + /** + * Changes the permissions of a file. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function chmod(path: PathLike, mode: Mode): Promise; + /** + * Changes the permissions on a symbolic link. + * + * This method is only implemented on macOS. + * @deprecated Since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function lchmod(path: PathLike, mode: Mode): Promise; + /** + * Changes the ownership on a symbolic link. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function lchown(path: PathLike, uid: number, gid: number): Promise; + /** + * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a + * symbolic link, then the link is not dereferenced: instead, the timestamps of + * the symbolic link itself are changed. + * @since v14.5.0, v12.19.0 + * @return Fulfills with `undefined` upon success. + */ + function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + /** + * Changes the ownership of a file. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function chown(path: PathLike, uid: number, gid: number): Promise; + /** + * Change the file system timestamps of the object referenced by `path`. + * + * The `atime` and `mtime` arguments follow these rules: + * + * * Values can be either numbers representing Unix epoch time, `Date`s, or a + * numeric string like `'123456789.0'`. + * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + /** + * Determines the actual location of `path` using the same semantics as the `fs.realpath.native()` function. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path. If the `encoding` is set to `'buffer'`, the path returned will be + * passed as a `Buffer` object. + * + * On Linux, when Node.js is linked against musl libc, the procfs file system must + * be mounted on `/proc` in order for this function to work. Glibc does not have + * this restriction. + * @since v10.0.0 + * @return Fulfills with the resolved path upon success. + */ + function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath( + path: PathLike, + options?: ObjectEncodingOptions | BufferEncoding | null, + ): Promise; + /** + * Creates a unique temporary directory. A unique directory name is generated by + * appending six random characters to the end of the provided `prefix`. Due to + * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some + * platforms, notably the BSDs, can return more than six random characters, and + * replace trailing `X` characters in `prefix` with random characters. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * + * ```js + * import { mkdtemp } from 'node:fs/promises'; + * import { join } from 'node:path'; + * import { tmpdir } from 'node:os'; + * + * try { + * await mkdtemp(join(tmpdir(), 'foo-')); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * The `fsPromises.mkdtemp()` method will append the six randomly selected + * characters directly to the `prefix` string. For instance, given a directory `/tmp`, if the intention is to create a temporary directory _within_ `/tmp`, the `prefix` must end with a trailing + * platform-specific path separator + * (`import { sep } from 'node:path'`). + * @since v10.0.0 + * @return Fulfills with a string containing the file system path of the newly created temporary directory. + */ + function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: BufferEncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp( + prefix: string, + options?: ObjectEncodingOptions | BufferEncoding | null, + ): Promise; + interface DisposableTempDir extends AsyncDisposable { + /** + * The path of the created directory. + */ + path: string; + /** + * A function which removes the created directory. + */ + remove(): Promise; + /** + * The same as `remove`. + */ + [Symbol.asyncDispose](): Promise; + } + /** + * The resulting Promise holds an async-disposable object whose `path` property + * holds the created directory path. When the object is disposed, the directory + * and its contents will be removed asynchronously if it still exists. If the + * directory cannot be deleted, disposal will throw an error. The object has an + * async `remove()` method which will perform the same task. + * + * Both this function and the disposal function on the resulting object are + * async, so it should be used with `await` + `await using` as in + * `await using dir = await fsPromises.mkdtempDisposable('prefix')`. + * + * + * + * For detailed information, see the documentation of `fsPromises.mkdtemp()`. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * @since v24.4.0 + */ + function mkdtempDisposable(prefix: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an + * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an + * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. + * + * The `encoding` option is ignored if `data` is a buffer. + * + * If `options` is a string, then it specifies the encoding. + * + * The `mode` option only affects the newly created file. See `fs.open()` for more details. + * + * Any specified `FileHandle` has to support writing. + * + * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file + * without waiting for the promise to be settled. + * + * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience + * method that performs multiple `write` calls internally to write the buffer + * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`. + * + * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`. + * Cancelation is "best effort", and some amount of data is likely still + * to be written. + * + * ```js + * import { writeFile } from 'node:fs/promises'; + * import { Buffer } from 'node:buffer'; + * + * try { + * const controller = new AbortController(); + * const { signal } = controller; + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * const promise = writeFile('message.txt', data, { signal }); + * + * // Abort the request before the promise settles. + * controller.abort(); + * + * await promise; + * } catch (err) { + * // When a request is aborted - err is an AbortError + * console.error(err); + * } + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.writeFile` performs. + * @since v10.0.0 + * @param file filename or `FileHandle` + * @return Fulfills with `undefined` upon success. + */ + function writeFile( + file: PathLike | FileHandle, + data: + | string + | NodeJS.ArrayBufferView + | Iterable + | AsyncIterable, + options?: + | (ObjectEncodingOptions & { + mode?: Mode | undefined; + flag?: OpenMode | undefined; + /** + * If all data is successfully written to the file, and `flush` + * is `true`, `filehandle.sync()` is used to flush the data. + * @default false + */ + flush?: boolean | undefined; + } & Abortable) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `mode` option only affects the newly created file. See `fs.open()` for more details. + * + * The `path` may be specified as a `FileHandle` that has been opened + * for appending (using `fsPromises.open()`). + * @since v10.0.0 + * @param path filename or {FileHandle} + * @return Fulfills with `undefined` upon success. + */ + function appendFile( + path: PathLike | FileHandle, + data: + | string + | NodeJS.ArrayBufferView + | Iterable + | AsyncIterable, + options?: (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined }) | BufferEncoding | null, + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * + * If no encoding is specified (using `options.encoding`), the data is returned + * as a `Buffer` object. Otherwise, the data will be a string. + * + * If `options` is a string, then it specifies the encoding. + * + * When the `path` is a directory, the behavior of `fsPromises.readFile()` is + * platform-specific. On macOS, Linux, and Windows, the promise will be rejected + * with an error. On FreeBSD, a representation of the directory's contents will be + * returned. + * + * An example of reading a `package.json` file located in the same directory of the + * running code: + * + * ```js + * import { readFile } from 'node:fs/promises'; + * try { + * const filePath = new URL('./package.json', import.meta.url); + * const contents = await readFile(filePath, { encoding: 'utf8' }); + * console.log(contents); + * } catch (err) { + * console.error(err.message); + * } + * ``` + * + * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a + * request is aborted the promise returned is rejected with an `AbortError`: + * + * ```js + * import { readFile } from 'node:fs/promises'; + * + * try { + * const controller = new AbortController(); + * const { signal } = controller; + * const promise = readFile(fileName, { signal }); + * + * // Abort the request before the promise settles. + * controller.abort(); + * + * await promise; + * } catch (err) { + * // When a request is aborted - err is an AbortError + * console.error(err); + * } + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.readFile` performs. + * + * Any specified `FileHandle` has to support reading. + * @since v10.0.0 + * @param path filename or `FileHandle` + * @return Fulfills with the contents of the file. + */ + function readFile( + path: PathLike | FileHandle, + options: ReadFileOptionsWithBuffer, + ): Promise>; + function readFile( + path: PathLike | FileHandle, + options?: ReadFileOptionsWithBufferEncoding | null, + ): Promise; + function readFile( + path: PathLike | FileHandle, + options: ReadFileOptionsWithStringEncoding | BufferEncoding, + ): Promise; + function readFile( + path: PathLike | FileHandle, + options: ReadFileOptions | BufferEncoding | null, + ): Promise; + /** + * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail. + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * + * Example using async iteration: + * + * ```js + * import { opendir } from 'node:fs/promises'; + * + * try { + * const dir = await opendir('./'); + * for await (const dirent of dir) + * console.log(dirent.name); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * When using the async iterator, the `fs.Dir` object will be automatically + * closed after the iterator exits. + * @since v12.12.0 + * @return Fulfills with an {fs.Dir}. + */ + function opendir(path: PathLike, options?: OpenDirOptions): Promise; + interface WatchOptions extends _WatchOptions { + maxQueue?: number | undefined; + overflow?: "ignore" | "throw" | undefined; + } + interface WatchOptionsWithBufferEncoding extends WatchOptions { + encoding: "buffer"; + } + interface WatchOptionsWithStringEncoding extends WatchOptions { + encoding?: BufferEncoding | undefined; + } + /** + * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory. + * + * ```js + * import { watch } from 'node:fs/promises'; + * + * const ac = new AbortController(); + * const { signal } = ac; + * setTimeout(() => ac.abort(), 10000); + * + * (async () => { + * try { + * const watcher = watch(__filename, { signal }); + * for await (const event of watcher) + * console.log(event); + * } catch (err) { + * if (err.name === 'AbortError') + * return; + * throw err; + * } + * })(); + * ``` + * + * On most platforms, `'rename'` is emitted whenever a filename appears or + * disappears in the directory. + * + * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`. + * @since v15.9.0, v14.18.0 + * @return of objects with the properties: + */ + function watch( + filename: PathLike, + options?: WatchOptionsWithStringEncoding | BufferEncoding, + ): NodeJS.AsyncIterator>; + function watch( + filename: PathLike, + options: WatchOptionsWithBufferEncoding | "buffer", + ): NodeJS.AsyncIterator>; + function watch( + filename: PathLike, + options: WatchOptions | BufferEncoding | "buffer", + ): NodeJS.AsyncIterator>; + /** + * Asynchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @param src source path to copy. + * @param dest destination path to copy to. + * @return Fulfills with `undefined` upon success. + */ + function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise; + /** + * When `followSymlinks` is enabled, detected symbolic link cycles are not + * traversed recursively. + * + * ```js + * import { glob } from 'node:fs/promises'; + * + * for await (const entry of glob('*.js')) + * console.log(entry); + * ``` + * @since v22.0.0 + * @returns An AsyncIterator that yields the paths of files + * that match the pattern. + */ + function glob(pattern: string | readonly string[]): NodeJS.AsyncIterator; + function glob( + pattern: string | readonly string[], + options: GlobOptionsWithFileTypes, + ): NodeJS.AsyncIterator; + function glob( + pattern: string | readonly string[], + options: GlobOptionsWithoutFileTypes, + ): NodeJS.AsyncIterator; + function glob( + pattern: string | readonly string[], + options: GlobOptions, + ): NodeJS.AsyncIterator; +} +declare module "fs/promises" { + export * from "node:fs/promises"; +} diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts new file mode 100644 index 0000000..0c2f0b0 --- /dev/null +++ b/node_modules/@types/node/globals.d.ts @@ -0,0 +1,150 @@ +declare var global: typeof globalThis; + +declare var process: NodeJS.Process; + +interface ErrorConstructor { + /** + * Creates a `.stack` property on `targetObject`, which when accessed returns + * a string representing the location in the code at which + * `Error.captureStackTrace()` was called. + * + * ```js + * const myObject = {}; + * Error.captureStackTrace(myObject); + * myObject.stack; // Similar to `new Error().stack` + * ``` + * + * The first line of the trace will be prefixed with + * `${myObject.name}: ${myObject.message}`. + * + * The optional `constructorOpt` argument accepts a function. If given, all frames + * above `constructorOpt`, including `constructorOpt`, will be omitted from the + * generated stack trace. + * + * The `constructorOpt` argument is useful for hiding implementation + * details of error generation from the user. For instance: + * + * ```js + * function a() { + * b(); + * } + * + * function b() { + * c(); + * } + * + * function c() { + * // Create an error without stack trace to avoid calculating the stack trace twice. + * const { stackTraceLimit } = Error; + * Error.stackTraceLimit = 0; + * const error = new Error(); + * Error.stackTraceLimit = stackTraceLimit; + * + * // Capture the stack trace above function b + * Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace + * throw error; + * } + * + * a(); + * ``` + */ + captureStackTrace(targetObject: object, constructorOpt?: Function): void; + /** + * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces + */ + prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any; + /** + * The `Error.stackTraceLimit` property specifies the number of stack frames + * collected by a stack trace (whether generated by `new Error().stack` or + * `Error.captureStackTrace(obj)`). + * + * The default value is `10` but may be set to any valid JavaScript number. Changes + * will affect any stack trace captured _after_ the value has been changed. + * + * If set to a non-number value, or set to a negative number, stack traces will + * not capture any frames. + */ + stackTraceLimit: number; +} + +/** + * Enable this API with the `--expose-gc` CLI flag. + */ +declare var gc: NodeJS.GCFunction | undefined; + +declare namespace NodeJS { + interface CallSite { + getColumnNumber(): number | null; + getEnclosingColumnNumber(): number | null; + getEnclosingLineNumber(): number | null; + getEvalOrigin(): string | undefined; + getFileName(): string | null; + getFunction(): Function | undefined; + getFunctionName(): string | null; + getLineNumber(): number | null; + getMethodName(): string | null; + getPosition(): number; + getPromiseIndex(): number | null; + getScriptHash(): string; + getScriptNameOrSourceURL(): string | null; + getThis(): unknown; + getTypeName(): string | null; + isAsync(): boolean; + isConstructor(): boolean; + isEval(): boolean; + isNative(): boolean; + isPromiseAll(): boolean; + isToplevel(): boolean; + } + + interface ErrnoException extends Error { + errno?: number; + code?: string; + path?: string; + syscall?: string; + } + + interface RefCounted { + ref(): this; + unref(): this; + } + + interface Dict { + [key: string]: T | undefined; + } + + interface ReadOnlyDict { + readonly [key: string]: T | undefined; + } + + type PartialOptions = { [K in keyof T]?: T[K] | undefined }; + + interface GCFunction { + (minor?: boolean): void; + (options: NodeJS.GCOptions & { execution: "async" }): Promise; + (options: NodeJS.GCOptions): void; + } + + interface GCOptions { + execution?: "sync" | "async" | undefined; + flavor?: "regular" | "last-resort" | undefined; + type?: "major-snapshot" | "major" | "minor" | undefined; + filename?: string | undefined; + } + + /** An iterable iterator returned by the Node.js API. */ + interface Iterator extends IteratorObject { + [Symbol.iterator](): NodeJS.Iterator; + } + + /** An async iterable iterator returned by the Node.js API. */ + interface AsyncIterator extends AsyncIteratorObject { + [Symbol.asyncIterator](): NodeJS.AsyncIterator; + } + + /** The [`BufferSource`](https://webidl.spec.whatwg.org/#BufferSource) type from the Web IDL specification. */ + type BufferSource = NonSharedArrayBufferView | ArrayBuffer; + + /** The [`AllowSharedBufferSource`](https://webidl.spec.whatwg.org/#AllowSharedBufferSource) type from the Web IDL specification. */ + type AllowSharedBufferSource = ArrayBufferView | ArrayBufferLike; +} diff --git a/node_modules/@types/node/globals.typedarray.d.ts b/node_modules/@types/node/globals.typedarray.d.ts new file mode 100644 index 0000000..e69dd0c --- /dev/null +++ b/node_modules/@types/node/globals.typedarray.d.ts @@ -0,0 +1,101 @@ +export {}; // Make this a module + +declare global { + namespace NodeJS { + type TypedArray = + | Uint8Array + | Uint8ClampedArray + | Uint16Array + | Uint32Array + | Int8Array + | Int16Array + | Int32Array + | BigUint64Array + | BigInt64Array + | Float16Array + | Float32Array + | Float64Array; + type ArrayBufferView = + | TypedArray + | DataView; + + // The following aliases are required to allow use of non-shared ArrayBufferViews in @types/node + // while maintaining compatibility with TS <=5.6. + // TODO: remove once @types/node no longer supports TS 5.6, and replace with native types. + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedUint8Array = Uint8Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedUint8ClampedArray = Uint8ClampedArray; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedUint16Array = Uint16Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedUint32Array = Uint32Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedInt8Array = Int8Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedInt16Array = Int16Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedInt32Array = Int32Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedBigUint64Array = BigUint64Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedBigInt64Array = BigInt64Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedFloat16Array = Float16Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedFloat32Array = Float32Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedFloat64Array = Float64Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedDataView = DataView; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedTypedArray = TypedArray; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedArrayBufferView = ArrayBufferView; + } +} diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts new file mode 100644 index 0000000..73a7024 --- /dev/null +++ b/node_modules/@types/node/http.d.ts @@ -0,0 +1,2218 @@ +declare module "node:http" { + import { NonSharedBuffer } from "node:buffer"; + import { LookupOptions } from "node:dns"; + import { EventEmitter } from "node:events"; + import * as net from "node:net"; + import * as stream from "node:stream"; + import { URL } from "node:url"; + // incoming headers will never contain number + interface IncomingHttpHeaders extends NodeJS.Dict { + accept?: string | undefined; + "accept-encoding"?: string | undefined; + "accept-language"?: string | undefined; + "accept-patch"?: string | undefined; + "accept-ranges"?: string | undefined; + "access-control-allow-credentials"?: string | undefined; + "access-control-allow-headers"?: string | undefined; + "access-control-allow-methods"?: string | undefined; + "access-control-allow-origin"?: string | undefined; + "access-control-expose-headers"?: string | undefined; + "access-control-max-age"?: string | undefined; + "access-control-request-headers"?: string | undefined; + "access-control-request-method"?: string | undefined; + age?: string | undefined; + allow?: string | undefined; + "alt-svc"?: string | undefined; + authorization?: string | undefined; + "cache-control"?: string | undefined; + connection?: string | undefined; + "content-disposition"?: string | undefined; + "content-encoding"?: string | undefined; + "content-language"?: string | undefined; + "content-length"?: string | undefined; + "content-location"?: string | undefined; + "content-range"?: string | undefined; + "content-type"?: string | undefined; + cookie?: string | undefined; + date?: string | undefined; + etag?: string | undefined; + expect?: string | undefined; + expires?: string | undefined; + forwarded?: string | undefined; + from?: string | undefined; + host?: string | undefined; + "if-match"?: string | undefined; + "if-modified-since"?: string | undefined; + "if-none-match"?: string | undefined; + "if-unmodified-since"?: string | undefined; + "last-modified"?: string | undefined; + location?: string | undefined; + origin?: string | undefined; + pragma?: string | undefined; + "proxy-authenticate"?: string | undefined; + "proxy-authorization"?: string | undefined; + "public-key-pins"?: string | undefined; + range?: string | undefined; + referer?: string | undefined; + "retry-after"?: string | undefined; + "sec-fetch-site"?: string | undefined; + "sec-fetch-mode"?: string | undefined; + "sec-fetch-user"?: string | undefined; + "sec-fetch-dest"?: string | undefined; + "sec-websocket-accept"?: string | undefined; + "sec-websocket-extensions"?: string | undefined; + "sec-websocket-key"?: string | undefined; + "sec-websocket-protocol"?: string | undefined; + "sec-websocket-version"?: string | undefined; + "set-cookie"?: string[] | undefined; + "strict-transport-security"?: string | undefined; + tk?: string | undefined; + trailer?: string | undefined; + "transfer-encoding"?: string | undefined; + upgrade?: string | undefined; + "user-agent"?: string | undefined; + vary?: string | undefined; + via?: string | undefined; + warning?: string | undefined; + "www-authenticate"?: string | undefined; + } + // outgoing headers allows numbers (as they are converted internally to strings) + type OutgoingHttpHeader = number | string | string[]; + interface OutgoingHttpHeaders extends NodeJS.Dict { + accept?: string | string[] | undefined; + "accept-charset"?: string | string[] | undefined; + "accept-encoding"?: string | string[] | undefined; + "accept-language"?: string | string[] | undefined; + "accept-ranges"?: string | undefined; + "access-control-allow-credentials"?: string | undefined; + "access-control-allow-headers"?: string | undefined; + "access-control-allow-methods"?: string | undefined; + "access-control-allow-origin"?: string | undefined; + "access-control-expose-headers"?: string | undefined; + "access-control-max-age"?: string | undefined; + "access-control-request-headers"?: string | undefined; + "access-control-request-method"?: string | undefined; + age?: string | undefined; + allow?: string | undefined; + authorization?: string | undefined; + "cache-control"?: string | undefined; + "cdn-cache-control"?: string | undefined; + connection?: string | string[] | undefined; + "content-disposition"?: string | undefined; + "content-encoding"?: string | undefined; + "content-language"?: string | undefined; + "content-length"?: string | number | undefined; + "content-location"?: string | undefined; + "content-range"?: string | undefined; + "content-security-policy"?: string | undefined; + "content-security-policy-report-only"?: string | undefined; + "content-type"?: string | undefined; + cookie?: string | string[] | undefined; + dav?: string | string[] | undefined; + dnt?: string | undefined; + date?: string | undefined; + etag?: string | undefined; + expect?: string | undefined; + expires?: string | undefined; + forwarded?: string | undefined; + from?: string | undefined; + host?: string | undefined; + "if-match"?: string | undefined; + "if-modified-since"?: string | undefined; + "if-none-match"?: string | undefined; + "if-range"?: string | undefined; + "if-unmodified-since"?: string | undefined; + "last-modified"?: string | undefined; + link?: string | string[] | undefined; + location?: string | undefined; + "max-forwards"?: string | undefined; + origin?: string | undefined; + pragma?: string | string[] | undefined; + "proxy-authenticate"?: string | string[] | undefined; + "proxy-authorization"?: string | undefined; + "public-key-pins"?: string | undefined; + "public-key-pins-report-only"?: string | undefined; + range?: string | undefined; + referer?: string | undefined; + "referrer-policy"?: string | undefined; + refresh?: string | undefined; + "retry-after"?: string | undefined; + "sec-websocket-accept"?: string | undefined; + "sec-websocket-extensions"?: string | string[] | undefined; + "sec-websocket-key"?: string | undefined; + "sec-websocket-protocol"?: string | string[] | undefined; + "sec-websocket-version"?: string | undefined; + server?: string | undefined; + "set-cookie"?: string | string[] | undefined; + "strict-transport-security"?: string | undefined; + te?: string | undefined; + trailer?: string | undefined; + "transfer-encoding"?: string | undefined; + "user-agent"?: string | undefined; + upgrade?: string | undefined; + "upgrade-insecure-requests"?: string | undefined; + vary?: string | undefined; + via?: string | string[] | undefined; + warning?: string | undefined; + "www-authenticate"?: string | string[] | undefined; + "x-content-type-options"?: string | undefined; + "x-dns-prefetch-control"?: string | undefined; + "x-frame-options"?: string | undefined; + "x-xss-protection"?: string | undefined; + } + interface ClientRequestArgs extends Pick { + _defaultAgent?: Agent | undefined; + agent?: Agent | boolean | undefined; + auth?: string | null | undefined; + createConnection?: + | (( + options: ClientRequestArgs, + oncreate: (err: Error | null, socket: stream.Duplex) => void, + ) => stream.Duplex | null | undefined) + | undefined; + defaultPort?: number | string | undefined; + family?: number | undefined; + headers?: OutgoingHttpHeaders | readonly string[] | undefined; + host?: string | null | undefined; + hostname?: string | null | undefined; + httpValidation?: "strict" | "relaxed" | "insecure" | undefined; + insecureHTTPParser?: boolean | undefined; + localAddress?: string | undefined; + localPort?: number | undefined; + lookup?: net.LookupFunction | undefined; + /** + * @default 16384 + */ + maxHeaderSize?: number | undefined; + method?: string | undefined; + path?: string | null | undefined; + port?: number | string | null | undefined; + protocol?: string | null | undefined; + setDefaultHeaders?: boolean | undefined; + setHost?: boolean | undefined; + signal?: AbortSignal | undefined; + socketPath?: string | undefined; + timeout?: number | undefined; + uniqueHeaders?: Array | undefined; + joinDuplicateHeaders?: boolean | undefined; + } + interface ServerOptions< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + > { + /** + * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`. + */ + IncomingMessage?: Request | undefined; + /** + * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`. + */ + ServerResponse?: Response | undefined; + /** + * Sets the timeout value in milliseconds for receiving the entire request from the client. + * @see Server.requestTimeout for more information. + * @default 300000 + * @since v18.0.0 + */ + requestTimeout?: number | undefined; + /** + * It joins the field line values of multiple headers in a request with `, ` instead of discarding the duplicates. + * @default false + * @since v18.14.0 + */ + joinDuplicateHeaders?: boolean | undefined; + /** + * The number of milliseconds of inactivity a server needs to wait for additional incoming data, + * after it has finished writing the last response, before a socket will be destroyed. + * @see Server.keepAliveTimeout for more information. + * @default 65000 + * @since v18.0.0 + */ + keepAliveTimeout?: number | undefined; + /** + * An additional buffer time added to the + * `server.keepAliveTimeout` to extend the internal socket timeout. + * @since 24.6.0 + * @default 1000 + */ + keepAliveTimeoutBuffer?: number | undefined; + /** + * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests. + * @default 30000 + */ + connectionsCheckingInterval?: number | undefined; + /** + * Sets the timeout value in milliseconds for receiving the complete HTTP headers from the client. + * See {@link Server.headersTimeout} for more information. + * @default 60000 + * @since 18.0.0 + */ + headersTimeout?: number | undefined; + /** + * Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`. + * This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`. + * Default: @see stream.getDefaultHighWaterMark(). + * @since v20.1.0 + */ + highWaterMark?: number | undefined; + /** + * Controls HTTP header value validation strictness + * for incoming requests. Accepted values are: + * * `'strict'`: Strictest validation; rejects any non-ASCII or control + * characters in header values. + * * `'relaxed'`: Allows a limited set of non-ASCII characters in header + * values, aligning with the + * [Fetch specification](https://fetch.spec.whatwg.org/). + * * `'insecure'`: Disables all header value validation (equivalent to + * `insecureHTTPParser: true`). + * + * Cannot be used together with `insecureHTTPParser`. **Default:** `'strict'`. + * @since v26.3.0 + */ + httpValidation?: "strict" | "relaxed" | "insecure" | undefined; + /** + * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`. + * Using the insecure parser should be avoided. + * See --insecure-http-parser for more information. + * @default false + */ + insecureHTTPParser?: boolean | undefined; + /** + * Optionally overrides the value of `--max-http-header-size` for requests received by + * this server, i.e. the maximum length of request headers in bytes. + * @default 16384 + * @since v13.3.0 + */ + maxHeaderSize?: number | undefined; + /** + * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. + * @default true + * @since v16.5.0 + */ + noDelay?: boolean | undefined; + /** + * If set to `true`, it forces the server to respond with a 400 (Bad Request) status code + * to any HTTP/1.1 request message that lacks a Host header (as mandated by the specification). + * @default true + * @since 20.0.0 + */ + requireHostHeader?: boolean | undefined; + /** + * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, + * similarly on what is done in `socket.setKeepAlive()`. + * @default false + * @since v16.5.0 + */ + keepAlive?: boolean | undefined; + /** + * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. + * @default 0 + * @since v16.5.0 + */ + keepAliveInitialDelay?: number | undefined; + /** + * A list of response headers that should be sent only once. + * If the header's value is an array, the items will be joined using `; `. + */ + uniqueHeaders?: Array | undefined; + /** + * A callback which receives an + * incoming request and returns a boolean, to control which upgrade attempts + * should be accepted. Accepted upgrades will fire an `'upgrade'` event (or + * their sockets will be destroyed, if no listener is registered) while + * rejected upgrades will fire a `'request'` event like any non-upgrade + * request. + * @since v24.9.0 + * @default () => server.listenerCount('upgrade') > 0 + */ + shouldUpgradeCallback?: ((request: InstanceType) => boolean) | undefined; + /** + * If set to `true`, an error is thrown when writing to an HTTP response which does not have a body. + * @default false + * @since v18.17.0, v20.2.0 + */ + rejectNonStandardBodyWrites?: boolean | undefined; + /** + * If set to `true`, requests without `Content-Length` + * or `Transfer-Encoding` headers (indicating no body) will be initialized with an + * already-ended body stream, so they will never emit any stream events + * (like `'data'` or `'end'`). You can use `req.readableEnded` to detect this case. + * @since v25.1.0 + * @default false + */ + optimizeEmptyRequests?: boolean | undefined; + } + type RequestListener< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + > = (request: InstanceType, response: InstanceType & { req: InstanceType }) => void; + interface ServerEventMap< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + > extends net.ServerEventMap { + "checkContinue": Parameters>; + "checkExpectation": Parameters>; + "clientError": [exception: Error, socket: stream.Duplex]; + "connect": [request: InstanceType, socket: stream.Duplex, head: NonSharedBuffer]; + "connection": [socket: net.Socket]; + "dropRequest": [request: InstanceType, socket: stream.Duplex]; + "request": Parameters>; + "upgrade": [req: InstanceType, stream: stream.Duplex, head: NonSharedBuffer]; + } + /** + * @since v0.1.17 + */ + class Server< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + > extends net.Server { + constructor(requestListener?: RequestListener); + constructor(options: ServerOptions, requestListener?: RequestListener); + /** + * Sets the timeout value for sockets, and emits a `'timeout'` event on + * the Server object, passing the socket as an argument, if a timeout + * occurs. + * + * If there is a `'timeout'` event listener on the Server object, then it + * will be called with the timed-out socket as an argument. + * + * By default, the Server does not timeout sockets. However, if a callback + * is assigned to the Server's `'timeout'` event, timeouts must be handled + * explicitly. + * @since v0.9.12 + * @param [msecs=0 (no timeout)] + */ + setTimeout(msecs?: number, callback?: (socket: net.Socket) => void): this; + setTimeout(callback: (socket: net.Socket) => void): this; + /** + * Limits maximum incoming headers count. If set to 0, no limit will be applied. + * @since v0.7.0 + */ + maxHeadersCount: number | null; + /** + * The maximum number of requests socket can handle + * before closing keep alive connection. + * + * A value of `0` will disable the limit. + * + * When the limit is reached it will set the `Connection` header value to `close`, + * but will not actually close the connection, subsequent requests sent + * after the limit is reached will get `503 Service Unavailable` as a response. + * @since v16.10.0 + */ + maxRequestsPerSocket: number | null; + /** + * The number of milliseconds of inactivity before a socket is presumed + * to have timed out. + * + * A value of `0` will disable the timeout behavior on incoming connections. + * + * The socket timeout logic is set up on connection, so changing this + * value only affects new connections to the server, not any existing connections. + * @since v0.9.12 + */ + timeout: number; + /** + * Limit the amount of time the parser will wait to receive the complete HTTP + * headers. + * + * If the timeout expires, the server responds with status 408 without + * forwarding the request to the request listener and then closes the connection. + * + * It must be set to a non-zero value (e.g. 120 seconds) to protect against + * potential Denial-of-Service attacks in case the server is deployed without a + * reverse proxy in front. + * @since v11.3.0, v10.14.0 + */ + headersTimeout: number; + /** + * The number of milliseconds of inactivity a server needs to wait for additional + * incoming data, after it has finished writing the last response, before a socket + * will be destroyed. + * + * This timeout value is combined with the + * `server.keepAliveTimeoutBuffer` option to determine the actual socket + * timeout, calculated as: + * socketTimeout = keepAliveTimeout + keepAliveTimeoutBuffer + * If the server receives new data before the keep-alive timeout has fired, it + * will reset the regular inactivity timeout, i.e., `server.timeout`. + * + * A value of `0` will disable the keep-alive timeout behavior on incoming + * connections. + * A value of `0` makes the HTTP server behave similarly to Node.js versions prior + * to 8.0.0, which did not have a keep-alive timeout. + * + * The socket timeout logic is set up on connection, so changing this value only + * affects new connections to the server, not any existing connections. + * @since v8.0.0 + */ + keepAliveTimeout: number; + /** + * An additional buffer time added to the + * `server.keepAliveTimeout` to extend the internal socket timeout. + * + * This buffer helps reduce connection reset (`ECONNRESET`) errors by increasing + * the socket timeout slightly beyond the advertised keep-alive timeout. + * + * This option applies only to new incoming connections. + * @since v24.6.0 + * @default 1000 + */ + keepAliveTimeoutBuffer: number; + /** + * Sets the timeout value in milliseconds for receiving the entire request from + * the client. + * + * If the timeout expires, the server responds with status 408 without + * forwarding the request to the request listener and then closes the connection. + * + * It must be set to a non-zero value (e.g. 120 seconds) to protect against + * potential Denial-of-Service attacks in case the server is deployed without a + * reverse proxy in front. + * @since v14.11.0 + */ + requestTimeout: number; + /** + * Closes all connections connected to this server. + * @since v18.2.0 + */ + closeAllConnections(): void; + /** + * Closes all connections connected to this server which are not sending a request + * or waiting for a response. + * @since v18.2.0 + */ + closeIdleConnections(): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ServerEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ServerEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: ServerEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: ServerEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface OutgoingMessageEventMap extends stream.WritableEventMap { + "prefinish": []; + } + /** + * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract outgoing message from + * the perspective of the participants of an HTTP transaction. + * @since v0.1.17 + */ + class OutgoingMessage extends stream.Writable { + constructor(); + readonly req: Request; + chunkedEncoding: boolean; + shouldKeepAlive: boolean; + useChunkedEncodingByDefault: boolean; + sendDate: boolean; + /** + * @deprecated Use `writableEnded` instead. + */ + finished: boolean; + /** + * Read-only. `true` if the headers were sent, otherwise `false`. + * @since v0.9.3 + */ + readonly headersSent: boolean; + /** + * Alias of `outgoingMessage.socket`. + * @since v0.3.0 + * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead. + */ + readonly connection: net.Socket | null; + /** + * Reference to the underlying socket. Usually, users will not want to access + * this property. + * + * After calling `outgoingMessage.end()`, this property will be nulled. + * @since v0.3.0 + */ + readonly socket: net.Socket | null; + /** + * Once a socket is associated with the message and is connected, `socket.setTimeout()` will be called with `msecs` as the first parameter. + * @since v0.9.12 + * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event. + */ + setTimeout(msecs: number, callback?: () => void): this; + /** + * Sets a single header value. If the header already exists in the to-be-sent + * headers, its value will be replaced. Use an array of strings to send multiple + * headers with the same name. + * @since v0.4.0 + * @param name Header name + * @param value Header value + */ + setHeader(name: string, value: number | string | readonly string[]): this; + /** + * Sets multiple header values for implicit headers. headers must be an instance of + * `Headers` or `Map`, if a header already exists in the to-be-sent headers, its + * value will be replaced. + * + * ```js + * const headers = new Headers({ foo: 'bar' }); + * outgoingMessage.setHeaders(headers); + * ``` + * + * or + * + * ```js + * const headers = new Map([['foo', 'bar']]); + * outgoingMessage.setHeaders(headers); + * ``` + * + * When headers have been set with `outgoingMessage.setHeaders()`, they will be + * merged with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http.createServer((req, res) => { + * const headers = new Headers({ 'Content-Type': 'text/html' }); + * res.setHeaders(headers); + * res.writeHead(200, { 'Content-Type': 'text/plain' }); + * res.end('ok'); + * }); + * ``` + * + * @since v19.6.0, v18.15.0 + * @param name Header name + * @param value Header value + */ + setHeaders(headers: Headers | Map): this; + /** + * Append a single header value to the header object. + * + * If the value is an array, this is equivalent to calling this method multiple + * times. + * + * If there were no previous values for the header, this is equivalent to calling `outgoingMessage.setHeader(name, value)`. + * + * Depending of the value of `options.uniqueHeaders` when the client request or the + * server were created, this will end up in the header being sent multiple times or + * a single time with values joined using `; `. + * @since v18.3.0, v16.17.0 + * @param name Header name + * @param value Header value + */ + appendHeader(name: string, value: string | readonly string[]): this; + /** + * Gets the value of the HTTP header with the given name. If that header is not + * set, the returned value will be `undefined`. + * @since v0.4.0 + * @param name Name of header + */ + getHeader(name: string): number | string | string[] | undefined; + /** + * Returns a shallow copy of the current outgoing headers. Since a shallow + * copy is used, array values may be mutated without additional calls to + * various header-related HTTP module methods. The keys of the returned + * object are the header names and the values are the respective header + * values. All header names are lowercase. + * + * The object returned by the `outgoingMessage.getHeaders()` method does + * not prototypically inherit from the JavaScript `Object`. This means that + * typical `Object` methods such as `obj.toString()`, `obj.hasOwnProperty()`, + * and others are not defined and will not work. + * + * ```js + * outgoingMessage.setHeader('Foo', 'bar'); + * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headers = outgoingMessage.getHeaders(); + * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } + * ``` + * @since v7.7.0 + */ + getHeaders(): OutgoingHttpHeaders; + /** + * Returns an array containing the unique names of the current outgoing headers. + * All names are lowercase. + * @since v7.7.0 + */ + getHeaderNames(): string[]; + /** + * Returns `true` if the header identified by `name` is currently set in the + * outgoing headers. The header name is case-insensitive. + * + * ```js + * const hasContentType = outgoingMessage.hasHeader('content-type'); + * ``` + * @since v7.7.0 + */ + hasHeader(name: string): boolean; + /** + * Removes a header that is queued for implicit sending. + * + * ```js + * outgoingMessage.removeHeader('Content-Encoding'); + * ``` + * @since v0.4.0 + * @param name Header name + */ + removeHeader(name: string): void; + /** + * Adds HTTP trailers (headers but at the end of the message) to the message. + * + * Trailers will **only** be emitted if the message is chunked encoded. If not, + * the trailers will be silently discarded. + * + * HTTP requires the `Trailer` header to be sent to emit trailers, + * with a list of header field names in its value, e.g. + * + * ```js + * message.writeHead(200, { 'Content-Type': 'text/plain', + * 'Trailer': 'Content-MD5' }); + * message.write(fileData); + * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' }); + * message.end(); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v0.3.0 + */ + addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void; + /** + * Flushes the message headers. + * + * For efficiency reason, Node.js normally buffers the message headers + * until `outgoingMessage.end()` is called or the first chunk of message data + * is written. It then tries to pack the headers and data into a single TCP + * packet. + * + * It is usually desired (it saves a TCP round-trip), but not when the first + * data is not sent until possibly much later. `outgoingMessage.flushHeaders()` bypasses the optimization and kickstarts the message. + * @since v1.6.0 + */ + flushHeaders(): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: OutgoingMessageEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: OutgoingMessageEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: OutgoingMessageEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: OutgoingMessageEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + /** + * This object is created internally by an HTTP server, not by the user. It is + * passed as the second parameter to the `'request'` event. + * @since v0.1.17 + */ + class ServerResponse extends OutgoingMessage { + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status code that will be sent to the client when + * the headers get flushed. + * + * ```js + * response.statusCode = 404; + * ``` + * + * After response header was sent to the client, this property indicates the + * status code which was sent out. + * @since v0.4.0 + */ + statusCode: number; + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status message that will be sent to the client when + * the headers get flushed. If this is left as `undefined` then the standard + * message for the status code will be used. + * + * ```js + * response.statusMessage = 'Not found'; + * ``` + * + * After response header was sent to the client, this property indicates the + * status message which was sent out. + * @since v0.11.8 + */ + statusMessage: string; + /** + * If set to `true`, Node.js will check whether the `Content-Length` header value and the size of the body, in bytes, are equal. + * Mismatching the `Content-Length` header value will result + * in an `Error` being thrown, identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`. + * @since v18.10.0, v16.18.0 + */ + strictContentLength: boolean; + constructor(req: Request); + assignSocket(socket: net.Socket): void; + detachSocket(socket: net.Socket): void; + /** + * Sends an HTTP/1.1 100 Continue message to the client, indicating that + * the request body should be sent. See the `'checkContinue'` event on `Server`. + * @since v0.3.0 + */ + writeContinue(callback?: () => void): void; + /** + * Sends an HTTP/1.1 103 Early Hints message to the client with a Link header, + * indicating that the user agent can preload/preconnect the linked resources. + * The `hints` is an object containing the values of headers to be sent with + * early hints message. The optional `callback` argument will be called when + * the response message has been written. + * + * **Example** + * + * ```js + * const earlyHintsLink = '; rel=preload; as=style'; + * response.writeEarlyHints({ + * 'link': earlyHintsLink, + * }); + * + * const earlyHintsLinks = [ + * '; rel=preload; as=style', + * '; rel=preload; as=script', + * ]; + * response.writeEarlyHints({ + * 'link': earlyHintsLinks, + * 'x-trace-id': 'id for diagnostics', + * }); + * + * const earlyHintsCallback = () => console.log('early hints message sent'); + * response.writeEarlyHints({ + * 'link': earlyHintsLinks, + * }, earlyHintsCallback); + * ``` + * @since v18.11.0 + * @param hints An object containing the values of headers + * @param callback Will be called when the response message has been written + */ + writeEarlyHints(hints: Record, callback?: () => void): void; + /** + * Sends a response header to the request. The status code is a 3-digit HTTP + * status code, like `404`. The last argument, `headers`, are the response headers. + * Optionally one can give a human-readable `statusMessage` as the second + * argument. + * + * `headers` may be an `Array` where the keys and values are in the same list. + * It is _not_ a list of tuples. So, the even-numbered offsets are key values, + * and the odd-numbered offsets are the associated values. The array is in the same + * format as `request.rawHeaders`. + * + * Returns a reference to the `ServerResponse`, so that calls can be chained. + * + * ```js + * const body = 'hello world'; + * response + * .writeHead(200, { + * 'Content-Length': Buffer.byteLength(body), + * 'Content-Type': 'text/plain', + * }) + * .end(body); + * ``` + * + * This method must only be called once on a message and it must + * be called before `response.end()` is called. + * + * If `response.write()` or `response.end()` are called before calling + * this, the implicit/mutable headers will be calculated and call this function. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * If this method is called and `response.setHeader()` has not been called, + * it will directly write the supplied header values onto the network channel + * without caching internally, and the `response.getHeader()` on the header + * will not yield the expected result. If progressive population of headers is + * desired with potential future retrieval and modification, use `response.setHeader()` instead. + * + * ```js + * // Returns content-type = text/plain + * const server = http.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain' }); + * res.end('ok'); + * }); + * ``` + * + * `Content-Length` is read in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js + * will check whether `Content-Length` and the length of the body which has + * been transmitted are equal or not. + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `Error` being thrown. + * @since v0.1.30 + */ + writeHead( + statusCode: number, + statusMessage?: string, + headers?: OutgoingHttpHeaders | OutgoingHttpHeader[], + ): this; + writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this; + /** + * Sends an arbitrary HTTP/1.1 1xx informational response to the client. This + * is a generic equivalent of `response.writeContinue()`, + * `response.writeProcessing()` and `response.writeEarlyHints()`, and + * can be called multiple times before the final response. After the final + * response headers have been sent (via `response.writeHead()` or an + * implicit header), calling this method throws `ERR_HTTP_HEADERS_SENT`. + * + * Clients receive these responses via the [`'information'`](https://nodejs.org/docs/latest-v26.x/api/http.html#event-information) + * event on `http.ClientRequest`. + * + * ```js + * response.writeInformation(110, { 'X-Progress': '50%' }); + * ``` + * @since v26.2.0 + * @param statusCode An HTTP 1xx informational status code, between `100` + * and `199` inclusive, excluding `101` (Switching Protocols) which is only + * available through the [`'upgrade'`](https://nodejs.org/docs/latest-v26.x/api/http.html#event-upgrade) event. + * @param headers An optional set of headers to send with the + * informational response. Accepts the same shapes as + * `response.writeHead()`. + * @param callback Optional, called once the message has been written + * to the socket. + */ + writeInformation( + statusCode: number, + headers?: OutgoingHttpHeaders | readonly string[], + callback?: () => void, + ): void; + writeInformation(statusCode: number, callback: () => void): void; + /** + * Sends a HTTP/1.1 102 Processing message to the client, indicating that + * the request body should be sent. + * @since v10.0.0 + */ + writeProcessing(callback?: () => void): void; + } + interface InformationEvent { + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + statusCode: number; + statusMessage: string; + headers: IncomingHttpHeaders; + rawHeaders: string[]; + } + interface ClientRequestEventMap extends stream.WritableEventMap { + /** @deprecated Listen for the `'close'` event instead. */ + "abort": []; + "connect": [response: IncomingMessage, socket: net.Socket, head: NonSharedBuffer]; + "continue": []; + "information": [info: InformationEvent]; + "response": [response: IncomingMessage]; + "socket": [socket: net.Socket]; + "timeout": []; + "upgrade": [response: IncomingMessage, stream: net.Socket, head: NonSharedBuffer]; + } + /** + * This object is created internally and returned from {@link request}. It + * represents an _in-progress_ request whose header has already been queued. The + * header is still mutable using the `setHeader(name, value)`, `getHeader(name)`, `removeHeader(name)` API. The actual header will + * be sent along with the first data chunk or when calling `request.end()`. + * + * To get the response, add a listener for `'response'` to the request object. `'response'` will be emitted from the request object when the response + * headers have been received. The `'response'` event is executed with one + * argument which is an instance of {@link IncomingMessage}. + * + * During the `'response'` event, one can add listeners to the + * response object; particularly to listen for the `'data'` event. + * + * If no `'response'` handler is added, then the response will be + * entirely discarded. However, if a `'response'` event handler is added, + * then the data from the response object **must** be consumed, either by + * calling `response.read()` whenever there is a `'readable'` event, or + * by adding a `'data'` handler, or by calling the `.resume()` method. + * Until the data is consumed, the `'end'` event will not fire. Also, until + * the data is read it will consume memory that can eventually lead to a + * 'process out of memory' error. + * + * For backward compatibility, `res` will only emit `'error'` if there is an `'error'` listener registered. + * + * Set `Content-Length` header to limit the response body size. + * If `response.strictContentLength` is set to `true`, mismatching the `Content-Length` header value will result in an `Error` being thrown, + * identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`. + * + * `Content-Length` value should be in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. + * @since v0.1.17 + */ + class ClientRequest extends OutgoingMessage { + /** + * The `request.aborted` property will be `true` if the request has + * been aborted. + * @since v0.11.14 + * @deprecated Since v17.0.0, v16.12.0 - Check `destroyed` instead. + */ + aborted: boolean; + /** + * The request host. + * @since v14.5.0, v12.19.0 + */ + host: string; + /** + * The request protocol. + * @since v14.5.0, v12.19.0 + */ + protocol: string; + /** + * When sending request through a keep-alive enabled agent, the underlying socket + * might be reused. But if server closes connection at unfortunate time, client + * may run into a 'ECONNRESET' error. + * + * ```js + * import http from 'node:http'; + * const agent = new http.Agent({ keepAlive: true }); + * + * // Server has a 5 seconds keep-alive timeout by default + * http + * .createServer((req, res) => { + * res.write('hello\n'); + * res.end(); + * }) + * .listen(3000); + * + * setInterval(() => { + * // Adapting a keep-alive agent + * http.get('http://localhost:3000', { agent }, (res) => { + * res.on('data', (data) => { + * // Do nothing + * }); + * }); + * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout + * ``` + * + * By marking a request whether it reused socket or not, we can do + * automatic error retry base on it. + * + * ```js + * import http from 'node:http'; + * const agent = new http.Agent({ keepAlive: true }); + * + * function retriableRequest() { + * const req = http + * .get('http://localhost:3000', { agent }, (res) => { + * // ... + * }) + * .on('error', (err) => { + * // Check if retry is needed + * if (req.reusedSocket && err.code === 'ECONNRESET') { + * retriableRequest(); + * } + * }); + * } + * + * retriableRequest(); + * ``` + * @since v13.0.0, v12.16.0 + */ + reusedSocket: boolean; + /** + * Limits maximum response headers count. If set to 0, no limit will be applied. + */ + maxHeadersCount: number; + constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); + /** + * The request method. + * @since v0.1.97 + */ + method: string; + /** + * The request path. + * @since v0.4.0 + */ + path: string; + /** + * Marks the request as aborting. Calling this will cause remaining data + * in the response to be dropped and the socket to be destroyed. + * @since v0.3.8 + * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead. + */ + abort(): void; + onSocket(socket: net.Socket): void; + /** + * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called. + * @since v0.5.9 + * @param timeout Milliseconds before a request times out. + * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event. + */ + setTimeout(timeout: number, callback?: () => void): this; + /** + * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called. + * @since v0.5.9 + */ + setNoDelay(noDelay?: boolean): void; + /** + * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called. + * @since v0.5.9 + */ + setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; + /** + * Returns an array containing the unique names of the current outgoing raw + * headers. Header names are returned with their exact casing being set. + * + * ```js + * request.setHeader('Foo', 'bar'); + * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headerNames = request.getRawHeaderNames(); + * // headerNames === ['Foo', 'Set-Cookie'] + * ``` + * @since v15.13.0, v14.17.0 + */ + getRawHeaderNames(): string[]; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ClientRequestEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ClientRequestEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: ClientRequestEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: ClientRequestEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface IncomingMessageEventMap extends stream.ReadableEventMap { + /** @deprecated Listen for `'close'` event instead. */ + "aborted": []; + } + /** + * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to + * access response + * status, headers, and data. + * + * Different from its `socket` value which is a subclass of `stream.Duplex`, the `IncomingMessage` itself extends `stream.Readable` and is created separately to + * parse and emit the incoming HTTP headers and payload, as the underlying socket + * may be reused multiple times in case of keep-alive. + * @since v0.1.17 + */ + class IncomingMessage extends stream.Readable { + constructor(socket: net.Socket); + /** + * The `message.aborted` property will be `true` if the request has + * been aborted. + * @since v10.1.0 + * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from stream.Readable. + */ + aborted: boolean; + /** + * In case of server request, the HTTP version sent by the client. In the case of + * client response, the HTTP version of the connected-to server. + * Probably either `'1.1'` or `'1.0'`. + * + * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second. + * @since v0.1.1 + */ + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + /** + * The `message.complete` property will be `true` if a complete HTTP message has + * been received and successfully parsed. + * + * This property is particularly useful as a means of determining if a client or + * server fully transmitted a message before a connection was terminated: + * + * ```js + * const req = http.request({ + * host: '127.0.0.1', + * port: 8080, + * method: 'POST', + * }, (res) => { + * res.resume(); + * res.on('end', () => { + * if (!res.complete) + * console.error( + * 'The connection was terminated while the message was still being sent'); + * }); + * }); + * ``` + * @since v0.3.0 + */ + complete: boolean; + /** + * Alias for `message.socket`. + * @since v0.1.90 + * @deprecated Since v16.0.0 - Use `socket`. + */ + connection: net.Socket; + /** + * The `net.Socket` object associated with the connection. + * + * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the + * client's authentication details. + * + * This property is guaranteed to be an instance of the `net.Socket` class, + * a subclass of `stream.Duplex`, unless the user specified a socket + * type other than `net.Socket` or internally nulled. + * @since v0.3.0 + */ + socket: net.Socket; + /** + * The request/response headers object. + * + * Key-value pairs of header names and values. Header names are lower-cased. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': 'curl/7.22.0', + * // host: '127.0.0.1:8000', + * // accept: '*' } + * console.log(request.headers); + * ``` + * + * Duplicates in raw headers are handled in the following ways, depending on the + * header name: + * + * * Duplicates of `age`, `authorization`, `content-length`, `content-type`, `etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`, `last-modified`, `location`, + * `max-forwards`, `proxy-authorization`, `referer`, `retry-after`, `server`, or `user-agent` are discarded. + * To allow duplicate values of the headers listed above to be joined, + * use the option `joinDuplicateHeaders` in {@link request} and {@link createServer}. See RFC 9110 Section 5.3 for more + * information. + * * `set-cookie` is always an array. Duplicates are added to the array. + * * For duplicate `cookie` headers, the values are joined together with `; `. + * * For all other headers, the values are joined together with `, `. + * @since v0.1.5 + */ + headers: IncomingHttpHeaders; + /** + * Similar to `message.headers`, but there is no join logic and the values are + * always arrays of strings, even for headers received just once. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': ['curl/7.22.0'], + * // host: ['127.0.0.1:8000'], + * // accept: ['*'] } + * console.log(request.headersDistinct); + * ``` + * @since v18.3.0, v16.17.0 + */ + headersDistinct: NodeJS.Dict; + /** + * The raw request/response headers list exactly as they were received. + * + * The keys and values are in the same list. It is _not_ a + * list of tuples. So, the even-numbered offsets are key values, and the + * odd-numbered offsets are the associated values. + * + * Header names are not lowercased, and duplicates are not merged. + * + * ```js + * // Prints something like: + * // + * // [ 'user-agent', + * // 'this is invalid because there can be only one', + * // 'User-Agent', + * // 'curl/7.22.0', + * // 'Host', + * // '127.0.0.1:8000', + * // 'ACCEPT', + * // '*' ] + * console.log(request.rawHeaders); + * ``` + * @since v0.11.6 + */ + rawHeaders: string[]; + /** + * The request/response trailers object. Only populated at the `'end'` event. + * @since v0.3.0 + */ + trailers: NodeJS.Dict; + /** + * Similar to `message.trailers`, but there is no join logic and the values are + * always arrays of strings, even for headers received just once. + * Only populated at the `'end'` event. + * @since v18.3.0, v16.17.0 + */ + trailersDistinct: NodeJS.Dict; + /** + * The raw request/response trailer keys and values exactly as they were + * received. Only populated at the `'end'` event. + * @since v0.11.6 + */ + rawTrailers: string[]; + /** + * Calls `message.socket.setTimeout(msecs, callback)`. + * @since v0.5.9 + */ + setTimeout(msecs: number, callback?: () => void): this; + /** + * An `AbortSignal` that is aborted when the underlying socket closes or the + * request is destroyed. The signal is created lazily on first access — no + * `AbortController` is allocated for requests that never use this property. + * + * This is useful for cancelling downstream asynchronous work such as database + * queries or `fetch` calls when a client disconnects mid-request. + * + * ```js + * import http from 'node:http'; + * + * http.createServer(async (req, res) => { + * try { + * const data = await fetch('https://example.com/api', { signal: req.signal }); + * res.end(JSON.stringify(await data.json())); + * } catch (err) { + * if (err.name === 'AbortError') return; + * res.statusCode = 500; + * res.end('Internal Server Error'); + * } + * }).listen(3000); + * ``` + * @since v26.1.0 + */ + readonly signal: AbortSignal; + /** + * **Only valid for request obtained from {@link Server}.** + * + * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`. + * @since v0.1.1 + */ + method?: string | undefined; + /** + * **Only valid for request obtained from {@link Server}.** + * + * Request URL string. This contains only the URL that is present in the actual + * HTTP request. Take the following request: + * + * ```http + * GET /status?name=ryan HTTP/1.1 + * Accept: text/plain + * ``` + * + * To parse the URL into its parts: + * + * ```js + * new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`); + * ``` + * + * When `request.url` is `'/status?name=ryan'` and `process.env.HOST` is undefined: + * + * ```console + * $ node + * > new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`); + * URL { + * href: 'http://localhost/status?name=ryan', + * origin: 'http://localhost', + * protocol: 'http:', + * username: '', + * password: '', + * host: 'localhost', + * hostname: 'localhost', + * port: '', + * pathname: '/status', + * search: '?name=ryan', + * searchParams: URLSearchParams { 'name' => 'ryan' }, + * hash: '' + * } + * ``` + * + * Ensure that you set `process.env.HOST` to the server's host name, or consider replacing this part entirely. If using `req.headers.host`, ensure proper + * validation is used, as clients may specify a custom `Host` header. + * @since v0.1.90 + */ + url?: string | undefined; + /** + * **Only valid for response obtained from {@link ClientRequest}.** + * + * The 3-digit HTTP response status code. E.G. `404`. + * @since v0.1.1 + */ + statusCode?: number | undefined; + /** + * **Only valid for response obtained from {@link ClientRequest}.** + * + * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`. + * @since v0.11.10 + */ + statusMessage?: string | undefined; + /** + * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error` is provided, an `'error'` event is emitted on the socket and `error` is passed + * as an argument to any listeners on the event. + * @since v0.3.0 + */ + destroy(error?: Error): this; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: IncomingMessageEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: IncomingMessageEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: IncomingMessageEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: IncomingMessageEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface ProxyEnv extends NodeJS.ProcessEnv { + HTTP_PROXY?: string | undefined; + HTTPS_PROXY?: string | undefined; + NO_PROXY?: string | undefined; + http_proxy?: string | undefined; + https_proxy?: string | undefined; + no_proxy?: string | undefined; + } + interface AgentOptions extends NodeJS.PartialOptions { + /** + * Keep sockets around in a pool to be used by other requests in the future. Default = false + */ + keepAlive?: boolean | undefined; + /** + * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. + * Only relevant if keepAlive is set to true. + */ + keepAliveMsecs?: number | undefined; + /** + * Milliseconds to subtract from + * the server-provided `keep-alive: timeout=...` hint when determining socket + * expiration time. This buffer helps ensure the agent closes the socket + * slightly before the server does, reducing the chance of sending a request + * on a socket that’s about to be closed by the server. + * @since v24.7.0 + * @default 1000 + */ + agentKeepAliveTimeoutBuffer?: number | undefined; + /** + * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity + */ + maxSockets?: number | undefined; + /** + * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity. + */ + maxTotalSockets?: number | undefined; + /** + * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. + */ + maxFreeSockets?: number | undefined; + /** + * Socket timeout in milliseconds. This will set the timeout after the socket is connected. + */ + timeout?: number | undefined; + /** + * Scheduling strategy to apply when picking the next free socket to use. + * @default `lifo` + */ + scheduling?: "fifo" | "lifo" | undefined; + /** + * Environment variables for proxy configuration. See + * [Built-in Proxy Support](https://nodejs.org/docs/latest-v26.x/api/http.html#built-in-proxy-support) for details. + * @since v24.5.0 + */ + proxyEnv?: ProxyEnv | undefined; + /** + * Default port to use when the port is not specified in requests. + * @since v24.5.0 + */ + defaultPort?: number | undefined; + /** + * The protocol to use for the agent. + * @since v24.5.0 + */ + protocol?: string | undefined; + } + /** + * An `Agent` is responsible for managing connection persistence + * and reuse for HTTP clients. It maintains a queue of pending requests + * for a given host and port, reusing a single socket connection for each + * until the queue is empty, at which time the socket is either destroyed + * or put into a pool where it is kept to be used again for requests to the + * same host and port. Whether it is destroyed or pooled depends on the `keepAlive` `option`. + * + * Pooled connections have TCP Keep-Alive enabled for them, but servers may + * still close idle connections, in which case they will be removed from the + * pool and a new connection will be made when a new HTTP request is made for + * that host and port. Servers may also refuse to allow multiple requests + * over the same connection, in which case the connection will have to be + * remade for every request and cannot be pooled. The `Agent` will still make + * the requests to that server, but each one will occur over a new connection. + * + * When a connection is closed by the client or the server, it is removed + * from the pool. Any unused sockets in the pool will be unrefed so as not + * to keep the Node.js process running when there are no outstanding requests. + * (see `socket.unref()`). + * + * It is good practice, to `destroy()` an `Agent` instance when it is no + * longer in use, because unused sockets consume OS resources. + * + * Sockets are removed from an agent when the socket emits either + * a `'close'` event or an `'agentRemove'` event. When intending to keep one + * HTTP request open for a long time without keeping it in the agent, something + * like the following may be done: + * + * ```js + * http.get(options, (res) => { + * // Do stuff + * }).on('socket', (socket) => { + * socket.emit('agentRemove'); + * }); + * ``` + * + * An agent may also be used for an individual request. By providing `{agent: false}` as an option to the `http.get()` or `http.request()` functions, a one-time use `Agent` with default options + * will be used + * for the client connection. + * + * `agent:false`: + * + * ```js + * http.get({ + * hostname: 'localhost', + * port: 80, + * path: '/', + * agent: false, // Create a new agent just for this one request + * }, (res) => { + * // Do stuff with response + * }); + * ``` + * + * `options` in [`socket.connect()`](https://nodejs.org/docs/latest-v26.x/api/net.html#socketconnectoptions-connectlistener) are also supported. + * + * To configure any of them, a custom {@link Agent} instance must be created. + * + * ```js + * import http from 'node:http'; + * const keepAliveAgent = new http.Agent({ keepAlive: true }); + * options.agent = keepAliveAgent; + * http.request(options, onResponseCallback) + * ``` + * @since v0.3.4 + */ + class Agent extends EventEmitter { + /** + * By default set to 256. For agents with `keepAlive` enabled, this + * sets the maximum number of sockets that will be left open in the free + * state. + * @since v0.11.7 + */ + maxFreeSockets: number; + /** + * By default set to `Infinity`. Determines how many concurrent sockets the agent + * can have open per origin. Origin is the returned value of `agent.getName()`. + * @since v0.3.6 + */ + maxSockets: number; + /** + * By default set to `Infinity`. Determines how many concurrent sockets the agent + * can have open. Unlike `maxSockets`, this parameter applies across all origins. + * @since v14.5.0, v12.19.0 + */ + maxTotalSockets: number; + /** + * An object which contains arrays of sockets currently awaiting use by + * the agent when `keepAlive` is enabled. Do not modify. + * + * Sockets in the `freeSockets` list will be automatically destroyed and + * removed from the array on `'timeout'`. + * @since v0.11.4 + */ + readonly freeSockets: NodeJS.ReadOnlyDict; + /** + * An object which contains arrays of sockets currently in use by the + * agent. Do not modify. + * @since v0.3.6 + */ + readonly sockets: NodeJS.ReadOnlyDict; + /** + * An object which contains queues of requests that have not yet been assigned to + * sockets. Do not modify. + * @since v0.5.9 + */ + readonly requests: NodeJS.ReadOnlyDict; + constructor(opts?: AgentOptions); + /** + * Destroy any sockets that are currently in use by the agent. + * + * It is usually not necessary to do this. However, if using an + * agent with `keepAlive` enabled, then it is best to explicitly shut down + * the agent when it is no longer needed. Otherwise, + * sockets might stay open for quite a long time before the server + * terminates them. + * @since v0.11.4 + */ + destroy(): void; + /** + * Produces a socket/stream to be used for HTTP requests. + * + * By default, this function behaves identically to `net.createConnection()`, + * synchronously returning the created socket. The optional `callback` parameter in the + * signature is **not** used by this default implementation. + * + * However, custom agents may override this method to provide greater flexibility, + * for example, to create sockets asynchronously. When overriding `createConnection`: + * + * 1. **Synchronous socket creation**: The overriding method can return the + * socket/stream directly. + * 2. **Asynchronous socket creation**: The overriding method can accept the `callback` + * and pass the created socket/stream to it (e.g., `callback(null, newSocket)`). + * If an error occurs during socket creation, it should be passed as the first + * argument to the `callback` (e.g., `callback(err)`). + * + * The agent will call the provided `createConnection` function with `options` and + * this internal `callback`. The `callback` provided by the agent has a signature + * of `(err, stream)`. + * @since v0.11.4 + * @param options Options containing connection details. Check + * `net.createConnection` for the format of the options. For custom agents, + * this object is passed to the custom `createConnection` function. + * @param callback (Optional, primarily for custom agents) A function to be + * called by a custom `createConnection` implementation when the socket is + * created, especially for asynchronous operations. + * @returns The created socket. This is returned by the default + * implementation or by a custom synchronous `createConnection` implementation. + * If a custom `createConnection` uses the `callback` for asynchronous + * operation, this return value might not be the primary way to obtain the socket. + */ + createConnection( + options: ClientRequestArgs, + callback?: (err: Error | null, stream: stream.Duplex) => void, + ): stream.Duplex | null | undefined; + /** + * Called when `socket` is detached from a request and could be persisted by the`Agent`. Default behavior is to: + * + * ```js + * socket.setKeepAlive(true, this.keepAliveMsecs); + * socket.unref(); + * return true; + * ``` + * + * This method can be overridden by a particular `Agent` subclass. If this + * method returns a falsy value, the socket will be destroyed instead of persisting + * it for use with the next request. + * + * The `socket` argument can be an instance of `net.Socket`, a subclass of `stream.Duplex`. + * @since v8.1.0 + */ + keepSocketAlive(socket: stream.Duplex): void; + /** + * Called when `socket` is attached to `request` after being persisted because of + * the keep-alive options. Default behavior is to: + * + * ```js + * socket.ref(); + * ``` + * + * This method can be overridden by a particular `Agent` subclass. + * + * The `socket` argument can be an instance of `net.Socket`, a subclass of `stream.Duplex`. + * @since v8.1.0 + */ + reuseSocket(socket: stream.Duplex, request: ClientRequest): void; + /** + * Get a unique name for a set of request options, to determine whether a + * connection can be reused. For an HTTP agent, this returns`host:port:localAddress` or `host:port:localAddress:family`. For an HTTPS agent, + * the name includes the CA, cert, ciphers, and other HTTPS/TLS-specific options + * that determine socket reusability. + * @since v0.11.4 + * @param options A set of options providing information for name generation + */ + getName(options?: ClientRequestArgs): string; + } + const METHODS: string[]; + const STATUS_CODES: { + [errorCode: number]: string | undefined; + [errorCode: string]: string | undefined; + }; + /** + * Returns a new instance of {@link Server}. + * + * The `requestListener` is a function which is automatically + * added to the `'request'` event. + * + * ```js + * import http from 'node:http'; + * + * // Create a local server to receive data from + * const server = http.createServer((req, res) => { + * res.writeHead(200, { 'Content-Type': 'application/json' }); + * res.end(JSON.stringify({ + * data: 'Hello World!', + * })); + * }); + * + * server.listen(8000); + * ``` + * + * ```js + * import http from 'node:http'; + * + * // Create a local server to receive data from + * const server = http.createServer(); + * + * // Listen to the request event + * server.on('request', (request, res) => { + * res.writeHead(200, { 'Content-Type': 'application/json' }); + * res.end(JSON.stringify({ + * data: 'Hello World!', + * })); + * }); + * + * server.listen(8000); + * ``` + * @since v0.1.13 + */ + function createServer< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + >(requestListener?: RequestListener): Server; + function createServer< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + >( + options: ServerOptions, + requestListener?: RequestListener, + ): Server; + // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly, + // create interface RequestOptions would make the naming more clear to developers + interface RequestOptions extends ClientRequestArgs {} + /** + * `options` in `socket.connect()` are also supported. + * + * Node.js maintains several connections per server to make HTTP requests. + * This function allows one to transparently issue requests. + * + * `url` can be a string or a `URL` object. If `url` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * If both `url` and `options` are specified, the objects are merged, with the `options` properties taking precedence. + * + * The optional `callback` parameter will be added as a one-time listener for + * the `'response'` event. + * + * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to + * upload a file with a POST request, then write to the `ClientRequest` object. + * + * ```js + * import http from 'node:http'; + * import { Buffer } from 'node:buffer'; + * + * const postData = JSON.stringify({ + * 'msg': 'Hello World!', + * }); + * + * const options = { + * hostname: 'www.google.com', + * port: 80, + * path: '/upload', + * method: 'POST', + * headers: { + * 'Content-Type': 'application/json', + * 'Content-Length': Buffer.byteLength(postData), + * }, + * }; + * + * const req = http.request(options, (res) => { + * console.log(`STATUS: ${res.statusCode}`); + * console.log(`HEADERS: ${JSON.stringify(res.headers)}`); + * res.setEncoding('utf8'); + * res.on('data', (chunk) => { + * console.log(`BODY: ${chunk}`); + * }); + * res.on('end', () => { + * console.log('No more data in response.'); + * }); + * }); + * + * req.on('error', (e) => { + * console.error(`problem with request: ${e.message}`); + * }); + * + * // Write data to request body + * req.write(postData); + * req.end(); + * ``` + * + * In the example `req.end()` was called. With `http.request()` one + * must always call `req.end()` to signify the end of the request - + * even if there is no data being written to the request body. + * + * If any error is encountered during the request (be that with DNS resolution, + * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted + * on the returned request object. As with all `'error'` events, if no listeners + * are registered the error will be thrown. + * + * There are a few special headers that should be noted. + * + * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to + * the server should be persisted until the next request. + * * Sending a 'Content-Length' header will disable the default chunked encoding. + * * Sending an 'Expect' header will immediately send the request headers. + * Usually, when sending 'Expect: 100-continue', both a timeout and a listener + * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more + * information. + * * Sending an Authorization header will override using the `auth` option + * to compute basic authentication. + * + * Example using a `URL` as `options`: + * + * ```js + * const options = new URL('http://abc:xyz@example.com'); + * + * const req = http.request(options, (res) => { + * // ... + * }); + * ``` + * + * In a successful request, the following events will be emitted in the following + * order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * (`'data'` will not be emitted at all if the response body is empty, for + * instance, in most redirects) + * * `'end'` on the `res` object + * * `'close'` + * + * In the case of a connection error, the following events will be emitted: + * + * * `'socket'` + * * `'error'` + * * `'close'` + * + * In the case of a premature connection close before the response is received, + * the following events will be emitted in the following order: + * + * * `'socket'` + * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'` + * * `'close'` + * + * In the case of a premature connection close after the response is received, + * the following events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (connection closed here) + * * `'aborted'` on the `res` object + * * `'close'` + * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'` + * * `'close'` on the `res` object + * + * If `req.destroy()` is called before a socket is assigned, the following + * events will be emitted in the following order: + * + * * (`req.destroy()` called here) + * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called + * * `'close'` + * + * If `req.destroy()` is called before the connection succeeds, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * (`req.destroy()` called here) + * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called + * * `'close'` + * + * If `req.destroy()` is called after the response is received, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (`req.destroy()` called here) + * * `'aborted'` on the `res` object + * * `'close'` + * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called + * * `'close'` on the `res` object + * + * If `req.abort()` is called before a socket is assigned, the following + * events will be emitted in the following order: + * + * * (`req.abort()` called here) + * * `'abort'` + * * `'close'` + * + * If `req.abort()` is called before the connection succeeds, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * (`req.abort()` called here) + * * `'abort'` + * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'` + * * `'close'` + * + * If `req.abort()` is called after the response is received, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (`req.abort()` called here) + * * `'abort'` + * * `'aborted'` on the `res` object + * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`. + * * `'close'` + * * `'close'` on the `res` object + * + * Setting the `timeout` option or using the `setTimeout()` function will + * not abort the request or do anything besides add a `'timeout'` event. + * + * Passing an `AbortSignal` and then calling `abort()` on the corresponding `AbortController` will behave the same way as calling `.destroy()` on the + * request. Specifically, the `'error'` event will be emitted with an error with + * the message `'AbortError: The operation was aborted'`, the code `'ABORT_ERR'` and the `cause`, if one was provided. + * @since v0.3.6 + */ + function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function request( + url: string | URL, + options: RequestOptions, + callback?: (res: IncomingMessage) => void, + ): ClientRequest; + /** + * Since most requests are GET requests without bodies, Node.js provides this + * convenience method. The only difference between this method and {@link request} is that it sets the method to GET by default and calls `req.end()` automatically. The callback must take care to + * consume the response + * data for reasons stated in {@link ClientRequest} section. + * + * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}. + * + * JSON fetching example: + * + * ```js + * http.get('http://localhost:8000/', (res) => { + * const { statusCode } = res; + * const contentType = res.headers['content-type']; + * + * let error; + * // Any 2xx status code signals a successful response but + * // here we're only checking for 200. + * if (statusCode !== 200) { + * error = new Error('Request Failed.\n' + + * `Status Code: ${statusCode}`); + * } else if (!/^application\/json/.test(contentType)) { + * error = new Error('Invalid content-type.\n' + + * `Expected application/json but received ${contentType}`); + * } + * if (error) { + * console.error(error.message); + * // Consume response data to free up memory + * res.resume(); + * return; + * } + * + * res.setEncoding('utf8'); + * let rawData = ''; + * res.on('data', (chunk) => { rawData += chunk; }); + * res.on('end', () => { + * try { + * const parsedData = JSON.parse(rawData); + * console.log(parsedData); + * } catch (e) { + * console.error(e.message); + * } + * }); + * }).on('error', (e) => { + * console.error(`Got error: ${e.message}`); + * }); + * + * // Create a local server to receive data from + * const server = http.createServer((req, res) => { + * res.writeHead(200, { 'Content-Type': 'application/json' }); + * res.end(JSON.stringify({ + * data: 'Hello World!', + * })); + * }); + * + * server.listen(8000); + * ``` + * @since v0.3.6 + * @param options Accepts the same `options` as {@link request}, with the method set to GET by default. + */ + function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; + /** + * Performs the low-level validations on the provided `name` that are done when `res.setHeader(name, value)` is called. + * + * Passing illegal value as `name` will result in a `TypeError` being thrown, + * identified by `code: 'ERR_INVALID_HTTP_TOKEN'`. + * + * It is not necessary to use this method before passing headers to an HTTP request + * or response. The HTTP module will automatically validate such headers. + * + * Example: + * + * ```js + * import { validateHeaderName } from 'node:http'; + * + * try { + * validateHeaderName(''); + * } catch (err) { + * console.error(err instanceof TypeError); // --> true + * console.error(err.code); // --> 'ERR_INVALID_HTTP_TOKEN' + * console.error(err.message); // --> 'Header name must be a valid HTTP token [""]' + * } + * ``` + * @since v14.3.0 + * @param [label='Header name'] Label for error message. + */ + function validateHeaderName(name: string): void; + /** + * Performs the low-level validations on the provided `value` that are done when `res.setHeader(name, value)` is called. + * + * Passing illegal value as `value` will result in a `TypeError` being thrown. + * + * * Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`. + * * Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`. + * + * It is not necessary to use this method before passing headers to an HTTP request + * or response. The HTTP module will automatically validate such headers. + * + * Examples: + * + * ```js + * import { validateHeaderValue } from 'node:http'; + * + * try { + * validateHeaderValue('x-my-header', undefined); + * } catch (err) { + * console.error(err instanceof TypeError); // --> true + * console.error(err.code === 'ERR_HTTP_INVALID_HEADER_VALUE'); // --> true + * console.error(err.message); // --> 'Invalid value "undefined" for header "x-my-header"' + * } + * + * try { + * validateHeaderValue('x-my-header', 'oʊmɪɡə'); + * } catch (err) { + * console.error(err instanceof TypeError); // --> true + * console.error(err.code === 'ERR_INVALID_CHAR'); // --> true + * console.error(err.message); // --> 'Invalid character in header content ["x-my-header"]' + * } + * ``` + * @since v14.3.0 + * @param name Header name + * @param value Header value + */ + function validateHeaderValue(name: string, value: string): void; + /** + * Set the maximum number of idle HTTP parsers. + * @since v18.8.0, v16.18.0 + * @param [max=1000] + */ + function setMaxIdleHTTPParsers(max: number): void; + /** + * Dynamically resets the global configurations to enable built-in proxy support for + * `fetch()` and `http.request()`/`https.request()` at runtime, as an alternative + * to using the `--use-env-proxy` flag or `NODE_USE_ENV_PROXY` environment variable. + * It can also be used to override settings configured from the environment variables. + * + * As this function resets the global configurations, any previously configured + * `http.globalAgent`, `https.globalAgent` or undici global dispatcher would be + * overridden after this function is invoked. It's recommended to invoke it before any + * requests are made and avoid invoking it in the middle of any requests. + * + * See [Built-in Proxy Support](https://nodejs.org/docs/latest-v26.x/api/http.html#built-in-proxy-support) for details on proxy URL formats and `NO_PROXY` + * syntax. + * @since v25.4.0 + * @param proxyEnv An object containing proxy configuration. This accepts the + * same options as the `proxyEnv` option accepted by {@link Agent}. **Default:** + * `process.env`. + * @returns A function that restores the original agent and dispatcher + * settings to the state before this `http.setGlobalProxyFromEnv()` is invoked. + */ + function setGlobalProxyFromEnv(proxyEnv?: ProxyEnv): () => void; + /** + * Global instance of `Agent` which is used as the default for all HTTP client + * requests. Diverges from a default `Agent` configuration by having `keepAlive` + * enabled and a `timeout` of 5 seconds. + * @since v0.5.9 + */ + let globalAgent: Agent; + /** + * Read-only property specifying the maximum allowed size of HTTP headers in bytes. + * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option. + */ + const maxHeaderSize: number; + /** + * A browser-compatible implementation of `WebSocket`. + * @since v22.5.0 + */ + const WebSocket: typeof import("undici-types").WebSocket; + /** + * @since v22.5.0 + */ + const CloseEvent: typeof import("undici-types").CloseEvent; + /** + * @since v22.5.0 + */ + const MessageEvent: typeof import("undici-types").MessageEvent; +} +declare module "http" { + export * from "node:http"; +} diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts new file mode 100644 index 0000000..1899b0e --- /dev/null +++ b/node_modules/@types/node/http2.d.ts @@ -0,0 +1,2498 @@ +declare module "node:http2" { + import { NonSharedBuffer } from "node:buffer"; + import { InternalEventEmitter } from "node:events"; + import * as fs from "node:fs"; + import * as net from "node:net"; + import * as stream from "node:stream"; + import * as tls from "node:tls"; + import * as url from "node:url"; + import { + IncomingHttpHeaders as Http1IncomingHttpHeaders, + IncomingMessage, + OutgoingHttpHeaders, + ServerResponse, + } from "node:http"; + interface IncomingHttpStatusHeader { + ":status"?: number | undefined; + } + interface IncomingHttpHeaders extends Http1IncomingHttpHeaders { + ":path"?: string | undefined; + ":method"?: string | undefined; + ":authority"?: string | undefined; + ":scheme"?: string | undefined; + ":protocol"?: string | undefined; + } + // Http2Stream + interface StreamState { + localWindowSize?: number | undefined; + state?: number | undefined; + localClose?: number | undefined; + remoteClose?: number | undefined; + /** @deprecated */ + sumDependencyWeight?: number | undefined; + /** @deprecated */ + weight?: number | undefined; + } + interface ServerStreamResponseOptions { + endStream?: boolean | undefined; + waitForTrailers?: boolean | undefined; + } + interface StatOptions { + offset: number; + length: number; + } + interface ServerStreamFileResponseOptions { + statCheck?: + | ((stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void) + | undefined; + waitForTrailers?: boolean | undefined; + offset?: number | undefined; + length?: number | undefined; + } + interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { + onError?: ((err: NodeJS.ErrnoException) => void) | undefined; + } + interface Http2StreamEventMap extends stream.DuplexEventMap { + "aborted": []; + "data": [chunk: string | NonSharedBuffer]; + "frameError": [type: number, code: number, id: number]; + "ready": []; + "streamClosed": [code: number]; + "timeout": []; + "trailers": [headers: IncomingHttpHeaders, flags: number, rawHeaders: string[]]; + "wantTrailers": []; + } + interface Http2Stream extends stream.Duplex { + /** + * Set to `true` if the `Http2Stream` instance was aborted abnormally. When set, + * the `'aborted'` event will have been emitted. + * @since v8.4.0 + */ + readonly aborted: boolean; + /** + * This property shows the number of characters currently buffered to be written. + * See `net.Socket.bufferSize` for details. + * @since v11.2.0, v10.16.0 + */ + readonly bufferSize: number; + /** + * Set to `true` if the `Http2Stream` instance has been closed. + * @since v9.4.0 + */ + readonly closed: boolean; + /** + * Set to `true` if the `Http2Stream` instance has been destroyed and is no longer + * usable. + * @since v8.4.0 + */ + readonly destroyed: boolean; + /** + * Set to `true` if the `END_STREAM` flag was set in the request or response + * HEADERS frame received, indicating that no additional data should be received + * and the readable side of the `Http2Stream` will be closed. + * @since v10.11.0 + */ + readonly endAfterHeaders: boolean; + /** + * The numeric stream identifier of this `Http2Stream` instance. Set to `undefined` if the stream identifier has not yet been assigned. + * @since v8.4.0 + */ + readonly id?: number | undefined; + /** + * Set to `true` if the `Http2Stream` instance has not yet been assigned a + * numeric stream identifier. + * @since v9.4.0 + */ + readonly pending: boolean; + /** + * Set to the `RST_STREAM` `error code` reported when the `Http2Stream` is + * destroyed after either receiving an `RST_STREAM` frame from the connected peer, + * calling `http2stream.close()`, or `http2stream.destroy()`. Will be `undefined` if the `Http2Stream` has not been closed. + * @since v8.4.0 + */ + readonly rstCode: number; + /** + * An object containing the outbound headers sent for this `Http2Stream`. + * @since v9.5.0 + */ + readonly sentHeaders: OutgoingHttpHeaders; + /** + * An array of objects containing the outbound informational (additional) headers + * sent for this `Http2Stream`. + * @since v9.5.0 + */ + readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined; + /** + * An object containing the outbound trailers sent for this `HttpStream`. + * @since v9.5.0 + */ + readonly sentTrailers?: OutgoingHttpHeaders | undefined; + /** + * A reference to the `Http2Session` instance that owns this `Http2Stream`. The + * value will be `undefined` after the `Http2Stream` instance is destroyed. + * @since v8.4.0 + */ + readonly session: Http2Session | undefined; + /** + * Provides miscellaneous information about the current state of the `Http2Stream`. + * + * A current state of this `Http2Stream`. + * @since v8.4.0 + */ + readonly state: StreamState; + /** + * Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the + * connected HTTP/2 peer. + * @since v8.4.0 + * @param [code=http2.constants.NGHTTP2_NO_ERROR] Unsigned 32-bit integer identifying the error code. + * @param callback An optional function registered to listen for the `'close'` event. + */ + close(code?: number, callback?: () => void): void; + /** + * @deprecated Priority signaling is no longer supported in Node.js. + */ + priority(options: unknown): void; + /** + * ```js + * import http2 from 'node:http2'; + * const client = http2.connect('http://example.org:8000'); + * const { NGHTTP2_CANCEL } = http2.constants; + * const req = client.request({ ':path': '/' }); + * + * // Cancel the stream if there's no activity after 5 seconds + * req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL)); + * ``` + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method + * will cause the `Http2Stream` to be immediately closed and must only be + * called after the `'wantTrailers'` event has been emitted. When sending a + * request or sending a response, the `options.waitForTrailers` option must be set + * in order to keep the `Http2Stream` open after the final `DATA` frame so that + * trailers can be sent. + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond(undefined, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ xyz: 'abc' }); + * }); + * stream.end('Hello World'); + * }); + * ``` + * + * The HTTP/1 specification forbids trailers from containing HTTP/2 pseudo-header + * fields (e.g. `':method'`, `':path'`, etc). + * @since v10.0.0 + */ + sendTrailers(headers: OutgoingHttpHeaders): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: Http2StreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: Http2StreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: Http2StreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: Http2StreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface ClientHttp2StreamEventMap extends Http2StreamEventMap { + "continue": []; + "headers": [headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number, rawHeaders: string[]]; + "push": [headers: IncomingHttpHeaders, flags: number, rawHeaders: string[]]; + "response": [headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number, rawHeaders: string[]]; + } + interface ClientHttp2Stream extends Http2Stream { + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ClientHttp2StreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ClientHttp2StreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface ServerHttp2Stream extends Http2Stream { + /** + * True if headers were sent, false otherwise (read-only). + * @since v8.4.0 + */ + readonly headersSent: boolean; + /** + * Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote + * client's most recent `SETTINGS` frame. Will be `true` if the remote peer + * accepts push streams, `false` otherwise. Settings are the same for every `Http2Stream` in the same `Http2Session`. + * @since v8.4.0 + */ + readonly pushAllowed: boolean; + /** + * Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer. + * @since v8.4.0 + */ + additionalHeaders(headers: OutgoingHttpHeaders): void; + /** + * Initiates a push stream. The callback is invoked with the new `Http2Stream` instance created for the push stream passed as the second argument, or an `Error` passed as the first argument. + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }); + * stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => { + * if (err) throw err; + * pushStream.respond({ ':status': 200 }); + * pushStream.end('some pushed data'); + * }); + * stream.end('some data'); + * }); + * ``` + * + * Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass + * a `weight` value to `http2stream.priority` with the `silent` option set to `true` to enable server-side bandwidth balancing between concurrent streams. + * + * Calling `http2stream.pushStream()` from within a pushed stream is not permitted + * and will throw an error. + * @since v8.4.0 + * @param callback Callback that is called once the push stream has been initiated. + */ + pushStream( + headers: OutgoingHttpHeaders, + callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void, + ): void; + pushStream( + headers: OutgoingHttpHeaders, + options?: Pick, + callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void, + ): void; + /** + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }); + * stream.end('some data'); + * }); + * ``` + * + * Initiates a response. When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be sent. + * The `http2stream.sendTrailers()` method can then be used to send trailing header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either `http2stream.sendTrailers()` or `http2stream.close()` to close the `Http2Stream`. + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * stream.end('some data'); + * }); + * ``` + * @since v8.4.0 + */ + respond(headers?: OutgoingHttpHeaders | readonly string[], options?: ServerStreamResponseOptions): void; + /** + * Initiates a response whose data is read from the given file descriptor. No + * validation is performed on the given file descriptor. If an error occurs while + * attempting to read data using the file descriptor, the `Http2Stream` will be + * closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. + * + * When used, the `Http2Stream` object's `Duplex` interface will be closed + * automatically. + * + * ```js + * import http2 from 'node:http2'; + * import fs from 'node:fs'; + * + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * const fd = fs.openSync('/some/file', 'r'); + * + * const stat = fs.fstatSync(fd); + * const headers = { + * 'content-length': stat.size, + * 'last-modified': stat.mtime.toUTCString(), + * 'content-type': 'text/plain; charset=utf-8', + * }; + * stream.respondWithFD(fd, headers); + * stream.on('close', () => fs.closeSync(fd)); + * }); + * ``` + * + * The optional `options.statCheck` function may be specified to give user code + * an opportunity to set additional content headers based on the `fs.Stat` details + * of the given fd. If the `statCheck` function is provided, the `http2stream.respondWithFD()` method will + * perform an `fs.fstat()` call to collect details on the provided file descriptor. + * + * The `offset` and `length` options may be used to limit the response to a + * specific range subset. This can be used, for instance, to support HTTP Range + * requests. + * + * The file descriptor or `FileHandle` is not closed when the stream is closed, + * so it will need to be closed manually once it is no longer needed. + * Using the same file descriptor concurrently for multiple streams + * is not supported and may result in data loss. Re-using a file descriptor + * after a stream has finished is supported. + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to send trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code _must_ call either `http2stream.sendTrailers()` + * or `http2stream.close()` to close the `Http2Stream`. + * + * ```js + * import http2 from 'node:http2'; + * import fs from 'node:fs'; + * + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * const fd = fs.openSync('/some/file', 'r'); + * + * const stat = fs.fstatSync(fd); + * const headers = { + * 'content-length': stat.size, + * 'last-modified': stat.mtime.toUTCString(), + * 'content-type': 'text/plain; charset=utf-8', + * }; + * stream.respondWithFD(fd, headers, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * + * stream.on('close', () => fs.closeSync(fd)); + * }); + * ``` + * @since v8.4.0 + * @param fd A readable file descriptor. + */ + respondWithFD( + fd: number | fs.promises.FileHandle, + headers?: OutgoingHttpHeaders, + options?: ServerStreamFileResponseOptions, + ): void; + /** + * Sends a regular file as the response. The `path` must specify a regular file + * or an `'error'` event will be emitted on the `Http2Stream` object. + * + * When used, the `Http2Stream` object's `Duplex` interface will be closed + * automatically. + * + * The optional `options.statCheck` function may be specified to give user code + * an opportunity to set additional content headers based on the `fs.Stat` details + * of the given file: + * + * If an error occurs while attempting to read the file data, the `Http2Stream` will be closed using an + * `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. + * If the `onError` callback is defined, then it will be called. Otherwise, the stream will be destroyed. + * + * Example using a file path: + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * function statCheck(stat, headers) { + * headers['last-modified'] = stat.mtime.toUTCString(); + * } + * + * function onError(err) { + * // stream.respond() can throw if the stream has been destroyed by + * // the other side. + * try { + * if (err.code === 'ENOENT') { + * stream.respond({ ':status': 404 }); + * } else { + * stream.respond({ ':status': 500 }); + * } + * } catch (err) { + * // Perform actual error handling. + * console.error(err); + * } + * stream.end(); + * } + * + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { statCheck, onError }); + * }); + * ``` + * + * The `options.statCheck` function may also be used to cancel the send operation + * by returning `false`. For instance, a conditional request may check the stat + * results to determine if the file has been modified to return an appropriate `304` response: + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * function statCheck(stat, headers) { + * // Check the stat here... + * stream.respond({ ':status': 304 }); + * return false; // Cancel the send operation + * } + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { statCheck }); + * }); + * ``` + * + * The `content-length` header field will be automatically set. + * + * The `offset` and `length` options may be used to limit the response to a + * specific range subset. This can be used, for instance, to support HTTP Range + * requests. + * + * The `options.onError` function may also be used to handle all the errors + * that could happen before the delivery of the file is initiated. The + * default behavior is to destroy the stream. + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to send trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * }); + * ``` + * @since v8.4.0 + */ + respondWithFile( + path: string, + headers?: OutgoingHttpHeaders, + options?: ServerStreamFileResponseOptionsWithError, + ): void; + } + // Http2Session + interface Settings { + headerTableSize?: number | undefined; + enablePush?: boolean | undefined; + initialWindowSize?: number | undefined; + maxFrameSize?: number | undefined; + maxConcurrentStreams?: number | undefined; + maxHeaderListSize?: number | undefined; + enableConnectProtocol?: boolean | undefined; + customSettings?: { [key: number]: number }; + } + interface ClientSessionRequestOptions { + endStream?: boolean | undefined; + exclusive?: boolean | undefined; + parent?: number | undefined; + waitForTrailers?: boolean | undefined; + signal?: AbortSignal | undefined; + } + interface SessionState { + effectiveLocalWindowSize?: number | undefined; + effectiveRecvDataLength?: number | undefined; + nextStreamID?: number | undefined; + localWindowSize?: number | undefined; + lastProcStreamID?: number | undefined; + remoteWindowSize?: number | undefined; + outboundQueueSize?: number | undefined; + deflateDynamicTableSize?: number | undefined; + inflateDynamicTableSize?: number | undefined; + } + interface Http2SessionEventMap { + "close": []; + "connect": [session: Http2Session, socket: net.Socket | tls.TLSSocket]; + "error": [err: Error]; + "frameError": [type: number, code: number, id: number]; + "goaway": [errorCode: number, lastStreamID: number, opaqueData?: NonSharedBuffer]; + "localSettings": [settings: Settings]; + "ping": [payload: Buffer]; + "remoteSettings": [settings: Settings]; + "stream": [ + stream: Http2Stream, + headers: IncomingHttpHeaders & IncomingHttpStatusHeader, + flags: number, + rawHeaders: string[], + ]; + "timeout": []; + } + interface Http2Session extends InternalEventEmitter { + /** + * Value will be `undefined` if the `Http2Session` is not yet connected to a + * socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or + * will return the value of the connected `TLSSocket`'s own `alpnProtocol` property. + * @since v9.4.0 + */ + readonly alpnProtocol?: string | undefined; + /** + * Will be `true` if this `Http2Session` instance has been closed, otherwise `false`. + * @since v9.4.0 + */ + readonly closed: boolean; + /** + * Will be `true` if this `Http2Session` instance is still connecting, will be set + * to `false` before emitting `connect` event and/or calling the `http2.connect` callback. + * @since v10.0.0 + */ + readonly connecting: boolean; + /** + * Will be `true` if this `Http2Session` instance has been destroyed and must no + * longer be used, otherwise `false`. + * @since v8.4.0 + */ + readonly destroyed: boolean; + /** + * Value is `undefined` if the `Http2Session` session socket has not yet been + * connected, `true` if the `Http2Session` is connected with a `TLSSocket`, + * and `false` if the `Http2Session` is connected to any other kind of socket + * or stream. + * @since v9.4.0 + */ + readonly encrypted?: boolean | undefined; + /** + * A prototype-less object describing the current local settings of this `Http2Session`. + * The local settings are local to _this_`Http2Session` instance. + * @since v8.4.0 + */ + readonly localSettings: Settings; + /** + * If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property + * will return an `Array` of origins for which the `Http2Session` may be + * considered authoritative. + * + * The `originSet` property is only available when using a secure TLS connection. + * @since v9.4.0 + */ + readonly originSet?: string[] | undefined; + /** + * Indicates whether the `Http2Session` is currently waiting for acknowledgment of + * a sent `SETTINGS` frame. Will be `true` after calling the `http2session.settings()` method. + * Will be `false` once all sent `SETTINGS` frames have been acknowledged. + * @since v8.4.0 + */ + readonly pendingSettingsAck: boolean; + /** + * A prototype-less object describing the current remote settings of this`Http2Session`. + * The remote settings are set by the _connected_ HTTP/2 peer. + * @since v8.4.0 + */ + readonly remoteSettings: Settings; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * limits available methods to ones safe to use with HTTP/2. + * + * `emit`, `end`, `pause`, `read`, `resume`, and `write` will throw + * an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for more information. + * + * `destroy`, `setTimeout`, `ref`, and `unref` methods will be called on this + * `Http2Session`. + * + * All other interactions will be routed directly to the socket. + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * Provides miscellaneous information about the current state of the`Http2Session`. + * + * An object describing the current status of this `Http2Session`. + * @since v8.4.0 + */ + readonly state: SessionState; + /** + * The `http2session.type` will be equal to `http2.constants.NGHTTP2_SESSION_SERVER` if this `Http2Session` instance is a + * server, and `http2.constants.NGHTTP2_SESSION_CLIENT` if the instance is a + * client. + * @since v8.4.0 + */ + readonly type: number; + /** + * Gracefully closes the `Http2Session`, allowing any existing streams to + * complete on their own and preventing new `Http2Stream` instances from being + * created. Once closed, `http2session.destroy()`_might_ be called if there + * are no open `Http2Stream` instances. + * + * If specified, the `callback` function is registered as a handler for the`'close'` event. + * @since v9.4.0 + */ + close(callback?: () => void): void; + /** + * Immediately terminates the `Http2Session` and the associated `net.Socket` or `tls.TLSSocket`. + * + * Once destroyed, the `Http2Session` will emit the `'close'` event. If `error` is not undefined, an `'error'` event will be emitted immediately before the `'close'` event. + * + * If there are any remaining open `Http2Streams` associated with the `Http2Session`, those will also be destroyed. + * @since v8.4.0 + * @param error An `Error` object if the `Http2Session` is being destroyed due to an error. + * @param code The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL_ERROR`, otherwise defaults to `NO_ERROR`. + */ + destroy(error?: Error, code?: number): void; + /** + * Transmits a `GOAWAY` frame to the connected peer _without_ shutting down the`Http2Session`. + * @since v9.4.0 + * @param code An HTTP/2 error code + * @param lastStreamID The numeric ID of the last processed `Http2Stream` + * @param opaqueData A `TypedArray` or `DataView` instance containing additional data to be carried within the `GOAWAY` frame. + */ + goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void; + /** + * Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must + * be provided. The method will return `true` if the `PING` was sent, `false` otherwise. + * + * The maximum number of outstanding (unacknowledged) pings is determined by the `maxOutstandingPings` configuration option. The default maximum is 10. + * + * If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView` containing 8 bytes of data that will be transmitted with the `PING` and + * returned with the ping acknowledgment. + * + * The callback will be invoked with three arguments: an error argument that will + * be `null` if the `PING` was successfully acknowledged, a `duration` argument + * that reports the number of milliseconds elapsed since the ping was sent and the + * acknowledgment was received, and a `Buffer` containing the 8-byte `PING` payload. + * + * ```js + * session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => { + * if (!err) { + * console.log(`Ping acknowledged in ${duration} milliseconds`); + * console.log(`With payload '${payload.toString()}'`); + * } + * }); + * ``` + * + * If the `payload` argument is not specified, the default payload will be the + * 64-bit timestamp (little endian) marking the start of the `PING` duration. + * @since v8.9.3 + * @param payload Optional ping payload. + */ + ping(callback: (err: Error | null, duration: number, payload: NonSharedBuffer) => void): boolean; + ping( + payload: NodeJS.ArrayBufferView, + callback: (err: Error | null, duration: number, payload: NonSharedBuffer) => void, + ): boolean; + /** + * Calls `ref()` on this `Http2Session` instance's underlying `net.Socket`. + * @since v9.4.0 + */ + ref(): void; + /** + * Sets the local endpoint's window size. + * The `windowSize` is the total window size to set, not + * the delta. + * + * ```js + * import http2 from 'node:http2'; + * + * const server = http2.createServer(); + * const expectedWindowSize = 2 ** 20; + * server.on('connect', (session) => { + * + * // Set local window size to be 2 ** 20 + * session.setLocalWindowSize(expectedWindowSize); + * }); + * ``` + * @since v15.3.0, v14.18.0 + */ + setLocalWindowSize(windowSize: number): void; + /** + * Used to set a callback function that is called when there is no activity on + * the `Http2Session` after `msecs` milliseconds. The given `callback` is + * registered as a listener on the `'timeout'` event. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * Updates the current local settings for this `Http2Session` and sends a new `SETTINGS` frame to the connected HTTP/2 peer. + * + * Once called, the `http2session.pendingSettingsAck` property will be `true` while the session is waiting for the remote peer to acknowledge the new + * settings. + * + * The new settings will not become effective until the `SETTINGS` acknowledgment + * is received and the `'localSettings'` event is emitted. It is possible to send + * multiple `SETTINGS` frames while acknowledgment is still pending. + * @since v8.4.0 + * @param callback Callback that is called once the session is connected or right away if the session is already connected. + */ + settings( + settings: Settings, + callback?: (err: Error | null, settings: Settings, duration: number) => void, + ): void; + /** + * Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`. + * @since v9.4.0 + */ + unref(): void; + } + interface ClientHttp2SessionEventMap extends Http2SessionEventMap { + "altsvc": [alt: string, origin: string, streamId: number]; + "connect": [session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket]; + "origin": [origins: string[]]; + "stream": [ + stream: ClientHttp2Stream, + headers: IncomingHttpHeaders & IncomingHttpStatusHeader, + flags: number, + rawHeaders: string[], + ]; + } + interface ClientHttp2Session extends Http2Session { + /** + * For HTTP/2 Client `Http2Session` instances only, the `http2session.request()` creates and returns an `Http2Stream` instance that can be used to send an + * HTTP/2 request to the connected server. + * + * When a `ClientHttp2Session` is first created, the socket may not yet be + * connected. If `clienthttp2session.request()` is called during this time, the + * actual request will be deferred until the socket is ready to go. + * + * If the session becomes unavailable before the request can be created, the + * returned stream will emit `ERR_HTTP2_GOAWAY_SESSION` or + * `ERR_HTTP2_INVALID_SESSION` asynchronously. + * + * This method is only available if `http2session.type` is equal to `http2.constants.NGHTTP2_SESSION_CLIENT`. + * + * ```js + * import http2 from 'node:http2'; + * const clientSession = http2.connect('https://localhost:1234'); + * const { + * HTTP2_HEADER_PATH, + * HTTP2_HEADER_STATUS, + * } = http2.constants; + * + * const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' }); + * req.on('response', (headers) => { + * console.log(headers[HTTP2_HEADER_STATUS]); + * req.on('data', (chunk) => { // .. }); + * req.on('end', () => { // .. }); + * }); + * ``` + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * is emitted immediately after queuing the last chunk of payload data to be sent. + * The `http2stream.sendTrailers()` method can then be called to send trailing + * headers to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * When `options.signal` is set with an `AbortSignal` and then `abort` on the + * corresponding `AbortController` is called, the request will emit an `'error'`event with an `AbortError` error. + * + * The `:method` and `:path` pseudo-headers are not specified within `headers`, + * they respectively default to: + * + * * `:method` \= `'GET'` + * * `:path` \= `/` + * @since v8.4.0 + */ + request( + headers?: OutgoingHttpHeaders | readonly string[], + options?: ClientSessionRequestOptions, + ): ClientHttp2Stream; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ClientHttp2StreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ClientHttp2StreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface AlternativeServiceOptions { + origin: number | string | url.URL; + } + interface ServerHttp2SessionEventMap< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends Http2SessionEventMap { + "connect": [ + session: ServerHttp2Session, + socket: net.Socket | tls.TLSSocket, + ]; + "stream": [stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number, rawHeaders: string[]]; + } + interface ServerHttp2Session< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends Http2Session { + readonly server: + | Http2Server + | Http2SecureServer; + /** + * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client. + * + * ```js + * import http2 from 'node:http2'; + * + * const server = http2.createServer(); + * server.on('session', (session) => { + * // Set altsvc for origin https://example.org:80 + * session.altsvc('h2=":8000"', 'https://example.org:80'); + * }); + * + * server.on('stream', (stream) => { + * // Set altsvc for a specific stream + * stream.session.altsvc('h2=":8000"', stream.id); + * }); + * ``` + * + * Sending an `ALTSVC` frame with a specific stream ID indicates that the alternate + * service is associated with the origin of the given `Http2Stream`. + * + * The `alt` and origin string _must_ contain only ASCII bytes and are + * strictly interpreted as a sequence of ASCII bytes. The special value `'clear'`may be passed to clear any previously set alternative service for a given + * domain. + * + * When a string is passed for the `originOrStream` argument, it will be parsed as + * a URL and the origin will be derived. For instance, the origin for the + * HTTP URL `'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given string + * cannot be parsed as a URL or if a valid origin cannot be derived. + * + * A `URL` object, or any object with an `origin` property, may be passed as`originOrStream`, in which case the value of the `origin` property will be + * used. The value of the `origin` property _must_ be a properly serialized + * ASCII origin. + * @since v9.4.0 + * @param alt A description of the alternative service configuration as defined by `RFC 7838`. + * @param originOrStream Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the + * `http2stream.id` property. + */ + altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; + /** + * Submits an `ORIGIN` frame (as defined by [RFC 8336](https://tools.ietf.org/html/rfc8336)) to the connected client + * to advertise the set of origins for which the server is capable of providing + * authoritative responses. + * + * ```js + * import http2 from 'node:http2'; + * const options = getSecureOptionsSomehow(); + * const server = http2.createSecureServer(options); + * server.on('stream', (stream) => { + * stream.respond(); + * stream.end('ok'); + * }); + * server.on('session', (session) => { + * session.origin('https://example.com', 'https://example.org'); + * }); + * ``` + * + * When a string is passed as an `origin`, it will be parsed as a URL and the + * origin will be derived. For instance, the origin for the HTTP URL `'https://example.org/foo/bar'` is the ASCII string` 'https://example.org'`. An error will be thrown if either the given + * string + * cannot be parsed as a URL or if a valid origin cannot be derived. + * + * A `URL` object, or any object with an `origin` property, may be passed as + * an `origin`, in which case the value of the `origin` property will be + * used. The value of the `origin` property _must_ be a properly serialized + * ASCII origin. + * + * Alternatively, the `origins` option may be used when creating a new HTTP/2 + * server using the `http2.createSecureServer()` method: + * + * ```js + * import http2 from 'node:http2'; + * const options = getSecureOptionsSomehow(); + * options.origins = ['https://example.com', 'https://example.org']; + * const server = http2.createSecureServer(options); + * server.on('stream', (stream) => { + * stream.respond(); + * stream.end('ok'); + * }); + * ``` + * @since v10.12.0 + * @param origins One or more URL Strings passed as separate arguments. + */ + origin( + ...origins: Array< + | string + | url.URL + | { + origin: string; + } + > + ): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit( + eventName: E, + ...args: ServerHttp2SessionEventMap[E] + ): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): (( + ...args: ServerHttp2SessionEventMap[E] + ) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): (( + ...args: ServerHttp2SessionEventMap[E] + ) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + // Http2Server + interface SessionOptions { + /** + * Sets the maximum dynamic table size for deflating header fields. + * @default 4Kib + */ + maxDeflateDynamicTableSize?: number | undefined; + /** + * Sets the maximum number of settings entries per `SETTINGS` frame. + * The minimum value allowed is `1`. + * @default 32 + */ + maxSettings?: number | undefined; + /** + * Sets the maximum memory that the `Http2Session` is permitted to use. + * The value is expressed in terms of number of megabytes, e.g. `1` equal 1 megabyte. + * The minimum value allowed is `1`. + * This is a credit based limit, existing `Http2Stream`s may cause this limit to be exceeded, + * but new `Http2Stream` instances will be rejected while this limit is exceeded. + * The current number of `Http2Stream` sessions, the current memory use of the header compression tables, + * current data queued to be sent, and unacknowledged `PING` and `SETTINGS` frames are all counted towards the current limit. + * @default 10 + */ + maxSessionMemory?: number | undefined; + /** + * Sets the maximum number of header entries. + * This is similar to `server.maxHeadersCount` or `request.maxHeadersCount` in the `node:http` module. + * The minimum value is `1`. + * @default 128 + */ + maxHeaderListPairs?: number | undefined; + /** + * Sets the maximum number of uniq origin the sever + * can send via ORIGIN frames. **Default:** `128`. + */ + maxOriginSetSize?: number | undefined; + /** + * Sets the maximum number of outstanding, unacknowledged pings. + * @default 10 + */ + maxOutstandingPings?: number | undefined; + /** + * Sets the maximum allowed size for a serialized, compressed block of headers. + * Attempts to send headers that exceed this limit will result in + * a `'frameError'` event being emitted and the stream being closed and destroyed. + */ + maxSendHeaderBlockLength?: number | undefined; + /** + * Strategy used for determining the amount of padding to use for `HEADERS` and `DATA` frames. + * @default http2.constants.PADDING_STRATEGY_NONE + */ + paddingStrategy?: number | undefined; + /** + * Sets the maximum number of concurrent streams for the remote peer as if a `SETTINGS` frame had been received. + * Will be overridden if the remote peer sets its own value for `maxConcurrentStreams`. + * @default 100 + */ + peerMaxConcurrentStreams?: number | undefined; + /** + * The initial settings to send to the remote peer upon connection. + */ + settings?: Settings | undefined; + /** + * The array of integer values determines the settings types, + * which are included in the `CustomSettings`-property of the received remoteSettings. + * Please see the `CustomSettings`-property of the `Http2Settings` object for more information, on the allowed setting types. + */ + remoteCustomSettings?: number[] | undefined; + /** + * Specifies a timeout in milliseconds that + * a server should wait when an [`'unknownProtocol'`][] is emitted. If the + * socket has not been destroyed by that time the server will destroy it. + * @default 100000 + */ + unknownProtocolTimeout?: number | undefined; + /** + * If `true`, it turns on strict leading + * and trailing whitespace validation for HTTP/2 header field names and values + * as per [RFC-9113](https://www.rfc-editor.org/rfc/rfc9113.html#section-8.2.1). + * @since v24.2.0 + * @default true + */ + strictFieldWhitespaceValidation?: boolean | undefined; + } + interface ClientSessionOptions extends SessionOptions { + /** + * Sets the maximum number of reserved push streams the client will accept at any given time. + * Once the current number of currently reserved push streams exceeds reaches this limit, + * new push streams sent by the server will be automatically rejected. + * The minimum allowed value is 0. The maximum allowed value is 232-1. + * A negative value sets this option to the maximum allowed value. + * @default 200 + */ + maxReservedRemoteStreams?: number | undefined; + /** + * An optional callback that receives the `URL` instance passed to `connect` and the `options` object, + * and returns any `Duplex` stream that is to be used as the connection for this session. + */ + createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined; + /** + * The protocol to connect with, if not set in the `authority`. + * Value may be either `'http:'` or `'https:'`. + * @default 'https:' + */ + protocol?: "http:" | "https:" | undefined; + } + interface ServerSessionOptions< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends SessionOptions { + maxSessionRejectedStreams?: number | undefined; + maxSessionInvalidFrames?: number | undefined; + streamResetBurst?: number | undefined; + streamResetRate?: number | undefined; + /** @deprecated Use `http1Options.IncomingMessage` instead. */ + Http1IncomingMessage?: Http1Request | undefined; + /** @deprecated Use `http1Options.ServerResponse` instead. */ + Http1ServerResponse?: Http1Response | undefined; + http1Options?: Http1Options | undefined; + Http2ServerRequest?: Http2Request | undefined; + Http2ServerResponse?: Http2Response | undefined; + strictSingleValueFields?: boolean | undefined; + } + interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {} + interface SecureServerSessionOptions< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends ServerSessionOptions, tls.TlsOptions {} + interface ServerOptions< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends ServerSessionOptions {} + interface SecureServerOptions< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends SecureServerSessionOptions { + allowHTTP1?: boolean | undefined; + origins?: string[] | undefined; + } + interface Http1Options< + Request extends typeof IncomingMessage, + Response extends typeof ServerResponse>, + > { + IncomingMessage?: Request | undefined; + ServerResponse?: Response | undefined; + keepAliveTimeout?: number | undefined; + } + interface Http2ServerCommon { + setTimeout(msec?: number, callback?: () => void): this; + /** + * Throws ERR_HTTP2_INVALID_SETTING_VALUE for invalid settings values. + * Throws ERR_INVALID_ARG_TYPE for invalid settings argument. + */ + updateSettings(settings: Settings): void; + } + interface Http2ServerEventMap< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends net.ServerEventMap, Pick { + "checkContinue": [request: InstanceType, response: InstanceType]; + "request": [request: InstanceType, response: InstanceType]; + "session": [session: ServerHttp2Session]; + "sessionError": [ + err: Error, + session: ServerHttp2Session, + ]; + } + interface Http2Server< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends net.Server, Http2ServerCommon { + // #region InternalEventEmitter + addListener( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit( + eventName: E, + ...args: Http2ServerEventMap[E] + ): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: Http2ServerEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: Http2ServerEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface Http2SecureServerEventMap< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends tls.ServerEventMap, Http2ServerEventMap { + "unknownProtocol": [socket: tls.TLSSocket]; + } + interface Http2SecureServer< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends tls.Server, Http2ServerCommon { + // #region InternalEventEmitter + addListener( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit( + eventName: E, + ...args: Http2SecureServerEventMap[E] + ): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): (( + ...args: Http2SecureServerEventMap[E] + ) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): (( + ...args: Http2SecureServerEventMap[E] + ) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface Http2ServerRequestEventMap extends stream.ReadableEventMap { + "aborted": [hadError: boolean, code: number]; + "data": [chunk: string | NonSharedBuffer]; + } + /** + * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status, + * headers, and + * data. + * @since v8.4.0 + */ + class Http2ServerRequest extends stream.Readable { + constructor( + stream: ServerHttp2Stream, + headers: IncomingHttpHeaders, + options: stream.ReadableOptions, + rawHeaders: readonly string[], + ); + /** + * The `request.aborted` property will be `true` if the request has + * been aborted. + * @since v10.1.0 + */ + readonly aborted: boolean; + /** + * The request authority pseudo header field. Because HTTP/2 allows requests + * to set either `:authority` or `host`, this value is derived from `req.headers[':authority']` if present. Otherwise, it is derived from `req.headers['host']`. + * @since v8.4.0 + */ + readonly authority: string; + /** + * See `request.socket`. + * @since v8.4.0 + * @deprecated Since v13.0.0 - Use `socket`. + */ + readonly connection: net.Socket | tls.TLSSocket; + /** + * The `request.complete` property will be `true` if the request has + * been completed, aborted, or destroyed. + * @since v12.10.0 + */ + readonly complete: boolean; + /** + * The request/response headers object. + * + * Key-value pairs of header names and values. Header names are lower-cased. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': 'curl/7.22.0', + * // host: '127.0.0.1:8000', + * // accept: '*' } + * console.log(request.headers); + * ``` + * + * See `HTTP/2 Headers Object`. + * + * In HTTP/2, the request path, host name, protocol, and method are represented as + * special headers prefixed with the `:` character (e.g. `':path'`). These special + * headers will be included in the `request.headers` object. Care must be taken not + * to inadvertently modify these special headers or errors may occur. For instance, + * removing all headers from the request will cause errors to occur: + * + * ```js + * removeAllHeaders(request.headers); + * assert(request.url); // Fails because the :path header has been removed + * ``` + * @since v8.4.0 + */ + readonly headers: IncomingHttpHeaders; + /** + * In case of server request, the HTTP version sent by the client. In the case of + * client response, the HTTP version of the connected-to server. Returns `'2.0'`. + * + * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second. + * @since v8.4.0 + */ + readonly httpVersion: string; + readonly httpVersionMinor: number; + readonly httpVersionMajor: number; + /** + * The request method as a string. Read-only. Examples: `'GET'`, `'DELETE'`. + * @since v8.4.0 + */ + readonly method: string; + /** + * The raw request/response headers list exactly as they were received. + * + * The keys and values are in the same list. It is _not_ a + * list of tuples. So, the even-numbered offsets are key values, and the + * odd-numbered offsets are the associated values. + * + * Header names are not lowercased, and duplicates are not merged. + * + * ```js + * // Prints something like: + * // + * // [ 'user-agent', + * // 'this is invalid because there can be only one', + * // 'User-Agent', + * // 'curl/7.22.0', + * // 'Host', + * // '127.0.0.1:8000', + * // 'ACCEPT', + * // '*' ] + * console.log(request.rawHeaders); + * ``` + * @since v8.4.0 + */ + readonly rawHeaders: string[]; + /** + * The raw request/response trailer keys and values exactly as they were + * received. Only populated at the `'end'` event. + * @since v8.4.0 + */ + readonly rawTrailers: string[]; + /** + * The request scheme pseudo header field indicating the scheme + * portion of the target URL. + * @since v8.4.0 + */ + readonly scheme: string; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * applies getters, setters, and methods based on HTTP/2 logic. + * + * `destroyed`, `readable`, and `writable` properties will be retrieved from and + * set on `request.stream`. + * + * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `request.stream`. + * + * `setTimeout` method will be called on `request.stream.session`. + * + * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for + * more information. + * + * All other interactions will be routed directly to the socket. With TLS support, + * use `request.socket.getPeerCertificate()` to obtain the client's + * authentication details. + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * The `Http2Stream` object backing the request. + * @since v8.4.0 + */ + readonly stream: ServerHttp2Stream; + /** + * The request/response trailers object. Only populated at the `'end'` event. + * @since v8.4.0 + */ + readonly trailers: IncomingHttpHeaders; + /** + * Request URL string. This contains only the URL that is present in the actual + * HTTP request. If the request is: + * + * ```http + * GET /status?name=ryan HTTP/1.1 + * Accept: text/plain + * ``` + * + * Then `request.url` will be: + * + * ```json + * "/status?name=ryan" + * ``` + * + * To parse the url into its parts, `new URL()` can be used: + * + * ```console + * $ node + * > new URL('/status?name=ryan', 'http://example.com') + * URL { + * href: 'http://example.com/status?name=ryan', + * origin: 'http://example.com', + * protocol: 'http:', + * username: '', + * password: '', + * host: 'example.com', + * hostname: 'example.com', + * port: '', + * pathname: '/status', + * search: '?name=ryan', + * searchParams: URLSearchParams { 'name' => 'ryan' }, + * hash: '' + * } + * ``` + * @since v8.4.0 + */ + url: string; + /** + * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is + * provided, then it is added as a listener on the `'timeout'` event on + * the response object. + * + * If no `'timeout'` listener is added to the request, the response, or + * the server, then `Http2Stream`s are destroyed when they time out. If a + * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + read(size?: number): Buffer | string | null; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: Http2ServerRequestEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: Http2ServerRequestEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: Http2ServerRequestEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: Http2ServerRequestEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + /** + * This object is created internally by an HTTP server, not by the user. It is + * passed as the second parameter to the `'request'` event. + * @since v8.4.0 + */ + class Http2ServerResponse extends stream.Writable { + constructor(stream: ServerHttp2Stream); + /** + * See `response.socket`. + * @since v8.4.0 + * @deprecated Since v13.0.0 - Use `socket`. + */ + readonly connection: net.Socket | tls.TLSSocket; + /** + * Append a single header value to the header object. + * + * If the value is an array, this is equivalent to calling this method multiple times. + * + * If there were no previous values for the header, this is equivalent to calling {@link setHeader}. + * + * Attempting to set a header field name or value that contains invalid characters will result in a + * [TypeError](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-typeerror) being thrown. + * + * ```js + * // Returns headers including "set-cookie: a" and "set-cookie: b" + * const server = http2.createServer((req, res) => { + * res.setHeader('set-cookie', 'a'); + * res.appendHeader('set-cookie', 'b'); + * res.writeHead(200); + * res.end('ok'); + * }); + * ``` + * @since v20.12.0 + */ + appendHeader(name: string, value: string | string[]): void; + /** + * Boolean value that indicates whether the response has completed. Starts + * as `false`. After `response.end()` executes, the value will be `true`. + * @since v8.4.0 + * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`. + */ + readonly finished: boolean; + /** + * True if headers were sent, false otherwise (read-only). + * @since v8.4.0 + */ + readonly headersSent: boolean; + /** + * A reference to the original HTTP2 `request` object. + * @since v15.7.0 + */ + readonly req: Request; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * applies getters, setters, and methods based on HTTP/2 logic. + * + * `destroyed`, `readable`, and `writable` properties will be retrieved from and + * set on `response.stream`. + * + * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `response.stream`. + * + * `setTimeout` method will be called on `response.stream.session`. + * + * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for + * more information. + * + * All other interactions will be routed directly to the socket. + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer((req, res) => { + * const ip = req.socket.remoteAddress; + * const port = req.socket.remotePort; + * res.end(`Your IP address is ${ip} and your source port is ${port}.`); + * }).listen(3000); + * ``` + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * The `Http2Stream` object backing the response. + * @since v8.4.0 + */ + readonly stream: ServerHttp2Stream; + /** + * When true, the Date header will be automatically generated and sent in + * the response if it is not already present in the headers. Defaults to true. + * + * This should only be disabled for testing; HTTP requires the Date header + * in responses. + * @since v8.4.0 + */ + sendDate: boolean; + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status code that will be sent to the client when + * the headers get flushed. + * + * ```js + * response.statusCode = 404; + * ``` + * + * After response header was sent to the client, this property indicates the + * status code which was sent out. + * @since v8.4.0 + */ + statusCode: number; + /** + * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns + * an empty string. + * @since v8.4.0 + */ + statusMessage: ""; + /** + * This method adds HTTP trailing headers (a header but at the end of the + * message) to the response. + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v8.4.0 + */ + addTrailers(trailers: OutgoingHttpHeaders): void; + /** + * This method signals to the server that all of the response headers and body + * have been sent; that server should consider this message complete. + * The method, `response.end()`, MUST be called on each response. + * + * If `data` is specified, it is equivalent to calling `response.write(data, encoding)` followed by `response.end(callback)`. + * + * If `callback` is specified, it will be called when the response stream + * is finished. + * @since v8.4.0 + */ + end(callback?: () => void): this; + end(data: string | Uint8Array, callback?: () => void): this; + end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this; + /** + * Reads out a header that has already been queued but not sent to the client. + * The name is case-insensitive. + * + * ```js + * const contentType = response.getHeader('content-type'); + * ``` + * @since v8.4.0 + */ + getHeader(name: string): string; + /** + * Returns an array containing the unique names of the current outgoing headers. + * All header names are lowercase. + * + * ```js + * response.setHeader('Foo', 'bar'); + * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headerNames = response.getHeaderNames(); + * // headerNames === ['foo', 'set-cookie'] + * ``` + * @since v8.4.0 + */ + getHeaderNames(): string[]; + /** + * Returns a shallow copy of the current outgoing headers. Since a shallow copy + * is used, array values may be mutated without additional calls to various + * header-related http module methods. The keys of the returned object are the + * header names and the values are the respective header values. All header names + * are lowercase. + * + * The object returned by the `response.getHeaders()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`, + * `obj.hasOwnProperty()`, and others + * are not defined and _will not work_. + * + * ```js + * response.setHeader('Foo', 'bar'); + * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headers = response.getHeaders(); + * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } + * ``` + * @since v8.4.0 + */ + getHeaders(): OutgoingHttpHeaders; + /** + * Returns `true` if the header identified by `name` is currently set in the + * outgoing headers. The header name matching is case-insensitive. + * + * ```js + * const hasContentType = response.hasHeader('content-type'); + * ``` + * @since v8.4.0 + */ + hasHeader(name: string): boolean; + /** + * Removes a header that has been queued for implicit sending. + * + * ```js + * response.removeHeader('Content-Encoding'); + * ``` + * @since v8.4.0 + */ + removeHeader(name: string): void; + /** + * Sets a single header value for implicit headers. If this header already exists + * in the to-be-sent headers, its value will be replaced. Use an array of strings + * here to send multiple headers with the same name. + * + * ```js + * response.setHeader('Content-Type', 'text/html; charset=utf-8'); + * ``` + * + * or + * + * ```js + * response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http2.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html; charset=utf-8'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); + * res.end('ok'); + * }); + * ``` + * @since v8.4.0 + */ + setHeader(name: string, value: number | string | readonly string[]): void; + /** + * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is + * provided, then it is added as a listener on the `'timeout'` event on + * the response object. + * + * If no `'timeout'` listener is added to the request, the response, or + * the server, then `Http2Stream` s are destroyed when they time out. If a + * handler is assigned to the request, the response, or the server's `'timeout'` events, timed out sockets must be handled explicitly. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * If this method is called and `response.writeHead()` has not been called, + * it will switch to implicit header mode and flush the implicit headers. + * + * This sends a chunk of the response body. This method may + * be called multiple times to provide successive parts of the body. + * + * In the `node:http` module, the response body is omitted when the + * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body. + * + * `chunk` can be a string or a buffer. If `chunk` is a string, + * the second parameter specifies how to encode it into a byte stream. + * By default the `encoding` is `'utf8'`. `callback` will be called when this chunk + * of data is flushed. + * + * This is the raw HTTP body and has nothing to do with higher-level multi-part + * body encodings that may be used. + * + * The first time `response.write()` is called, it will send the buffered + * header information and the first chunk of the body to the client. The second + * time `response.write()` is called, Node.js assumes data will be streamed, + * and sends the new data separately. That is, the response is buffered up to the + * first chunk of the body. + * + * Returns `true` if the entire data was flushed successfully to the kernel + * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is free again. + * @since v8.4.0 + */ + write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean; + write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean; + /** + * Sends a status `100 Continue` to the client, indicating that the request body + * should be sent. See the `'checkContinue'` event on `Http2Server` and `Http2SecureServer`. + * @since v8.4.0 + */ + writeContinue(): void; + /** + * Sends a status `103 Early Hints` to the client with a Link header, + * indicating that the user agent can preload/preconnect the linked resources. + * The `hints` is an object containing the values of headers to be sent with + * early hints message. + * + * **Example** + * + * ```js + * const earlyHintsLink = '; rel=preload; as=style'; + * response.writeEarlyHints({ + * 'link': earlyHintsLink, + * }); + * + * const earlyHintsLinks = [ + * '; rel=preload; as=style', + * '; rel=preload; as=script', + * ]; + * response.writeEarlyHints({ + * 'link': earlyHintsLinks, + * }); + * ``` + * @since v18.11.0 + */ + writeEarlyHints(hints: Record): void; + /** + * Sends a response header to the request. The status code is a 3-digit HTTP + * status code, like `404`. The last argument, `headers`, are the response headers. + * + * Returns a reference to the `Http2ServerResponse`, so that calls can be chained. + * + * For compatibility with `HTTP/1`, a human-readable `statusMessage` may be + * passed as the second argument. However, because the `statusMessage` has no + * meaning within HTTP/2, the argument will have no effect and a process warning + * will be emitted. + * + * ```js + * const body = 'hello world'; + * response.writeHead(200, { + * 'Content-Length': Buffer.byteLength(body), + * 'Content-Type': 'text/plain; charset=utf-8', + * }); + * ``` + * + * `Content-Length` is given in bytes not characters. The`Buffer.byteLength()` API may be used to determine the number of bytes in a + * given encoding. On outbound messages, Node.js does not check if Content-Length + * and the length of the body being transmitted are equal or not. However, when + * receiving messages, Node.js will automatically reject messages when the `Content-Length` does not match the actual payload size. + * + * This method may be called at most one time on a message before `response.end()` is called. + * + * If `response.write()` or `response.end()` are called before calling + * this, the implicit/mutable headers will be calculated and call this function. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http2.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html; charset=utf-8'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); + * res.end('ok'); + * }); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v8.4.0 + */ + writeHead(statusCode: number, headers?: OutgoingHttpHeaders | readonly string[]): this; + writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders | readonly string[]): this; + /** + * Call `http2stream.pushStream()` with the given headers, and wrap the + * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback + * parameter if successful. When `Http2ServerRequest` is closed, the callback is + * called with an error `ERR_HTTP2_INVALID_STREAM`. + * @since v8.4.0 + * @param headers An object describing the headers + * @param callback Called once `http2stream.pushStream()` is finished, or either when the attempt to create the pushed `Http2Stream` has failed or has been rejected, or the state of + * `Http2ServerRequest` is closed prior to calling the `http2stream.pushStream()` method + */ + createPushResponse( + headers: OutgoingHttpHeaders, + callback: (err: Error | null, res: Http2ServerResponse) => void, + ): void; + } + namespace constants { + const NGHTTP2_SESSION_SERVER: number; + const NGHTTP2_SESSION_CLIENT: number; + const NGHTTP2_STREAM_STATE_IDLE: number; + const NGHTTP2_STREAM_STATE_OPEN: number; + const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number; + const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number; + const NGHTTP2_STREAM_STATE_CLOSED: number; + const NGHTTP2_NO_ERROR: number; + const NGHTTP2_PROTOCOL_ERROR: number; + const NGHTTP2_INTERNAL_ERROR: number; + const NGHTTP2_FLOW_CONTROL_ERROR: number; + const NGHTTP2_SETTINGS_TIMEOUT: number; + const NGHTTP2_STREAM_CLOSED: number; + const NGHTTP2_FRAME_SIZE_ERROR: number; + const NGHTTP2_REFUSED_STREAM: number; + const NGHTTP2_CANCEL: number; + const NGHTTP2_COMPRESSION_ERROR: number; + const NGHTTP2_CONNECT_ERROR: number; + const NGHTTP2_ENHANCE_YOUR_CALM: number; + const NGHTTP2_INADEQUATE_SECURITY: number; + const NGHTTP2_HTTP_1_1_REQUIRED: number; + const NGHTTP2_ERR_FRAME_SIZE_ERROR: number; + const NGHTTP2_FLAG_NONE: number; + const NGHTTP2_FLAG_END_STREAM: number; + const NGHTTP2_FLAG_END_HEADERS: number; + const NGHTTP2_FLAG_ACK: number; + const NGHTTP2_FLAG_PADDED: number; + const NGHTTP2_FLAG_PRIORITY: number; + const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number; + const DEFAULT_SETTINGS_ENABLE_PUSH: number; + const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number; + const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number; + const MAX_MAX_FRAME_SIZE: number; + const MIN_MAX_FRAME_SIZE: number; + const MAX_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_DEFAULT_WEIGHT: number; + const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number; + const NGHTTP2_SETTINGS_ENABLE_PUSH: number; + const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number; + const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number; + const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number; + const PADDING_STRATEGY_NONE: number; + const PADDING_STRATEGY_MAX: number; + const PADDING_STRATEGY_CALLBACK: number; + const HTTP2_HEADER_STATUS: string; + const HTTP2_HEADER_METHOD: string; + const HTTP2_HEADER_AUTHORITY: string; + const HTTP2_HEADER_SCHEME: string; + const HTTP2_HEADER_PATH: string; + const HTTP2_HEADER_ACCEPT_CHARSET: string; + const HTTP2_HEADER_ACCEPT_ENCODING: string; + const HTTP2_HEADER_ACCEPT_LANGUAGE: string; + const HTTP2_HEADER_ACCEPT_RANGES: string; + const HTTP2_HEADER_ACCEPT: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERS: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODS: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string; + const HTTP2_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS: string; + const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_HEADERS: string; + const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_METHOD: string; + const HTTP2_HEADER_AGE: string; + const HTTP2_HEADER_ALLOW: string; + const HTTP2_HEADER_AUTHORIZATION: string; + const HTTP2_HEADER_CACHE_CONTROL: string; + const HTTP2_HEADER_CONNECTION: string; + const HTTP2_HEADER_CONTENT_DISPOSITION: string; + const HTTP2_HEADER_CONTENT_ENCODING: string; + const HTTP2_HEADER_CONTENT_LANGUAGE: string; + const HTTP2_HEADER_CONTENT_LENGTH: string; + const HTTP2_HEADER_CONTENT_LOCATION: string; + const HTTP2_HEADER_CONTENT_MD5: string; + const HTTP2_HEADER_CONTENT_RANGE: string; + const HTTP2_HEADER_CONTENT_TYPE: string; + const HTTP2_HEADER_COOKIE: string; + const HTTP2_HEADER_DATE: string; + const HTTP2_HEADER_ETAG: string; + const HTTP2_HEADER_EXPECT: string; + const HTTP2_HEADER_EXPIRES: string; + const HTTP2_HEADER_FROM: string; + const HTTP2_HEADER_HOST: string; + const HTTP2_HEADER_IF_MATCH: string; + const HTTP2_HEADER_IF_MODIFIED_SINCE: string; + const HTTP2_HEADER_IF_NONE_MATCH: string; + const HTTP2_HEADER_IF_RANGE: string; + const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string; + const HTTP2_HEADER_LAST_MODIFIED: string; + const HTTP2_HEADER_LINK: string; + const HTTP2_HEADER_LOCATION: string; + const HTTP2_HEADER_MAX_FORWARDS: string; + const HTTP2_HEADER_PREFER: string; + const HTTP2_HEADER_PROXY_AUTHENTICATE: string; + const HTTP2_HEADER_PROXY_AUTHORIZATION: string; + const HTTP2_HEADER_RANGE: string; + const HTTP2_HEADER_REFERER: string; + const HTTP2_HEADER_REFRESH: string; + const HTTP2_HEADER_RETRY_AFTER: string; + const HTTP2_HEADER_SERVER: string; + const HTTP2_HEADER_SET_COOKIE: string; + const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string; + const HTTP2_HEADER_TRANSFER_ENCODING: string; + const HTTP2_HEADER_TE: string; + const HTTP2_HEADER_UPGRADE: string; + const HTTP2_HEADER_USER_AGENT: string; + const HTTP2_HEADER_VARY: string; + const HTTP2_HEADER_VIA: string; + const HTTP2_HEADER_WWW_AUTHENTICATE: string; + const HTTP2_HEADER_HTTP2_SETTINGS: string; + const HTTP2_HEADER_KEEP_ALIVE: string; + const HTTP2_HEADER_PROXY_CONNECTION: string; + const HTTP2_METHOD_ACL: string; + const HTTP2_METHOD_BASELINE_CONTROL: string; + const HTTP2_METHOD_BIND: string; + const HTTP2_METHOD_CHECKIN: string; + const HTTP2_METHOD_CHECKOUT: string; + const HTTP2_METHOD_CONNECT: string; + const HTTP2_METHOD_COPY: string; + const HTTP2_METHOD_DELETE: string; + const HTTP2_METHOD_GET: string; + const HTTP2_METHOD_HEAD: string; + const HTTP2_METHOD_LABEL: string; + const HTTP2_METHOD_LINK: string; + const HTTP2_METHOD_LOCK: string; + const HTTP2_METHOD_MERGE: string; + const HTTP2_METHOD_MKACTIVITY: string; + const HTTP2_METHOD_MKCALENDAR: string; + const HTTP2_METHOD_MKCOL: string; + const HTTP2_METHOD_MKREDIRECTREF: string; + const HTTP2_METHOD_MKWORKSPACE: string; + const HTTP2_METHOD_MOVE: string; + const HTTP2_METHOD_OPTIONS: string; + const HTTP2_METHOD_ORDERPATCH: string; + const HTTP2_METHOD_PATCH: string; + const HTTP2_METHOD_POST: string; + const HTTP2_METHOD_PRI: string; + const HTTP2_METHOD_PROPFIND: string; + const HTTP2_METHOD_PROPPATCH: string; + const HTTP2_METHOD_PUT: string; + const HTTP2_METHOD_REBIND: string; + const HTTP2_METHOD_REPORT: string; + const HTTP2_METHOD_SEARCH: string; + const HTTP2_METHOD_TRACE: string; + const HTTP2_METHOD_UNBIND: string; + const HTTP2_METHOD_UNCHECKOUT: string; + const HTTP2_METHOD_UNLINK: string; + const HTTP2_METHOD_UNLOCK: string; + const HTTP2_METHOD_UPDATE: string; + const HTTP2_METHOD_UPDATEREDIRECTREF: string; + const HTTP2_METHOD_VERSION_CONTROL: string; + const HTTP_STATUS_CONTINUE: number; + const HTTP_STATUS_SWITCHING_PROTOCOLS: number; + const HTTP_STATUS_PROCESSING: number; + const HTTP_STATUS_OK: number; + const HTTP_STATUS_CREATED: number; + const HTTP_STATUS_ACCEPTED: number; + const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number; + const HTTP_STATUS_NO_CONTENT: number; + const HTTP_STATUS_RESET_CONTENT: number; + const HTTP_STATUS_PARTIAL_CONTENT: number; + const HTTP_STATUS_MULTI_STATUS: number; + const HTTP_STATUS_ALREADY_REPORTED: number; + const HTTP_STATUS_IM_USED: number; + const HTTP_STATUS_MULTIPLE_CHOICES: number; + const HTTP_STATUS_MOVED_PERMANENTLY: number; + const HTTP_STATUS_FOUND: number; + const HTTP_STATUS_SEE_OTHER: number; + const HTTP_STATUS_NOT_MODIFIED: number; + const HTTP_STATUS_USE_PROXY: number; + const HTTP_STATUS_TEMPORARY_REDIRECT: number; + const HTTP_STATUS_PERMANENT_REDIRECT: number; + const HTTP_STATUS_BAD_REQUEST: number; + const HTTP_STATUS_UNAUTHORIZED: number; + const HTTP_STATUS_PAYMENT_REQUIRED: number; + const HTTP_STATUS_FORBIDDEN: number; + const HTTP_STATUS_NOT_FOUND: number; + const HTTP_STATUS_METHOD_NOT_ALLOWED: number; + const HTTP_STATUS_NOT_ACCEPTABLE: number; + const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number; + const HTTP_STATUS_REQUEST_TIMEOUT: number; + const HTTP_STATUS_CONFLICT: number; + const HTTP_STATUS_GONE: number; + const HTTP_STATUS_LENGTH_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_FAILED: number; + const HTTP_STATUS_PAYLOAD_TOO_LARGE: number; + const HTTP_STATUS_URI_TOO_LONG: number; + const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number; + const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number; + const HTTP_STATUS_EXPECTATION_FAILED: number; + const HTTP_STATUS_TEAPOT: number; + const HTTP_STATUS_MISDIRECTED_REQUEST: number; + const HTTP_STATUS_UNPROCESSABLE_ENTITY: number; + const HTTP_STATUS_LOCKED: number; + const HTTP_STATUS_FAILED_DEPENDENCY: number; + const HTTP_STATUS_UNORDERED_COLLECTION: number; + const HTTP_STATUS_UPGRADE_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_REQUIRED: number; + const HTTP_STATUS_TOO_MANY_REQUESTS: number; + const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number; + const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number; + const HTTP_STATUS_INTERNAL_SERVER_ERROR: number; + const HTTP_STATUS_NOT_IMPLEMENTED: number; + const HTTP_STATUS_BAD_GATEWAY: number; + const HTTP_STATUS_SERVICE_UNAVAILABLE: number; + const HTTP_STATUS_GATEWAY_TIMEOUT: number; + const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number; + const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number; + const HTTP_STATUS_INSUFFICIENT_STORAGE: number; + const HTTP_STATUS_LOOP_DETECTED: number; + const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number; + const HTTP_STATUS_NOT_EXTENDED: number; + const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number; + } + /** + * This symbol can be set as a property on the HTTP/2 headers object with + * an array value in order to provide a list of headers considered sensitive. + */ + const sensitiveHeaders: symbol; + /** + * Returns an object containing the default settings for an `Http2Session` instance. This method returns a new object instance every time it is called + * so instances returned may be safely modified for use. + * @since v8.4.0 + */ + function getDefaultSettings(): Settings; + /** + * Returns a `Buffer` instance containing serialized representation of the given + * HTTP/2 settings as specified in the [HTTP/2](https://tools.ietf.org/html/rfc7540) specification. This is intended + * for use with the `HTTP2-Settings` header field. + * + * ```js + * import http2 from 'node:http2'; + * + * const packed = http2.getPackedSettings({ enablePush: false }); + * + * console.log(packed.toString('base64')); + * // Prints: AAIAAAAA + * ``` + * @since v8.4.0 + */ + function getPackedSettings(settings: Settings): NonSharedBuffer; + /** + * Returns a `HTTP/2 Settings Object` containing the deserialized settings from + * the given `Buffer` as generated by `http2.getPackedSettings()`. + * @since v8.4.0 + * @param buf The packed settings. + */ + function getUnpackedSettings(buf: Uint8Array): Settings; + /** + * Returns a `net.Server` instance that creates and manages `Http2Session` instances. + * + * Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when + * communicating + * with browser clients. + * + * ```js + * import http2 from 'node:http2'; + * + * // Create an unencrypted HTTP/2 server. + * // Since there are no browsers known that support + * // unencrypted HTTP/2, the use of `http2.createSecureServer()` + * // is necessary when communicating with browser clients. + * const server = http2.createServer(); + * + * server.on('stream', (stream, headers) => { + * stream.respond({ + * 'content-type': 'text/html; charset=utf-8', + * ':status': 200, + * }); + * stream.end('

Hello World

'); + * }); + * + * server.listen(8000); + * ``` + * @since v8.4.0 + * @param onRequestHandler See `Compatibility API` + */ + function createServer( + onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): Http2Server; + function createServer< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + >( + options: ServerOptions, + onRequestHandler?: (request: InstanceType, response: InstanceType) => void, + ): Http2Server; + /** + * Returns a `tls.Server` instance that creates and manages `Http2Session` instances. + * + * ```js + * import http2 from 'node:http2'; + * import fs from 'node:fs'; + * + * const options = { + * key: fs.readFileSync('server-key.pem'), + * cert: fs.readFileSync('server-cert.pem'), + * }; + * + * // Create a secure HTTP/2 server + * const server = http2.createSecureServer(options); + * + * server.on('stream', (stream, headers) => { + * stream.respond({ + * 'content-type': 'text/html; charset=utf-8', + * ':status': 200, + * }); + * stream.end('

Hello World

'); + * }); + * + * server.listen(8443); + * ``` + * @since v8.4.0 + * @param onRequestHandler See `Compatibility API` + */ + function createSecureServer( + onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): Http2SecureServer; + function createSecureServer< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + >( + options: SecureServerOptions, + onRequestHandler?: (request: InstanceType, response: InstanceType) => void, + ): Http2SecureServer; + /** + * Returns a `ClientHttp2Session` instance. + * + * ```js + * import http2 from 'node:http2'; + * const client = http2.connect('https://localhost:1234'); + * + * // Use the client + * + * client.close(); + * ``` + * @since v8.4.0 + * @param authority The remote HTTP/2 server to connect to. This must be in the form of a minimal, valid URL with the `http://` or `https://` prefix, host name, and IP port (if a non-default port + * is used). Userinfo (user ID and password), path, querystring, and fragment details in the URL will be ignored. + * @param listener Will be registered as a one-time listener of the {@link 'connect'} event. + */ + function connect( + authority: string | url.URL, + listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): ClientHttp2Session; + function connect( + authority: string | url.URL, + options?: ClientSessionOptions | SecureClientSessionOptions, + listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): ClientHttp2Session; + /** + * Create an HTTP/2 server session from an existing socket. + * @param socket A Duplex Stream + * @param options Any `{@link createServer}` options can be provided. + * @since v20.12.0 + */ + function performServerHandshake< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + >( + socket: stream.Duplex, + options?: ServerOptions, + ): ServerHttp2Session; +} +declare module "node:http2" { + export { OutgoingHttpHeaders } from "node:http"; +} +declare module "http2" { + export * from "node:http2"; +} diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts new file mode 100644 index 0000000..b10aad0 --- /dev/null +++ b/node_modules/@types/node/https.d.ts @@ -0,0 +1,400 @@ +declare module "node:https" { + import * as http from "node:http"; + import { Duplex } from "node:stream"; + import * as tls from "node:tls"; + import { URL } from "node:url"; + interface ServerOptions< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + > extends http.ServerOptions, tls.TlsOptions {} + interface RequestOptions extends http.RequestOptions, tls.SecureContextOptions { + checkServerIdentity?: + | ((hostname: string, cert: tls.DetailedPeerCertificate) => Error | undefined) + | undefined; + rejectUnauthorized?: boolean | undefined; // Defaults to true + servername?: string | undefined; // SNI TLS Extension + } + interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { + maxCachedSessions?: number | undefined; + } + /** + * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information. + * + * Like `http.Agent`, the `createConnection(options[, callback])` method can be overridden + * to customize how TLS connections are established. + * + * > See `agent.createConnection()` for details on overriding this method, + * > including asynchronous socket creation with a callback. + * @since v0.4.5 + */ + class Agent extends http.Agent { + constructor(options?: AgentOptions); + options: AgentOptions; + createConnection( + options: RequestOptions, + callback?: (err: Error | null, stream: Duplex) => void, + ): Duplex | null | undefined; + getName(options?: RequestOptions): string; + } + interface ServerEventMap< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + > extends http.ServerEventMap, tls.ServerEventMap {} + /** + * See `http.Server` for more information. + * @since v0.3.4 + */ + class Server< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + > extends tls.Server { + constructor(requestListener?: http.RequestListener); + constructor( + options: ServerOptions, + requestListener?: http.RequestListener, + ); + /** + * Closes all connections connected to this server. + * @since v18.2.0 + */ + closeAllConnections(): void; + /** + * Closes all connections connected to this server which are not sending a request or waiting for a response. + * @since v18.2.0 + */ + closeIdleConnections(): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ServerEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ServerEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: ServerEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: ServerEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface Server< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + > extends http.Server {} + /** + * ```js + * // curl -k https://localhost:8000/ + * import https from 'node:https'; + * import fs from 'node:fs'; + * + * const options = { + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), + * }; + * + * https.createServer(options, (req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * ``` + * + * Or + * + * ```js + * import https from 'node:https'; + * import fs from 'node:fs'; + * + * const options = { + * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'), + * passphrase: 'sample', + * }; + * + * https.createServer(options, (req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * ``` + * @since v0.3.4 + * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`. + * @param requestListener A listener to be added to the `'request'` event. + */ + function createServer< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + >(requestListener?: http.RequestListener): Server; + function createServer< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + >( + options: ServerOptions, + requestListener?: http.RequestListener, + ): Server; + /** + * Makes a request to a secure web server. + * + * The following additional `options` from `tls.connect()` are also accepted: `ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`, `honorCipherOrder`, `key`, `passphrase`, + * `pfx`, `rejectUnauthorized`, `secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`, `highWaterMark`. + * + * `options` can be an object, a string, or a `URL` object. If `options` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to + * upload a file with a POST request, then write to the `ClientRequest` object. + * + * ```js + * import https from 'node:https'; + * + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * }; + * + * const req = https.request(options, (res) => { + * console.log('statusCode:', res.statusCode); + * console.log('headers:', res.headers); + * + * res.on('data', (d) => { + * process.stdout.write(d); + * }); + * }); + * + * req.on('error', (e) => { + * console.error(e); + * }); + * req.end(); + * ``` + * + * Example using options from `tls.connect()`: + * + * ```js + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), + * }; + * options.agent = new https.Agent(options); + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Alternatively, opt out of connection pooling by not using an `Agent`. + * + * ```js + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), + * agent: false, + * }; + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Example using a `URL` as `options`: + * + * ```js + * const options = new URL('https://abc:xyz@example.com'); + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`): + * + * ```js + * import tls from 'node:tls'; + * import https from 'node:https'; + * import crypto from 'node:crypto'; + * + * function sha256(s) { + * return crypto.createHash('sha256').update(s).digest('base64'); + * } + * const options = { + * hostname: 'github.com', + * port: 443, + * path: '/', + * method: 'GET', + * checkServerIdentity: function(host, cert) { + * // Make sure the certificate is issued to the host we are connected to + * const err = tls.checkServerIdentity(host, cert); + * if (err) { + * return err; + * } + * + * // Pin the public key, similar to HPKP pin-sha256 pinning + * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU='; + * if (sha256(cert.pubkey) !== pubkey256) { + * const msg = 'Certificate verification error: ' + + * `The public key of '${cert.subject.CN}' ` + + * 'does not match our pinned fingerprint'; + * return new Error(msg); + * } + * + * // Pin the exact certificate, rather than the pub key + * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' + + * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16'; + * if (cert.fingerprint256 !== cert256) { + * const msg = 'Certificate verification error: ' + + * `The certificate of '${cert.subject.CN}' ` + + * 'does not match our pinned fingerprint'; + * return new Error(msg); + * } + * + * // This loop is informational only. + * // Print the certificate and public key fingerprints of all certs in the + * // chain. Its common to pin the public key of the issuer on the public + * // internet, while pinning the public key of the service in sensitive + * // environments. + * do { + * console.log('Subject Common Name:', cert.subject.CN); + * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256); + * + * hash = crypto.createHash('sha256'); + * console.log(' Public key ping-sha256:', sha256(cert.pubkey)); + * + * lastprint256 = cert.fingerprint256; + * cert = cert.issuerCertificate; + * } while (cert.fingerprint256 !== lastprint256); + * + * }, + * }; + * + * options.agent = new https.Agent(options); + * const req = https.request(options, (res) => { + * console.log('All OK. Server matched our pinned cert or public key'); + * console.log('statusCode:', res.statusCode); + * // Print the HPKP values + * console.log('headers:', res.headers['public-key-pins']); + * + * res.on('data', (d) => {}); + * }); + * + * req.on('error', (e) => { + * console.error(e.message); + * }); + * req.end(); + * ``` + * + * Outputs for example: + * + * ```text + * Subject Common Name: github.com + * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16 + * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU= + * Subject Common Name: DigiCert SHA2 Extended Validation Server CA + * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A + * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho= + * Subject Common Name: DigiCert High Assurance EV Root CA + * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF + * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18= + * All OK. Server matched our pinned cert or public key + * statusCode: 200 + * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho="; + * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4="; + * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains + * ``` + * @since v0.3.6 + * @param options Accepts all `options` from `request`, with some differences in default values: + */ + function request( + options: RequestOptions | string | URL, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + function request( + url: string | URL, + options: RequestOptions, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + /** + * Like `http.get()` but for HTTPS. + * + * `options` can be an object, a string, or a `URL` object. If `options` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * ```js + * import https from 'node:https'; + * + * https.get('https://encrypted.google.com/', (res) => { + * console.log('statusCode:', res.statusCode); + * console.log('headers:', res.headers); + * + * res.on('data', (d) => { + * process.stdout.write(d); + * }); + * + * }).on('error', (e) => { + * console.error(e); + * }); + * ``` + * @since v0.3.6 + * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. + */ + function get( + options: RequestOptions | string | URL, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + function get( + url: string | URL, + options: RequestOptions, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + let globalAgent: Agent; +} +declare module "https" { + export * from "node:https"; +} diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts new file mode 100644 index 0000000..c8cdf6b --- /dev/null +++ b/node_modules/@types/node/index.d.ts @@ -0,0 +1,116 @@ +/** + * License for programmatically and manually incorporated + * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc + * + * Copyright Node.js contributors. All rights reserved. + * 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. + */ + +// NOTE: These definitions support Node.js and TypeScript 5.8+. + +// Reference required TypeScript libraries: +/// +/// +/// + +// Definitions for Node.js modules specific to TypeScript 5.7+: +/// +/// + +// Definitions for Node.js modules that are not specific to any version of TypeScript: +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts new file mode 100644 index 0000000..0dd4ca9 --- /dev/null +++ b/node_modules/@types/node/inspector.d.ts @@ -0,0 +1,265 @@ +declare module "node:inspector" { + import { EventEmitter } from "node:events"; + /** + * The `inspector.Session` is used for dispatching messages to the V8 inspector + * back-end and receiving message responses and notifications. + */ + class Session extends EventEmitter { + /** + * Create a new instance of the inspector.Session class. + * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend. + */ + constructor(); + /** + * Connects a session to the inspector back-end. + */ + connect(): void; + /** + * Connects a session to the inspector back-end. + * An exception will be thrown if this API was not called on a Worker thread. + * @since v12.11.0 + */ + connectToMainThread(): void; + /** + * Immediately close the session. All pending message callbacks will be called with an error. + * `session.connect()` will need to be called to be able to send messages again. + * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. + */ + disconnect(): void; + } + /** + * Activate inspector on host and port. Equivalent to `node --inspect=[[host:]port]`, but can be done programmatically after node has + * started. + * + * If wait is `true`, will block until a client has connected to the inspect port + * and flow control has been passed to the debugger client. + * + * See the [security warning](https://nodejs.org/docs/latest-v26.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure) + * regarding the `host` parameter usage. + * @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI. + * @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI. + * @param wait Block until a client has connected. Defaults to what was specified on the CLI. + * @returns Disposable that calls `inspector.close()`. + */ + function open(port?: number, host?: string, wait?: boolean): Disposable; + /** + * Deactivates the inspector. If there are active connections, they are forcibly + * terminated. Blocks until the inspector server has fully stopped. + */ + function close(): void; + /** + * Return the URL of the active inspector, or `undefined` if there is none. + * + * ```console + * $ node --inspect -p 'inspector.url()' + * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 + * For help, see: https://nodejs.org/en/docs/inspector + * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 + * + * $ node --inspect=localhost:3000 -p 'inspector.url()' + * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a + * For help, see: https://nodejs.org/en/docs/inspector + * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a + * + * $ node -p 'inspector.url()' + * undefined + * ``` + */ + function url(): string | undefined; + /** + * Blocks until a client (existing or connected later) has sent `Runtime.runIfWaitingForDebugger` command. + * + * An exception will be thrown if there is no active inspector. + * @since v12.7.0 + */ + function waitForDebugger(): void; + // These methods are exposed by the V8 inspector console API (inspector/v8-console.h). + // The method signatures differ from those of the Node.js console, and are deliberately + // typed permissively. + interface InspectorConsole { + debug(...data: any[]): void; + error(...data: any[]): void; + info(...data: any[]): void; + log(...data: any[]): void; + warn(...data: any[]): void; + dir(...data: any[]): void; + dirxml(...data: any[]): void; + table(...data: any[]): void; + trace(...data: any[]): void; + group(...data: any[]): void; + groupCollapsed(...data: any[]): void; + groupEnd(...data: any[]): void; + clear(...data: any[]): void; + count(label?: any): void; + countReset(label?: any): void; + assert(value?: any, ...data: any[]): void; + profile(label?: any): void; + profileEnd(label?: any): void; + time(label?: any): void; + timeLog(label?: any): void; + timeStamp(label?: any): void; + } + /** + * An object to send messages to the remote inspector console. + * @since v11.0.0 + */ + const console: InspectorConsole; + // DevTools protocol event broadcast methods + namespace Network { + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.requestWillBeSent` event to connected frontends. This event indicates that + * the application is about to send an HTTP request. + * @since v22.6.0 + */ + function requestWillBeSent(params: RequestWillBeSentEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.dataReceived` event to connected frontends, or buffers the data if + * `Network.streamResourceContent` command was not invoked for the given request yet. + * + * Also enables `Network.getResponseBody` command to retrieve the response data. + * @since v24.2.0 + */ + function dataReceived(params: DataReceivedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Enables `Network.getRequestPostData` command to retrieve the request data. + * @since v24.3.0 + */ + function dataSent(params: unknown): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.responseReceived` event to connected frontends. This event indicates that + * HTTP response is available. + * @since v22.6.0 + */ + function responseReceived(params: ResponseReceivedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that + * HTTP request has finished loading. + * @since v22.6.0 + */ + function loadingFinished(params: LoadingFinishedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that + * HTTP request has failed to load. + * @since v22.7.0 + */ + function loadingFailed(params: LoadingFailedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.webSocketCreated` event to connected frontends. This event indicates that + * a WebSocket connection has been initiated. + * @since v24.7.0 + */ + function webSocketCreated(params: WebSocketCreatedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.webSocketHandshakeResponseReceived` event to connected frontends. + * This event indicates that the WebSocket handshake response has been received. + * @since v24.7.0 + */ + function webSocketHandshakeResponseReceived(params: WebSocketHandshakeResponseReceivedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.webSocketClosed` event to connected frontends. + * This event indicates that a WebSocket connection has been closed. + * @since v24.7.0 + */ + function webSocketClosed(params: WebSocketClosedEventDataType): void; + } + namespace NetworkResources { + /** + * This feature is only available with the `--experimental-inspector-network-resource` flag enabled. + * + * The inspector.NetworkResources.put method is used to provide a response for a loadNetworkResource + * request issued via the Chrome DevTools Protocol (CDP). + * This is typically triggered when a source map is specified by URL, and a DevTools frontend—such as + * Chrome—requests the resource to retrieve the source map. + * + * This method allows developers to predefine the resource content to be served in response to such CDP requests. + * + * ```js + * const inspector = require('node:inspector'); + * // By preemptively calling put to register the resource, a source map can be resolved when + * // a loadNetworkResource request is made from the frontend. + * async function setNetworkResources() { + * const mapUrl = 'http://localhost:3000/dist/app.js.map'; + * const tsUrl = 'http://localhost:3000/src/app.ts'; + * const distAppJsMap = await fetch(mapUrl).then((res) => res.text()); + * const srcAppTs = await fetch(tsUrl).then((res) => res.text()); + * inspector.NetworkResources.put(mapUrl, distAppJsMap); + * inspector.NetworkResources.put(tsUrl, srcAppTs); + * }; + * setNetworkResources().then(() => { + * require('./dist/app'); + * }); + * ``` + * + * For more details, see the official CDP documentation: [Network.loadNetworkResource](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-loadNetworkResource) + * @since v24.5.0 + * @experimental + */ + function put(url: string, data: string): void; + } + namespace DOMStorage { + /** + * This feature is only available with the + * `--experimental-storage-inspection` flag enabled. + * + * Broadcasts the `DOMStorage.domStorageItemAdded` event to connected frontends. + * This event indicates that a new item has been added to the storage. + * @since v25.5.0 + */ + function domStorageItemAdded(params: DomStorageItemAddedEventDataType): void; + /** + * This feature is only available with the + * `--experimental-storage-inspection` flag enabled. + * + * Broadcasts the `DOMStorage.domStorageItemRemoved` event to connected frontends. + * This event indicates that an item has been removed from the storage. + * @since v25.5.0 + */ + function domStorageItemRemoved(params: DomStorageItemRemovedEventDataType): void; + /** + * This feature is only available with the + * `--experimental-storage-inspection` flag enabled. + + * Broadcasts the `DOMStorage.domStorageItemUpdated` event to connected frontends. + * This event indicates that a storage item has been updated. + * @since v25.5.0 + */ + function domStorageItemUpdated(params: DomStorageItemUpdatedEventDataType): void; + /** + * This feature is only available with the + * `--experimental-storage-inspection` flag enabled. + * + * Broadcasts the `DOMStorage.domStorageItemsCleared` event to connected + * frontends. This event indicates that all items have been cleared from the + * storage. + * @since v25.5.0 + */ + function domStorageItemsCleared(params: DomStorageItemsClearedEventDataType): void; + /** + * This feature is only available with the + * `--experimental-storage-inspection` flag enabled. + * @since v25.5.0 + */ + function registerStorage(params: unknown): void; + } +} +declare module "inspector" { + export * from "node:inspector"; +} diff --git a/node_modules/@types/node/inspector.generated.d.ts b/node_modules/@types/node/inspector.generated.d.ts new file mode 100644 index 0000000..0e2e441 --- /dev/null +++ b/node_modules/@types/node/inspector.generated.d.ts @@ -0,0 +1,4406 @@ +// These definitions are automatically generated by the generate-inspector script. +// Do not edit this file directly. +// See scripts/generate-inspector/README.md for information on how to update the protocol definitions. +// Changes to the module itself should be added to the generator template (scripts/generate-inspector/inspector.d.ts.template). + +declare module "node:inspector" { + interface InspectorNotification { + method: string; + params: T; + } + namespace Schema { + /** + * Description of the protocol domain. + */ + interface Domain { + /** + * Domain name. + */ + name: string; + /** + * Domain version. + */ + version: string; + } + interface GetDomainsReturnType { + /** + * List of supported domains. + */ + domains: Domain[]; + } + } + namespace Runtime { + /** + * Unique script identifier. + */ + type ScriptId = string; + /** + * Unique object identifier. + */ + type RemoteObjectId = string; + /** + * Primitive value which cannot be JSON-stringified. + */ + type UnserializableValue = string; + /** + * Mirror object referencing original JavaScript object. + */ + interface RemoteObject { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + /** + * Object class (constructor) name. Specified for object type values only. + */ + className?: string | undefined; + /** + * Remote object value in case of primitive values or JSON values (if it was requested). + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified does not have value, but gets this property. + */ + unserializableValue?: UnserializableValue | undefined; + /** + * String representation of the object. + */ + description?: string | undefined; + /** + * Unique object identifier (for non-primitive values). + */ + objectId?: RemoteObjectId | undefined; + /** + * Preview containing abbreviated property values. Specified for object type values only. + * @experimental + */ + preview?: ObjectPreview | undefined; + /** + * @experimental + */ + customPreview?: CustomPreview | undefined; + } + /** + * @experimental + */ + interface CustomPreview { + header: string; + hasBody: boolean; + formatterObjectId: RemoteObjectId; + bindRemoteObjectFunctionId: RemoteObjectId; + configObjectId?: RemoteObjectId | undefined; + } + /** + * Object containing abbreviated remote object value. + * @experimental + */ + interface ObjectPreview { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + /** + * String representation of the object. + */ + description?: string | undefined; + /** + * True iff some of the properties or entries of the original object did not fit. + */ + overflow: boolean; + /** + * List of the properties. + */ + properties: PropertyPreview[]; + /** + * List of the entries. Specified for map and set subtype values only. + */ + entries?: EntryPreview[] | undefined; + } + /** + * @experimental + */ + interface PropertyPreview { + /** + * Property name. + */ + name: string; + /** + * Object type. Accessor means that the property itself is an accessor property. + */ + type: string; + /** + * User-friendly property value string. + */ + value?: string | undefined; + /** + * Nested value preview. + */ + valuePreview?: ObjectPreview | undefined; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + } + /** + * @experimental + */ + interface EntryPreview { + /** + * Preview of the key. Specified for map-like collection entries. + */ + key?: ObjectPreview | undefined; + /** + * Preview of the value. + */ + value: ObjectPreview; + } + /** + * Object property descriptor. + */ + interface PropertyDescriptor { + /** + * Property name or symbol description. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject | undefined; + /** + * True if the value associated with the property may be changed (data descriptors only). + */ + writable?: boolean | undefined; + /** + * A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). + */ + get?: RemoteObject | undefined; + /** + * A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). + */ + set?: RemoteObject | undefined; + /** + * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. + */ + configurable: boolean; + /** + * True if this property shows up during enumeration of the properties on the corresponding object. + */ + enumerable: boolean; + /** + * True if the result was thrown during the evaluation. + */ + wasThrown?: boolean | undefined; + /** + * True if the property is owned for the object. + */ + isOwn?: boolean | undefined; + /** + * Property symbol object, if the property is of the symbol type. + */ + symbol?: RemoteObject | undefined; + } + /** + * Object internal property descriptor. This property isn't normally visible in JavaScript code. + */ + interface InternalPropertyDescriptor { + /** + * Conventional property name. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject | undefined; + } + /** + * Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified. + */ + interface CallArgument { + /** + * Primitive value or serializable javascript object. + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified. + */ + unserializableValue?: UnserializableValue | undefined; + /** + * Remote object handle. + */ + objectId?: RemoteObjectId | undefined; + } + /** + * Id of an execution context. + */ + type ExecutionContextId = number; + /** + * Description of an isolated world. + */ + interface ExecutionContextDescription { + /** + * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. + */ + id: ExecutionContextId; + /** + * Execution context origin. + */ + origin: string; + /** + * Human readable name describing given context. + */ + name: string; + /** + * Embedder-specific auxiliary data. + */ + auxData?: object | undefined; + } + /** + * Detailed information about exception (or error) that was thrown during script compilation or execution. + */ + interface ExceptionDetails { + /** + * Exception id. + */ + exceptionId: number; + /** + * Exception text, which should be used together with exception object when available. + */ + text: string; + /** + * Line number of the exception location (0-based). + */ + lineNumber: number; + /** + * Column number of the exception location (0-based). + */ + columnNumber: number; + /** + * Script ID of the exception location. + */ + scriptId?: ScriptId | undefined; + /** + * URL of the exception location, to be used when the script was not reported. + */ + url?: string | undefined; + /** + * JavaScript stack trace if available. + */ + stackTrace?: StackTrace | undefined; + /** + * Exception object if available. + */ + exception?: RemoteObject | undefined; + /** + * Identifier of the context where exception happened. + */ + executionContextId?: ExecutionContextId | undefined; + } + /** + * Number of milliseconds since epoch. + */ + type Timestamp = number; + /** + * Stack entry for runtime errors and assertions. + */ + interface CallFrame { + /** + * JavaScript function name. + */ + functionName: string; + /** + * JavaScript script id. + */ + scriptId: ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * JavaScript script line number (0-based). + */ + lineNumber: number; + /** + * JavaScript script column number (0-based). + */ + columnNumber: number; + } + /** + * Call frames for assertions or error messages. + */ + interface StackTrace { + /** + * String label of this stack trace. For async traces this may be a name of the function that initiated the async call. + */ + description?: string | undefined; + /** + * JavaScript function name. + */ + callFrames: CallFrame[]; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + */ + parent?: StackTrace | undefined; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + * @experimental + */ + parentId?: StackTraceId | undefined; + } + /** + * Unique identifier of current debugger. + * @experimental + */ + type UniqueDebuggerId = string; + /** + * If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages. + * @experimental + */ + interface StackTraceId { + id: string; + debuggerId?: UniqueDebuggerId | undefined; + } + interface EvaluateParameterType { + /** + * Expression to evaluate. + */ + expression: string; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + contextId?: ExecutionContextId | undefined; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + } + interface AwaitPromiseParameterType { + /** + * Identifier of the promise. + */ + promiseObjectId: RemoteObjectId; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean | undefined; + } + interface CallFunctionOnParameterType { + /** + * Declaration of the function to call. + */ + functionDeclaration: string; + /** + * Identifier of the object to call function on. Either objectId or executionContextId should be specified. + */ + objectId?: RemoteObjectId | undefined; + /** + * Call arguments. All call arguments must belong to the same JavaScript world as the target object. + */ + arguments?: CallArgument[] | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + /** + * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified. + */ + executionContextId?: ExecutionContextId | undefined; + /** + * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object. + */ + objectGroup?: string | undefined; + } + interface GetPropertiesParameterType { + /** + * Identifier of the object to return properties for. + */ + objectId: RemoteObjectId; + /** + * If true, returns properties belonging only to the element itself, not to its prototype chain. + */ + ownProperties?: boolean | undefined; + /** + * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. + * @experimental + */ + accessorPropertiesOnly?: boolean | undefined; + /** + * Whether preview should be generated for the results. + * @experimental + */ + generatePreview?: boolean | undefined; + } + interface ReleaseObjectParameterType { + /** + * Identifier of the object to release. + */ + objectId: RemoteObjectId; + } + interface ReleaseObjectGroupParameterType { + /** + * Symbolic object group name. + */ + objectGroup: string; + } + interface SetCustomObjectFormatterEnabledParameterType { + enabled: boolean; + } + interface CompileScriptParameterType { + /** + * Expression to compile. + */ + expression: string; + /** + * Source url to be set for the script. + */ + sourceURL: string; + /** + * Specifies whether the compiled script should be persisted. + */ + persistScript: boolean; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId | undefined; + } + interface RunScriptParameterType { + /** + * Id of the script to run. + */ + scriptId: ScriptId; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId | undefined; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + } + interface QueryObjectsParameterType { + /** + * Identifier of the prototype to return objects for. + */ + prototypeObjectId: RemoteObjectId; + } + interface GlobalLexicalScopeNamesParameterType { + /** + * Specifies in which execution context to lookup global scope variables. + */ + executionContextId?: ExecutionContextId | undefined; + } + interface EvaluateReturnType { + /** + * Evaluation result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface AwaitPromiseReturnType { + /** + * Promise result. Will contain rejected value if promise was rejected. + */ + result: RemoteObject; + /** + * Exception details if stack strace is available. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface CallFunctionOnReturnType { + /** + * Call result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface GetPropertiesReturnType { + /** + * Object properties. + */ + result: PropertyDescriptor[]; + /** + * Internal object properties (only of the element itself). + */ + internalProperties?: InternalPropertyDescriptor[] | undefined; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface CompileScriptReturnType { + /** + * Id of the script. + */ + scriptId?: ScriptId | undefined; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface RunScriptReturnType { + /** + * Run result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface QueryObjectsReturnType { + /** + * Array with objects. + */ + objects: RemoteObject; + } + interface GlobalLexicalScopeNamesReturnType { + names: string[]; + } + interface ExecutionContextCreatedEventDataType { + /** + * A newly created execution context. + */ + context: ExecutionContextDescription; + } + interface ExecutionContextDestroyedEventDataType { + /** + * Id of the destroyed context + */ + executionContextId: ExecutionContextId; + } + interface ExceptionThrownEventDataType { + /** + * Timestamp of the exception. + */ + timestamp: Timestamp; + exceptionDetails: ExceptionDetails; + } + interface ExceptionRevokedEventDataType { + /** + * Reason describing why exception was revoked. + */ + reason: string; + /** + * The id of revoked exception, as reported in exceptionThrown. + */ + exceptionId: number; + } + interface ConsoleAPICalledEventDataType { + /** + * Type of the call. + */ + type: string; + /** + * Call arguments. + */ + args: RemoteObject[]; + /** + * Identifier of the context where the call was made. + */ + executionContextId: ExecutionContextId; + /** + * Call timestamp. + */ + timestamp: Timestamp; + /** + * Stack trace captured when the call was made. + */ + stackTrace?: StackTrace | undefined; + /** + * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context. + * @experimental + */ + context?: string | undefined; + } + interface InspectRequestedEventDataType { + object: RemoteObject; + hints: object; + } + } + namespace Debugger { + /** + * Breakpoint identifier. + */ + type BreakpointId = string; + /** + * Call frame identifier. + */ + type CallFrameId = string; + /** + * Location in the source code. + */ + interface Location { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number | undefined; + } + /** + * Location in the source code. + * @experimental + */ + interface ScriptPosition { + lineNumber: number; + columnNumber: number; + } + /** + * JavaScript call frame. Array of call frames form the call stack. + */ + interface CallFrame { + /** + * Call frame identifier. This identifier is only valid while the virtual machine is paused. + */ + callFrameId: CallFrameId; + /** + * Name of the JavaScript function called on this call frame. + */ + functionName: string; + /** + * Location in the source code. + */ + functionLocation?: Location | undefined; + /** + * Location in the source code. + */ + location: Location; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Scope chain for this call frame. + */ + scopeChain: Scope[]; + /** + * this object for this call frame. + */ + this: Runtime.RemoteObject; + /** + * The value being returned, if the function is at return point. + */ + returnValue?: Runtime.RemoteObject | undefined; + } + /** + * Scope description. + */ + interface Scope { + /** + * Scope type. + */ + type: string; + /** + * Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. + */ + object: Runtime.RemoteObject; + name?: string | undefined; + /** + * Location in the source code where scope starts + */ + startLocation?: Location | undefined; + /** + * Location in the source code where scope ends + */ + endLocation?: Location | undefined; + } + /** + * Search match for resource. + */ + interface SearchMatch { + /** + * Line number in resource content. + */ + lineNumber: number; + /** + * Line with match content. + */ + lineContent: string; + } + interface BreakLocation { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number | undefined; + type?: string | undefined; + } + interface SetBreakpointsActiveParameterType { + /** + * New value for breakpoints active state. + */ + active: boolean; + } + interface SetSkipAllPausesParameterType { + /** + * New value for skip pauses state. + */ + skip: boolean; + } + interface SetBreakpointByUrlParameterType { + /** + * Line number to set breakpoint at. + */ + lineNumber: number; + /** + * URL of the resources to set breakpoint on. + */ + url?: string | undefined; + /** + * Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. + */ + urlRegex?: string | undefined; + /** + * Script hash of the resources to set breakpoint on. + */ + scriptHash?: string | undefined; + /** + * Offset in the line to set breakpoint at. + */ + columnNumber?: number | undefined; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string | undefined; + } + interface SetBreakpointParameterType { + /** + * Location to set breakpoint in. + */ + location: Location; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string | undefined; + } + interface RemoveBreakpointParameterType { + breakpointId: BreakpointId; + } + interface GetPossibleBreakpointsParameterType { + /** + * Start of range to search possible breakpoint locations in. + */ + start: Location; + /** + * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. + */ + end?: Location | undefined; + /** + * Only consider locations which are in the same (non-nested) function as start. + */ + restrictToFunction?: boolean | undefined; + } + interface ContinueToLocationParameterType { + /** + * Location to continue to. + */ + location: Location; + targetCallFrames?: string | undefined; + } + interface PauseOnAsyncCallParameterType { + /** + * Debugger will pause when async call with given stack trace is started. + */ + parentStackTraceId: Runtime.StackTraceId; + } + interface StepIntoParameterType { + /** + * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause. + * @experimental + */ + breakOnAsyncCall?: boolean | undefined; + } + interface GetStackTraceParameterType { + stackTraceId: Runtime.StackTraceId; + } + interface SearchInContentParameterType { + /** + * Id of the script to search in. + */ + scriptId: Runtime.ScriptId; + /** + * String to search for. + */ + query: string; + /** + * If true, search is case sensitive. + */ + caseSensitive?: boolean | undefined; + /** + * If true, treats string parameter as regex. + */ + isRegex?: boolean | undefined; + } + interface SetScriptSourceParameterType { + /** + * Id of the script to edit. + */ + scriptId: Runtime.ScriptId; + /** + * New content of the script. + */ + scriptSource: string; + /** + * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. + */ + dryRun?: boolean | undefined; + } + interface RestartFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + } + interface GetScriptSourceParameterType { + /** + * Id of the script to get source for. + */ + scriptId: Runtime.ScriptId; + } + interface SetPauseOnExceptionsParameterType { + /** + * Pause on exceptions mode. + */ + state: string; + } + interface EvaluateOnCallFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + /** + * Expression to evaluate. + */ + expression: string; + /** + * String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup). + */ + objectGroup?: string | undefined; + /** + * Specifies whether command line API should be available to the evaluated expression, defaults to false. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether to throw an exception if side effect cannot be ruled out during evaluation. + */ + throwOnSideEffect?: boolean | undefined; + } + interface SetVariableValueParameterType { + /** + * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. + */ + scopeNumber: number; + /** + * Variable name. + */ + variableName: string; + /** + * New variable value. + */ + newValue: Runtime.CallArgument; + /** + * Id of callframe that holds variable. + */ + callFrameId: CallFrameId; + } + interface SetReturnValueParameterType { + /** + * New return value. + */ + newValue: Runtime.CallArgument; + } + interface SetAsyncCallStackDepthParameterType { + /** + * Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). + */ + maxDepth: number; + } + interface SetBlackboxPatternsParameterType { + /** + * Array of regexps that will be used to check script url for blackbox state. + */ + patterns: string[]; + } + interface SetBlackboxedRangesParameterType { + /** + * Id of the script. + */ + scriptId: Runtime.ScriptId; + positions: ScriptPosition[]; + } + interface EnableReturnType { + /** + * Unique identifier of the debugger. + * @experimental + */ + debuggerId: Runtime.UniqueDebuggerId; + } + interface SetBreakpointByUrlReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * List of the locations this breakpoint resolved into upon addition. + */ + locations: Location[]; + } + interface SetBreakpointReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * Location this breakpoint resolved into. + */ + actualLocation: Location; + } + interface GetPossibleBreakpointsReturnType { + /** + * List of the possible breakpoint locations. + */ + locations: BreakLocation[]; + } + interface GetStackTraceReturnType { + stackTrace: Runtime.StackTrace; + } + interface SearchInContentReturnType { + /** + * List of search matches. + */ + result: SearchMatch[]; + } + interface SetScriptSourceReturnType { + /** + * New stack trace in case editing has happened while VM was stopped. + */ + callFrames?: CallFrame[] | undefined; + /** + * Whether current call stack was modified after applying the changes. + */ + stackChanged?: boolean | undefined; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + /** + * Exception details if any. + */ + exceptionDetails?: Runtime.ExceptionDetails | undefined; + } + interface RestartFrameReturnType { + /** + * New stack trace. + */ + callFrames: CallFrame[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + } + interface GetScriptSourceReturnType { + /** + * Script source. + */ + scriptSource: string; + } + interface EvaluateOnCallFrameReturnType { + /** + * Object wrapper for the evaluation result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails | undefined; + } + interface ScriptParsedEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: object | undefined; + /** + * True, if this script is generated as a result of the live edit operation. + * @experimental + */ + isLiveEdit?: boolean | undefined; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string | undefined; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean | undefined; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean | undefined; + /** + * This script length. + */ + length?: number | undefined; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace | undefined; + } + interface ScriptFailedToParseEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: object | undefined; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string | undefined; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean | undefined; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean | undefined; + /** + * This script length. + */ + length?: number | undefined; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace | undefined; + } + interface BreakpointResolvedEventDataType { + /** + * Breakpoint unique identifier. + */ + breakpointId: BreakpointId; + /** + * Actual breakpoint location. + */ + location: Location; + } + interface PausedEventDataType { + /** + * Call stack the virtual machine stopped on. + */ + callFrames: CallFrame[]; + /** + * Pause reason. + */ + reason: string; + /** + * Object containing break-specific auxiliary properties. + */ + data?: object | undefined; + /** + * Hit breakpoints IDs + */ + hitBreakpoints?: string[] | undefined; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + /** + * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after Debugger.stepInto call with breakOnAsynCall flag. + * @experimental + */ + asyncCallStackTraceId?: Runtime.StackTraceId | undefined; + } + } + namespace Console { + /** + * Console message. + */ + interface ConsoleMessage { + /** + * Message source. + */ + source: string; + /** + * Message severity. + */ + level: string; + /** + * Message text. + */ + text: string; + /** + * URL of the message origin. + */ + url?: string | undefined; + /** + * Line number in the resource that generated this message (1-based). + */ + line?: number | undefined; + /** + * Column number in the resource that generated this message (1-based). + */ + column?: number | undefined; + } + interface MessageAddedEventDataType { + /** + * Console message that has been added. + */ + message: ConsoleMessage; + } + } + namespace Profiler { + /** + * Profile node. Holds callsite information, execution statistics and child nodes. + */ + interface ProfileNode { + /** + * Unique id of the node. + */ + id: number; + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Number of samples where this node was on top of the call stack. + */ + hitCount?: number | undefined; + /** + * Child node ids. + */ + children?: number[] | undefined; + /** + * The reason of being not optimized. The function may be deoptimized or marked as don't optimize. + */ + deoptReason?: string | undefined; + /** + * An array of source position ticks. + */ + positionTicks?: PositionTickInfo[] | undefined; + } + /** + * Profile. + */ + interface Profile { + /** + * The list of profile nodes. First item is the root node. + */ + nodes: ProfileNode[]; + /** + * Profiling start timestamp in microseconds. + */ + startTime: number; + /** + * Profiling end timestamp in microseconds. + */ + endTime: number; + /** + * Ids of samples top nodes. + */ + samples?: number[] | undefined; + /** + * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. + */ + timeDeltas?: number[] | undefined; + } + /** + * Specifies a number of samples attributed to a certain source position. + */ + interface PositionTickInfo { + /** + * Source line number (1-based). + */ + line: number; + /** + * Number of samples attributed to the source line. + */ + ticks: number; + } + /** + * Coverage data for a source range. + */ + interface CoverageRange { + /** + * JavaScript script source offset for the range start. + */ + startOffset: number; + /** + * JavaScript script source offset for the range end. + */ + endOffset: number; + /** + * Collected execution count of the source range. + */ + count: number; + } + /** + * Coverage data for a JavaScript function. + */ + interface FunctionCoverage { + /** + * JavaScript function name. + */ + functionName: string; + /** + * Source ranges inside the function with coverage data. + */ + ranges: CoverageRange[]; + /** + * Whether coverage data for this function has block granularity. + */ + isBlockCoverage: boolean; + } + /** + * Coverage data for a JavaScript script. + */ + interface ScriptCoverage { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Functions contained in the script that has coverage data. + */ + functions: FunctionCoverage[]; + } + interface SetSamplingIntervalParameterType { + /** + * New sampling interval in microseconds. + */ + interval: number; + } + interface StartPreciseCoverageParameterType { + /** + * Collect accurate call counts beyond simple 'covered' or 'not covered'. + */ + callCount?: boolean | undefined; + /** + * Collect block-based coverage. + */ + detailed?: boolean | undefined; + } + interface StopReturnType { + /** + * Recorded profile. + */ + profile: Profile; + } + interface TakePreciseCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + interface GetBestEffortCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + interface ConsoleProfileStartedEventDataType { + id: string; + /** + * Location of console.profile(). + */ + location: Debugger.Location; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string | undefined; + } + interface ConsoleProfileFinishedEventDataType { + id: string; + /** + * Location of console.profileEnd(). + */ + location: Debugger.Location; + profile: Profile; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string | undefined; + } + } + namespace HeapProfiler { + /** + * Heap snapshot object id. + */ + type HeapSnapshotObjectId = string; + /** + * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. + */ + interface SamplingHeapProfileNode { + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Allocations size in bytes for the node excluding children. + */ + selfSize: number; + /** + * Child nodes. + */ + children: SamplingHeapProfileNode[]; + } + /** + * Profile. + */ + interface SamplingHeapProfile { + head: SamplingHeapProfileNode; + } + interface StartTrackingHeapObjectsParameterType { + trackAllocations?: boolean | undefined; + } + interface StopTrackingHeapObjectsParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. + */ + reportProgress?: boolean | undefined; + } + interface TakeHeapSnapshotParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. + */ + reportProgress?: boolean | undefined; + } + interface GetObjectByHeapObjectIdParameterType { + objectId: HeapSnapshotObjectId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + } + interface AddInspectedHeapObjectParameterType { + /** + * Heap snapshot object id to be accessible by means of $x command line API. + */ + heapObjectId: HeapSnapshotObjectId; + } + interface GetHeapObjectIdParameterType { + /** + * Identifier of the object to get heap object id for. + */ + objectId: Runtime.RemoteObjectId; + } + interface StartSamplingParameterType { + /** + * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. + */ + samplingInterval?: number | undefined; + } + interface GetObjectByHeapObjectIdReturnType { + /** + * Evaluation result. + */ + result: Runtime.RemoteObject; + } + interface GetHeapObjectIdReturnType { + /** + * Id of the heap snapshot object corresponding to the passed remote object id. + */ + heapSnapshotObjectId: HeapSnapshotObjectId; + } + interface StopSamplingReturnType { + /** + * Recorded sampling heap profile. + */ + profile: SamplingHeapProfile; + } + interface GetSamplingProfileReturnType { + /** + * Return the sampling profile being collected. + */ + profile: SamplingHeapProfile; + } + interface AddHeapSnapshotChunkEventDataType { + chunk: string; + } + interface ReportHeapSnapshotProgressEventDataType { + done: number; + total: number; + finished?: boolean | undefined; + } + interface LastSeenObjectIdEventDataType { + lastSeenObjectId: number; + timestamp: number; + } + interface HeapStatsUpdateEventDataType { + /** + * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment. + */ + statsUpdate: number[]; + } + } + namespace IO { + type StreamHandle = string; + interface ReadParameterType { + /** + * Handle of the stream to read. + */ + handle: StreamHandle; + /** + * Seek to the specified offset before reading (if not specified, proceed with offset + * following the last read). Some types of streams may only support sequential reads. + */ + offset?: number | undefined; + /** + * Maximum number of bytes to read (left upon the agent discretion if not specified). + */ + size?: number | undefined; + } + interface CloseParameterType { + /** + * Handle of the stream to close. + */ + handle: StreamHandle; + } + interface ReadReturnType { + /** + * Data that were read. + */ + data: string; + /** + * Set if the end-of-file condition occurred while reading. + */ + eof: boolean; + } + } + namespace Network { + /** + * Resource type as it was perceived by the rendering engine. + */ + type ResourceType = string; + /** + * Unique request identifier. + */ + type RequestId = string; + /** + * UTC time in seconds, counted from January 1, 1970. + */ + type TimeSinceEpoch = number; + /** + * Monotonically increasing time in seconds since an arbitrary point in the past. + */ + type MonotonicTime = number; + /** + * Information about the request initiator. + */ + interface Initiator { + /** + * Type of this initiator. + */ + type: string; + /** + * Initiator JavaScript stack trace, set for Script only. + * Requires the Debugger domain to be enabled. + */ + stack?: Runtime.StackTrace | undefined; + /** + * Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type. + */ + url?: string | undefined; + /** + * Initiator line number, set for Parser type or for Script type (when script is importing + * module) (0-based). + */ + lineNumber?: number | undefined; + /** + * Initiator column number, set for Parser type or for Script type (when script is importing + * module) (0-based). + */ + columnNumber?: number | undefined; + /** + * Set if another request triggered this request (e.g. preflight). + */ + requestId?: RequestId | undefined; + } + /** + * HTTP request data. + */ + interface Request { + url: string; + method: string; + headers: Headers; + hasPostData: boolean; + } + /** + * HTTP response data. + */ + interface Response { + url: string; + status: number; + statusText: string; + headers: Headers; + mimeType: string; + charset: string; + } + /** + * Request / response headers as keys / values of JSON object. + */ + interface Headers { + } + interface LoadNetworkResourcePageResult { + success: boolean; + stream?: IO.StreamHandle | undefined; + } + /** + * WebSocket response data. + */ + interface WebSocketResponse { + /** + * HTTP response status code. + */ + status: number; + /** + * HTTP response status text. + */ + statusText: string; + /** + * HTTP response headers. + */ + headers: Headers; + } + interface EnableParameterType { + /** + * Buffer size in bytes to use when preserving network payloads (XHRs, etc). + * @experimental + */ + maxTotalBufferSize?: number | undefined; + /** + * Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc). + * @experimental + */ + maxResourceBufferSize?: number | undefined; + } + interface GetRequestPostDataParameterType { + /** + * Identifier of the network request to get content for. + */ + requestId: RequestId; + } + interface GetResponseBodyParameterType { + /** + * Identifier of the network request to get content for. + */ + requestId: RequestId; + } + interface StreamResourceContentParameterType { + /** + * Identifier of the request to stream. + */ + requestId: RequestId; + } + interface LoadNetworkResourceParameterType { + /** + * URL of the resource to get content for. + */ + url: string; + } + interface GetRequestPostDataReturnType { + /** + * Request body string, omitting files from multipart requests + */ + postData: string; + } + interface GetResponseBodyReturnType { + /** + * Response body. + */ + body: string; + /** + * True, if content was sent as base64. + */ + base64Encoded: boolean; + } + interface StreamResourceContentReturnType { + /** + * Data that has been buffered until streaming is enabled. + */ + bufferedData: string; + } + interface LoadNetworkResourceReturnType { + resource: LoadNetworkResourcePageResult; + } + interface RequestWillBeSentEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Request data. + */ + request: Request; + /** + * Request initiator. + */ + initiator: Initiator; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * Timestamp. + */ + wallTime: TimeSinceEpoch; + } + interface ResponseReceivedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * Resource type. + */ + type: ResourceType; + /** + * Response data. + */ + response: Response; + } + interface LoadingFailedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * Resource type. + */ + type: ResourceType; + /** + * Error message. + */ + errorText: string; + } + interface LoadingFinishedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + } + interface DataReceivedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * Data chunk length. + */ + dataLength: number; + /** + * Actual bytes received (might be less than dataLength for compressed encodings). + */ + encodedDataLength: number; + /** + * Data that was received. + * @experimental + */ + data?: string | undefined; + } + interface WebSocketCreatedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * WebSocket request URL. + */ + url: string; + /** + * Request initiator. + */ + initiator: Initiator; + } + interface WebSocketClosedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + } + interface WebSocketHandshakeResponseReceivedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * WebSocket response data. + */ + response: WebSocketResponse; + } + } + namespace NodeRuntime { + interface NotifyWhenWaitingForDisconnectParameterType { + enabled: boolean; + } + } + namespace NodeTracing { + interface TraceConfig { + /** + * Controls how the trace buffer stores data. + */ + recordMode?: string | undefined; + /** + * Included category filters. + */ + includedCategories: string[]; + } + interface StartParameterType { + traceConfig: TraceConfig; + } + interface GetCategoriesReturnType { + /** + * A list of supported tracing categories. + */ + categories: string[]; + } + interface DataCollectedEventDataType { + value: object[]; + } + } + namespace NodeWorker { + type WorkerID = string; + /** + * Unique identifier of attached debugging session. + */ + type SessionID = string; + interface WorkerInfo { + workerId: WorkerID; + type: string; + title: string; + url: string; + } + interface SendMessageToWorkerParameterType { + message: string; + /** + * Identifier of the session. + */ + sessionId: SessionID; + } + interface EnableParameterType { + /** + * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger` + * message to run them. + */ + waitForDebuggerOnStart: boolean; + } + interface DetachParameterType { + sessionId: SessionID; + } + interface AttachedToWorkerEventDataType { + /** + * Identifier assigned to the session used to send/receive messages. + */ + sessionId: SessionID; + workerInfo: WorkerInfo; + waitingForDebugger: boolean; + } + interface DetachedFromWorkerEventDataType { + /** + * Detached session identifier. + */ + sessionId: SessionID; + } + interface ReceivedMessageFromWorkerEventDataType { + /** + * Identifier of a session which sends a message. + */ + sessionId: SessionID; + message: string; + } + } + namespace Target { + type SessionID = string; + type TargetID = string; + interface TargetInfo { + targetId: TargetID; + type: string; + title: string; + url: string; + attached: boolean; + canAccessOpener: boolean; + } + interface SetAutoAttachParameterType { + autoAttach: boolean; + waitForDebuggerOnStart: boolean; + } + interface GetTargetsReturnType { + targetInfos: TargetInfo[]; + } + interface TargetCreatedEventDataType { + targetInfo: TargetInfo; + } + interface AttachedToTargetEventDataType { + sessionId: SessionID; + targetInfo: TargetInfo; + waitingForDebugger: boolean; + } + } + namespace DOMStorage { + type SerializedStorageKey = string; + /** + * DOM Storage identifier. + */ + interface StorageId { + /** + * Security origin for the storage. + */ + securityOrigin?: string | undefined; + /** + * Represents a key by which DOM Storage keys its CachedStorageAreas + */ + storageKey?: SerializedStorageKey | undefined; + /** + * Whether the storage is local storage (not session storage). + */ + isLocalStorage: boolean; + } + /** + * DOM Storage item. + */ + type Item = string[]; + interface ClearParameterType { + storageId: StorageId; + } + interface GetDOMStorageItemsParameterType { + storageId: StorageId; + } + interface RemoveDOMStorageItemParameterType { + storageId: StorageId; + key: string; + } + interface SetDOMStorageItemParameterType { + storageId: StorageId; + key: string; + value: string; + } + interface GetDOMStorageItemsReturnType { + entries: Item[]; + } + interface DomStorageItemAddedEventDataType { + storageId: StorageId; + key: string; + newValue: string; + } + interface DomStorageItemRemovedEventDataType { + storageId: StorageId; + key: string; + } + interface DomStorageItemUpdatedEventDataType { + storageId: StorageId; + key: string; + oldValue: string; + newValue: string; + } + interface DomStorageItemsClearedEventDataType { + storageId: StorageId; + } + } + namespace Storage { + type SerializedStorageKey = string; + interface GetStorageKeyParameterType { + frameId?: string | undefined; + } + interface GetStorageKeyReturnType { + storageKey: SerializedStorageKey; + } + } + interface Session { + /** + * Posts a message to the inspector back-end. `callback` will be notified when + * a response is received. `callback` is a function that accepts two optional + * arguments: error and message-specific result. + * + * ```js + * session.post('Runtime.evaluate', { expression: '2 + 2' }, + * (error, { result }) => console.log(result)); + * // Output: { type: 'number', value: 4, description: '4' } + * ``` + * + * The latest version of the V8 inspector protocol is published on the + * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). + * + * Node.js inspector supports all the Chrome DevTools Protocol domains declared + * by V8. Chrome DevTools Protocol domain provides an interface for interacting + * with one of the runtime agents used to inspect the application state and listen + * to the run-time events. + */ + post(method: string, callback?: (err: Error | null, params?: object) => void): void; + post(method: string, params?: object, callback?: (err: Error | null, params?: object) => void): void; + /** + * Returns supported domains. + */ + post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; + /** + * Evaluates expression on global object. + */ + post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + /** + * Add handler to promise with given promise object id. + */ + post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + /** + * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + /** + * Returns properties of a given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + /** + * Releases remote object with given id. + */ + post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void; + /** + * Releases all remote objects that belong to a given group. + */ + post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void; + /** + * Tells inspected instance to run if it was waiting for debugger to attach. + */ + post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void; + /** + * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. + */ + post(method: "Runtime.enable", callback?: (err: Error | null) => void): void; + /** + * Disables reporting of execution contexts creation. + */ + post(method: "Runtime.disable", callback?: (err: Error | null) => void): void; + /** + * Discards collected exceptions and console API calls. + */ + post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void; + /** + * @experimental + */ + post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void; + /** + * Compiles expression. + */ + post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + /** + * Runs script with given id in a given context. + */ + post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + /** + * Returns all let, const and class variables from global scope. + */ + post( + method: "Runtime.globalLexicalScopeNames", + params?: Runtime.GlobalLexicalScopeNamesParameterType, + callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void + ): void; + post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void; + /** + * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. + */ + post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void; + /** + * Disables debugger for given page. + */ + post(method: "Debugger.disable", callback?: (err: Error | null) => void): void; + /** + * Activates / deactivates all breakpoints on the page. + */ + post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void; + /** + * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + */ + post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void; + /** + * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. + */ + post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + /** + * Sets JavaScript breakpoint at a given location. + */ + post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + /** + * Removes JavaScript breakpoint. + */ + post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void; + /** + * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. + */ + post( + method: "Debugger.getPossibleBreakpoints", + params?: Debugger.GetPossibleBreakpointsParameterType, + callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void + ): void; + post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; + /** + * Continues execution until specific location is reached. + */ + post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void; + /** + * @experimental + */ + post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void; + /** + * Steps over the statement. + */ + post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void; + /** + * Steps into the function call. + */ + post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void; + /** + * Steps out of the function call. + */ + post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void; + /** + * Stops on the next JavaScript statement. + */ + post(method: "Debugger.pause", callback?: (err: Error | null) => void): void; + /** + * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. + * @experimental + */ + post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void; + /** + * Resumes JavaScript execution. + */ + post(method: "Debugger.resume", callback?: (err: Error | null) => void): void; + /** + * Returns stack trace with given stackTraceId. + * @experimental + */ + post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + /** + * Searches for given string in script content. + */ + post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + /** + * Edits JavaScript source live. + */ + post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + /** + * Restarts particular call frame from the beginning. + */ + post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + /** + * Returns source for the script with given id. + */ + post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + /** + * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. + */ + post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void; + /** + * Evaluates expression on a given call frame. + */ + post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + /** + * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. + */ + post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void; + /** + * Changes return value in top frame. Available only at return break position. + * @experimental + */ + post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void; + /** + * Enables or disables async call stacks tracking. + */ + post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void; + /** + * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * @experimental + */ + post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void; + /** + * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. + * @experimental + */ + post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void; + /** + * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. + */ + post(method: "Console.enable", callback?: (err: Error | null) => void): void; + /** + * Disables console domain, prevents further console messages from being reported to the client. + */ + post(method: "Console.disable", callback?: (err: Error | null) => void): void; + /** + * Does nothing. + */ + post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void; + post(method: "Profiler.enable", callback?: (err: Error | null) => void): void; + post(method: "Profiler.disable", callback?: (err: Error | null) => void): void; + /** + * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + */ + post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void; + post(method: "Profiler.start", callback?: (err: Error | null) => void): void; + post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; + /** + * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. + */ + post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void; + /** + * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. + */ + post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void; + /** + * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. + */ + post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; + /** + * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. + */ + post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; + post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void; + post( + method: "HeapProfiler.getObjectByHeapObjectId", + params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, + callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void + ): void; + post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + */ + post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; + post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void; + /** + * Read a chunk of the stream + */ + post(method: "IO.read", params?: IO.ReadParameterType, callback?: (err: Error | null, params: IO.ReadReturnType) => void): void; + post(method: "IO.read", callback?: (err: Error | null, params: IO.ReadReturnType) => void): void; + post(method: "IO.close", params?: IO.CloseParameterType, callback?: (err: Error | null) => void): void; + post(method: "IO.close", callback?: (err: Error | null) => void): void; + /** + * Disables network tracking, prevents network events from being sent to the client. + */ + post(method: "Network.disable", callback?: (err: Error | null) => void): void; + /** + * Enables network tracking, network events will now be delivered to the client. + */ + post(method: "Network.enable", params?: Network.EnableParameterType, callback?: (err: Error | null) => void): void; + post(method: "Network.enable", callback?: (err: Error | null) => void): void; + /** + * Returns post data sent with the request. Returns an error when no data was sent with the request. + */ + post(method: "Network.getRequestPostData", params?: Network.GetRequestPostDataParameterType, callback?: (err: Error | null, params: Network.GetRequestPostDataReturnType) => void): void; + post(method: "Network.getRequestPostData", callback?: (err: Error | null, params: Network.GetRequestPostDataReturnType) => void): void; + /** + * Returns content served for the given request. + */ + post(method: "Network.getResponseBody", params?: Network.GetResponseBodyParameterType, callback?: (err: Error | null, params: Network.GetResponseBodyReturnType) => void): void; + post(method: "Network.getResponseBody", callback?: (err: Error | null, params: Network.GetResponseBodyReturnType) => void): void; + /** + * Enables streaming of the response for the given requestId. + * If enabled, the dataReceived event contains the data that was received during streaming. + * @experimental + */ + post( + method: "Network.streamResourceContent", + params?: Network.StreamResourceContentParameterType, + callback?: (err: Error | null, params: Network.StreamResourceContentReturnType) => void + ): void; + post(method: "Network.streamResourceContent", callback?: (err: Error | null, params: Network.StreamResourceContentReturnType) => void): void; + /** + * Fetches the resource and returns the content. + */ + post(method: "Network.loadNetworkResource", params?: Network.LoadNetworkResourceParameterType, callback?: (err: Error | null, params: Network.LoadNetworkResourceReturnType) => void): void; + post(method: "Network.loadNetworkResource", callback?: (err: Error | null, params: Network.LoadNetworkResourceReturnType) => void): void; + /** + * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`. + */ + post(method: "NodeRuntime.enable", callback?: (err: Error | null) => void): void; + /** + * Disable NodeRuntime events + */ + post(method: "NodeRuntime.disable", callback?: (err: Error | null) => void): void; + /** + * Enable the `NodeRuntime.waitingForDisconnect`. + */ + post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", callback?: (err: Error | null) => void): void; + /** + * Gets supported tracing categories. + */ + post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; + /** + * Start trace events collection. + */ + post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void; + /** + * Stop trace events collection. Remaining collected events will be sent as a sequence of + * dataCollected events followed by tracingComplete event. + */ + post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void; + /** + * Sends protocol message over session with given id. + */ + post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void; + /** + * Instructs the inspector to attach to running workers. Will also attach to new workers + * as they start + */ + post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void; + /** + * Detaches from all running workers and disables attaching to new workers as they are started. + */ + post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void; + /** + * Detached from the worker with given sessionId. + */ + post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.detach", callback?: (err: Error | null) => void): void; + post(method: "Target.getTargets", callback?: (err: Error | null, params: Target.GetTargetsReturnType) => void): void; + post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType, callback?: (err: Error | null) => void): void; + post(method: "Target.setAutoAttach", callback?: (err: Error | null) => void): void; + post(method: "DOMStorage.clear", params?: DOMStorage.ClearParameterType, callback?: (err: Error | null) => void): void; + post(method: "DOMStorage.clear", callback?: (err: Error | null) => void): void; + /** + * Disables storage tracking, prevents storage events from being sent to the client. + */ + post(method: "DOMStorage.disable", callback?: (err: Error | null) => void): void; + /** + * Enables storage tracking, storage events will now be delivered to the client. + */ + post(method: "DOMStorage.enable", callback?: (err: Error | null) => void): void; + post( + method: "DOMStorage.getDOMStorageItems", + params?: DOMStorage.GetDOMStorageItemsParameterType, + callback?: (err: Error | null, params: DOMStorage.GetDOMStorageItemsReturnType) => void + ): void; + post(method: "DOMStorage.getDOMStorageItems", callback?: (err: Error | null, params: DOMStorage.GetDOMStorageItemsReturnType) => void): void; + post(method: "DOMStorage.removeDOMStorageItem", params?: DOMStorage.RemoveDOMStorageItemParameterType, callback?: (err: Error | null) => void): void; + post(method: "DOMStorage.removeDOMStorageItem", callback?: (err: Error | null) => void): void; + post(method: "DOMStorage.setDOMStorageItem", params?: DOMStorage.SetDOMStorageItemParameterType, callback?: (err: Error | null) => void): void; + post(method: "DOMStorage.setDOMStorageItem", callback?: (err: Error | null) => void): void; + /** + * @experimental + */ + post(method: "Storage.getStorageKey", params?: Storage.GetStorageKeyParameterType, callback?: (err: Error | null, params: Storage.GetStorageKeyReturnType) => void): void; + post(method: "Storage.getStorageKey", callback?: (err: Error | null, params: Storage.GetStorageKeyReturnType) => void): void; + addListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + addListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + addListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + addListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + addListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + addListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + addListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + addListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + addListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + addListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + addListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + addListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + addListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + addListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + addListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "inspectorNotification", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextsCleared"): boolean; + emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; + emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; + emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; + emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; + emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; + emit(event: "Debugger.paused", message: InspectorNotification): boolean; + emit(event: "Debugger.resumed"): boolean; + emit(event: "Console.messageAdded", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.resetProfiles"): boolean; + emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; + emit(event: "Network.requestWillBeSent", message: InspectorNotification): boolean; + emit(event: "Network.responseReceived", message: InspectorNotification): boolean; + emit(event: "Network.loadingFailed", message: InspectorNotification): boolean; + emit(event: "Network.loadingFinished", message: InspectorNotification): boolean; + emit(event: "Network.dataReceived", message: InspectorNotification): boolean; + emit(event: "Network.webSocketCreated", message: InspectorNotification): boolean; + emit(event: "Network.webSocketClosed", message: InspectorNotification): boolean; + emit(event: "Network.webSocketHandshakeResponseReceived", message: InspectorNotification): boolean; + emit(event: "NodeRuntime.waitingForDisconnect"): boolean; + emit(event: "NodeRuntime.waitingForDebugger"): boolean; + emit(event: "NodeTracing.dataCollected", message: InspectorNotification): boolean; + emit(event: "NodeTracing.tracingComplete"): boolean; + emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification): boolean; + emit(event: "Target.targetCreated", message: InspectorNotification): boolean; + emit(event: "Target.attachedToTarget", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemAdded", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemRemoved", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemUpdated", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemsCleared", message: InspectorNotification): boolean; + on(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + on(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + on(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + on(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.resetProfiles", listener: () => void): this; + on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + on(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + on(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + on(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + on(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + on(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + on(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + on(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + on(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + on(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + on(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + on(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + on(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + once(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + once(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + once(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.resetProfiles", listener: () => void): this; + once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + once(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + once(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + once(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + once(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + once(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + once(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + once(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + once(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + once(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + once(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + once(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + once(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + prependListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + prependListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + prependListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + prependListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + prependListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + prependListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + prependListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependOnceListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + prependOnceListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + prependOnceListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + prependOnceListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + prependOnceListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + prependOnceListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + prependOnceListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + prependOnceListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + } +} +declare module "node:inspector/promises" { + export { + Schema, + Runtime, + Debugger, + Console, + Profiler, + HeapProfiler, + IO, + Network, + NodeRuntime, + NodeTracing, + NodeWorker, + Target, + DOMStorage, + Storage, + } from 'inspector'; +} +declare module "node:inspector/promises" { + import { + InspectorNotification, + Schema, + Runtime, + Debugger, + Console, + Profiler, + HeapProfiler, + IO, + Network, + NodeRuntime, + NodeTracing, + NodeWorker, + Target, + DOMStorage, + Storage, + } from "inspector"; + /** + * The `inspector.Session` is used for dispatching messages to the V8 inspector + * back-end and receiving message responses and notifications. + * @since v19.0.0 + */ + interface Session { + /** + * Posts a message to the inspector back-end. + * + * ```js + * import { Session } from 'node:inspector/promises'; + * try { + * const session = new Session(); + * session.connect(); + * const result = await session.post('Runtime.evaluate', { expression: '2 + 2' }); + * console.log(result); + * } catch (error) { + * console.error(error); + * } + * // Output: { result: { type: 'number', value: 4, description: '4' } } + * ``` + * + * The latest version of the V8 inspector protocol is published on the + * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). + * + * Node.js inspector supports all the Chrome DevTools Protocol domains declared + * by V8. Chrome DevTools Protocol domain provides an interface for interacting + * with one of the runtime agents used to inspect the application state and listen + * to the run-time events. + */ + post(method: string, params?: object): Promise; + /** + * Returns supported domains. + */ + post(method: "Schema.getDomains"): Promise; + /** + * Evaluates expression on global object. + */ + post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType): Promise; + /** + * Add handler to promise with given promise object id. + */ + post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType): Promise; + /** + * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType): Promise; + /** + * Returns properties of a given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType): Promise; + /** + * Releases remote object with given id. + */ + post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType): Promise; + /** + * Releases all remote objects that belong to a given group. + */ + post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType): Promise; + /** + * Tells inspected instance to run if it was waiting for debugger to attach. + */ + post(method: "Runtime.runIfWaitingForDebugger"): Promise; + /** + * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. + */ + post(method: "Runtime.enable"): Promise; + /** + * Disables reporting of execution contexts creation. + */ + post(method: "Runtime.disable"): Promise; + /** + * Discards collected exceptions and console API calls. + */ + post(method: "Runtime.discardConsoleEntries"): Promise; + /** + * @experimental + */ + post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType): Promise; + /** + * Compiles expression. + */ + post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType): Promise; + /** + * Runs script with given id in a given context. + */ + post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType): Promise; + post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType): Promise; + /** + * Returns all let, const and class variables from global scope. + */ + post(method: "Runtime.globalLexicalScopeNames", params?: Runtime.GlobalLexicalScopeNamesParameterType): Promise; + /** + * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. + */ + post(method: "Debugger.enable"): Promise; + /** + * Disables debugger for given page. + */ + post(method: "Debugger.disable"): Promise; + /** + * Activates / deactivates all breakpoints on the page. + */ + post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType): Promise; + /** + * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + */ + post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType): Promise; + /** + * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. + */ + post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType): Promise; + /** + * Sets JavaScript breakpoint at a given location. + */ + post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType): Promise; + /** + * Removes JavaScript breakpoint. + */ + post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType): Promise; + /** + * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. + */ + post(method: "Debugger.getPossibleBreakpoints", params?: Debugger.GetPossibleBreakpointsParameterType): Promise; + /** + * Continues execution until specific location is reached. + */ + post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType): Promise; + /** + * @experimental + */ + post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType): Promise; + /** + * Steps over the statement. + */ + post(method: "Debugger.stepOver"): Promise; + /** + * Steps into the function call. + */ + post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType): Promise; + /** + * Steps out of the function call. + */ + post(method: "Debugger.stepOut"): Promise; + /** + * Stops on the next JavaScript statement. + */ + post(method: "Debugger.pause"): Promise; + /** + * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. + * @experimental + */ + post(method: "Debugger.scheduleStepIntoAsync"): Promise; + /** + * Resumes JavaScript execution. + */ + post(method: "Debugger.resume"): Promise; + /** + * Returns stack trace with given stackTraceId. + * @experimental + */ + post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType): Promise; + /** + * Searches for given string in script content. + */ + post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType): Promise; + /** + * Edits JavaScript source live. + */ + post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType): Promise; + /** + * Restarts particular call frame from the beginning. + */ + post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType): Promise; + /** + * Returns source for the script with given id. + */ + post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType): Promise; + /** + * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. + */ + post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType): Promise; + /** + * Evaluates expression on a given call frame. + */ + post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType): Promise; + /** + * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. + */ + post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType): Promise; + /** + * Changes return value in top frame. Available only at return break position. + * @experimental + */ + post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType): Promise; + /** + * Enables or disables async call stacks tracking. + */ + post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType): Promise; + /** + * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * @experimental + */ + post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType): Promise; + /** + * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. + * @experimental + */ + post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType): Promise; + /** + * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. + */ + post(method: "Console.enable"): Promise; + /** + * Disables console domain, prevents further console messages from being reported to the client. + */ + post(method: "Console.disable"): Promise; + /** + * Does nothing. + */ + post(method: "Console.clearMessages"): Promise; + post(method: "Profiler.enable"): Promise; + post(method: "Profiler.disable"): Promise; + /** + * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + */ + post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType): Promise; + post(method: "Profiler.start"): Promise; + post(method: "Profiler.stop"): Promise; + /** + * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. + */ + post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType): Promise; + /** + * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. + */ + post(method: "Profiler.stopPreciseCoverage"): Promise; + /** + * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. + */ + post(method: "Profiler.takePreciseCoverage"): Promise; + /** + * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. + */ + post(method: "Profiler.getBestEffortCoverage"): Promise; + post(method: "HeapProfiler.enable"): Promise; + post(method: "HeapProfiler.disable"): Promise; + post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType): Promise; + post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType): Promise; + post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType): Promise; + post(method: "HeapProfiler.collectGarbage"): Promise; + post(method: "HeapProfiler.getObjectByHeapObjectId", params?: HeapProfiler.GetObjectByHeapObjectIdParameterType): Promise; + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + */ + post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType): Promise; + post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType): Promise; + post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType): Promise; + post(method: "HeapProfiler.stopSampling"): Promise; + post(method: "HeapProfiler.getSamplingProfile"): Promise; + /** + * Read a chunk of the stream + */ + post(method: "IO.read", params?: IO.ReadParameterType): Promise; + post(method: "IO.close", params?: IO.CloseParameterType): Promise; + /** + * Disables network tracking, prevents network events from being sent to the client. + */ + post(method: "Network.disable"): Promise; + /** + * Enables network tracking, network events will now be delivered to the client. + */ + post(method: "Network.enable", params?: Network.EnableParameterType): Promise; + /** + * Returns post data sent with the request. Returns an error when no data was sent with the request. + */ + post(method: "Network.getRequestPostData", params?: Network.GetRequestPostDataParameterType): Promise; + /** + * Returns content served for the given request. + */ + post(method: "Network.getResponseBody", params?: Network.GetResponseBodyParameterType): Promise; + /** + * Enables streaming of the response for the given requestId. + * If enabled, the dataReceived event contains the data that was received during streaming. + * @experimental + */ + post(method: "Network.streamResourceContent", params?: Network.StreamResourceContentParameterType): Promise; + /** + * Fetches the resource and returns the content. + */ + post(method: "Network.loadNetworkResource", params?: Network.LoadNetworkResourceParameterType): Promise; + /** + * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`. + */ + post(method: "NodeRuntime.enable"): Promise; + /** + * Disable NodeRuntime events + */ + post(method: "NodeRuntime.disable"): Promise; + /** + * Enable the `NodeRuntime.waitingForDisconnect`. + */ + post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType): Promise; + /** + * Gets supported tracing categories. + */ + post(method: "NodeTracing.getCategories"): Promise; + /** + * Start trace events collection. + */ + post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType): Promise; + /** + * Stop trace events collection. Remaining collected events will be sent as a sequence of + * dataCollected events followed by tracingComplete event. + */ + post(method: "NodeTracing.stop"): Promise; + /** + * Sends protocol message over session with given id. + */ + post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType): Promise; + /** + * Instructs the inspector to attach to running workers. Will also attach to new workers + * as they start + */ + post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType): Promise; + /** + * Detaches from all running workers and disables attaching to new workers as they are started. + */ + post(method: "NodeWorker.disable"): Promise; + /** + * Detached from the worker with given sessionId. + */ + post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType): Promise; + post(method: "Target.getTargets"): Promise; + post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType): Promise; + post(method: "DOMStorage.clear", params?: DOMStorage.ClearParameterType): Promise; + /** + * Disables storage tracking, prevents storage events from being sent to the client. + */ + post(method: "DOMStorage.disable"): Promise; + /** + * Enables storage tracking, storage events will now be delivered to the client. + */ + post(method: "DOMStorage.enable"): Promise; + post(method: "DOMStorage.getDOMStorageItems", params?: DOMStorage.GetDOMStorageItemsParameterType): Promise; + post(method: "DOMStorage.removeDOMStorageItem", params?: DOMStorage.RemoveDOMStorageItemParameterType): Promise; + post(method: "DOMStorage.setDOMStorageItem", params?: DOMStorage.SetDOMStorageItemParameterType): Promise; + /** + * @experimental + */ + post(method: "Storage.getStorageKey", params?: Storage.GetStorageKeyParameterType): Promise; + addListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + addListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + addListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + addListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + addListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + addListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + addListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + addListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + addListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + addListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + addListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + addListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + addListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + addListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + addListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "inspectorNotification", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextsCleared"): boolean; + emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; + emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; + emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; + emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; + emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; + emit(event: "Debugger.paused", message: InspectorNotification): boolean; + emit(event: "Debugger.resumed"): boolean; + emit(event: "Console.messageAdded", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.resetProfiles"): boolean; + emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; + emit(event: "Network.requestWillBeSent", message: InspectorNotification): boolean; + emit(event: "Network.responseReceived", message: InspectorNotification): boolean; + emit(event: "Network.loadingFailed", message: InspectorNotification): boolean; + emit(event: "Network.loadingFinished", message: InspectorNotification): boolean; + emit(event: "Network.dataReceived", message: InspectorNotification): boolean; + emit(event: "Network.webSocketCreated", message: InspectorNotification): boolean; + emit(event: "Network.webSocketClosed", message: InspectorNotification): boolean; + emit(event: "Network.webSocketHandshakeResponseReceived", message: InspectorNotification): boolean; + emit(event: "NodeRuntime.waitingForDisconnect"): boolean; + emit(event: "NodeRuntime.waitingForDebugger"): boolean; + emit(event: "NodeTracing.dataCollected", message: InspectorNotification): boolean; + emit(event: "NodeTracing.tracingComplete"): boolean; + emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification): boolean; + emit(event: "Target.targetCreated", message: InspectorNotification): boolean; + emit(event: "Target.attachedToTarget", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemAdded", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemRemoved", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemUpdated", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemsCleared", message: InspectorNotification): boolean; + on(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + on(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + on(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + on(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.resetProfiles", listener: () => void): this; + on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + on(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + on(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + on(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + on(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + on(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + on(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + on(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + on(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + on(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + on(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + on(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + on(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + once(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + once(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + once(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.resetProfiles", listener: () => void): this; + once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + once(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + once(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + once(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + once(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + once(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + once(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + once(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + once(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + once(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + once(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + once(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + once(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + prependListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + prependListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + prependListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + prependListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + prependListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + prependListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + prependListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependOnceListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + prependOnceListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + prependOnceListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + prependOnceListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + prependOnceListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + prependOnceListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + prependOnceListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + prependOnceListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + } +} diff --git a/node_modules/@types/node/inspector/promises.d.ts b/node_modules/@types/node/inspector/promises.d.ts new file mode 100644 index 0000000..e75ff20 --- /dev/null +++ b/node_modules/@types/node/inspector/promises.d.ts @@ -0,0 +1,35 @@ +declare module "node:inspector/promises" { + import { EventEmitter } from "node:events"; + export { close, console, NetworkResources, open, url, waitForDebugger } from "node:inspector"; + /** + * The `inspector.Session` is used for dispatching messages to the V8 inspector + * back-end and receiving message responses and notifications. + * @since v19.0.0 + */ + export class Session extends EventEmitter { + /** + * Create a new instance of the inspector.Session class. + * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend. + */ + constructor(); + /** + * Connects a session to the inspector back-end. + */ + connect(): void; + /** + * Connects a session to the inspector back-end. + * An exception will be thrown if this API was not called on a Worker thread. + * @since v12.11.0 + */ + connectToMainThread(): void; + /** + * Immediately close the session. All pending message callbacks will be called with an error. + * `session.connect()` will need to be called to be able to send messages again. + * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. + */ + disconnect(): void; + } +} +declare module "inspector/promises" { + export * from "node:inspector/promises"; +} diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts new file mode 100644 index 0000000..792a0bd --- /dev/null +++ b/node_modules/@types/node/module.d.ts @@ -0,0 +1,726 @@ +declare module "node:module" { + import { URL } from "node:url"; + class Module { + constructor(id: string, parent?: Module); + } + interface Module extends NodeJS.Module {} + namespace Module { + export { Module }; + } + namespace Module { + /** + * A list of the names of all modules provided by Node.js. Can be used to verify + * if a module is maintained by a third party or not. + * + * Note: the list doesn't contain prefix-only modules like `node:test`. + * @since v9.3.0, v8.10.0, v6.13.0 + */ + const builtinModules: readonly string[]; + /** + * @since v12.2.0 + * @param path Filename to be used to construct the require + * function. Must be a file URL object, file URL string, or absolute path + * string. + */ + function createRequire(path: string | URL): NodeJS.Require; + namespace constants { + /** + * The following constants are returned as the `status` field in the object returned by + * {@link enableCompileCache} to indicate the result of the attempt to enable the + * [module compile cache](https://nodejs.org/docs/latest-v26.x/api/module.html#module-compile-cache). + * @since v22.8.0 + */ + namespace compileCacheStatus { + /** + * Node.js has enabled the compile cache successfully. The directory used to store the + * compile cache will be returned in the `directory` field in the + * returned object. + */ + const ENABLED: number; + /** + * The compile cache has already been enabled before, either by a previous call to + * {@link enableCompileCache}, or by the `NODE_COMPILE_CACHE=dir` + * environment variable. The directory used to store the + * compile cache will be returned in the `directory` field in the + * returned object. + */ + const ALREADY_ENABLED: number; + /** + * Node.js fails to enable the compile cache. This can be caused by the lack of + * permission to use the specified directory, or various kinds of file system errors. + * The detail of the failure will be returned in the `message` field in the + * returned object. + */ + const FAILED: number; + /** + * Node.js cannot enable the compile cache because the environment variable + * `NODE_DISABLE_COMPILE_CACHE=1` has been set. + */ + const DISABLED: number; + } + } + interface EnableCompileCacheOptions { + /** + * Optional. Directory to store the compile cache. If not specified, + * the directory specified by the `NODE_COMPILE_CACHE=dir` environment variable + * will be used if it's set, or `path.join(os.tmpdir(), 'node-compile-cache')` + * otherwise. + * @since v25.0.0 + */ + directory?: string | undefined; + /** + * Optional. If `true`, enables portable compile cache so that + * the cache can be reused even if the project directory is moved. This is a best-effort + * feature. If not specified, it will depend on whether the environment variable + * `NODE_COMPILE_CACHE_PORTABLE=1` is set. + * @since v25.0.0 + */ + portable?: boolean | undefined; + } + interface EnableCompileCacheResult { + /** + * One of the {@link constants.compileCacheStatus} + */ + status: number; + /** + * If Node.js cannot enable the compile cache, this contains + * the error message. Only set if `status` is `module.constants.compileCacheStatus.FAILED`. + */ + message?: string; + /** + * If the compile cache is enabled, this contains the directory + * where the compile cache is stored. Only set if `status` is + * `module.constants.compileCacheStatus.ENABLED` or + * `module.constants.compileCacheStatus.ALREADY_ENABLED`. + */ + directory?: string; + } + /** + * Enable [module compile cache](https://nodejs.org/docs/latest-v26.x/api/module.html#module-compile-cache) + * in the current Node.js instance. + * + * For general use cases, it's recommended to call `module.enableCompileCache()` without + * specifying the `options.directory`, so that the directory can be overridden by the + * `NODE_COMPILE_CACHE` environment variable when necessary. + * + * Since compile cache is supposed to be a optimization that is not mission critical, this + * method is designed to not throw any exception when the compile cache cannot be enabled. + * Instead, it will return an object containing an error message in the `message` field to + * aid debugging. If compile cache is enabled successfully, the `directory` field in the + * returned object contains the path to the directory where the compile cache is stored. The + * `status` field in the returned object would be one of the `module.constants.compileCacheStatus` + * values to indicate the result of the attempt to enable the + * [module compile cache](https://nodejs.org/docs/latest-v26.x/api/module.html#module-compile-cache). + * + * This method only affects the current Node.js instance. To enable it in child worker threads, + * either call this method in child worker threads too, or set the + * `process.env.NODE_COMPILE_CACHE` value to compile cache directory so the behavior can + * be inherited into the child workers. The directory can be obtained either from the + * `directory` field returned by this method, or with {@link getCompileCacheDir}. + * @since v22.8.0 + * @param options Optional. If a string is passed, it is considered to be `options.directory`. + */ + function enableCompileCache(options?: string | EnableCompileCacheOptions): EnableCompileCacheResult; + /** + * Flush the [module compile cache](https://nodejs.org/docs/latest-v26.x/api/module.html#module-compile-cache) + * accumulated from modules already loaded + * in the current Node.js instance to disk. This returns after all the flushing + * file system operations come to an end, no matter they succeed or not. If there + * are any errors, this will fail silently, since compile cache misses should not + * interfere with the actual operation of the application. + * @since v22.10.0 + */ + function flushCompileCache(): void; + /** + * @since v22.8.0 + * @return Path to the [module compile cache](https://nodejs.org/docs/latest-v26.x/api/module.html#module-compile-cache) + * directory if it is enabled, or `undefined` otherwise. + */ + function getCompileCacheDir(): string | undefined; + /** + * ```text + * /path/to/project + * ├ packages/ + * ├ bar/ + * ├ bar.js + * └ package.json // name = '@foo/bar' + * └ qux/ + * ├ node_modules/ + * └ some-package/ + * └ package.json // name = 'some-package' + * ├ qux.js + * └ package.json // name = '@foo/qux' + * ├ main.js + * └ package.json // name = '@foo' + * ``` + * ```js + * // /path/to/project/packages/bar/bar.js + * import { findPackageJSON } from 'node:module'; + * + * findPackageJSON('..', import.meta.url); + * // '/path/to/project/package.json' + * // Same result when passing an absolute specifier instead: + * findPackageJSON(new URL('../', import.meta.url)); + * findPackageJSON(import.meta.resolve('../')); + * + * findPackageJSON('some-package', import.meta.url); + * // '/path/to/project/packages/bar/node_modules/some-package/package.json' + * // When passing an absolute specifier, you might get a different result if the + * // resolved module is inside a subfolder that has nested `package.json`. + * findPackageJSON(import.meta.resolve('some-package')); + * // '/path/to/project/packages/bar/node_modules/some-package/some-subfolder/package.json' + * + * findPackageJSON('@foo/qux', import.meta.url); + * // '/path/to/project/packages/qux/package.json' + * ``` + * @since v22.14.0 + * @param specifier The specifier for the module whose `package.json` to + * retrieve. When passing a _bare specifier_, the `package.json` at the root of + * the package is returned. When passing a _relative specifier_ or an _absolute specifier_, + * the closest parent `package.json` is returned. + * @param base The absolute location (`file:` URL string or FS path) of the + * containing module. For CJS, use `__filename` (not `__dirname`!); for ESM, use + * `import.meta.url`. You do not need to pass it if `specifier` is an _absolute specifier_. + * @returns A path if the `package.json` is found. When `startLocation` + * is a package, the package's root `package.json`; when a relative or unresolved, the closest + * `package.json` to the `startLocation`. + */ + function findPackageJSON(specifier: string | URL, base?: string | URL): string | undefined; + /** + * @since v18.6.0, v16.17.0 + */ + function isBuiltin(moduleName: string): boolean; + interface RegisterOptions { + /** + * If you want to resolve `specifier` relative to a + * base URL, such as `import.meta.url`, you can pass that URL here. This + * property is ignored if the `parentURL` is supplied as the second argument. + * @default 'data:' + */ + parentURL?: string | URL | undefined; + /** + * Any arbitrary, cloneable JavaScript value to pass into the + * {@link initialize} hook. + */ + data?: Data | undefined; + /** + * [Transferable objects](https://nodejs.org/docs/latest-v26.x/api/worker_threads.html#portpostmessagevalue-transferlist) + * to be passed into the `initialize` hook. + */ + transferList?: any[] | undefined; + } + /* eslint-disable @definitelytyped/no-unnecessary-generics */ + /** + * Register a module that exports hooks that customize Node.js module + * resolution and loading behavior. See + * [Customization hooks](https://nodejs.org/docs/latest-v26.x/api/module.html#customization-hooks). + * + * This feature requires `--allow-worker` if used with the + * [Permission Model](https://nodejs.org/docs/latest-v26.x/api/permissions.html#permission-model). + * @since v20.6.0, v18.19.0 + * @deprecated Use `module.registerHooks()` instead. + * @param specifier Customization hooks to be registered; this should be + * the same string that would be passed to `import()`, except that if it is + * relative, it is resolved relative to `parentURL`. + * @param parentURL f you want to resolve `specifier` relative to a base + * URL, such as `import.meta.url`, you can pass that URL here. + */ + function register( + specifier: string | URL, + parentURL?: string | URL, + options?: RegisterOptions, + ): void; + function register(specifier: string | URL, options?: RegisterOptions): void; + interface RegisterHooksOptions { + /** + * See [load hook](https://nodejs.org/docs/latest-v26.x/api/module.html#loadurl-context-nextload). + * @default undefined + */ + load?: LoadHookSync | undefined; + /** + * See [resolve hook](https://nodejs.org/docs/latest-v26.x/api/module.html#resolvespecifier-context-nextresolve). + * @default undefined + */ + resolve?: ResolveHookSync | undefined; + } + interface ModuleHooks { + /** + * Deregister the hook instance. + */ + deregister(): void; + } + /** + * Register [hooks](https://nodejs.org/docs/latest-v26.x/api/module.html#customization-hooks) + * that customize Node.js module resolution and loading behavior. + * @since v22.15.0 + * @experimental + */ + function registerHooks(options: RegisterHooksOptions): ModuleHooks; + interface StripTypeScriptTypesOptions { + /** + * Possible values are: + * * `'strip'` Only strip type annotations without performing the transformation of TypeScript features. + * @default 'strip' + */ + mode?: "strip" | undefined; + /** + * Specifies the source url used in the source map. + */ + sourceUrl?: string | undefined; + } + /** + * `module.stripTypeScriptTypes()` removes type annotations from TypeScript code. It + * can be used to strip type annotations from TypeScript code before running it + * with `vm.runInContext()` or `vm.compileFunction()`. + * + * By default, it will throw an error if the code contains TypeScript features + * that require transformation, such as `enum`s. See [type-stripping](https://nodejs.org/docs/latest-v26.x/api/typescript.md#type-stripping) for more information. + * + * _WARNING_: The output of this function should not be considered stable across Node.js versions, + * due to changes in the TypeScript parser. + * + * ```js + * import { stripTypeScriptTypes } from 'node:module'; + * const code = 'const a: number = 1;'; + * const strippedCode = stripTypeScriptTypes(code); + * console.log(strippedCode); + * // Prints: const a = 1; + * ``` + * + * If `sourceUrl` is provided, it will be used appended as a comment at the end of the output: + * + * ```js + * import { stripTypeScriptTypes } from 'node:module'; + * const code = 'const a: number = 1;'; + * const strippedCode = stripTypeScriptTypes(code, { mode: 'strip', sourceUrl: 'source.ts' }); + * console.log(strippedCode); + * // Prints: const a = 1\n\n//# sourceURL=source.ts; + * ``` + * @since v22.13.0 + * @param code The code to strip type annotations from. + * @returns The code with type annotations stripped. + */ + function stripTypeScriptTypes(code: string, options?: StripTypeScriptTypesOptions): string; + /* eslint-enable @definitelytyped/no-unnecessary-generics */ + /** + * The `module.syncBuiltinESMExports()` method updates all the live bindings for + * builtin `ES Modules` to match the properties of the `CommonJS` exports. It + * does not add or remove exported names from the `ES Modules`. + * + * ```js + * import fs from 'node:fs'; + * import assert from 'node:assert'; + * import { syncBuiltinESMExports } from 'node:module'; + * + * fs.readFile = newAPI; + * + * delete fs.readFileSync; + * + * function newAPI() { + * // ... + * } + * + * fs.newAPI = newAPI; + * + * syncBuiltinESMExports(); + * + * import('node:fs').then((esmFS) => { + * // It syncs the existing readFile property with the new value + * assert.strictEqual(esmFS.readFile, newAPI); + * // readFileSync has been deleted from the required fs + * assert.strictEqual('readFileSync' in fs, false); + * // syncBuiltinESMExports() does not remove readFileSync from esmFS + * assert.strictEqual('readFileSync' in esmFS, true); + * // syncBuiltinESMExports() does not add names + * assert.strictEqual(esmFS.newAPI, undefined); + * }); + * ``` + * @since v12.12.0 + */ + function syncBuiltinESMExports(): void; + interface ImportAttributes extends NodeJS.Dict { + type?: string | undefined; + } + type ImportPhase = "source" | "evaluation"; + type ModuleFormat = + | "addon" + | "builtin" + | "commonjs" + | "commonjs-typescript" + | "json" + | "module" + | "module-typescript" + | "wasm"; + type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray; + type InitializeHook = (data: Data) => void | Promise; + interface ResolveHookContext { + conditions: string[]; + importAttributes: ImportAttributes; + parentURL: string | undefined; + } + interface ResolveFnOutput { + format?: string | null | undefined; + importAttributes?: ImportAttributes | undefined; + shortCircuit?: boolean | undefined; + url: string; + } + type ResolveHook = ( + specifier: string, + context: ResolveHookContext, + nextResolve: ( + specifier: string, + context?: Partial, + ) => ResolveFnOutput | Promise, + ) => ResolveFnOutput | Promise; + type ResolveHookSync = ( + specifier: string, + context: ResolveHookContext, + nextResolve: ( + specifier: string, + context?: Partial, + ) => ResolveFnOutput, + ) => ResolveFnOutput; + interface LoadHookContext { + conditions: string[]; + format: string | null | undefined; + importAttributes: ImportAttributes; + } + interface LoadFnOutput { + format: string | null | undefined; + shortCircuit?: boolean | undefined; + source?: ModuleSource | undefined; + } + type LoadHook = ( + url: string, + context: LoadHookContext, + nextLoad: ( + url: string, + context?: Partial, + ) => LoadFnOutput | Promise, + ) => LoadFnOutput | Promise; + type LoadHookSync = ( + url: string, + context: LoadHookContext, + nextLoad: ( + url: string, + context?: Partial, + ) => LoadFnOutput, + ) => LoadFnOutput; + interface SourceMapsSupport { + /** + * If the source maps support is enabled + */ + enabled: boolean; + /** + * If the support is enabled for files in `node_modules`. + */ + nodeModules: boolean; + /** + * If the support is enabled for generated code from `eval` or `new Function`. + */ + generatedCode: boolean; + } + /** + * This method returns whether the [Source Map v3](https://tc39.es/ecma426/) support for stack + * traces is enabled. + * @since v23.7.0, v22.14.0 + */ + function getSourceMapsSupport(): SourceMapsSupport; + /** + * `path` is the resolved path for the file for which a corresponding source map + * should be fetched. + * @since v13.7.0, v12.17.0 + * @return Returns `module.SourceMap` if a source map is found, `undefined` otherwise. + */ + function findSourceMap(path: string): SourceMap | undefined; + interface SetSourceMapsSupportOptions { + /** + * If enabling the support for files in `node_modules`. + * @default false + */ + nodeModules?: boolean | undefined; + /** + * If enabling the support for generated code from `eval` or `new Function`. + * @default false + */ + generatedCode?: boolean | undefined; + } + /** + * This function enables or disables the [Source Map v3](https://tc39.es/ecma426/) support for + * stack traces. + * + * It provides same features as launching Node.js process with commandline options + * `--enable-source-maps`, with additional options to alter the support for files + * in `node_modules` or generated codes. + * + * Only source maps in JavaScript files that are loaded after source maps has been + * enabled will be parsed and loaded. Preferably, use the commandline options + * `--enable-source-maps` to avoid losing track of source maps of modules loaded + * before this API call. + * @since v23.7.0, v22.14.0 + */ + function setSourceMapsSupport(enabled: boolean, options?: SetSourceMapsSupportOptions): void; + interface SourceMapConstructorOptions { + /** + * @since v21.0.0, v20.5.0 + */ + lineLengths?: readonly number[] | undefined; + } + interface SourceMapPayload { + file: string; + version: number; + sources: string[]; + sourcesContent: string[]; + names: string[]; + mappings: string; + sourceRoot: string; + } + interface SourceMapping { + generatedLine: number; + generatedColumn: number; + originalSource: string; + originalLine: number; + originalColumn: number; + } + interface SourceOrigin { + /** + * The name of the range in the source map, if one was provided + */ + name: string | undefined; + /** + * The file name of the original source, as reported in the SourceMap + */ + fileName: string; + /** + * The 1-indexed lineNumber of the corresponding call site in the original source + */ + lineNumber: number; + /** + * The 1-indexed columnNumber of the corresponding call site in the original source + */ + columnNumber: number; + } + /** + * @since v13.7.0, v12.17.0 + */ + class SourceMap { + constructor(payload: SourceMapPayload, options?: SourceMapConstructorOptions); + /** + * Getter for the payload used to construct the `SourceMap` instance. + */ + readonly payload: SourceMapPayload; + /** + * Given a line offset and column offset in the generated source + * file, returns an object representing the SourceMap range in the + * original file if found, or an empty object if not. + * + * The object returned contains the following keys: + * + * The returned value represents the raw range as it appears in the + * SourceMap, based on zero-indexed offsets, _not_ 1-indexed line and + * column numbers as they appear in Error messages and CallSite + * objects. + * + * To get the corresponding 1-indexed line and column numbers from a + * lineNumber and columnNumber as they are reported by Error stacks + * and CallSite objects, use `sourceMap.findOrigin(lineNumber, columnNumber)` + * @param lineOffset The zero-indexed line number offset in the generated source + * @param columnOffset The zero-indexed column number offset in the generated source + */ + findEntry(lineOffset: number, columnOffset: number): SourceMapping | {}; + /** + * Given a 1-indexed `lineNumber` and `columnNumber` from a call site in the generated source, + * find the corresponding call site location in the original source. + * + * If the `lineNumber` and `columnNumber` provided are not found in any source map, + * then an empty object is returned. + * @param lineNumber The 1-indexed line number of the call site in the generated source + * @param columnNumber The 1-indexed column number of the call site in the generated source + */ + findOrigin(lineNumber: number, columnNumber: number): SourceOrigin | {}; + } + function runMain(main?: string): void; + function wrap(script: string): string; + } + global { + namespace NodeJS { + interface Module { + /** + * The module objects required for the first time by this one. + * @since v0.1.16 + */ + children: Module[]; + /** + * The `module.exports` object is created by the `Module` system. Sometimes this is + * not acceptable; many want their module to be an instance of some class. To do + * this, assign the desired export object to `module.exports`. + * @since v0.1.16 + */ + exports: any; + /** + * The fully resolved filename of the module. + * @since v0.1.16 + */ + filename: string; + /** + * The identifier for the module. Typically this is the fully resolved + * filename. + * @since v0.1.16 + */ + id: string; + /** + * `true` if the module is running during the Node.js preload + * phase. + * @since v15.4.0, v14.17.0 + */ + isPreloading: boolean; + /** + * Whether or not the module is done loading, or is in the process of + * loading. + * @since v0.1.16 + */ + loaded: boolean; + /** + * The module that first required this one, or `null` if the current module is the + * entry point of the current process, or `undefined` if the module was loaded by + * something that is not a CommonJS module (e.g. REPL or `import`). + * @since v0.1.16 + * @deprecated Please use `require.main` and `module.children` instead. + */ + parent: Module | null | undefined; + /** + * The directory name of the module. This is usually the same as the + * `path.dirname()` of the `module.id`. + * @since v11.14.0 + */ + path: string; + /** + * The search paths for the module. + * @since v0.4.0 + */ + paths: string[]; + /** + * The `module.require()` method provides a way to load a module as if + * `require()` was called from the original module. + * @since v0.5.1 + */ + require(id: string): any; + } + interface Require { + /** + * Used to import modules, `JSON`, and local files. + * @since v0.1.13 + */ + (id: string): any; + /** + * Modules are cached in this object when they are required. By deleting a key + * value from this object, the next `require` will reload the module. + * This does not apply to + * [native addons](https://nodejs.org/docs/latest-v26.x/api/addons.html), + * for which reloading will result in an error. + * @since v0.3.0 + */ + cache: Dict; + /** + * Instruct `require` on how to handle certain file extensions. + * @since v0.3.0 + * @deprecated + */ + extensions: RequireExtensions; + /** + * The `Module` object representing the entry script loaded when the Node.js + * process launched, or `undefined` if the entry point of the program is not a + * CommonJS module. + * @since v0.1.17 + */ + main: Module | undefined; + /** + * @since v0.3.0 + */ + resolve: RequireResolve; + } + /** @deprecated */ + interface RequireExtensions extends Dict<(module: Module, filename: string) => any> { + ".js": (module: Module, filename: string) => any; + ".json": (module: Module, filename: string) => any; + ".node": (module: Module, filename: string) => any; + } + interface RequireResolveOptions { + /** + * Paths to resolve module location from. If present, these + * paths are used instead of the default resolution paths, with the exception + * of + * [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v26.x/api/modules.html#loading-from-the-global-folders) + * like `$HOME/.node_modules`, which are + * always included. Each of these paths is used as a starting point for + * the module resolution algorithm, meaning that the `node_modules` hierarchy + * is checked from this location. + * @since v8.9.0 + */ + paths?: string[] | undefined; + } + interface RequireResolve { + /** + * Use the internal `require()` machinery to look up the location of a module, + * but rather than loading the module, just return the resolved filename. + * + * If the module can not be found, a `MODULE_NOT_FOUND` error is thrown. + * @since v0.3.0 + * @param request The module path to resolve. + */ + (request: string, options?: RequireResolveOptions): string; + /** + * Returns an array containing the paths searched during resolution of `request` or + * `null` if the `request` string references a core module, for example `http` or + * `fs`. + * @since v8.9.0 + * @param request The module path whose lookup paths are being retrieved. + */ + paths(request: string): string[] | null; + } + } + /** + * The directory name of the current module. This is the same as the + * `path.dirname()` of the `__filename`. + * @since v0.1.27 + */ + var __dirname: string; + /** + * The file name of the current module. This is the current module file's absolute + * path with symlinks resolved. + * + * For a main program this is not necessarily the same as the file name used in the + * command line. + * @since v0.0.1 + */ + var __filename: string; + /** + * The `exports` variable is available within a module's file-level scope, and is + * assigned the value of `module.exports` before the module is evaluated. + * @since v0.1.16 + */ + var exports: NodeJS.Module["exports"]; + /** + * A reference to the current module. + * @since v0.1.16 + */ + var module: NodeJS.Module; + /** + * @since v0.1.13 + */ + var require: NodeJS.Require; + // Global-scope aliases for backwards compatibility with @types/node <13.0.x + // TODO: consider removing in a future major version update + /** @deprecated Use `NodeJS.Module` instead. */ + interface NodeModule extends NodeJS.Module {} + /** @deprecated Use `NodeJS.Require` instead. */ + interface NodeRequire extends NodeJS.Require {} + /** @deprecated Use `NodeJS.RequireResolve` instead. */ + interface RequireResolve extends NodeJS.RequireResolve {} + } + export = Module; +} +declare module "module" { + import module = require("node:module"); + export = module; +} diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts new file mode 100644 index 0000000..3f104c5 --- /dev/null +++ b/node_modules/@types/node/net.d.ts @@ -0,0 +1,1074 @@ +declare module "node:net" { + import { NonSharedBuffer } from "node:buffer"; + import * as dns from "node:dns"; + import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; + import * as stream from "node:stream"; + type LookupFunction = ( + hostname: string, + options: dns.LookupOptions, + callback: (err: NodeJS.ErrnoException | null, address: string | dns.LookupAddress[], family?: number) => void, + ) => void; + interface AddressInfo { + address: string; + family: string; + port: number; + } + interface SocketConstructorOpts { + fd?: number | undefined; + allowHalfOpen?: boolean | undefined; + onread?: OnReadOpts | undefined; + readable?: boolean | undefined; + writable?: boolean | undefined; + signal?: AbortSignal | undefined; + noDelay?: boolean | undefined; + keepAlive?: boolean | undefined; + keepAliveInitialDelay?: number | undefined; + blockList?: BlockList | undefined; + typeOfService?: number | undefined; + handle?: BoundSocket | undefined; + } + interface OnReadOpts { + buffer: Uint8Array | (() => Uint8Array); + /** + * This function is called for every chunk of incoming data. + * Two arguments are passed to it: the number of bytes written to `buffer` and a reference to `buffer`. + * Return `false` from this function to implicitly `pause()` the socket. + */ + callback(bytesWritten: number, buffer: Uint8Array): boolean; + } + interface TcpSocketConnectOpts { + port: number; + host?: string | undefined; + localAddress?: string | undefined; + localPort?: number | undefined; + hints?: number | undefined; + family?: number | undefined; + lookup?: LookupFunction | undefined; + /** + * @since v18.13.0 + */ + autoSelectFamily?: boolean | undefined; + /** + * @since v18.13.0 + */ + autoSelectFamilyAttemptTimeout?: number | undefined; + } + interface IpcSocketConnectOpts { + path: string; + } + type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; + type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed"; + interface SetKeepAliveOptions { + enable?: boolean | undefined; + initialDelay?: number | undefined; + interval?: number | undefined; + count?: number | undefined; + } + interface SocketEventMap extends Omit { + "close": [hadError: boolean]; + "connect": []; + "connectionAttempt": [ip: string, port: number, family: number]; + "connectionAttemptFailed": [ip: string, port: number, family: number, error: Error]; + "connectionAttemptTimeout": [ip: string, port: number, family: number]; + "data": [data: string | NonSharedBuffer]; + "lookup": [err: Error | null, address: string, family: number | null, host: string]; + "ready": []; + "timeout": []; + } + /** + * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint + * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also + * an `EventEmitter`. + * + * A `net.Socket` can be created by the user and used directly to interact with + * a server. For example, it is returned by {@link createConnection}, + * so the user can use it to talk to the server. + * + * It can also be created by Node.js and passed to the user when a connection + * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use + * it to interact with the client. + * @since v0.3.4 + */ + class Socket extends stream.Duplex { + constructor(options?: SocketConstructorOpts); + /** + * Destroys the socket after all data is written. If the `finish` event was already emitted the socket is destroyed immediately. + * If the socket is still writable it implicitly calls `socket.end()`. + * @since v0.3.4 + */ + destroySoon(): void; + /** + * Sends data on the socket. The second parameter specifies the encoding in the + * case of a string. It defaults to UTF8 encoding. + * + * Returns `true` if the entire data was flushed successfully to the kernel + * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free. + * + * The optional `callback` parameter will be executed when the data is finally + * written out, which may not be immediately. + * + * See `Writable` stream `write()` method for more + * information. + * @since v0.1.90 + */ + write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; + /** + * Sends data on the socket, with an explicit encoding for string data. + * @see {@link Socket.write} for full details. + * @since v0.1.90 + * @param [encoding='utf8'] Only used when data is `string`. + */ + write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; + /** + * Initiate a connection on a given socket. + * + * Possible signatures: + * + * * `socket.connect(options[, connectListener])` + * * `socket.connect(path[, connectListener])` for `IPC` connections. + * * `socket.connect(port[, host][, connectListener])` for TCP connections. + * * Returns: `net.Socket` The socket itself. + * + * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting, + * instead of a `'connect'` event, an `'error'` event will be emitted with + * the error passed to the `'error'` listener. + * The last parameter `connectListener`, if supplied, will be added as a listener + * for the `'connect'` event **once**. + * + * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined + * behavior. + */ + connect(options: SocketConnectOpts, connectionListener?: () => void): this; + connect(port: number, host: string, connectionListener?: () => void): this; + connect(port: number, connectionListener?: () => void): this; + connect(path: string, connectionListener?: () => void): this; + /** + * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information. + * @since v0.1.90 + * @return The socket itself. + */ + setEncoding(encoding?: BufferEncoding): this; + /** + * Pauses the reading of data. That is, `'data'` events will not be emitted. + * Useful to throttle back an upload. + * @return The socket itself. + */ + pause(): this; + /** + * Close the TCP connection by sending an RST packet and destroy the stream. + * If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected. + * Otherwise, it will call `socket.destroy` with an `ERR_SOCKET_CLOSED` Error. + * If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an `ERR_INVALID_HANDLE_TYPE` Error. + * @since v18.3.0, v16.17.0 + */ + resetAndDestroy(): this; + /** + * Resumes reading after a call to `socket.pause()`. + * @return The socket itself. + */ + resume(): this; + /** + * Sets the socket to timeout after `timeout` milliseconds of inactivity on + * the socket. By default `net.Socket` do not have a timeout. + * + * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to + * end the connection. + * + * ```js + * socket.setTimeout(3000); + * socket.on('timeout', () => { + * console.log('socket timeout'); + * socket.end(); + * }); + * ``` + * + * If `timeout` is 0, then the existing idle timeout is disabled. + * + * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event. + * @since v0.1.90 + * @return The socket itself. + */ + setTimeout(timeout: number, callback?: () => void): this; + /** + * Enable/disable the use of Nagle's algorithm. + * + * When a TCP connection is created, it will have Nagle's algorithm enabled. + * + * Nagle's algorithm delays data before it is sent via the network. It attempts + * to optimize throughput at the expense of latency. + * + * Passing `true` for `noDelay` or not passing an argument will disable Nagle's + * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's + * algorithm. + * @since v0.1.90 + * @param [noDelay=true] + * @return The socket itself. + */ + setNoDelay(noDelay?: boolean): this; + /** + * Configure keep-alive using an options object. See `socket.setKeepAlive()` + * for a description of each property. + * + * ```js + * socket.setKeepAlive({ enable: true, initialDelay: 1000, interval: 1000, count: 10 }); + * ``` + * @since v26.4.0 + * @returns The socket itself. + */ + setKeepAlive(options: SetKeepAliveOptions): this; + /** + * Configure keep-alive using positional arguments. See + * `socket.setKeepAlive()` for a description of each argument. + * @since v0.1.92 + * @param enable **Default:** `false` + * @param initialDelay **Default:** `0` + * @param interval **Default:** `1000` + * @param count **Default:** `10` + * @returns The socket itself. + */ + setKeepAlive(enable?: boolean, initialDelay?: number, interval?: number, count?: number): this; + /** + * Returns the current Type of Service (TOS) field for IPv4 packets or Traffic + * Class for IPv6 packets for this socket. + * + * `setTypeOfService()` may be called before the socket is connected; the value + * will be cached and applied when the socket establishes a connection. + * `getTypeOfService()` will return the currently set value even before connection. + * + * On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored, + * and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers + * should verify platform-specific semantics. + * @since v25.6.0 + * @returns The current TOS value. + */ + getTypeOfService(): number; + /** + * Sets the Type of Service (TOS) field for IPv4 packets or Traffic Class for IPv6 + * Packets sent from this socket. This can be used to prioritize network traffic. + * + * `setTypeOfService()` may be called before the socket is connected; the value + * will be cached and applied when the socket establishes a connection. + * `getTypeOfService()` will return the currently set value even before connection. + * + * On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored, + * and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers + * should verify platform-specific semantics. + * @since v25.6.0 + * @param tos The TOS value to set (0-255). + * @returns The socket itself. + */ + setTypeOfService(tos: number): this; + /** + * Returns the bound `address`, the address `family` name and `port` of the + * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }` + * @since v0.1.90 + */ + address(): AddressInfo | {}; + /** + * Calling `unref()` on a socket will allow the program to exit if this is the only + * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect. + * @since v0.9.1 + * @return The socket itself. + */ + unref(): this; + /** + * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior). + * If the socket is `ref`ed calling `ref` again will have no effect. + * @since v0.9.1 + * @return The socket itself. + */ + ref(): this; + /** + * This property is only present if the family autoselection algorithm is enabled in `socket.connect(options)` + * and it is an array of the addresses that have been attempted. + * + * Each address is a string in the form of `$IP:$PORT`. + * If the connection was successful, then the last address is the one that the socket is currently connected to. + * @since v19.4.0 + */ + readonly autoSelectFamilyAttemptedAddresses: string[]; + /** + * This property shows the number of characters buffered for writing. The buffer + * may contain strings whose length after encoding is not yet known. So this number + * is only an approximation of the number of bytes in the buffer. + * + * `net.Socket` has the property that `socket.write()` always works. This is to + * help users get up and running quickly. The computer cannot always keep up + * with the amount of data that is written to a socket. The network connection + * simply might be too slow. Node.js will internally queue up the data written to a + * socket and send it out over the wire when it is possible. + * + * The consequence of this internal buffering is that memory may grow. + * Users who experience large or growing `bufferSize` should attempt to + * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`. + * @since v0.3.8 + * @deprecated Since v14.6.0 - Use `writableLength` instead. + */ + readonly bufferSize: number; + /** + * The amount of received bytes. + * @since v0.5.3 + */ + readonly bytesRead: number; + /** + * The amount of bytes sent. + * @since v0.5.3 + */ + readonly bytesWritten: number; + /** + * If `true`, `socket.connect(options[, connectListener])` was + * called and has not yet finished. It will stay `true` until the socket becomes + * connected, then it is set to `false` and the `'connect'` event is emitted. Note + * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event. + * @since v6.1.0 + */ + readonly connecting: boolean; + /** + * This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting + * (see `socket.connecting`). + * @since v11.2.0, v10.16.0 + */ + readonly pending: boolean; + /** + * See `writable.destroyed` for further details. + */ + readonly destroyed: boolean; + /** + * The string representation of the local IP address the remote client is + * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client + * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`. + * @since v0.9.6 + */ + readonly localAddress?: string; + /** + * The numeric representation of the local port. For example, `80` or `21`. + * @since v0.9.6 + */ + readonly localPort?: number; + /** + * The string representation of the local IP family. `'IPv4'` or `'IPv6'`. + * @since v18.8.0, v16.18.0 + */ + readonly localFamily?: string; + /** + * This property represents the state of the connection as a string. + * + * * If the socket is connecting, `socket.readyState` is `opening`. + * * If the socket is readable and writable, it is `open`. + * * If the socket is readable and not writable, it is `readOnly`. + * * If the socket is not readable and writable, it is `writeOnly`. + * * Otherwise, it is `closed`. + * @since v0.5.0 + */ + readonly readyState: SocketReadyState; + /** + * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if + * the socket is destroyed (for example, if the client disconnected). + * @since v0.5.10 + */ + readonly remoteAddress: string | undefined; + /** + * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. Value may be `undefined` if + * the socket is destroyed (for example, if the client disconnected). + * @since v0.11.14 + */ + readonly remoteFamily: string | undefined; + /** + * The numeric representation of the remote port. For example, `80` or `21`. Value may be `undefined` if + * the socket is destroyed (for example, if the client disconnected). + * @since v0.5.10 + */ + readonly remotePort: number | undefined; + /** + * Reference to the server that accepted the socket. This is `null` for sockets + * that were not accepted by a server. + * @since v0.3.4 + */ + readonly server: Server | null; + /** + * The socket timeout in milliseconds as set by `socket.setTimeout()`. + * It is `undefined` if a timeout has not been set. + * @since v10.7.0 + */ + readonly timeout?: number; + /** + * Half-closes the socket. i.e., it sends a FIN packet. It is possible the + * server will still send some data. + * + * See `writable.end()` for further details. + * @since v0.1.90 + * @param callback Optional callback for when the socket is finished. + * @return The socket itself. + */ + end(callback?: () => void): this; + /** + * Half-closes the socket, with one final chunk of data. + * @see {@link Socket.end} for full details. + * @since v0.1.90 + * @param callback Optional callback for when the socket is finished. + * @return The socket itself. + */ + end(buffer: Uint8Array | string, callback?: () => void): this; + /** + * Half-closes the socket, with one final chunk of data. + * @see {@link Socket.end} for full details. + * @since v0.1.90 + * @param [encoding='utf8'] Only used when data is `string`. + * @param callback Optional callback for when the socket is finished. + * @return The socket itself. + */ + end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this; + // #region InternalEventEmitter + addListener(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: SocketEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: SocketEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: SocketEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: SocketEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: SocketEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: SocketEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: SocketEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface BoundSocketOptions { + /** + * Local address to bind. Must be a numeric IP literal; no DNS + * resolution is performed. **Default:** `'0.0.0.0'`, or `'::'` when + * `ipv6Only` is `true`. + */ + host?: string | undefined; + /** + * Local port. `0` requests an OS-assigned ephemeral port. + * **Default:** `0`. + */ + port?: number | undefined; + /** + * Sets `IPV6_V6ONLY`, disabling dual-stack support so the + * socket binds IPv6 only. Only meaningful for IPv6 binds. **Default:** + * `false`. + */ + ipv6Only?: boolean | undefined; + /** + * Sets `SO_REUSEPORT`, allowing multiple sockets to bind + * the same address and port for kernel-level load balancing. Support is + * platform-dependent. **Default:** `false`. + */ + reusePort?: boolean | undefined; + } + /** + * Allows for the synchronous creation of a pre-bound socket, that can be passed + * to `listen()` or `new net.Socket()` later on. For `listen()` this enables + * synchronous port reservation, while for `new net.Socket()`, it allows control + * over the local egress port/IP, via `bind(2)` semantics. + * + * Adoption transfers ownership of the socket; afterwards `address()` and `close()` + * throw `ERR_SOCKET_HANDLE_ADOPTED`. A handle that is never adopted must be + * closed to avoid leaking the socket. + * + * When an adopted `BoundSocket` connects to a numeric IP literal, `connect(2)` is + * issued synchronously, so `socket.localAddress` is resolved once + * `socket.connect()` returns. Connection failures are still reported via a + * deferred `'error'` event. + * + * ```js + * import net from 'node:net'; + * + * const bound = new net.BoundSocket(); + * const { port } = bound.address(); + * console.log(`Reserved port ${port} for server`); + * + * const server = net.createServer(); + * server.listen(bound); // Adopt as a server, or pass to new net.Socket() instead. + * ``` + * @since v26.4.0 + */ + class BoundSocket { + /** + * @since v26.4.0 + */ + constructor(options?: BoundSocketOptions); + /** + * Returns the bound local address. When bound with `port: 0`, `port` is the + * OS-assigned ephemeral port. + * @since v26.4.0 + * @returns An object with `address`, `family`, and `port` properties, + * as `server.address()` returns. + */ + address(): AddressInfo; + /** + * Returns the file descriptor of the bound socket. Ownership remains with the + * `BoundSocket`, so the descriptor must not be closed by the caller. The + * descriptor is only available before the handle is adopted; afterwards it belongs + * to the adopting `net.Server` or `net.Socket` and `fd()` throws + * `ERR_SOCKET_HANDLE_ADOPTED`. + * @since v26.4.0 + * @returns The underlying OS file descriptor, or `-1` on platforms + * that do not expose one for sockets (such as Windows). + */ + fd(): number; + /** + * Releases the bound socket. Only needed when the handle is never adopted. + * @since v26.4.0 + */ + close(): void; + /** + * Closes the handle if it has not been adopted or closed; otherwise a no-op. + * @since v26.4.0 + */ + [Symbol.dispose](): void; + } + interface ListenOptions extends Abortable { + backlog?: number | undefined; + exclusive?: boolean | undefined; + handle?: BoundSocket | undefined; + host?: string | undefined; + /** + * @default false + */ + ipv6Only?: boolean | undefined; + reusePort?: boolean | undefined; + path?: string | undefined; + port?: number | undefined; + readableAll?: boolean | undefined; + writableAll?: boolean | undefined; + } + interface ServerOpts { + /** + * Indicates whether half-opened TCP connections are allowed. + * @default false + */ + allowHalfOpen?: boolean | undefined; + /** + * Indicates whether the socket should be paused on incoming connections. + * @default false + */ + pauseOnConnect?: boolean | undefined; + /** + * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. + * @default false + * @since v16.5.0 + */ + noDelay?: boolean | undefined; + /** + * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, + * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. + * @default false + * @since v16.5.0 + */ + keepAlive?: boolean | undefined; + /** + * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. + * @default 0 + * @since v16.5.0 + */ + keepAliveInitialDelay?: number | undefined; + /** + * Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`. + * @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v26.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode). + * @since v18.17.0, v20.1.0 + */ + highWaterMark?: number | undefined; + /** + * `blockList` can be used for disabling inbound + * access to specific IP addresses, IP ranges, or IP subnets. This does not + * work if the server is behind a reverse proxy, NAT, etc. because the address + * checked against the block list is the address of the proxy, or the one + * specified by the NAT. + * @since v22.13.0 + */ + blockList?: BlockList | undefined; + } + interface DropArgument { + localAddress?: string; + localPort?: number; + localFamily?: string; + remoteAddress?: string; + remotePort?: number; + remoteFamily?: string; + } + interface ServerEventMap { + "close": []; + "connection": [socket: Socket]; + "error": [err: Error]; + "listening": []; + "drop": [data?: DropArgument]; + } + /** + * This class is used to create a TCP or `IPC` server. + * @since v0.1.90 + */ + class Server implements EventEmitter { + constructor(connectionListener?: (socket: Socket) => void); + constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void); + /** + * Start a server listening for connections. A `net.Server` can be a TCP or + * an `IPC` server depending on what it listens to. + * + * Possible signatures: + * + * * `server.listen(handle[, backlog][, callback])` + * * `server.listen(options[, callback])` + * * `server.listen(path[, backlog][, callback])` for `IPC` servers + * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers + * + * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'` + * event. + * + * All `listen()` methods can take a `backlog` parameter to specify the maximum + * length of the queue of pending connections. The actual length will be determined + * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn` on Linux. The default value of this parameter is 511 (not 512). + * + * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for + * details). + * + * The `server.listen()` method can be called again if and only if there was an + * error during the first `server.listen()` call or `server.close()` has been + * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown. + * + * One of the most common errors raised when listening is `EADDRINUSE`. + * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry + * after a certain amount of time: + * + * ```js + * server.on('error', (e) => { + * if (e.code === 'EADDRINUSE') { + * console.error('Address in use, retrying...'); + * setTimeout(() => { + * server.close(); + * server.listen(PORT, HOST); + * }, 1000); + * } + * }); + * ``` + */ + listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, hostname?: string, listeningListener?: () => void): this; + listen(port?: number, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, listeningListener?: () => void): this; + listen(path: string, backlog?: number, listeningListener?: () => void): this; + listen(path: string, listeningListener?: () => void): this; + listen(options: ListenOptions, listeningListener?: () => void): this; + listen(handle: any, backlog?: number, listeningListener?: () => void): this; + listen(handle: any, listeningListener?: () => void): this; + /** + * Stops the server from accepting new connections and keeps existing + * connections. This function is asynchronous, the server is finally closed + * when all connections are ended and the server emits a `'close'` event. + * The optional `callback` will be called once the `'close'` event occurs. Unlike + * that event, it will be called with an `Error` as its only argument if the server + * was not open when it was closed. + * @since v0.1.90 + * @param callback Called when the server is closed. + */ + close(callback?: (err?: Error) => void): this; + /** + * Returns the bound `address`, the address `family` name, and `port` of the server + * as reported by the operating system if listening on an IP socket + * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`. + * + * For a server listening on a pipe or Unix domain socket, the name is returned + * as a string. + * + * ```js + * const server = net.createServer((socket) => { + * socket.end('goodbye\n'); + * }).on('error', (err) => { + * // Handle errors here. + * throw err; + * }); + * + * // Grab an arbitrary unused port. + * server.listen(() => { + * console.log('opened server on', server.address()); + * }); + * ``` + * + * `server.address()` returns `null` before the `'listening'` event has been + * emitted or after calling `server.close()`. + * @since v0.1.90 + */ + address(): AddressInfo | string | null; + /** + * Asynchronously get the number of concurrent connections on the server. Works + * when sockets were sent to forks. + * + * Callback should take two arguments `err` and `count`. + * @since v0.9.7 + */ + getConnections(cb: (error: Error | null, count: number) => void): this; + /** + * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior). + * If the server is `ref`ed calling `ref()` again will have no effect. + * @since v0.9.1 + */ + ref(): this; + /** + * Calling `unref()` on a server will allow the program to exit if this is the only + * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect. + * @since v0.9.1 + */ + unref(): this; + /** + * Set this property to reject connections when the server's connection count gets + * high. + * + * It is not recommended to use this option once a socket has been sent to a child + * with `child_process.fork()`. + * @since v0.2.0 + */ + maxConnections: number; + connections: number; + /** + * Indicates whether or not the server is listening for connections. + * @since v5.7.0 + */ + readonly listening: boolean; + /** + * Calls {@link Server.close()} and returns a promise that fulfills when the server has closed. + * @since v20.5.0 + */ + [Symbol.asyncDispose](): Promise; + } + interface Server extends InternalEventEmitter {} + type IPVersion = "ipv4" | "ipv6"; + /** + * The `BlockList` object can be used with some network APIs to specify rules for + * disabling inbound or outbound access to specific IP addresses, IP ranges, or + * IP subnets. + * @since v15.0.0, v14.18.0 + */ + class BlockList { + /** + * Adds a rule to block the given IP address. + * @since v15.0.0, v14.18.0 + * @param address An IPv4 or IPv6 address. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addAddress(address: string, type?: IPVersion): void; + addAddress(address: SocketAddress): void; + /** + * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive). + * @since v15.0.0, v14.18.0 + * @param start The starting IPv4 or IPv6 address in the range. + * @param end The ending IPv4 or IPv6 address in the range. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addRange(start: string, end: string, type?: IPVersion): void; + addRange(start: SocketAddress, end: SocketAddress): void; + /** + * Adds a rule to block a range of IP addresses specified as a subnet mask. + * @since v15.0.0, v14.18.0 + * @param net The network IPv4 or IPv6 address. + * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addSubnet(net: SocketAddress, prefix: number): void; + addSubnet(net: string, prefix: number, type?: IPVersion): void; + /** + * Returns `true` if the given IP address matches any of the rules added to the`BlockList`. + * + * ```js + * const blockList = new net.BlockList(); + * blockList.addAddress('123.123.123.123'); + * blockList.addRange('10.0.0.1', '10.0.0.10'); + * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6'); + * + * console.log(blockList.check('123.123.123.123')); // Prints: true + * console.log(blockList.check('10.0.0.3')); // Prints: true + * console.log(blockList.check('222.111.111.222')); // Prints: false + * + * // IPv6 notation for IPv4 addresses works: + * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true + * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true + * ``` + * @since v15.0.0, v14.18.0 + * @param address The IP address to check + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + check(address: SocketAddress): boolean; + check(address: string, type?: IPVersion): boolean; + /** + * The list of rules added to the blocklist. + * @since v15.0.0, v14.18.0 + */ + rules: readonly string[]; + /** + * Returns `true` if the `value` is a `net.BlockList`. + * @since v22.13.0 + * @param value Any JS value + */ + static isBlockList(value: unknown): value is BlockList; + /** + * ```js + * const blockList = new net.BlockList(); + * const data = [ + * 'Subnet: IPv4 192.168.1.0/24', + * 'Address: IPv4 10.0.0.5', + * 'Range: IPv4 192.168.2.1-192.168.2.10', + * 'Range: IPv4 10.0.0.1-10.0.0.10', + * ]; + * blockList.fromJSON(data); + * blockList.fromJSON(JSON.stringify(data)); + * ``` + * @since v24.5.0 + * @experimental + */ + fromJSON(data: string | readonly string[]): void; + /** + * @since v24.5.0 + * @experimental + */ + toJSON(): readonly string[]; + } + interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { + timeout?: number | undefined; + } + interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { + timeout?: number | undefined; + } + type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; + /** + * Creates a new TCP or `IPC` server. + * + * If `allowHalfOpen` is set to `true`, when the other end of the socket + * signals the end of transmission, the server will only send back the end of + * transmission when `socket.end()` is explicitly called. For example, in the + * context of TCP, when a FIN packed is received, a FIN packed is sent + * back only when `socket.end()` is explicitly called. Until then the + * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information. + * + * If `pauseOnConnect` is set to `true`, then the socket associated with each + * incoming connection will be paused, and no data will be read from its handle. + * This allows connections to be passed between processes without any data being + * read by the original process. To begin reading data from a paused socket, call `socket.resume()`. + * + * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to. + * + * Here is an example of a TCP echo server which listens for connections + * on port 8124: + * + * ```js + * import net from 'node:net'; + * const server = net.createServer((c) => { + * // 'connection' listener. + * console.log('client connected'); + * c.on('end', () => { + * console.log('client disconnected'); + * }); + * c.write('hello\r\n'); + * c.pipe(c); + * }); + * server.on('error', (err) => { + * throw err; + * }); + * server.listen(8124, () => { + * console.log('server bound'); + * }); + * ``` + * + * Test this by using `telnet`: + * + * ```bash + * telnet localhost 8124 + * ``` + * + * To listen on the socket `/tmp/echo.sock`: + * + * ```js + * server.listen('/tmp/echo.sock', () => { + * console.log('server bound'); + * }); + * ``` + * + * Use `nc` to connect to a Unix domain socket server: + * + * ```bash + * nc -U /tmp/echo.sock + * ``` + * @since v0.5.0 + * @param connectionListener Automatically set as a listener for the {@link 'connection'} event. + */ + function createServer(connectionListener?: (socket: Socket) => void): Server; + function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server; + /** + * Aliases to {@link createConnection}. + * + * Possible signatures: + * + * * {@link connect} + * * {@link connect} for `IPC` connections. + * * {@link connect} for TCP connections. + */ + function connect(options: NetConnectOpts, connectionListener?: () => void): Socket; + function connect(port: number, host?: string, connectionListener?: () => void): Socket; + function connect(path: string, connectionListener?: () => void): Socket; + /** + * A factory function, which creates a new {@link Socket}, + * immediately initiates connection with `socket.connect()`, + * then returns the `net.Socket` that starts the connection. + * + * When the connection is established, a `'connect'` event will be emitted + * on the returned socket. The last parameter `connectListener`, if supplied, + * will be added as a listener for the `'connect'` event **once**. + * + * Possible signatures: + * + * * {@link createConnection} + * * {@link createConnection} for `IPC` connections. + * * {@link createConnection} for TCP connections. + * + * The {@link connect} function is an alias to this function. + */ + function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket; + function createConnection(port: number, host?: string, connectionListener?: () => void): Socket; + function createConnection(path: string, connectionListener?: () => void): Socket; + /** + * Gets the current default value of the `autoSelectFamily` option of `socket.connect(options)`. + * The initial default value is `true`, unless the command line option`--no-network-family-autoselection` is provided. + * @since v19.4.0 + */ + function getDefaultAutoSelectFamily(): boolean; + /** + * Sets the default value of the `autoSelectFamily` option of `socket.connect(options)`. + * @param value The new default value. + * The initial default value is `true`, unless the command line option + * `--no-network-family-autoselection` is provided. + * @since v19.4.0 + */ + function setDefaultAutoSelectFamily(value: boolean): void; + /** + * Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`. + * The initial default value is `500` or the value specified via the command line option `--network-family-autoselection-attempt-timeout`. + * @returns The current default value of the `autoSelectFamilyAttemptTimeout` option. + * @since v19.8.0, v18.8.0 + */ + function getDefaultAutoSelectFamilyAttemptTimeout(): number; + /** + * Sets the default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`. + * @param value The new default value, which must be a positive number. If the number is less than `10`, the value `10` is used instead. The initial default value is `250` or the value specified via the command line + * option `--network-family-autoselection-attempt-timeout`. + * @since v19.8.0, v18.8.0 + */ + function setDefaultAutoSelectFamilyAttemptTimeout(value: number): void; + /** + * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4 + * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`. + * + * ```js + * net.isIP('::1'); // returns 6 + * net.isIP('127.0.0.1'); // returns 4 + * net.isIP('127.000.000.001'); // returns 0 + * net.isIP('127.0.0.1/24'); // returns 0 + * net.isIP('fhqwhgads'); // returns 0 + * ``` + * @since v0.3.0 + */ + function isIP(input: string): number; + /** + * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no + * leading zeroes. Otherwise, returns `false`. + * + * ```js + * net.isIPv4('127.0.0.1'); // returns true + * net.isIPv4('127.000.000.001'); // returns false + * net.isIPv4('127.0.0.1/24'); // returns false + * net.isIPv4('fhqwhgads'); // returns false + * ``` + * @since v0.3.0 + */ + function isIPv4(input: string): boolean; + /** + * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`. + * + * ```js + * net.isIPv6('::1'); // returns true + * net.isIPv6('fhqwhgads'); // returns false + * ``` + * @since v0.3.0 + */ + function isIPv6(input: string): boolean; + interface SocketAddressInitOptions { + /** + * The network address as either an IPv4 or IPv6 string. + * @default 127.0.0.1 + */ + address?: string | undefined; + /** + * @default `'ipv4'` + */ + family?: IPVersion | undefined; + /** + * An IPv6 flow-label used only if `family` is `'ipv6'`. + * @default 0 + */ + flowlabel?: number | undefined; + /** + * An IP port. + * @default 0 + */ + port?: number | undefined; + } + /** + * @since v15.14.0, v14.18.0 + */ + class SocketAddress { + constructor(options: SocketAddressInitOptions); + /** + * Either \`'ipv4'\` or \`'ipv6'\`. + * @since v15.14.0, v14.18.0 + */ + readonly address: string; + /** + * Either \`'ipv4'\` or \`'ipv6'\`. + * @since v15.14.0, v14.18.0 + */ + readonly family: IPVersion; + /** + * @since v15.14.0, v14.18.0 + */ + readonly port: number; + /** + * @since v15.14.0, v14.18.0 + */ + readonly flowlabel: number; + /** + * @since v22.13.0 + * @param input An input string containing an IP address and optional port, + * e.g. `123.1.2.3:1234` or `[1::1]:1234`. + * @returns Returns a `SocketAddress` if parsing was successful. + * Otherwise returns `undefined`. + */ + static parse(input: string): SocketAddress | undefined; + } +} +declare module "net" { + export * from "node:net"; +} diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts new file mode 100644 index 0000000..751d4b4 --- /dev/null +++ b/node_modules/@types/node/os.d.ts @@ -0,0 +1,498 @@ +declare module "node:os" { + import { NonSharedBuffer } from "buffer"; + interface CpuInfo { + model: string; + speed: number; + times: { + /** The number of milliseconds the CPU has spent in user mode. */ + user: number; + /** The number of milliseconds the CPU has spent in nice mode. */ + nice: number; + /** The number of milliseconds the CPU has spent in sys mode. */ + sys: number; + /** The number of milliseconds the CPU has spent in idle mode. */ + idle: number; + /** The number of milliseconds the CPU has spent in irq mode. */ + irq: number; + }; + } + interface NetworkInterfaceBase { + address: string; + netmask: string; + mac: string; + internal: boolean; + cidr: string | null; + scopeid?: number; + } + interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { + family: "IPv4"; + } + interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { + family: "IPv6"; + scopeid: number; + } + interface UserInfo { + username: T; + uid: number; + gid: number; + shell: T | null; + homedir: T; + } + type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; + /** + * Returns the host name of the operating system as a string. + * @since v0.3.3 + */ + function hostname(): string; + /** + * Returns an array containing the 1, 5, and 15 minute load averages. + * + * The load average is a measure of system activity calculated by the operating + * system and expressed as a fractional number. + * + * The load average is a Unix-specific concept. On Windows, the return value is + * always `[0, 0, 0]`. + * @since v0.3.3 + */ + function loadavg(): number[]; + /** + * Returns the system uptime in number of seconds. + * @since v0.3.3 + */ + function uptime(): number; + /** + * Returns the amount of free system memory in bytes as an integer. + * @since v0.3.3 + */ + function freemem(): number; + /** + * Returns the total amount of system memory in bytes as an integer. + * @since v0.3.3 + */ + function totalmem(): number; + /** + * Returns an array of objects containing information about each logical CPU core. + * The array will be empty if no CPU information is available, such as if the `/proc` file system is unavailable. + * + * The properties included on each object include: + * + * ```js + * [ + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 252020, + * nice: 0, + * sys: 30340, + * idle: 1070356870, + * irq: 0, + * }, + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 306960, + * nice: 0, + * sys: 26980, + * idle: 1071569080, + * irq: 0, + * }, + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 248450, + * nice: 0, + * sys: 21750, + * idle: 1070919370, + * irq: 0, + * }, + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 256880, + * nice: 0, + * sys: 19430, + * idle: 1070905480, + * irq: 20, + * }, + * }, + * ]; + * ``` + * + * `nice` values are POSIX-only. On Windows, the `nice` values of all processors + * are always 0. + * + * `os.cpus().length` should not be used to calculate the amount of parallelism + * available to an application. Use {@link availableParallelism} for this purpose. + * @since v0.3.3 + */ + function cpus(): CpuInfo[]; + /** + * Returns an estimate of the default amount of parallelism a program should use. + * Always returns a value greater than zero. + * + * This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism). + * @since v19.4.0, v18.14.0 + */ + function availableParallelism(): number; + /** + * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it + * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows. + * + * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information + * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems. + * @since v0.3.3 + */ + function type(): string; + /** + * Returns the operating system as a string. + * + * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See + * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v0.3.3 + */ + function release(): string; + /** + * Returns an object containing network interfaces that have been assigned a + * network address. + * + * Each key on the returned object identifies a network interface. The associated + * value is an array of objects that each describe an assigned network address. + * + * The properties available on the assigned network address object include: + * + * ```json + * { + * "lo": [ + * { + * "address:": "127.0.0.1", + * "netmask:": "255.0.0.0", + * "family:": "IPv4", + * "mac:": "00:00:00:00:00:00", + * "internal:": true, + * "cidr:": "127.0.0.1/8" + * }, + * { + * "address:": "::1", + * "netmask:": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + * "family:": "IPv6", + * "mac:": "00:00:00:00:00:00", + * "scopeid:": 0, + * "internal:": true, + * "cidr:": "::1/128" + * } + * ], + * "eth0": [ + * { + * "address:": "192.168.1.108", + * "netmask:": "255.255.255.0", + * "family:": "IPv4", + * "mac:": "01:02:03:0a:0b:0c", + * "internal:": false, + * "cidr:": "192.168.1.108/24" + * }, + * { + * "address:": "fe80::a00:27ff:fe4e:66a1", + * "netmask:": "ffff:ffff:ffff:ffff::", + * "family:": "IPv6", + * "mac:": "01:02:03:0a:0b:0c", + * "scopeid:": 1, + * "internal:": false, + * "cidr:": "fe80::a00:27ff:fe4e:66a1/64" + * } + * ] + * } + * ``` + * @since v0.6.0 + */ + function networkInterfaces(): NodeJS.Dict; + /** + * Returns the string path of the current user's home directory. + * + * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it + * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory. + * + * On Windows, it uses the `USERPROFILE` environment variable if defined. + * Otherwise it uses the path to the profile directory of the current user. + * @since v2.3.0 + */ + function homedir(): string; + interface UserInfoOptions { + encoding?: BufferEncoding | "buffer" | undefined; + } + interface UserInfoOptionsWithBufferEncoding extends UserInfoOptions { + encoding: "buffer"; + } + interface UserInfoOptionsWithStringEncoding extends UserInfoOptions { + encoding?: BufferEncoding | undefined; + } + /** + * Returns information about the currently effective user. On POSIX platforms, + * this is typically a subset of the password file. The returned object includes + * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and `gid` fields are `-1`, and `shell` is `null`. + * + * The value of `homedir` returned by `os.userInfo()` is provided by the operating + * system. This differs from the result of `os.homedir()`, which queries + * environment variables for the home directory before falling back to the + * operating system response. + * + * Throws a [`SystemError`](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`. + * @since v6.0.0 + */ + function userInfo(options?: UserInfoOptionsWithStringEncoding): UserInfo; + function userInfo(options: UserInfoOptionsWithBufferEncoding): UserInfo; + function userInfo(options: UserInfoOptions): UserInfo; + type SignalConstants = { + [key in NodeJS.Signals]: number; + }; + namespace constants { + const UV_UDP_REUSEADDR: number; + namespace signals {} + const signals: SignalConstants; + namespace errno { + const E2BIG: number; + const EACCES: number; + const EADDRINUSE: number; + const EADDRNOTAVAIL: number; + const EAFNOSUPPORT: number; + const EAGAIN: number; + const EALREADY: number; + const EBADF: number; + const EBADMSG: number; + const EBUSY: number; + const ECANCELED: number; + const ECHILD: number; + const ECONNABORTED: number; + const ECONNREFUSED: number; + const ECONNRESET: number; + const EDEADLK: number; + const EDESTADDRREQ: number; + const EDOM: number; + const EDQUOT: number; + const EEXIST: number; + const EFAULT: number; + const EFBIG: number; + const EHOSTUNREACH: number; + const EIDRM: number; + const EILSEQ: number; + const EINPROGRESS: number; + const EINTR: number; + const EINVAL: number; + const EIO: number; + const EISCONN: number; + const EISDIR: number; + const ELOOP: number; + const EMFILE: number; + const EMLINK: number; + const EMSGSIZE: number; + const EMULTIHOP: number; + const ENAMETOOLONG: number; + const ENETDOWN: number; + const ENETRESET: number; + const ENETUNREACH: number; + const ENFILE: number; + const ENOBUFS: number; + const ENODATA: number; + const ENODEV: number; + const ENOENT: number; + const ENOEXEC: number; + const ENOLCK: number; + const ENOLINK: number; + const ENOMEM: number; + const ENOMSG: number; + const ENOPROTOOPT: number; + const ENOSPC: number; + const ENOSR: number; + const ENOSTR: number; + const ENOSYS: number; + const ENOTCONN: number; + const ENOTDIR: number; + const ENOTEMPTY: number; + const ENOTSOCK: number; + const ENOTSUP: number; + const ENOTTY: number; + const ENXIO: number; + const EOPNOTSUPP: number; + const EOVERFLOW: number; + const EPERM: number; + const EPIPE: number; + const EPROTO: number; + const EPROTONOSUPPORT: number; + const EPROTOTYPE: number; + const ERANGE: number; + const EROFS: number; + const ESPIPE: number; + const ESRCH: number; + const ESTALE: number; + const ETIME: number; + const ETIMEDOUT: number; + const ETXTBSY: number; + const EWOULDBLOCK: number; + const EXDEV: number; + const WSAEINTR: number; + const WSAEBADF: number; + const WSAEACCES: number; + const WSAEFAULT: number; + const WSAEINVAL: number; + const WSAEMFILE: number; + const WSAEWOULDBLOCK: number; + const WSAEINPROGRESS: number; + const WSAEALREADY: number; + const WSAENOTSOCK: number; + const WSAEDESTADDRREQ: number; + const WSAEMSGSIZE: number; + const WSAEPROTOTYPE: number; + const WSAENOPROTOOPT: number; + const WSAEPROTONOSUPPORT: number; + const WSAESOCKTNOSUPPORT: number; + const WSAEOPNOTSUPP: number; + const WSAEPFNOSUPPORT: number; + const WSAEAFNOSUPPORT: number; + const WSAEADDRINUSE: number; + const WSAEADDRNOTAVAIL: number; + const WSAENETDOWN: number; + const WSAENETUNREACH: number; + const WSAENETRESET: number; + const WSAECONNABORTED: number; + const WSAECONNRESET: number; + const WSAENOBUFS: number; + const WSAEISCONN: number; + const WSAENOTCONN: number; + const WSAESHUTDOWN: number; + const WSAETOOMANYREFS: number; + const WSAETIMEDOUT: number; + const WSAECONNREFUSED: number; + const WSAELOOP: number; + const WSAENAMETOOLONG: number; + const WSAEHOSTDOWN: number; + const WSAEHOSTUNREACH: number; + const WSAENOTEMPTY: number; + const WSAEPROCLIM: number; + const WSAEUSERS: number; + const WSAEDQUOT: number; + const WSAESTALE: number; + const WSAEREMOTE: number; + const WSASYSNOTREADY: number; + const WSAVERNOTSUPPORTED: number; + const WSANOTINITIALISED: number; + const WSAEDISCON: number; + const WSAENOMORE: number; + const WSAECANCELLED: number; + const WSAEINVALIDPROCTABLE: number; + const WSAEINVALIDPROVIDER: number; + const WSAEPROVIDERFAILEDINIT: number; + const WSASYSCALLFAILURE: number; + const WSASERVICE_NOT_FOUND: number; + const WSATYPE_NOT_FOUND: number; + const WSA_E_NO_MORE: number; + const WSA_E_CANCELLED: number; + const WSAEREFUSED: number; + } + namespace dlopen { + const RTLD_LAZY: number; + const RTLD_NOW: number; + const RTLD_GLOBAL: number; + const RTLD_LOCAL: number; + const RTLD_DEEPBIND: number; + } + namespace priority { + const PRIORITY_LOW: number; + const PRIORITY_BELOW_NORMAL: number; + const PRIORITY_NORMAL: number; + const PRIORITY_ABOVE_NORMAL: number; + const PRIORITY_HIGH: number; + const PRIORITY_HIGHEST: number; + } + } + const devNull: string; + /** + * The operating system-specific end-of-line marker. + * * `\n` on POSIX + * * `\r\n` on Windows + */ + const EOL: string; + /** + * Returns the operating system CPU architecture for which the Node.js binary was + * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, + * `'mips'`, `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`. + * + * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v26.x/api/process.html#processarch). + * @since v0.5.0 + */ + function arch(): NodeJS.Architecture; + /** + * Returns a string identifying the kernel version. + * + * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not + * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v13.11.0, v12.17.0 + */ + function version(): string; + /** + * Returns a string identifying the operating system platform for which + * the Node.js binary was compiled. The value is set at compile time. + * Possible values are `'aix'`, `'darwin'`, `'freebsd'`, `'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`. + * + * The return value is equivalent to `process.platform`. + * + * The value `'android'` may also be returned if Node.js is built on the Android + * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). + * @since v0.5.0 + */ + function platform(): NodeJS.Platform; + /** + * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`, + * `mips`, `mips64`, `ppc64`, `ppc64le`, `s390x`, `i386`, `i686`, `x86_64`. + * + * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not + * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v18.9.0, v16.18.0 + */ + function machine(): string; + /** + * Returns the operating system's default directory for temporary files as a + * string. + * @since v0.9.9 + */ + function tmpdir(): string; + /** + * Returns a string identifying the endianness of the CPU for which the Node.js + * binary was compiled. + * + * Possible values are `'BE'` for big endian and `'LE'` for little endian. + * @since v0.9.4 + */ + function endianness(): "BE" | "LE"; + /** + * Returns the scheduling priority for the process specified by `pid`. If `pid` is + * not provided or is `0`, the priority of the current process is returned. + * @since v10.10.0 + * @param [pid=0] The process ID to retrieve scheduling priority for. + */ + function getPriority(pid?: number): number; + /** + * Attempts to set the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the process ID of the current process is used. + * + * The `priority` input must be an integer between `-20` (high priority) and `19` (low priority). Due to differences between Unix priority levels and Windows + * priority classes, `priority` is mapped to one of six priority constants in `os.constants.priority`. When retrieving a process priority level, this range + * mapping may cause the return value to be slightly different on Windows. To avoid + * confusion, set `priority` to one of the priority constants. + * + * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user + * privileges. Otherwise the set priority will be silently reduced to `PRIORITY_HIGH`. + * @since v10.10.0 + * @param [pid=0] The process ID to set scheduling priority for. + * @param priority The scheduling priority to assign to the process. + */ + function setPriority(priority: number): void; + function setPriority(pid: number, priority: number): void; +} +declare module "os" { + export * from "node:os"; +} diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json new file mode 100644 index 0000000..165dfe9 --- /dev/null +++ b/node_modules/@types/node/package.json @@ -0,0 +1,140 @@ +{ + "name": "@types/node", + "version": "26.6.4", + "description": "TypeScript definitions for node", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", + "license": "MIT", + "contributors": [ + { + "name": "Microsoft TypeScript", + "githubUsername": "Microsoft", + "url": "https://github.com/Microsoft" + }, + { + "name": "Alberto Schiabel", + "githubUsername": "jkomyno", + "url": "https://github.com/jkomyno" + }, + { + "name": "Andrew Makarov", + "githubUsername": "r3nya", + "url": "https://github.com/r3nya" + }, + { + "name": "Benjamin Toueg", + "githubUsername": "btoueg", + "url": "https://github.com/btoueg" + }, + { + "name": "David Junger", + "githubUsername": "touffy", + "url": "https://github.com/touffy" + }, + { + "name": "Mohsen Azimi", + "githubUsername": "mohsen1", + "url": "https://github.com/mohsen1" + }, + { + "name": "Nikita Galkin", + "githubUsername": "galkin", + "url": "https://github.com/galkin" + }, + { + "name": "Sebastian Silbermann", + "githubUsername": "eps1lon", + "url": "https://github.com/eps1lon" + }, + { + "name": "Wilco Bakker", + "githubUsername": "WilcoBakker", + "url": "https://github.com/WilcoBakker" + }, + { + "name": "Trivikram Kamat", + "githubUsername": "trivikr", + "url": "https://github.com/trivikr" + }, + { + "name": "Junxiao Shi", + "githubUsername": "yoursunny", + "url": "https://github.com/yoursunny" + }, + { + "name": "ExE Boss", + "githubUsername": "ExE-Boss", + "url": "https://github.com/ExE-Boss" + }, + { + "name": "Piotr Błażejewicz", + "githubUsername": "peterblazejewicz", + "url": "https://github.com/peterblazejewicz" + }, + { + "name": "Anna Henningsen", + "githubUsername": "addaleax", + "url": "https://github.com/addaleax" + }, + { + "name": "NodeJS Contributors", + "githubUsername": "NodeJS", + "url": "https://github.com/NodeJS" + }, + { + "name": "Linus Unnebäck", + "githubUsername": "LinusU", + "url": "https://github.com/LinusU" + }, + { + "name": "wafuwafu13", + "githubUsername": "wafuwafu13", + "url": "https://github.com/wafuwafu13" + }, + { + "name": "Matteo Collina", + "githubUsername": "mcollina", + "url": "https://github.com/mcollina" + }, + { + "name": "Dmitry Semigradsky", + "githubUsername": "Semigradsky", + "url": "https://github.com/Semigradsky" + }, + { + "name": "René", + "githubUsername": "Renegade334", + "url": "https://github.com/Renegade334" + }, + { + "name": "Yagiz Nizipli", + "githubUsername": "anonrig", + "url": "https://github.com/anonrig" + } + ], + "main": "", + "types": "index.d.ts", + "typesVersions": { + "<=5.6": { + "*": [ + "ts5.6/*" + ] + }, + "<=5.7": { + "*": [ + "ts5.7/*" + ] + } + }, + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/node" + }, + "scripts": {}, + "dependencies": { + "undici-types": "~8.9.0" + }, + "peerDependencies": {}, + "typesPublisherContentHash": "6c3e6bb0de9116746132571c03cd320ed541b2c7576c42dd3c7fa509e3440b61", + "typeScriptVersion": "5.6" +} \ No newline at end of file diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts new file mode 100644 index 0000000..ae8fd97 --- /dev/null +++ b/node_modules/@types/node/path.d.ts @@ -0,0 +1,178 @@ +declare module "node:path" { + namespace path { + /** + * A parsed path object generated by path.parse() or consumed by path.format(). + */ + interface ParsedPath { + /** + * The root of the path such as '/' or 'c:\' + */ + root: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base: string; + /** + * The file extension (if any) such as '.html' + */ + ext: string; + /** + * The file name without extension (if any) such as 'index' + */ + name: string; + } + interface FormatInputPathObject { + /** + * The root of the path such as '/' or 'c:\' + */ + root?: string | undefined; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir?: string | undefined; + /** + * The file name including extension (if any) such as 'index.html' + */ + base?: string | undefined; + /** + * The file extension (if any) such as '.html' + */ + ext?: string | undefined; + /** + * The file name without extension (if any) such as 'index' + */ + name?: string | undefined; + } + /** + * Normalize a string path, reducing '..' and '.' parts. + * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory. + * + * @param path string path to normalize. + * @throws {TypeError} if `path` is not a string. + */ + function normalize(path: string): string; + /** + * Join all arguments together and normalize the resulting path. + * + * @param paths paths to join. + * @throws {TypeError} if any of the path segments is not a string. + */ + function join(...paths: string[]): string; + /** + * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. + * + * Starting from leftmost {from} parameter, resolves {to} to an absolute path. + * + * If {to} isn't already absolute, {from} arguments are prepended in right to left order, + * until an absolute path is found. If after using all {from} paths still no absolute path is found, + * the current working directory is used as well. The resulting path is normalized, + * and trailing slashes are removed unless the path gets resolved to the root directory. + * + * @param paths A sequence of paths or path segments. + * @throws {TypeError} if any of the arguments is not a string. + */ + function resolve(...paths: string[]): string; + /** + * The `path.matchesGlob()` method determines if `path` matches the `pattern`. + * @param path The path to glob-match against. + * @param pattern The glob to check the path against. + * @returns Whether or not the `path` matched the `pattern`. + * @throws {TypeError} if `path` or `pattern` are not strings. + * @since v22.5.0 + */ + function matchesGlob(path: string, pattern: string): boolean; + /** + * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. + * + * If the given {path} is a zero-length string, `false` will be returned. + * + * @param path path to test. + * @throws {TypeError} if `path` is not a string. + */ + function isAbsolute(path: string): boolean; + /** + * Solve the relative path from {from} to {to} based on the current working directory. + * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. + * + * @throws {TypeError} if either `from` or `to` is not a string. + */ + function relative(from: string, to: string): string; + /** + * Return the directory name of a path. Similar to the Unix dirname command. + * + * @param path the path to evaluate. + * @throws {TypeError} if `path` is not a string. + */ + function dirname(path: string): string; + /** + * Return the last portion of a path. Similar to the Unix basename command. + * Often used to extract the file name from a fully qualified path. + * + * @param path the path to evaluate. + * @param suffix optionally, an extension to remove from the result. + * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string. + */ + function basename(path: string, suffix?: string): string; + /** + * Return the extension of the path, from the last '.' to end of string in the last portion of the path. + * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string. + * + * @param path the path to evaluate. + * @throws {TypeError} if `path` is not a string. + */ + function extname(path: string): string; + /** + * The platform-specific file separator. '\\' or '/'. + */ + const sep: "\\" | "/"; + /** + * The platform-specific file delimiter. ';' or ':'. + */ + const delimiter: ";" | ":"; + /** + * Returns an object from a path string - the opposite of format(). + * + * @param path path to evaluate. + * @throws {TypeError} if `path` is not a string. + */ + function parse(path: string): ParsedPath; + /** + * Returns a path string from an object - the opposite of parse(). + * + * @param pathObject path to evaluate. + */ + function format(pathObject: FormatInputPathObject): string; + /** + * On Windows systems only, returns an equivalent namespace-prefixed path for the given path. + * If path is not a string, path will be returned without modifications. + * This method is meaningful only on Windows system. + * On POSIX systems, the method is non-operational and always returns path without modifications. + */ + function toNamespacedPath(path: string): string; + } + namespace path { + export { + /** + * The `path.posix` property provides access to POSIX specific implementations of the `path` methods. + * + * The API is accessible via `require('node:path').posix` or `require('node:path/posix')`. + */ + path as posix, + /** + * The `path.win32` property provides access to Windows-specific implementations of the `path` methods. + * + * The API is accessible via `require('node:path').win32` or `require('node:path/win32')`. + */ + path as win32, + }; + } + export = path; +} +declare module "path" { + import path = require("node:path"); + export = path; +} diff --git a/node_modules/@types/node/path/posix.d.ts b/node_modules/@types/node/path/posix.d.ts new file mode 100644 index 0000000..d60f629 --- /dev/null +++ b/node_modules/@types/node/path/posix.d.ts @@ -0,0 +1,8 @@ +declare module "node:path/posix" { + import path = require("node:path"); + export = path.posix; +} +declare module "path/posix" { + import path = require("path"); + export = path.posix; +} diff --git a/node_modules/@types/node/path/win32.d.ts b/node_modules/@types/node/path/win32.d.ts new file mode 100644 index 0000000..e6aa9fa --- /dev/null +++ b/node_modules/@types/node/path/win32.d.ts @@ -0,0 +1,8 @@ +declare module "node:path/win32" { + import path = require("node:path"); + export = path.win32; +} +declare module "path/win32" { + import path = require("path"); + export = path.win32; +} diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts new file mode 100644 index 0000000..e4bea8f --- /dev/null +++ b/node_modules/@types/node/perf_hooks.d.ts @@ -0,0 +1,617 @@ +declare module "node:perf_hooks" { + import { InternalEventTargetEventProperties } from "node:events"; + // #region web types + type EntryType = + | "dns" // Node.js only + | "function" // Node.js only + | "gc" // Node.js only + | "http2" // Node.js only + | "http" // Node.js only + | "mark" // available on the Web + | "measure" // available on the Web + | "net" // Node.js only + | "node" // Node.js only + | "quic" // Node.js only + | "resource"; // available on the Web + interface ConnectionTimingInfo { + domainLookupStartTime: number; + domainLookupEndTime: number; + connectionStartTime: number; + connectionEndTime: number; + secureConnectionStartTime: number; + ALPNNegotiatedProtocol: string; + } + interface FetchTimingInfo { + startTime: number; + redirectStartTime: number; + redirectEndTime: number; + postRedirectStartTime: number; + finalServiceWorkerStartTime: number; + finalNetworkRequestStartTime: number; + finalNetworkResponseStartTime: number; + endTime: number; + finalConnectionTimingInfo: ConnectionTimingInfo | null; + encodedBodySize: number; + decodedBodySize: number; + } + type PerformanceEntryList = PerformanceEntry[]; + interface PerformanceMarkOptions { + detail?: any; + startTime?: number; + } + interface PerformanceMeasureOptions { + detail?: any; + duration?: number; + end?: string | number; + start?: string | number; + } + interface PerformanceObserverCallback { + (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void; + } + interface PerformanceObserverInit { + buffered?: boolean; + entryTypes?: EntryType[]; + type?: EntryType; + } + interface PerformanceEventMap { + "resourcetimingbufferfull": Event; + } + interface Performance extends EventTarget, InternalEventTargetEventProperties { + readonly nodeTiming: PerformanceNodeTiming; + readonly timeOrigin: number; + clearMarks(markName?: string): void; + clearMeasures(measureName?: string): void; + clearResourceTimings(resourceTimingName?: string): void; + getEntries(): PerformanceEntryList; + getEntriesByName(name: string, type?: EntryType): PerformanceEntryList; + getEntriesByType(type: EntryType): PerformanceEntryList; + mark(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark; + markResourceTiming( + timingInfo: FetchTimingInfo, + requestedUrl: string, + initiatorType: string, + global: unknown, + cacheMode: string, + bodyInfo: unknown, + responseStatus: number, + deliveryType?: string, + ): PerformanceResourceTiming; + measure(measureName: string, startMark?: string, endMark?: string): PerformanceMeasure; + measure(measureName: string, options: PerformanceMeasureOptions, endMark?: string): PerformanceMeasure; + now(): number; + setResourceTimingBufferSize(maxSize: number): void; + toJSON(): any; + addEventListener( + type: K, + listener: (ev: PerformanceEventMap[K]) => void, + options?: AddEventListenerOptions | boolean, + ): void; + addEventListener( + type: string, + listener: EventListener | EventListenerObject, + options?: AddEventListenerOptions | boolean, + ): void; + removeEventListener( + type: K, + listener: (ev: PerformanceEventMap[K]) => void, + options?: EventListenerOptions | boolean, + ): void; + removeEventListener( + type: string, + listener: EventListener | EventListenerObject, + options?: EventListenerOptions | boolean, + ): void; + /** + * This is an alias of `perf_hooks.eventLoopUtilization()`. + * + * _This property is an extension by Node.js. It is not available in Web browsers._ + * @since v14.10.0, v12.19.0 + * @param utilization1 The result of a previous call to + * `eventLoopUtilization()`. + * @param utilization2 The result of a previous call to + * `eventLoopUtilization()` prior to `utilization1`. + */ + eventLoopUtilization( + utilization1?: EventLoopUtilization, + utilization2?: EventLoopUtilization, + ): EventLoopUtilization; + /** + * This is an alias of `perf_hooks.timerify()`. + * + * _This property is an extension by Node.js. It is not available in Web browsers._ + * @since v8.5.0 + */ + timerify any>(fn: T, options?: TimerifyOptions): T; + } + var Performance: { + prototype: Performance; + new(): Performance; + }; + interface PerformanceEntry { + readonly duration: number; + readonly entryType: EntryType; + readonly name: string; + readonly startTime: number; + toJSON(): any; + } + var PerformanceEntry: { + prototype: PerformanceEntry; + new(): PerformanceEntry; + }; + interface PerformanceMark extends PerformanceEntry { + readonly detail: any; + readonly entryType: "mark"; + } + var PerformanceMark: { + prototype: PerformanceMark; + new(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark; + }; + interface PerformanceMeasure extends PerformanceEntry { + readonly detail: any; + readonly entryType: "measure"; + } + var PerformanceMeasure: { + prototype: PerformanceMeasure; + new(): PerformanceMeasure; + }; + interface PerformanceObserver { + disconnect(): void; + observe(options: PerformanceObserverInit): void; + takeRecords(): PerformanceEntryList; + } + var PerformanceObserver: { + prototype: PerformanceObserver; + new(callback: PerformanceObserverCallback): PerformanceObserver; + readonly supportedEntryTypes: readonly EntryType[]; + }; + interface PerformanceObserverEntryList { + getEntries(): PerformanceEntryList; + getEntriesByName(name: string, type?: EntryType): PerformanceEntryList; + getEntriesByType(type: EntryType): PerformanceEntryList; + } + var PerformanceObserverEntryList: { + prototype: PerformanceObserverEntryList; + new(): PerformanceObserverEntryList; + }; + interface PerformanceResourceTiming extends PerformanceEntry { + readonly connectEnd: number; + readonly connectStart: number; + readonly decodedBodySize: number; + readonly domainLookupEnd: number; + readonly domainLookupStart: number; + readonly encodedBodySize: number; + readonly entryType: "resource"; + readonly fetchStart: number; + readonly initiatorType: string; + readonly nextHopProtocol: string; + readonly redirectEnd: number; + readonly redirectStart: number; + readonly requestStart: number; + readonly responseEnd: number; + readonly responseStart: number; + readonly responseStatus: number; + readonly secureConnectionStart: number; + readonly transferSize: number; + readonly workerStart: number; + toJSON(): any; + } + var PerformanceResourceTiming: { + prototype: PerformanceResourceTiming; + new(): PerformanceResourceTiming; + }; + var performance: Performance; + // #endregion + /** + * _This class is an extension by Node.js. It is not available in Web browsers._ + * + * Provides detailed Node.js timing data. + * + * The constructor of this class is not exposed to users directly. + * @since v19.0.0 + */ + class PerformanceNodeEntry extends PerformanceEntry { + /** + * Additional detail specific to the `entryType`. + * @since v16.0.0 + */ + readonly detail: any; + readonly entryType: "dns" | "function" | "gc" | "http2" | "http" | "net" | "node" | "quic"; + } + interface UVMetrics { + /** + * Number of event loop iterations. + */ + readonly loopCount: number; + /** + * Number of events that have been processed by the event handler. + */ + readonly events: number; + /** + * Number of events that were waiting to be processed when the event provider was called. + */ + readonly eventsWaiting: number; + } + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Provides timing details for Node.js itself. The constructor of this class + * is not exposed to users. + * @since v8.5.0 + */ + interface PerformanceNodeTiming extends PerformanceEntry { + /** + * The high resolution millisecond timestamp at which the Node.js process + * completed bootstrapping. If bootstrapping has not yet finished, the property + * has the value of -1. + * @since v8.5.0 + */ + readonly bootstrapComplete: number; + readonly entryType: "node"; + /** + * The high resolution millisecond timestamp at which the Node.js environment was + * initialized. + * @since v8.5.0 + */ + readonly environment: number; + /** + * The high resolution millisecond timestamp of the amount of time the event loop + * has been idle within the event loop's event provider (e.g. `epoll_wait`). This + * does not take CPU usage into consideration. If the event loop has not yet + * started (e.g., in the first tick of the main script), the property has the + * value of 0. + * @since v14.10.0, v12.19.0 + */ + readonly idleTime: number; + /** + * The high resolution millisecond timestamp at which the Node.js event loop + * exited. If the event loop has not yet exited, the property has the value of -1\. + * It can only have a value of not -1 in a handler of the `'exit'` event. + * @since v8.5.0 + */ + readonly loopExit: number; + /** + * The high resolution millisecond timestamp at which the Node.js event loop + * started. If the event loop has not yet started (e.g., in the first tick of the + * main script), the property has the value of -1. + * @since v8.5.0 + */ + readonly loopStart: number; + /** + * The high resolution millisecond timestamp at which the Node.js process was initialized. + * @since v8.5.0 + */ + readonly nodeStart: number; + /** + * This is a wrapper to the `uv_metrics_info` function. + * It returns the current set of event loop metrics. + * + * It is recommended to use this property inside a function whose execution was + * scheduled using `setImmediate` to avoid collecting metrics before finishing all + * operations scheduled during the current loop iteration. + * @since v22.8.0, v20.18.0 + */ + readonly uvMetricsInfo: UVMetrics; + /** + * The high resolution millisecond timestamp at which the V8 platform was + * initialized. + * @since v8.5.0 + */ + readonly v8Start: number; + } + namespace constants { + const NODE_PERFORMANCE_GC_MAJOR: number; + const NODE_PERFORMANCE_GC_MINOR: number; + const NODE_PERFORMANCE_GC_MINOR_MARK_SWEEP: number; + const NODE_PERFORMANCE_GC_INCREMENTAL: number; + const NODE_PERFORMANCE_GC_WEAKCB: number; + const NODE_PERFORMANCE_GC_FLAGS_NO: number; + const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number; + const NODE_PERFORMANCE_GC_FLAGS_FORCED: number; + const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number; + const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number; + const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number; + const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number; + } + interface EventLoopMonitorOptions { + /** + * When `true`, samples are taken once per + * event loop iteration. **Default:** `false`. + */ + samplePerIteration?: boolean | undefined; + /** + * The sampling rate in milliseconds for interval-based + * sampling. Must be greater than zero. This option is ignored when + * `samplePerIteration` is `true`. **Default:** `10`. + */ + resolution?: number | undefined; + } + interface Histogram { + /** + * The number of samples recorded by the histogram. + * @since v17.4.0, v16.14.0 + */ + readonly count: number; + /** + * The number of samples recorded by the histogram. + * v17.4.0, v16.14.0 + */ + readonly countBigInt: bigint; + /** + * The number of times the event loop delay exceeded the maximum 1 hour event + * loop delay threshold. + * @since v11.10.0 + */ + readonly exceeds: number; + /** + * The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold. + * @since v17.4.0, v16.14.0 + */ + readonly exceedsBigInt: bigint; + /** + * The maximum recorded event loop delay. + * @since v11.10.0 + */ + readonly max: number; + /** + * The maximum recorded event loop delay. + * v17.4.0, v16.14.0 + */ + readonly maxBigInt: number; + /** + * The mean of the recorded event loop delays. + * @since v11.10.0 + */ + readonly mean: number; + /** + * The minimum recorded event loop delay. + * @since v11.10.0 + */ + readonly min: number; + /** + * The minimum recorded event loop delay. + * v17.4.0, v16.14.0 + */ + readonly minBigInt: bigint; + /** + * Returns the value at the given percentile. + * @since v11.10.0 + * @param percentile A percentile value in the range (0, 100]. + */ + percentile(percentile: number): number; + /** + * Returns the value at the given percentile. + * @since v17.4.0, v16.14.0 + * @param percentile A percentile value in the range (0, 100]. + */ + percentileBigInt(percentile: number): bigint; + /** + * Returns a `Map` object detailing the accumulated percentile distribution. + * @since v11.10.0 + */ + readonly percentiles: Map; + /** + * Returns a `Map` object detailing the accumulated percentile distribution. + * @since v17.4.0, v16.14.0 + */ + readonly percentilesBigInt: Map; + /** + * Resets the collected histogram data. + * @since v11.10.0 + */ + reset(): void; + /** + * The standard deviation of the recorded event loop delays. + * @since v11.10.0 + */ + readonly stddev: number; + } + /** + * A `Histogram` that records event loop delay, returned by + * `perf_hooks.monitorEventLoopDelay()`. + */ + interface ELDHistogram extends Histogram { + /** + * Disables event loop delay sampling. Returns `true` if sampling was + * stopped, `false` if it was already stopped. + * @since v11.10.0 + */ + disable(): boolean; + /** + * Enables event loop delay sampling. Returns `true` if sampling was + * started, `false` if it was already started. + * @since v11.10.0 + */ + enable(): boolean; + /** + * Disables event loop delay sampling when the histogram is disposed. + * + * ```js + * const { monitorEventLoopDelay } = require('node:perf_hooks'); + * { + * using hist = monitorEventLoopDelay({ resolution: 20 }); + * hist.enable(); + * // The histogram will be disabled when the block is exited. + * } + * ``` + * @since v24.2.0 + */ + [Symbol.dispose](): void; + } + interface RecordableHistogram extends Histogram { + /** + * @since v15.9.0, v14.18.0 + * @param val The amount to record in the histogram. + */ + record(val: number | bigint): void; + /** + * Calculates the amount of time (in nanoseconds) that has passed since the + * previous call to `recordDelta()` and records that amount in the histogram. + * @since v15.9.0, v14.18.0 + */ + recordDelta(): void; + /** + * Adds the values from `other` to this histogram. + * @since v17.4.0, v16.14.0 + */ + add(other: RecordableHistogram): void; + } + interface EventLoopUtilization { + idle: number; + active: number; + utilization: number; + } + /** + * The `eventLoopUtilization()` function returns an object that contains the + * cumulative duration of time the event loop has been both idle and active as a + * high resolution milliseconds timer. The `utilization` value is the calculated + * Event Loop Utilization (ELU). + * + * If bootstrapping has not yet finished on the main thread the properties have + * the value of `0`. The ELU is immediately available on [Worker threads](https://nodejs.org/docs/latest-v26.x/api/worker_threads.html#worker-threads) since + * bootstrap happens within the event loop. + * + * Both `utilization1` and `utilization2` are optional parameters. + * + * If `utilization1` is passed, then the delta between the current call's `active` + * and `idle` times, as well as the corresponding `utilization` value are + * calculated and returned (similar to `process.hrtime()`). + * + * If `utilization1` and `utilization2` are both passed, then the delta is + * calculated between the two arguments. This is a convenience option because, + * unlike `process.hrtime()`, calculating the ELU is more complex than a + * single subtraction. + * + * ELU is similar to CPU utilization, except that it only measures event loop + * statistics and not CPU usage. It represents the percentage of time the event + * loop has spent outside the event loop's event provider (e.g. `epoll_wait`). + * No other CPU idle time is taken into consideration. The following is an example + * of how a mostly idle process will have a high ELU. + * + * ```js + * import { eventLoopUtilization } from 'node:perf_hooks'; + * import { spawnSync } from 'node:child_process'; + * + * setImmediate(() => { + * const elu = eventLoopUtilization(); + * spawnSync('sleep', ['5']); + * console.log(eventLoopUtilization(elu).utilization); + * }); + * ``` + * + * Although the CPU is mostly idle while running this script, the value of + * `utilization` is `1`. This is because the call to + * `child_process.spawnSync()` blocks the event loop from proceeding. + * + * Passing in a user-defined object instead of the result of a previous call to + * `eventLoopUtilization()` will lead to undefined behavior. The return values + * are not guaranteed to reflect any correct state of the event loop. + * @since v25.2.0 + * @param utilization1 The result of a previous call to + * `eventLoopUtilization()`. + * @param utilization2 The result of a previous call to + * `eventLoopUtilization()` prior to `utilization1`. + */ + function eventLoopUtilization( + utilization1?: EventLoopUtilization, + utilization2?: EventLoopUtilization, + ): EventLoopUtilization; + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Creates a histogram object that samples and reports the event loop delay over + * time. The delays will be reported in nanoseconds. + * + * By default, the histogram is updated by a timer using the configured + * `resolution`. When `samplePerIteration` is `true`, samples are taken once per + * event loop iteration using `uv_prepare_t` and `uv_check_t` hooks. In that mode, + * the histogram does not keep the loop alive or force additional iterations when + * the application is idle. + * The two sampling modes produce significantly different results and should not + * be compared directly. + * + * ```js + * import { monitorEventLoopDelay } from 'node:perf_hooks'; + * const h = monitorEventLoopDelay({ resolution: 20 }); + * h.enable(); + * // Do something. + * h.disable(); + * console.log(h.min); + * console.log(h.max); + * console.log(h.mean); + * console.log(h.stddev); + * console.log(h.percentiles); + * console.log(h.percentile(50)); + * console.log(h.percentile(99)); + * ``` + * @since v11.10.0 + */ + function monitorEventLoopDelay(options?: EventLoopMonitorOptions): ELDHistogram; + interface TimerifyOptions { + /** + * A histogram object created using + * `perf_hooks.createHistogram()` that will record runtime durations in + * nanoseconds. + */ + histogram?: RecordableHistogram | undefined; + } + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Wraps a function within a new function that measures the running time of the + * wrapped function. A `PerformanceObserver` must be subscribed to the `'function'` + * event type in order for the timing details to be accessed. + * + * ```js + * import { timerify, performance, PerformanceObserver } from 'node:perf_hooks'; + * + * function someFunction() { + * console.log('hello world'); + * } + * + * const wrapped = timerify(someFunction); + * + * const obs = new PerformanceObserver((list) => { + * console.log(list.getEntries()[0].duration); + * + * performance.clearMarks(); + * performance.clearMeasures(); + * obs.disconnect(); + * }); + * obs.observe({ entryTypes: ['function'] }); + * + * // A performance timeline entry will be created + * wrapped(); + * ``` + * + * If the wrapped function returns a promise, a finally handler will be attached + * to the promise and the duration will be reported once the finally handler is + * invoked. + * @since v25.2.0 + */ + function timerify any>(fn: T, options?: TimerifyOptions): T; + interface CreateHistogramOptions { + /** + * The minimum recordable value. Must be an integer value greater than 0. + * @default 1 + */ + lowest?: number | bigint | undefined; + /** + * The maximum recordable value. Must be an integer value greater than min. + * @default Number.MAX_SAFE_INTEGER + */ + highest?: number | bigint | undefined; + /** + * The number of accuracy digits. Must be a number between 1 and 5. + * @default 3 + */ + figures?: number | undefined; + } + /** + * Returns a `RecordableHistogram`. + * @since v15.9.0, v14.18.0 + */ + function createHistogram(options?: CreateHistogramOptions): RecordableHistogram; +} +declare module "perf_hooks" { + export * from "node:perf_hooks"; +} diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts new file mode 100644 index 0000000..51a3d61 --- /dev/null +++ b/node_modules/@types/node/process.d.ts @@ -0,0 +1,2269 @@ +declare module "node:process" { + import { Control, MessageOptions, SendHandle } from "node:child_process"; + import { PathLike } from "node:fs"; + import * as tty from "node:tty"; + import { Worker } from "node:worker_threads"; + interface BuiltInModule { + "assert": typeof import("assert"); + "node:assert": typeof import("node:assert"); + "assert/strict": typeof import("assert/strict"); + "node:assert/strict": typeof import("node:assert/strict"); + "async_hooks": typeof import("async_hooks"); + "node:async_hooks": typeof import("node:async_hooks"); + "buffer": typeof import("buffer"); + "node:buffer": typeof import("node:buffer"); + "child_process": typeof import("child_process"); + "node:child_process": typeof import("node:child_process"); + "cluster": typeof import("cluster"); + "node:cluster": typeof import("node:cluster"); + "console": typeof import("console"); + "node:console": typeof import("node:console"); + "constants": typeof import("constants"); + "node:constants": typeof import("node:constants"); + "crypto": typeof import("crypto"); + "node:crypto": typeof import("node:crypto"); + "dgram": typeof import("dgram"); + "node:dgram": typeof import("node:dgram"); + "diagnostics_channel": typeof import("diagnostics_channel"); + "node:diagnostics_channel": typeof import("node:diagnostics_channel"); + "dns": typeof import("dns"); + "node:dns": typeof import("node:dns"); + "dns/promises": typeof import("dns/promises"); + "node:dns/promises": typeof import("node:dns/promises"); + "domain": typeof import("domain"); + "node:domain": typeof import("node:domain"); + "events": typeof import("events"); + "node:events": typeof import("node:events"); + "node:ffi": typeof import("node:ffi"); + "fs": typeof import("fs"); + "node:fs": typeof import("node:fs"); + "fs/promises": typeof import("fs/promises"); + "node:fs/promises": typeof import("node:fs/promises"); + "http": typeof import("http"); + "node:http": typeof import("node:http"); + "http2": typeof import("http2"); + "node:http2": typeof import("node:http2"); + "https": typeof import("https"); + "node:https": typeof import("node:https"); + "inspector": typeof import("inspector"); + "node:inspector": typeof import("node:inspector"); + "inspector/promises": typeof import("inspector/promises"); + "node:inspector/promises": typeof import("node:inspector/promises"); + "module": typeof import("module"); + "node:module": typeof import("node:module"); + "net": typeof import("net"); + "node:net": typeof import("node:net"); + "os": typeof import("os"); + "node:os": typeof import("node:os"); + "path": typeof import("path"); + "node:path": typeof import("node:path"); + "path/posix": typeof import("path/posix"); + "node:path/posix": typeof import("node:path/posix"); + "path/win32": typeof import("path/win32"); + "node:path/win32": typeof import("node:path/win32"); + "perf_hooks": typeof import("perf_hooks"); + "node:perf_hooks": typeof import("node:perf_hooks"); + "process": typeof import("process"); + "node:process": typeof import("node:process"); + "punycode": typeof import("punycode"); + "node:punycode": typeof import("node:punycode"); + "querystring": typeof import("querystring"); + "node:querystring": typeof import("node:querystring"); + "node:quic": typeof import("node:quic"); + "readline": typeof import("readline"); + "node:readline": typeof import("node:readline"); + "readline/promises": typeof import("readline/promises"); + "node:readline/promises": typeof import("node:readline/promises"); + "repl": typeof import("repl"); + "node:repl": typeof import("node:repl"); + "node:sea": typeof import("node:sea"); + "node:sqlite": typeof import("node:sqlite"); + "stream": typeof import("stream"); + "node:stream": typeof import("node:stream"); + "stream/consumers": typeof import("stream/consumers"); + "node:stream/consumers": typeof import("node:stream/consumers"); + "stream/iter": typeof import("stream/iter"); + "node:stream/iter": typeof import("node:stream/iter"); + "stream/promises": typeof import("stream/promises"); + "node:stream/promises": typeof import("node:stream/promises"); + "stream/web": typeof import("stream/web"); + "node:stream/web": typeof import("node:stream/web"); + "string_decoder": typeof import("string_decoder"); + "node:string_decoder": typeof import("node:string_decoder"); + "node:test": typeof import("node:test"); + "node:test/reporters": typeof import("node:test/reporters"); + "timers": typeof import("timers"); + "node:timers": typeof import("node:timers"); + "timers/promises": typeof import("timers/promises"); + "node:timers/promises": typeof import("node:timers/promises"); + "tls": typeof import("tls"); + "node:tls": typeof import("node:tls"); + "trace_events": typeof import("trace_events"); + "node:trace_events": typeof import("node:trace_events"); + "tty": typeof import("tty"); + "node:tty": typeof import("node:tty"); + "url": typeof import("url"); + "node:url": typeof import("node:url"); + "util": typeof import("util"); + "node:util": typeof import("node:util"); + "util/types": typeof import("util/types"); + "node:util/types": typeof import("node:util/types"); + "v8": typeof import("v8"); + "node:v8": typeof import("node:v8"); + "node:vfs": typeof import("node:vfs"); + "vm": typeof import("vm"); + "node:vm": typeof import("node:vm"); + "wasi": typeof import("wasi"); + "node:wasi": typeof import("node:wasi"); + "worker_threads": typeof import("worker_threads"); + "node:worker_threads": typeof import("node:worker_threads"); + "zlib": typeof import("zlib"); + "node:zlib": typeof import("node:zlib"); + } + type SignalsEventMap = { [S in NodeJS.Signals]: [signal: S] }; + interface ProcessEventMap extends SignalsEventMap { + "beforeExit": [code: number]; + "disconnect": []; + "exit": [code: number]; + "message": [ + message: object | boolean | number | string | null, + sendHandle: SendHandle | undefined, + ]; + "rejectionHandled": [promise: Promise]; + "uncaughtException": [error: Error, origin: NodeJS.UncaughtExceptionOrigin]; + "uncaughtExceptionMonitor": [error: Error, origin: NodeJS.UncaughtExceptionOrigin]; + "unhandledRejection": [reason: unknown, promise: Promise]; + "warning": [warning: Error]; + "worker": [worker: Worker]; + "workerMessage": [value: any, source: number]; + } + global { + var process: NodeJS.Process; + namespace process { + export { ProcessEventMap }; + } + namespace NodeJS { + // this namespace merge is here because these are specifically used + // as the type for process.stdin, process.stdout, and process.stderr. + // they can't live in tty.d.ts because we need to disambiguate the imported name. + interface ReadStream extends tty.ReadStream {} + interface WriteStream extends tty.WriteStream {} + interface MemoryUsageFn { + /** + * The `process.memoryUsage()` method iterate over each page to gather informations about memory + * usage which can be slow depending on the program memory allocations. + */ + (): MemoryUsage; + /** + * method returns an integer representing the Resident Set Size (RSS) in bytes. + */ + rss(): number; + } + interface MemoryUsage { + /** + * Resident Set Size, is the amount of space occupied in the main memory device (that is a subset of the total allocated memory) for the + * process, including all C++ and JavaScript objects and code. + */ + rss: number; + /** + * Refers to V8's memory usage. + */ + heapTotal: number; + /** + * Refers to V8's memory usage. + */ + heapUsed: number; + external: number; + /** + * Refers to memory allocated for `ArrayBuffer`s and `SharedArrayBuffer`s, including all Node.js Buffers. This is also included + * in the external value. When Node.js is used as an embedded library, this value may be `0` because allocations for `ArrayBuffer`s + * may not be tracked in that case. + */ + arrayBuffers: number; + } + interface CpuUsage { + user: number; + system: number; + } + interface ProcessRelease { + name: string; + sourceUrl?: string | undefined; + headersUrl?: string | undefined; + libUrl?: string | undefined; + lts?: string | undefined; + } + interface ProcessFeatures { + /** + * A boolean value that is `true` if the current Node.js build is caching builtin modules. + * @since v12.0.0 + */ + readonly cached_builtins: boolean; + /** + * A boolean value that is `true` if the current Node.js build is a debug build. + * @since v0.5.5 + */ + readonly debug: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes the inspector. + * @since v11.10.0 + */ + readonly inspector: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes support for IPv6. + * + * Since all Node.js builds have IPv6 support, this value is always `true`. + * @since v0.5.3 + * @deprecated This property is always true, and any checks based on it are redundant. + */ + readonly ipv6: boolean; + /** + * A boolean value that is `true` if the current Node.js build supports + * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v26.x/api/modules.md#loading-ecmascript-modules-using-require). + * @since v22.10.0 + */ + readonly require_module: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes support for TLS. + * @since v0.5.3 + */ + readonly tls: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes support for ALPN in TLS. + * + * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional ALPN support. + * This value is therefore identical to that of `process.features.tls`. + * @since v4.8.0 + * @deprecated Use `process.features.tls` instead. + */ + readonly tls_alpn: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes support for OCSP in TLS. + * + * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional OCSP support. + * This value is therefore identical to that of `process.features.tls`. + * @since v0.11.13 + * @deprecated Use `process.features.tls` instead. + */ + readonly tls_ocsp: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes support for SNI in TLS. + * + * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional SNI support. + * This value is therefore identical to that of `process.features.tls`. + * @since v0.5.3 + * @deprecated Use `process.features.tls` instead. + */ + readonly tls_sni: boolean; + /** + * A value that is `"strip"` by default, and `false` if + * Node.js is run with `--no-strip-types`. + * @since v22.10.0 + */ + readonly typescript: "strip" | false; + /** + * A boolean value that is `true` if the current Node.js build includes support for libuv. + * + * Since it's not possible to build Node.js without libuv, this value is always `true`. + * @since v0.5.3 + * @deprecated This property is always true, and any checks based on it are redundant. + */ + readonly uv: boolean; + } + interface ProcessVersions extends Dict { + http_parser: string; + node: string; + v8: string; + ares: string; + uv: string; + zlib: string; + modules: string; + openssl: string; + } + type Platform = + | "aix" + | "android" + | "darwin" + | "freebsd" + | "haiku" + | "linux" + | "openbsd" + | "sunos" + | "win32" + | "cygwin" + | "netbsd"; + type Architecture = + | "arm" + | "arm64" + | "ia32" + | "loong64" + | "mips" + | "mipsel" + | "ppc64" + | "riscv64" + | "s390x" + | "x64"; + type Signals = + | "SIGABRT" + | "SIGALRM" + | "SIGBUS" + | "SIGCHLD" + | "SIGCONT" + | "SIGFPE" + | "SIGHUP" + | "SIGILL" + | "SIGINT" + | "SIGIO" + | "SIGIOT" + | "SIGKILL" + | "SIGPIPE" + | "SIGPOLL" + | "SIGPROF" + | "SIGPWR" + | "SIGQUIT" + | "SIGSEGV" + | "SIGSTKFLT" + | "SIGSTOP" + | "SIGSYS" + | "SIGTERM" + | "SIGTRAP" + | "SIGTSTP" + | "SIGTTIN" + | "SIGTTOU" + | "SIGUNUSED" + | "SIGURG" + | "SIGUSR1" + | "SIGUSR2" + | "SIGVTALRM" + | "SIGWINCH" + | "SIGXCPU" + | "SIGXFSZ" + | "SIGBREAK" + | "SIGLOST" + | "SIGINFO"; + type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection"; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['beforeExit']) => { ... }; + * ``` + */ + type BeforeExitListener = (...args: ProcessEventMap["beforeExit"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['disconnect']) => { ... }; + * ``` + */ + type DisconnectListener = (...args: ProcessEventMap["disconnect"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['exit']) => { ... }; + * ``` + */ + type ExitListener = (...args: ProcessEventMap["exit"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['message']) => { ... }; + * ``` + */ + type MessageListener = (...args: ProcessEventMap["message"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['rejectionHandled']) => { ... }; + * ``` + */ + type RejectionHandledListener = (...args: ProcessEventMap["rejectionHandled"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + */ + type SignalsListener = (signal: Signals) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['uncaughtException']) => { ... }; + * ``` + */ + type UncaughtExceptionListener = (...args: ProcessEventMap["uncaughtException"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['unhandledRejection']) => { ... }; + * ``` + */ + type UnhandledRejectionListener = (...args: ProcessEventMap["unhandledRejection"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['warning']) => { ... }; + * ``` + */ + type WarningListener = (...args: ProcessEventMap["warning"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['worker']) => { ... }; + * ``` + */ + type WorkerListener = (...args: ProcessEventMap["worker"]) => void; + interface Socket extends ReadWriteStream { + isTTY?: true | undefined; + } + // Alias for compatibility + interface ProcessEnv extends Dict {} + interface HRTime { + /** + * This is the legacy version of {@link process.hrtime.bigint()} + * before bigint was introduced in JavaScript. + * + * The `process.hrtime()` method returns the current high-resolution real time in a `[seconds, nanoseconds]` tuple `Array`, + * where `nanoseconds` is the remaining part of the real time that can't be represented in second precision. + * + * `time` is an optional parameter that must be the result of a previous `process.hrtime()` call to diff with the current time. + * If the parameter passed in is not a tuple `Array`, a TypeError will be thrown. + * Passing in a user-defined array instead of the result of a previous call to `process.hrtime()` will lead to undefined behavior. + * + * These times are relative to an arbitrary time in the past, + * and not related to the time of day and therefore not subject to clock drift. + * The primary use is for measuring performance between intervals: + * ```js + * const { hrtime } = require('node:process'); + * const NS_PER_SEC = 1e9; + * const time = hrtime(); + * // [ 1800216, 25 ] + * + * setTimeout(() => { + * const diff = hrtime(time); + * // [ 1, 552 ] + * + * console.log(`Benchmark took ${diff[0] * NS_PER_SEC + diff[1]} nanoseconds`); + * // Benchmark took 1000000552 nanoseconds + * }, 1000); + * ``` + * @since 0.7.6 + * @legacy Use {@link process.hrtime.bigint()} instead. + * @param time The result of a previous call to `process.hrtime()` + */ + (time?: [number, number]): [number, number]; + /** + * The `bigint` version of the {@link process.hrtime()} method returning the current high-resolution real time in nanoseconds as a `bigint`. + * + * Unlike {@link process.hrtime()}, it does not support an additional time argument since the difference can just be computed directly by subtraction of the two `bigint`s. + * ```js + * import { hrtime } from 'node:process'; + * + * const start = hrtime.bigint(); + * // 191051479007711n + * + * setTimeout(() => { + * const end = hrtime.bigint(); + * // 191052633396993n + * + * console.log(`Benchmark took ${end - start} nanoseconds`); + * // Benchmark took 1154389282 nanoseconds + * }, 1000); + * ``` + * @since v10.7.0 + */ + bigint(): bigint; + } + interface ProcessPermission { + /** + * Verifies that the process is able to access the given scope and reference. + * If no reference is provided, a global scope is assumed, for instance, `process.permission.has('fs.read')` + * will check if the process has ALL file system read permissions. + * + * The reference has a meaning based on the provided scope. For example, the reference when the scope is File System means files and folders. + * + * The available scopes are: + * + * * `fs` - All File System + * * `fs.read` - File System read operations + * * `fs.write` - File System write operations + * * `child` - Child process spawning operations + * * `worker` - Worker thread spawning operation + * + * ```js + * // Check if the process has permission to read the README file + * process.permission.has('fs.read', './README.md'); + * // Check if the process has read permission operations + * process.permission.has('fs.read'); + * ``` + * @since v20.0.0 + */ + has(scope: string, reference?: string): boolean; + /** + * Drops the specified permission from the current process. This operation is + * **irreversible** — once a permission is dropped, it cannot be restored through + * any Node.js API. + * + * If no reference is provided, the entire scope is dropped. For example, + * `process.permission.drop('fs.read')` will revoke ALL file system read + * permissions. + * + * When a reference is provided, only the permission for that specific resource + * is dropped. For example, `process.permission.drop('fs.read', '/etc/myapp')` + * will revoke read access to that directory while keeping other read + * permissions intact. + * + * **Important:** You can only drop the exact resource that was explicitly + * granted. The reference passed to `drop()` must match the original grant: + * + * * If a permission was granted using a wildcard (`*`), such as + * `--allow-fs-read=*`, individual paths cannot be dropped - only the entire + * scope can be dropped (by calling `drop()` without a reference). + * * If a directory was granted (e.g. `--allow-fs-read=/my/folder`), you cannot + * drop access to individual files inside it. You must drop the same directory + * that was granted. Any remaining grants continue to apply. + * + * The available scopes are the same as [`process.permission.has()`][]: + * + * `fs` - All File System (drops both read and write) + * * `fs.read` - File System read operations + * * `fs.write` - File System write operations + * * `child` - Child process spawning operations + * * `worker` - Worker thread spawning operation + * * `net` - Network operations + * * `inspector` - Inspector operations + * * `wasi` - WASI operations + * * `addon` - Native addon operations + * + * ```js + * const fs = require('node:fs'); + * + * // Read configuration during startup + * const config = fs.readFileSync('/etc/myapp/config.json', 'utf8'); + * + * // Drop read access to the config directory after initialization + * process.permission.drop('fs.read', '/etc/myapp'); + * + * // This will now throw ERR_ACCESS_DENIED + * fs.readFileSync('/etc/myapp/config.json'); + * ``` + * @since v26.3.0 + * @experimental + */ + drop(scope: string, reference?: string): void; + } + interface ProcessReport { + /** + * Write reports in a compact format, single-line JSON, more easily consumable by log processing systems + * than the default multi-line format designed for human consumption. + * @since v13.12.0, v12.17.0 + */ + compact: boolean; + /** + * Directory where the report is written. + * The default value is the empty string, indicating that reports are written to the current + * working directory of the Node.js process. + */ + directory: string; + /** + * Filename where the report is written. If set to the empty string, the output filename will be comprised + * of a timestamp, PID, and sequence number. The default value is the empty string. + */ + filename: string; + /** + * Returns a JavaScript Object representation of a diagnostic report for the running process. + * The report's JavaScript stack trace is taken from `err`, if present. + */ + getReport(err?: Error): object; + /** + * If true, a diagnostic report is generated on fatal errors, + * such as out of memory errors or failed C++ assertions. + * @default false + */ + reportOnFatalError: boolean; + /** + * If true, a diagnostic report is generated when the process + * receives the signal specified by process.report.signal. + * @default false + */ + reportOnSignal: boolean; + /** + * If true, a diagnostic report is generated on uncaught exception. + * @default false + */ + reportOnUncaughtException: boolean; + /** + * If true, a diagnostic report is generated without the environment variables. + * @default false + */ + excludeEnv: boolean; + /** + * The signal used to trigger the creation of a diagnostic report. + * @default 'SIGUSR2' + */ + signal: Signals; + /** + * Writes a diagnostic report to a file. If filename is not provided, the default filename + * includes the date, time, PID, and a sequence number. + * The report's JavaScript stack trace is taken from `err`, if present. + * + * If the value of filename is set to `'stdout'` or `'stderr'`, the report is written + * to the stdout or stderr of the process respectively. + * @param fileName Name of the file where the report is written. + * This should be a relative path, that will be appended to the directory specified in + * `process.report.directory`, or the current working directory of the Node.js process, + * if unspecified. + * @param err A custom error used for reporting the JavaScript stack. + * @return Filename of the generated report. + */ + writeReport(fileName?: string, err?: Error): string; + writeReport(err?: Error): string; + } + interface ResourceUsage { + fsRead: number; + fsWrite: number; + involuntaryContextSwitches: number; + ipcReceived: number; + ipcSent: number; + majorPageFault: number; + maxRSS: number; + minorPageFault: number; + sharedMemorySize: number; + signalsCount: number; + swappedOut: number; + systemCPUTime: number; + unsharedDataSize: number; + unsharedStackSize: number; + userCPUTime: number; + voluntaryContextSwitches: number; + } + interface EmitWarningOptions { + /** + * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted. + * + * @default 'Warning' + */ + type?: string | undefined; + /** + * A unique identifier for the warning instance being emitted. + */ + code?: string | undefined; + /** + * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace. + * + * @default process.emitWarning + */ + ctor?: Function | undefined; + /** + * Additional text to include with the error. + */ + detail?: string | undefined; + } + interface ProcessConfig { + readonly target_defaults: { + readonly cflags: any[]; + readonly default_configuration: string; + readonly defines: string[]; + readonly include_dirs: string[]; + readonly libraries: string[]; + }; + readonly variables: { + readonly clang: number; + readonly host_arch: string; + readonly node_install_npm: boolean; + readonly node_install_waf: boolean; + readonly node_prefix: string; + readonly node_shared_openssl: boolean; + readonly node_shared_v8: boolean; + readonly node_shared_zlib: boolean; + readonly node_use_dtrace: boolean; + readonly node_use_etw: boolean; + readonly node_use_openssl: boolean; + readonly target_arch: string; + readonly v8_no_strict_aliasing: number; + readonly v8_use_snapshot: boolean; + readonly visibility: string; + }; + } + interface Process extends EventEmitter { + /** + * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is + * a `Writable` stream. + * + * For example, to copy `process.stdin` to `process.stdout`: + * + * ```js + * import { stdin, stdout } from 'node:process'; + * + * stdin.pipe(stdout); + * ``` + * + * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information. + */ + stdout: WriteStream & { + fd: 1; + }; + /** + * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is + * a `Writable` stream. + * + * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information. + */ + stderr: WriteStream & { + fd: 2; + }; + /** + * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is + * a `Readable` stream. + * + * For details of how to read from `stdin` see `readable.read()`. + * + * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that + * is compatible with scripts written for Node.js prior to v0.10\. + * For more information see `Stream compatibility`. + * + * In "old" streams mode the `stdin` stream is paused by default, so one + * must call `process.stdin.resume()` to read from it. Note also that calling `process.stdin.resume()` itself would switch stream to "old" mode. + */ + stdin: ReadStream & { + fd: 0; + }; + /** + * The `process.argv` property returns an array containing the command-line + * arguments passed when the Node.js process was launched. The first element will + * be {@link execPath}. See `process.argv0` if access to the original value + * of `argv[0]` is needed. The second element will be the path to the JavaScript + * file being executed. If a [program entry point](https://nodejs.org/docs/latest-v26.x/api/cli.html#program-entry-point) was provided, the second element + * will be the absolute path to it. The remaining elements are additional command-line + * arguments. + * + * For example, assuming the following script for `process-args.js`: + * + * ```js + * import { argv } from 'node:process'; + * + * // print process.argv + * argv.forEach((val, index) => { + * console.log(`${index}: ${val}`); + * }); + * ``` + * + * Launching the Node.js process as: + * + * ```bash + * node process-args.js one two=three four + * ``` + * + * Would generate the output: + * + * ```text + * 0: /usr/local/bin/node + * 1: /Users/mjr/work/node/process-args.js + * 2: one + * 3: two=three + * 4: four + * ``` + * @since v0.1.27 + */ + argv: string[]; + /** + * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts. + * + * ```console + * $ bash -c 'exec -a customArgv0 ./node' + * > process.argv[0] + * '/Volumes/code/external/node/out/Release/node' + * > process.argv0 + * 'customArgv0' + * ``` + * @since v6.4.0 + */ + argv0: string; + /** + * The `process.execArgv` property returns the set of Node.js-specific command-line + * options passed when the Node.js process was launched. These options do not + * appear in the array returned by the {@link argv} property, and do not + * include the Node.js executable, the name of the script, or any options following + * the script name. These options are useful in order to spawn child processes with + * the same execution environment as the parent. + * + * ```bash + * node --icu-data-dir=./foo --require ./bar.js script.js --version + * ``` + * + * Results in `process.execArgv`: + * + * ```json + * ["--icu-data-dir=./foo", "--require", "./bar.js"] + * ``` + * + * And `process.argv`: + * + * ```json + * ["/usr/local/bin/node", "script.js", "--version"] + * ``` + * + * Refer to `Worker constructor` for the detailed behavior of worker + * threads with this property. + * @since v0.7.7 + */ + execArgv: string[]; + /** + * The `process.execPath` property returns the absolute pathname of the executable + * that started the Node.js process. Symbolic links, if any, are resolved. + * + * ```json + * "/usr/local/bin/node" + * ``` + * @since v0.1.100 + */ + execPath: string; + /** + * The `process.abort()` method causes the Node.js process to exit immediately and + * generate a core file. + * + * This feature is not available in `Worker` threads. + * @since v0.7.0 + */ + abort(): never; + /** + * The `process.addUncaughtExceptionCaptureCallback()` function adds a callback + * that will be invoked when an uncaught exception occurs, receiving the exception + * value as its first argument. + * + * Unlike `process.setUncaughtExceptionCaptureCallback()`, this function allows + * multiple callbacks to be registered and does not conflict with the + * [`domain`](https://nodejs.org/docs/latest-v26.x/api/domain.html) module. Callbacks are called in reverse order of registration + * (most recent first). If a callback returns `true`, subsequent callbacks + * and the default uncaught exception handling are skipped. + * + * ```js + * import process from 'node:process'; + * + * process.addUncaughtExceptionCaptureCallback((err) => { + * console.error('Caught exception:', err.message); + * return true; // Indicates exception was handled + * }); + * ``` + * @since v25.9.0 + */ + addUncaughtExceptionCaptureCallback(fn: (err: unknown) => boolean): void; + /** + * The `process.chdir()` method changes the current working directory of the + * Node.js process or throws an exception if doing so fails (for instance, if + * the specified `directory` does not exist). + * + * ```js + * import { chdir, cwd } from 'node:process'; + * + * console.log(`Starting directory: ${cwd()}`); + * try { + * chdir('/tmp'); + * console.log(`New directory: ${cwd()}`); + * } catch (err) { + * console.error(`chdir: ${err}`); + * } + * ``` + * + * This feature is not available in `Worker` threads. + * @since v0.1.17 + */ + chdir(directory: string): void; + /** + * The `process.cwd()` method returns the current working directory of the Node.js + * process. + * + * ```js + * import { cwd } from 'node:process'; + * + * console.log(`Current directory: ${cwd()}`); + * ``` + * @since v0.1.8 + */ + cwd(): string; + /** + * The port used by the Node.js debugger when enabled. + * + * ```js + * import process from 'node:process'; + * + * process.debugPort = 5858; + * ``` + * @since v0.7.2 + */ + debugPort: number; + /** + * The `process.dlopen()` method allows dynamically loading shared objects. It is primarily used by `require()` to load C++ Addons, and + * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()` + * unless there are specific reasons such as custom dlopen flags or loading from ES modules. + * + * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v26.x/api/os.html#dlopen-constants)` + * documentation for details. + * + * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon + * are then accessible via `module.exports`. + * + * The example below shows how to load a C++ Addon, named `local.node`, that exports a `foo` function. All the symbols are loaded before the call returns, by passing the `RTLD_NOW` constant. + * In this example the constant is assumed to be available. + * + * ```js + * import { dlopen } from 'node:process'; + * import { constants } from 'node:os'; + * import { fileURLToPath } from 'node:url'; + * + * const module = { exports: {} }; + * dlopen(module, fileURLToPath(new URL('local.node', import.meta.url)), + * constants.dlopen.RTLD_NOW); + * module.exports.foo(); + * ``` + */ + dlopen(module: object, filename: string, flags?: number): void; + /** + * The `process.emitWarning()` method can be used to emit custom or application + * specific process warnings. These can be listened for by adding a handler to the `'warning'` event. + * + * ```js + * import { emitWarning } from 'node:process'; + * + * // Emit a warning using a string. + * emitWarning('Something happened!'); + * // Emits: (node: 56338) Warning: Something happened! + * ``` + * + * ```js + * import { emitWarning } from 'node:process'; + * + * // Emit a warning using a string and a type. + * emitWarning('Something Happened!', 'CustomWarning'); + * // Emits: (node:56338) CustomWarning: Something Happened! + * ``` + * + * ```js + * import { emitWarning } from 'node:process'; + * + * emitWarning('Something happened!', 'CustomWarning', 'WARN001'); + * // Emits: (node:56338) [WARN001] CustomWarning: Something happened! + * ```js + * + * In each of the previous examples, an `Error` object is generated internally by `process.emitWarning()` and passed through to the `'warning'` handler. + * + * ```js + * import process from 'node:process'; + * + * process.on('warning', (warning) => { + * console.warn(warning.name); // 'Warning' + * console.warn(warning.message); // 'Something happened!' + * console.warn(warning.code); // 'MY_WARNING' + * console.warn(warning.stack); // Stack trace + * console.warn(warning.detail); // 'This is some additional information' + * }); + * ``` + * + * If `warning` is passed as an `Error` object, it will be passed through to the `'warning'` event handler + * unmodified (and the optional `type`, `code` and `ctor` arguments will be ignored): + * + * ```js + * import { emitWarning } from 'node:process'; + * + * // Emit a warning using an Error object. + * const myWarning = new Error('Something happened!'); + * // Use the Error name property to specify the type name + * myWarning.name = 'CustomWarning'; + * myWarning.code = 'WARN001'; + * + * emitWarning(myWarning); + * // Emits: (node:56338) [WARN001] CustomWarning: Something happened! + * ``` + * + * A `TypeError` is thrown if `warning` is anything other than a string or `Error` object. + * + * While process warnings use `Error` objects, the process warning mechanism is not a replacement for normal error handling mechanisms. + * + * The following additional handling is implemented if the warning `type` is `'DeprecationWarning'`: + * * If the `--throw-deprecation` command-line flag is used, the deprecation warning is thrown as an exception rather than being emitted as an event. + * * If the `--no-deprecation` command-line flag is used, the deprecation warning is suppressed. + * * If the `--trace-deprecation` command-line flag is used, the deprecation warning is printed to `stderr` along with the full stack trace. + * @since v8.0.0 + * @param warning The warning to emit. + */ + emitWarning(warning: string | Error, ctor?: Function): void; + emitWarning(warning: string | Error, type?: string, ctor?: Function): void; + emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void; + emitWarning(warning: string | Error, options?: EmitWarningOptions): void; + /** + * The `process.env` property returns an object containing the user environment. + * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html). + * + * An example of this object looks like: + * + * ```json + * { + * "TERM": "xterm-256color", + * "SHELL": "/usr/local/bin/bash", + * "USER": "maciej", + * "PATH": "~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin", + * "PWD": "/Users/maciej", + * "EDITOR": "vim", + * "SHLVL": "1", + * "HOME": "/Users/maciej", + * "LOGNAME": "maciej", + * "_": "/usr/local/bin/node" + * } + * ``` + * + * It is possible to modify this object, but such modifications will not be + * reflected outside the Node.js process, or (unless explicitly requested) + * to other `Worker` threads. + * In other words, the following example would not work: + * + * ```bash + * node -e 'process.env.foo = "bar"' && echo $foo + * ``` + * + * While the following will: + * + * ```js + * import { env } from 'node:process'; + * + * env.foo = 'bar'; + * console.log(env.foo); + * ``` + * + * Assigning a property on `process.env` will implicitly convert the value + * to a string. **This behavior is deprecated.** Future versions of Node.js may + * throw an error when the value is not a string, number, or boolean. + * + * ```js + * import { env } from 'node:process'; + * + * env.test = null; + * console.log(env.test); + * // => 'null' + * env.test = undefined; + * console.log(env.test); + * // => 'undefined' + * ``` + * + * Use `delete` to delete a property from `process.env`. + * + * ```js + * import { env } from 'node:process'; + * + * env.TEST = 1; + * delete env.TEST; + * console.log(env.TEST); + * // => undefined + * ``` + * + * On Windows operating systems, environment variables are case-insensitive. + * + * ```js + * import { env } from 'node:process'; + * + * env.TEST = 1; + * console.log(env.test); + * // => 1 + * ``` + * + * Unless explicitly specified when creating a `Worker` instance, + * each `Worker` thread has its own copy of `process.env`, based on its + * parent thread's `process.env`, or whatever was specified as the `env` option + * to the `Worker` constructor. Changes to `process.env` will not be visible + * across `Worker` threads, and only the main thread can make changes that + * are visible to the operating system or to native add-ons. On Windows, a copy of `process.env` on a `Worker` instance operates in a case-sensitive manner + * unlike the main thread. + * @since v0.1.27 + */ + env: ProcessEnv; + /** + * The `process.exit()` method instructs Node.js to terminate the process + * synchronously with an exit status of `code`. If `code` is omitted, exit uses + * either the 'success' code `0` or the value of `process.exitCode` if it has been + * set. Node.js will not terminate until all the `'exit'` event listeners are + * called. + * + * To exit with a 'failure' code: + * + * ```js + * import { exit } from 'node:process'; + * + * exit(1); + * ``` + * + * The shell that executed Node.js should see the exit code as `1`. + * + * Calling `process.exit()` will force the process to exit as quickly as possible + * even if there are still asynchronous operations pending that have not yet + * completed fully, including I/O operations to `process.stdout` and `process.stderr`. + * + * In most situations, it is not actually necessary to call `process.exit()` explicitly. The Node.js process will exit on its own _if there is no additional_ + * _work pending_ in the event loop. The `process.exitCode` property can be set to + * tell the process which exit code to use when the process exits gracefully. + * + * For instance, the following example illustrates a _misuse_ of the `process.exit()` method that could lead to data printed to stdout being + * truncated and lost: + * + * ```js + * import { exit } from 'node:process'; + * + * // This is an example of what *not* to do: + * if (someConditionNotMet()) { + * printUsageToStdout(); + * exit(1); + * } + * ``` + * + * The reason this is problematic is because writes to `process.stdout` in Node.js + * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js + * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed. + * + * Rather than calling `process.exit()` directly, the code _should_ set the `process.exitCode` and allow the process to exit naturally by avoiding + * scheduling any additional work for the event loop: + * + * ```js + * import process from 'node:process'; + * + * // How to properly set the exit code while letting + * // the process exit gracefully. + * if (someConditionNotMet()) { + * printUsageToStdout(); + * process.exitCode = 1; + * } + * ``` + * + * If it is necessary to terminate the Node.js process due to an error condition, + * throwing an _uncaught_ error and allowing the process to terminate accordingly + * is safer than calling `process.exit()`. + * + * In `Worker` threads, this function stops the current thread rather + * than the current process. + * @since v0.1.13 + * @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed. + */ + exit(code?: number | string | null): never; + /** + * A number which will be the process exit code, when the process either + * exits gracefully, or is exited via {@link exit} without specifying + * a code. + * + * Specifying a code to {@link exit} will override any + * previous setting of `process.exitCode`. + * @default undefined + * @since v0.11.8 + */ + exitCode: number | string | null | undefined; + finalization: { + /** + * This function registers a callback to be called when the process emits the `exit` event if the `ref` object was not garbage collected. + * If the object `ref` was garbage collected before the `exit` event is emitted, the callback will be removed from the finalization registry, and it will not be called on process exit. + * + * Inside the callback you can release the resources allocated by the `ref` object. + * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, + * this means that there is a possibility that the callback will not be called under special circumstances. + * + * The idea of ​​this function is to help you free up resources when the starts process exiting, but also let the object be garbage collected if it is no longer being used. + * @param ref The reference to the resource that is being tracked. + * @param callback The callback function to be called when the resource is finalized. + * @since v22.5.0 + * @experimental + */ + register(ref: T, callback: (ref: T, event: "exit") => void): void; + /** + * This function behaves exactly like the `register`, except that the callback will be called when the process emits the `beforeExit` event if `ref` object was not garbage collected. + * + * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, this means that there is a possibility that the callback will not be called under special circumstances. + * @param ref The reference to the resource that is being tracked. + * @param callback The callback function to be called when the resource is finalized. + * @since v22.5.0 + * @experimental + */ + registerBeforeExit(ref: T, callback: (ref: T, event: "beforeExit") => void): void; + /** + * This function remove the register of the object from the finalization registry, so the callback will not be called anymore. + * @param ref The reference to the resource that was registered previously. + * @since v22.5.0 + * @experimental + */ + unregister(ref: object): void; + }; + /** + * The `process.getActiveResourcesInfo()` method returns an array of strings containing + * the types of the active resources that are currently keeping the event loop alive. + * + * ```js + * import { getActiveResourcesInfo } from 'node:process'; + * import { setTimeout } from 'node:timers'; + + * console.log('Before:', getActiveResourcesInfo()); + * setTimeout(() => {}, 1000); + * console.log('After:', getActiveResourcesInfo()); + * // Prints: + * // Before: [ 'TTYWrap', 'TTYWrap', 'TTYWrap' ] + * // After: [ 'TTYWrap', 'TTYWrap', 'TTYWrap', 'Timeout' ] + * ``` + * @since v17.3.0, v16.14.0 + */ + getActiveResourcesInfo(): string[]; + /** + * Provides a way to load built-in modules in a globally available function. + * @param id ID of the built-in module being requested. + */ + getBuiltinModule(id: ID): BuiltInModule[ID]; + getBuiltinModule(id: string): object | undefined; + /** + * The `process.getgid()` method returns the numerical group identity of the + * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).) + * + * ```js + * import process from 'node:process'; + * + * if (process.getgid) { + * console.log(`Current gid: ${process.getgid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.1.31 + */ + getgid?: () => number; + /** + * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a + * numeric ID or a group name + * string. If a group name is specified, this method blocks while resolving the + * associated numeric ID. + * + * ```js + * import process from 'node:process'; + * + * if (process.getgid && process.setgid) { + * console.log(`Current gid: ${process.getgid()}`); + * try { + * process.setgid(501); + * console.log(`New gid: ${process.getgid()}`); + * } catch (err) { + * console.log(`Failed to set gid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.1.31 + * @param id The group name or ID + */ + setgid?: (id: number | string) => void; + /** + * The `process.getuid()` method returns the numeric user identity of the process. + * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).) + * + * ```js + * import process from 'node:process'; + * + * if (process.getuid) { + * console.log(`Current uid: ${process.getuid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.1.28 + */ + getuid?: () => number; + /** + * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a + * numeric ID or a username string. + * If a username is specified, the method blocks while resolving the associated + * numeric ID. + * + * ```js + * import process from 'node:process'; + * + * if (process.getuid && process.setuid) { + * console.log(`Current uid: ${process.getuid()}`); + * try { + * process.setuid(501); + * console.log(`New uid: ${process.getuid()}`); + * } catch (err) { + * console.log(`Failed to set uid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.1.28 + */ + setuid?: (id: number | string) => void; + /** + * The `process.geteuid()` method returns the numerical effective user identity of + * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).) + * + * ```js + * import process from 'node:process'; + * + * if (process.geteuid) { + * console.log(`Current uid: ${process.geteuid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v2.0.0 + */ + geteuid?: () => number; + /** + * The `process.seteuid()` method sets the effective user identity of the process. + * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username + * string. If a username is specified, the method blocks while resolving the + * associated numeric ID. + * + * ```js + * import process from 'node:process'; + * + * if (process.geteuid && process.seteuid) { + * console.log(`Current uid: ${process.geteuid()}`); + * try { + * process.seteuid(501); + * console.log(`New uid: ${process.geteuid()}`); + * } catch (err) { + * console.log(`Failed to set uid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v2.0.0 + * @param id A user name or ID + */ + seteuid?: (id: number | string) => void; + /** + * The `process.getegid()` method returns the numerical effective group identity + * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).) + * + * ```js + * import process from 'node:process'; + * + * if (process.getegid) { + * console.log(`Current gid: ${process.getegid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v2.0.0 + */ + getegid?: () => number; + /** + * The `process.setegid()` method sets the effective group identity of the process. + * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group + * name string. If a group name is specified, this method blocks while resolving + * the associated a numeric ID. + * + * ```js + * import process from 'node:process'; + * + * if (process.getegid && process.setegid) { + * console.log(`Current gid: ${process.getegid()}`); + * try { + * process.setegid(501); + * console.log(`New gid: ${process.getegid()}`); + * } catch (err) { + * console.log(`Failed to set gid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v2.0.0 + * @param id A group name or ID + */ + setegid?: (id: number | string) => void; + /** + * The `process.getgroups()` method returns an array with the supplementary group + * IDs. POSIX leaves it unspecified if the effective group ID is included but + * Node.js ensures it always is. + * + * ```js + * import process from 'node:process'; + * + * if (process.getgroups) { + * console.log(process.getgroups()); // [ 16, 21, 297 ] + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.9.4 + */ + getgroups?: () => number[]; + /** + * The `process.setgroups()` method sets the supplementary group IDs for the + * Node.js process. This is a privileged operation that requires the Node.js + * process to have `root` or the `CAP_SETGID` capability. + * + * The `groups` array can contain numeric group IDs, group names, or both. + * + * ```js + * import process from 'node:process'; + * + * if (process.getgroups && process.setgroups) { + * try { + * process.setgroups([501]); + * console.log(process.getgroups()); // new groups + * } catch (err) { + * console.log(`Failed to set groups: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.9.4 + */ + setgroups?: (groups: ReadonlyArray) => void; + /** + * The `process.setUncaughtExceptionCaptureCallback()` function sets a function + * that will be invoked when an uncaught exception occurs, which will receive the + * exception value itself as its first argument. + * + * If such a function is set, the `'uncaughtException'` event will + * not be emitted. If `--abort-on-uncaught-exception` was passed from the + * command line or set through `v8.setFlagsFromString()`, the process will + * not abort. Actions configured to take place on exceptions such as report + * generations will be affected too + * + * To unset the capture function, `process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this + * method with a non-`null` argument while another capture function is set will + * throw an error. + * + * To register multiple callbacks that can coexist, use + * `process.addUncaughtExceptionCaptureCallback()` instead. + * @since v9.3.0 + */ + setUncaughtExceptionCaptureCallback(cb: ((err: unknown) => void) | null): void; + /** + * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}. + * @since v9.3.0 + */ + hasUncaughtExceptionCaptureCallback(): boolean; + /** + * The `process.sourceMapsEnabled` property returns whether the [Source Map v3](https://sourcemaps.info/spec.html) support for stack traces is enabled. + * @since v20.7.0 + * @experimental + */ + readonly sourceMapsEnabled: boolean; + /** + * This function enables or disables the [Source Map v3](https://sourcemaps.info/spec.html) support for + * stack traces. + * + * It provides same features as launching Node.js process with commandline options `--enable-source-maps`. + * + * Only source maps in JavaScript files that are loaded after source maps has been + * enabled will be parsed and loaded. + * @since v16.6.0, v14.18.0 + * @experimental + */ + setSourceMapsEnabled(value: boolean): void; + /** + * The `process.version` property contains the Node.js version string. + * + * ```js + * import { version } from 'node:process'; + * + * console.log(`Version: ${version}`); + * // Version: v14.8.0 + * ``` + * + * To get the version string without the prepended _v_, use`process.versions.node`. + * @since v0.1.3 + */ + readonly version: string; + /** + * The `process.versions` property returns an object listing the version strings of + * Node.js and its dependencies. `process.versions.modules` indicates the current + * ABI version, which is increased whenever a C++ API changes. Node.js will refuse + * to load modules that were compiled against a different module ABI version. + * + * ```js + * import { versions } from 'node:process'; + * + * console.log(versions); + * ``` + * + * Will generate an object similar to: + * + * ```console + * { node: '26.0.0-pre', + * acorn: '8.15.0', + * ada: '3.4.1', + * amaro: '1.1.5', + * ares: '1.34.6', + * brotli: '1.2.0', + * merve: '1.0.0', + * cldr: '48.0', + * icu: '78.2', + * llhttp: '9.3.0', + * modules: '144', + * napi: '10', + * nbytes: '0.1.1', + * ncrypto: '0.0.1', + * nghttp2: '1.68.0', + * nghttp3: '', + * ngtcp2: '', + * openssl: '3.5.4', + * simdjson: '4.2.4', + * simdutf: '7.3.3', + * sqlite: '3.51.2', + * tz: '2025c', + * undici: '7.18.2', + * unicode: '17.0', + * uv: '1.51.0', + * uvwasi: '0.0.23', + * v8: '14.3.127.18-node.10', + * zlib: '1.3.1-e00f703', + * zstd: '1.5.7' } + * ``` + * @since v0.2.0 + */ + readonly versions: ProcessVersions; + /** + * The `process.config` property returns a frozen `Object` containing the + * JavaScript representation of the configure options used to compile the current + * Node.js executable. This is the same as the `config.gypi` file that was produced + * when running the `./configure` script. + * + * An example of the possible output looks like: + * + * ```json + * { + * "target_defaults": + * { "cflags": [], + * "default_configuration": "Release", + * "defines": [], + * "include_dirs": [], + * "libraries": [] }, + * "variables": + * { + * "host_arch": "x64", + * "napi_build_version": 5, + * "node_install_npm": "true", + * "node_prefix": "", + * "node_shared_cares": "false", + * "node_shared_http_parser": "false", + * "node_shared_libuv": "false", + * "node_shared_zlib": "false", + * "node_use_openssl": "true", + * "node_shared_openssl": "false", + * "target_arch": "x64", + * "v8_use_snapshot": 1 + * } + * } + * ``` + * @since v0.7.7 + */ + readonly config: ProcessConfig; + /** + * The `process.kill()` method sends the `signal` to the process identified by`pid`. + * + * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information. + * + * This method will throw an error if the target `pid` does not exist. As a special + * case, a signal of `0` can be used to test for the existence of a process. + * Windows platforms will throw an error if the `pid` is used to kill a process + * group. + * + * Even though the name of this function is `process.kill()`, it is really just a + * signal sender, like the `kill` system call. The signal sent may do something + * other than kill the target process. + * + * ```js + * import process, { kill } from 'node:process'; + * + * process.on('SIGHUP', () => { + * console.log('Got SIGHUP signal.'); + * }); + * + * setTimeout(() => { + * console.log('Exiting.'); + * process.exit(0); + * }, 100); + * + * kill(process.pid, 'SIGHUP'); + * ``` + * + * When `SIGUSR1` is received by a Node.js process, Node.js will start the + * debugger. See `Signal Events`. + * @since v0.0.6 + * @param pid A process ID + * @param [signal='SIGTERM'] The signal to send, either as a string or number. + */ + kill(pid: number, signal?: string | number): true; + /** + * Loads the environment configuration from a `.env` file into `process.env`. If + * the file is not found, error will be thrown. + * + * To load a specific .env file by specifying its path, use the following code: + * + * ```js + * import { loadEnvFile } from 'node:process'; + * + * loadEnvFile('./development.env') + * ``` + * @since v20.12.0 + * @param path The path to the .env file + */ + loadEnvFile(path?: PathLike): void; + /** + * The `process.pid` property returns the PID of the process. + * + * ```js + * import { pid } from 'node:process'; + * + * console.log(`This process is pid ${pid}`); + * ``` + * @since v0.1.15 + */ + readonly pid: number; + /** + * The `process.ppid` property returns the PID of the parent of the + * current process. + * + * ```js + * import { ppid } from 'node:process'; + * + * console.log(`The parent process is pid ${ppid}`); + * ``` + * @since v9.2.0, v8.10.0, v6.13.0 + */ + readonly ppid: number; + /** + * The `process.threadCpuUsage()` method returns the user and system CPU time usage of + * the current worker thread, in an object with properties `user` and `system`, whose + * values are microsecond values (millionth of a second). + * + * The result of a previous call to `process.threadCpuUsage()` can be passed as the + * argument to the function, to get a diff reading. + * @since v23.9.0 + * @param previousValue A previous return value from calling + * `process.threadCpuUsage()` + */ + threadCpuUsage(previousValue?: CpuUsage): CpuUsage; + /** + * The `process.title` property returns the current process title (i.e. returns + * the current value of `ps`). Assigning a new value to `process.title` modifies + * the current value of `ps`. + * + * When a new value is assigned, different platforms will impose different maximum + * length restrictions on the title. Usually such restrictions are quite limited. + * For instance, on Linux and macOS, `process.title` is limited to the size of the + * binary name plus the length of the command-line arguments because setting the `process.title` overwrites the `argv` memory of the process. Node.js v0.8 + * allowed for longer process title strings by also overwriting the `environ` memory but that was potentially insecure and confusing in some (rather obscure) + * cases. + * + * Assigning a value to `process.title` might not result in an accurate label + * within process manager applications such as macOS Activity Monitor or Windows + * Services Manager. + * @since v0.1.104 + */ + title: string; + /** + * The operating system CPU architecture for which the Node.js binary was compiled. + * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, + * `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`. + * + * ```js + * import { arch } from 'node:process'; + * + * console.log(`This processor architecture is ${arch}`); + * ``` + * @since v0.5.0 + */ + readonly arch: Architecture; + /** + * The `process.platform` property returns a string identifying the operating + * system platform for which the Node.js binary was compiled. + * + * Currently possible values are: + * + * * `'aix'` + * * `'darwin'` + * * `'freebsd'` + * * `'linux'` + * * `'openbsd'` + * * `'sunos'` + * * `'win32'` + * + * ```js + * import { platform } from 'node:process'; + * + * console.log(`This platform is ${platform}`); + * ``` + * + * The value `'android'` may also be returned if the Node.js is built on the + * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). + * @since v0.1.16 + */ + readonly platform: Platform; + /** + * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at + * runtime, `require.main` may still refer to the original main module in + * modules that were required before the change occurred. Generally, it's + * safe to assume that the two refer to the same module. + * + * As with `require.main`, `process.mainModule` will be `undefined` if there + * is no entry script. + * @since v0.1.17 + * @deprecated Since v14.0.0 - Use `main` instead. + */ + mainModule?: Module; + memoryUsage: MemoryUsageFn; + /** + * Gets the amount of memory available to the process (in bytes) based on + * limits imposed by the OS. If there is no such constraint, or the constraint + * is unknown, `0` is returned. + * + * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more + * information. + * @since v19.6.0, v18.15.0 + */ + constrainedMemory(): number; + /** + * Gets the amount of free memory that is still available to the process (in bytes). + * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v26.x/api/process.html#processavailablememory) for more information. + * @since v20.13.0 + */ + availableMemory(): number; + /** + * The `process.cpuUsage()` method returns the user and system CPU time usage of + * the current process, in an object with properties `user` and `system`, whose + * values are microsecond values (millionth of a second). These values measure time + * spent in user and system code respectively, and may end up being greater than + * actual elapsed time if multiple CPU cores are performing work for this process. + * + * The result of a previous call to `process.cpuUsage()` can be passed as the + * argument to the function, to get a diff reading. + * + * ```js + * import { cpuUsage } from 'node:process'; + * + * const startUsage = cpuUsage(); + * // { user: 38579, system: 6986 } + * + * // spin the CPU for 500 milliseconds + * const now = Date.now(); + * while (Date.now() - now < 500); + * + * console.log(cpuUsage(startUsage)); + * // { user: 514883, system: 11226 } + * ``` + * @since v6.1.0 + * @param previousValue A previous return value from calling `process.cpuUsage()` + */ + cpuUsage(previousValue?: CpuUsage): CpuUsage; + /** + * `process.nextTick()` adds `callback` to the "next tick queue". This queue is + * fully drained after the current operation on the JavaScript stack runs to + * completion and before the event loop is allowed to continue. It's possible to + * create an infinite loop if one were to recursively call `process.nextTick()`. + * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background. + * + * ```js + * import { nextTick } from 'node:process'; + * + * console.log('start'); + * nextTick(() => { + * console.log('nextTick callback'); + * }); + * console.log('scheduled'); + * // Output: + * // start + * // scheduled + * // nextTick callback + * ``` + * + * This is important when developing APIs in order to give users the opportunity + * to assign event handlers _after_ an object has been constructed but before any + * I/O has occurred: + * + * ```js + * import { nextTick } from 'node:process'; + * + * function MyThing(options) { + * this.setupOptions(options); + * + * nextTick(() => { + * this.startDoingStuff(); + * }); + * } + * + * const thing = new MyThing(); + * thing.getReadyForStuff(); + * + * // thing.startDoingStuff() gets called now, not before. + * ``` + * + * It is very important for APIs to be either 100% synchronous or 100% + * asynchronous. Consider this example: + * + * ```js + * // WARNING! DO NOT USE! BAD UNSAFE HAZARD! + * function maybeSync(arg, cb) { + * if (arg) { + * cb(); + * return; + * } + * + * fs.stat('file', cb); + * } + * ``` + * + * This API is hazardous because in the following case: + * + * ```js + * const maybeTrue = Math.random() > 0.5; + * + * maybeSync(maybeTrue, () => { + * foo(); + * }); + * + * bar(); + * ``` + * + * It is not clear whether `foo()` or `bar()` will be called first. + * + * The following approach is much better: + * + * ```js + * import { nextTick } from 'node:process'; + * + * function definitelyAsync(arg, cb) { + * if (arg) { + * nextTick(cb); + * return; + * } + * + * fs.stat('file', cb); + * } + * ``` + * @since v0.1.26 + * @param args Additional arguments to pass when invoking the `callback` + */ + nextTick(callback: Function, ...args: any[]): void; + /** + * The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process. + * See the documentation for the ['warning' event](https://nodejs.org/docs/latest/api/process.html#event-warning) and the [emitWarning()](https://nodejs.org/docs/latest/api/process.html#processemitwarningwarning-type-code-ctor) method for more information about this flag's behavior. + */ + noDeprecation?: boolean; + /** + * This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag. + * + * `process.permission` is an object whose methods are used to manage permissions for the current process. + * Additional documentation is available in the [Permission Model](https://nodejs.org/api/permissions.html#permission-model). + * @since v20.0.0 + */ + permission: ProcessPermission; + /** + * The `process.release` property returns an `Object` containing metadata related + * to the current release, including URLs for the source tarball and headers-only + * tarball. + * + * `process.release` contains the following properties: + * + * ```json + * { + * "name": "node", + * "lts": "Hydrogen", + * "sourceUrl": "https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz", + * "headersUrl": "https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz", + * "libUrl": "https://nodejs.org/download/release/v18.12.0/win-x64/node.lib" + * } + * ``` + * + * In custom builds from non-release versions of the source tree, only the `name` property may be present. The additional properties should not be + * relied upon to exist. + * @since v3.0.0 + */ + readonly release: ProcessRelease; + readonly features: ProcessFeatures; + /** + * The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag + * is set on the current Node.js process. This property allows programmatic control over the + * tracing of warnings, enabling or disabling stack traces for warnings at runtime. + * + * ```js + * // Enable trace warnings + * process.traceProcessWarnings = true; + * + * // Emit a warning with a stack trace + * process.emitWarning('Warning with stack trace'); + * + * // Disable trace warnings + * process.traceProcessWarnings = false; + * ``` + * @since v6.10.0 + */ + traceProcessWarnings: boolean; + /** + * `process.umask()` returns the Node.js process's file mode creation mask. Child + * processes inherit the mask from the parent process. + * @since v0.1.19 + * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential + * security vulnerability. There is no safe, cross-platform alternative API. + */ + umask(): number; + /** + * Can only be set if not in worker thread. + */ + umask(mask: string | number): number; + /** + * The `process.uptime()` method returns the number of seconds the current Node.js + * process has been running. + * + * The return value includes fractions of a second. Use `Math.floor()` to get whole + * seconds. + * @since v0.5.0 + */ + uptime(): number; + hrtime: HRTime; + /** + * If the Node.js process was spawned with an IPC channel, the process.channel property is a reference to the IPC channel. + * If no IPC channel exists, this property is undefined. + * @since v7.1.0 + */ + channel?: Control; + /** + * If Node.js is spawned with an IPC channel, the `process.send()` method can be + * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object. + * + * If Node.js was not spawned with an IPC channel, `process.send` will be `undefined`. + * + * The message goes through serialization and parsing. The resulting message might + * not be the same as what is originally sent. + * @since v0.5.9 + * @param options used to parameterize the sending of certain types of handles. `options` supports the following properties: + */ + send?( + message: any, + sendHandle?: SendHandle, + options?: MessageOptions, + callback?: (error: Error | null) => void, + ): boolean; + send?( + message: any, + sendHandle: SendHandle, + callback?: (error: Error | null) => void, + ): boolean; + send?( + message: any, + callback: (error: Error | null) => void, + ): boolean; + /** + * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the + * IPC channel to the parent process, allowing the child process to exit gracefully + * once there are no other connections keeping it alive. + * + * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process. + * + * If the Node.js process was not spawned with an IPC channel, `process.disconnect()` will be `undefined`. + * @since v0.7.2 + */ + disconnect?(): void; + /** + * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return `true` so long as the IPC + * channel is connected and will return `false` after `process.disconnect()` is called. + * + * Once `process.connected` is `false`, it is no longer possible to send messages + * over the IPC channel using `process.send()`. + * @since v0.7.2 + */ + connected: boolean; + /** + * The `process.allowedNodeEnvironmentFlags` property is a special, + * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable. + * + * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides `Set.prototype.has` to recognize several different possible flag + * representations. `process.allowedNodeEnvironmentFlags.has()` will + * return `true` in the following cases: + * + * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g., `inspect-brk` for `--inspect-brk`, or `r` for `-r`. + * * Flags passed through to V8 (as listed in `--v8-options`) may replace + * one or more _non-leading_ dashes for an underscore, or vice-versa; + * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`, + * etc. + * * Flags may contain one or more equals (`=`) characters; all + * characters after and including the first equals will be ignored; + * e.g., `--stack-trace-limit=100`. + * * Flags _must_ be allowable within `NODE_OPTIONS`. + * + * When iterating over `process.allowedNodeEnvironmentFlags`, flags will + * appear only _once_; each will begin with one or more dashes. Flags + * passed through to V8 will contain underscores instead of non-leading + * dashes: + * + * ```js + * import { allowedNodeEnvironmentFlags } from 'node:process'; + * + * allowedNodeEnvironmentFlags.forEach((flag) => { + * // -r + * // --inspect-brk + * // --abort_on_uncaught_exception + * // ... + * }); + * ``` + * + * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail + * silently. + * + * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will + * contain what _would have_ been allowable. + * @since v10.10.0 + */ + allowedNodeEnvironmentFlags: ReadonlySet; + /** + * `process.report` is an object whose methods are used to generate diagnostic reports for the current process. + * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v26.x/api/report.html). + * @since v11.8.0 + */ + report: ProcessReport; + /** + * ```js + * import { resourceUsage } from 'node:process'; + * + * console.log(resourceUsage()); + * /* + * Will output: + * { + * userCPUTime: 82872, + * systemCPUTime: 4143, + * maxRSS: 33164, + * sharedMemorySize: 0, + * unsharedDataSize: 0, + * unsharedStackSize: 0, + * minorPageFault: 2469, + * majorPageFault: 0, + * swappedOut: 0, + * fsRead: 0, + * fsWrite: 8, + * ipcSent: 0, + * ipcReceived: 0, + * signalsCount: 0, + * voluntaryContextSwitches: 79, + * involuntaryContextSwitches: 1 + * } + * + * ``` + * @since v12.6.0 + * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t]. + */ + resourceUsage(): ResourceUsage; + /** + * The initial value of `process.throwDeprecation` indicates whether the `--throw-deprecation` flag is set on the current Node.js process. `process.throwDeprecation` + * is mutable, so whether or not deprecation warnings result in errors may be altered at runtime. See the documentation for the 'warning' event and the emitWarning() + * method for more information. + * + * ```bash + * $ node --throw-deprecation -p "process.throwDeprecation" + * true + * $ node -p "process.throwDeprecation" + * undefined + * $ node + * > process.emitWarning('test', 'DeprecationWarning'); + * undefined + * > (node:26598) DeprecationWarning: test + * > process.throwDeprecation = true; + * true + * > process.emitWarning('test', 'DeprecationWarning'); + * Thrown: + * [DeprecationWarning: test] { name: 'DeprecationWarning' } + * ``` + * @since v0.9.12 + */ + throwDeprecation: boolean; + /** + * The `process.traceDeprecation` property indicates whether the `--trace-deprecation` flag is set on the current Node.js process. See the + * documentation for the `'warning' event` and the `emitWarning() method` for more information about this + * flag's behavior. + * @since v0.8.0 + */ + traceDeprecation: boolean; + /** + * An object is "refable" if it implements the Node.js "Refable protocol". + * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')` + * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js + * event loop alive, while "unref'd" objects will not. Historically, this was + * implemented by using `ref()` and `unref()` methods directly on the objects. + * This pattern, however, is being deprecated in favor of the "Refable protocol" + * in order to better support Web Platform API types whose APIs cannot be modified + * to add `ref()` and `unref()` methods but still need to support that behavior. + * @since v22.14.0 + * @experimental + * @param maybeRefable An object that may be "refable". + */ + ref(maybeRefable: any): void; + /** + * An object is "unrefable" if it implements the Node.js "Refable protocol". + * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')` + * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js + * event loop alive, while "unref'd" objects will not. Historically, this was + * implemented by using `ref()` and `unref()` methods directly on the objects. + * This pattern, however, is being deprecated in favor of the "Refable protocol" + * in order to better support Web Platform API types whose APIs cannot be modified + * to add `ref()` and `unref()` methods but still need to support that behavior. + * @since v22.14.0 + * @experimental + * @param maybeRefable An object that may be "unref'd". + */ + unref(maybeRefable: any): void; + /** + * Replaces the current process with a new process. + * + * This is achieved by using the `execve` POSIX function and therefore no memory or other + * resources from the current process are preserved, except for the standard input, + * standard output and standard error file descriptor. + * + * All other resources are discarded by the system when the processes are swapped, without triggering + * any exit or close events and without running any cleanup handler. + * + * On success, all other resources are discarded by the system when the + * processes are swapped, without triggering any exit or close events, without + * running any JavaScript cleanup handler (for example `process.on('exit')`), + * and without invoking native `AtExit` callbacks registered through the + * embedder API. Callers that need to run cleanup logic should do so before + * calling `process.execve()`. + * + * This function does not return on success. If the underlying `execve(2)` + * system call fails, an `Error` is thrown whose `code` property is set to the + * corresponding `errno` string (for example, `'ENOENT'` when `file` does not + * exist), with `syscall` set to `'execve'` and `path` set to `file`. When + * `execve(2)` fails the current process continues to run with its state + * unchanged, so a caller may handle the error and take another action. + * + * This function is not available on Windows or IBM i. + * @since v22.15.0 + * @experimental + * @param file The name or path of the executable file to run. + * @param args List of string arguments. No argument can contain a null-byte (`\u0000`). + * @param env Environment key-value pairs. + * No key or value can contain a null-byte (`\u0000`). + * **Default:** `process.env`. + */ + execve?(file: string, args?: readonly string[], env?: ProcessEnv): never; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ProcessEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ProcessEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: ProcessEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: ProcessEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + } + } + export = process; +} +declare module "process" { + import process = require("node:process"); + export = process; +} diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts new file mode 100644 index 0000000..87fdec9 --- /dev/null +++ b/node_modules/@types/node/punycode.d.ts @@ -0,0 +1,89 @@ +declare module "node:punycode" { + /** + * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only + * characters to the equivalent string of Unicode codepoints. + * + * ```js + * punycode.decode('maana-pta'); // 'mañana' + * punycode.decode('--dqo34k'); // '☃-⌘' + * ``` + * @since v0.5.1 + */ + function decode(string: string): string; + /** + * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters. + * + * ```js + * punycode.encode('mañana'); // 'maana-pta' + * punycode.encode('☃-⌘'); // '--dqo34k' + * ``` + * @since v0.5.1 + */ + function encode(string: string): string; + /** + * The `punycode.toUnicode()` method converts a string representing a domain name + * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be + * converted. + * + * ```js + * // decode domain names + * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com' + * punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com' + * punycode.toUnicode('example.com'); // 'example.com' + * ``` + * @since v0.6.1 + */ + function toUnicode(domain: string): string; + /** + * The `punycode.toASCII()` method converts a Unicode string representing an + * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the + * domain name will be converted. Calling `punycode.toASCII()` on a string that + * already only contains ASCII characters will have no effect. + * + * ```js + * // encode domain names + * punycode.toASCII('mañana.com'); // 'xn--maana-pta.com' + * punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com' + * punycode.toASCII('example.com'); // 'example.com' + * ``` + * @since v0.6.1 + */ + function toASCII(domain: string): string; + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + const ucs2: ucs2; + interface ucs2 { + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + decode(string: string): number[]; + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + encode(codePoints: readonly number[]): string; + } + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + const version: string; +} +declare module "punycode" { + export * from "node:punycode"; +} diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts new file mode 100644 index 0000000..6d821a4 --- /dev/null +++ b/node_modules/@types/node/querystring.d.ts @@ -0,0 +1,139 @@ +declare module "node:querystring" { + interface StringifyOptions { + /** + * The function to use when converting URL-unsafe characters to percent-encoding in the query string. + * @default `querystring.escape()` + */ + encodeURIComponent?: ((str: string) => string) | undefined; + } + interface ParseOptions { + /** + * Specifies the maximum number of keys to parse. Specify `0` to remove key counting limitations. + * @default 1000 + */ + maxKeys?: number | undefined; + /** + * The function to use when decoding percent-encoded characters in the query string. + * @default `querystring.unescape()` + */ + decodeURIComponent?: ((str: string) => string) | undefined; + } + interface ParsedUrlQuery extends NodeJS.Dict {} + interface ParsedUrlQueryInput extends + NodeJS.Dict< + | string + | number + | boolean + | bigint + | ReadonlyArray + | null + > + {} + /** + * The `querystring.stringify()` method produces a URL query string from a + * given `obj` by iterating through the object's "own properties". + * + * It serializes the following types of values passed in `obj`: [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | + * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | + * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) | + * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | + * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | + * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | + * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to + * empty strings. + * + * ```js + * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' }); + * // Returns 'foo=bar&baz=qux&baz=quux&corge=' + * + * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':'); + * // Returns 'foo:bar;baz:qux' + * ``` + * + * By default, characters requiring percent-encoding within the query string will + * be encoded as UTF-8\. If an alternative encoding is required, then an alternative `encodeURIComponent` option will need to be specified: + * + * ```js + * // Assuming gbkEncodeURIComponent function already exists, + * + * querystring.stringify({ w: '中文', foo: 'bar' }, null, null, + * { encodeURIComponent: gbkEncodeURIComponent }); + * ``` + * @since v0.1.25 + * @param obj The object to serialize into a URL query string + * @param [sep='&'] The substring used to delimit key and value pairs in the query string. + * @param [eq='='] . The substring used to delimit keys and values in the query string. + */ + function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string; + /** + * The `querystring.parse()` method parses a URL query string (`str`) into a + * collection of key and value pairs. + * + * For example, the query string `'foo=bar&abc=xyz&abc=123'` is parsed into: + * + * ```json + * { + * "foo": "bar", + * "abc": ["xyz", "123"] + * } + * ``` + * + * The object returned by the `querystring.parse()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`, + * `obj.hasOwnProperty()`, and others + * are not defined and _will not work_. + * + * By default, percent-encoded characters within the query string will be assumed + * to use UTF-8 encoding. If an alternative character encoding is used, then an + * alternative `decodeURIComponent` option will need to be specified: + * + * ```js + * // Assuming gbkDecodeURIComponent function already exists... + * + * querystring.parse('w=%D6%D0%CE%C4&foo=bar', null, null, + * { decodeURIComponent: gbkDecodeURIComponent }); + * ``` + * @since v0.1.25 + * @param str The URL query string to parse + * @param [sep='&'] The substring used to delimit key and value pairs in the query string. + * @param [eq='='] The substring used to delimit keys and values in the query string. + */ + function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; + /** + * The querystring.encode() function is an alias for querystring.stringify(). + */ + const encode: typeof stringify; + /** + * The querystring.decode() function is an alias for querystring.parse(). + */ + const decode: typeof parse; + /** + * The `querystring.escape()` method performs URL percent-encoding on the given `str` in a manner that is optimized for the specific requirements of URL + * query strings. + * + * The `querystring.escape()` method is used by `querystring.stringify()` and is + * generally not expected to be used directly. It is exported primarily to allow + * application code to provide a replacement percent-encoding implementation if + * necessary by assigning `querystring.escape` to an alternative function. + * @since v0.1.25 + */ + function escape(str: string): string; + /** + * The `querystring.unescape()` method performs decoding of URL percent-encoded + * characters on the given `str`. + * + * The `querystring.unescape()` method is used by `querystring.parse()` and is + * generally not expected to be used directly. It is exported primarily to allow + * application code to provide a replacement decoding implementation if + * necessary by assigning `querystring.unescape` to an alternative function. + * + * By default, the `querystring.unescape()` method will attempt to use the + * JavaScript built-in `decodeURIComponent()` method to decode. If that fails, + * a safer equivalent that does not throw on malformed URLs will be used. + * @since v0.1.25 + */ + function unescape(str: string): string; +} +declare module "querystring" { + export * from "node:querystring"; +} diff --git a/node_modules/@types/node/quic.d.ts b/node_modules/@types/node/quic.d.ts new file mode 100644 index 0000000..e48ea27 --- /dev/null +++ b/node_modules/@types/node/quic.d.ts @@ -0,0 +1,2191 @@ +declare module "node:quic" { + import { NonSharedBuffer } from "node:buffer"; + import { KeyObject, X509Certificate } from "node:crypto"; + import { FileHandle } from "node:fs/promises"; + import { BlockList, SocketAddress } from "node:net"; + import { Writer } from "node:stream/iter"; + import { CertificateCompressionAlgorithm, EphemeralKeyInfo } from "node:tls"; + /** + * @since v23.8.0 + */ + type OnSessionCallback = (this: QuicEndpoint, session: QuicSession) => void; + /** + * @since v23.8.0 + */ + type OnStreamCallback = (this: QuicSession, stream: QuicStream) => void; + /** + * @since v23.8.0 + */ + type OnDatagramCallback = (this: QuicSession, datagram: NodeJS.NonSharedUint8Array, early: boolean) => void; + /** + * @since v23.8.0 + */ + type OnDatagramStatusCallback = ( + this: QuicSession, + id: bigint, + status: "acknowledged" | "lost" | "abandoned", + ) => void; + /** + * @since v23.8.0 + */ + type OnApplicationCallback = (this: QuicSession, applicationoptions: SessionApplicationOptions) => void; + /** + * @since v23.8.0 + */ + type OnPathValidationCallback = ( + this: QuicSession, + result: "success" | "failure" | "aborted", + newLocalAddress: SocketAddress, + newRemoteAddress: SocketAddress, + oldLocalAddress: SocketAddress | null, + oldRemoteAddress: SocketAddress | null, + preferredAddress: boolean, + ) => void; + /** + * @since v23.8.0 + */ + type OnSessionTicketCallback = (this: QuicSession, ticket: object) => void; + /** + * @since v23.8.0 + */ + type OnVersionNegotiationCallback = ( + this: QuicSession, + version: number, + requestedVersions: number[], + supportedVersions: number[], + ) => void; + /** + * @since v23.8.0 + */ + type OnHandshakeCallback = (this: QuicSession, info: SessionHandshakeInfo) => void; + /** + * @since v26.2.0 + */ + type OnNewTokenCallback = (this: QuicSession, token: NonSharedBuffer, address: SocketAddress) => void; + /** + * @since v26.2.0 + */ + type OnOriginCallback = (this: QuicSession, origins: string[]) => void; + /** + * Called when TLS key material is available. Only fires when + * `sessionOptions.keylog` is `true`. Multiple lines are emitted during the + * TLS 1.3 handshake, each containing a secret label, the client random, and + * the secret value. + * @since v26.2.0 + */ + type OnKeylogCallback = (this: QuicSession, line: string) => void; + /** + * Called when qlog diagnostic data is available. Only fires when + * `sessionOptions.qlog` is `true`. The `data` chunks should be + * concatenated in order to produce the complete qlog output. When `fin` is + * `true`, no more chunks will be emitted and the concatenated result is a + * complete JSON-SEQ document. + * @since v26.2.0 + */ + type OnQlogCallback = (this: QuicSession, data: string, fin: boolean) => void; + /** + * @since v23.8.0 + */ + type OnBlockedCallback = (this: QuicStream) => void; + /** + * @since v23.8.0 + */ + type OnStreamErrorCallback = (this: QuicStream, error: any) => void; + /** + * Called when initial request or response headers are received. For HTTP/3, + * this delivers request pseudo-headers on the server and response headers + * on the client. + * @since v26.2.0 + */ + type OnHeadersCallback = (this: QuicStream, headers: NodeJS.Dict) => void; + /** + * Called when trailing headers are received from the peer. + * @since v26.2.0 + */ + type OnTrailersCallback = (this: QuicStream, trailers: NodeJS.Dict) => void; + /** + * Called when informational (1xx) headers are received from the server + * (e.g., 103 Early Hints). + * @since v26.2.0 + */ + type OnInfoCallback = (this: QuicStream, headers: NodeJS.Dict) => void; + /** + * @since v23.8.0 + */ + interface TransportParams { + /** + * The preferred IPv4 address to advertise (only used by servers). + * @since v23.8.0 + */ + preferredAddressIpv4?: SocketAddress | undefined; + /** + * The preferred IPv6 address to advertise (only used by servers) + * @since v23.8.0 + */ + preferredAddressIpv6?: SocketAddress | undefined; + /** + * @since v23.8.0 + */ + initialMaxStreamDataBidiLocal?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + initialMaxStreamDataBidiRemote?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + initialMaxStreamDataUni?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + initialMaxData?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + initialMaxStreamsBidi?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + initialMaxStreamsUni?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + maxIdleTimeout?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + activeConnectionIDLimit?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + ackDelayExponent?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + maxAckDelay?: bigint | number | undefined; + /** + * The maximum size in bytes of a DATAGRAM frame payload that this endpoint + * is willing to receive. Set to `0` to disable datagram support. The peer + * will not send datagrams larger than this value. The actual maximum size of + * a datagram that can be _sent_ is determined by the peer's + * `maxDatagramFrameSize`, not this endpoint's value. + * @since v23.8.0 + */ + maxDatagramFrameSize?: bigint | number | undefined; + } + interface SNIEntry { + /** + * The TLS private keys. **Required.** + */ + keys: KeyObject | readonly KeyObject[]; + /** + * The TLS certificates. **Required.** + */ + certs: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray; + /** + * Verify the private key. Default: `false`. + */ + verifyPrivateKey?: boolean | undefined; + /** + * The port to advertise in ORIGIN frames (RFC 9412) for this host name. **Default:** `443`. Only used for HTTP/3 sessions. + */ + port?: number | undefined; + /** + * Whether to include this host name in ORIGIN frames. **Default:** `true`. Set to `false` to exclude a host name + * from ORIGIN advertisements. Wildcard (`'*'`) entries are always excluded regardless of this setting. + */ + authoritative?: boolean | undefined; + } + /** + * @since v26.3.0 + */ + interface ApplicationOptions { + /** + * Maximum number of header name-value pairs accepted per header block. + * Headers beyond this limit are silently dropped. **Default:** `128` + */ + maxHeaderPairs?: bigint | number | undefined; + /** + * Maximum total byte length of all header names and values combined per header + * block. Headers that would push the total over this limit are silently + * dropped. **Default:** `8192` + */ + maxHeaderLength?: bigint | number | undefined; + /** + * Maximum size of a compressed header field section (QPACK). `0` means + * unlimited. **Default:** `0` + */ + maxFieldSectionSize?: bigint | number | undefined; + /** + * QPACK dynamic table capacity in bytes. Set to `0` to disable the dynamic + * table. **Default:** `4096` + */ + qpackMaxDTableCapacity?: bigint | number | undefined; + /** + * QPACK encoder maximum dynamic table capacity. **Default:** `4096` + */ + qpackEncoderMaxDTableCapacity?: bigint | number | undefined; + /** + * Maximum number of streams that can e blocked waiting for QPACK dynamic table + * updates. **Default:** `100` + */ + qpackBlockedStreams?: bigint | number | undefined; + /** + * Enable the extended CONNECT protocol (RFC 9220). **Default:** `false` + */ + enableConnectProtocol?: boolean | undefined; + /** + * Enable HTTP/3 datagrams (RFC 9297). **Default:** `false` + */ + enableDatagrams?: boolean | undefined; + } + type SessionApplicationOptions = { [K in keyof ApplicationOptions]-?: ApplicationOptions[K] & (bigint | boolean) }; + /** + * @since v23.8.0 + */ + interface SessionOptions { + /** + * An endpoint to use. + * @since v23.8.0 + */ + endpoint?: EndpointOptions | QuicEndpoint | undefined; + /** + * The ALPN (Application-Layer Protocol Negotiation) identifier(s). + * + * For **client** sessions, this is a single string specifying the protocol + * the client wants to use (e.g. `'h3'`). + * + * For **server** sessions, this is an array of protocol names in preference + * order that the server supports (e.g. `['h3', 'h3-29']`). During the TLS + * handshake, the server selects the first protocol from its list that the + * client also supports. + * + * The negotiated ALPN determines which Application implementation is used + * for the session. `'h3'` and `'h3-*'` variants select the HTTP/3 + * application; all other values select the default application. + * @since v26.1.0 + */ + alpn?: string | readonly string[] | undefined; + /** + * Application-specific options. + * @since v26.2.0 + */ + application?: ApplicationOptions | undefined; + /** + * The CA certificates to use for client sessions. For server sessions, CA + * certificates are specified per-identity in the `sessionOptions.sni` map. + * @since v23.8.0 + */ + ca?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray | undefined; + /** + * Enables TLS certificate compression ([RFC 8879](https://www.rfc-editor.org/rfc/rfc8879)) for this session. When + * omitted, certificate compression is disabled. + * + * On the server side, the certificate chain is compressed using the first + * listed algorithm that the client advertises support for. On the client side, + * the listed algorithms are advertised to the server so that the server may + * compress its certificate. When client authentication is in use, the option + * also controls compression of the client's certificate. + * + * Compressing the certificate chain is especially useful for QUIC because it + * reduces the size of the server's first flight, which is bounded by the + * anti-amplification limit (see [Certificate size and handshake + * performance](https://nodejs.org/docs/latest-v26.x/api/quic.html#certificate-size-and-handshake-performance)). Certificate compression requires TLS 1.3, which QUIC always + * uses. + * + * At most three algorithms may be specified. The option is silently ignored if + * Node.js was built against a shared OpenSSL that lacks certificate compression + * support. + * @since v26.6.0 + */ + certificateCompression?: readonly CertificateCompressionAlgorithm[] | undefined; + /** + * Specifies the congestion control algorithm that will be used. + * Must be set to one of either `'reno'`, `'cubic'`, or `'bbr'`. + * + * This is an advanced option that users typically won't have need to specify. + * @since v23.8.0 + */ + cc?: `${constants.cc}` | undefined; + /** + * The TLS certificates to use for client sessions. For server sessions, + * certificates are specified per-identity in the `sessionOptions.sni` map. + * @since v23.8.0 + */ + certs?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray | undefined; + /** + * The list of supported TLS 1.3 cipher algorithms. + * @since v23.8.0 + */ + ciphers?: string | undefined; + /** + * The CRL to use for client sessions. For server sessions, CRLs are specified + * per-identity in the `sessionOptions.sni` map. + * @since v23.8.0 + */ + crl?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray | undefined; + /** + * When `true`, enables TLS 0-RTT early data for this session. Early data + * allows the client to send application data before the TLS handshake + * completes, reducing latency on reconnection when a valid session ticket + * is available. Set to `false` to disable early data support. + * @since v26.2.0 + */ + enableEarlyData?: boolean | undefined; + /** + * The list of supported TLS 1.3 cipher groups. + * @since v23.8.0 + */ + groups?: string | undefined; + /** + * When `true`, enables TLS key logging for the session. Key material is + * delivered to the `session.onkeylog` callback in [NSS Key Log Format](https://udn.realityripple.com/docs/Mozilla/Projects/NSS/Key_Log_Format). + * Each callback invocation receives a single line of key material. The output + * can be used with tools such as Wireshark to decrypt captured QUIC traffic. + * @since v23.8.0 + */ + keylog?: boolean | undefined; + /** + * The TLS crypto keys to use for client sessions. For server sessions, + * keys are specified per-identity in the `sessionOptions.sni` map. + * @since v23.8.0 + */ + keys?: KeyObject | readonly KeyObject[] | undefined; + /** + * Specifies the maximum UDP packet payload size. + * @since v23.8.0 + */ + maxPayloadSize?: bigint | number | undefined; + /** + * Specifies the maximum stream flow-control window size. + * @since v23.8.0 + */ + maxStreamWindow?: bigint | number | undefined; + /** + * Specifies the maximum session flow-control window size. + * @since v23.8.0 + */ + maxWindow?: bigint | number | undefined; + /** + * The minimum QUIC version number to allow. This is an advanced option that users + * typically won't have need to specify. + * @since v23.8.0 + */ + minVersion?: number | undefined; + /** + * When the remote peer advertises a preferred address, this option specifies whether + * to use it or ignore it. The default is `'ignore'` because honoring a server's + * preferred address causes the client to migrate its connection to a different IP + * address, which can be exploited for data exfiltration attacks that are + * indistinguishable from legitimate QUIC connection migration at the network level. + * Set to `'use'` only when connecting to trusted servers that require preferred + * address migration. + * @since v23.8.0 + */ + preferredAddressPolicy?: "use" | "ignore" | "default" | undefined; + /** + * When `true`, enables [qlog](https://datatracker.ietf.org/doc/draft-ietf-quic-qlog-main-schema/) diagnostic output for the session. Qlog data + * is delivered to the `session.onqlog` callback as chunks of [JSON-SEQ](https://www.rfc-editor.org/rfc/rfc7464) + * formatted text. The output can be analyzed with qlog visualization tools + * such as [qvis](https://qvis.quictools.info/). + * @since v23.8.0 + */ + qlog?: boolean | undefined; + /** + * A session ticket to use for 0RTT session resumption. + * @since v23.8.0 + */ + sessionTicket?: NodeJS.ArrayBufferView | undefined; + /** + * Controls which datagram to drop when the pending datagram queue + * (sized by `session.maxPendingDatagrams`) is full. Must be one of + * `'drop-oldest'` (discard the oldest queued datagram to make room) or + * `'drop-newest'` (reject the incoming datagram). Dropped datagrams are + * reported as lost via the `ondatagramstatus` callback. + * + * This option is immutable after session creation. + * @since v26.2.0 + */ + datagramDropPolicy?: "drop-oldest" | "drop-newest" | undefined; + /** + * The maximum time in milliseconds that a peer-initiated stream can be idle + * (no data received) before it is automatically destroyed. This protects + * against slowloris-style attacks where a remote peer opens streams but never + * sends data, holding server resources indefinitely. Only peer-initiated + * streams are checked — locally-initiated streams are the application's + * responsibility. Set to `0` to disable. + * + * The idle check runs as part of the normal send processing loop, so it adds + * no additional timers or event loop overhead. The + * `session.stats.streamsIdleTimedOut` counter tracks how many streams have been + * destroyed by this mechanism. + * @since v26.3.0 + */ + streamIdleTimeout?: bigint | number | undefined; + /** + * The maximum number of `SendPendingData` cycles a datagram can survive + * without being sent before it is abandoned. When a datagram cannot be + * sent due to congestion control or packet size constraints, it remains + * in the queue and the attempt counter increments. Once the limit is + * reached, the datagram is dropped and reported as `'abandoned'` via the + * `ondatagramstatus` callback. Valid range: `1` to `255`. + * @since v26.2.0 + */ + maxDatagramSendAttempts?: number | undefined; + /** + * A multiplier applied to the Probe Timeout (PTO) to compute the draining + * period duration after receiving a `CONNECTION_CLOSE` frame from the peer. + * RFC 9000 Section 10.2 requires the draining period to persist for at least + * three times the current PTO. The valid range is `3` to `255`. Values below + * `3` are clamped to `3`. + * @since v26.2.0 + */ + drainingPeriodMultiplier?: number | undefined; + /** + * Specifies the keep-alive timeout in milliseconds. When set to a non-zero + * value, PING frames will be sent automatically to keep the connection alive + * before the idle timeout fires. The value should be less than the effective + * idle timeout (`maxIdleTimeout` transport parameter) to be useful. + * @since v23.8.0 + */ + handshakeTimeout?: bigint | number | undefined; + /** + * Controls how the client handles server certificate validation: + * + * * `'strict'` — OpenSSL aborts the TLS handshake immediately if the server's + * certificate fails validation. The `session.opened` promise rejects with a + * TLS error. The application cannot inspect the certificate or the error + * details. This is the most secure mode. + * + * * `'auto'` — The TLS handshake completes regardless of validation result. + * If validation fails, the `session.opened` promise is rejected with an error + * containing the validation reason, and the session is destroyed. The + * `onhandshake` callback (if set) fires before rejection, allowing diagnostic + * logging. This is the default and matches the behavior of `tls.connect()` + * with `rejectUnauthorized: true`. + * + * * `'manual'` — The TLS handshake completes regardless of validation result. + * The `session.opened` promise resolves with the handshake info, which includes + * `validationErrorReason` and `validationErrorCode` if validation failed. The + * application is responsible for checking these values and deciding whether to + * continue. Use this mode for custom validation logic, certificate pinning, or + * intentionally accepting self-signed certificates. + * @since v26.3.0 + */ + verifyPeer?: "strict" | "auto" | "manual" | undefined; + /** + * The peer server name to target (SNI). Defaults to `'localhost'`. + * @since v26.1.0 + */ + servername?: string | undefined; + /** + * An object mapping host names to TLS identity options for Server Name + * Indication (SNI) support. This is required for server sessions and must + * contain at least one entry. The special key `'*'` specifies the optional + * default/fallback identity used when no other host name matches. If no + * wildcard entry is provided, connections with unrecognized server names + * will be rejected with a TLS `unrecognized_name` alert. Each entry may + * contain: + * @since v26.1.0 + */ + sni?: Record | undefined; + /** + * True to enable TLS tracing output. + * @since v23.8.0 + */ + tlsTrace?: boolean | undefined; + /** + * An opaque address validation token previously received from the server + * via the `session.onnewtoken` callback. Providing a valid token on + * reconnection allows the client to skip the server's address validation, + * reducing handshake latency. + * @since v26.2.0 + */ + token?: NodeJS.ArrayBufferView | undefined; + /** + * The QUIC transport parameters to use for the session. + * @since v23.8.0 + */ + transportParams?: TransportParams | undefined; + /** + * Specifies the maximum number of unacknowledged packets a session should allow. + * @since v23.8.0 + */ + unacknowledgedPacketThreshold?: bigint | number | undefined; + /** + * If `true`, the peer certificate is verified against the list of supplied CAs. + * An error is emitted if verification fails; the error can be inspected via + * the `validationErrorReason` and `validationErrorCode` fields in the + * handshake callback. If `false`, peer certificate verification errors are + * ignored. + */ + rejectUnauthorized?: boolean | undefined; + /** + * When `true` (the default), `connect()` will attempt to reuse an existing + * endpoint rather than creating a new one for each session. This provides + * connection pooling behavior — multiple sessions can share a single UDP + * socket. The reuse logic will not return an endpoint that is listening on + * the same address as the connect target (to prevent CID routing conflicts). + * + * Set to `false` to force creation of a new endpoint for the session. This + * is useful when endpoint isolation is required (e.g., testing stateless + * reset behavior where source port identity matters). + * @since v26.2.0 + */ + reuseEndpoint?: boolean | undefined; + /** + * True to require verification of TLS client certificate. + * @since v23.8.0 + */ + verifyClient?: boolean | undefined; + /** + * True to require private key verification for client sessions. For server + * sessions, this option is specified per-identity in the + * `sessionOptions.sni` map. + * @since v23.8.0 + */ + verifyPrivateKey?: boolean | undefined; + /** + * The QUIC version number to use. This is an advanced option that users typically + * won't have need to specify. + * @since v23.8.0 + */ + version?: number | undefined; + // Undocumented + onerror?: QuicSession["onerror"] | undefined; + onstream?: QuicSession["onstream"] | undefined; + ondatagram?: QuicSession["ondatagram"] | undefined; + ondatagramstatus?: QuicSession["ondatagramstatus"] | undefined; + onpathvalidation?: QuicSession["onpathvalidation"] | undefined; + onsessionticket?: QuicSession["onsessionticket"] | undefined; + onversionnegotiation?: QuicSession["onversionnegotiation"] | undefined; + onhandshake?: QuicSession["onhandshake"] | undefined; + onnewtoken?: QuicSession["onnewtoken"] | undefined; + onearlyrejected?: QuicSession["onearlyrejected"] | undefined; + onorigin?: QuicSession["onorigin"] | undefined; + ongoaway?: QuicSession["ongoaway"] | undefined; + onkeylog?: QuicSession["onkeylog"] | undefined; + onqlog?: QuicSession["onqlog"] | undefined; + onapplication?: QuicSession["onapplication"] | undefined; + onheaders?: QuicStream["onheaders"] | undefined; + ontrailers?: QuicStream["ontrailers"] | undefined; + oninfo?: QuicStream["oninfo"] | undefined; + onwanttrailers?: QuicStream["onwanttrailers"] | undefined; + } + /** + * Initiate a new client-side session. + * + * ```js + * import { connect } from 'node:quic'; + * import { Buffer } from 'node:buffer'; + * + * const enc = new TextEncoder(); + * const alpn = 'foo'; + * const client = await connect('123.123.123.123:8888', { alpn }); + * await client.createUnidirectionalStream({ + * body: enc.encode('hello world'), + * }); + * ``` + * + * By default, every call to `connect(...)` will create a new local + * `QuicEndpoint` instance bound to a new random local IP port. To + * specify the exact local address to use, or to multiplex multiple + * QUIC sessions over a single local port, pass the `endpoint` option + * with either a `QuicEndpoint` or `EndpointOptions` as the argument. + * + * ```js + * import { QuicEndpoint, connect } from 'node:quic'; + * + * const endpoint = new QuicEndpoint({ + * address: '127.0.0.1:1234', + * }); + * + * const client = await connect('123.123.123.123:8888', { endpoint }); + * ``` + * @since v23.8.0 + */ + function connect(address: string | SocketAddress, options?: SessionOptions): Promise; + /** + * Configures the endpoint to listen as a server. When a new session is initiated by + * a remote peer, the given `onsession` callback will be invoked with the created + * session. + * + * ```js + * import { listen } from 'node:quic'; + * + * const endpoint = await listen((session) => { + * // ... handle the session + * }); + * + * // Closing the endpoint allows any sessions open when close is called + * // to complete naturally while preventing new sessions from being + * // initiated. Once all existing sessions have finished, the endpoint + * // will be destroyed. The call returns a promise that is resolved once + * // the endpoint is destroyed. + * await endpoint.close(); + * ``` + * + * By default, every call to `listen(...)` will create a new local + * `QuicEndpoint` instance bound to a new random local IP port. To + * specify the exact local address to use, or to multiplex multiple + * QUIC sessions over a single local port, pass the `endpoint` option + * with either a `QuicEndpoint` or `EndpointOptions` as the argument. + * + * At most, any single `QuicEndpoint` can only be configured to listen as + * a server once. + * @since v23.8.0 + */ + function listen(onsession: OnSessionCallback, options?: SessionOptions): Promise; + interface ListEndpointsOptions { + /** + * If `true` (the default), only returns endpoints that are + * active (not destroyed, not closing, and not busy). If `false` returns all + * endpoints. + */ + active?: boolean | undefined; + } + /** + * Returns the list of all `QuicEndpoint` instances. By default, only active + * endpoints are returned. + * @since v26.4.0 + */ + function listEndpoints(options?: ListEndpointsOptions): QuicEndpoint[]; + /** + * The endpoint configuration options passed when constructing a new `QuicEndpoint` instance. + * @since v23.8.0 + */ + interface EndpointOptions { + /** + * If not specified the endpoint will bind to IPv4 `localhost` on a random port. + * @since v23.8.0 + */ + address?: SocketAddress | string | undefined; + /** + * An optional `net.BlockList` instance for filtering incoming packets by + * source address. When configured, every received UDP packet is checked against + * the block list before any QUIC processing occurs, minimizing resource + * expenditure on blocked sources. The block list is evaluated live — rules + * added to the `BlockList` object after the endpoint is created take effect + * immediately. + * + * See `endpointOptions.blockListPolicy` for how matches are interpreted. + * @since v26.3.0 + */ + blockList?: BlockList | undefined; + /** + * Controls how the `endpointOptions.blockList` is interpreted: + * + * * `'deny'` — Packets from addresses matching the block list are dropped. + * All other addresses are accepted. This is the typical blocklist mode. + * * `'allow'` — Only packets from addresses matching the block list are + * accepted. All other addresses are dropped. This is an allowlist mode + * for restricting access to known clients. + * + * If no block list is configured, this option has no effect. + * @since v26.3.0 + */ + blockListPolicy?: "deny" | "allow" | undefined; + /** + * The endpoint maintains an internal cache of validated socket addresses as a + * performance optimization. This option sets the maximum number of addresses + * that are cached. This is an advanced option that users typically won't have + * need to specify. + * @since v23.8.0 + */ + addressLRUSize?: bigint | number | undefined; + /** + * When `true`, the endpoint will not send stateless reset packets in response + * to packets from unknown connections. Stateless resets allow a peer to detect + * that a connection has been lost even when the server has no state for it. + * Disabling them may be useful in testing or when stateless resets are handled + * at a different layer. + * @since v26.2.0 + */ + disableStatelessReset?: boolean | undefined; + /** + * The number of seconds an endpoint will remain alive after all sessions have + * closed and it is no longer listening. A value of `0` (default) means the + * endpoint is only destroyed when explicitly closed via `endpoint.close()` or + * `endpoint.destroy()`. A positive value starts an idle timer when the endpoint + * becomes idle; if no new sessions are created before the timer fires, the + * endpoint is automatically destroyed. This is useful for connection pooling + * where endpoints should linger briefly for reuse by future `connect()` calls. + * @since v26.2.0 + */ + idleTimeout?: number | undefined; + /** + * When `true`, indicates that the endpoint should bind only to IPv6 addresses. + * @since v23.8.0 + */ + ipv6Only?: boolean | undefined; + /** + * Specifies the maximum number of concurrent sessions allowed per remote IP + * address (ignoring port). When the limit is reached, new connections from the + * same IP are refused with `CONNECTION_REFUSED`. A value of `0` disables the + * limit. The maximum value is `65535`. + * + * This limit can also be changed dynamically after construction via + * `endpoint.maxConnectionsPerHost`. + * @since v23.8.0 + */ + maxConnectionsPerHost?: number | undefined; + /** + * Specifies the maximum total number of concurrent sessions across all remote + * addresses. When the limit is reached, new connections are refused with + * `CONNECTION_REFUSED`. A value of `0` disables the limit. The maximum value is + * `65535`. + * + * This limit can also be changed dynamically after construction via + * `endpoint.maxConnectionsTotal`. + * @since v23.8.0 + */ + maxConnectionsTotal?: number | undefined; + /** + * The maximum number of QUIC retry packets the endpoint will send per second. + * This is a global rate limit (not per-host) that caps the total server-wide + * retry response rate, preventing spoofed-source floods from consuming unbounded + * resources. + * @since v26.3.0 + */ + retryRate?: number | undefined; + /** + * The maximum burst of retry packets allowed before rate limiting takes effect. + * @since v26.3.0 + */ + retryBurst?: number | undefined; + /** + * The maximum number of stateless reset packets the endpoint will send per second. + * @since v26.3.0 + */ + statelessResetRate?: number | undefined; + /** + * The maximum burst of stateless reset packets allowed before rate limiting + * takes effect. + * @since v26.3.0 + */ + statelessResetBurst?: number | undefined; + /** + * The maximum number of version negotiation packets the endpoint will send per + * second. + * @since v26.3.0 + */ + versionNegotiationRate?: number | undefined; + /** + * The maximum number of immediate connection close packets the endpoint will + * send per second. + * @since v26.3.0 + */ + versionNegotiationBurst?: number | undefined; + /** + * The maximum number of immediate connection close packets the endpoint will + * send per second. + * @since v26.3.0 + */ + immediateCloseRate?: number | undefined; + /** + * The maximum burst of immediate connection close packets allowed before rate + * limiting takes effect. + * @since v26.3.0 + */ + immediateCloseBurst?: number | undefined; + /** + * The maximum number of new sessions that a single remote address can create per + * second. This is a per-host rate limit tracked in the address validation LRU + * cache. It prevents a validated remote address from churning through sessions + * (rapidly opening and abandoning connections) faster than the server can handle. + * For benchmarking where traffic comes from a single source, set this to a high + * value. + * @since v26.3.0 + */ + sessionCreationRate?: number | undefined; + /** + * The maximum burst of new session creations allowed from a single remote address + * before rate limiting takes effect. + * @since v26.3.0 + */ + sessionCreationBurst?: number | undefined; + /** + * Specifies the length of time a QUIC retry token is considered valid. + * @since v23.8.0 + */ + retryTokenExpiration?: bigint | number | undefined; + /** + * Specifies the 16-byte secret used to generate QUIC retry tokens. + * @since v23.8.0 + */ + resetTokenSecret?: NodeJS.ArrayBufferView | undefined; + /** + * Specifies the length of time a QUIC token is considered valid. + * @since v23.8.0 + */ + tokenExpiration?: bigint | number | undefined; + /** + * Specifies the 16-byte secret used to generate QUIC tokens. + * @since v23.8.0 + */ + tokenSecret?: NodeJS.ArrayBufferView | undefined; + /** + * @since v23.8.0 + */ + udpReceiveBufferSize?: number | undefined; + /** + * @since v23.8.0 + */ + udpSendBufferSize?: number | undefined; + /** + * @since v23.8.0 + */ + udpTTL?: number | undefined; + /** + * When `true`, requires that the endpoint validate peer addresses using retry packets + * while establishing a new connection. + * @since v23.8.0 + */ + validateAddress?: boolean | undefined; + } + interface SetSNIContextsOptions { + replace?: boolean | undefined; + } + /** + * A `QuicEndpoint` encapsulates the local UDP-port binding for QUIC. It can be + * used as both a client and a server. + * @since v23.8.0 + */ + class QuicEndpoint implements AsyncDisposable { + constructor(options?: EndpointOptions); + /** + * The local UDP socket address to which the endpoint is bound, if any. + * + * If the endpoint is not currently bound then the value will be `undefined`. Read only. + * @since v23.8.0 + */ + readonly address: SocketAddress | undefined; + /** + * When `endpoint.busy` is set to true, the endpoint will temporarily reject + * new sessions from being created. Read/write. + * + * ```js + * // Mark the endpoint busy. New sessions will be prevented. + * endpoint.busy = true; + * + * // Mark the endpoint free. New session will be allowed. + * endpoint.busy = false; + * ``` + * + * The `busy` property is useful when the endpoint is under heavy load and needs to + * temporarily reject new sessions while it catches up. + * @since v23.8.0 + */ + busy: boolean; + /** + * Gracefully close the endpoint. The endpoint will close and destroy itself when + * all currently open sessions close. Once called, new sessions will be rejected. + * + * Returns a promise that is fulfilled when the endpoint is destroyed. + * @since v23.8.0 + */ + close(): Promise; + /** + * A promise that is fulfilled when the endpoint is destroyed. This will be the same promise that is + * returned by the `endpoint.close()` function. Read only. + * @since v23.8.0 + */ + readonly closed: Promise; + /** + * True if `endpoint.close()` has been called and closing the endpoint has not yet completed. + * Read only. + * @since v23.8.0 + */ + readonly closing: boolean; + /** + * Forcefully closes the endpoint by forcing all open sessions to be immediately + * closed. + * @since v23.8.0 + */ + destroy(error?: any): void; + /** + * True if `endpoint.destroy()` has been called. Read only. + * @since v23.8.0 + */ + readonly destroyed: boolean; + /** + * True if the endpoint is actively listening for incoming connections. Read only. + * @since v26.2.0 + */ + readonly listening: boolean; + /** + * The maximum number of concurrent connections allowed per remote IP address. + * `0` means unlimited (default). Can be set at construction time via the + * `maxConnectionsPerHost` option and changed dynamically at any time. + * The valid range is `0` to `65535`. + * @since v26.2.0 + */ + maxConnectionsPerHost: number; + /** + * The maximum total number of concurrent connections across all remote + * addresses. `0` means unlimited (default). Can be set at construction time via + * the `maxConnectionsTotal` option and changed dynamically at any time. + * The valid range is `0` to `65535`. + * @since v26.2.0 + */ + maxConnectionsTotal: number; + /** + * Replaces or updates the SNI TLS contexts for this endpoint. This allows + * changing the TLS identity (key/certificate) used for specific host names + * without restarting the endpoint. Existing sessions are unaffected — only + * new sessions will use the updated contexts. + * + * ```js + * endpoint.setSNIContexts({ + * 'api.example.com': { keys: [newApiKey], certs: [newApiCert] }, + * }); + * + * // Replace the entire SNI map + * endpoint.setSNIContexts({ + * 'api.example.com': { keys: [newApiKey], certs: [newApiCert] }, + * }, { replace: true }); + * ``` + * @since v26.1.0 + * @param entries An object mapping host names to TLS identity options. + * Each entry must include `keys` and `certs`. + */ + setSNIContexts(entries: Record, options?: SetSNIContextsOptions): void; + /** + * The statistics collected for an active endpoint. Read only. + * @since v23.8.0 + */ + readonly stats: QuicEndpoint.Stats; + /** + * Calls `endpoint.close()` and returns a promise that fulfills when the + * endpoint has closed. + * @since v23.8.0 + */ + [Symbol.asyncDispose](): Promise; + } + namespace QuicEndpoint { + /** + * A view of the collected statistics for an endpoint. + * @since v23.8.0 + */ + class Stats { + private constructor(); + /** + * A timestamp indicating the moment the endpoint was created. Read only. + * @since v23.8.0 + */ + readonly createdAt: bigint; + /** + * A timestamp indicating the moment the endpoint was destroyed. Read only. + * @since v23.8.0 + */ + readonly destroyedAt: bigint; + /** + * The total number of bytes received by this endpoint. Read only. + * @since v23.8.0 + */ + readonly bytesReceived: bigint; + /** + * The total number of bytes sent by this endpoint. Read only. + * @since v23.8.0 + */ + readonly bytesSent: bigint; + /** + * The total number of QUIC packets successfully received by this endpoint. Read only. + * @since v23.8.0 + */ + readonly packetsReceived: bigint; + /** + * The total number of QUIC packets successfully sent by this endpoint. Read only. + * @since v23.8.0 + */ + readonly packetsSent: bigint; + /** + * The total number of peer-initiated sessions received by this endpoint. Read only. + * @since v23.8.0 + */ + readonly serverSessions: bigint; + /** + * The total number of sessions initiated by this endpoint. Read only. + * @since v23.8.0 + */ + readonly clientSessions: bigint; + /** + * The total number of times an initial packet was rejected due to the + * endpoint being marked busy. Read only. + * @since v23.8.0 + */ + readonly serverBusyCount: bigint; + /** + * The total number of retry packets sent by this endpoint. Read only. + * @since v23.8.0 + */ + readonly retryCount: bigint; + /** + * The total number of retry packets dropped by the global rate + * limiter. Read only. A non-zero value indicates the endpoint is under retry + * flood pressure. + * @since v26.3.0 + */ + readonly retryRateLimited: bigint; + /** + * The total number of version negotiation packets sent by this + * endpoint. Read only. + * @since v23.8.0 + */ + readonly versionNegotiationCount: bigint; + /** + * The total number of version negotiation packets dropped by + * the global rate limiter. Read only. + * @since v26.3.0 + */ + readonly versionNegotiationRateLimited: bigint; + /** + * The total number of stateless reset packets sent by this + * endpoint. Read only. + * @since v23.8.0 + */ + readonly statelessResetCount: bigint; + /** + * The total number of stateless reset packets dropped by the + * global rate limiter. Read only. + * @since v26.3.0 + */ + readonly statelessResetRateLimited: bigint; + /** + * The total number of immediate connection close packets sent + * by this endpoint. Read only. + * @since v23.8.0 + */ + readonly immediateCloseCount: bigint; + /** + * The total number of immediate connection close packets + * dropped by the global rate limiter. Read only. + * @since v26.3.0 + */ + readonly immediateCloseRateLimited: bigint; + /** + * The total number of session creation attempts dropped by the + * per-host rate limiter. Read only. A non-zero value indicates one or more + * remote addresses are creating sessions faster than the configured rate allows. + * @since v26.3.0 + */ + readonly sessionCreationRateLimited: bigint; + /** + * The total number of incoming packets dropped by the + * block list filter. Read only. + * @since v26.3.0 + */ + readonly packetsBlocked: bigint; + } + } + interface CreateStreamOptions { + /** + * The outbound body source. See `stream.setBody()` for details on + * supported types. When omitted, the stream's outgoing side remains + * writable with no body queued; no FIN is sent immediately. + */ + body?: StreamBody | undefined; + /** + * Initial request or response headers to send. Only + * used when the session supports headers (e.g. HTTP/3). If `body` is not + * specified and `headers` is provided, the stream is treated as + * headers-only (terminal). + */ + headers?: NodeJS.Dict | readonly string[] | undefined; + /** + * The priority level of the stream. One of `'high'`, + * `'default'`, or `'low'`. **Default:** `'default'`. + */ + priority?: "high" | "default" | "low" | undefined; + /** + * When `true`, data from this stream may be + * interleaved with data from other streams of the same priority level. + * When `false`, the stream should be completed before same-priority peers. + * **Default:** `false`. + */ + incremental?: boolean | undefined; + /** + * The maximum number of bytes that the writer + * will buffer before `writeSync()` returns `false`. When the buffered + * data exceeds this limit, the caller should wait for drain before + * writing more. **Default:** `65536` (64 KB). + */ + highWaterMark?: number | undefined; + /** + * Callback for received initial response headers. + * Called with `(headers)`. + */ + onheaders?: QuicStream["onheaders"] | undefined; + /** + * Callback for received trailing headers. + * Called with `(trailers)`. + */ + ontrailers?: QuicStream["ontrailers"] | undefined; + /** + * Callback for received informational (1xx) headers. + * Called with `(headers)`. + */ + oninfo?: QuicStream["oninfo"] | undefined; + /** + * Callback when trailers should be sent. + */ + onwanttrailers?: QuicStream["onwanttrailers"] | undefined; + } + interface SessionDestroyOptions { + /** + * The error code to include in the `CONNECTION_CLOSE` + * frame sent to the peer. **Default:** `0` (no error). + */ + code?: bigint | number | undefined; + /** + * Either `'transport'` or `'application'`. Determines the + * error code namespace used in the `CONNECTION_CLOSE` frame. When `'transport'` + * (the default), the frame type is `0x1c` and the code is interpreted as a QUIC + * transport error. When `'application'`, the frame type is `0x1d` and the code + * is application-specific. **Default:** `'transport'`. + */ + type?: "transport" | "application" | undefined; + /** + * An optional human-readable reason string included in + * the `CONNECTION_CLOSE` frame. Per RFC 9000, this is for diagnostic purposes + * only and should not be used for machine-readable error descriptions. + */ + reason?: string | undefined; + } + interface SessionHandshakeInfo { + /** + * The local socket address. + */ + local: SocketAddress; + /** + * The remote socket address. + */ + remote: SocketAddress; + /** + * The SNI server name negotiated during the handshake. + */ + servername: string; + /** + * The ALPN protocol negotiated during the handshake. + */ + protocol: string; + /** + * The name of the negotiated TLS cipher suite. + */ + cipher: string; + /** + * The TLS protocol version of the cipher suite + * (e.g., `'TLSv1.3'`). + */ + cipherVersion: string; + /** + * If certificate validation failed, the + * reason string. Empty string if validation succeeded. + */ + validationErrorReason: string; + /** + * If certificate validation failed, the + * error code. `0` if validation succeeded. + */ + validationErrorCode: number; + /** + * Whether 0-RTT early data was attempted. + */ + earlyDataAttempted: boolean; + /** + * Whether 0-RTT early data was accepted by + * the server. + */ + earlyDataAccepted: boolean; + } + interface SessionPath { + local: SocketAddress; + remote: SocketAddress; + } + /** + * A `QuicSession` represents the local side of a QUIC connection. + * @since v23.8.0 + */ + class QuicSession implements AsyncDisposable { + private constructor(); + /** + * The current application-level options for this session. These include settings + * that are specific to the negotiated application protocol (e.g. HTTP/3) and may + * be negotiated separately from the transport parameters. Read only. + * @since v26.3.0 + */ + readonly applicationOptions: SessionApplicationOptions; + /** + * Initiate a graceful close of the session. Existing streams will be allowed + * to complete but no new streams will be opened. Once all streams have closed, + * the session will be destroyed. The returned promise will be fulfilled once + * the session has been destroyed. If a non-zero `code` is specified, the + * promise will reject with an `ERR_QUIC_TRANSPORT_ERROR` or + * `ERR_QUIC_APPLICATION_ERROR` depending on the `type`. + * @since v23.8.0 + */ + close(options?: SessionDestroyOptions): Promise; + /** + * A promise that is fulfilled once the TLS handshake completes successfully. + * The resolved value contains information about the established session + * including the negotiated protocol, cipher suite, certificate validation + * status, and 0-RTT early data status. + * + * If the handshake fails or the session is destroyed before the handshake + * completes, the promise will be rejected. + * @since v26.2.0 + */ + readonly opened: Promise; + /** + * A promise that is fulfilled once the session is destroyed. + * @since v23.8.0 + */ + readonly closed: Promise; + /** + * True if `session.close()` has been called and the session has not yet + * been destroyed. Read only. + * @since v26.2.0 + */ + readonly closing: boolean; + /** + * Immediately destroy the session. All streams will be destroyed and the + * session will be closed. If `error` is provided and [`session.onerror`][] is + * set, the `onerror` callback is invoked before destruction. The + * `session.closed` promise will reject with the error. If `options` is + * provided, the `CONNECTION_CLOSE` frame sent to the peer will include the + * specified error code, type, and reason. + * @since v23.8.0 + */ + destroy(error?: any, options?: SessionDestroyOptions): void; + /** + * True if `session.destroy()` has been called. Read only. + * @since v23.8.0 + */ + readonly destroyed: boolean; + /** + * The endpoint that created this session. Returns `null` if the session + * has been destroyed. Read only. + * @since v23.8.0 + */ + readonly endpoint: QuicEndpoint | null; + /** + * The callback to invoke when new application options, e.g. HTTP/3 settings arrived. + * @since v26.4 + */ + onapplication: OnApplicationCallback | undefined; + /** + * An optional callback invoked when the session is destroyed with an error. + * This includes errors caused by user callbacks that throw or reject (see + * [Callback error handling](https://nodejs.org/docs/latest-v26.x/api/quic.html#callback-error-handling)). The callback receives a single argument: the + * error that triggered the destruction. If the `onerror` callback itself throws + * or returns a promise that rejects, the error is surfaced as an uncaught + * exception. Read/write. + * + * Can also be set via the `onerror` option in `quic.connect()` or + * `quic.listen()`. + * @since v26.2.0 + */ + onerror: ((this: QuicSession, error: any) => void) | undefined; + /** + * The callback to invoke when a new stream is initiated by a remote peer. Read/write. + * @since v23.8.0 + */ + onstream: OnStreamCallback | undefined; + /** + * The callback to invoke when the server rejects 0-RTT early data. When + * this fires, all streams that were opened during the 0-RTT phase have + * been destroyed. The application should re-open streams if needed. + * Read/write. + * + * This callback only fires on the client side when the server rejects + * the client's 0-RTT attempt. The connection falls back to 1-RTT and + * continues normally. + * @since v26.2.0 + */ + onearlyrejected: ((this: QuicSession) => void) | undefined; + /** + * The callback to invoke when a new datagram is received from a remote peer. Read/write. + * @since v23.8.0 + */ + ondatagram: OnDatagramCallback | undefined; + /** + * The callback to invoke when the status of a datagram is updated. Read/write. + * @since v23.8.0 + */ + ondatagramstatus: OnDatagramStatusCallback | undefined; + /** + * The callback to invoke when the path validation is updated. Read/write. + * @since v23.8.0 + */ + onpathvalidation: OnPathValidationCallback | undefined; + /** + * The callback to invoke when a new session ticket is received. Read/write. + * @since v23.8.0 + */ + onsessionticket: OnSessionTicketCallback | undefined; + /** + * The callback to invoke when a version negotiation is initiated. Read/write. + * @since v23.8.0 + */ + onversionnegotiation: OnVersionNegotiationCallback | undefined; + /** + * The callback to invoke when the TLS handshake is completed. Read/write. + * @since v23.8.0 + */ + onhandshake: OnHandshakeCallback | undefined; + /** + * The callback to invoke when a NEW\_TOKEN token is received from the server. + * The token can be passed as the `token` option on a future connection to + * the same server to skip address validation. Read/write. + * @since v26.2.0 + */ + onnewtoken: OnNewTokenCallback | undefined; + /** + * The callback to invoke when an ORIGIN frame (RFC 9412) is received from + * the server, indicating which origins the server is authoritative for. + * Read/write. + * @since v26.2.0 + */ + onorigin: OnOriginCallback | undefined; + /** + * The callback to invoke when the peer sends an HTTP/3 GOAWAY frame, + * indicating it is initiating a graceful shutdown. The callback receives + * `(lastStreamId)` where `lastStreamId` is a `{bigint}`: + * + * * When `lastStreamId` is `-1n`, the peer sent a shutdown notice (intent + * to close) without specifying a stream boundary. All existing streams + * may still be processed. + * * When `lastStreamId` is `>= 0n`, it is the highest stream ID the peer + * may have processed. Streams with IDs above this value were NOT + * processed and can be safely retried on a new connection. + * + * After GOAWAY is received, `session.createBidirectionalStream()` will + * throw `ERR_INVALID_STATE`. Existing streams continue until they + * complete or the session closes. + * + * This callback is only relevant for HTTP/3 sessions. Read/write. + * @since v26.2.0 + */ + ongoaway: ((this: QuicSession, lastStreamId: bigint) => void) | undefined; + /** + * The callback to invoke when TLS key material is available. Requires + * `sessionOptions.keylog` to be `true`. Each invocation receives a single + * line of [NSS Key Log Format](https://udn.realityripple.com/docs/Mozilla/Projects/NSS/Key_Log_Format) text (including a trailing newline). This is + * useful for decrypting packet captures with tools like Wireshark. Read/write. + * + * Can also be set via the `onkeylog` option in `quic.connect()` or + * `quic.listen()`. + * @since v26.2.0 + */ + onkeylog: OnKeylogCallback | undefined; + /** + * The callback to invoke when qlog data is available. Requires + * `sessionOptions.qlog` to be `true`. The callback receives a string + * chunk of [JSON-SEQ](https://www.rfc-editor.org/rfc/rfc7464) formatted qlog data and a boolean `fin` flag. When + * `fin` is `true`, the chunk is the final qlog output for this session and + * the concatenated chunks form a complete qlog trace. Read/write. + * + * Qlog data arrives during the connection lifecycle. The first chunk contains + * the qlog header with format metadata. Subsequent chunks contain trace + * events. The final chunk (with `fin` set to `true`) is emitted during + * session destruction and completes the JSON-SEQ output. + * + * Can also be set via the `onqlog` option in `quic.connect()` or + * `quic.listen()`. + * @since v26.2.0 + */ + onqlog: OnQlogCallback | undefined; + /** + * Open a new bidirectional stream. If the `body` option is not specified, + * the stream's outgoing side remains writable and no FIN is sent + * immediately. The `priority` and `incremental` + * options are only used when the session supports priority (e.g. HTTP/3). + * The `headers`, `onheaders`, `ontrailers`, `oninfo`, and `onwanttrailers` + * options are only used when the session supports headers (e.g. HTTP/3). + * @since v23.8.0 + */ + createBidirectionalStream(options?: CreateStreamOptions): Promise; + /** + * Open a new unidirectional stream. If the `body` option is not specified, + * the stream's outgoing side remains writable and no FIN is sent + * immediately. The `priority` and `incremental` + * options are only used when the session supports priority (e.g. HTTP/3). + * @since v23.8.0 + */ + createUnidirectionalStream(options?: CreateStreamOptions): Promise; + /** + * The local and remote socket addresses associated with the session. Read only. + * @since v23.8.0 + */ + path: SessionPath | undefined; + /** + * Sends an unreliable datagram to the remote peer, returning a promise for + * the datagram ID. + * + * If `datagram` is a string, it will be encoded using the specified `encoding`. + * + * If `datagram` is an `ArrayBufferView`, the bytes are copied into an + * internal buffer; the caller's source buffer is unchanged and may be reused + * or mutated immediately after the call returns. Callers that want to ensure + * their source cannot be mutated after the call (for example, when handing + * the buffer off to another async consumer) can call + * `ArrayBuffer.prototype.transfer()` themselves before passing the buffer. + * + * If `datagram` is a `Promise`, it will be awaited before sending. If the + * session closes while awaiting, `0n` is returned silently (datagrams are + * inherently unreliable). + * + * If the datagram payload is zero-length (empty string after encoding, detached + * buffer, or zero-length view), `0n` is returned and no datagram is sent. + * + * For HTTP/3 sessions, the peer must advertise `SETTINGS_H3_DATAGRAM=1` + * (via `application: { enableDatagrams: true }`) for datagrams to be sent. + * If the peer's setting is `0`, `sendDatagram()` returns `0n` (per RFC 9297 + * §3, an endpoint MUST NOT send HTTP Datagrams unless the peer indicated + * support). + * + * Datagrams cannot be fragmented — each must fit within a single QUIC packet. + * The maximum datagram size is determined by the peer's + * `maxDatagramFrameSize` transport parameter (which the peer advertises during + * the handshake). If the peer sets this to `0`, datagrams are not supported + * and `0n` will be returned. If the datagram exceeds the peer's limit, it + * will be silently dropped and `0n` returned. The local + * `maxDatagramFrameSize` transport parameter (default: `1200` bytes) controls + * what this endpoint advertises to the peer as its own maximum. + * @since v23.8.0 + * @param encoding The encoding to use if `datagram` is a string. + * **Default:** `'utf8'`. + */ + sendDatagram( + datagram: string | NodeJS.ArrayBufferView | Promise, + encoding?: BufferEncoding, + ): Promise; + /** + * The SNI (Server Name Indication) host name associated with the session. This is + * `null` before the client hello is processed. Once the hello has been + * processed, this is either the host name string or `false` if the handshake + * had no SNI. + * @since v26.6.0 + */ + readonly servername: string | false | null; + /** + * The negotiated ALPN protocol. This is `null` before the client hello is + * processed. Once ALPN has been negotiated, this is the protocol string. ALPN + * is mandatory in QUIC so this is never `false` on successful connections, + * unlike `node:tls` where this is optional. + * @since v26.6.0 + */ + readonly alpnProtocol: string | null; + /** + * The local certificate as a `crypto.X509Certificate` instance. Server + * sessions return the certificate configured for the negotiated SNI host. + * Client sessions return `undefined` unless a client certificate was sent. + * Returns `undefined` if the session is destroyed. + * @since v26.2.0 + */ + readonly certificate: X509Certificate | undefined; + /** + * The peer's certificate as a `crypto.X509Certificate` instance. Returns + * `undefined` if the peer did not present a certificate or the session is + * destroyed. + * @since v26.2.0 + */ + readonly peerCertificate: X509Certificate | undefined; + /** + * The ephemeral key information for the session, with properties such as + * `type`, `name`, and `size`. Only available on client sessions. Returns + * `undefined` for server sessions or if the session is destroyed. + * @since v26.2.0 + */ + readonly ephemeralKeyInfo: EphemeralKeyInfo | undefined; + /** + * The maximum datagram payload size in bytes that the peer will accept. + * This is derived from the peer's `maxDatagramFrameSize` transport + * parameter minus the DATAGRAM frame overhead (type byte and variable-length + * integer encoding). Returns `0` if the peer does not support datagrams or + * if the handshake has not yet completed. Datagrams larger than this value + * will not be sent. + * @since v26.2.0 + */ + readonly maxDatagramSize: number; + /** + * The maximum number of datagrams that can be queued for sending. Datagrams + * are queued when `sendDatagram()` is called and sent opportunistically + * alongside stream data by the packet serialization loop. When the queue + * is full, the `sessionOptions.datagramDropPolicy` determines whether + * the oldest or newest datagram is dropped. Dropped datagrams are reported + * as lost via the `ondatagramstatus` callback. + * + * This property can be changed dynamically to adjust queue capacity + * based on application activity or memory pressure. The valid range + * is `0` to `65535`. + * @since v26.2.0 + */ + maxPendingDatagrams: number; + /** + * Return the current statistics for the session. Read only. + * @since v23.8.0 + */ + readonly stats: QuicSession.Stats; + /** + * Initiate a key update for the session. + * @since v23.8.0 + */ + updateKey(): void; + /** + * Calls `session.close()` and returns a promise that fulfills when the + * session has closed. + * @since v23.8.0 + */ + [Symbol.asyncDispose](): Promise; + } + namespace QuicSession { + /** + * @since v23.8.0 + */ + class Stats { + private constructor(); + /** + * @since v23.8.0 + */ + readonly createdAt: bigint; + /** + * @since v23.8.0 + */ + readonly closingAt: bigint; + /** + * @since v23.8.0 + */ + readonly handshakeCompletedAt: bigint; + /** + * @since v23.8.0 + */ + readonly handshakeConfirmedAt: bigint; + /** + * @since v23.8.0 + */ + readonly bytesReceived: bigint; + /** + * @since v23.8.0 + */ + readonly bytesSent: bigint; + /** + * @since v23.8.0 + */ + readonly bidiInStreamCount: bigint; + /** + * @since v23.8.0 + */ + readonly bidiOutStreamCount: bigint; + /** + * @since v23.8.0 + */ + readonly uniInStreamCount: bigint; + /** + * @since v23.8.0 + */ + readonly uniOutStreamCount: bigint; + /** + * @since v23.8.0 + */ + readonly maxBytesInFlight: bigint; + /** + * @since v23.8.0 + */ + readonly bytesInFlight: bigint; + /** + * @since v23.8.0 + */ + readonly blockCount: bigint; + /** + * @since v23.8.0 + */ + readonly cwnd: bigint; + /** + * @since v23.8.0 + */ + readonly latestRtt: bigint; + /** + * @since v23.8.0 + */ + readonly minRtt: bigint; + /** + * @since v23.8.0 + */ + readonly rttVar: bigint; + /** + * @since v23.8.0 + */ + readonly smoothedRtt: bigint; + /** + * @since v23.8.0 + */ + readonly ssthresh: bigint; + /** + * @since v23.8.0 + */ + readonly datagramsReceived: bigint; + /** + * @since v23.8.0 + */ + readonly datagramsSent: bigint; + /** + * @since v23.8.0 + */ + readonly datagramsAcknowledged: bigint; + /** + * @since v23.8.0 + */ + readonly datagramsLost: bigint; + /** + * The total number of peer-initiated streams destroyed by the + * stream idle timeout. Read only. + * @since v26.3.0 + */ + readonly streamsIdleTimedOut: bigint; + } + } + interface QuicErrorOptions { + /** + * The numeric QUIC error code. Numbers + * are coerced to `BigInt`. Must be a non-negative 62-bit unsigned + * varint (`0n <= errorCode <= 2n ** 62n - 1n`). + */ + errorCode?: bigint | number | undefined; + /** + * The Node.js-style error code string assigned to + * `error.code`. Defaults to `'ERR_QUIC_STREAM_ABORTED'`. + */ + code?: string | undefined; + /** + * Either `'application'` (default) or `'transport'`. + * Indicates whether the code is defined by the negotiated + * application protocol (e.g. RFC 9114 for HTTP/3) or by the QUIC + * transport layer (RFC 9000). Stream resets always carry application + * codes, so the default is `'application'`. + */ + type?: "application" | "transport" | undefined; + } + /** + * A `QuicError` is an `Error` subclass that carries an explicit numeric + * QUIC error code. Use it to abort a QUIC stream or session with a + * specific application-protocol-defined error code rather than letting + * the implementation pick a generic fallback. + * + * The class is exported from `node:quic`: + * + * ```js + * import { QuicError } from 'node:quic'; + * ``` + * + * When a `QuicError` is supplied to APIs that emit a wire frame + * (`writer.fail()`, `stream.destroy()`), the QUIC stack uses + * `error.errorCode` as the wire code for the resulting frame. + * When any other value is supplied (for example a plain `Error`), the + * implementation falls back to the negotiated application protocol's + * "internal error" code (`H3_INTERNAL_ERROR` (`0x102`) for HTTP/3, or + * the QUIC transport-layer `INTERNAL_ERROR` (`0x1`) for raw QUIC). + * + * The Node.js error code (`error.code`) defaults to + * `'ERR_QUIC_STREAM_ABORTED'`. Callers who need a more specific code + * string can override it via `options.code` — the numeric QUIC code + * is unaffected. + * + * The Node.js error code is fixed at `'ERR_QUIC_STREAM_ABORTED'` so that + * catch blocks can distinguish a `QuicError` from other Node.js errors + * without checking the prototype chain. The numeric QUIC code lives on + * the separate `error.errorCode` property to avoid colliding with + * the Node.js convention that `error.code` is a string. + * @since v26.2.0 + * @experimental + */ + class QuicError extends Error { + /** + * ```js + * import { QuicError } from 'node:quic'; + * + * const err = new QuicError('rejecting stream', { errorCode: 0x10cn }); + * console.log(err.code); // 'ERR_QUIC_STREAM_ABORTED' + * console.log(err.errorCode); // 268n + * console.log(err.type); // 'application' + * + * const custom = new QuicError('custom failure', { + * errorCode: 0x10cn, + * code: 'ERR_MY_QUIC_FAILURE', + * }); + * console.log(custom.code); // 'ERR_MY_QUIC_FAILURE' + * ``` + * @param message A human-readable description of the error. + */ + constructor(message: string, options?: QuicErrorOptions); + /** + * The numeric QUIC error code carried by this error. + * @since v26.2.0 + */ + readonly errorCode: bigint; + /** + * Either `'application'` or `'transport'`. Indicates the namespace of + * `error.errorCode`. + * @since v26.2.0 + */ + readonly type: "application" | "transport"; + } + type StreamBody = + | null + | string + | ArrayBufferLike + | NodeJS.ArrayBufferView + | Blob + | FileHandle + | Iterable + | AsyncIterable + | Promise; + interface StreamPriority { + /** + * One of `'high'`, `'default'`, or `'low'`. + */ + level: "high" | "default" | "low"; + /** + * Whether the stream data should be interleaved + * with other streams of the same priority level. + */ + incremental: boolean; + } + interface StreamDestroyOptions { + /** + * The application error code to include in the + * `RESET_STREAM` and `STOP_SENDING` frames sent to the peer. Numbers are + * coerced to `BigInt`. When omitted, the wire code is derived from `error` + * (see below). + */ + code?: bigint | number | undefined; + /** + * An optional human-readable reason string. Accepted for + * symmetry with `session.close()` and `session.destroy()`, but + * **not transmitted on the wire** — neither `RESET_STREAM` nor + * `STOP_SENDING` carry a reason field. Provided for application logging + * and for use by the `stream.onerror` callback. + */ + reason?: string | undefined; + } + interface StreamSendHeadersOptions { + /** + * If `true`, the stream is closed for sending + * after the headers (no body will follow). **Default:** `false`. + */ + terminal?: boolean | undefined; + } + /** + * @since v23.8.0 + */ + class QuicStream { + private constructor(); + /** + * A promise that is fulfilled when the stream is fully closed. It resolves + * when the stream closes cleanly (including idle timeout). It rejects with + * an `ERR_QUIC_APPLICATION_ERROR` or `ERR_QUIC_TRANSPORT_ERROR` when the + * stream is closed due to a QUIC error (e.g., stream reset by the peer, + * CONNECTION\_CLOSE with a non-zero error code). + * @since v23.8.0 + */ + readonly closed: Promise; + /** + * Immediately and abruptly destroys the stream. If `error` is provided and + * `stream.onerror` is set, the `onerror` callback is invoked before + * destruction. The `stream.closed` promise rejects with the error. + * + * When the stream is destroyed with an `error` (or with an explicit + * `options.code`), the QUIC stack signals the abort to the peer: + * + * * If the writable side is still open, a `RESET_STREAM` frame is sent. + * * If the readable side is still open (a bidirectional stream, or a + * remote-initiated unidirectional stream), a `STOP_SENDING` frame is sent. + * + * Both frames carry the same wire code, resolved with the following + * precedence: + * + * 1. `options.code`, when explicitly provided. + * 2. [`error.errorCode`][], when `error` is a [`QuicError`][]. + * 3. The negotiated application protocol's "internal error" code + * (`H3_INTERNAL_ERROR` (`0x102`) for HTTP/3, or the QUIC transport-layer + * `INTERNAL_ERROR` (`0x1`) for raw QUIC). + * + * A clean destroy — no `error` and no `options.code` — does not emit + * `RESET_STREAM` or `STOP_SENDING`; the stream's existing close machinery + * handles teardown. + * + * See [Aborting a stream](https://nodejs.org/docs/latest-v26.x/api/quic.html#aborting-a-stream) for an overview of the available stream-abort + * APIs. + * @since v23.8.0 + */ + destroy(error?: any, options?: StreamDestroyOptions): void; + /** + * True if `stream.destroy()` has been called. + * @since v23.8.0 + */ + readonly destroyed: boolean; + /** + * True if any data on this stream was received as 0-RTT (early data) + * before the TLS handshake completed. Early data is less secure and + * could potentially be replayed by an attacker. Applications should + * treat early data with appropriate caution. + * + * This property is only meaningful on the server side. On the client + * side, it is always `false`. + * @since v26.2.0 + */ + readonly early: boolean; + /** + * The directionality of the stream, or `null` if the stream has been destroyed + * or is still pending. Read only. + * @since v23.8.0 + */ + readonly direction: "bidi" | "uni" | null; + /** + * The maximum number of bytes that the writer will buffer before + * `writeSync()` returns `false`. When the buffered data exceeds this limit, + * the caller should wait for drain before writing more. + * + * The value can be changed dynamically at any time. This is particularly + * useful for streams received via the `onstream` callback, where the + * default (65536) may need to be adjusted based on application needs. + * The valid range is `0` to `4294967295`. + * @since v26.2.0 + */ + highWaterMark: number; + /** + * The stream ID, or `null` if the stream has been destroyed or is still + * pending. Read only. + * @since v23.8.0 + */ + readonly id: bigint | null; + /** + * An optional callback invoked when the stream is destroyed with an error. + * This includes errors caused by user callbacks that throw or reject (see + * [Callback error handling](https://nodejs.org/docs/latest-26.x/api/quic.html#callback-error-handling)). The callback receives a single argument: the + * error that triggered the destruction. If the `onerror` callback itself throws + * or returns a promise that rejects, the error is surfaced as an uncaught + * exception. Read/write. + * @since v26.2.0 + */ + onerror: ((this: QuicStream, error: any) => void) | undefined; + /** + * The callback to invoke when the stream is blocked. Read/write. + * @since v23.8.0 + */ + onblocked: OnBlockedCallback | undefined; + /** + * The callback to invoke when the peer aborts a direction of the stream by + * sending a `RESET_STREAM` frame (the peer abandons their writable side, so + * no further data will arrive on our readable side) or a `STOP_SENDING` + * frame (the peer asks us to stop writing on our writable side). + * + * The callback receives a Node.js error whose `errorCode` (`bigint`) + * property carries the application error code from the wire frame. + * + * The stream is **not** automatically destroyed when this callback fires — + * the application chooses how to react. Common patterns are: ignore (and + * continue using the still-active direction on a bidirectional stream), + * abort the other direction with `writer.fail()`, or tear down the + * whole stream with `stream.destroy()`. Read/write. + * @since v23.8.0 + */ + onreset: OnStreamErrorCallback | undefined; + /** + * The buffered initial headers received on this stream, or `undefined` if the + * application does not support headers or no headers have been received yet. + * For server-side streams, this contains the request headers (e.g., `:method`, + * `:path`, `:scheme`). For client-side streams, this contains the response + * headers (e.g., `:status`). + * + * Header names are lowercase strings. Multi-value headers are represented as + * arrays. The object has `__proto__: null`. + * @since v26.2.0 + */ + readonly headers: NodeJS.Dict | undefined; + /** + * The callback to invoke when initial headers are received on the stream. The + * callback receives `(headers)` where `headers` is an object (same format as + * `stream.headers`). For HTTP/3, this delivers request pseudo-headers on the + * server side and response headers on the client side. Throws + * `ERR_INVALID_STATE` if set on a session that does not support headers. + * Read/write. + * @since v26.2.0 + */ + onheaders: ((this: QuicStream, headers: NodeJS.Dict) => void) | undefined; + /** + * The callback to invoke when trailing headers are received from the peer. + * The callback receives `(trailers)` where `trailers` is an object in the + * same format as `stream.headers`. Throws `ERR_INVALID_STATE` if set on a + * session that does not support headers. Read/write. + * @since v26.2.0 + */ + ontrailers: ((this: QuicStream, trailers: NodeJS.Dict) => void) | undefined; + /** + * The callback to invoke when informational (1xx) headers are received from + * the server. The callback receives `(headers)` where `headers` is an object + * in the same format as `stream.headers`. Informational headers are sent + * before the final response (e.g., 103 Early Hints). Throws + * `ERR_INVALID_STATE` if set on a session that does not support headers. + * Read/write. + * @since v26.2.0 + */ + oninfo: ((this: QuicStream, headers: NodeJS.Dict) => void) | undefined; + /** + * The callback to invoke when the application is ready for trailing headers + * to be sent. This is called synchronously — the user must call + * `stream.sendTrailers()` within this callback. Throws + * `ERR_INVALID_STATE` if set on a session that does not support headers. + * Read/write. + * @since v26.2.0 + */ + onwanttrailers: ((this: QuicStream) => void) | undefined; + /** + * Set trailing headers to be sent automatically when the application requests + * them. This is an alternative to the `stream.onwanttrailers` callback + * for cases where the trailers are known before the body completes. Throws + * `ERR_INVALID_STATE` if set on a session that does not support headers. + * Read/write. + * @since v26.2.0 + */ + pendingTrailers: NodeJS.Dict | undefined; + /** + * Sends initial or response headers on the stream. For client-side streams, + * this sends request headers. For server-side streams, this sends response + * headers. Throws `ERR_INVALID_STATE` if the session does not support headers. + * @since v26.2.0 + * @param headers Header object with string keys and string or + * string-array values. Pseudo-headers (`:method`, `:path`, etc.) must + * appear before regular headers. + */ + sendHeaders(headers: NodeJS.Dict, options?: StreamSendHeadersOptions): boolean; + /** + * Sends informational (1xx) response headers. Server only. Throws + * `ERR_INVALID_STATE` if the session does not support headers. + * @since v26.2.0 + * @param headers Header object. Must include `:status` with a 1xx + * value (e.g., `{ ':status': '103', 'link': '; rel=preload' }`). + */ + sendInformationalHeaders(headers: NodeJS.Dict): boolean; + /** + * Sends trailing headers on the stream. Must be called synchronously during + * the `stream.onwanttrailers` callback, or set ahead of time via + * `stream.pendingTrailers`. Throws `ERR_INVALID_STATE` if the session + * does not support headers. + * @since v26.2.0 + * @param headers Trailing header object. Pseudo-headers must not be + * included in trailers. + */ + sendTrailers(headers: NodeJS.Dict): boolean; + /** + * The current priority of the stream. Returns `null` if the session does not + * support priority (e.g. non-HTTP/3) or if the stream has been destroyed. + * Read only. Use `stream.setPriority()` to change the priority. + * + * On client-side HTTP/3 sessions, the value reflects what was set via + * `stream.setPriority()`. On server-side HTTP/3 sessions, the value + * reflects the peer's requested priority (e.g., from `PRIORITY_UPDATE` frames). + * @since v26.2.0 + */ + readonly priority: StreamPriority | null; + /** + * Sets the priority of the stream. Throws `ERR_INVALID_STATE` if the session + * does not support priority (e.g. non-HTTP/3). Has no effect if the stream + * has been destroyed. + * @since v26.2.0 + */ + setPriority(options?: NodeJS.PartialOptions): void; + /** + * The stream implements `Symbol.asyncIterator`, making it directly usable + * in `for await...of` loops. Each iteration yields a batch of `Uint8Array` + * chunks. + * + * Only one async iterator can be obtained per stream. A second call throws + * `ERR_INVALID_STATE`. Non-readable streams (outbound-only unidirectional + * or closed) return an immediately-finished iterator. + * + * ```js + * for await (const chunks of stream) { + * for (const chunk of chunks) { + * // Process each Uint8Array chunk + * } + * } + * ``` + * + * Compatible with stream/iter utilities: + * + * ```js + * import Stream from 'node:stream/iter'; + * const body = await Stream.bytes(stream); + * const text = await Stream.text(stream); + * await Stream.pipeTo(stream, someWriter); + * ``` + * @since v26.2.0 + */ + [Symbol.asyncIterator](): NodeJS.AsyncIterator; + /** + * Returns a Writer object for pushing data to the stream incrementally. + * The Writer implements the stream/iter Writer interface with the + * try-sync-fallback-to-async pattern. + * + * Only available when no `body` source was provided at creation time or via + * `stream.setBody()`. Non-writable streams return an already-closed + * Writer. Throws `ERR_INVALID_STATE` if the outbound is already configured. + * + * The Writer has the following methods: + * + * * `writeSync(chunk)` — Synchronous write. Returns `true` if accepted, + * `false` if flow-controlled. Data is NOT accepted on `false`. + * * `write(chunk[, options])` — Async write with drain wait. `options.signal` + * is checked at entry but not observed during the write. + * * `writevSync(chunks)` — Synchronous vectored write. All-or-nothing. + * * `writev(chunks[, options])` — Async vectored write. + * * `endSync()` — Synchronous close. Returns total bytes or `-1`. + * * `end([options])` — Async close. + * * `fail(reason)` — Errors the stream (sends `RESET_STREAM` to peer). + * When `reason` is a `QuicError`, its `error.errorCode` is used + * as the wire code on the resulting `RESET_STREAM` frame; otherwise + * the wire code falls back to the negotiated application protocol's + * "internal error" code (`H3_INTERNAL_ERROR` (`0x102`) for HTTP/3, or + * the QUIC transport-layer `INTERNAL_ERROR` (`0x1`) for raw QUIC). + * See `stream.destroy()` for a full-stream abort that also resets + * the readable side via `STOP_SENDING`. + * * `desiredSize` — Available capacity in bytes, or `null` if closed/errored. + * + * The bytes from each `writeSync()` / `writevSync()` / `write()` / `writev()` + * input chunk are copied into an internal buffer, so the caller's source + * buffer is unchanged and may be reused or mutated immediately after the + * call returns. Callers that want to ensure a source buffer cannot be + * mutated after handing it off can call `ArrayBuffer.prototype.transfer()` + * themselves before passing the buffer. + * @since v26.2.0 + */ + readonly writer: Writer; + /** + * Sets the outbound body source for the stream. Can only be called once. + * Mutually exclusive with `stream.writer`. + * + * The following body source types are supported: + * + * * `null` — The writable side is closed immediately (FIN sent with no data). + * * `string` — UTF-8 encoded and sent as a single chunk. + * * `ArrayBuffer`, `SharedArrayBuffer`, `ArrayBufferView` — Sent as a single + * chunk. The bytes are copied into an internal buffer, so the caller's + * source buffer is unchanged and may be reused or mutated immediately + * after the call returns. Callers wanting to ensure their source cannot + * be mutated after handing it off can call + * `ArrayBuffer.prototype.transfer()` themselves before passing the buffer. + * * `Blob` — Sent from the Blob's underlying data queue. + * * {FileHandle} — The file contents are read asynchronously via an + * fd-backed data source. The `FileHandle` must be opened for reading + * (e.g. via [`fs.promises.open(path, 'r')`][]). Once passed as a body, the + * `FileHandle` is locked and cannot be used as a body for another stream. + * The `FileHandle` is automatically closed when the stream finishes. + * * `AsyncIterable`, `Iterable` — Each yielded chunk (string or + * `Uint8Array`) is written incrementally in streaming mode. + * * `Promise` — Awaited; the resolved value is used as the body (subject + * to the same type rules). + * + * Throws `ERR_INVALID_STATE` if the outbound is already configured or if + * the writer has been accessed. + * @since v26.2.0 + */ + setBody(body: StreamBody): void; + /** + * The session that created this stream, or `null` if the stream has been + * destroyed. Read only. + * @since v23.8.0 + */ + readonly session: QuicSession | null; + /** + * The current statistics for the stream. Read only. + * @since v23.8.0 + */ + readonly stats: QuicStream.Stats; + } + namespace QuicStream { + /** + * @since v23.8.0 + */ + class Stats { + private constructor(); + /** + * @since v23.8.0 + */ + readonly ackedAt: bigint; + /** + * @since v23.8.0 + */ + readonly bytesReceived: bigint; + /** + * @since v23.8.0 + */ + readonly bytesSent: bigint; + /** + * @since v23.8.0 + */ + readonly createdAt: bigint; + /** + * @since v23.8.0 + */ + readonly destroyedAt: bigint; + /** + * @since v23.8.0 + */ + readonly finalSize: bigint; + /** + * @since v23.8.0 + */ + readonly isConnected: bigint; + /** + * @since v23.8.0 + */ + readonly maxOffset: bigint; + /** + * @since v23.8.0 + */ + readonly maxOffsetAcknowledged: bigint; + /** + * @since v23.8.0 + */ + readonly maxOffsetReceived: bigint; + /** + * @since v23.8.0 + */ + readonly openedAt: bigint; + /** + * @since v23.8.0 + */ + readonly receivedAt: bigint; + } + } + /** + * An object containing commonly used constants for QUIC configuration. + * @since v26.2.0 + */ + namespace constants { + /** + * Congestion control algorithm identifiers, for use with the + * `sessionOptions.cc` option: + * + * * `quic.constants.cc.RENO` — Reno congestion control. + * * `quic.constants.cc.CUBIC` — CUBIC congestion control. + * * `quic.constants.cc.BBR` — BBR congestion control. + */ + enum cc { + RENO = "reno", + CUBIC = "cubic", + BBR = "bbr", + } + /** + * The default TLS 1.3 cipher suite list used when `sessionOptions.ciphers` + * is not specified. + */ + const DEFAULT_CIPHERS: string; + /** + * The default TLS 1.3 key-exchange group list used when + * `sessionOptions.groups` is not specified. + */ + const DEFAULT_GROUPS: string; + } +} diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts new file mode 100644 index 0000000..a9ad29d --- /dev/null +++ b/node_modules/@types/node/readline.d.ts @@ -0,0 +1,508 @@ +declare module "node:readline" { + import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; + interface Key { + sequence?: string | undefined; + name?: string | undefined; + ctrl?: boolean | undefined; + meta?: boolean | undefined; + shift?: boolean | undefined; + } + interface InterfaceEventMap { + "close": []; + "error": [error: Error]; + "history": [history: string[]]; + "line": [input: string]; + "pause": []; + "resume": []; + "SIGCONT": []; + "SIGINT": []; + "SIGTSTP": []; + } + /** + * Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a + * single `input` [Readable](https://nodejs.org/docs/latest-v26.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v26.x/api/stream.html#writable-streams) stream. + * The `output` stream is used to print prompts for user input that arrives on, + * and is read from, the `input` stream. + * @since v0.1.104 + */ + class Interface implements EventEmitter, Disposable { + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/readline.html#class-interfaceconstructor + */ + protected constructor( + input: NodeJS.ReadableStream, + output?: NodeJS.WritableStream, + completer?: Completer | AsyncCompleter, + terminal?: boolean, + ); + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/readline.html#class-interfaceconstructor + */ + protected constructor(options: ReadLineOptions); + readonly terminal: boolean; + /** + * The current input data being processed by node. + * + * This can be used when collecting input from a TTY stream to retrieve the + * current value that has been processed thus far, prior to the `line` event + * being emitted. Once the `line` event has been emitted, this property will + * be an empty string. + * + * Be aware that modifying the value during the instance runtime may have + * unintended consequences if `rl.cursor` is not also controlled. + * + * **If not using a TTY stream for input, use the `'line'` event.** + * + * One possible use case would be as follows: + * + * ```js + * const values = ['lorem ipsum', 'dolor sit amet']; + * const rl = readline.createInterface(process.stdin); + * const showResults = debounce(() => { + * console.log( + * '\n', + * values.filter((val) => val.startsWith(rl.line)).join(' '), + * ); + * }, 300); + * process.stdin.on('keypress', (c, k) => { + * showResults(); + * }); + * ``` + * @since v0.1.98 + */ + readonly line: string; + /** + * The cursor position relative to `rl.line`. + * + * This will track where the current cursor lands in the input string, when + * reading input from a TTY stream. The position of cursor determines the + * portion of the input string that will be modified as input is processed, + * as well as the column where the terminal caret will be rendered. + * @since v0.1.98 + */ + readonly cursor: number; + /** + * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`. + * @since v15.3.0, v14.17.0 + * @return the current prompt string + */ + getPrompt(): string; + /** + * The `rl.setPrompt()` method sets the prompt that will be written to `output` whenever `rl.prompt()` is called. + * @since v0.1.98 + */ + setPrompt(prompt: string): void; + /** + * The `rl.prompt()` method writes the `Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new + * location at which to provide input. + * + * When called, `rl.prompt()` will resume the `input` stream if it has been + * paused. + * + * If the `Interface` was created with `output` set to `null` or `undefined` the prompt is not written. + * @since v0.1.98 + * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`. + */ + prompt(preserveCursor?: boolean): void; + /** + * The `rl.question()` method displays the `query` by writing it to the `output`, + * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument. + * + * When called, `rl.question()` will resume the `input` stream if it has been + * paused. + * + * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written. + * + * The `callback` function passed to `rl.question()` does not follow the typical + * pattern of accepting an `Error` object or `null` as the first argument. + * The `callback` is called with the provided answer as the only argument. + * + * An error will be thrown if calling `rl.question()` after `rl.close()`. + * + * Example usage: + * + * ```js + * rl.question('What is your favorite food? ', (answer) => { + * console.log(`Oh, so your favorite food is ${answer}`); + * }); + * ``` + * + * Using an `AbortController` to cancel a question. + * + * ```js + * const ac = new AbortController(); + * const signal = ac.signal; + * + * rl.question('What is your favorite food? ', { signal }, (answer) => { + * console.log(`Oh, so your favorite food is ${answer}`); + * }); + * + * signal.addEventListener('abort', () => { + * console.log('The food question timed out'); + * }, { once: true }); + * + * setTimeout(() => ac.abort(), 10000); + * ``` + * @since v0.3.3 + * @param query A statement or query to write to `output`, prepended to the prompt. + * @param callback A callback function that is invoked with the user's input in response to the `query`. + */ + question(query: string, callback: (answer: string) => void): void; + question(query: string, options: Abortable, callback: (answer: string) => void): void; + /** + * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed + * later if necessary. + * + * Calling `rl.pause()` does not immediately pause other events (including `'line'`) from being emitted by the `Interface` instance. + * @since v0.3.4 + */ + pause(): this; + /** + * The `rl.resume()` method resumes the `input` stream if it has been paused. + * @since v0.3.4 + */ + resume(): this; + /** + * The `rl.close()` method closes the `Interface` instance and + * relinquishes control over the `input` and `output` streams. When called, + * the `'close'` event will be emitted. + * + * Calling `rl.close()` does not immediately stop other events (including `'line'`) + * from being emitted by the `Interface` instance. + * @since v0.1.98 + */ + close(): void; + /** + * Alias for `rl.close()`. + * @since v22.15.0 + */ + [Symbol.dispose](): void; + /** + * The `rl.write()` method will write either `data` or a key sequence identified + * by `key` to the `output`. The `key` argument is supported only if `output` is + * a `TTY` text terminal. See `TTY keybindings` for a list of key + * combinations. + * + * If `key` is specified, `data` is ignored. + * + * When called, `rl.write()` will resume the `input` stream if it has been + * paused. + * + * If the `Interface` was created with `output` set to `null` or `undefined` the `data` and `key` are not written. + * + * ```js + * rl.write('Delete this!'); + * // Simulate Ctrl+U to delete the line written previously + * rl.write(null, { ctrl: true, name: 'u' }); + * ``` + * + * The `rl.write()` method will write the data to the `readline` `Interface`'s `input` _as if it were provided by the user_. + * @since v0.1.98 + */ + write(data: string | Buffer, key?: Key): void; + write(data: undefined | null | string | Buffer, key: Key): void; + /** + * Returns the real position of the cursor in relation to the input + * prompt + string. Long input (wrapping) strings, as well as multiple + * line prompts are included in the calculations. + * @since v13.5.0, v12.16.0 + */ + getCursorPos(): CursorPos; + [Symbol.asyncIterator](): NodeJS.AsyncIterator; + } + interface Interface extends InternalEventEmitter {} + type Completer = (line: string) => CompleterResult; + type AsyncCompleter = ( + line: string, + callback: (err?: null | Error, result?: CompleterResult) => void, + ) => void; + type CompleterResult = [string[], string]; + interface ReadLineOptions { + /** + * The [`Readable`](https://nodejs.org/docs/latest-v26.x/api/stream.html#readable-streams) stream to listen to + */ + input: NodeJS.ReadableStream; + /** + * The [`Writable`](https://nodejs.org/docs/latest-v26.x/api/stream.html#writable-streams) stream to write readline data to. + */ + output?: NodeJS.WritableStream | undefined; + /** + * An optional function used for Tab autocompletion. + */ + completer?: Completer | AsyncCompleter | undefined; + /** + * `true` if the `input` and `output` streams should be treated like a TTY, + * and have ANSI/VT100 escape codes written to it. + * Default: checking `isTTY` on the `output` stream upon instantiation. + */ + terminal?: boolean | undefined; + /** + * Initial list of history lines. + * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check, + * otherwise the history caching mechanism is not initialized at all. + * @default [] + */ + history?: string[] | undefined; + /** + * Maximum number of history lines retained. + * To disable the history set this value to `0`. + * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check, + * otherwise the history caching mechanism is not initialized at all. + * @default 30 + */ + historySize?: number | undefined; + /** + * If `true`, when a new input line added to the history list duplicates an older one, + * this removes the older line from the list. + * @default false + */ + removeHistoryDuplicates?: boolean | undefined; + /** + * The prompt string to use. + * @default "> " + */ + prompt?: string | undefined; + /** + * If the delay between `\r` and `\n` exceeds `crlfDelay` milliseconds, + * both `\r` and `\n` will be treated as separate end-of-line input. + * `crlfDelay` will be coerced to a number no less than `100`. + * It can be set to `Infinity`, in which case + * `\r` followed by `\n` will always be considered a single newline + * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v26.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter). + * @default 100 + */ + crlfDelay?: number | undefined; + /** + * The duration `readline` will wait for a character + * (when reading an ambiguous key sequence in milliseconds + * one that can both form a complete key sequence using the input read so far + * and can take additional input to complete a longer key sequence). + * @default 500 + */ + escapeCodeTimeout?: number | undefined; + /** + * The number of spaces a tab is equal to (minimum 1). + * @default 8 + */ + tabSize?: number | undefined; + /** + * Allows closing the interface using an AbortSignal. + * Aborting the signal will internally call `close` on the interface. + */ + signal?: AbortSignal | undefined; + } + /** + * The `readline.createInterface()` method creates a new `readline.Interface` instance. + * + * ```js + * import readline from 'node:readline'; + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout, + * }); + * ``` + * + * Once the `readline.Interface` instance is created, the most common case is to + * listen for the `'line'` event: + * + * ```js + * rl.on('line', (line) => { + * console.log(`Received: ${line}`); + * }); + * ``` + * + * If `terminal` is `true` for this instance then the `output` stream will get + * the best compatibility if it defines an `output.columns` property and emits + * a `'resize'` event on the `output` if or when the columns ever change + * (`process.stdout` does this automatically when it is a TTY). + * + * When creating a `readline.Interface` using `stdin` as input, the program + * will not terminate until it receives an [EOF character](https://en.wikipedia.org/wiki/End-of-file#EOF_character). To exit without + * waiting for user input, call `process.stdin.unref()`. + * @since v0.1.98 + */ + function createInterface( + input: NodeJS.ReadableStream, + output?: NodeJS.WritableStream, + completer?: Completer | AsyncCompleter, + terminal?: boolean, + ): Interface; + function createInterface(options: ReadLineOptions): Interface; + /** + * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input. + * + * Optionally, `interface` specifies a `readline.Interface` instance for which + * autocompletion is disabled when copy-pasted input is detected. + * + * If the `stream` is a `TTY`, then it must be in raw mode. + * + * This is automatically called by any readline instance on its `input` if the `input` is a terminal. Closing the `readline` instance does not stop + * the `input` from emitting `'keypress'` events. + * + * ```js + * readline.emitKeypressEvents(process.stdin); + * if (process.stdin.isTTY) + * process.stdin.setRawMode(true); + * ``` + * + * ## Example: Tiny CLI + * + * The following example illustrates the use of `readline.Interface` class to + * implement a small command-line interface: + * + * ```js + * import readline from 'node:readline'; + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout, + * prompt: 'OHAI> ', + * }); + * + * rl.prompt(); + * + * rl.on('line', (line) => { + * switch (line.trim()) { + * case 'hello': + * console.log('world!'); + * break; + * default: + * console.log(`Say what? I might have heard '${line.trim()}'`); + * break; + * } + * rl.prompt(); + * }).on('close', () => { + * console.log('Have a great day!'); + * process.exit(0); + * }); + * ``` + * + * ## Example: Read file stream line-by-Line + * + * A common use case for `readline` is to consume an input file one line at a + * time. The easiest way to do so is leveraging the `fs.ReadStream` API as + * well as a `for await...of` loop: + * + * ```js + * import fs from 'node:fs'; + * import readline from 'node:readline'; + * + * async function processLineByLine() { + * const fileStream = fs.createReadStream('input.txt'); + * + * const rl = readline.createInterface({ + * input: fileStream, + * crlfDelay: Infinity, + * }); + * // Note: we use the crlfDelay option to recognize all instances of CR LF + * // ('\r\n') in input.txt as a single line break. + * + * for await (const line of rl) { + * // Each line in input.txt will be successively available here as `line`. + * console.log(`Line from file: ${line}`); + * } + * } + * + * processLineByLine(); + * ``` + * + * Alternatively, one could use the `'line'` event: + * + * ```js + * import fs from 'node:fs'; + * import readline from 'node:readline'; + * + * const rl = readline.createInterface({ + * input: fs.createReadStream('sample.txt'), + * crlfDelay: Infinity, + * }); + * + * rl.on('line', (line) => { + * console.log(`Line from file: ${line}`); + * }); + * ``` + * + * Currently, `for await...of` loop can be a bit slower. If `async` / `await` flow and speed are both essential, a mixed approach can be applied: + * + * ```js + * import { once } from 'node:events'; + * import { createReadStream } from 'node:fs'; + * import { createInterface } from 'node:readline'; + * + * (async function processLineByLine() { + * try { + * const rl = createInterface({ + * input: createReadStream('big-file.txt'), + * crlfDelay: Infinity, + * }); + * + * rl.on('line', (line) => { + * // Process the line. + * }); + * + * await once(rl, 'close'); + * + * console.log('File processed.'); + * } catch (err) { + * console.error(err); + * } + * })(); + * ``` + * @since v0.7.7 + */ + function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void; + type Direction = -1 | 0 | 1; + interface CursorPos { + rows: number; + cols: number; + } + /** + * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v26.x/api/tty.html) stream + * in a specified direction identified by `dir`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean; + /** + * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v26.x/api/tty.html) stream from + * the current position of the cursor down. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean; + /** + * The `readline.cursorTo()` method moves cursor to the specified position in a + * given [TTY](https://nodejs.org/docs/latest-v26.x/api/tty.html) `stream`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean; + /** + * The `readline.moveCursor()` method moves the cursor _relative_ to its current + * position in a given [TTY](https://nodejs.org/docs/latest-v26.x/api/tty.html) `stream`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean; + /** @deprecated This alias will be removed in a future version. Use `import { Interface } from 'node:readline'` instead. */ + type ReadLine = Interface; +} +declare module "node:readline" { + export * as promises from "node:readline/promises"; +} +declare module "readline" { + export * from "node:readline"; +} diff --git a/node_modules/@types/node/readline/promises.d.ts b/node_modules/@types/node/readline/promises.d.ts new file mode 100644 index 0000000..ccee490 --- /dev/null +++ b/node_modules/@types/node/readline/promises.d.ts @@ -0,0 +1,158 @@ +declare module "node:readline/promises" { + import { Abortable } from "node:events"; + import { + CompleterResult, + Direction, + Interface as _Interface, + ReadLineOptions as _ReadLineOptions, + } from "node:readline"; + /** + * Instances of the `readlinePromises.Interface` class are constructed using the `readlinePromises.createInterface()` method. Every instance is associated with a + * single `input` `Readable` stream and a single `output` `Writable` stream. + * The `output` stream is used to print prompts for user input that arrives on, + * and is read from, the `input` stream. + * @since v17.0.0 + */ + class Interface extends _Interface { + /** + * The `rl.question()` method displays the `query` by writing it to the `output`, + * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument. + * + * When called, `rl.question()` will resume the `input` stream if it has been + * paused. + * + * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written. + * + * If the question is called after `rl.close()`, it returns a rejected promise. + * + * Example usage: + * + * ```js + * const answer = await rl.question('What is your favorite food? '); + * console.log(`Oh, so your favorite food is ${answer}`); + * ``` + * + * Using an `AbortSignal` to cancel a question. + * + * ```js + * const signal = AbortSignal.timeout(10_000); + * + * signal.addEventListener('abort', () => { + * console.log('The food question timed out'); + * }, { once: true }); + * + * const answer = await rl.question('What is your favorite food? ', { signal }); + * console.log(`Oh, so your favorite food is ${answer}`); + * ``` + * @since v17.0.0 + * @param query A statement or query to write to `output`, prepended to the prompt. + * @return A promise that is fulfilled with the user's input in response to the `query`. + */ + question(query: string): Promise; + question(query: string, options: Abortable): Promise; + } + /** + * @since v17.0.0 + */ + class Readline { + /** + * @param stream A TTY stream. + */ + constructor( + stream: NodeJS.WritableStream, + options?: { + autoCommit?: boolean | undefined; + }, + ); + /** + * The `rl.clearLine()` method adds to the internal list of pending action an + * action that clears current line of the associated `stream` in a specified + * direction identified by `dir`. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + * @since v17.0.0 + * @return this + */ + clearLine(dir: Direction): this; + /** + * The `rl.clearScreenDown()` method adds to the internal list of pending action an + * action that clears the associated stream from the current position of the + * cursor down. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + * @since v17.0.0 + * @return this + */ + clearScreenDown(): this; + /** + * The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions. + * @since v17.0.0 + */ + commit(): Promise; + /** + * The `rl.cursorTo()` method adds to the internal list of pending action an action + * that moves cursor to the specified position in the associated `stream`. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + * @since v17.0.0 + * @return this + */ + cursorTo(x: number, y?: number): this; + /** + * The `rl.moveCursor()` method adds to the internal list of pending action an + * action that moves the cursor _relative_ to its current position in the + * associated `stream`. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + * @since v17.0.0 + * @return this + */ + moveCursor(dx: number, dy: number): this; + /** + * The `rl.rollback` methods clears the internal list of pending actions without + * sending it to the associated `stream`. + * @since v17.0.0 + * @return this + */ + rollback(): this; + } + type Completer = (line: string) => CompleterResult | Promise; + interface ReadLineOptions extends Omit<_ReadLineOptions, "completer"> { + /** + * An optional function used for Tab autocompletion. + */ + completer?: Completer | undefined; + } + /** + * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance. + * + * ```js + * import readlinePromises from 'node:readline/promises'; + * const rl = readlinePromises.createInterface({ + * input: process.stdin, + * output: process.stdout, + * }); + * ``` + * + * Once the `readlinePromises.Interface` instance is created, the most common case + * is to listen for the `'line'` event: + * + * ```js + * rl.on('line', (line) => { + * console.log(`Received: ${line}`); + * }); + * ``` + * + * If `terminal` is `true` for this instance then the `output` stream will get + * the best compatibility if it defines an `output.columns` property and emits + * a `'resize'` event on the `output` if or when the columns ever change + * (`process.stdout` does this automatically when it is a TTY). + * @since v17.0.0 + */ + function createInterface( + input: NodeJS.ReadableStream, + output?: NodeJS.WritableStream, + completer?: Completer, + terminal?: boolean, + ): Interface; + function createInterface(options: ReadLineOptions): Interface; +} +declare module "readline/promises" { + export * from "node:readline/promises"; +} diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts new file mode 100644 index 0000000..33e2fe9 --- /dev/null +++ b/node_modules/@types/node/repl.d.ts @@ -0,0 +1,420 @@ +declare module "node:repl" { + import { AsyncCompleter, Completer, Interface, InterfaceEventMap } from "node:readline"; + import { InspectOptions } from "node:util"; + import { Context } from "node:vm"; + interface ReplOptions { + /** + * The input prompt to display. + * @default "> " + */ + prompt?: string | undefined; + /** + * The `Readable` stream from which REPL input will be read. + * @default process.stdin + */ + input?: NodeJS.ReadableStream | undefined; + /** + * The `Writable` stream to which REPL output will be written. + * @default process.stdout + */ + output?: NodeJS.WritableStream | undefined; + /** + * If `true`, specifies that the output should be treated as a TTY terminal, and have + * ANSI/VT100 escape codes written to it. + * Default: checking the value of the `isTTY` property on the output stream upon + * instantiation. + */ + terminal?: boolean | undefined; + /** + * The function to be used when evaluating each given line of input. + * **Default:** an async wrapper for the JavaScript `eval()` function. An `eval` function can + * error with `repl.Recoverable` to indicate the input was incomplete and prompt for + * additional lines. See the [custom evaluation functions](https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#custom-evaluation-functions) + * section for more details. + */ + eval?: REPLEval | undefined; + /** + * Defines if the repl prints output previews or not. + * @default `true` Always `false` in case `terminal` is falsy. + */ + preview?: boolean | undefined; + /** + * If `true`, specifies that the default `writer` function should include ANSI color + * styling to REPL output. If a custom `writer` function is provided then this has no + * effect. + * @default the REPL instance's `terminal` value + */ + useColors?: boolean | undefined; + /** + * If `true`, specifies that the default evaluation function will use the JavaScript + * `global` as the context as opposed to creating a new separate context for the REPL + * instance. The node CLI REPL sets this value to `true`. + * @default false + */ + useGlobal?: boolean | undefined; + /** + * If `true`, specifies that the default writer will not output the return value of a + * command if it evaluates to `undefined`. + * @default false + */ + ignoreUndefined?: boolean | undefined; + /** + * The function to invoke to format the output of each command before writing to `output`. + * @default a wrapper for `util.inspect` + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_customizing_repl_output + */ + writer?: REPLWriter | undefined; + /** + * An optional function used for custom Tab auto completion. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/readline.html#readline_use_of_the_completer_function + */ + completer?: Completer | AsyncCompleter | undefined; + /** + * A flag that specifies whether the default evaluator executes all JavaScript commands in + * strict mode or default (sloppy) mode. + * Accepted values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined; + /** + * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is + * pressed. This cannot be used together with a custom `eval` function. + * @default false + */ + breakEvalOnSigint?: boolean | undefined; + /** + * This function customizes error handling in the REPL. + * It receives the thrown exception as its first argument and must return one + * of the following values synchronously: + * * `'print'` to print the error to the output stream (default behavior). + * * `'ignore'` to skip all remaining error handling. + * * `'unhandled'` to treat the exception as fully unhandled. In this case, + * the error will be passed to process-wide exception handlers, such as + * the `'uncaughtException'` event. + * The `'unhandled'` value may or may not be desirable in situations + * where the `REPLServer` instance has been closed, depending on the particular + * use case. + * @since v25.9.0 + */ + handleError?: ((err: unknown) => "print" | "ignore" | "unhandled") | undefined; + } + type REPLEval = ( + this: REPLServer, + evalCmd: string, + context: Context, + file: string, + cb: (err: Error | null, result: any) => void, + ) => void; + type REPLWriter = (this: REPLServer, obj: any) => string; + /** + * This is the default "writer" value, if none is passed in the REPL options, + * and it can be overridden by custom print functions. + */ + const writer: REPLWriter & { + options: InspectOptions; + }; + type REPLCommandAction = (this: REPLServer, text: string) => void; + interface REPLCommand { + /** + * Help text to be displayed when `.help` is entered. + */ + help?: string | undefined; + /** + * The function to execute, optionally accepting a single string argument. + */ + action: REPLCommandAction; + } + interface REPLServerSetupHistoryOptions { + filePath?: string | undefined; + size?: number | undefined; + removeHistoryDuplicates?: boolean | undefined; + onHistoryFileLoaded?: ((err: Error | null, repl: REPLServer) => void) | undefined; + } + interface REPLServerEventMap extends InterfaceEventMap { + "exit": []; + "reset": [context: Context]; + } + /** + * Instances of `repl.REPLServer` are created using the {@link start} method + * or directly using the JavaScript `new` keyword. + * + * ```js + * import repl from 'node:repl'; + * + * const options = { useColors: true }; + * + * const firstInstance = repl.start(options); + * const secondInstance = new repl.REPLServer(options); + * ``` + * @since v0.1.91 + */ + class REPLServer extends Interface { + /** + * NOTE: According to the documentation: + * + * > Instances of `repl.REPLServer` are created using the `repl.start()` method and + * > _should not_ be created directly using the JavaScript `new` keyword. + * + * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_class_replserver + */ + private constructor(); + /** + * The `vm.Context` provided to the `eval` function to be used for JavaScript + * evaluation. + */ + readonly context: Context; + /** + * @deprecated since v14.3.0 - Use `input` instead. + */ + readonly inputStream: NodeJS.ReadableStream; + /** + * @deprecated since v14.3.0 - Use `output` instead. + */ + readonly outputStream: NodeJS.WritableStream; + /** + * The `Readable` stream from which REPL input will be read. + */ + readonly input: NodeJS.ReadableStream; + /** + * The `Writable` stream to which REPL output will be written. + */ + readonly output: NodeJS.WritableStream; + /** + * The commands registered via `replServer.defineCommand()`. + */ + readonly commands: NodeJS.ReadOnlyDict; + /** + * A value indicating whether the REPL is currently in "editor mode". + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_commands_and_special_keys + */ + readonly editorMode: boolean; + /** + * A value indicating whether the `_` variable has been assigned. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreAssigned: boolean; + /** + * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL). + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly last: any; + /** + * A value indicating whether the `_error` variable has been assigned. + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreErrAssigned: boolean; + /** + * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL). + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly lastError: any; + /** + * Specified in the REPL options, this is the function to be used when evaluating each + * given line of input. If not specified in the REPL options, this is an async wrapper + * for the JavaScript `eval()` function. + */ + readonly eval: REPLEval; + /** + * Specified in the REPL options, this is a value indicating whether the default + * `writer` function should include ANSI color styling to REPL output. + */ + readonly useColors: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `eval` + * function will use the JavaScript `global` as the context as opposed to creating a new + * separate context for the REPL instance. + */ + readonly useGlobal: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `writer` + * function should output the result of a command if it evaluates to `undefined`. + */ + readonly ignoreUndefined: boolean; + /** + * Specified in the REPL options, this is the function to invoke to format the output of + * each command before writing to `outputStream`. If not specified in the REPL options, + * this will be a wrapper for `util.inspect`. + */ + readonly writer: REPLWriter; + /** + * Specified in the REPL options, this is the function to use for custom Tab auto-completion. + */ + readonly completer: Completer | AsyncCompleter; + /** + * Specified in the REPL options, this is a flag that specifies whether the default `eval` + * function should execute all JavaScript commands in strict mode or default (sloppy) mode. + * Possible values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; + /** + * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands + * to the REPL instance. Such commands are invoked by typing a `.` followed by the `keyword`. The `cmd` is either a `Function` or an `Object` with the following + * properties: + * + * The following example shows two new commands added to the REPL instance: + * + * ```js + * import repl from 'node:repl'; + * + * const replServer = repl.start({ prompt: '> ' }); + * replServer.defineCommand('sayhello', { + * help: 'Say hello', + * action(name) { + * this.clearBufferedCommand(); + * console.log(`Hello, ${name}!`); + * this.displayPrompt(); + * }, + * }); + * replServer.defineCommand('saybye', function saybye() { + * console.log('Goodbye!'); + * this.close(); + * }); + * ``` + * + * The new commands can then be used from within the REPL instance: + * + * ```console + * > .sayhello Node.js User + * Hello, Node.js User! + * > .saybye + * Goodbye! + * ``` + * @since v0.3.0 + * @param keyword The command keyword (_without_ a leading `.` character). + * @param cmd The function to invoke when the command is processed. + */ + defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void; + /** + * The `replServer.displayPrompt()` method readies the REPL instance for input + * from the user, printing the configured `prompt` to a new line in the `output` and resuming the `input` to accept new input. + * + * When multi-line input is being entered, a pipe `'|'` is printed rather than the + * 'prompt'. + * + * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`. + * + * The `replServer.displayPrompt` method is primarily intended to be called from + * within the action function for commands registered using the `replServer.defineCommand()` method. + * @since v0.1.91 + */ + displayPrompt(preserveCursor?: boolean): void; + /** + * The `replServer.clearBufferedCommand()` method clears any command that has been + * buffered but not yet executed. This method is primarily intended to be + * called from within the action function for commands registered using the `replServer.defineCommand()` method. + * @since v9.0.0 + */ + clearBufferedCommand(): void; + /** + * Initializes a history log file for the REPL instance. When executing the + * Node.js binary and using the command-line REPL, a history file is initialized + * by default. However, this is not the case when creating a REPL + * programmatically. Use this method to initialize a history log file when working + * with REPL instances programmatically. + * @since v11.10.0 + * @param historyPath the path to the history file + * @param callback called when history writes are ready or upon error + */ + setupHistory(historyPath: string, callback: (err: Error | null, repl: this) => void): void; + setupHistory( + historyConfig?: REPLServerSetupHistoryOptions, + callback?: (err: Error | null, repl: this) => void, + ): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: REPLServerEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: REPLServerEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: REPLServerEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: REPLServerEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: REPLServerEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: REPLServerEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: REPLServerEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: REPLServerEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: REPLServerEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + /** + * A flag passed in the REPL options. Evaluates expressions in sloppy mode. + */ + const REPL_MODE_SLOPPY: unique symbol; + /** + * A flag passed in the REPL options. Evaluates expressions in strict mode. + * This is equivalent to prefacing every repl statement with `'use strict'`. + */ + const REPL_MODE_STRICT: unique symbol; + /** + * The `repl.start()` method creates and starts a {@link REPLServer} instance. + * + * If `options` is a string, then it specifies the input prompt: + * + * ```js + * import repl from 'node:repl'; + * + * // a Unix style prompt + * repl.start('$ '); + * ``` + * @since v0.1.91 + */ + function start(options?: string | ReplOptions): REPLServer; + /** + * Indicates a recoverable error that a `REPLServer` can use to support multi-line input. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_recoverable_errors + */ + class Recoverable extends SyntaxError { + err: Error; + constructor(err: Error); + } +} +declare module "repl" { + export * from "node:repl"; +} diff --git a/node_modules/@types/node/sea.d.ts b/node_modules/@types/node/sea.d.ts new file mode 100644 index 0000000..85ab108 --- /dev/null +++ b/node_modules/@types/node/sea.d.ts @@ -0,0 +1,47 @@ +declare module "node:sea" { + type AssetKey = string; + /** + * @since v20.12.0 + * @return Whether this script is running inside a single-executable application. + */ + function isSea(): boolean; + /** + * This method can be used to retrieve the assets configured to be bundled into the + * single-executable application at build time. + * An error is thrown when no matching asset can be found. + * @since v20.12.0 + */ + function getAsset(key: AssetKey): ArrayBuffer; + function getAsset(key: AssetKey, encoding: string): string; + /** + * Similar to `sea.getAsset()`, but returns the result in a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob). + * An error is thrown when no matching asset can be found. + * @since v20.12.0 + */ + function getAssetAsBlob(key: AssetKey, options?: { + type: string; + }): Blob; + /** + * This method can be used to retrieve the assets configured to be bundled into the + * single-executable application at build time. + * An error is thrown when no matching asset can be found. + * + * Unlike `sea.getRawAsset()` or `sea.getAssetAsBlob()`, this method does not + * return a copy. Instead, it returns the raw asset bundled inside the executable. + * + * For now, users should avoid writing to the returned array buffer. If the + * injected section is not marked as writable or not aligned properly, + * writes to the returned array buffer is likely to result in a crash. + * @since v20.12.0 + */ + function getRawAsset(key: AssetKey): ArrayBuffer; + /** + * This method can be used to retrieve an array of all the keys of assets + * embedded into the single-executable application. + * An error is thrown when not running inside a single-executable application. + * @since v24.8.0 + * @returns An array containing all the keys of the assets + * embedded in the executable. If no assets are embedded, returns an empty array. + */ + function getAssetKeys(): string[]; +} diff --git a/node_modules/@types/node/sqlite.d.ts b/node_modules/@types/node/sqlite.d.ts new file mode 100644 index 0000000..70493f0 --- /dev/null +++ b/node_modules/@types/node/sqlite.d.ts @@ -0,0 +1,1140 @@ +declare module "node:sqlite" { + import { PathLike } from "node:fs"; + type SQLInputValue = null | number | bigint | string | NodeJS.ArrayBufferView; + type SQLOutputValue = null | number | bigint | string | NodeJS.NonSharedUint8Array; + interface DatabaseSyncOptions { + /** + * If `true`, the database is opened by the constructor. When + * this value is `false`, the database must be opened via the `open()` method. + * @since v22.5.0 + * @default true + */ + open?: boolean | undefined; + /** + * If `true`, foreign key constraints + * are enabled. This is recommended but can be disabled for compatibility with + * legacy database schemas. The enforcement of foreign key constraints can be + * enabled and disabled after opening the database using + * [`PRAGMA foreign_keys`](https://www.sqlite.org/pragma.html#pragma_foreign_keys). + * @since v22.10.0 + * @default true + */ + enableForeignKeyConstraints?: boolean | undefined; + /** + * If `true`, SQLite will accept + * [double-quoted string literals](https://www.sqlite.org/quirks.html#dblquote). + * This is not recommended but can be + * enabled for compatibility with legacy database schemas. + * @since v22.10.0 + * @default false + */ + enableDoubleQuotedStringLiterals?: boolean | undefined; + /** + * If `true`, the database is opened in read-only mode. + * If the database does not exist, opening it will fail. + * @since v22.12.0 + * @default false + */ + readOnly?: boolean | undefined; + /** + * If `true`, the `loadExtension` SQL function + * and the `loadExtension()` method are enabled. + * You can call `enableLoadExtension(false)` later to disable this feature. + * @since v22.13.0 + * @default false + */ + allowExtension?: boolean | undefined; + /** + * The [busy timeout](https://sqlite.org/c3ref/busy_timeout.html) in milliseconds. This is the maximum amount of + * time that SQLite will wait for a database lock to be released before + * returning an error. + * @since v24.0.0 + * @default 0 + */ + timeout?: number | undefined; + /** + * If `true`, integer fields are read as JavaScript `BigInt` values. If `false`, + * integer fields are read as JavaScript numbers. + * @since v24.4.0 + * @default false + */ + readBigInts?: boolean | undefined; + /** + * If `true`, query results are returned as arrays instead of objects. + * @since v24.4.0 + * @default false + */ + returnArrays?: boolean | undefined; + /** + * If `true`, allows binding named parameters without the prefix + * character (e.g., `foo` instead of `:foo`). + * @since v24.4.40 + * @default true + */ + allowBareNamedParameters?: boolean | undefined; + /** + * If `true`, unknown named parameters are ignored when binding. + * If `false`, an exception is thrown for unknown named parameters. + * @since v24.4.40 + * @default false + */ + allowUnknownNamedParameters?: boolean | undefined; + /** + * If `true`, enables the defensive flag. When the defensive flag is enabled, + * language features that allow ordinary SQL to deliberately corrupt the database file are disabled. + * The defensive flag can also be set using `enableDefensive()`. + * @since v25.1.0 + * @default true + */ + defensive?: boolean | undefined; + /** + * Configuration for various SQLite limits. These limits + * can be used to prevent excessive resource consumption when handling + * potentially malicious input. See [Run-Time Limits](https://www.sqlite.org/c3ref/c_limit_attached.html) and [Limit Constants](https://www.sqlite.org/c3ref/limit.html) + * in the SQLite documentation for details. Default values are determined by + * SQLite's compile-time defaults and may vary depending on how SQLite was + * built. The following properties are supported: + * @since v25.8.0 + */ + limits?: NodeJS.PartialOptions | undefined; + } + interface DatabaseLimits { + length: number; + sqlLength: number; + column: number; + exprDepth: number; + compoundSelect: number; + vdbeOp: number; + functionArg: number; + attach: number; + likePatternLength: number; + variableNumber: number; + triggerDepth: number; + } + interface CreateSessionOptions { + /** + * A specific table to track changes for. By default, changes to all tables are tracked. + * @since v22.12.0 + */ + table?: string | undefined; + /** + * Name of the database to track. This is useful when multiple databases have been added using + * [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html). + * @since v22.12.0 + * @default 'main' + */ + db?: string | undefined; + } + interface ApplyChangesetOptions { + /** + * for each table affected by at least + * one change in the changeset, the `filter` callback is invoked with the + * table name as the first argument. If the return value is falsy, then no + * attempt is made to apply any changes to the table. + * Otherwise, if the return value is truthy or no `filter` callback is provided, + * all changes related to the table are attempted. + * @since v22.12.0 + */ + filter?: ((tableName: string) => boolean) | undefined; + /** + * A function that determines how to handle conflicts. The function receives one argument, + * which can be one of the following values: + * + * * `SQLITE_CHANGESET_DATA`: A `DELETE` or `UPDATE` change does not contain the expected "before" values. + * * `SQLITE_CHANGESET_NOTFOUND`: A row matching the primary key of the `DELETE` or `UPDATE` change does not exist. + * * `SQLITE_CHANGESET_CONFLICT`: An `INSERT` change results in a duplicate primary key. + * * `SQLITE_CHANGESET_FOREIGN_KEY`: Applying a change would result in a foreign key violation. + * * `SQLITE_CHANGESET_CONSTRAINT`: Applying a change results in a `UNIQUE`, `CHECK`, or `NOT NULL` constraint + * violation. + * + * The function should return one of the following values: + * + * * `SQLITE_CHANGESET_OMIT`: Omit conflicting changes. + * * `SQLITE_CHANGESET_REPLACE`: Replace existing values with conflicting changes (only valid with + `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT` conflicts). + * * `SQLITE_CHANGESET_ABORT`: Abort on conflict and roll back the database. + * + * When an error is thrown in the conflict handler or when any other value is returned from the handler, + * applying the changeset is aborted and the database is rolled back. + * + * **Default**: A function that returns `SQLITE_CHANGESET_ABORT`. + * @since v22.12.0 + */ + onConflict?: ((conflictType: number) => number) | undefined; + } + interface DeserializeOptions { + /** + * Name of the database to deserialize into. + * @default 'main' + */ + dbName?: string | undefined; + } + interface FunctionOptions { + /** + * If `true`, the [`SQLITE_DETERMINISTIC`](https://www.sqlite.org/c3ref/c_deterministic.html) flag is + * set on the created function. + * @default false + */ + deterministic?: boolean | undefined; + /** + * If `true`, the [`SQLITE_DIRECTONLY`](https://www.sqlite.org/c3ref/c_directonly.html) flag is set on + * the created function. + * @default false + */ + directOnly?: boolean | undefined; + /** + * If `true`, integer arguments to `function` + * are converted to `BigInt`s. If `false`, integer arguments are passed as + * JavaScript numbers. + * @default false + */ + useBigIntArguments?: boolean | undefined; + /** + * If `true`, `function` may be invoked with any number of + * arguments (between zero and + * [`SQLITE_MAX_FUNCTION_ARG`](https://www.sqlite.org/limits.html#max_function_arg)). If `false`, + * `function` must be invoked with exactly `function.length` arguments. + * @default false + */ + varargs?: boolean | undefined; + } + interface AggregateOptions extends FunctionOptions { + /** + * The identity value for the aggregation function. This value is used when the aggregation + * function is initialized. When a `Function` is passed the identity will be its return value. + */ + start: T | (() => T); + /** + * The function to call for each row in the aggregation. The + * function receives the current state and the row value. The return value of + * this function should be the new state. + */ + step: (accumulator: T, ...args: SQLOutputValue[]) => T; + /** + * The function to call to get the result of the + * aggregation. The function receives the final state and should return the + * result of the aggregation. + */ + result?: ((accumulator: T) => SQLInputValue) | undefined; + /** + * When this function is provided, the `aggregate` method will work as a window function. + * The function receives the current state and the dropped row value. The return value of this function should be the + * new state. + */ + inverse?: ((accumulator: T, ...args: SQLOutputValue[]) => T) | undefined; + } + interface PrepareOptions { + /** + * If `true`, integer fields are read as `BigInt`s. + * @since v25.5.0 + */ + readBigInts?: boolean | undefined; + /** + * If `true`, results are returned as arrays. + * @since v25.5.0 + */ + returnArrays?: boolean | undefined; + /** + * If `true`, allows binding named parameters without the prefix character. + * @since v25.5.0 + */ + allowBareNamedParameters?: boolean | undefined; + /** + * If `true`, unknown named parameters are ignored. + * @since v25.5.0 + */ + allowUnknownNamedParameters?: boolean | undefined; + } + /** + * This class represents a single [connection](https://www.sqlite.org/c3ref/sqlite3.html) to a SQLite database. All APIs + * exposed by this class execute synchronously. + * @since v22.5.0 + */ + class DatabaseSync implements Disposable { + /** + * Constructs a new `DatabaseSync` instance. + * @param path The path of the database. + * A SQLite database can be stored in a file or completely [in memory](https://www.sqlite.org/inmemorydb.html). + * To use a file-backed database, the path should be a file path. + * To use an in-memory database, the path should be the special name `':memory:'`. + * @param options Configuration options for the database connection. + */ + constructor(path: PathLike, options?: DatabaseSyncOptions); + /** + * Registers a new aggregate function with the SQLite database. This method is a wrapper around + * [`sqlite3_create_window_function()`](https://www.sqlite.org/c3ref/create_function.html). + * + * When used as a window function, the `result` function will be called multiple times. + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * + * const db = new DatabaseSync(':memory:'); + * db.exec(` + * CREATE TABLE t3(x, y); + * INSERT INTO t3 VALUES ('a', 4), + * ('b', 5), + * ('c', 3), + * ('d', 8), + * ('e', 1); + * `); + * + * db.aggregate('sumint', { + * start: 0, + * step: (acc, value) => acc + value, + * }); + * + * db.prepare('SELECT sumint(y) as total FROM t3').get(); // { total: 21 } + * ``` + * @since v24.0.0 + * @param name The name of the SQLite function to create. + * @param options Function configuration settings. + */ + aggregate(name: string, options: AggregateOptions): void; + aggregate(name: string, options: AggregateOptions): void; + /** + * Closes the database connection. An exception is thrown if the database is not + * open. This method is a wrapper around [`sqlite3_close_v2()`](https://www.sqlite.org/c3ref/close.html). + * @since v22.5.0 + */ + close(): void; + /** + * Loads a shared library into the database connection. This method is a wrapper + * around [`sqlite3_load_extension()`](https://www.sqlite.org/c3ref/load_extension.html). It is required to enable the + * `allowExtension` option when constructing the `DatabaseSync` instance. + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * const database = new DatabaseSync(':memory:', { allowExtension: true }); + * + * // Load using the entry point derived from the filename. + * database.loadExtension('./decimal.dylib'); + * + * // Override the entry point when the derived name does not match. + * database.loadExtension('./base64.dylib', 'sqlite3_base64_init'); + * @since v22.13.0 + * @param path The path to the shared library to load. + * @param entryPoint The name of the extension's entry-point function. When + * omitted, SQLite derives the entry point from the shared library's filename; + * pass this argument explicitly when the derived name does not match. + */ + loadExtension(path: string, entryPoint?: string): void; + /** + * Enables or disables the `loadExtension` SQL function, and the `loadExtension()` + * method. When `allowExtension` is `false` when constructing, you cannot enable + * loading extensions for security reasons. + * @since v22.13.0 + * @param allow Whether to allow loading extensions. + */ + enableLoadExtension(allow: boolean): void; + /** + * Enables or disables the defensive flag. When the defensive flag is active, + * language features that allow ordinary SQL to deliberately corrupt the database file are disabled. + * See [`SQLITE_DBCONFIG_DEFENSIVE`](https://www.sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigdefensive) in the SQLite documentation for details. + * @since v25.1.0 + * @param active Whether to set the defensive flag. + */ + enableDefensive(active: boolean): void; + /** + * This method is a wrapper around [`sqlite3_db_filename()`](https://sqlite.org/c3ref/db_filename.html) + * @since v24.0.0 + * @param dbName Name of the database. This can be `'main'` (the default primary database) or any other + * database that has been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) **Default:** `'main'`. + * @returns The location of the database file. When using an in-memory database, + * this method returns null. + */ + location(dbName?: string): string | null; + /** + * This method allows one or more SQL statements to be executed without returning + * any results. This method is useful when executing SQL statements read from a + * file. This method is a wrapper around [`sqlite3_exec()`](https://www.sqlite.org/c3ref/exec.html). + * @since v22.5.0 + * @param sql A SQL string to execute. + */ + exec(sql: string): void; + /** + * This method is used to create SQLite user-defined functions. This method is a + * wrapper around [`sqlite3_create_function_v2()`](https://www.sqlite.org/c3ref/create_function.html). + * @since v22.13.0 + * @param name The name of the SQLite function to create. + * @param options Optional configuration settings for the function. + * @param fn The JavaScript function to call when the SQLite function is + * invoked. The return value of this function should be a valid SQLite data type: + * see [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v26.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite). The result defaults to + * `NULL` if the return value is `undefined`. + */ + function( + name: string, + options: FunctionOptions, + fn: (...args: SQLOutputValue[]) => SQLInputValue, + ): void; + function(name: string, fn: (...args: SQLOutputValue[]) => SQLInputValue): void; + /** + * Sets an authorizer callback that SQLite will invoke whenever it attempts to + * access data or modify the database schema through prepared statements. + * This can be used to implement security policies, audit access, or restrict certain operations. + * This method is a wrapper around [`sqlite3_set_authorizer()`](https://sqlite.org/c3ref/set_authorizer.html). + * + * When invoked, the callback receives five arguments: + * + * * `actionCode` {number} The type of operation being performed (e.g., + * `SQLITE_INSERT`, `SQLITE_UPDATE`, `SQLITE_SELECT`). + * * `arg1` {string|null} The first argument (context-dependent, often a table name). + * * `arg2` {string|null} The second argument (context-dependent, often a column name). + * * `dbName` {string|null} The name of the database. + * * `triggerOrView` {string|null} The name of the trigger or view causing the access. + * + * The callback must return one of the following constants: + * + * * `SQLITE_OK` - Allow the operation. + * * `SQLITE_DENY` - Deny the operation (causes an error). + * * `SQLITE_IGNORE` - Ignore the operation (silently skip). + * + * ```js + * import { DatabaseSync, constants } from 'node:sqlite'; + * const db = new DatabaseSync(':memory:'); + * + * // Set up an authorizer that denies all table creation + * db.setAuthorizer((actionCode) => { + * if (actionCode === constants.SQLITE_CREATE_TABLE) { + * return constants.SQLITE_DENY; + * } + * return constants.SQLITE_OK; + * }); + * + * // This will work + * db.prepare('SELECT 1').get(); + * + * // This will throw an error due to authorization denial + * try { + * db.exec('CREATE TABLE blocked (id INTEGER)'); + * } catch (err) { + * console.log('Operation blocked:', err.message); + * } + * ``` + * @since v24.10.0 + * @param callback The authorizer function to set, or `null` to + * clear the current authorizer. + */ + setAuthorizer( + callback: + | (( + actionCode: number, + arg1: string | null, + arg2: string | null, + dbName: string | null, + triggerOrView: string | null, + ) => number) + | null, + ): void; + /** + * Whether the database is currently open or not. + * @since v22.15.0 + */ + readonly isOpen: boolean; + /** + * Whether the database is currently within a transaction. This method + * is a wrapper around [`sqlite3_get_autocommit()`](https://sqlite.org/c3ref/get_autocommit.html). + * @since v24.0.0 + */ + readonly isTransaction: boolean; + /** + * An object for getting and setting SQLite database limits at runtime. + * Each property corresponds to an SQLite limit and can be read or written. + * + * ```js + * const db = new DatabaseSync(':memory:'); + * + * // Read current limit + * console.log(db.limits.length); + * + * // Set a new limit + * db.limits.sqlLength = 100000; + * + * // Reset a limit to its compile-time maximum + * db.limits.sqlLength = Infinity; + * ``` + * + * Available properties: `length`, `sqlLength`, `column`, `exprDepth`, + * `compoundSelect`, `vdbeOp`, `functionArg`, `attach`, `likePatternLength`, + * `variableNumber`, `triggerDepth`. + * + * Setting a property to `Infinity` resets the limit to its compile-time maximum value. + * @since v25.8.0 + */ + readonly limits: DatabaseLimits; + /** + * Opens the database specified in the `path` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via + * the constructor. An exception is thrown if the database is already open. + * @since v22.5.0 + */ + open(): void; + /** + * Serializes the database into a binary representation, returned as a + * `Uint8Array`. This is useful for saving, cloning, or transferring an in-memory + * database. This method is a wrapper around [`sqlite3_serialize()`](https://sqlite.org/c3ref/serialize.html). + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * + * const db = new DatabaseSync(':memory:'); + * db.exec('CREATE TABLE t(key INTEGER PRIMARY KEY, value TEXT)'); + * db.exec("INSERT INTO t VALUES (1, 'hello')"); + * const buffer = db.serialize(); + * console.log(buffer.length); // Prints the byte length of the database + * ``` + * @since v26.1.0 + * @param dbName Name of the database to serialize. This can be `'main'` + * (the default primary database) or any other database that has been added with + * [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html). **Default:** `'main'`. + * @returns A binary representation of the database. + */ + serialize(dbName?: string): NodeJS.NonSharedUint8Array; + /** + * Loads a serialized database into this connection, replacing the current + * database. The deserialized database is writable. Existing prepared statements + * are finalized before deserialization is attempted, even if the operation + * subsequently fails. This method is a wrapper around + * [`sqlite3_deserialize()`](https://sqlite.org/c3ref/deserialize.html). + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * + * const original = new DatabaseSync(':memory:'); + * original.exec('CREATE TABLE t(key INTEGER PRIMARY KEY, value TEXT)'); + * original.exec("INSERT INTO t VALUES (1, 'hello')"); + * const buffer = original.serialize(); + * original.close(); + * + * const clone = new DatabaseSync(':memory:'); + * clone.deserialize(buffer); + * console.log(clone.prepare('SELECT value FROM t').get()); + * // Prints: { value: 'hello' } + * ``` + * @since v26.1.0 + * @param buffer A binary representation of a database, such as the + * output of `database.serialize()`. + * @param options Optional configuration for the deserialization. + */ + deserialize(buffer: Uint8Array, options?: DeserializeOptions): void; + /** + * Compiles a SQL statement into a [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This method is a wrapper + * around [`sqlite3_prepare_v2()`](https://www.sqlite.org/c3ref/prepare.html). + * @since v22.5.0 + * @param sql A SQL string to compile to a prepared statement. + * @param options Optional configuration for the prepared statement. + * @return The prepared statement. + */ + prepare(sql: string, options?: PrepareOptions): StatementSync; + /** + * Creates a new {@link SQLTagStore}, which is a Least Recently Used (LRU) cache + * for storing prepared statements. This allows for the efficient reuse of + * prepared statements by tagging them with a unique identifier. + * + * When a tagged SQL literal is executed, the `SQLTagStore` checks if a prepared + * statement for the corresponding SQL query string already exists in the cache. + * If it does, the cached statement is used. If not, a new prepared statement is + * created, executed, and then stored in the cache for future use. This mechanism + * helps to avoid the overhead of repeatedly parsing and preparing the same SQL + * statements. + * + * Tagged statements bind the placeholder values from the template literal as + * parameters to the underlying prepared statement. For example: + * + * ```js + * sqlTagStore.get`SELECT ${value}`; + * ``` + * + * is equivalent to: + * + * ```js + * db.prepare('SELECT ?').get(value); + * ``` + * + * However, in the first example, the tag store will cache the underlying prepared + * statement for future use. + * + * > **Note:** The `${value}` syntax in tagged statements _binds_ a parameter to + * > the prepared statement. This differs from its behavior in _untagged_ template + * > literals, where it performs string interpolation. + * > + * > ```js + * > // This a safe example of binding a parameter to a tagged statement. + * > sqlTagStore.run`INSERT INTO t1 (id) VALUES (${id})`; + * > + * > // This is an *unsafe* example of an untagged template string. + * > // `id` is interpolated into the query text as a string. + * > // This can lead to SQL injection and data corruption. + * > db.run(`INSERT INTO t1 (id) VALUES (${id})`); + * > ``` + * + * The tag store will match a statement from the cache if the query strings + * (including the positions of any bound placeholders) are identical. + * + * ```js + * // The following statements will match in the cache: + * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`; + * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${12345} AND active = 1`; + * + * // The following statements will not match, as the query strings + * // and bound placeholders differ: + * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`; + * sqlTagStore.get`SELECT * FROM t1 WHERE id = 12345 AND active = 1`; + * + * // The following statements will not match, as matches are case-sensitive: + * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`; + * sqlTagStore.get`select * from t1 where id = ${id} and active = 1`; + * ``` + * + * The only way of binding parameters in tagged statements is with the `${value}` + * syntax. Do not add parameter binding placeholders (`?` etc.) to the SQL query + * string itself. + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * + * const db = new DatabaseSync(':memory:'); + * const sql = db.createSQLTagStore(); + * + * db.exec('CREATE TABLE users (id INT, name TEXT)'); + * + * // Using the 'run' method to insert data. + * // The tagged literal is used to identify the prepared statement. + * sql.run`INSERT INTO users VALUES (1, 'Alice')`; + * sql.run`INSERT INTO users VALUES (2, 'Bob')`; + * + * // Using the 'get' method to retrieve a single row. + * const name = 'Alice'; + * const user = sql.get`SELECT * FROM users WHERE name = ${name}`; + * console.log(user); // { id: 1, name: 'Alice' } + * + * // Using the 'all' method to retrieve all rows. + * const allUsers = sql.all`SELECT * FROM users ORDER BY id`; + * console.log(allUsers); + * // [ + * // { id: 1, name: 'Alice' }, + * // { id: 2, name: 'Bob' } + * // ] + * ``` + * @since v24.9.0 + * @returns A new SQL tag store for caching prepared statements. + */ + createTagStore(maxSize?: number): SQLTagStore; + /** + * Creates and attaches a session to the database. This method is a wrapper around + * [`sqlite3session_create()`](https://www.sqlite.org/session/sqlite3session_create.html) and + * [`sqlite3session_attach()`](https://www.sqlite.org/session/sqlite3session_attach.html). + * @param options The configuration options for the session. + * @returns A session handle. + * @since v22.12.0 + */ + createSession(options?: CreateSessionOptions): Session; + /** + * An exception is thrown if the database is not + * open. This method is a wrapper around + * [`sqlite3changeset_apply()`](https://www.sqlite.org/session/sqlite3changeset_apply.html). + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * + * const sourceDb = new DatabaseSync(':memory:'); + * const targetDb = new DatabaseSync(':memory:'); + * + * sourceDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)'); + * targetDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)'); + * + * const session = sourceDb.createSession(); + * + * const insert = sourceDb.prepare('INSERT INTO data (key, value) VALUES (?, ?)'); + * insert.run(1, 'hello'); + * insert.run(2, 'world'); + * + * const changeset = session.changeset(); + * targetDb.applyChangeset(changeset); + * // Now that the changeset has been applied, targetDb contains the same data as sourceDb. + * ``` + * @param changeset A binary changeset or patchset. + * @param options The configuration options for how the changes will be applied. + * @returns Whether the changeset was applied successfully without being aborted. + * @since v22.12.0 + */ + applyChangeset(changeset: Uint8Array, options?: ApplyChangesetOptions): boolean; + /** + * Closes the database connection. If the database connection is already closed + * then this is a no-op. + * @since v22.15.0 + */ + [Symbol.dispose](): void; + } + /** + * @since v22.12.0 + */ + interface Session { + /** + * Retrieves a changeset containing all changes since the changeset was created. Can be called multiple times. + * An exception is thrown if the database or the session is not open. This method is a wrapper around + * [`sqlite3session_changeset()`](https://www.sqlite.org/session/sqlite3session_changeset.html). + * @returns Binary changeset that can be applied to other databases. + * @since v22.12.0 + */ + changeset(): NodeJS.NonSharedUint8Array; + /** + * Similar to the method above, but generates a more compact patchset. See + * [Changesets and Patchsets](https://www.sqlite.org/sessionintro.html#changesets_and_patchsets) + * in the documentation of SQLite. An exception is thrown if the database or the session is not open. This method is a + * wrapper around + * [`sqlite3session_patchset()`](https://www.sqlite.org/session/sqlite3session_patchset.html). + * @returns Binary patchset that can be applied to other databases. + * @since v22.12.0 + */ + patchset(): NodeJS.NonSharedUint8Array; + /** + * Closes the session. An exception is thrown if the database or the session is not open. This method is a + * wrapper around + * [`sqlite3session_delete()`](https://www.sqlite.org/session/sqlite3session_delete.html). + */ + close(): void; + /** + * Closes the session. If the session is already closed, does nothing. + * @since v24.9.0 + */ + [Symbol.dispose](): void; + } + /** + * This class represents a single LRU (Least Recently Used) cache for storing + * prepared statements. + * + * Instances of this class are created via the `database.createTagStore()` + * method, not by using a constructor. The store caches prepared statements based + * on the provided SQL query string. When the same query is seen again, the store + * retrieves the cached statement and safely applies the new values through + * parameter binding, thereby preventing attacks like SQL injection. + * + * The cache has a maxSize that defaults to 1000 statements, but a custom size can + * be provided (e.g., `database.createTagStore(100)`). All APIs exposed by this + * class execute synchronously. + * @since v24.9.0 + */ + interface SQLTagStore { + /** + * Executes the given SQL query and returns all resulting rows as an array of + * objects. + * + * This function is intended to be used as a template literal tag, not to be + * called directly. + * @since v24.9.0 + * @param stringElements Template literal elements containing the SQL + * query. + * @param boundParameters Parameter values to be bound to placeholders in the template string. + * @returns An array of objects representing the rows returned by the query. + */ + all( + stringElements: TemplateStringsArray, + ...boundParameters: SQLInputValue[] + ): Record[]; + /** + * Executes the given SQL query and returns the first resulting row as an object. + * + * This function is intended to be used as a template literal tag, not to be + * called directly. + * @since v24.9.0 + * @param stringElements Template literal elements containing the SQL + * query. + * @param boundParameters Parameter values to be bound to placeholders in the template string. + * @returns An object representing the first row returned by + * the query, or `undefined` if no rows are returned. + */ + get( + stringElements: TemplateStringsArray, + ...boundParameters: SQLInputValue[] + ): Record | undefined; + /** + * Executes the given SQL query and returns an iterator over the resulting rows. + * + * This function is intended to be used as a template literal tag, not to be + * called directly. + * @since v24.9.0 + * @param stringElements Template literal elements containing the SQL + * query. + * @param boundParameters Parameter values to be bound to placeholders in the template string. + * @returns An iterator that yields objects representing the rows returned by the query. + */ + iterate( + stringElements: TemplateStringsArray, + ...boundParameters: SQLInputValue[] + ): NodeJS.Iterator>; + /** + * Executes the given SQL query, which is expected to not return any rows (e.g., INSERT, UPDATE, DELETE). + * + * This function is intended to be used as a template literal tag, not to be + * called directly. + * @since v24.9.0 + * @param stringElements Template literal elements containing the SQL + * query. + * @param boundParameters Parameter values to be bound to placeholders in the template string. + * @returns An object containing information about the execution, including `changes` and `lastInsertRowid`. + */ + run(stringElements: TemplateStringsArray, ...boundParameters: SQLInputValue[]): StatementResultingChanges; + /** + * A read-only property that returns the number of prepared statements currently in the cache. + * @since v24.9.0 + */ + readonly size: number; + /** + * A read-only property that returns the maximum number of prepared statements the cache can hold. + * @since v24.9.0 + */ + readonly capacity: number; + /** + * A read-only property that returns the `DatabaseSync` object associated with this `SQLTagStore`. + * @since v24.9.0 + */ + readonly db: DatabaseSync; + /** + * Resets the LRU cache, clearing all stored prepared statements. + * @since v24.9.0 + */ + clear(): void; + } + interface StatementColumnMetadata { + /** + * The unaliased name of the column in the origin + * table, or `null` if the column is the result of an expression or subquery. + * This property is the result of [`sqlite3_column_origin_name()`](https://www.sqlite.org/c3ref/column_database_name.html). + */ + column: string | null; + /** + * The unaliased name of the origin database, or + * `null` if the column is the result of an expression or subquery. This + * property is the result of [`sqlite3_column_database_name()`](https://www.sqlite.org/c3ref/column_database_name.html). + */ + database: string | null; + /** + * The name assigned to the column in the result set of a + * `SELECT` statement. This property is the result of + * [`sqlite3_column_name()`](https://www.sqlite.org/c3ref/column_name.html). + */ + name: string; + /** + * The unaliased name of the origin table, or `null` if + * the column is the result of an expression or subquery. This property is the + * result of [`sqlite3_column_table_name()`](https://www.sqlite.org/c3ref/column_database_name.html). + */ + table: string | null; + /** + * The declared data type of the column, or `null` if the + * column is the result of an expression or subquery. This property is the + * result of [`sqlite3_column_decltype()`](https://www.sqlite.org/c3ref/column_decltype.html). + */ + type: string | null; + } + interface StatementResultingChanges { + /** + * The number of rows modified, inserted, or deleted by the most recently completed `INSERT`, `UPDATE`, or `DELETE` statement. + * This field is either a number or a `BigInt` depending on the prepared statement's configuration. + * This property is the result of [`sqlite3_changes64()`](https://www.sqlite.org/c3ref/changes.html). + */ + changes: number | bigint; + /** + * The most recently inserted rowid. + * This field is either a number or a `BigInt` depending on the prepared statement's configuration. + * This property is the result of [`sqlite3_last_insert_rowid()`](https://www.sqlite.org/c3ref/last_insert_rowid.html). + */ + lastInsertRowid: number | bigint; + } + /** + * This class represents a single [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This class cannot be + * instantiated via its constructor. Instead, instances are created via the`database.prepare()` method. All APIs exposed by this class execute + * synchronously. + * + * A prepared statement is an efficient binary representation of the SQL used to + * create it. Prepared statements are parameterizable, and can be invoked multiple + * times with different bound values. Parameters also offer protection against [SQL injection](https://en.wikipedia.org/wiki/SQL_injection) attacks. For these reasons, prepared statements are + * preferred + * over hand-crafted SQL strings when handling user input. + * @since v22.5.0 + */ + class StatementSync { + private constructor(); + /** + * This method executes a prepared statement and returns all results as an array of + * objects. If the prepared statement does not return any results, this method + * returns an empty array. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using + * the values in `namedParameters` and `anonymousParameters`. + * @since v22.5.0 + * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. + * @param anonymousParameters Zero or more values to bind to anonymous parameters. + * @return An array of objects. Each object corresponds to a row returned by executing the prepared statement. The keys and values of each object correspond to the column names and values of + * the row. + */ + all(...anonymousParameters: SQLInputValue[]): Record[]; + all( + namedParameters: Record, + ...anonymousParameters: SQLInputValue[] + ): Record[]; + /** + * This method is used to retrieve information about the columns returned by the + * prepared statement. + * @since v23.11.0 + * @returns An array of objects. Each object corresponds to a column + * in the prepared statement, and contains the following properties: + */ + columns(): StatementColumnMetadata[]; + /** + * The source SQL text of the prepared statement with parameter + * placeholders replaced by the values that were used during the most recent + * execution of this prepared statement. This property is a wrapper around + * [`sqlite3_expanded_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html). + * @since v22.5.0 + */ + readonly expandedSQL: string; + /** + * This method executes a prepared statement and returns the first result as an + * object. If the prepared statement does not return any results, this method + * returns `undefined`. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the + * values in `namedParameters` and `anonymousParameters`. + * @since v22.5.0 + * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. + * @param anonymousParameters Zero or more values to bind to anonymous parameters. + * @return An object corresponding to the first row returned by executing the prepared statement. The keys and values of the object correspond to the column names and values of the row. If no + * rows were returned from the database then this method returns `undefined`. + */ + get(...anonymousParameters: SQLInputValue[]): Record | undefined; + get( + namedParameters: Record, + ...anonymousParameters: SQLInputValue[] + ): Record | undefined; + /** + * This method executes a prepared statement and returns an iterator of + * objects. If the prepared statement does not return any results, this method + * returns an empty iterator. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using + * the values in `namedParameters` and `anonymousParameters`. + * @since v22.13.0 + * @param namedParameters An optional object used to bind named parameters. + * The keys of this object are used to configure the mapping. + * @param anonymousParameters Zero or more values to bind to anonymous parameters. + * @returns An iterable iterator of objects. Each object corresponds to a row + * returned by executing the prepared statement. The keys and values of each + * object correspond to the column names and values of the row. + */ + iterate(...anonymousParameters: SQLInputValue[]): NodeJS.Iterator>; + iterate( + namedParameters: Record, + ...anonymousParameters: SQLInputValue[] + ): NodeJS.Iterator>; + /** + * This method executes a prepared statement and returns an object summarizing the + * resulting changes. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the + * values in `namedParameters` and `anonymousParameters`. + * @since v22.5.0 + * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. + * @param anonymousParameters Zero or more values to bind to anonymous parameters. + */ + run(...anonymousParameters: SQLInputValue[]): StatementResultingChanges; + run( + namedParameters: Record, + ...anonymousParameters: SQLInputValue[] + ): StatementResultingChanges; + /** + * The names of SQLite parameters begin with a prefix character. By default,`node:sqlite` requires that this prefix character is present when binding + * parameters. However, with the exception of dollar sign character, these + * prefix characters also require extra quoting when used in object keys. + * + * To improve ergonomics, this method can be used to also allow bare named + * parameters, which do not require the prefix character in JavaScript code. There + * are several caveats to be aware of when enabling bare named parameters: + * + * * The prefix character is still required in SQL. + * * The prefix character is still allowed in JavaScript. In fact, prefixed names + * will have slightly better binding performance. + * * Using ambiguous named parameters, such as `$k` and `@k`, in the same prepared + * statement will result in an exception as it cannot be determined how to bind + * a bare name. + * @since v22.5.0 + * @param enabled Enables or disables support for binding named parameters without the prefix character. + */ + setAllowBareNamedParameters(enabled: boolean): void; + /** + * By default, if an unknown name is encountered while binding parameters, an + * exception is thrown. This method allows unknown named parameters to be ignored. + * @since v22.15.0 + * @param enabled Enables or disables support for unknown named parameters. + */ + setAllowUnknownNamedParameters(enabled: boolean): void; + /** + * When enabled, query results returned by the `all()`, `get()`, and `iterate()` methods will be returned as arrays instead + * of objects. + * @since v24.0.0 + * @param enabled Enables or disables the return of query results as arrays. + */ + setReturnArrays(enabled: boolean): void; + /** + * When reading from the database, SQLite `INTEGER`s are mapped to JavaScript + * numbers by default. However, SQLite `INTEGER`s can store values larger than + * JavaScript numbers are capable of representing. In such cases, this method can + * be used to read `INTEGER` data using JavaScript `BigInt`s. This method has no + * impact on database write operations where numbers and `BigInt`s are both + * supported at all times. + * @since v22.5.0 + * @param enabled Enables or disables the use of `BigInt`s when reading `INTEGER` fields from the database. + */ + setReadBigInts(enabled: boolean): void; + /** + * The source SQL text of the prepared statement. This property is a + * wrapper around [`sqlite3_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html). + * @since v22.5.0 + */ + readonly sourceSQL: string; + } + interface BackupOptions { + /** + * Name of the source database. This can be `'main'` (the default primary database) or any other + * database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) + * @default 'main' + */ + source?: string | undefined; + /** + * Name of the target database. This can be `'main'` (the default primary database) or any other + * database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) + * @default 'main' + */ + target?: string | undefined; + /** + * Number of pages to be transmitted in each batch of the backup. + * @default 100 + */ + rate?: number | undefined; + /** + * An optional callback function that will be called after each backup step. The argument passed + * to this callback is an `Object` with `remainingPages` and `totalPages` properties, describing the current progress + * of the backup operation. + */ + progress?: ((progressInfo: BackupProgressInfo) => void) | undefined; + } + interface BackupProgressInfo { + totalPages: number; + remainingPages: number; + } + /** + * This method makes a database backup. This method abstracts the + * [`sqlite3_backup_init()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupinit), + * [`sqlite3_backup_step()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupstep) + * and [`sqlite3_backup_finish()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupfinish) functions. + * + * The backed-up database can be used normally during the backup process. Mutations coming from the same connection - same + * `DatabaseSync` - object will be reflected in the backup right away. However, mutations from other connections will cause + * the backup process to restart. + * + * ```js + * import { backup, DatabaseSync } from 'node:sqlite'; + * + * const sourceDb = new DatabaseSync('source.db'); + * const totalPagesTransferred = await backup(sourceDb, 'backup.db', { + * rate: 1, // Copy one page at a time. + * progress: ({ totalPages, remainingPages }) => { + * console.log('Backup in progress', { totalPages, remainingPages }); + * }, + * }); + * + * console.log('Backup completed', totalPagesTransferred); + * ``` + * @since v23.8.0 + * @param sourceDb The database to backup. The source database must be open. + * @param path The path where the backup will be created. If the file already exists, + * the contents will be overwritten. + * @param options Optional configuration for the backup. The + * following properties are supported: + * @returns A promise that fulfills with the total number of backed-up pages upon completion, or rejects if an + * error occurs. + */ + function backup(sourceDb: DatabaseSync, path: PathLike, options?: BackupOptions): Promise; + /** + * @since v22.13.0 + */ + namespace constants { + /** + * The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is present in the database, but one or more other (non primary-key) fields modified by the update do not contain the expected "before" values. + * @since v22.14.0 + */ + const SQLITE_CHANGESET_DATA: number; + /** + * The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is not present in the database. + * @since v22.14.0 + */ + const SQLITE_CHANGESET_NOTFOUND: number; + /** + * This constant is passed to the conflict handler while processing an INSERT change if the operation would result in duplicate primary key values. + * @since v22.14.0 + */ + const SQLITE_CHANGESET_CONFLICT: number; + /** + * If foreign key handling is enabled, and applying a changeset leaves the database in a state containing foreign key violations, the conflict handler is invoked with this constant exactly once before the changeset is committed. If the conflict handler returns `SQLITE_CHANGESET_OMIT`, the changes, including those that caused the foreign key constraint violation, are committed. Or, if it returns `SQLITE_CHANGESET_ABORT`, the changeset is rolled back. + * @since v22.14.0 + */ + const SQLITE_CHANGESET_FOREIGN_KEY: number; + /** + * Conflicting changes are omitted. + * @since v22.12.0 + */ + const SQLITE_CHANGESET_OMIT: number; + /** + * Conflicting changes replace existing values. Note that this value can only be returned when the type of conflict is either `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT`. + * @since v22.12.0 + */ + const SQLITE_CHANGESET_REPLACE: number; + /** + * Abort when a change encounters a conflict and roll back database. + * @since v22.12.0 + */ + const SQLITE_CHANGESET_ABORT: number; + /** + * Deny the operation and cause an error to be returned. + * @since v24.10.0 + */ + const SQLITE_DENY: number; + /** + * Ignore the operation and continue as if it had never been requested. + * @since 24.10.0 + */ + const SQLITE_IGNORE: number; + /** + * Allow the operation to proceed normally. + * @since v24.10.0 + */ + const SQLITE_OK: number; + const SQLITE_CREATE_INDEX: number; + const SQLITE_CREATE_TABLE: number; + const SQLITE_CREATE_TEMP_INDEX: number; + const SQLITE_CREATE_TEMP_TABLE: number; + const SQLITE_CREATE_TEMP_TRIGGER: number; + const SQLITE_CREATE_TEMP_VIEW: number; + const SQLITE_CREATE_TRIGGER: number; + const SQLITE_CREATE_VIEW: number; + const SQLITE_DELETE: number; + const SQLITE_DROP_INDEX: number; + const SQLITE_DROP_TABLE: number; + const SQLITE_DROP_TEMP_INDEX: number; + const SQLITE_DROP_TEMP_TABLE: number; + const SQLITE_DROP_TEMP_TRIGGER: number; + const SQLITE_DROP_TEMP_VIEW: number; + const SQLITE_DROP_TRIGGER: number; + const SQLITE_DROP_VIEW: number; + const SQLITE_INSERT: number; + const SQLITE_PRAGMA: number; + const SQLITE_READ: number; + const SQLITE_SELECT: number; + const SQLITE_TRANSACTION: number; + const SQLITE_UPDATE: number; + const SQLITE_ATTACH: number; + const SQLITE_DETACH: number; + const SQLITE_ALTER_TABLE: number; + const SQLITE_REINDEX: number; + const SQLITE_ANALYZE: number; + const SQLITE_CREATE_VTABLE: number; + const SQLITE_DROP_VTABLE: number; + const SQLITE_FUNCTION: number; + const SQLITE_SAVEPOINT: number; + const SQLITE_COPY: number; + const SQLITE_RECURSIVE: number; + } +} diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts new file mode 100644 index 0000000..c9b0811 --- /dev/null +++ b/node_modules/@types/node/stream.d.ts @@ -0,0 +1,1806 @@ +declare module "node:stream" { + import { Blob } from "node:buffer"; + import { Abortable, EventEmitter } from "node:events"; + import { ByteReadableStream, toAsyncStreamable } from "node:stream/iter"; + import * as promises from "node:stream/promises"; + import * as web from "node:stream/web"; + class Stream extends EventEmitter { + /** + * @since v0.9.4 + */ + pipe( + destination: T, + options?: Stream.PipeOptions, + ): T; + } + namespace Stream { + export { promises, Stream }; + } + namespace Stream { + interface PipeOptions { + /** + * End the writer when the reader ends. + * @default true + */ + end?: boolean | undefined; + } + interface StreamOptions extends Abortable { + emitClose?: boolean | undefined; + highWaterMark?: number | undefined; + objectMode?: boolean | undefined; + construct?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined; + destroy?: ((this: T, error: Error | null, callback: (error?: Error | null) => void) => void) | undefined; + autoDestroy?: boolean | undefined; + } + interface ReadableOptions extends StreamOptions { + encoding?: BufferEncoding | undefined; + read?: ((this: T, size: number) => void) | undefined; + } + interface ReadableIteratorOptions { + /** + * When set to `false`, calling `return` on the async iterator, + * or exiting a `for await...of` iteration using a `break`, + * `return`, or `throw` will not destroy the stream. + * @default true + */ + destroyOnReturn?: boolean | undefined; + } + interface ReadableOperatorOptions extends Abortable { + /** + * The maximum concurrent invocations of `fn` to call + * on the stream at once. + * @default 1 + */ + concurrency?: number | undefined; + /** + * How many items to buffer while waiting for user consumption + * of the output. + * @default concurrency * 2 - 1 + */ + highWaterMark?: number | undefined; + } + /** @deprecated Use `ReadableOperatorOptions` instead. */ + interface ArrayOptions extends ReadableOperatorOptions {} + interface ReadableToWebOptions { + strategy?: web.QueuingStrategy | undefined; + type?: web.ReadableStreamType | undefined; + } + interface ReadableEventMap { + "close": []; + "data": [chunk: any]; + "end": []; + "error": [err: Error]; + "pause": []; + "readable": []; + "resume": []; + } + /** + * @since v0.9.4 + */ + class Readable extends Stream implements NodeJS.ReadableStream { + constructor(options?: ReadableOptions); + /** + * A utility method for creating Readable Streams out of iterators. + * @since v12.3.0, v10.17.0 + * @param iterable Object implementing the `Symbol.asyncIterator` or `Symbol.iterator` iterable protocol. Emits an 'error' event if a null value is passed. + * @param options Options provided to `new stream.Readable([options])`. By default, `Readable.from()` will set `options.objectMode` to `true`, unless this is explicitly opted out by setting `options.objectMode` to `false`. + */ + static from(iterable: Iterable | AsyncIterable, options?: ReadableOptions): Readable; + /** + * A utility method for creating a `Readable` from a web `ReadableStream`. + * @since v17.0.0 + */ + static fromWeb( + readableStream: web.ReadableStream, + options?: Pick, + ): Readable; + /** + * A utility method for creating a web `ReadableStream` from a `Readable`. + * @since v17.0.0 + */ + static toWeb( + streamReadable: NodeJS.ReadableStream, + options?: ReadableToWebOptions, + ): web.ReadableStream; + /** + * Returns whether the stream has been read from or cancelled. + * @since v16.8.0 + */ + static isDisturbed(stream: NodeJS.ReadableStream | web.ReadableStream): boolean; + /** + * Returns whether the stream was destroyed or errored before emitting `'end'`. + * @since v16.8.0 + */ + readonly readableAborted: boolean; + /** + * Is `true` if it is safe to call {@link read}, which means + * the stream has not been destroyed or emitted `'error'` or `'end'`. + * @since v11.4.0 + */ + readable: boolean; + /** + * Returns whether `'data'` has been emitted. + * @since v16.7.0, v14.18.0 + */ + readonly readableDidRead: boolean; + /** + * Getter for the property `encoding` of a given `Readable` stream. The `encoding` property can be set using the {@link setEncoding} method. + * @since v12.7.0 + */ + readonly readableEncoding: BufferEncoding | null; + /** + * Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v26.x/api/stream.html#event-end) event is emitted. + * @since v12.9.0 + */ + readonly readableEnded: boolean; + /** + * This property reflects the current state of a `Readable` stream as described + * in the [Three states](https://nodejs.org/docs/latest-v26.x/api/stream.html#three-states) section. + * @since v9.4.0 + */ + readableFlowing: boolean | null; + /** + * Returns the value of `highWaterMark` passed when creating this `Readable`. + * @since v9.3.0 + */ + readonly readableHighWaterMark: number; + /** + * This property contains the number of bytes (or objects) in the queue + * ready to be read. The value provides introspection data regarding + * the status of the `highWaterMark`. + * @since v9.4.0 + */ + readonly readableLength: number; + /** + * Getter for the property `objectMode` of a given `Readable` stream. + * @since v12.3.0 + */ + readonly readableObjectMode: boolean; + /** + * Is `true` after `readable.destroy()` has been called. + * @since v8.0.0 + */ + destroyed: boolean; + /** + * Is `true` after `'close'` has been emitted. + * @since v18.0.0 + */ + readonly closed: boolean; + /** + * Returns error if the stream has been destroyed with an error. + * @since v18.0.0 + */ + readonly errored: Error | null; + _construct?(callback: (error?: Error | null) => void): void; + _read(size: number): void; + /** + * The `readable.read()` method reads data out of the internal buffer and + * returns it. If no data is available to be read, `null` is returned. By default, + * the data is returned as a `Buffer` object unless an encoding has been + * specified using the `readable.setEncoding()` method or the stream is operating + * in object mode. + * + * The optional `size` argument specifies a specific number of bytes to read. If + * `size` bytes are not available to be read, `null` will be returned _unless_ the + * stream has ended, in which case all of the data remaining in the internal buffer + * will be returned. + * + * If the `size` argument is not specified, all of the data contained in the + * internal buffer will be returned. + * + * The `size` argument must be less than or equal to 1 GiB. + * + * The `readable.read()` method should only be called on `Readable` streams + * operating in paused mode. In flowing mode, `readable.read()` is called + * automatically until the internal buffer is fully drained. + * + * ```js + * const readable = getReadableStreamSomehow(); + * + * // 'readable' may be triggered multiple times as data is buffered in + * readable.on('readable', () => { + * let chunk; + * console.log('Stream is readable (new data received in buffer)'); + * // Use a loop to make sure we read all currently available data + * while (null !== (chunk = readable.read())) { + * console.log(`Read ${chunk.length} bytes of data...`); + * } + * }); + * + * // 'end' will be triggered once when there is no more data available + * readable.on('end', () => { + * console.log('Reached end of stream.'); + * }); + * ``` + * + * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks + * are not concatenated. A `while` loop is necessary to consume all data + * currently in the buffer. When reading a large file `.read()` may return `null`, + * having consumed all buffered content so far, but there is still more data to + * come not yet buffered. In this case a new `'readable'` event will be emitted + * when there is more data in the buffer. Finally the `'end'` event will be + * emitted when there is no more data to come. + * + * Therefore to read a file's whole contents from a `readable`, it is necessary + * to collect chunks across multiple `'readable'` events: + * + * ```js + * const chunks = []; + * + * readable.on('readable', () => { + * let chunk; + * while (null !== (chunk = readable.read())) { + * chunks.push(chunk); + * } + * }); + * + * readable.on('end', () => { + * const content = chunks.join(''); + * }); + * ``` + * + * A `Readable` stream in object mode will always return a single item from + * a call to `readable.read(size)`, regardless of the value of the `size` argument. + * + * If the `readable.read()` method returns a chunk of data, a `'data'` event will + * also be emitted. + * + * Calling {@link read} after the `'end'` event has + * been emitted will return `null`. No runtime error will be raised. + * @since v0.9.4 + * @param size Optional argument to specify how much data to read. + */ + read(size?: number): any; + /** + * The `readable.setEncoding()` method sets the character encoding for + * data read from the `Readable` stream. + * + * By default, no encoding is assigned and stream data will be returned as `Buffer` objects. Setting an encoding causes the stream data + * to be returned as strings of the specified encoding rather than as `Buffer` objects. For instance, calling `readable.setEncoding('utf8')` will cause the + * output data to be interpreted as UTF-8 data, and passed as strings. Calling `readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal + * string format. + * + * The `Readable` stream will properly handle multi-byte characters delivered + * through the stream that would otherwise become improperly decoded if simply + * pulled from the stream as `Buffer` objects. + * + * ```js + * const readable = getReadableStreamSomehow(); + * readable.setEncoding('utf8'); + * readable.on('data', (chunk) => { + * assert.equal(typeof chunk, 'string'); + * console.log('Got %d characters of string data:', chunk.length); + * }); + * ``` + * @since v0.9.4 + * @param encoding The encoding to use. + */ + setEncoding(encoding: BufferEncoding): this; + /** + * The `readable.pause()` method will cause a stream in flowing mode to stop + * emitting `'data'` events, switching out of flowing mode. Any data that + * becomes available will remain in the internal buffer. + * + * ```js + * const readable = getReadableStreamSomehow(); + * readable.on('data', (chunk) => { + * console.log(`Received ${chunk.length} bytes of data.`); + * readable.pause(); + * console.log('There will be no additional data for 1 second.'); + * setTimeout(() => { + * console.log('Now data will start flowing again.'); + * readable.resume(); + * }, 1000); + * }); + * ``` + * + * The `readable.pause()` method has no effect if there is a `'readable'` event listener. + * @since v0.9.4 + */ + pause(): this; + /** + * The `readable.resume()` method causes an explicitly paused `Readable` stream to + * resume emitting `'data'` events, switching the stream into flowing mode. + * + * The `readable.resume()` method can be used to fully consume the data from a + * stream without actually processing any of that data: + * + * ```js + * getReadableStreamSomehow() + * .resume() + * .on('end', () => { + * console.log('Reached the end, but did not read anything.'); + * }); + * ``` + * + * The `readable.resume()` method has no effect if there is a `'readable'` event listener. + * @since v0.9.4 + */ + resume(): this; + /** + * The `readable.isPaused()` method returns the current operating state of the `Readable`. + * This is used primarily by the mechanism that underlies the `readable.pipe()` method. + * In most typical cases, there will be no reason to use this method directly. + * + * ```js + * const readable = new stream.Readable(); + * + * readable.isPaused(); // === false + * readable.pause(); + * readable.isPaused(); // === true + * readable.resume(); + * readable.isPaused(); // === false + * ``` + * @since v0.11.14 + */ + isPaused(): boolean; + /** + * The `readable.unpipe()` method detaches a `Writable` stream previously attached + * using the {@link pipe} method. + * + * If the `destination` is not specified, then _all_ pipes are detached. + * + * If the `destination` is specified, but no pipe is set up for it, then + * the method does nothing. + * + * ```js + * import fs from 'node:fs'; + * const readable = getReadableStreamSomehow(); + * const writable = fs.createWriteStream('file.txt'); + * // All the data from readable goes into 'file.txt', + * // but only for the first second. + * readable.pipe(writable); + * setTimeout(() => { + * console.log('Stop writing to file.txt.'); + * readable.unpipe(writable); + * console.log('Manually close the file stream.'); + * writable.end(); + * }, 1000); + * ``` + * @since v0.9.4 + * @param destination Optional specific stream to unpipe + */ + unpipe(destination?: NodeJS.WritableStream): this; + /** + * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the + * same as `readable.push(null)`, after which no more data can be written. The EOF + * signal is put at the end of the buffer and any buffered data will still be + * flushed. + * + * The `readable.unshift()` method pushes a chunk of data back into the internal + * buffer. This is useful in certain situations where a stream is being consumed by + * code that needs to "un-consume" some amount of data that it has optimistically + * pulled out of the source, so that the data can be passed on to some other party. + * + * The `stream.unshift(chunk)` method cannot be called after the `'end'` event + * has been emitted or a runtime error will be thrown. + * + * Developers using `stream.unshift()` often should consider switching to + * use of a `Transform` stream instead. See the `API for stream implementers` section for more information. + * + * ```js + * // Pull off a header delimited by \n\n. + * // Use unshift() if we get too much. + * // Call the callback with (error, header, stream). + * import { StringDecoder } from 'node:string_decoder'; + * function parseHeader(stream, callback) { + * stream.on('error', callback); + * stream.on('readable', onReadable); + * const decoder = new StringDecoder('utf8'); + * let header = ''; + * function onReadable() { + * let chunk; + * while (null !== (chunk = stream.read())) { + * const str = decoder.write(chunk); + * if (str.includes('\n\n')) { + * // Found the header boundary. + * const split = str.split(/\n\n/); + * header += split.shift(); + * const remaining = split.join('\n\n'); + * const buf = Buffer.from(remaining, 'utf8'); + * stream.removeListener('error', callback); + * // Remove the 'readable' listener before unshifting. + * stream.removeListener('readable', onReadable); + * if (buf.length) + * stream.unshift(buf); + * // Now the body of the message can be read from the stream. + * callback(null, header, stream); + * return; + * } + * // Still reading the header. + * header += str; + * } + * } + * } + * ``` + * + * Unlike {@link push}, `stream.unshift(chunk)` will not + * end the reading process by resetting the internal reading state of the stream. + * This can cause unexpected results if `readable.unshift()` is called during a + * read (i.e. from within a {@link _read} implementation on a + * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately, + * however it is best to simply avoid calling `readable.unshift()` while in the + * process of performing a read. + * @since v0.9.11 + * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must + * be a {string}, {Buffer}, {TypedArray}, {DataView} or `null`. For object mode streams, `chunk` may be any JavaScript value. + * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`. + */ + unshift(chunk: any, encoding?: BufferEncoding): void; + /** + * Prior to Node.js 0.10, streams did not implement the entire `node:stream` module API as it is currently defined. (See `Compatibility` for more + * information.) + * + * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the `readable.wrap()` method can be used to create a `Readable` + * stream that uses + * the old stream as its data source. + * + * It will rarely be necessary to use `readable.wrap()` but the method has been + * provided as a convenience for interacting with older Node.js applications and + * libraries. + * + * ```js + * import { OldReader } from './old-api-module.js'; + * import { Readable } from 'node:stream'; + * const oreader = new OldReader(); + * const myReader = new Readable().wrap(oreader); + * + * myReader.on('readable', () => { + * myReader.read(); // etc. + * }); + * ``` + * @since v0.9.4 + * @param stream An "old style" readable stream + */ + wrap(stream: NodeJS.ReadableStream): this; + push(chunk: any, encoding?: BufferEncoding): boolean; + /** + * ```js + * import { Readable } from 'node:stream'; + * + * async function* splitToWords(source) { + * for await (const chunk of source) { + * const words = String(chunk).split(' '); + * + * for (const word of words) { + * yield word; + * } + * } + * } + * + * const wordsStream = Readable.from(['text passed through', 'composed stream']).compose(splitToWords); + * const words = await wordsStream.toArray(); + * + * console.log(words); // prints ['text', 'passed', 'through', 'composed', 'stream'] + * ``` + * + * `readable.compose(s)` is equivalent to `stream.compose(readable, s)`. + * + * This method also allows for an `AbortSignal` to be provided, which will destroy + * the composed stream when aborted. + * + * See [`stream.compose(...streams)`](https://nodejs.org/docs/latest-v26.x/api/stream.html#streamcomposestreams) for more information. + * @since v19.1.0, v18.13.0 + * @returns a stream composed with the stream `stream`. + */ + compose( + stream: NodeJS.WritableStream | web.WritableStream | web.TransformStream | ((source: any) => void), + options?: Abortable, + ): Duplex; + /** + * The iterator created by this method gives users the option to cancel the destruction + * of the stream if the `for await...of` loop is exited by `return`, `break`, or `throw`, + * or if the iterator should destroy the stream if the stream emitted an error during iteration. + * @since v16.3.0 + */ + iterator(options?: ReadableIteratorOptions): NodeJS.AsyncIterator; + /** + * This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream. + * If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream. + * @since v17.4.0, v16.14.0 + * @param fn a function to map over every chunk in the stream. Async or not. + * @returns a stream mapped with the function *fn*. + */ + map(fn: (data: any, options?: Abortable) => any, options?: ReadableOperatorOptions): Readable; + /** + * This method allows filtering the stream. For each chunk in the stream the *fn* function will be called + * and if it returns a truthy value, the chunk will be passed to the result stream. + * If the *fn* function returns a promise - that promise will be `await`ed. + * @since v17.4.0, v16.14.0 + * @param fn a function to filter chunks from the stream. Async or not. + * @returns a stream filtered with the predicate *fn*. + */ + filter( + fn: (data: any, options?: Abortable) => boolean | Promise, + options?: ReadableOperatorOptions, + ): Readable; + /** + * This method allows iterating a stream. For each chunk in the stream the *fn* function will be called. + * If the *fn* function returns a promise - that promise will be `await`ed. + * + * This method is different from `for await...of` loops in that it can optionally process chunks concurrently. + * In addition, a `forEach` iteration can only be stopped by having passed a `signal` option + * and aborting the related AbortController while `for await...of` can be stopped with `break` or `return`. + * In either case the stream will be destroyed. + * + * This method is different from listening to the `'data'` event in that it uses the `readable` event + * in the underlying machinary and can limit the number of concurrent *fn* calls. + * @since v17.5.0 + * @param fn a function to call on each chunk of the stream. Async or not. + * @returns a promise for when the stream has finished. + */ + forEach( + fn: (data: any, options?: Abortable) => void | Promise, + options?: Pick, + ): Promise; + /** + * This method allows easily obtaining the contents of a stream. + * + * As this method reads the entire stream into memory, it negates the benefits of streams. It's intended + * for interoperability and convenience, not as the primary way to consume streams. + * @since v17.5.0 + * @returns a promise containing an array with the contents of the stream. + */ + toArray(options?: Abortable): Promise; + /** + * This method is similar to `Array.prototype.some` and calls *fn* on each chunk in the stream + * until the awaited return value is `true` (or any truthy value). Once an *fn* call on a chunk + * `await`ed return value is truthy, the stream is destroyed and the promise is fulfilled with `true`. + * If none of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `false`. + * @since v17.5.0 + * @param fn a function to call on each chunk of the stream. Async or not. + * @returns a promise evaluating to `true` if *fn* returned a truthy value for at least one of the chunks. + */ + some( + fn: (data: any, options?: Abortable) => boolean | Promise, + options?: Pick, + ): Promise; + /** + * This method is similar to `Array.prototype.find` and calls *fn* on each chunk in the stream + * to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return value is truthy, + * the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value. + * If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`. + * @since v17.5.0 + * @param fn a function to call on each chunk of the stream. Async or not. + * @returns a promise evaluating to the first chunk for which *fn* evaluated with a truthy value, + * or `undefined` if no element was found. + */ + find( + fn: (data: any, options?: Abortable) => data is T, + options?: Pick, + ): Promise; + find( + fn: (data: any, options?: Abortable) => boolean | Promise, + options?: Pick, + ): Promise; + /** + * This method is similar to `Array.prototype.every` and calls *fn* on each chunk in the stream + * to check if all awaited return values are truthy value for *fn*. Once an *fn* call on a chunk + * `await`ed return value is falsy, the stream is destroyed and the promise is fulfilled with `false`. + * If all of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `true`. + * @since v17.5.0 + * @param fn a function to call on each chunk of the stream. Async or not. + * @returns a promise evaluating to `true` if *fn* returned a truthy value for every one of the chunks. + */ + every( + fn: (data: any, options?: Abortable) => boolean | Promise, + options?: Pick, + ): Promise; + /** + * This method returns a new stream by applying the given callback to each chunk of the stream + * and then flattening the result. + * + * It is possible to return a stream or another iterable or async iterable from *fn* and the result streams + * will be merged (flattened) into the returned stream. + * @since v17.5.0 + * @param fn a function to map over every chunk in the stream. May be async. May be a stream or generator. + * @returns a stream flat-mapped with the function *fn*. + */ + flatMap( + fn: (data: any, options?: Abortable) => any, + options?: Pick, + ): Readable; + /** + * This method returns a new stream with the first *limit* chunks dropped from the start. + * @since v17.5.0 + * @param limit the number of chunks to drop from the readable. + * @returns a stream with *limit* chunks dropped from the start. + */ + drop(limit: number, options?: Abortable): Readable; + /** + * This method returns a new stream with the first *limit* chunks. + * @since v17.5.0 + * @param limit the number of chunks to take from the readable. + * @returns a stream with *limit* chunks taken. + */ + take(limit: number, options?: Abortable): Readable; + /** + * This method calls *fn* on each chunk of the stream in order, passing it the result from the calculation + * on the previous element. It returns a promise for the final value of the reduction. + * + * If no *initial* value is supplied the first chunk of the stream is used as the initial value. + * If the stream is empty, the promise is rejected with a `TypeError` with the `ERR_INVALID_ARGS` code property. + * + * The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter + * or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method. + * @since v17.5.0 + * @param fn a reducer function to call over every chunk in the stream. Async or not. + * @param initial the initial value to use in the reduction. + * @returns a promise for the final value of the reduction. + */ + reduce(fn: (previous: any, data: any, options?: Abortable) => T): Promise; + reduce( + fn: (previous: T, data: any, options?: Abortable) => T, + initial: T, + options?: Abortable, + ): Promise; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + /** + * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the readable + * stream will release any internal resources and subsequent calls to `push()` will be ignored. + * + * Once `destroy()` has been called any further calls will be a no-op and no + * further errors except from `_destroy()` may be emitted as `'error'`. + * + * Implementors should not override this method, but instead implement `readable._destroy()`. + * @since v8.0.0 + * @param error Error which will be passed as payload in `'error'` event + */ + destroy(error?: Error): this; + /** + * @returns `AsyncIterator` to fully consume the stream. + * @since v10.0.0 + */ + [Symbol.asyncIterator](): NodeJS.AsyncIterator; + /** + * When the `--experimental-stream-iter` flag is enabled, `Readable` streams + * implement the `Stream.toAsyncStreamable` protocol, enabling efficient + * consumption by the `stream/iter` API. + * + * This provides a batched async iterator that drains the stream's internal + * buffer into `Uint8Array[]` batches, amortizing the per-chunk Promise overhead + * of the standard `Symbol.asyncIterator` path. For byte-mode streams, chunks + * are yielded directly as `Buffer` instances (which are `Uint8Array` subclasses). + * For object-mode or encoded streams, each chunk is normalized to `Uint8Array` + * before batching. + * + * The returned iterator is tagged as a validated source, so `from()` + * passes it through without additional normalization. + * + * ```js + * import { Readable } from 'node:stream'; + * import { text, from } from 'node:stream/iter'; + * + * const readable = new Readable({ + * read() { this.push('hello'); this.push(null); }, + * }); + * + * // Readable is automatically consumed via toAsyncStreamable + * console.log(await text(from(readable))); // 'hello' + * ``` + * + * Without the `--experimental-stream-iter` flag, calling this method throws + * `ERR_STREAM_ITER_MISSING_FLAG`. + */ + [toAsyncStreamable](): ByteReadableStream; + /** + * Calls `readable.destroy()` with an `AbortError` and returns + * a promise that fulfills when the stream is finished. + * @since v20.4.0 + */ + [Symbol.asyncDispose](): Promise; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ReadableEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ReadableEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ReadableEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: ReadableEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ReadableEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ReadableEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ReadableEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: ReadableEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ReadableEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface WritableOptions extends StreamOptions { + decodeStrings?: boolean | undefined; + defaultEncoding?: BufferEncoding | undefined; + write?: + | (( + this: T, + chunk: any, + encoding: BufferEncoding, + callback: (error?: Error | null) => void, + ) => void) + | undefined; + writev?: + | (( + this: T, + chunks: { + chunk: any; + encoding: BufferEncoding; + }[], + callback: (error?: Error | null) => void, + ) => void) + | undefined; + final?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined; + } + interface WritableEventMap { + "close": []; + "drain": []; + "error": [err: Error]; + "finish": []; + "pipe": [src: Readable]; + "unpipe": [src: Readable]; + } + /** + * @since v0.9.4 + */ + class Writable extends Stream implements NodeJS.WritableStream { + constructor(options?: WritableOptions); + /** + * A utility method for creating a `Writable` from a web `WritableStream`. + * @since v17.0.0 + */ + static fromWeb( + writableStream: web.WritableStream, + options?: Pick, + ): Writable; + /** + * A utility method for creating a web `WritableStream` from a `Writable`. + * @since v17.0.0 + */ + static toWeb(streamWritable: NodeJS.WritableStream): web.WritableStream; + /** + * Is `true` if it is safe to call `writable.write()`, which means + * the stream has not been destroyed, errored, or ended. + * @since v11.4.0 + */ + writable: boolean; + /** + * Returns whether the stream was destroyed or errored before emitting `'finish'`. + * @since v18.0.0, v16.17.0 + */ + readonly writableAborted: boolean; + /** + * Is `true` after `writable.end()` has been called. This property + * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead. + * @since v12.9.0 + */ + readonly writableEnded: boolean; + /** + * Is set to `true` immediately before the `'finish'` event is emitted. + * @since v12.6.0 + */ + readonly writableFinished: boolean; + /** + * Return the value of `highWaterMark` passed when creating this `Writable`. + * @since v9.3.0 + */ + readonly writableHighWaterMark: number; + /** + * This property contains the number of bytes (or objects) in the queue + * ready to be written. The value provides introspection data regarding + * the status of the `highWaterMark`. + * @since v9.4.0 + */ + readonly writableLength: number; + /** + * Getter for the property `objectMode` of a given `Writable` stream. + * @since v12.3.0 + */ + readonly writableObjectMode: boolean; + /** + * Number of times `writable.uncork()` needs to be + * called in order to fully uncork the stream. + * @since v13.2.0, v12.16.0 + */ + readonly writableCorked: number; + /** + * Is `true` after `writable.destroy()` has been called. + * @since v8.0.0 + */ + destroyed: boolean; + /** + * Is `true` after `'close'` has been emitted. + * @since v18.0.0 + */ + readonly closed: boolean; + /** + * Returns error if the stream has been destroyed with an error. + * @since v18.0.0 + */ + readonly errored: Error | null; + /** + * Is `true` if the stream's buffer has been full and stream will emit `'drain'`. + * @since v15.2.0, v14.17.0 + */ + readonly writableNeedDrain: boolean; + _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; + _writev?( + chunks: { + chunk: any; + encoding: BufferEncoding; + }[], + callback: (error?: Error | null) => void, + ): void; + _construct?(callback: (error?: Error | null) => void): void; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + /** + * The `writable.write()` method writes some data to the stream, and calls the + * supplied `callback` once the data has been fully handled. If an error + * occurs, the `callback` will be called with the error as its + * first argument. The `callback` is called asynchronously and before `'error'` is + * emitted. + * + * The return value is `true` if the internal buffer is less than the `highWaterMark` configured when the stream was created after admitting `chunk`. + * If `false` is returned, further attempts to write data to the stream should + * stop until the `'drain'` event is emitted. + * + * While a stream is not draining, calls to `write()` will buffer `chunk`, and + * return false. Once all currently buffered chunks are drained (accepted for + * delivery by the operating system), the `'drain'` event will be emitted. + * Once `write()` returns false, do not write more chunks + * until the `'drain'` event is emitted. While calling `write()` on a stream that + * is not draining is allowed, Node.js will buffer all written chunks until + * maximum memory usage occurs, at which point it will abort unconditionally. + * Even before it aborts, high memory usage will cause poor garbage collector + * performance and high RSS (which is not typically released back to the system, + * even after the memory is no longer required). Since TCP sockets may never + * drain if the remote peer does not read the data, writing a socket that is + * not draining may lead to a remotely exploitable vulnerability. + * + * Writing data while the stream is not draining is particularly + * problematic for a `Transform`, because the `Transform` streams are paused + * by default until they are piped or a `'data'` or `'readable'` event handler + * is added. + * + * If the data to be written can be generated or fetched on demand, it is + * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is + * possible to respect backpressure and avoid memory issues using the `'drain'` event: + * + * ```js + * function write(data, cb) { + * if (!stream.write(data)) { + * stream.once('drain', cb); + * } else { + * process.nextTick(cb); + * } + * } + * + * // Wait for cb to be called before doing any other write. + * write('hello', () => { + * console.log('Write completed, do more writes now.'); + * }); + * ``` + * + * A `Writable` stream in object mode will always ignore the `encoding` argument. + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, + * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. + * @param callback Callback for when this chunk of data is flushed. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean; + /** + * Writes data to the stream, with an explicit encoding for string data. + * @see {@link Writable.write} for full details. + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, + * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. + * @param encoding The encoding, if `chunk` is a string. + * @param callback Callback for when this chunk of data is flushed. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean; + /** + * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream. + * @since v0.11.15 + * @param encoding The new default encoding + */ + setDefaultEncoding(encoding: BufferEncoding): this; + /** + * Calling the `writable.end()` method signals that no more data will be written + * to the `Writable`. The optional `chunk` and `encoding` arguments allow one + * final additional chunk of data to be written immediately before closing the + * stream. + * + * Calling the {@link write} method after calling {@link end} will raise an error. + * + * ```js + * // Write 'hello, ' and then end with 'world!'. + * import fs from 'node:fs'; + * const file = fs.createWriteStream('example.txt'); + * file.write('hello, '); + * file.end('world!'); + * // Writing more now is not allowed! + * ``` + * @since v0.9.4 + * @param cb Callback for when the stream is finished. + */ + end(cb?: () => void): this; + /** + * Signals that no more data will be written, with one final chunk of data. + * @see {@link Writable.end} for full details. + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, + * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. + * @param cb Callback for when the stream is finished. + */ + end(chunk: any, cb?: () => void): this; + /** + * Signals that no more data will be written, with one final chunk of data. + * @see {@link Writable.end} for full details. + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, + * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. + * @param encoding The encoding if `chunk` is a string + * @param cb Callback for when the stream is finished. + */ + end(chunk: any, encoding: BufferEncoding, cb?: () => void): this; + /** + * The `writable.cork()` method forces all written data to be buffered in memory. + * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called. + * + * The primary intent of `writable.cork()` is to accommodate a situation in which + * several small chunks are written to the stream in rapid succession. Instead of + * immediately forwarding them to the underlying destination, `writable.cork()` buffers all the chunks until `writable.uncork()` is called, which will pass them + * all to `writable._writev()`, if present. This prevents a head-of-line blocking + * situation where data is being buffered while waiting for the first small chunk + * to be processed. However, use of `writable.cork()` without implementing `writable._writev()` may have an adverse effect on throughput. + * + * See also: `writable.uncork()`, `writable._writev()`. + * @since v0.11.2 + */ + cork(): void; + /** + * The `writable.uncork()` method flushes all data buffered since {@link cork} was called. + * + * When using `writable.cork()` and `writable.uncork()` to manage the buffering + * of writes to a stream, defer calls to `writable.uncork()` using `process.nextTick()`. Doing so allows batching of all `writable.write()` calls that occur within a given Node.js event + * loop phase. + * + * ```js + * stream.cork(); + * stream.write('some '); + * stream.write('data '); + * process.nextTick(() => stream.uncork()); + * ``` + * + * If the `writable.cork()` method is called multiple times on a stream, the + * same number of calls to `writable.uncork()` must be called to flush the buffered + * data. + * + * ```js + * stream.cork(); + * stream.write('some '); + * stream.cork(); + * stream.write('data '); + * process.nextTick(() => { + * stream.uncork(); + * // The data will not be flushed until uncork() is called a second time. + * stream.uncork(); + * }); + * ``` + * + * See also: `writable.cork()`. + * @since v0.11.2 + */ + uncork(): void; + /** + * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the writable + * stream has ended and subsequent calls to `write()` or `end()` will result in + * an `ERR_STREAM_DESTROYED` error. + * This is a destructive and immediate way to destroy a stream. Previous calls to `write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error. + * Use `end()` instead of destroy if data should flush before close, or wait for + * the `'drain'` event before destroying the stream. + * + * Once `destroy()` has been called any further calls will be a no-op and no + * further errors except from `_destroy()` may be emitted as `'error'`. + * + * Implementors should not override this method, + * but instead implement `writable._destroy()`. + * @since v8.0.0 + * @param error Optional, an error to emit with `'error'` event. + */ + destroy(error?: Error): this; + /** + * Calls `writable.destroy()` with an `AbortError` and returns + * a promise that fulfills when the stream is finished. + * @since v22.4.0, v20.16.0 + */ + [Symbol.asyncDispose](): Promise; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: WritableEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: WritableEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: WritableEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: WritableEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: WritableEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: WritableEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: WritableEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: WritableEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: WritableEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: WritableEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: WritableEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface DuplexOptions extends ReadableOptions, WritableOptions { + allowHalfOpen?: boolean | undefined; + readableObjectMode?: boolean | undefined; + writableObjectMode?: boolean | undefined; + readableHighWaterMark?: number | undefined; + writableHighWaterMark?: number | undefined; + writableCorked?: number | undefined; + } + interface DuplexToWebOptions { + readableType?: web.ReadableStreamType | undefined; + } + interface DuplexEventMap extends ReadableEventMap, WritableEventMap {} + /** + * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces. + * + * Examples of `Duplex` streams include: + * + * * `TCP sockets` + * * `zlib streams` + * * `crypto streams` + * @since v0.9.4 + */ + class Duplex extends Stream implements NodeJS.ReadWriteStream { + constructor(options?: DuplexOptions); + /** + * A utility method for creating duplex streams. + * + * - `Stream` converts writable stream into writable `Duplex` and readable stream + * to `Duplex`. + * - `Blob` converts into readable `Duplex`. + * - `string` converts into readable `Duplex`. + * - `ArrayBuffer` converts into readable `Duplex`. + * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`. + * - `AsyncGeneratorFunction` converts into a readable/writable transform + * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield + * `null`. + * - `AsyncFunction` converts into a writable `Duplex`. Must return + * either `null` or `undefined` + * - `Object ({ writable, readable })` converts `readable` and + * `writable` into `Stream` and then combines them into `Duplex` where the + * `Duplex` will write to the `writable` and read from the `readable`. + * - `Promise` converts into readable `Duplex`. Value `null` is ignored. + * + * @since v16.8.0 + */ + static from( + src: + | NodeJS.ReadableStream + | NodeJS.WritableStream + | Blob + | string + | Iterable + | AsyncIterable + | ((source: AsyncIterable) => AsyncIterable) + | ((source: AsyncIterable) => Promise) + | Promise + | web.ReadableWritablePair + | web.ReadableStream + | web.WritableStream, + ): Duplex; + /** + * A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`. + * @since v17.0.0 + */ + static toWeb(streamDuplex: NodeJS.ReadWriteStream, options?: DuplexToWebOptions): web.ReadableWritablePair; + /** + * A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`. + * @since v17.0.0 + */ + static fromWeb( + duplexStream: web.ReadableWritablePair, + options?: Pick< + DuplexOptions, + "allowHalfOpen" | "decodeStrings" | "encoding" | "highWaterMark" | "objectMode" | "signal" + >, + ): Duplex; + /** + * If `false` then the stream will automatically end the writable side when the + * readable side ends. Set initially by the `allowHalfOpen` constructor option, + * which defaults to `true`. + * + * This can be changed manually to change the half-open behavior of an existing + * `Duplex` stream instance, but must be changed before the `'end'` event is emitted. + * @since v0.9.4 + */ + allowHalfOpen: boolean; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: DuplexEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: DuplexEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: DuplexEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: DuplexEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: DuplexEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: DuplexEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: DuplexEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: DuplexEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface Duplex extends Readable, Writable {} + /** + * The utility function `duplexPair` returns an Array with two items, + * each being a `Duplex` stream connected to the other side: + * + * ```js + * const [ sideA, sideB ] = duplexPair(); + * ``` + * + * Whatever is written to one stream is made readable on the other. It provides + * behavior analogous to a network connection, where the data written by the client + * becomes readable by the server, and vice-versa. + * + * The Duplex streams are symmetrical; one or the other may be used without any + * difference in behavior. + * @param options A value to pass to both {@link Duplex} constructors, + * to set options such as buffering. + * @since v22.6.0 + */ + function duplexPair(options?: DuplexOptions): [Duplex, Duplex]; + type TransformCallback = (error?: Error | null, data?: any) => void; + interface TransformOptions extends DuplexOptions { + transform?: + | ((this: T, chunk: any, encoding: BufferEncoding, callback: TransformCallback) => void) + | undefined; + flush?: ((this: T, callback: TransformCallback) => void) | undefined; + } + /** + * Transform streams are `Duplex` streams where the output is in some way + * related to the input. Like all `Duplex` streams, `Transform` streams + * implement both the `Readable` and `Writable` interfaces. + * + * Examples of `Transform` streams include: + * + * * `zlib streams` + * * `crypto streams` + * @since v0.9.4 + */ + class Transform extends Duplex { + constructor(options?: TransformOptions); + _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; + _flush(callback: TransformCallback): void; + } + /** + * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is + * primarily for examples and testing, but there are some use cases where `stream.PassThrough` is useful as a building block for novel sorts of streams. + */ + class PassThrough extends Transform {} + /** + * A stream to attach a signal to. + * + * Attaches an AbortSignal to a readable or writeable stream. This lets code + * control stream destruction using an `AbortController`. + * + * Calling `abort` on the `AbortController` corresponding to the passed `AbortSignal` will behave the same way as calling `.destroy(new AbortError())` on the + * stream, and `controller.error(new AbortError())` for webstreams. + * + * ```js + * import fs from 'node:fs'; + * + * const controller = new AbortController(); + * const read = addAbortSignal( + * controller.signal, + * fs.createReadStream(('object.json')), + * ); + * // Later, abort the operation closing the stream + * controller.abort(); + * ``` + * + * Or using an `AbortSignal` with a readable stream as an async iterable: + * + * ```js + * const controller = new AbortController(); + * setTimeout(() => controller.abort(), 10_000); // set a timeout + * const stream = addAbortSignal( + * controller.signal, + * fs.createReadStream(('object.json')), + * ); + * (async () => { + * try { + * for await (const chunk of stream) { + * await process(chunk); + * } + * } catch (e) { + * if (e.name === 'AbortError') { + * // The operation was cancelled + * } else { + * throw e; + * } + * } + * })(); + * ``` + * + * Or using an `AbortSignal` with a ReadableStream: + * + * ```js + * const controller = new AbortController(); + * const rs = new ReadableStream({ + * start(controller) { + * controller.enqueue('hello'); + * controller.enqueue('world'); + * controller.close(); + * }, + * }); + * + * addAbortSignal(controller.signal, rs); + * + * finished(rs, (err) => { + * if (err) { + * if (err.name === 'AbortError') { + * // The operation was cancelled + * } + * } + * }); + * + * const reader = rs.getReader(); + * + * reader.read().then(({ value, done }) => { + * console.log(value); // hello + * console.log(done); // false + * controller.abort(); + * }); + * ``` + * @since v15.4.0 + * @param signal A signal representing possible cancellation + * @param stream A stream to attach a signal to. + */ + function addAbortSignal< + T extends NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, + >(signal: AbortSignal, stream: T): T; + /** + * Returns the default highWaterMark used by streams. + * Defaults to `65536` (64 KiB), or `16` for `objectMode`. + * @since v19.9.0 + */ + function getDefaultHighWaterMark(objectMode: boolean): number; + /** + * Sets the default highWaterMark used by streams. + * @since v19.9.0 + * @param value highWaterMark value + */ + function setDefaultHighWaterMark(objectMode: boolean, value: number): void; + interface FinishedOptions extends Abortable { + error?: boolean | undefined; + readable?: boolean | undefined; + writable?: boolean | undefined; + } + /** + * A readable and/or writable stream/webstream. + * + * A function to get notified when a stream is no longer readable, writable + * or has experienced an error or a premature close event. + * + * ```js + * import { finished } from 'node:stream'; + * import fs from 'node:fs'; + * + * const rs = fs.createReadStream('archive.tar'); + * + * finished(rs, (err) => { + * if (err) { + * console.error('Stream failed.', err); + * } else { + * console.log('Stream is done reading.'); + * } + * }); + * + * rs.resume(); // Drain the stream. + * ``` + * + * Especially useful in error handling scenarios where a stream is destroyed + * prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`. + * + * The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v26.x/api/stream.html#streamfinishedstream-options). + * + * `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been + * invoked. The reason for this is so that unexpected `'error'` events (due to + * incorrect stream implementations) do not cause unexpected crashes. + * If this is unwanted behavior then the returned cleanup function needs to be + * invoked in the callback: + * + * ```js + * const cleanup = finished(rs, (err) => { + * cleanup(); + * // ... + * }); + * ``` + * @since v10.0.0 + * @param stream A readable and/or writable stream. + * @param callback A callback function that takes an optional error argument. + * @returns A cleanup function which removes all registered listeners. + */ + function finished( + stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, + options: FinishedOptions, + callback: (err?: NodeJS.ErrnoException | null) => void, + ): () => void; + function finished( + stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, + callback: (err?: NodeJS.ErrnoException | null) => void, + ): () => void; + namespace finished { + import __promisify__ = promises.finished; + export { __promisify__ }; + } + type PipelineSourceFunction = (options?: Abortable) => Iterable | AsyncIterable; + type PipelineSource = + | NodeJS.ReadableStream + | web.ReadableStream + | web.TransformStream + | Iterable + | AsyncIterable + | PipelineSourceFunction; + type PipelineSourceArgument = (T extends (...args: any[]) => infer R ? R : T) extends infer S + ? S extends web.TransformStream ? web.ReadableStream : S + : never; + type PipelineTransformGenerator, O> = ( + source: PipelineSourceArgument, + options?: Abortable, + ) => AsyncIterable; + type PipelineTransformStreams = + | NodeJS.ReadWriteStream + | web.TransformStream; + type PipelineTransform, O> = S extends + PipelineSource | PipelineTransformStreams | ((...args: any[]) => infer I) + ? PipelineTransformStreams | PipelineTransformGenerator + : never; + type PipelineTransformSource = PipelineSource | PipelineTransform; + type PipelineDestinationFunction, R> = ( + source: PipelineSourceArgument, + options?: Abortable, + ) => R; + type PipelineDestination, R> = S extends + PipelineSource | PipelineTransform ? + | NodeJS.WritableStream + | web.WritableStream + | web.TransformStream + | PipelineDestinationFunction + : never; + type PipelineCallback> = ( + err: NodeJS.ErrnoException | null, + value: S extends (...args: any[]) => PromiseLike ? R : undefined, + ) => void; + type PipelineResult> = S extends NodeJS.WritableStream ? S : Duplex; + /** + * A module method to pipe between streams and generators forwarding errors and + * properly cleaning up and provide a callback when the pipeline is complete. + * + * ```js + * import { pipeline } from 'node:stream'; + * import fs from 'node:fs'; + * import zlib from 'node:zlib'; + * + * // Use the pipeline API to easily pipe a series of streams + * // together and get notified when the pipeline is fully done. + * + * // A pipeline to gzip a potentially huge tar file efficiently: + * + * pipeline( + * fs.createReadStream('archive.tar'), + * zlib.createGzip(), + * fs.createWriteStream('archive.tar.gz'), + * (err) => { + * if (err) { + * console.error('Pipeline failed.', err); + * } else { + * console.log('Pipeline succeeded.'); + * } + * }, + * ); + * ``` + * + * The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v26.x/api/stream.html#streampipelinesource-transforms-destination-options). + * + * `stream.pipeline()` will call `stream.destroy(err)` on all streams except: + * + * * `Readable` streams which have emitted `'end'` or `'close'`. + * * `Writable` streams which have emitted `'finish'` or `'close'`. + * + * `stream.pipeline()` leaves dangling event listeners on the streams + * after the `callback` has been invoked. In the case of reuse of streams after + * failure, this can cause event listener leaks and swallowed errors. If the last + * stream is readable, dangling event listeners will be removed so that the last + * stream can be consumed later. + * + * `stream.pipeline()` closes all the streams when an error is raised. + * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior + * once it would destroy the socket without sending the expected response. + * See the example below: + * + * ```js + * import fs from 'node:fs'; + * import http from 'node:http'; + * import { pipeline } from 'node:stream'; + * + * const server = http.createServer((req, res) => { + * const fileStream = fs.createReadStream('./fileNotExist.txt'); + * pipeline(fileStream, res, (err) => { + * if (err) { + * console.log(err); // No such file + * // this message can't be sent once `pipeline` already destroyed the socket + * return res.end('error!!!'); + * } + * }); + * }); + * ``` + * @since v10.0.0 + * @param callback Called when the pipeline is fully done. + */ + function pipeline, D extends PipelineDestination>( + source: S, + destination: D, + callback: PipelineCallback, + ): PipelineResult; + function pipeline< + S extends PipelineSource, + T extends PipelineTransform, + D extends PipelineDestination, + >( + source: S, + transform: T, + destination: D, + callback: PipelineCallback, + ): PipelineResult; + function pipeline< + S extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + D extends PipelineDestination, + >( + source: S, + transform1: T1, + transform2: T2, + destination: D, + callback: PipelineCallback, + ): PipelineResult; + function pipeline< + S extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + D extends PipelineDestination, + >( + source: S, + transform1: T1, + transform2: T2, + transform3: T3, + destination: D, + callback: PipelineCallback, + ): PipelineResult; + function pipeline< + S extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + D extends PipelineDestination, + >( + source: S, + transform1: T1, + transform2: T2, + transform3: T3, + transform4: T4, + destination: D, + callback: PipelineCallback, + ): PipelineResult; + function pipeline( + streams: ReadonlyArray | PipelineTransform | PipelineDestination>, + callback: (err: NodeJS.ErrnoException | null) => void, + ): NodeJS.WritableStream; + function pipeline( + ...streams: [ + ...[PipelineSource, ...PipelineTransform[], PipelineDestination], + callback: ((err: NodeJS.ErrnoException | null) => void), + ] + ): NodeJS.WritableStream; + namespace pipeline { + import __promisify__ = promises.pipeline; + export { __promisify__ }; + } + type ComposeSource = + | NodeJS.ReadableStream + | web.ReadableStream + | Iterable + | AsyncIterable + | (() => AsyncIterable); + type ComposeTransformStreams = NodeJS.ReadWriteStream | web.TransformStream; + type ComposeTransformGenerator = (source: AsyncIterable) => AsyncIterable; + type ComposeTransform, O> = S extends + ComposeSource | ComposeTransformStreams | ComposeTransformGenerator + ? ComposeTransformStreams | ComposeTransformGenerator + : never; + type ComposeTransformSource = ComposeSource | ComposeTransform; + type ComposeDestination> = S extends ComposeTransformSource ? + | NodeJS.WritableStream + | web.WritableStream + | web.TransformStream + | ((source: AsyncIterable) => void) + : never; + /** + * Combines two or more streams into a `Duplex` stream that writes to the + * first stream and reads from the last. Each provided stream is piped into + * the next, using `stream.pipeline`. If any of the streams error then all + * are destroyed, including the outer `Duplex` stream. + * + * Because `stream.compose` returns a new stream that in turn can (and + * should) be piped into other streams, it enables composition. In contrast, + * when passing streams to `stream.pipeline`, typically the first stream is + * a readable stream and the last a writable stream, forming a closed + * circuit. + * + * If passed a `Function` it must be a factory method taking a `source` + * `Iterable`. + * + * ```js + * import { compose, Transform } from 'node:stream'; + * + * const removeSpaces = new Transform({ + * transform(chunk, encoding, callback) { + * callback(null, String(chunk).replace(' ', '')); + * }, + * }); + * + * async function* toUpper(source) { + * for await (const chunk of source) { + * yield String(chunk).toUpperCase(); + * } + * } + * + * let res = ''; + * for await (const buf of compose(removeSpaces, toUpper).end('hello world')) { + * res += buf; + * } + * + * console.log(res); // prints 'HELLOWORLD' + * ``` + * + * `stream.compose` can be used to convert async iterables, generators and + * functions into streams. + * + * * `AsyncIterable` converts into a readable `Duplex`. Cannot yield + * `null`. + * * `AsyncGeneratorFunction` converts into a readable/writable transform `Duplex`. + * Must take a source `AsyncIterable` as first parameter. Cannot yield + * `null`. + * * `AsyncFunction` converts into a writable `Duplex`. Must return + * either `null` or `undefined`. + * + * ```js + * import { compose } from 'node:stream'; + * import { finished } from 'node:stream/promises'; + * + * // Convert AsyncIterable into readable Duplex. + * const s1 = compose(async function*() { + * yield 'Hello'; + * yield 'World'; + * }()); + * + * // Convert AsyncGenerator into transform Duplex. + * const s2 = compose(async function*(source) { + * for await (const chunk of source) { + * yield String(chunk).toUpperCase(); + * } + * }); + * + * let res = ''; + * + * // Convert AsyncFunction into writable Duplex. + * const s3 = compose(async function(source) { + * for await (const chunk of source) { + * res += chunk; + * } + * }); + * + * await finished(compose(s1, s2, s3)); + * + * console.log(res); // prints 'HELLOWORLD' + * ``` + * + * For convenience, the `readable.compose(stream)` method is available on + * `Readable` and `Duplex` streams as a wrapper for this function. + * @since v16.9.0 + * @experimental + */ + /* eslint-disable @definitelytyped/no-unnecessary-generics */ + function compose(stream: ComposeSource | ComposeDestination): Duplex; + function compose< + S extends ComposeSource | ComposeTransform, + D extends ComposeTransform | ComposeDestination, + >( + source: S, + destination: D, + ): Duplex; + function compose< + S extends ComposeSource | ComposeTransform, + T extends ComposeTransform, + D extends ComposeTransform | ComposeDestination, + >(source: S, transform: T, destination: D): Duplex; + function compose< + S extends ComposeSource | ComposeTransform, + T1 extends ComposeTransform, + T2 extends ComposeTransform, + D extends ComposeTransform | ComposeDestination, + >(source: S, transform1: T1, transform2: T2, destination: D): Duplex; + function compose< + S extends ComposeSource | ComposeTransform, + T1 extends ComposeTransform, + T2 extends ComposeTransform, + T3 extends ComposeTransform, + D extends ComposeTransform | ComposeDestination, + >(source: S, transform1: T1, transform2: T2, transform3: T3, destination: D): Duplex; + function compose< + S extends ComposeSource | ComposeTransform, + T1 extends ComposeTransform, + T2 extends ComposeTransform, + T3 extends ComposeTransform, + T4 extends ComposeTransform, + D extends ComposeTransform | ComposeDestination, + >(source: S, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: D): Duplex; + function compose( + ...streams: [ + ComposeSource, + ...ComposeTransform[], + ComposeDestination, + ] + ): Duplex; + /* eslint-enable @definitelytyped/no-unnecessary-generics */ + /** + * Returns whether the stream has encountered an error. + * @since v17.3.0, v16.14.0 + */ + function isErrored( + stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, + ): boolean; + /** + * Returns whether the stream is readable. + * @since v17.4.0, v16.14.0 + * @returns Only returns `null` if `stream` is not a valid `Readable`, `Duplex` or `ReadableStream`. + */ + function isReadable(stream: NodeJS.ReadableStream | web.ReadableStream): boolean | null; + /** + * Returns whether the stream is writable. + * @since v20.0.0 + * @returns Only returns `null` if `stream` is not a valid `Writable`, `Duplex` or `WritableStream`. + */ + function isWritable(stream: NodeJS.WritableStream | web.WritableStream): boolean | null; + } + global { + namespace NodeJS { + // These interfaces are vestigial, and correspond roughly to the "streams2" interfaces + // from early versions of Node.js, but they are still used widely across the ecosystem. + // Accordingly, they are commonly used as "in-types" for @types/node APIs, so that + // eg. streams returned from older libraries will still be considered valid input to + // functions which accept stream arguments. + // It's not possible to change or remove these without astronomical levels of breakage. + interface ReadableStream extends EventEmitter { + readable: boolean; + read(size?: number): string | Buffer; + setEncoding(encoding: BufferEncoding): this; + pause(): this; + resume(): this; + isPaused(): boolean; + pipe(destination: T, options?: { end?: boolean | undefined }): T; + unpipe(destination?: WritableStream): this; + unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; + wrap(oldStream: ReadableStream): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + interface WritableStream extends EventEmitter { + writable: boolean; + write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; + write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; + end(cb?: () => void): this; + end(data: string | Uint8Array, cb?: () => void): this; + end(str: string, encoding?: BufferEncoding, cb?: () => void): this; + } + interface ReadWriteStream extends ReadableStream, WritableStream {} + } + } + export = Stream; +} +declare module "stream" { + import stream = require("node:stream"); + export = stream; +} diff --git a/node_modules/@types/node/stream/consumers.d.ts b/node_modules/@types/node/stream/consumers.d.ts new file mode 100644 index 0000000..27a474c --- /dev/null +++ b/node_modules/@types/node/stream/consumers.d.ts @@ -0,0 +1,114 @@ +declare module "node:stream/consumers" { + import { Blob, NonSharedBuffer } from "node:buffer"; + import { ReadableStream } from "node:stream/web"; + /** + * ```js + * import { arrayBuffer } from 'node:stream/consumers'; + * import { Readable } from 'node:stream'; + * import { TextEncoder } from 'node:util'; + * + * const encoder = new TextEncoder(); + * const dataArray = encoder.encode('hello world from consumers!'); + * + * const readable = Readable.from(dataArray); + * const data = await arrayBuffer(readable); + * console.log(`from readable: ${data.byteLength}`); + * // Prints: from readable: 76 + * ``` + * @since v16.7.0 + * @returns Fulfills with an `ArrayBuffer` containing the full contents of the stream. + */ + function arrayBuffer(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; + /** + * ```js + * import { blob } from 'node:stream/consumers'; + * + * const dataBlob = new Blob(['hello world from consumers!']); + * + * const readable = dataBlob.stream(); + * const data = await blob(readable); + * console.log(`from readable: ${data.size}`); + * // Prints: from readable: 27 + * ``` + * @since v16.7.0 + * @returns Fulfills with a `Blob` containing the full contents of the stream. + */ + function blob(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; + /** + * ```js + * import { buffer } from 'node:stream/consumers'; + * import { Readable } from 'node:stream'; + * import { Buffer } from 'node:buffer'; + * + * const dataBuffer = Buffer.from('hello world from consumers!'); + * + * const readable = Readable.from(dataBuffer); + * const data = await buffer(readable); + * console.log(`from readable: ${data.length}`); + * // Prints: from readable: 27 + * ``` + * @since v16.7.0 + * @returns Fulfills with a `Buffer` containing the full contents of the stream. + */ + function buffer(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; + /** + * ```js + * import { bytes } from 'node:stream/consumers'; + * import { Readable } from 'node:stream'; + * import { Buffer } from 'node:buffer'; + * + * const dataBuffer = Buffer.from('hello world from consumers!'); + * + * const readable = Readable.from(dataBuffer); + * const data = await bytes(readable); + * console.log(`from readable: ${data.length}`); + * // Prints: from readable: 27 + * ``` + * @since v25.6.0 + * @returns Fulfills with a `Uint8Array` containing the full contents of the stream. + */ + function bytes( + stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable, + ): Promise; + /** + * ```js + * import { json } from 'node:stream/consumers'; + * import { Readable } from 'node:stream'; + * + * const items = Array.from( + * { + * length: 100, + * }, + * () => ({ + * message: 'hello world from consumers!', + * }), + * ); + * + * const readable = Readable.from(JSON.stringify(items)); + * const data = await json(readable); + * console.log(`from readable: ${data.length}`); + * // Prints: from readable: 100 + * ``` + * @since v16.7.0 + * @returns Fulfills with the contents of the stream parsed as a + * UTF-8 encoded string that is then passed through `JSON.parse()`. + */ + function json(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; + /** + * ```js + * import { text } from 'node:stream/consumers'; + * import { Readable } from 'node:stream'; + * + * const readable = Readable.from('Hello world from consumers!'); + * const data = await text(readable); + * console.log(`from readable: ${data.length}`); + * // Prints: from readable: 27 + * ``` + * @since v16.7.0 + * @returns Fulfills with the contents of the stream parsed as a UTF-8 encoded string. + */ + function text(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; +} +declare module "stream/consumers" { + export * from "node:stream/consumers"; +} diff --git a/node_modules/@types/node/stream/iter.d.ts b/node_modules/@types/node/stream/iter.d.ts new file mode 100644 index 0000000..f42fb52 --- /dev/null +++ b/node_modules/@types/node/stream/iter.d.ts @@ -0,0 +1,449 @@ +declare module "node:stream/iter" { + import { Abortable } from "node:events"; + import { Readable, Writable } from "node:stream"; + // Symbols and custom typedefs + const broadcastProtocol: unique symbol; + const drainableProtocol: unique symbol; + const shareProtocol: unique symbol; + const shareSyncProtocol: unique symbol; + const toAsyncStreamable: unique symbol; + const toStreamable: unique symbol; + type Source = + | string + | ArrayBufferLike + | ArrayBufferView + | Iterable + | AsyncIterable + | Streamable + | AsyncStreamable; + type SyncSource = string | ArrayBufferLike | ArrayBufferView | Iterable | Streamable; + type Transform = StatelessTransformFn | StatefulTransform; + type SyncTransform = SyncStatelessTransformFn | SyncStatefulTransform; + type TransformResult = + | string + | ArrayBufferLike + | ArrayBufferView + | Iterable + | AsyncIterable; + type SyncTransformResult = string | ArrayBufferLike | ArrayBufferView | Iterable; + interface AsyncStreamable { + [toAsyncStreamable](): Source; + } + interface Broadcastable { + [broadcastProtocol](options: BroadcastOptions): Broadcast; + } + interface Drainable { + [drainableProtocol](): Promise | null; + } + interface Shareable { + [shareProtocol](options: ShareOptions): Share; + } + interface Streamable { + [toStreamable](): SyncSource; + } + interface SyncShareable { + [shareSyncProtocol](options: ShareSyncOptions): SyncShare; + } + // IDL dictionaries, enums, typedefs + type BackpressurePolicy = "strict" | "unbounded" | "drop-oldest" | "drop-newest"; + type ByteReadableStream = AsyncIterable; + type SyncByteReadableStream = Iterable; + interface WriteOptions { + signal?: AbortSignal; + } + interface PushStreamOptions { + budget?: number; + backpressure?: BackpressurePolicy; + signal?: AbortSignal; + } + interface PullOptions { + signal?: AbortSignal; + } + interface PipeToOptions { + signal?: AbortSignal; + preventClose?: boolean; + preventFail?: boolean; + } + interface PipeToSyncOptions { + preventClose?: boolean; + preventFail?: boolean; + } + interface ConsumeOptions { + signal?: AbortSignal; + limit?: number; + } + interface ConsumeSyncOptions { + limit?: number; + } + interface TextConsumeOptions extends ConsumeOptions { + encoding?: string; + } + interface TextConsumeSyncOptions extends ConsumeSyncOptions { + encoding?: string; + } + interface MergeOptions { + signal?: AbortSignal; + } + interface BroadcastOptions { + budget?: number; + backpressure?: BackpressurePolicy; + signal?: AbortSignal; + } + interface ShareOptions { + budget?: number; + backpressure?: BackpressurePolicy; + signal?: AbortSignal; + } + interface ShareSyncOptions { + budget?: number; + backpressure?: BackpressurePolicy; + } + interface DuplexDirectionOptions { + budget?: number; + backpressure?: BackpressurePolicy; + } + interface DuplexOptions { + highWaterMark?: number; + backpressure?: BackpressurePolicy; + a?: DuplexDirectionOptions; + b?: DuplexDirectionOptions; + signal?: AbortSignal; + } + interface TransformCallbackOptions { + signal: AbortSignal; + } + interface StatelessTransformFn { + ( + chunks: Uint8Array[] | null, + options: TransformCallbackOptions, + ): Promise | TransformResult | null; + } + interface SyncStatelessTransformFn { + (chunks: Uint8Array[] | null): SyncTransformResult | null; + } + interface StatefulTransform { + transform( + source: AsyncIterable, + options: TransformCallbackOptions, + ): AsyncIterable; + } + interface SyncStatefulTransform { + transform(source: Iterable): Iterable; + } + // IDL interfaces + interface PushWriter extends Writer, Drainable {} + interface PushStreamResult { + writer: PushWriter; + readable: ByteReadableStream; + } + interface BroadcastWriter extends Writer, Drainable {} + interface BroadcastResult { + writer: BroadcastWriter; + broadcast: Broadcast; + } + interface Writer extends Disposable, AsyncDisposable { + readonly canWrite: boolean | null; + write(chunk: Uint8Array | string, options?: WriteOptions): Promise; + writev(chunks: Array, options?: WriteOptions): Promise; + writeSync(chunk: Uint8Array | string): boolean; + writevSync(chunks: Array): boolean; + end(options?: WriteOptions): Promise; + endSync(): number; + fail(reason?: any): void; + } + interface PartialWriter extends Partial { + write(chunk: Uint8Array | string, options?: WriteOptions): Promise; + } + interface SyncWriter extends Disposable { + readonly canWrite: boolean | null; + writeSync(chunk: Uint8Array | string): number; + writevSync(chunks: Array): number; + endSync(): number; + fail(reason?: any): void; + } + interface PartialSyncWriter extends Partial { + writeSync(chunk: Uint8Array | string): number; + } + interface Broadcast extends Disposable { + readonly consumerCount: number; + push(...args: any[]): ByteReadableStream; + cancel(reason?: any): void; + } + interface Share extends Disposable { + readonly consumerCount: number; + pull(...args: any[]): ByteReadableStream; + cancel(reason?: any): void; + } + interface SyncShare extends Disposable { + readonly consumerCount: number; + pull(...args: any): SyncByteReadableStream; + cancel(reason?: any): void; + } + interface DuplexChannel extends AsyncDisposable { + readonly writer: Writer; + readonly readable: ByteReadableStream; + close(): Promise; + } + // Push stream creation + function push(...transforms: Transform[]): PushStreamResult; + function push(...args: [...transforms: Transform[], options: PushStreamOptions]): PushStreamResult; + // Stream factories + function from(input: Source): ByteReadableStream; + function fromSync(input: SyncSource): SyncByteReadableStream; + // Pull pipelines + function pull(source: Source, ...transforms: Transform[]): ByteReadableStream; + function pull( + source: Source, + ...args: [...transforms: Transform[], options: PullOptions] + ): ByteReadableStream; + function pullSync(source: SyncSource, ...transforms: SyncTransform[]): SyncByteReadableStream; + // Pipe operations + function pipeTo(source: Source, writer: PartialWriter, options?: PipeToOptions): Promise; + function pipeTo(source: Source, ...args: [...transforms: Transform[], writer: PartialWriter]): Promise; + function pipeTo( + source: Source, + ...args: [...transforms: Transform[], writer: PartialWriter, options: PipeToOptions] + ): Promise; + function pipeToSync(source: SyncSource, writer: PartialSyncWriter, options?: PipeToSyncOptions): number; + function pipeToSync( + source: SyncSource, + ...args: [...transforms: SyncTransform[], writer: PartialSyncWriter] + ): number; + function pipeToSync( + source: SyncSource, + ...args: [...transforms: SyncTransform[], writer: PartialSyncWriter, options: PipeToSyncOptions] + ): number; + // Consumers + function bytes(source: Source, options?: ConsumeOptions): Promise; + function bytesSync(source: SyncSource, options?: ConsumeSyncOptions): Uint8Array; + function text(source: Source, options?: TextConsumeOptions): Promise; + function textSync(source: SyncSource, options?: TextConsumeSyncOptions): string; + function arrayBuffer(source: Source, options?: ConsumeOptions): Promise; + function arrayBufferSync(source: SyncSource, options?: ConsumeSyncOptions): ArrayBuffer; + function array(source: Source, options?: ConsumeOptions): Promise; + function arraySync(source: SyncSource, options?: ConsumeSyncOptions): Uint8Array[]; + // Utilities + function tap(callback: StatelessTransformFn): StatelessTransformFn; + function tapSync(callback: SyncStatelessTransformFn): SyncStatelessTransformFn; + function merge(...sources: Source[]): ByteReadableStream; + function merge(...args: [...sources: Source[], options: MergeOptions]): ByteReadableStream; + function ondrain(drainable: any): Promise | null; + // Multi-consumer + function broadcast(options?: BroadcastOptions): BroadcastResult; + function share(source: Source, options?: ShareOptions): Share; + function shareSync(source: SyncSource, options?: ShareSyncOptions): SyncShare; + // Duplex + function duplex(options?: DuplexOptions): [DuplexChannel, DuplexChannel]; + // Node.js-specific extensions + namespace Broadcast { + /** + * Create a `Broadcast` from an existing source. The source is consumed + * automatically and pushed to all subscribers. + * @since v25.9.0 + * @param options Same as `broadcast()`. + */ + function from( + input: ByteReadableStream | SyncByteReadableStream | Broadcastable, + options?: BroadcastOptions, + ): BroadcastResult; + } + namespace Share { + /** + * Create a `Share` from an existing source. + * @since v25.9.0 + * @param options Same as `share()`. + */ + function from(input: ByteReadableStream | SyncByteReadableStream | Shareable, options?: ShareOptions): Share; + } + namespace SyncShare { + /** + * @since v25.9.0 + */ + function from(input: SyncByteReadableStream | SyncShareable, options?: ShareSyncOptions): SyncShare; + } + /** + * Converts a classic Readable stream (or duck-typed equivalent) into a + * stream/iter async iterable source that can be passed to `from()`, + * `pull()`, `text()`, etc. + * + * If the object implements the `toAsyncStreamable` protocol (as + * `stream.Readable` does), that protocol is used. Otherwise, the function + * duck-types on `read()`, `on()`, and `off()` (EventEmitter) and wraps the + * stream with a batched async iterator. + * + * The result is cached per instance -- calling `fromReadable()` twice with the + * same stream returns the same iterable. + * + * For object-mode or encoded Readable streams, chunks are automatically + * normalized to `Uint8Array`. + * + * ```js + * import { Readable } from 'node:stream'; + * import { fromReadable, text } from 'node:stream/iter'; + * + * const readable = new Readable({ + * read() { this.push('hello world'); this.push(null); }, + * }); + * + * const result = await text(fromReadable(readable)); + * console.log(result); // 'hello world' + * ``` + * @since v26.1.0 + * @experimental + * @param readable A classic Readable stream or any object + * with `read()`, `on()` and `off()` methods. + * @returns A stream/iter async iterable source. + */ + function fromReadable(readable: NodeJS.ReadableStream): ByteReadableStream; + interface FromWritableOptions { + backpressure?: BackpressurePolicy | undefined; + } + /** + * Creates a stream/iter Writer adapter from a classic Writable stream (or + * duck-typed equivalent). The adapter can be passed to `pipeTo()` as a + * destination. + * + * Since all writes on a classic Writable are fundamentally asynchronous, + * the synchronous Writer methods (`writeSync`, `writevSync`, `endSync`) always + * return `false` or `-1`, deferring to the async path. The per-write + * `options.signal` parameter from the Writer interface is also ignored. + * + * The result is cached per instance and backpressure policy -- calling + * `fromWritable()` twice with the same stream and `backpressure` option returns + * the same Writer. + * + * For duck-typed streams that do not expose `writableHighWaterMark`, + * `writableLength`, or similar properties, sensible defaults are used. + * Object-mode writables (if detectable) are rejected since the Writer + * interface is bytes-only. + * + * ```js + * import { Writable } from 'node:stream'; + * import { from, fromWritable, pipeTo } from 'node:stream/iter'; + * + * const writable = new Writable({ + * write(chunk, encoding, cb) { console.log(chunk.toString()); cb(); }, + * }); + * + * await pipeTo(from('hello world'), + * fromWritable(writable, { backpressure: 'unbounded' })); + * ``` + * @since v26.1.0 + * @experimental + * @param writable A classic Writable stream or any object + * with `write()` and `on()` methods. + * @returns A stream/iter Writer adapter. + */ + function fromWritable(writable: NodeJS.WritableStream, options?: FromWritableOptions): Writer; + interface ToReadableOptions extends Abortable { + highWaterMark?: number | undefined; + } + /** + * Creates a byte-mode `stream.Readable` from an `AsyncIterable` + * (the native batch format used by the stream/iter API). Each `Uint8Array` in a + * yielded batch is pushed as a separate chunk into the Readable. + * + * ```js + * import { createWriteStream } from 'node:fs'; + * import { from, pull, toReadable } from 'node:stream/iter'; + * import { compressGzip } from 'node:zlib/iter'; + * + * const source = pull(from('hello world'), compressGzip()); + * const readable = toReadable(source); + * + * readable.pipe(createWriteStream('output.gz')); + * ``` + * @since v26.1.0 + * @experimental + * @param source An `AsyncIterable` source, such as + * the return value of `pull()` or `from()`. + */ + function toReadable(source: Source, options?: ToReadableOptions): Readable; + interface ToReadableSyncOptions { + highWaterMark?: number | undefined; + } + /** + * Creates a byte-mode `stream.Readable` from a synchronous + * `Iterable`. The `_read()` method pulls from the iterator + * synchronously, so data is available immediately via `readable.read()`. + * + * ```js + * import { fromSync, toReadableSync } from 'node:stream/iter'; + * + * const source = fromSync('hello world'); + * const readable = toReadableSync(source); + * + * console.log(readable.read().toString()); // 'hello world' + * ``` + * @since v26.1.0 + * @experimental + * @param source An `Iterable` source, such as the + * return value of `pullSync()` or `fromSync()`. + */ + function toReadableSync(source: SyncSource, options?: ToReadableSyncOptions): Readable; + /** + * Creates a classic `stream.Writable` backed by a stream/iter Writer. + * + * Each `_write()` / `_writev()` call attempts the Writer's synchronous method + * first (`writeSync` / `writevSync`), falling back to the async method if the + * sync path returns `false`. Similarly, `_final()` tries `endSync()` + * before `end()`. When the sync path succeeds, the callback is deferred via + * `queueMicrotask` to preserve the async resolution contract. + * + * The Writable's `highWaterMark` is set to `Number.MAX_SAFE_INTEGER` to + * effectively disable its internal buffering, allowing the underlying Writer + * to manage backpressure directly. + * + * ```js + * import { push, toWritable } from 'node:stream/iter'; + * + * const { writer, readable } = push(); + * const writable = toWritable(writer); + * + * writable.write('hello'); + * writable.end(); + * ``` + * @since v26.1.0 + * @experimental + * @param writer A stream/iter Writer. Only the `write()` method is + * required; `end()`, `fail()`, `writeSync()`, `writevSync()`, `endSync()`, + * and `writev()` are optional. + */ + function toWritable(writer: PartialWriter): Writable; + namespace Stream { + export { + array, + arrayBuffer, + arrayBufferSync, + arraySync, + broadcast, + broadcastProtocol, + bytes, + bytesSync, + drainableProtocol, + duplex, + from, + fromSync, + merge, + ondrain, + pipeTo, + pipeToSync, + pull, + pullSync, + push, + share, + shareProtocol, + shareSync, + shareSyncProtocol, + tap, + tapSync, + text, + textSync, + toAsyncStreamable, + toStreamable, + }; + } +} +declare module "stream/iter" { + export * from "node:stream/iter"; +} diff --git a/node_modules/@types/node/stream/promises.d.ts b/node_modules/@types/node/stream/promises.d.ts new file mode 100644 index 0000000..c57fe1e --- /dev/null +++ b/node_modules/@types/node/stream/promises.d.ts @@ -0,0 +1,211 @@ +declare module "node:stream/promises" { + import { Abortable } from "node:events"; + import { + FinishedOptions as _FinishedOptions, + PipelineDestination, + PipelineSource, + PipelineTransform, + } from "node:stream"; + import { ReadableStream, WritableStream } from "node:stream/web"; + interface FinishedOptions extends _FinishedOptions { + /** + * If true, removes the listeners registered by this function before the promise is fulfilled. + * @default false + */ + cleanup?: boolean | undefined; + } + /** + * ```js + * import { finished } from 'node:stream/promises'; + * import { createReadStream } from 'node:fs'; + * + * const rs = createReadStream('archive.tar'); + * + * async function run() { + * await finished(rs); + * console.log('Stream is done reading.'); + * } + * + * run().catch(console.error); + * rs.resume(); // Drain the stream. + * ``` + * + * The `finished` API also provides a [callback version](https://nodejs.org/docs/latest-v26.x/api/stream.html#streamfinishedstream-options-callback). + * + * `stream.finished()` leaves dangling event listeners (in particular + * `'error'`, `'end'`, `'finish'` and `'close'`) after the returned promise is + * resolved or rejected. The reason for this is so that unexpected `'error'` + * events (due to incorrect stream implementations) do not cause unexpected + * crashes. If this is unwanted behavior then `options.cleanup` should be set to + * `true`: + * + * ```js + * await finished(rs, { cleanup: true }); + * ``` + * @since v15.0.0 + * @returns Fulfills when the stream is no longer readable or writable. + */ + function finished( + stream: NodeJS.ReadableStream | NodeJS.WritableStream | ReadableStream | WritableStream, + options?: FinishedOptions, + ): Promise; + interface PipelineOptions extends Abortable { + end?: boolean | undefined; + } + type PipelineResult> = S extends (...args: any[]) => PromiseLike + ? Promise + : Promise; + /** + * ```js + * import { pipeline } from 'node:stream/promises'; + * import { createReadStream, createWriteStream } from 'node:fs'; + * import { createGzip } from 'node:zlib'; + * + * await pipeline( + * createReadStream('archive.tar'), + * createGzip(), + * createWriteStream('archive.tar.gz'), + * ); + * console.log('Pipeline succeeded.'); + * ``` + * + * To use an `AbortSignal`, pass it inside an options object, as the last argument. + * When the signal is aborted, `destroy` will be called on the underlying pipeline, + * with an `AbortError`. + * + * ```js + * import { pipeline } from 'node:stream/promises'; + * import { createReadStream, createWriteStream } from 'node:fs'; + * import { createGzip } from 'node:zlib'; + * + * const ac = new AbortController(); + * const { signal } = ac; + * setImmediate(() => ac.abort()); + * try { + * await pipeline( + * createReadStream('archive.tar'), + * createGzip(), + * createWriteStream('archive.tar.gz'), + * { signal }, + * ); + * } catch (err) { + * console.error(err); // AbortError + * } + * ``` + * + * The `pipeline` API also supports async generators: + * + * ```js + * import { pipeline } from 'node:stream/promises'; + * import { createReadStream, createWriteStream } from 'node:fs'; + * + * await pipeline( + * createReadStream('lowercase.txt'), + * async function* (source, { signal }) { + * source.setEncoding('utf8'); // Work with strings rather than `Buffer`s. + * for await (const chunk of source) { + * yield await processChunk(chunk, { signal }); + * } + * }, + * createWriteStream('uppercase.txt'), + * ); + * console.log('Pipeline succeeded.'); + * ``` + * + * Remember to handle the `signal` argument passed into the async generator. + * Especially in the case where the async generator is the source for the + * pipeline (i.e. first argument) or the pipeline will never complete. + * + * ```js + * import { pipeline } from 'node:stream/promises'; + * import fs from 'node:fs'; + * await pipeline( + * async function* ({ signal }) { + * await someLongRunningfn({ signal }); + * yield 'asd'; + * }, + * fs.createWriteStream('uppercase.txt'), + * ); + * console.log('Pipeline succeeded.'); + * ``` + * + * The `pipeline` API provides [callback version](https://nodejs.org/docs/latest-v26.x/api/stream.html#streampipelinesource-transforms-destination-callback): + * @since v15.0.0 + * @returns Fulfills when the pipeline is complete. + */ + function pipeline, B extends PipelineDestination>( + source: A, + destination: B, + options?: PipelineOptions, + ): PipelineResult; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + destination: B, + options?: PipelineOptions, + ): PipelineResult; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + destination: B, + options?: PipelineOptions, + ): PipelineResult; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + transform3: T3, + destination: B, + options?: PipelineOptions, + ): PipelineResult; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + transform3: T3, + transform4: T4, + destination: B, + options?: PipelineOptions, + ): PipelineResult; + function pipeline( + streams: readonly [PipelineSource, ...PipelineTransform[], PipelineDestination], + options?: PipelineOptions, + ): Promise; + function pipeline( + ...streams: [PipelineSource, ...PipelineTransform[], PipelineDestination] + ): Promise; + function pipeline( + ...streams: [ + PipelineSource, + ...PipelineTransform[], + PipelineDestination, + options: PipelineOptions, + ] + ): Promise; +} +declare module "stream/promises" { + export * from "node:stream/promises"; +} diff --git a/node_modules/@types/node/stream/web.d.ts b/node_modules/@types/node/stream/web.d.ts new file mode 100644 index 0000000..e3a6125 --- /dev/null +++ b/node_modules/@types/node/stream/web.d.ts @@ -0,0 +1,320 @@ +declare module "node:stream/web" { + import { TextDecoderCommon, TextDecoderOptions, TextEncoderCommon } from "node:util"; + type CompressionFormat = "brotli" | "deflate" | "deflate-raw" | "gzip"; + type ReadableStreamController = ReadableStreamDefaultController | ReadableByteStreamController; + type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; + type ReadableStreamReaderMode = "byob"; + type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; + type ReadableStreamType = "bytes"; + interface GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + interface QueuingStrategy { + highWaterMark?: number; + size?: QueuingStrategySize; + } + interface QueuingStrategyInit { + highWaterMark: number; + } + interface QueuingStrategySize { + (chunk: T): number; + } + interface ReadableStreamBYOBReaderReadOptions { + min?: number; + } + interface ReadableStreamGenericReader { + readonly closed: Promise; + cancel(reason?: any): Promise; + } + interface ReadableStreamGetReaderOptions { + mode?: ReadableStreamReaderMode; + } + interface ReadableStreamIteratorOptions { + preventCancel?: boolean; + } + interface ReadableStreamReadDoneResult { + done: true; + value: T | undefined; + } + interface ReadableStreamReadValueResult { + done: false; + value: T; + } + interface ReadableWritablePair { + readable: ReadableStream; + writable: WritableStream; + } + interface StreamPipeOptions { + preventAbort?: boolean; + preventCancel?: boolean; + preventClose?: boolean; + signal?: AbortSignal; + } + interface Transformer { + cancel?: TransformerCancelCallback; + flush?: TransformerFlushCallback; + readableType?: undefined; + start?: TransformerStartCallback; + transform?: TransformerTransformCallback; + writableType?: undefined; + } + interface TransformerCancelCallback { + (reason: any): void | PromiseLike; + } + interface TransformerFlushCallback { + (controller: TransformStreamDefaultController): void | PromiseLike; + } + interface TransformerStartCallback { + (controller: TransformStreamDefaultController): any; + } + interface TransformerTransformCallback { + (chunk: I, controller: TransformStreamDefaultController): void | PromiseLike; + } + interface UnderlyingByteSource { + autoAllocateChunkSize?: number; + cancel?: UnderlyingSourceCancelCallback; + pull?: (controller: ReadableByteStreamController) => void | PromiseLike; + start?: (controller: ReadableByteStreamController) => any; + type: "bytes"; + } + interface UnderlyingDefaultSource { + cancel?: UnderlyingSourceCancelCallback; + pull?: (controller: ReadableStreamDefaultController) => void | PromiseLike; + start?: (controller: ReadableStreamDefaultController) => any; + type?: undefined; + } + interface UnderlyingSink { + abort?: UnderlyingSinkAbortCallback; + close?: UnderlyingSinkCloseCallback; + start?: UnderlyingSinkStartCallback; + type?: undefined; + write?: UnderlyingSinkWriteCallback; + } + interface UnderlyingSinkAbortCallback { + (reason?: any): void | PromiseLike; + } + interface UnderlyingSinkCloseCallback { + (): void | PromiseLike; + } + interface UnderlyingSinkStartCallback { + (controller: WritableStreamDefaultController): any; + } + interface UnderlyingSinkWriteCallback { + (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike; + } + interface UnderlyingSource { + autoAllocateChunkSize?: number; + cancel?: UnderlyingSourceCancelCallback; + pull?: UnderlyingSourcePullCallback; + start?: UnderlyingSourceStartCallback; + type?: ReadableStreamType; + } + interface UnderlyingSourceCancelCallback { + (reason?: any): void | PromiseLike; + } + interface UnderlyingSourcePullCallback { + (controller: ReadableStreamController): void | PromiseLike; + } + interface UnderlyingSourceStartCallback { + (controller: ReadableStreamController): any; + } + interface ByteLengthQueuingStrategy extends QueuingStrategy { + readonly highWaterMark: number; + readonly size: QueuingStrategySize; + } + var ByteLengthQueuingStrategy: { + prototype: ByteLengthQueuingStrategy; + new(init: QueuingStrategyInit): ByteLengthQueuingStrategy; + }; + interface CompressionStream extends GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + var CompressionStream: { + prototype: CompressionStream; + new(format: CompressionFormat): CompressionStream; + }; + interface CountQueuingStrategy extends QueuingStrategy { + readonly highWaterMark: number; + readonly size: QueuingStrategySize; + } + var CountQueuingStrategy: { + prototype: CountQueuingStrategy; + new(init: QueuingStrategyInit): CountQueuingStrategy; + }; + interface DecompressionStream extends GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + var DecompressionStream: { + prototype: DecompressionStream; + new(format: CompressionFormat): DecompressionStream; + }; + interface ReadableByteStreamController { + readonly byobRequest: ReadableStreamBYOBRequest | null; + readonly desiredSize: number | null; + close(): void; + enqueue(chunk: NodeJS.NonSharedArrayBufferView): void; + error(e?: any): void; + } + var ReadableByteStreamController: { + prototype: ReadableByteStreamController; + new(): ReadableByteStreamController; + }; + interface ReadableStream { + readonly locked: boolean; + cancel(reason?: any): Promise; + getReader(options: { mode: "byob" }): ReadableStreamBYOBReader; + getReader(): ReadableStreamDefaultReader; + getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader; + pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; + pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; + tee(): [ReadableStream, ReadableStream]; + [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; + values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; + } + var ReadableStream: { + prototype: ReadableStream; + new( + underlyingSource: UnderlyingByteSource, + strategy?: { highWaterMark?: number }, + ): ReadableStream; + new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; + new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + from(iterable: Iterable | AsyncIterable): ReadableStream; + }; + interface ReadableStreamAsyncIterator extends NodeJS.AsyncIterator { + [Symbol.asyncIterator](): ReadableStreamAsyncIterator; + } + interface ReadableStreamBYOBReader extends ReadableStreamGenericReader { + read( + view: T, + options?: ReadableStreamBYOBReaderReadOptions, + ): Promise>; + releaseLock(): void; + } + var ReadableStreamBYOBReader: { + prototype: ReadableStreamBYOBReader; + new(stream: ReadableStream): ReadableStreamBYOBReader; + }; + interface ReadableStreamBYOBRequest { + readonly view: NodeJS.NonSharedArrayBufferView | null; + respond(bytesWritten: number): void; + respondWithNewView(view: NodeJS.NonSharedArrayBufferView): void; + } + var ReadableStreamBYOBRequest: { + prototype: ReadableStreamBYOBRequest; + new(): ReadableStreamBYOBRequest; + }; + interface ReadableStreamDefaultController { + readonly desiredSize: number | null; + close(): void; + enqueue(chunk: R): void; + error(e?: any): void; + } + var ReadableStreamDefaultController: { + prototype: ReadableStreamDefaultController; + new(): ReadableStreamDefaultController; + }; + interface ReadableStreamDefaultReader extends ReadableStreamGenericReader { + read(): Promise>; + releaseLock(): void; + } + var ReadableStreamDefaultReader: { + prototype: ReadableStreamDefaultReader; + new(stream: ReadableStream): ReadableStreamDefaultReader; + }; + interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + var TextDecoderStream: { + prototype: TextDecoderStream; + new(label?: string, options?: TextDecoderOptions): TextDecoderStream; + }; + interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + var TextEncoderStream: { + prototype: TextEncoderStream; + new(): TextEncoderStream; + }; + interface TransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + var TransformStream: { + prototype: TransformStream; + new( + transformer?: Transformer, + writableStrategy?: QueuingStrategy, + readableStrategy?: QueuingStrategy, + ): TransformStream; + }; + interface TransformStreamDefaultController { + readonly desiredSize: number | null; + enqueue(chunk: O): void; + error(reason?: any): void; + terminate(): void; + } + var TransformStreamDefaultController: { + prototype: TransformStreamDefaultController; + new(): TransformStreamDefaultController; + }; + interface WritableStream { + readonly locked: boolean; + abort(reason?: any): Promise; + close(): Promise; + getWriter(): WritableStreamDefaultWriter; + } + var WritableStream: { + prototype: WritableStream; + new(underlyingSink?: UnderlyingSink, strategy?: QueuingStrategy): WritableStream; + }; + interface WritableStreamDefaultController { + readonly signal: AbortSignal; + error(e?: any): void; + } + var WritableStreamDefaultController: { + prototype: WritableStreamDefaultController; + new(): WritableStreamDefaultController; + }; + interface WritableStreamDefaultWriter { + readonly closed: Promise; + readonly desiredSize: number | null; + readonly ready: Promise; + abort(reason?: any): Promise; + close(): Promise; + releaseLock(): void; + write(chunk: W): Promise; + } + var WritableStreamDefaultWriter: { + prototype: WritableStreamDefaultWriter; + new(stream: WritableStream): WritableStreamDefaultWriter; + }; + // Node.js extensions + /** + * Runs the WHATWG `ReadableStreamTee` abstract operation on `stream`. + * + * This differs from `readableStream.tee()` only when `cloneForBranch2` is + * `true`. The `tee()` method always passes `false`, while other web platform + * specifications, such as Fetch body cloning, pass `true` so that the second + * branch receives cloned chunks and consumption of one branch cannot mutate chunks + * seen by the other. + * @since v26.5.0 + * @experimental + * @param cloneForBranch2 When `true`, chunks enqueued into the second + * branch are cloned from chunks enqueued into the first branch. **Default:** + * `false`. + * @returns Two `ReadableStream` branches. + */ + function ReadableStreamTee( + stream: ReadableStream, + cloneForBranch2?: boolean, + ): [ReadableStream, ReadableStream]; +} +declare module "stream/web" { + export * from "node:stream/web"; +} diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts new file mode 100644 index 0000000..568e3f6 --- /dev/null +++ b/node_modules/@types/node/string_decoder.d.ts @@ -0,0 +1,27 @@ +declare module "node:string_decoder" { + class StringDecoder { + constructor(encoding?: BufferEncoding); + /** + * Returns a decoded string, ensuring that any incomplete multibyte characters at + * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the + * returned string and stored in an internal buffer for the next call to `stringDecoder.write()` or `stringDecoder.end()`. + * @since v0.1.99 + * @param buffer The bytes to decode. + */ + write(buffer: string | NodeJS.ArrayBufferView): string; + /** + * Returns any remaining input stored in the internal buffer as a string. Bytes + * representing incomplete UTF-8 and UTF-16 characters will be replaced with + * substitution characters appropriate for the character encoding. + * + * If the `buffer` argument is provided, one final call to `stringDecoder.write()` is performed before returning the remaining input. + * After `end()` is called, the `stringDecoder` object can be reused for new input. + * @since v0.9.3 + * @param buffer The bytes to decode. + */ + end(buffer?: string | NodeJS.ArrayBufferView): string; + } +} +declare module "string_decoder" { + export * from "node:string_decoder"; +} diff --git a/node_modules/@types/node/test.d.ts b/node_modules/@types/node/test.d.ts new file mode 100644 index 0000000..22acc43 --- /dev/null +++ b/node_modules/@types/node/test.d.ts @@ -0,0 +1,2558 @@ +declare module "node:test" { + import { AssertMethodNames, AssertPredicate } from "node:assert"; + import { Readable, ReadableEventMap } from "node:stream"; + import { TestEvent } from "node:test/reporters"; + import { URL } from "node:url"; + import TestFn = test.TestFn; + import TestOptions = test.TestOptions; + /** + * The `test()` function is the value imported from the `test` module. Each + * invocation of this function results in reporting the test to the `TestsStream`. + * + * The `TestContext` object passed to the `fn` argument can be used to perform + * actions related to the current test. Examples include skipping the test, adding + * additional diagnostic information, or creating subtests. + * + * `test()` returns a `Promise` that fulfills once the test completes. + * if `test()` is called within a suite, it fulfills immediately. + * The return value can usually be discarded for top level tests. + * However, the return value from subtests should be used to prevent the parent + * test from finishing first and cancelling the subtest + * as shown in the following example. + * + * ```js + * test('top level test', async (t) => { + * // The setTimeout() in the following subtest would cause it to outlive its + * // parent test if 'await' is removed on the next line. Once the parent test + * // completes, it will cancel any outstanding subtests. + * await t.test('longer running subtest', async (t) => { + * return new Promise((resolve, reject) => { + * setTimeout(resolve, 1000); + * }); + * }); + * }); + * ``` + * + * The `timeout` option can be used to fail the test if it takes longer than `timeout` milliseconds to complete. However, it is not a reliable mechanism for + * canceling tests because a running test might block the application thread and + * thus prevent the scheduled cancellation. + * @since v18.0.0, v16.17.0 + * @param name The name of the test, which is displayed when reporting test results. + * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. + * @param options Configuration options for the test. + * @param fn The function under test. The first argument to this function is a {@link TestContext} object. + * If the test uses callbacks, the callback function is passed as the second argument. + * @return Fulfilled with `undefined` once the test completes, or immediately if the test runs within a suite. + */ + function test(name?: string, fn?: TestFn): Promise; + function test(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function test(options?: TestOptions, fn?: TestFn): Promise; + function test(fn?: TestFn): Promise; + namespace test { + export { test }; + export { suite as describe, test as it }; + } + namespace test { + /** + * **Note:** `shard` is used to horizontally parallelize test running across + * machines or processes, ideal for large-scale executions across varied + * environments. It's incompatible with `watch` mode, tailored for rapid + * code iteration by automatically rerunning tests on file changes. + * + * ```js + * import { tap } from 'node:test/reporters'; + * import { run } from 'node:test'; + * import process from 'node:process'; + * import path from 'node:path'; + * + * run({ files: [path.resolve('./tests/test.js')] }) + * .compose(tap) + * .pipe(process.stdout); + * ``` + * @since v18.9.0, v16.19.0 + * @param options Configuration options for running tests. + */ + function run(options?: RunOptions): TestsStream; + /** + * The `suite()` function is imported from the `node:test` module. + * @param name The name of the suite, which is displayed when reporting test results. + * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. + * @param options Configuration options for the suite. This supports the same options as {@link test}. + * @param fn The suite function declaring nested tests and suites. The first argument to this function is a {@link SuiteContext} object. + * @return Immediately fulfilled with `undefined`. + * @since v20.13.0 + */ + function suite(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function suite(name?: string, fn?: SuiteFn): Promise; + function suite(options?: TestOptions, fn?: SuiteFn): Promise; + function suite(fn?: SuiteFn): Promise; + namespace suite { + /** + * Shorthand for skipping a suite. This is the same as calling {@link suite} with `options.skip` set to `true`. + * @since v20.13.0 + */ + function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function skip(name?: string, fn?: SuiteFn): Promise; + function skip(options?: TestOptions, fn?: SuiteFn): Promise; + function skip(fn?: SuiteFn): Promise; + /** + * Shorthand for marking a suite as `TODO`. This is the same as calling {@link suite} with `options.todo` set to `true`. + * @since v20.13.0 + */ + function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function todo(name?: string, fn?: SuiteFn): Promise; + function todo(options?: TestOptions, fn?: SuiteFn): Promise; + function todo(fn?: SuiteFn): Promise; + /** + * Shorthand for marking a suite as `only`. This is the same as calling {@link suite} with `options.only` set to `true`. + * @since v20.13.0 + */ + function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function only(name?: string, fn?: SuiteFn): Promise; + function only(options?: TestOptions, fn?: SuiteFn): Promise; + function only(fn?: SuiteFn): Promise; + /** + * This flips the pass/fail reporting for a specific test or suite: a flagged test + * case must throw in order to pass, and a flagged test case that does not throw + * fails. + * @since v25.5.0 + */ + function expectFailure(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function expectFailure(name?: string, fn?: SuiteFn): Promise; + function expectFailure(options?: TestOptions, fn?: SuiteFn): Promise; + function expectFailure(fn?: SuiteFn): Promise; + } + /** + * Shorthand for skipping a test. This is the same as calling {@link test} with `options.skip` set to `true`. + * @since v20.2.0 + */ + function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function skip(name?: string, fn?: TestFn): Promise; + function skip(options?: TestOptions, fn?: TestFn): Promise; + function skip(fn?: TestFn): Promise; + /** + * Shorthand for marking a test as `TODO`. This is the same as calling {@link test} with `options.todo` set to `true`. + * @since v20.2.0 + */ + function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function todo(name?: string, fn?: TestFn): Promise; + function todo(options?: TestOptions, fn?: TestFn): Promise; + function todo(fn?: TestFn): Promise; + /** + * Shorthand for marking a test as `only`. This is the same as calling {@link test} with `options.only` set to `true`. + * @since v20.2.0 + */ + function only(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function only(name?: string, fn?: TestFn): Promise; + function only(options?: TestOptions, fn?: TestFn): Promise; + function only(fn?: TestFn): Promise; + // added in v25.5.0, undocumented + function expectFailure(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function expectFailure(name?: string, fn?: TestFn): Promise; + function expectFailure(options?: TestOptions, fn?: TestFn): Promise; + function expectFailure(fn?: TestFn): Promise; + /** + * The type of a function passed to {@link test}. The first argument to this function is a {@link TestContext} object. + * If the test uses callbacks, the callback function is passed as the second argument. + */ + type TestFn = (t: TestContext, done: (result?: any) => void) => void | Promise; + /** + * The type of a suite test function. The argument to this function is a {@link SuiteContext} object. + */ + type SuiteFn = (s: SuiteContext) => void | Promise; + interface TestShard { + /** + * A positive integer between 1 and `total` that specifies the index of the shard to run. + */ + index: number; + /** + * A positive integer that specifies the total number of shards to split the test files to. + */ + total: number; + } + interface RunOptions { + /** + * If a number is provided, then that many tests would run asynchronously (they are still managed by the single-threaded event loop). + * If `true`, it would run `os.availableParallelism() - 1` test files in parallel. If `false`, it would only run one test file at a time. + * @default false + */ + concurrency?: number | boolean | undefined; + /** + * Specifies the current working directory to be used by the test runner. + * Serves as the base path for resolving files according to the + * [test runner execution model](https://nodejs.org/docs/latest-v26.x/api/test.html#test-runner-execution-model). + * @since v23.0.0 + * @default process.cwd() + */ + cwd?: string | undefined; + /** + * An array containing the list of files to run. If omitted, files are run according to the + * [test runner execution model](https://nodejs.org/docs/latest-v26.x/api/test.html#test-runner-execution-model). + */ + files?: readonly string[] | undefined; + /** + * Configures the test runner to exit the process once all known + * tests have finished executing even if the event loop would + * otherwise remain active. + * @default false + */ + forceExit?: boolean | undefined; + /** + * An array containing the list of glob patterns to match test files. + * This option cannot be used together with `files`. If omitted, files are run according to the + * [test runner execution model](https://nodejs.org/docs/latest-v26.x/api/test.html#test-runner-execution-model). + * @since v22.6.0 + */ + globPatterns?: readonly string[] | undefined; + /** + * Sets inspector port of test child process. + * This can be a number, or a function that takes no arguments and returns a + * number. If a nullish value is provided, each process gets its own port, + * incremented from the primary's `process.debugPort`. This option is ignored + * if the `isolation` option is set to `'none'` as no child processes are + * spawned. + * @default undefined + */ + inspectPort?: number | (() => number) | undefined; + /** + * Configures the type of test isolation. If set to + * `'process'`, each test file is run in a separate child process. If set to + * `'none'`, all test files run in the current process. + * @default 'process' + * @since v22.8.0 + */ + isolation?: "process" | "none" | undefined; + /** + * If truthy, the test context will only run tests that have the `only` option set + */ + only?: boolean | undefined; + /** + * A function that accepts the `TestsStream` instance and can be used to setup listeners before any tests are run. + * @default undefined + */ + setup?: ((reporter: TestsStream) => void | Promise) | undefined; + /** + * An array of CLI flags to pass to the `node` executable when + * spawning the subprocesses. This option has no effect when `isolation` is `'none`'. + * @since v22.10.0 + * @default [] + */ + execArgv?: readonly string[] | undefined; + /** + * An array of CLI flags to pass to each test file when spawning the + * subprocesses. This option has no effect when `isolation` is `'none'`. + * @since v22.10.0 + * @default [] + */ + argv?: readonly string[] | undefined; + /** + * Allows aborting an in-progress test execution. + */ + signal?: AbortSignal | undefined; + /** + * If provided, only run tests whose name matches the provided pattern. + * Strings are interpreted as JavaScript regular expressions. + * @default undefined + */ + testNamePatterns?: string | RegExp | ReadonlyArray | undefined; + /** + * A String, RegExp or a RegExp Array, that can be used to exclude running tests whose + * name matches the provided pattern. Test name patterns are interpreted as JavaScript + * regular expressions. For each test that is executed, any corresponding test hooks, + * such as `beforeEach()`, are also run. + * @default undefined + * @since v22.1.0 + */ + testSkipPatterns?: string | RegExp | ReadonlyArray | undefined; + /** + * A tag name, or an array of tag names, + * used to filter tests by their declared tags. Tests must contain every + * listed tag to run. Equivalent to passing `--experimental-test-tag-filter` + * on the command line. See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + * @default undefined + * @since v26.2.0 + */ + testTagFilters?: string | readonly string[] | undefined; + /** + * The number of milliseconds after which the test execution will fail. + * If unspecified, subtests inherit this value from their parent. + * @default Infinity + */ + timeout?: number | undefined; + /** + * Whether to run in watch mode or not. + * @default false + */ + watch?: boolean | undefined; + /** + * Running tests in a specific shard. + * @default undefined + */ + shard?: TestShard | undefined; + /** + * Randomize execution order for test files and queued tests. + * This option is not supported with `watch: true`. + * @since v26.1.0 + * @default false + */ + randomize?: boolean | undefined; + /** + * Seed used when randomizing execution order. If this + * option is set, runs can replay the same randomized order deterministically, + * and setting this option also enables randomization. The value must be an + * integer between `0` and `4294967295`. + */ + randomSeed?: number | undefined; + /** + * A file path where the test runner will + * store the state of the tests to allow rerunning only the failed tests on a next run. + * @since v24.7.0 + * @default undefined + */ + rerunFailuresFilePath?: string | undefined; + /** + * enable [code coverage](https://nodejs.org/docs/latest-v26.x/api/test.html#collecting-code-coverage) collection. + * @since v22.10.0 + * @default false + */ + coverage?: boolean | undefined; + /** + * Excludes specific files from code coverage + * using a glob pattern, which can match both absolute and relative file paths. + * This property is only applicable when `coverage` was set to `true`. + * If both `coverageExcludeGlobs` and `coverageIncludeGlobs` are provided, + * files must meet **both** criteria to be included in the coverage report. + * @since v22.10.0 + * @default undefined + */ + coverageExcludeGlobs?: string | readonly string[] | undefined; + /** + * Includes specific files in code coverage + * using a glob pattern, which can match both absolute and relative file paths. + * This property is only applicable when `coverage` was set to `true`. + * If both `coverageExcludeGlobs` and `coverageIncludeGlobs` are provided, + * files must meet **both** criteria to be included in the coverage report. + * @since v22.10.0 + * @default undefined + */ + coverageIncludeGlobs?: string | readonly string[] | undefined; + /** + * Require a minimum percent of covered lines. If code + * coverage does not reach the threshold specified, the process will exit with code `1`. + * @since v22.10.0 + * @default 0 + */ + lineCoverage?: number | undefined; + /** + * Require a minimum percent of covered branches. If code + * coverage does not reach the threshold specified, the process will exit with code `1`. + * @since v22.10.0 + * @default 0 + */ + branchCoverage?: number | undefined; + /** + * Require a minimum percent of covered functions. If code + * coverage does not reach the threshold specified, the process will exit with code `1`. + * @since v22.10.0 + * @default 0 + */ + functionCoverage?: number | undefined; + /** + * Specify environment variables to be passed along to the test process. + * This option is not compatible with `isolation='none'`. These variables will override + * those from the main process, and are not merged with `process.env`. + * @since v25.6.0 + * @default process.env + */ + env?: NodeJS.ProcessEnv | undefined; + } + interface TestsStreamEventMap extends ReadableEventMap { + "data": [data: TestEvent]; + "test:coverage": [data: EventData.TestCoverage]; + "test:complete": [data: EventData.TestComplete]; + "test:dequeue": [data: EventData.TestDequeue]; + "test:diagnostic": [data: EventData.TestDiagnostic]; + "test:enqueue": [data: EventData.TestEnqueue]; + "test:fail": [data: EventData.TestFail]; + "test:interrupted": [data: EventData.TestInterrupted]; + "test:log": [data: EventData.TestLog]; + "test:pass": [data: EventData.TestPass]; + "test:plan": [data: EventData.TestPlan]; + "test:start": [data: EventData.TestStart]; + "test:stderr": [data: EventData.TestStderr]; + "test:stdout": [data: EventData.TestStdout]; + "test:summary": [data: EventData.TestSummary]; + "test:watch:drained": []; + "test:watch:restarted": []; + } + /** + * A successful call to `run()` will return a new `TestsStream` object, streaming a series of events representing the execution of the tests. + * + * Some of the events are guaranteed to be emitted in the same order as the tests are defined, while others are emitted in the order that the tests execute. + * @since v18.9.0, v16.19.0 + */ + interface TestsStream extends Readable { + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: TestsStreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: TestsStreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: TestsStreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: TestsStreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + namespace EventData { + interface Error extends globalThis.Error { + cause: unknown; + } + interface LocationInfo { + /** + * The column number where the test is defined, or + * `undefined` if the test was run through the REPL. + */ + column?: number; + /** + * The path of the test file that was + * executed as the entry point of the child process that emitted this event. + * Only present when tests run with process isolation. May differ from + * `file` when the test is defined in a module imported by the entry file. + */ + entryFile?: string; + /** + * The path of the test file, `undefined` if test was run through the REPL. + */ + file?: string; + /** + * The line number where the test is defined, or `undefined` if the test was run through the REPL. + */ + line?: number; + } + interface TestDiagnostic extends LocationInfo { + /** + * The diagnostic message. + */ + message: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The severity level of the diagnostic message. + * Possible values are: + * * `'info'`: Informational messages. + * * `'warn'`: Warnings. + * * `'error'`: Errors. + */ + level: "info" | "warn" | "error"; + } + interface TestCoverage { + /** + * An object containing the coverage report. + */ + summary: { + /** + * An array of coverage reports for individual files. + */ + files: Array<{ + /** + * The absolute path of the file. + */ + path: string; + /** + * The total number of lines. + */ + totalLineCount: number; + /** + * The total number of branches. + */ + totalBranchCount: number; + /** + * The total number of functions. + */ + totalFunctionCount: number; + /** + * The number of covered lines. + */ + coveredLineCount: number; + /** + * The number of covered branches. + */ + coveredBranchCount: number; + /** + * The number of covered functions. + */ + coveredFunctionCount: number; + /** + * The percentage of lines covered. + */ + coveredLinePercent: number; + /** + * The percentage of branches covered. + */ + coveredBranchPercent: number; + /** + * The percentage of functions covered. + */ + coveredFunctionPercent: number; + /** + * An array of functions representing function coverage. + */ + functions: Array<{ + /** + * The name of the function. + */ + name: string; + /** + * The line number where the function is defined. + */ + line: number; + /** + * The number of times the function was called. + */ + count: number; + }>; + /** + * An array of branches representing branch coverage. + */ + branches: Array<{ + /** + * The line number where the branch is defined. + */ + line: number; + /** + * The number of times the branch was taken. + */ + count: number; + }>; + /** + * An array of lines representing line numbers and the number of times they were covered. + */ + lines: Array<{ + /** + * The line number. + */ + line: number; + /** + * The number of times the line was covered. + */ + count: number; + }>; + }>; + /** + * An object containing whether or not the coverage for + * each coverage type. + * @since v22.9.0 + */ + thresholds: { + /** + * The function coverage threshold. + */ + function: number; + /** + * The branch coverage threshold. + */ + branch: number; + /** + * The line coverage threshold. + */ + line: number; + }; + /** + * An object containing a summary of coverage for all files. + */ + totals: { + /** + * The total number of lines. + */ + totalLineCount: number; + /** + * The total number of branches. + */ + totalBranchCount: number; + /** + * The total number of functions. + */ + totalFunctionCount: number; + /** + * The number of covered lines. + */ + coveredLineCount: number; + /** + * The number of covered branches. + */ + coveredBranchCount: number; + /** + * The number of covered functions. + */ + coveredFunctionCount: number; + /** + * The percentage of lines covered. + */ + coveredLinePercent: number; + /** + * The percentage of branches covered. + */ + coveredBranchPercent: number; + /** + * The percentage of functions covered. + */ + coveredFunctionPercent: number; + }; + /** + * The working directory when code coverage began. This + * is useful for displaying relative path names in case + * the tests changed the working directory of the Node.js process. + */ + workingDirectory: string; + }; + /** + * The nesting level of the test. + */ + nesting: number; + } + interface TestComplete extends LocationInfo { + /** + * Additional execution metadata. + */ + details: { + /** + * Whether the test passed or not. + */ + passed: boolean; + /** + * The duration of the test in milliseconds. + */ + duration_ms: number; + /** + * An error wrapping the error thrown by the test if it did not pass. + */ + error?: Error; + /** + * The type of the test, used to denote whether this is a suite. + */ + type?: "suite" | "test"; + }; + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + /** + * The ordinal number of the test. + */ + testNumber: number; + /** + * Present if `context.todo` is called. + */ + todo?: string | boolean; + /** + * Present if `context.skip` is called. + */ + skip?: string | boolean; + } + interface TestDequeue extends LocationInfo { + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + /** + * The test type. Either `'suite'` or `'test'`. + * @since v22.15.0 + */ + type: "suite" | "test"; + } + interface TestEnqueue extends LocationInfo { + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + /** + * The test type. Either `'suite'` or `'test'`. + * @since v22.15.0 + */ + type: "suite" | "test"; + } + interface TestFail extends LocationInfo { + /** + * Additional execution metadata. + */ + details: { + /** + * The duration of the test in milliseconds. + */ + duration_ms: number; + /** + * An error wrapping the error thrown by the test. + */ + error: Error; + /** + * The type of the test, used to denote whether this is a suite. + * @since v20.0.0, v19.9.0, v18.17.0 + */ + type?: "suite" | "test"; + /** + * The attempt number of the test run, + * present only when using the `--test-rerun-failures` flag. + * @since v24.7.0 + */ + attempt?: number; + }; + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + /** + * The ordinal number of the test. + */ + testNumber: number; + /** + * Present if `context.todo` is called. + */ + todo?: string | boolean; + /** + * Present if `context.skip` is called. + */ + skip?: string | boolean; + } + interface TestInterrupted { + /** + * An array of objects containing information about the + * interrupted tests. + */ + tests: TestStart[]; + } + interface TestLog extends LocationInfo { + /** + * The structured payload passed to `context.log`, or + * `undefined` if none was provided. The test runner does not interpret this + * value. + */ + data: unknown; + /** + * The log message. + */ + message: string; + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. + */ + parentId: number | undefined; + /** + * A numeric identifier for the test instance that emitted + * the log message. + */ + testId: number; + } + interface TestPass extends LocationInfo { + /** + * Additional execution metadata. + */ + details: { + /** + * The duration of the test in milliseconds. + */ + duration_ms: number; + /** + * The type of the test, used to denote whether this is a suite. + * @since 20.0.0, 19.9.0, 18.17.0 + */ + type?: "suite" | "test"; + /** + * The attempt number of the test run, + * present only when using the `--test-rerun-failures` flag. + * @since v24.7.0 + */ + attempt?: number; + /** + * The attempt number the test passed on, + * present only when using the `--test-rerun-failures` flag. + * @since v24.7.0 + */ + passed_on_attempt?: number; + }; + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + /** + * The ordinal number of the test. + */ + testNumber: number; + /** + * Present if `context.todo` is called. + */ + todo?: string | boolean; + /** + * Present if `context.skip` is called. + */ + skip?: string | boolean; + } + interface TestPlan extends LocationInfo { + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The number of subtests that have ran. + */ + count: number; + } + interface TestStart extends LocationInfo { + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + } + interface TestStderr { + /** + * The path of the test file. + */ + file: string; + /** + * The message written to `stderr`. + */ + message: string; + } + interface TestStdout { + /** + * The path of the test file. + */ + file: string; + /** + * The message written to `stdout`. + */ + message: string; + } + interface TestSummary { + /** + * An object containing the counts of various test results. + */ + counts: { + /** + * The total number of cancelled tests. + */ + cancelled: number; + /** + * The total number of passed tests. + */ + passed: number; + /** + * The total number of skipped tests. + */ + skipped: number; + /** + * The total number of suites run. + */ + suites: number; + /** + * The total number of tests run, excluding suites. + */ + tests: number; + /** + * The total number of TODO tests. + */ + todo: number; + /** + * The total number of top level tests and suites. + */ + topLevel: number; + }; + /** + * The duration of the test run in milliseconds. + */ + duration_ms: number; + /** + * The path of the test file that generated the + * summary. If the summary corresponds to multiple files, this value is + * `undefined`. + */ + file: string | undefined; + /** + * Indicates whether or not the test run is considered + * successful or not. If any error condition occurs, such as a failing test or + * unmet coverage threshold, this value will be set to `false`. + */ + success: boolean; + } + } + /** + * Returns the {@link TestContext} or {@link SuiteContext} object associated with the + * currently executing test or suite, or `undefined` if called outside of a test or + * suite. This function can be used to access context information from within the + * test or suite function or any async operations within them. + + * ```js + * import { getTestContext } from 'node:test'; + * + * test('example test', async () => { + * const ctx = getTestContext(); + * console.log(`Running test: ${ctx.name}`); + * }); + * + * describe('example suite', () => { + * const ctx = getTestContext(); + * console.log(`Running suite: ${ctx.name}`); + * }); + * ``` + * + * When called from a test, returns a `TestContext`. + * When called from a suite, returns a `SuiteContext`. + * + * If called from outside a test or suite (e.g., at the top level of a module or in + * a setTimeout callback after execution has completed), this function returns + * `undefined`. + * + * When called from within a hook (before, beforeEach, after, afterEach), this + * function returns the context of the test or suite that the hook is associated + * with. + * @since v26.1.0 + */ + function getTestContext(): TestContext | SuiteContext | undefined; + /** + * An instance of `TestContext` is passed to each test function in order to + * interact with the test runner. However, the `TestContext` constructor is not + * exposed as part of the API. + * @since v18.0.0, v16.17.0 + */ + interface TestContext { + /** + * An object containing assertion methods bound to the test context. + * The top-level functions from the `node:assert` module are exposed here for the purpose of creating test plans. + * + * **Note:** Some of the functions from `node:assert` contain type assertions. If these are called via the + * TestContext `assert` object, then the context parameter in the test's function signature **must be explicitly typed** + * (ie. the parameter must have a type annotation), otherwise an error will be raised by the TypeScript compiler: + * ```ts + * import { test, type TestContext } from 'node:test'; + * + * // The test function's context parameter must have a type annotation. + * test('example', (t: TestContext) => { + * t.assert.deepStrictEqual(actual, expected); + * }); + * + * // Omitting the type annotation will result in a compilation error. + * test('example', t => { + * t.assert.deepStrictEqual(actual, expected); // Error: 't' needs an explicit type annotation. + * }); + * ``` + * @since v22.2.0, v20.15.0 + */ + readonly assert: TestContextAssert; + /** + * This function is used to create a hook running before subtest of the current test. + * @param fn The hook function. The first argument to this function is a `TestContext` object. + * If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + * @since v20.1.0, v18.17.0 + */ + before(fn?: TestContextHookFn, options?: HookOptions): void; + /** + * This function is used to create a hook running before each subtest of the current test. + * @param fn The hook function. The first argument to this function is a `TestContext` object. + * If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + beforeEach(fn?: TestContextHookFn, options?: HookOptions): void; + /** + * This function is used to create a hook that runs after the current test finishes. + * @param fn The hook function. The first argument to this function is a `TestContext` object. + * If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + * @since v18.13.0 + */ + after(fn?: TestContextHookFn, options?: HookOptions): void; + /** + * This function is used to create a hook running after each subtest of the current test. + * @param fn The hook function. The first argument to this function is a `TestContext` object. + * If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + afterEach(fn?: TestContextHookFn, options?: HookOptions): void; + /** + * This function is used to write diagnostics to the output. Any diagnostic + * information is included at the end of the test's results. This function does + * not return a value. + * + * ```js + * test('top level test', (t) => { + * t.diagnostic('A diagnostic message'); + * }); + * ``` + * @since v18.0.0, v16.17.0 + * @param message Message to be reported. + */ + diagnostic(message: string): void; + /** + * This function is used to write a log message to the output. Unlike + * `context.diagnostic`, the resulting `'test:log'` event is emitted + * immediately, in the order that the tests execute, rather than being buffered + * until the test reports its results. This function does not return a value. + * + * ```js + * test('top level test', (t) => { + * t.log('fetched user', { userId: 42 }); + * t.log('retrying flaky endpoint', { attempt: 3 }); + * }); + * ``` + * @since v26.6.0 + * @param message Message to be reported. + * @param data Optional structured payload attached to the message. The test + * runner passes it through untouched. When tests run with process isolation, + * this value must be compatible with the [HTML structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm). + */ + log(message: string, data?: unknown): void; + /** + * The absolute path of the test file that created the current test. If a test file imports + * additional modules that generate tests, the imported tests will return the path of the root test file. + * @since v22.6.0 + */ + readonly filePath: string | undefined; + /** + * The name of the test and each of its ancestors, separated by `>`. + * @since v22.3.0 + */ + readonly fullName: string; + /** + * The name of the test. + * @since v18.8.0, v16.18.0 + */ + readonly name: string; + /** + * Indicated whether the test succeeded. + * @since v21.7.0, v20.12.0 + */ + readonly passed: boolean; + /** + * The failure reason for the test/case; wrapped and available via `context.error.cause`. + * @since v21.7.0, v20.12.0 + */ + readonly error: EventData.Error | null; + /** + * The attempt number of the test. This value is zero-based, so the first attempt is `0`, + * the second attempt is `1`, and so on. This property is useful in conjunction with the + * `--test-rerun-failures` option to determine which attempt the test is currently running. + * @since v21.7.0, v20.12.0 + */ + readonly attempt: number; + /** + * A frozen array of the test's flattened lowercased tags, in declaration + * order, including any tags inherited from ancestor suites. Empty when the + * test has no tags. See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + * @since v26.2.0 + */ + readonly tags: readonly string[]; + /** + * The unique identifier of the worker running the current test file. This value is + * derived from the `NODE_TEST_WORKER_ID` environment variable. When running tests + * with `--test-isolation=process` (the default), each test file runs in a separate + * child process and is assigned a worker ID from 1 to N, where N is the number of + * concurrent workers. When running with `--test-isolation=none`, all tests run in + * the same process and the worker ID is always 1. This value is `undefined` when + * not running in a test context. + * + * This property is useful for splitting resources (like database connections or + * server ports) across concurrent test files: + * + * ```js + * import { test } from 'node:test'; + * import { process } from 'node:process'; + * + * test('database operations', async (t) => { + * // Worker ID is available via context + * console.log(`Running in worker ${t.workerId}`); + * + * // Or via environment variable (available at import time) + * const workerId = process.env.NODE_TEST_WORKER_ID; + * // Use workerId to allocate separate resources per worker + * }); + * ``` + * @since v25.8.0 + */ + readonly workerId: number | undefined; + /** + * This function is used to set the number of assertions and subtests that are expected to run + * within the test. If the number of assertions and subtests that run does not match the + * expected count, the test will fail. + * + * > Note: To make sure assertions are tracked, `t.assert` must be used instead of `assert` directly. + * + * ```js + * test('top level test', (t) => { + * t.plan(2); + * t.assert.ok('some relevant assertion here'); + * t.test('subtest', () => {}); + * }); + * ``` + * + * When working with asynchronous code, the `plan` function can be used to ensure that the + * correct number of assertions are run: + * + * ```js + * test('planning with streams', (t, done) => { + * function* generate() { + * yield 'a'; + * yield 'b'; + * yield 'c'; + * } + * const expected = ['a', 'b', 'c']; + * t.plan(expected.length); + * const stream = Readable.from(generate()); + * stream.on('data', (chunk) => { + * t.assert.strictEqual(chunk, expected.shift()); + * }); + * + * stream.on('end', () => { + * done(); + * }); + * }); + * ``` + * + * When using the `wait` option, you can control how long the test will wait for the expected assertions. + * For example, setting a maximum wait time ensures that the test will wait for asynchronous assertions + * to complete within the specified timeframe: + * + * ```js + * test('plan with wait: 2000 waits for async assertions', (t) => { + * t.plan(1, { wait: 2000 }); // Waits for up to 2 seconds for the assertion to complete. + * + * const asyncActivity = () => { + * setTimeout(() => { + * * t.assert.ok(true, 'Async assertion completed within the wait time'); + * }, 1000); // Completes after 1 second, within the 2-second wait time. + * }; + * + * asyncActivity(); // The test will pass because the assertion is completed in time. + * }); + * ``` + * + * Note: If a `wait` timeout is specified, it begins counting down only after the test function finishes executing. + * @since v22.2.0 + */ + plan(count: number, options?: TestContextPlanOptions): void; + /** + * If `shouldRunOnlyTests` is truthy, the test context will only run tests that + * have the `only` option set. Otherwise, all tests are run. If Node.js was not + * started with the `--test-only` command-line option, this function is a + * no-op. + * + * ```js + * test('top level test', (t) => { + * // The test context can be set to run subtests with the 'only' option. + * t.runOnly(true); + * return Promise.all([ + * t.test('this subtest is now skipped'), + * t.test('this subtest is run', { only: true }), + * ]); + * }); + * ``` + * @since v18.0.0, v16.17.0 + * @param shouldRunOnlyTests Whether or not to run `only` tests. + */ + runOnly(shouldRunOnlyTests: boolean): void; + /** + * ```js + * test('top level test', async (t) => { + * await fetch('some/uri', { signal: t.signal }); + * }); + * ``` + * @since v18.7.0, v16.17.0 + */ + readonly signal: AbortSignal; + /** + * This function causes the test's output to indicate the test as skipped. If `message` is provided, it is included in the output. Calling `skip()` does + * not terminate execution of the test function. This function does not return a + * value. + * + * ```js + * test('top level test', (t) => { + * // Make sure to return here as well if the test contains additional logic. + * t.skip('this is skipped'); + * }); + * ``` + * @since v18.0.0, v16.17.0 + * @param message Optional skip message. + */ + skip(message?: string): void; + /** + * This function adds a `TODO` directive to the test's output. If `message` is + * provided, it is included in the output. Calling `todo()` does not terminate + * execution of the test function. This function does not return a value. + * + * ```js + * test('top level test', (t) => { + * // This test is marked as `TODO` + * t.todo('this is a todo'); + * }); + * ``` + * @since v18.0.0, v16.17.0 + * @param message Optional `TODO` message. + */ + todo(message?: string): void; + /** + * This function is used to create subtests under the current test. This function behaves in + * the same fashion as the top level {@link test} function. + * @since v18.0.0 + * @param name The name of the test, which is displayed when reporting test results. + * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. + * @param options Configuration options for the test. + * @param fn The function under test. This first argument to this function is a {@link TestContext} object. + * If the test uses callbacks, the callback function is passed as the second argument. + * @returns A {@link Promise} resolved with `undefined` once the test completes. + */ + test: typeof test; + /** + * This method polls a `condition` function until that function either returns + * successfully or the operation times out. + * @since v22.14.0 + * @param condition An assertion function that is invoked + * periodically until it completes successfully or the defined polling timeout + * elapses. Successful completion is defined as not throwing or rejecting. This + * function does not accept any arguments, and is allowed to return any value. + * @param options An optional configuration object for the polling operation. + * @returns Fulfilled with the value returned by `condition`. + */ + waitFor(condition: () => T, options?: TestContextWaitForOptions): Promise>; + /** + * Each test provides its own MockTracker instance. + */ + readonly mock: MockTracker; + } + interface TestContextAssert extends Pick { + /** + * This function serializes `value` and writes it to the file specified by `path`. + * + * ```js + * test('snapshot test with default serialization', (t) => { + * t.assert.fileSnapshot({ value1: 1, value2: 2 }, './snapshots/snapshot.json'); + * }); + * ``` + * + * This function differs from `context.assert.snapshot()` in the following ways: + * + * * The snapshot file path is explicitly provided by the user. + * * Each snapshot file is limited to a single snapshot value. + * * No additional escaping is performed by the test runner. + * + * These differences allow snapshot files to better support features such as syntax + * highlighting. + * @since v22.14.0 + * @param value A value to serialize to a string. If Node.js was started with + * the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--test-update-snapshots) + * flag, the serialized value is written to + * `path`. Otherwise, the serialized value is compared to the contents of the + * existing snapshot file. + * @param path The file where the serialized `value` is written. + * @param options Optional configuration options. + */ + fileSnapshot(value: any, path: string, options?: AssertSnapshotOptions): void; + /** + * This function implements assertions for snapshot testing. + * ```js + * test('snapshot test with default serialization', (t) => { + * t.assert.snapshot({ value1: 1, value2: 2 }); + * }); + * + * test('snapshot test with custom serialization', (t) => { + * t.assert.snapshot({ value3: 3, value4: 4 }, { + * serializers: [(value) => JSON.stringify(value)] + * }); + * }); + * ``` + * @since v22.3.0 + * @param value A value to serialize to a string. If Node.js was started with + * the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--test-update-snapshots) + * flag, the serialized value is written to + * the snapshot file. Otherwise, the serialized value is compared to the + * corresponding value in the existing snapshot file. + */ + snapshot(value: any, options?: AssertSnapshotOptions): void; + /** + * A custom assertion function registered with `assert.register()`. + */ + [name: string]: (...args: any[]) => void; + } + interface AssertSnapshotOptions { + /** + * An array of synchronous functions used to serialize `value` into a string. + * `value` is passed as the only argument to the first serializer function. + * The return value of each serializer is passed as input to the next serializer. + * Once all serializers have run, the resulting value is coerced to a string. + * + * If no serializers are provided, the test runner's default serializers are used. + */ + serializers?: ReadonlyArray<(value: any) => any> | undefined; + } + interface TestContextPlanOptions { + /** + * The wait time for the plan: + * * If `true`, the plan waits indefinitely for all assertions and subtests to run. + * * If `false`, the plan performs an immediate check after the test function completes, + * without waiting for any pending assertions or subtests. + * Any assertions or subtests that complete after this check will not be counted towards the plan. + * * If a number, it specifies the maximum wait time in milliseconds + * before timing out while waiting for expected assertions and subtests to be matched. + * If the timeout is reached, the test will fail. + * @default false + */ + wait?: boolean | number | undefined; + } + interface TestContextWaitForOptions { + /** + * The number of milliseconds to wait after an unsuccessful + * invocation of `condition` before trying again. + * @default 50 + */ + interval?: number | undefined; + /** + * The poll timeout in milliseconds. If `condition` has not + * succeeded by the time this elapses, an error occurs. + * @default 1000 + */ + timeout?: number | undefined; + } + /** + * An instance of `SuiteContext` is passed to each suite function in order to + * interact with the test runner. However, the `SuiteContext` constructor is not + * exposed as part of the API. + * @since v18.7.0, v16.17.0 + */ + interface SuiteContext { + /** + * The absolute path of the test file that created the current suite. If a test file imports + * additional modules that generate suites, the imported suites will return the path of the root test file. + * @since v22.6.0 + */ + readonly filePath: string | undefined; + /** + * The name of the suite and each of its ancestors, separated by `>`. + * @since v22.3.0, v20.16.0 + */ + readonly fullName: string; + /** + * The name of the suite. + * @since v18.8.0, v16.18.0 + */ + readonly name: string; + /** + * Can be used to abort test subtasks when the test has been aborted. + * @since v18.7.0, v16.17.0 + */ + readonly signal: AbortSignal; + /** + * Indicates whether the suite and all of its subtests have passed. + * @since v26.1.0 + */ + readonly passed: boolean; + /** + * The attempt number of the suite. This value is zero-based, so the first attempt is `0`, + * the second attempt is `1`, and so on. This property is useful in conjunction with the + * `--test-rerun-failures` option to determine the attempt number of the current run. + * @since v26.1.0 + */ + readonly attempt: number; + /** + * Output a diagnostic message. This is typically used for logging information + * about the current suite or its tests. + * + * ```js + * test.describe('my suite', (suite) => { + * suite.diagnostic('Suite diagnostic message'); + * }); + * ``` + * @since v26.1.0 + * @param message A diagnostic message to output. + */ + diagnostic(message: string): void; + /** + * Write a log message to the output. The resulting `'test:log'` event is + * emitted immediately, in the order that the tests execute. + * + * ```js + * test.describe('my suite', (suite) => { + * suite.log('Suite log message'); + * }); + * ``` + * @since v26.6.0 + * @param message Message to be reported. + * @param data Optional structured payload attached to the message. The test + * runner passes it through untouched. + */ + log(message: string, data?: unknown): void; + } + interface TestOptions { + /** + * If a number is provided, then that many tests would run in parallel. + * If truthy, it would run (number of cpu cores - 1) tests in parallel. + * For subtests, it will be `Infinity` tests in parallel. + * If falsy, it would only run one test at a time. + * If unspecified, subtests inherit this value from their parent. + * @default false + */ + concurrency?: number | boolean | undefined; + /** + * If truthy, the test is expected to fail. If a non-empty string is provided, that string is displayed + * in the test results as the reason why the test is expected to fail. If a + * `RegExp`, `Function`, `Object`, or `Error` is provided directly (without wrapping in `{ match: … }`), the test passes + * only if the thrown error matches, following the behavior of + * `assert.throws`. To provide both a reason and validation, pass an object + * with `label` (string) and `match` (RegExp, Function, Object, or Error). + * @since v25.5.0 + * @default false + */ + expectFailure?: boolean | string | AssertPredicate | undefined; + /** + * If truthy, and the test context is configured to run `only` tests, then this test will be + * run. Otherwise, the test is skipped. + * @default false + */ + only?: boolean | undefined; + /** + * Allows aborting an in-progress test. + * @since v18.8.0 + */ + signal?: AbortSignal | undefined; + /** + * If truthy, the test is skipped. If a string is provided, that string is displayed in the + * test results as the reason for skipping the test. + * @default false + */ + skip?: boolean | string | undefined; + /** + * An array of string labels associated with the test. + * Used together with `--experimental-test-tag-filter` to filter which + * tests run. Tags inherit from suites to nested tests by union. See + * [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + * @default [] + * @since v26.2.0 + */ + tags?: readonly string[] | undefined; + /** + * A number of milliseconds the test will fail after. If unspecified, subtests inherit this + * value from their parent. + * @default Infinity + * @since v18.7.0 + */ + timeout?: number | undefined; + /** + * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in + * the test results as the reason why the test is `TODO`. + * @default false + */ + todo?: boolean | string | undefined; + /** + * The number of assertions and subtests expected to be run in the test. + * If the number of assertions run in the test does not match the number + * specified in the plan, the test will fail. + * @default undefined + * @since v22.2.0 + */ + plan?: number | undefined; + } + /** + * This function creates a hook that runs before executing a suite. + * + * ```js + * describe('tests', async () => { + * before(() => console.log('about to run some test')); + * it('is a subtest', () => { + * // Some relevant assertion here + * }); + * }); + * ``` + * @since v18.8.0, v16.18.0 + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + */ + function before(fn?: HookFn, options?: HookOptions): void; + /** + * This function creates a hook that runs after executing a suite. + * + * ```js + * describe('tests', async () => { + * after(() => console.log('finished running tests')); + * it('is a subtest', () => { + * // Some relevant assertion here + * }); + * }); + * ``` + * @since v18.8.0, v16.18.0 + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + */ + function after(fn?: HookFn, options?: HookOptions): void; + /** + * This function creates a hook that runs before each test in the current suite. + * + * ```js + * describe('tests', async () => { + * beforeEach(() => console.log('about to run a test')); + * it('is a subtest', () => { + * // Some relevant assertion here + * }); + * }); + * ``` + * @since v18.8.0, v16.18.0 + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + */ + function beforeEach(fn?: HookFn, options?: HookOptions): void; + /** + * This function creates a hook that runs after each test in the current suite. + * The `afterEach()` hook is run even if the test fails. + * + * ```js + * describe('tests', async () => { + * afterEach(() => console.log('finished running a test')); + * it('is a subtest', () => { + * // Some relevant assertion here + * }); + * }); + * ``` + * @since v18.8.0, v16.18.0 + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + */ + function afterEach(fn?: HookFn, options?: HookOptions): void; + /** + * The hook function. The first argument is the context in which the hook is called. + * If the hook uses callbacks, the callback function is passed as the second argument. + */ + type HookFn = (c: TestContext | SuiteContext, done: (result?: any) => void) => any; + /** + * The hook function. The first argument is a `TestContext` object. + * If the hook uses callbacks, the callback function is passed as the second argument. + */ + type TestContextHookFn = (t: TestContext, done: (result?: any) => void) => any; + /** + * Configuration options for hooks. + * @since v18.8.0 + */ + interface HookOptions { + /** + * Allows aborting an in-progress hook. + */ + signal?: AbortSignal | undefined; + /** + * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this + * value from their parent. + * @default Infinity + */ + timeout?: number | undefined; + } + interface MockFunctionOptions { + /** + * The number of times that the mock will use the behavior of `implementation`. + * Once the mock function has been called `times` times, + * it will automatically restore the behavior of `original`. + * This value must be an integer greater than zero. + * @default Infinity + */ + times?: number | undefined; + } + interface MockMethodOptions extends MockFunctionOptions { + /** + * If `true`, `object[methodName]` is treated as a getter. + * This option cannot be used with the `setter` option. + */ + getter?: boolean | undefined; + /** + * If `true`, `object[methodName]` is treated as a setter. + * This option cannot be used with the `getter` option. + */ + setter?: boolean | undefined; + } + type Mock = F & { + mock: MockFunctionContext; + }; + interface MockModuleOptions { + /** + * If false, each call to `require()` or `import()` generates a new mock module. + * If true, subsequent calls will return the same module mock, and the mock module is inserted into the CommonJS cache. + * @default false + */ + cache?: boolean | undefined; + /** + * Optional mocked exports. The `default` property, if + * provided, is used as the mocked module's default export. All other own + * enumerable properties are used as named exports. + * **This option cannot be used with `defaultExport` or `namedExports`.** + * * If the mock is a CommonJS or builtin module, `exports.default` is used as + * the value of `module.exports`. + * * If `exports.default` is not provided for a CommonJS or builtin mock, + * `module.exports` defaults to an empty object. + * * If named exports are provided with a non-object default export, the mock + * throws an exception when used as a CommonJS or builtin module. + */ + exports?: object | undefined; + /** + * An optional value used as the mocked module's default + * export. If this value is not provided, ESM mocks do not include a default + * export. If the mock is a CommonJS or builtin module, this setting is used as + * the value of `module.exports`. If this value is not provided, CJS and builtin + * mocks use an empty object as the value of `module.exports`. + * **This option cannot be used with `options.exports`.** + * This option is deprecated and will be removed in a later version. + * Prefer `options.exports.default`. + * @deprecated + */ + defaultExport?: any; + /** + * An optional object whose keys and values are used to + * create the named exports of the mock module. If the mock is a CommonJS or + * builtin module, these values are copied onto `module.exports`. Therefore, if a + * mock is created with both named exports and a non-object default export, the + * mock will throw an exception when used as a CJS or builtin module. + * **This option cannot be used with `options.exports`.** + * This option is deprecated and will be removed in a later version. + * Prefer `options.exports`. + * @deprecated + */ + namedExports?: object | undefined; + } + /** + * The `MockTracker` class is used to manage mocking functionality. The test runner + * module provides a top level `mock` export which is a `MockTracker` instance. + * Each test also provides its own `MockTracker` instance via the test context's `mock` property. + * @since v19.1.0, v18.13.0 + */ + interface MockTracker { + /** + * This function is used to create a mock function. + * + * The following example creates a mock function that increments a counter by one + * on each invocation. The `times` option is used to modify the mock behavior such + * that the first two invocations add two to the counter instead of one. + * + * ```js + * test('mocks a counting function', (t) => { + * let cnt = 0; + * + * function addOne() { + * cnt++; + * return cnt; + * } + * + * function addTwo() { + * cnt += 2; + * return cnt; + * } + * + * const fn = t.mock.fn(addOne, addTwo, { times: 2 }); + * + * assert.strictEqual(fn(), 2); + * assert.strictEqual(fn(), 4); + * assert.strictEqual(fn(), 5); + * assert.strictEqual(fn(), 6); + * }); + * ``` + * @since v19.1.0, v18.13.0 + * @param original An optional function to create a mock on. + * @param implementation An optional function used as the mock implementation for `original`. This is useful for creating mocks that exhibit one behavior for a specified number of calls and + * then restore the behavior of `original`. + * @param options Optional configuration options for the mock function. + * @return The mocked function. The mocked function contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the + * behavior of the mocked function. + */ + fn undefined>( + original?: F, + options?: MockFunctionOptions, + ): Mock; + fn undefined, Implementation extends Function = F>( + original?: F, + implementation?: Implementation, + options?: MockFunctionOptions, + ): Mock; + /** + * This function is used to create a mock on an existing object method. The + * following example demonstrates how a mock is created on an existing object + * method. + * + * ```js + * test('spies on an object method', (t) => { + * const number = { + * value: 5, + * subtract(a) { + * return this.value - a; + * }, + * }; + * + * t.mock.method(number, 'subtract'); + * assert.strictEqual(number.subtract.mock.calls.length, 0); + * assert.strictEqual(number.subtract(3), 2); + * assert.strictEqual(number.subtract.mock.calls.length, 1); + * + * const call = number.subtract.mock.calls[0]; + * + * assert.deepStrictEqual(call.arguments, [3]); + * assert.strictEqual(call.result, 2); + * assert.strictEqual(call.error, undefined); + * assert.strictEqual(call.target, undefined); + * assert.strictEqual(call.this, number); + * }); + * ``` + * @since v19.1.0, v18.13.0 + * @param object The object whose method is being mocked. + * @param methodName The identifier of the method on `object` to mock. If `object[methodName]` is not a function, an error is thrown. + * @param implementation An optional function used as the mock implementation for `object[methodName]`. + * @param options Optional configuration options for the mock method. + * @return The mocked method. The mocked method contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the + * behavior of the mocked method. + */ + method< + MockedObject extends object, + MethodName extends FunctionPropertyNames, + >( + object: MockedObject, + methodName: MethodName, + options?: MockFunctionOptions, + ): MockedObject[MethodName] extends Function ? Mock + : never; + method< + MockedObject extends object, + MethodName extends FunctionPropertyNames, + Implementation extends Function, + >( + object: MockedObject, + methodName: MethodName, + implementation: Implementation, + options?: MockFunctionOptions, + ): MockedObject[MethodName] extends Function ? Mock + : never; + method( + object: MockedObject, + methodName: keyof MockedObject, + options: MockMethodOptions, + ): Mock; + method( + object: MockedObject, + methodName: keyof MockedObject, + implementation: Function, + options: MockMethodOptions, + ): Mock; + /** + * This function is syntax sugar for `MockTracker.method` with `options.getter` set to `true`. + * @since v19.3.0, v18.13.0 + */ + getter< + MockedObject extends object, + MethodName extends keyof MockedObject, + >( + object: MockedObject, + methodName: MethodName, + options?: MockFunctionOptions, + ): Mock<() => MockedObject[MethodName]>; + getter< + MockedObject extends object, + MethodName extends keyof MockedObject, + Implementation extends Function, + >( + object: MockedObject, + methodName: MethodName, + implementation?: Implementation, + options?: MockFunctionOptions, + ): Mock<(() => MockedObject[MethodName]) | Implementation>; + /** + * This function is syntax sugar for `MockTracker.method` with `options.setter` set to `true`. + * @since v19.3.0, v18.13.0 + */ + setter< + MockedObject extends object, + MethodName extends keyof MockedObject, + >( + object: MockedObject, + methodName: MethodName, + options?: MockFunctionOptions, + ): Mock<(value: MockedObject[MethodName]) => void>; + setter< + MockedObject extends object, + MethodName extends keyof MockedObject, + Implementation extends Function, + >( + object: MockedObject, + methodName: MethodName, + implementation?: Implementation, + options?: MockFunctionOptions, + ): Mock<((value: MockedObject[MethodName]) => void) | Implementation>; + /** + * This function is used to mock the exports of ECMAScript modules, CommonJS modules, JSON modules, and + * Node.js builtin modules. Any references to the original module prior to mocking are not impacted. In + * order to enable module mocking, Node.js must be started with the + * [`--experimental-test-module-mocks`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--experimental-test-module-mocks) + * command-line flag. + * + * **Note**: [module customization hooks](https://nodejs.org/docs/latest-v26.x/api/module.html#customization-hooks) registered via the **synchronous** API effect resolution of + * the `specifier` provided to `mock.module`. Customization hooks registered via the **asynchronous** + * API are currently ignored (because the test runner's loader is synchronous, and node does not + * support multi-chain / cross-chain loading). + * + * The following example demonstrates how a mock is created for a module. + * + * ```js + * test('mocks a builtin module in both module systems', async (t) => { + * // Create a mock of 'node:readline' with a named export named 'foo', which + * // does not exist in the original 'node:readline' module. + * const mock = t.mock.module('node:readline', { + * exports: { foo: () => 42 }, + * }); + * + * let esmImpl = await import('node:readline'); + * let cjsImpl = require('node:readline'); + * + * // cursorTo() is an export of the original 'node:readline' module. + * assert.strictEqual(esmImpl.cursorTo, undefined); + * assert.strictEqual(cjsImpl.cursorTo, undefined); + * assert.strictEqual(esmImpl.fn(), 42); + * assert.strictEqual(cjsImpl.fn(), 42); + * + * mock.restore(); + * + * // The mock is restored, so the original builtin module is returned. + * esmImpl = await import('node:readline'); + * cjsImpl = require('node:readline'); + * + * assert.strictEqual(typeof esmImpl.cursorTo, 'function'); + * assert.strictEqual(typeof cjsImpl.cursorTo, 'function'); + * assert.strictEqual(esmImpl.fn, undefined); + * assert.strictEqual(cjsImpl.fn, undefined); + * }); + * ``` + * @since v22.3.0 + * @experimental + * @param specifier A string identifying the module to mock. + * @param options Optional configuration options for the mock module. + */ + module(specifier: string | URL, options?: MockModuleOptions): MockModuleContext; + /** + * Creates a mock for a property value on an object. This allows you to track and control access to a specific property, + * including how many times it is read (getter) or written (setter), and to restore the original value after mocking. + * + * ```js + * test('mocks a property value', (t) => { + * const obj = { foo: 42 }; + * const prop = t.mock.property(obj, 'foo', 100); + * + * assert.strictEqual(obj.foo, 100); + * assert.strictEqual(prop.mock.accessCount(), 1); + * assert.strictEqual(prop.mock.accesses[0].type, 'get'); + * assert.strictEqual(prop.mock.accesses[0].value, 100); + * + * obj.foo = 200; + * assert.strictEqual(prop.mock.accessCount(), 2); + * assert.strictEqual(prop.mock.accesses[1].type, 'set'); + * assert.strictEqual(prop.mock.accesses[1].value, 200); + * + * prop.mock.restore(); + * assert.strictEqual(obj.foo, 42); + * }); + * ``` + * @since v24.3.0 + * @param object The object whose value is being mocked. + * @param propertyName The identifier of the property on `object` to mock. + * @param value An optional value used as the mock value + * for `object[propertyName]`. **Default:** The original property value. + * @returns A proxy to the mocked object. The mocked object contains a + * special `mock` property, which is an instance of [`MockPropertyContext`][], and + * can be used for inspecting and changing the behavior of the mocked property. + */ + property< + MockedObject extends object, + PropertyName extends keyof MockedObject, + >( + object: MockedObject, + property: PropertyName, + value?: MockedObject[PropertyName], + ): MockedObject & { mock: MockPropertyContext }; + /** + * This function restores the default behavior of all mocks that were previously + * created by this `MockTracker` and disassociates the mocks from the `MockTracker` instance. Once disassociated, the mocks can still be used, but the `MockTracker` instance can no longer be + * used to reset their behavior or + * otherwise interact with them. + * + * After each test completes, this function is called on the test context's `MockTracker`. If the global `MockTracker` is used extensively, calling this + * function manually is recommended. + * @since v19.1.0, v18.13.0 + */ + reset(): void; + /** + * This function restores the default behavior of all mocks that were previously + * created by this `MockTracker`. Unlike `mock.reset()`, `mock.restoreAll()` does + * not disassociate the mocks from the `MockTracker` instance. + * @since v19.1.0, v18.13.0 + */ + restoreAll(): void; + readonly timers: MockTimers; + } + const mock: MockTracker; + interface MockFunctionCall< + F extends Function, + ReturnType = F extends (...args: any) => infer T ? T + : F extends abstract new(...args: any) => infer T ? T + : unknown, + Args = F extends (...args: infer Y) => any ? Y + : F extends abstract new(...args: infer Y) => any ? Y + : unknown[], + > { + /** + * An array of the arguments passed to the mock function. + */ + arguments: Args; + /** + * If the mocked function threw then this property contains the thrown value. + */ + error: unknown | undefined; + /** + * The value returned by the mocked function. + * + * If the mocked function threw, it will be `undefined`. + */ + result: ReturnType | undefined; + /** + * An `Error` object whose stack can be used to determine the callsite of the mocked function invocation. + */ + stack: Error; + /** + * If the mocked function is a constructor, this field contains the class being constructed. + * Otherwise this will be `undefined`. + */ + target: F extends abstract new(...args: any) => any ? F : undefined; + /** + * The mocked function's `this` value. + */ + this: unknown; + } + /** + * The `MockFunctionContext` class is used to inspect or manipulate the behavior of + * mocks created via the `MockTracker` APIs. + * @since v19.1.0, v18.13.0 + */ + interface MockFunctionContext { + /** + * A getter that returns a copy of the internal array used to track calls to the + * mock. Each entry in the array is an object with the following properties. + * @since v19.1.0, v18.13.0 + */ + readonly calls: MockFunctionCall[]; + /** + * This function returns the number of times that this mock has been invoked. This + * function is more efficient than checking `ctx.calls.length` because `ctx.calls` is a getter that creates a copy of the internal call tracking array. + * @since v19.1.0, v18.13.0 + * @return The number of times that this mock has been invoked. + */ + callCount(): number; + /** + * This function is used to change the behavior of an existing mock. + * + * The following example creates a mock function using `t.mock.fn()`, calls the + * mock function, and then changes the mock implementation to a different function. + * + * ```js + * test('changes a mock behavior', (t) => { + * let cnt = 0; + * + * function addOne() { + * cnt++; + * return cnt; + * } + * + * function addTwo() { + * cnt += 2; + * return cnt; + * } + * + * const fn = t.mock.fn(addOne); + * + * assert.strictEqual(fn(), 1); + * fn.mock.mockImplementation(addTwo); + * assert.strictEqual(fn(), 3); + * assert.strictEqual(fn(), 5); + * }); + * ``` + * @since v19.1.0, v18.13.0 + * @param implementation The function to be used as the mock's new implementation. + */ + mockImplementation(implementation: F): void; + /** + * This function is used to change the behavior of an existing mock for a single + * invocation. Once invocation `onCall` has occurred, the mock will revert to + * whatever behavior it would have used had `mockImplementationOnce()` not been + * called. + * + * The following example creates a mock function using `t.mock.fn()`, calls the + * mock function, changes the mock implementation to a different function for the + * next invocation, and then resumes its previous behavior. + * + * ```js + * test('changes a mock behavior once', (t) => { + * let cnt = 0; + * + * function addOne() { + * cnt++; + * return cnt; + * } + * + * function addTwo() { + * cnt += 2; + * return cnt; + * } + * + * const fn = t.mock.fn(addOne); + * + * assert.strictEqual(fn(), 1); + * fn.mock.mockImplementationOnce(addTwo); + * assert.strictEqual(fn(), 3); + * assert.strictEqual(fn(), 4); + * }); + * ``` + * @since v19.1.0, v18.13.0 + * @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`. + * @param onCall The invocation number that will use `implementation`. If the specified invocation has already occurred then an exception is thrown. + */ + mockImplementationOnce(implementation: F, onCall?: number): void; + /** + * Resets the call history of the mock function. + * @since v19.3.0, v18.13.0 + */ + resetCalls(): void; + /** + * Resets the implementation of the mock function to its original behavior. The + * mock can still be used after calling this function. + * @since v19.1.0, v18.13.0 + */ + restore(): void; + } + /** + * @since v22.3.0 + * @experimental + */ + interface MockModuleContext { + /** + * Resets the implementation of the mock module. + * @since v22.3.0 + */ + restore(): void; + } + /** + * @since v24.3.0 + */ + class MockPropertyContext { + /** + * A getter that returns a copy of the internal array used to track accesses (get/set) to + * the mocked property. Each entry in the array is an object with the following properties: + */ + readonly accesses: Array<{ + type: "get" | "set"; + value: PropertyType; + stack: Error; + }>; + /** + * This function returns the number of times that the property was accessed. + * This function is more efficient than checking `ctx.accesses.length` because + * `ctx.accesses` is a getter that creates a copy of the internal access tracking array. + * @returns The number of times that the property was accessed (read or written). + */ + accessCount(): number; + /** + * This function is used to change the value returned by the mocked property getter. + * @param value The new value to be set as the mocked property value. + */ + mockImplementation(value: PropertyType): void; + /** + * This function is used to change the behavior of an existing mock for a single + * invocation. Once invocation `onAccess` has occurred, the mock will revert to + * whatever behavior it would have used had `mockImplementationOnce()` not been + * called. + * + * The following example creates a mock function using `t.mock.property()`, calls the + * mock property, changes the mock implementation to a different value for the + * next invocation, and then resumes its previous behavior. + * + * ```js + * test('changes a mock behavior once', (t) => { + * const obj = { foo: 1 }; + * + * const prop = t.mock.property(obj, 'foo', 5); + * + * assert.strictEqual(obj.foo, 5); + * prop.mock.mockImplementationOnce(25); + * assert.strictEqual(obj.foo, 25); + * assert.strictEqual(obj.foo, 5); + * }); + * ``` + * @param value The value to be used as the mock's + * implementation for the invocation number specified by `onAccess`. + * @param onAccess The invocation number that will use `value`. If + * the specified invocation has already occurred then an exception is thrown. + * **Default:** The number of the next invocation. + */ + mockImplementationOnce(value: PropertyType, onAccess?: number): void; + /** + * Resets the access history of the mocked property. + */ + resetAccesses(): void; + /** + * Resets the implementation of the mock property to its original behavior. The + * mock can still be used after calling this function. + */ + restore(): void; + } + interface MockTimersOptions { + apis: ReadonlyArray<"setInterval" | "setTimeout" | "setImmediate" | "Date">; + now?: number | Date | undefined; + } + /** + * Mocking timers is a technique commonly used in software testing to simulate and + * control the behavior of timers, such as `setInterval` and `setTimeout`, + * without actually waiting for the specified time intervals. + * + * The MockTimers API also allows for mocking of the `Date` constructor and + * `setImmediate`/`clearImmediate` functions. + * + * The `MockTracker` provides a top-level `timers` export + * which is a `MockTimers` instance. + * @since v20.4.0 + */ + interface MockTimers { + /** + * Enables timer mocking for the specified timers. + * + * **Note:** When you enable mocking for a specific timer, its associated + * clear function will also be implicitly mocked. + * + * **Note:** Mocking `Date` will affect the behavior of the mocked timers + * as they use the same internal clock. + * + * Example usage without setting initial time: + * + * ```js + * import { mock } from 'node:test'; + * mock.timers.enable({ apis: ['setInterval', 'Date'], now: 1234 }); + * ``` + * + * The above example enables mocking for the `Date` constructor, `setInterval` timer and + * implicitly mocks the `clearInterval` function. Only the `Date` constructor from `globalThis`, + * `setInterval` and `clearInterval` functions from `node:timers`, `node:timers/promises`, and `globalThis` will be mocked. + * + * Example usage with initial time set + * + * ```js + * import { mock } from 'node:test'; + * mock.timers.enable({ apis: ['Date'], now: 1000 }); + * ``` + * + * Example usage with initial Date object as time set + * + * ```js + * import { mock } from 'node:test'; + * mock.timers.enable({ apis: ['Date'], now: new Date() }); + * ``` + * + * Alternatively, if you call `mock.timers.enable()` without any parameters: + * + * All timers (`'setInterval'`, `'clearInterval'`, `'Date'`, `'setImmediate'`, `'clearImmediate'`, `'setTimeout'`, and `'clearTimeout'`) + * will be mocked. + * + * The `setInterval`, `clearInterval`, `setTimeout`, and `clearTimeout` functions from `node:timers`, `node:timers/promises`, + * and `globalThis` will be mocked. + * The `Date` constructor from `globalThis` will be mocked. + * + * If there is no initial epoch set, the initial date will be based on 0 in the Unix epoch. This is `January 1st, 1970, 00:00:00 UTC`. You can + * set an initial date by passing a now property to the `.enable()` method. This value will be used as the initial date for the mocked Date + * object. It can either be a positive integer, or another Date object. + * @since v20.4.0 + */ + enable(options?: MockTimersOptions): void; + /** + * Sets the current Unix timestamp that will be used as reference for any mocked + * `Date` objects. + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('runAll functions following the given order', (context) => { + * const now = Date.now(); + * const setTime = 1000; + * // Date.now is not mocked + * assert.deepStrictEqual(Date.now(), now); + * + * context.mock.timers.enable({ apis: ['Date'] }); + * context.mock.timers.setTime(setTime); + * // Date.now is now 1000 + * assert.strictEqual(Date.now(), setTime); + * }); + * ``` + * @since v21.2.0, v20.11.0 + */ + setTime(milliseconds: number): void; + /** + * This function restores the default behavior of all mocks that were previously + * created by this `MockTimers` instance and disassociates the mocks + * from the `MockTracker` instance. + * + * **Note:** After each test completes, this function is called on + * the test context's `MockTracker`. + * + * ```js + * import { mock } from 'node:test'; + * mock.timers.reset(); + * ``` + * @since v20.4.0 + */ + reset(): void; + /** + * Advances time for all mocked timers. + * + * **Note:** This diverges from how `setTimeout` in Node.js behaves and accepts + * only positive numbers. In Node.js, `setTimeout` with negative numbers is + * only supported for web compatibility reasons. + * + * The following example mocks a `setTimeout` function and + * by using `.tick` advances in + * time triggering all pending timers. + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { + * const fn = context.mock.fn(); + * + * context.mock.timers.enable({ apis: ['setTimeout'] }); + * + * setTimeout(fn, 9999); + * + * assert.strictEqual(fn.mock.callCount(), 0); + * + * // Advance in time + * context.mock.timers.tick(9999); + * + * assert.strictEqual(fn.mock.callCount(), 1); + * }); + * ``` + * + * Alternativelly, the `.tick` function can be called many times + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { + * const fn = context.mock.fn(); + * context.mock.timers.enable({ apis: ['setTimeout'] }); + * const nineSecs = 9000; + * setTimeout(fn, nineSecs); + * + * const twoSeconds = 3000; + * context.mock.timers.tick(twoSeconds); + * context.mock.timers.tick(twoSeconds); + * context.mock.timers.tick(twoSeconds); + * + * assert.strictEqual(fn.mock.callCount(), 1); + * }); + * ``` + * + * Advancing time using `.tick` will also advance the time for any `Date` object + * created after the mock was enabled (if `Date` was also set to be mocked). + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { + * const fn = context.mock.fn(); + * + * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] }); + * setTimeout(fn, 9999); + * + * assert.strictEqual(fn.mock.callCount(), 0); + * assert.strictEqual(Date.now(), 0); + * + * // Advance in time + * context.mock.timers.tick(9999); + * assert.strictEqual(fn.mock.callCount(), 1); + * assert.strictEqual(Date.now(), 9999); + * }); + * ``` + * @since v20.4.0 + */ + tick(milliseconds: number): void; + /** + * Triggers all pending mocked timers immediately. If the `Date` object is also + * mocked, it will also advance the `Date` object to the furthest timer's time. + * + * The example below triggers all pending timers immediately, + * causing them to execute without any delay. + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('runAll functions following the given order', (context) => { + * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] }); + * const results = []; + * setTimeout(() => results.push(1), 9999); + * + * // Notice that if both timers have the same timeout, + * // the order of execution is guaranteed + * setTimeout(() => results.push(3), 8888); + * setTimeout(() => results.push(2), 8888); + * + * assert.deepStrictEqual(results, []); + * + * context.mock.timers.runAll(); + * assert.deepStrictEqual(results, [3, 2, 1]); + * // The Date object is also advanced to the furthest timer's time + * assert.strictEqual(Date.now(), 9999); + * }); + * ``` + * + * **Note:** The `runAll()` function is specifically designed for + * triggering timers in the context of timer mocking. + * It does not have any effect on real-time system + * clocks or actual timers outside of the mocking environment. + * @since v20.4.0 + */ + runAll(): void; + /** + * Calls {@link MockTimers.reset()}. + */ + [Symbol.dispose](): void; + } + /** + * An object whose methods are used to configure available assertions on the + * `TestContext` objects in the current process. The methods from `node:assert` + * and snapshot testing functions are available by default. + * + * It is possible to apply the same configuration to all files by placing common + * configuration code in a module + * preloaded with `--require` or `--import`. + * @since v22.14.0 + */ + namespace assert { + /** + * Defines a new assertion function with the provided name and function. If an + * assertion already exists with the same name, it is overwritten. + * @since v22.14.0 + */ + function register(name: string, fn: (this: TestContext, ...args: any[]) => void): void; + } + /** + * @since v22.3.0 + */ + namespace snapshot { + /** + * This function is used to customize the default serialization mechanism used by the test runner. + * + * By default, the test runner performs serialization by calling `JSON.stringify(value, null, 2)` on the provided value. + * `JSON.stringify()` does have limitations regarding circular structures and supported data types. + * If a more robust serialization mechanism is required, this function should be used to specify a list of custom serializers. + * + * Serializers are called in order, with the output of the previous serializer passed as input to the next. + * The final result must be a string value. + * @since v22.3.0 + * @param serializers An array of synchronous functions used as the default serializers for snapshot tests. + */ + function setDefaultSnapshotSerializers(serializers: ReadonlyArray<(value: any) => any>): void; + /** + * This function is used to set a custom resolver for the location of the snapshot file used for snapshot testing. + * By default, the snapshot filename is the same as the entry point filename with `.snapshot` appended. + * @since v22.3.0 + * @param fn A function used to compute the location of the snapshot file. + * The function receives the path of the test file as its only argument. If the + * test is not associated with a file (for example in the REPL), the input is + * undefined. `fn()` must return a string specifying the location of the snapshot file. + */ + function setResolveSnapshotPath(fn: (path: string | undefined) => string): void; + } + } + type FunctionPropertyNames = { + [K in keyof T]: T[K] extends Function ? K : never; + }[keyof T]; + export = test; +} diff --git a/node_modules/@types/node/test/reporters.d.ts b/node_modules/@types/node/test/reporters.d.ts new file mode 100644 index 0000000..36ca28f --- /dev/null +++ b/node_modules/@types/node/test/reporters.d.ts @@ -0,0 +1,60 @@ +declare module "node:test/reporters" { + import { Transform, TransformOptions } from "node:stream"; + import { EventData } from "node:test"; + type TestEvent = + | { type: "test:coverage"; data: EventData.TestCoverage } + | { type: "test:complete"; data: EventData.TestComplete } + | { type: "test:dequeue"; data: EventData.TestDequeue } + | { type: "test:diagnostic"; data: EventData.TestDiagnostic } + | { type: "test:enqueue"; data: EventData.TestEnqueue } + | { type: "test:fail"; data: EventData.TestFail } + | { type: "test:interrupted"; data: EventData.TestInterrupted } + | { type: "test:log"; data: EventData.TestLog } + | { type: "test:pass"; data: EventData.TestPass } + | { type: "test:plan"; data: EventData.TestPlan } + | { type: "test:start"; data: EventData.TestStart } + | { type: "test:stderr"; data: EventData.TestStderr } + | { type: "test:stdout"; data: EventData.TestStdout } + | { type: "test:summary"; data: EventData.TestSummary } + | { type: "test:watch:drained"; data: undefined } + | { type: "test:watch:restarted"; data: undefined }; + interface ReporterConstructorWrapper Transform> { + new(...args: ConstructorParameters): InstanceType; + (...args: ConstructorParameters): InstanceType; + } + /** + * The `dot` reporter outputs the test results in a compact format, + * where each passing test is represented by a `.`, + * and each failing test is represented by a `X`. + * @since v20.0.0 + */ + function dot(source: AsyncIterable): NodeJS.AsyncIterator; + /** + * The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format. + * @since v20.0.0 + */ + function tap(source: AsyncIterable): NodeJS.AsyncIterator; + class SpecReporter extends Transform { + constructor(); + } + /** + * The `spec` reporter outputs the test results in a human-readable format. + * @since v20.0.0 + */ + const spec: ReporterConstructorWrapper; + /** + * The `junit` reporter outputs test results in a jUnit XML format. + * @since v21.0.0 + */ + function junit(source: AsyncIterable): NodeJS.AsyncIterator; + class LcovReporter extends Transform { + constructor(options?: Omit); + } + /** + * The `lcov` reporter outputs test coverage when used with the + * [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--experimental-test-coverage) flag. + * @since v22.0.0 + */ + const lcov: ReporterConstructorWrapper; + export { dot, junit, lcov, spec, tap, TestEvent }; +} diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts new file mode 100644 index 0000000..5b74b89 --- /dev/null +++ b/node_modules/@types/node/timers.d.ts @@ -0,0 +1,149 @@ +declare module "node:timers" { + import { Abortable } from "node:events"; + import * as promises from "node:timers/promises"; + export interface TimerOptions extends Abortable { + /** + * Set to `false` to indicate that the scheduled `Timeout` + * should not require the Node.js event loop to remain active. + * @default true + */ + ref?: boolean | undefined; + } + global { + namespace NodeJS { + /** + * This object is created internally and is returned from `setImmediate()`. It + * can be passed to `clearImmediate()` in order to cancel the scheduled + * actions. + * + * By default, when an immediate is scheduled, the Node.js event loop will continue + * running as long as the immediate is active. The `Immediate` object returned by + * `setImmediate()` exports both `immediate.ref()` and `immediate.unref()` + * functions that can be used to control this default behavior. + */ + interface Immediate extends RefCounted, Disposable { + /** + * If true, the `Immediate` object will keep the Node.js event loop active. + * @since v11.0.0 + */ + hasRef(): boolean; + /** + * When called, requests that the Node.js event loop _not_ exit so long as the + * `Immediate` is active. Calling `immediate.ref()` multiple times will have no + * effect. + * + * By default, all `Immediate` objects are "ref'ed", making it normally unnecessary + * to call `immediate.ref()` unless `immediate.unref()` had been called previously. + * @since v9.7.0 + * @returns a reference to `immediate` + */ + ref(): this; + /** + * When called, the active `Immediate` object will not require the Node.js event + * loop to remain active. If there is no other activity keeping the event loop + * running, the process may exit before the `Immediate` object's callback is + * invoked. Calling `immediate.unref()` multiple times will have no effect. + * @since v9.7.0 + * @returns a reference to `immediate` + */ + unref(): this; + /** + * Cancels the immediate. This is similar to calling `clearImmediate()`. + * @since v20.5.0, v18.18.0 + */ + [Symbol.dispose](): void; + _onImmediate(...args: any[]): void; + } + // Legacy interface used in Node.js v9 and prior + // TODO: remove in a future major version bump + /** @deprecated Use `NodeJS.Timeout` instead. */ + interface Timer extends RefCounted { + hasRef(): boolean; + refresh(): this; + [Symbol.toPrimitive](): number; + } + /** + * This object is created internally and is returned from `setTimeout()` and + * `setInterval()`. It can be passed to either `clearTimeout()` or + * `clearInterval()` in order to cancel the scheduled actions. + * + * By default, when a timer is scheduled using either `setTimeout()` or + * `setInterval()`, the Node.js event loop will continue running as long as the + * timer is active. Each of the `Timeout` objects returned by these functions + * export both `timeout.ref()` and `timeout.unref()` functions that can be used to + * control this default behavior. + */ + interface Timeout extends RefCounted, Disposable, Timer { + /** + * Cancels the timeout. + * @since v0.9.1 + * @legacy Use `clearTimeout()` instead. + * @returns a reference to `timeout` + */ + close(): this; + /** + * If true, the `Timeout` object will keep the Node.js event loop active. + * @since v11.0.0 + */ + hasRef(): boolean; + /** + * When called, requests that the Node.js event loop _not_ exit so long as the + * `Timeout` is active. Calling `timeout.ref()` multiple times will have no effect. + * + * By default, all `Timeout` objects are "ref'ed", making it normally unnecessary + * to call `timeout.ref()` unless `timeout.unref()` had been called previously. + * @since v0.9.1 + * @returns a reference to `timeout` + */ + ref(): this; + /** + * Sets the timer's start time to the current time, and reschedules the timer to + * call its callback at the previously specified duration adjusted to the current + * time. This is useful for refreshing a timer without allocating a new + * JavaScript object. + * + * Using this on a timer that has already called its callback will reactivate the + * timer. + * @since v10.2.0 + * @returns a reference to `timeout` + */ + refresh(): this; + /** + * When called, the active `Timeout` object will not require the Node.js event loop + * to remain active. If there is no other activity keeping the event loop running, + * the process may exit before the `Timeout` object's callback is invoked. Calling + * `timeout.unref()` multiple times will have no effect. + * @since v0.9.1 + * @returns a reference to `timeout` + */ + unref(): this; + /** + * Coerce a `Timeout` to a primitive. The primitive can be used to + * clear the `Timeout`. The primitive can only be used in the + * same thread where the timeout was created. Therefore, to use it + * across `worker_threads` it must first be passed to the correct + * thread. This allows enhanced compatibility with browser + * `setTimeout()` and `setInterval()` implementations. + * @since v14.9.0, v12.19.0 + */ + [Symbol.toPrimitive](): number; + /** + * Cancels the timeout. + * @since v20.5.0, v18.18.0 + */ + [Symbol.dispose](): void; + _onTimeout(...args: any[]): void; + } + } + } + import clearImmediate = globalThis.clearImmediate; + import clearInterval = globalThis.clearInterval; + import clearTimeout = globalThis.clearTimeout; + import setImmediate = globalThis.setImmediate; + import setInterval = globalThis.setInterval; + import setTimeout = globalThis.setTimeout; + export { clearImmediate, clearInterval, clearTimeout, promises, setImmediate, setInterval, setTimeout }; +} +declare module "timers" { + export * from "node:timers"; +} diff --git a/node_modules/@types/node/timers/promises.d.ts b/node_modules/@types/node/timers/promises.d.ts new file mode 100644 index 0000000..8e178ea --- /dev/null +++ b/node_modules/@types/node/timers/promises.d.ts @@ -0,0 +1,93 @@ +declare module "node:timers/promises" { + import { TimerOptions } from "node:timers"; + /** + * ```js + * import { + * setTimeout, + * } from 'node:timers/promises'; + * + * const res = await setTimeout(100, 'result'); + * + * console.log(res); // Prints 'result' + * ``` + * @since v15.0.0 + * @param delay The number of milliseconds to wait before fulfilling the + * promise. **Default:** `1`. + * @param value A value with which the promise is fulfilled. + */ + function setTimeout(delay?: number, value?: T, options?: TimerOptions): Promise; + /** + * ```js + * import { + * setImmediate, + * } from 'node:timers/promises'; + * + * const res = await setImmediate('result'); + * + * console.log(res); // Prints 'result' + * ``` + * @since v15.0.0 + * @param value A value with which the promise is fulfilled. + */ + function setImmediate(value?: T, options?: TimerOptions): Promise; + /** + * Returns an async iterator that generates values in an interval of `delay` ms. + * If `ref` is `true`, you need to call `next()` of async iterator explicitly + * or implicitly to keep the event loop alive. + * + * ```js + * import { + * setInterval, + * } from 'node:timers/promises'; + * + * const interval = 100; + * for await (const startTime of setInterval(interval, Date.now())) { + * const now = Date.now(); + * console.log(now); + * if ((now - startTime) > 1000) + * break; + * } + * console.log(Date.now()); + * ``` + * @since v15.9.0 + * @param delay The number of milliseconds to wait between iterations. + * **Default:** `1`. + * @param value A value with which the iterator returns. + */ + function setInterval(delay?: number, value?: T, options?: TimerOptions): NodeJS.AsyncIterator; + interface Scheduler { + /** + * An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification + * being developed as a standard Web Platform API. + * + * Calling `timersPromises.scheduler.wait(delay, options)` is roughly equivalent + * to calling `timersPromises.setTimeout(delay, undefined, options)` except that + * the `ref` option is not supported. + * + * ```js + * import { scheduler } from 'node:timers/promises'; + * + * await scheduler.wait(1000); // Wait one second before continuing + * ``` + * @since v17.3.0, v16.14.0 + * @experimental + * @param delay The number of milliseconds to wait before resolving the + * promise. + */ + wait(delay: number, options?: { signal?: AbortSignal }): Promise; + /** + * An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification + * being developed as a standard Web Platform API. + * + * Calling `timersPromises.scheduler.yield()` is equivalent to calling + * `timersPromises.setImmediate()` with no arguments. + * @since v17.3.0, v16.14.0 + * @experimental + */ + yield(): Promise; + } + const scheduler: Scheduler; +} +declare module "timers/promises" { + export * from "node:timers/promises"; +} diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts new file mode 100644 index 0000000..773a69f --- /dev/null +++ b/node_modules/@types/node/tls.d.ts @@ -0,0 +1,1232 @@ +declare module "node:tls" { + import { NonSharedBuffer } from "node:buffer"; + import { X509Certificate } from "node:crypto"; + import * as net from "node:net"; + import * as stream from "stream"; + const CLIENT_RENEG_LIMIT: number; + const CLIENT_RENEG_WINDOW: number; + interface Certificate extends NodeJS.Dict { + /** + * Country code. + */ + C?: string | string[]; + /** + * Street. + */ + ST?: string | string[]; + /** + * Locality. + */ + L?: string | string[]; + /** + * Organization. + */ + O?: string | string[]; + /** + * Organizational unit. + */ + OU?: string | string[]; + /** + * Common name. + */ + CN?: string | string[]; + } + interface PeerCertificate { + /** + * `true` if a Certificate Authority (CA), `false` otherwise. + * @since v18.13.0 + */ + ca: boolean; + /** + * The DER encoded X.509 certificate data. + */ + raw: NonSharedBuffer; + /** + * The certificate subject. + */ + subject: Certificate; + /** + * The certificate issuer, described in the same terms as the `subject`. + */ + issuer: Certificate; + /** + * The date-time the certificate is valid from. + */ + valid_from: string; + /** + * The date-time the certificate is valid to. + */ + valid_to: string; + /** + * The certificate serial number, as a hex string. + */ + serialNumber: string; + /** + * The SHA-1 digest of the DER encoded certificate. + * It is returned as a `:` separated hexadecimal string. + */ + fingerprint: string; + /** + * The SHA-256 digest of the DER encoded certificate. + * It is returned as a `:` separated hexadecimal string. + */ + fingerprint256: string; + /** + * The SHA-512 digest of the DER encoded certificate. + * It is returned as a `:` separated hexadecimal string. + */ + fingerprint512: string; + /** + * The extended key usage, a set of OIDs. + */ + ext_key_usage?: string[]; + /** + * A string containing concatenated names for the subject, + * an alternative to the `subject` names. + */ + subjectaltname?: string; + /** + * An array describing the AuthorityInfoAccess, used with OCSP. + */ + infoAccess?: NodeJS.Dict; + /** + * For RSA keys: The RSA bit size. + * + * For EC keys: The key size in bits. + */ + bits?: number; + /** + * The RSA exponent, as a string in hexadecimal number notation. + */ + exponent?: string; + /** + * The RSA modulus, as a hexadecimal string. + */ + modulus?: string; + /** + * The public key. + */ + pubkey?: NonSharedBuffer; + /** + * The ASN.1 name of the OID of the elliptic curve. + * Well-known curves are identified by an OID. + * While it is unusual, it is possible that the curve + * is identified by its mathematical properties, + * in which case it will not have an OID. + */ + asn1Curve?: string; + /** + * The NIST name for the elliptic curve, if it has one + * (not all well-known curves have been assigned names by NIST). + */ + nistCurve?: string; + } + interface DetailedPeerCertificate extends PeerCertificate { + /** + * The issuer certificate object. + * For self-signed certificates, this may be a circular reference. + */ + issuerCertificate: DetailedPeerCertificate; + } + interface CipherNameAndProtocol { + /** + * The cipher name. + */ + name: string; + /** + * SSL/TLS protocol version. + */ + version: string; + /** + * IETF name for the cipher suite. + */ + standardName: string; + } + interface EphemeralKeyInfo { + /** + * The supported types are 'DH' and 'ECDH'. + */ + type: string; + /** + * The name property is available only when type is 'ECDH'. + */ + name?: string | undefined; + /** + * The size of parameter of an ephemeral key exchange. + */ + size: number; + } + interface KeyObject { + /** + * Private keys in PEM format. + */ + pem: string | Buffer; + /** + * Optional passphrase. + */ + passphrase?: string | undefined; + } + interface PxfObject { + /** + * PFX or PKCS12 encoded private key and certificate chain. + */ + buf: string | Buffer; + /** + * Optional passphrase. + */ + passphrase?: string | undefined; + } + interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions { + /** + * If true the TLS socket will be instantiated in server-mode. + * Defaults to false. + */ + isServer?: boolean | undefined; + /** + * An optional net.Server instance. + */ + server?: net.Server | undefined; + /** + * An optional Buffer instance containing a TLS session. + */ + session?: Buffer | undefined; + } + interface TLSSocketEventMap extends net.SocketEventMap { + "keylog": [line: NonSharedBuffer]; + "OCSPResponse": [response: NonSharedBuffer]; + "secure": []; + "secureConnect": []; + "session": [session: NonSharedBuffer]; + } + /** + * Performs transparent encryption of written data and all required TLS + * negotiation. + * + * Instances of `tls.TLSSocket` implement the duplex `Stream` interface. + * + * Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate}) will only return data while the + * connection is open. + * @since v0.11.4 + */ + class TLSSocket extends net.Socket { + /** + * Construct a new tls.TLSSocket object from an existing TCP socket. + */ + constructor(socket: net.Socket | stream.Duplex, options?: TLSSocketOptions); + /** + * This property is `true` if the peer certificate was signed by one of the CAs + * specified when creating the `tls.TLSSocket` instance, otherwise `false`. + * @since v0.11.4 + */ + authorized: boolean; + /** + * The negotiated ALPN protocol. This is `null` before the handshake completes. + * Once the handshake completes, it settles as either the negotiated protocol + * name, or `false` if the peers did not negotiate an ALPN protocol. + * @since v6.0.0 + */ + alpnProtocol: string | false | null; + /** + * Returns the reason why the peer's certificate was not been verified. This + * property is set only when `tlsSocket.authorized === false`. + * @since v0.11.4 + */ + authorizationError: Error; + /** + * Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances. + * @since v0.11.4 + */ + encrypted: true; + /** + * Returns an object representing the local certificate. The returned object has + * some properties corresponding to the fields of the certificate. + * + * See {@link TLSSocket.getPeerCertificate} for an example of the certificate + * structure. + * + * If there is no local certificate, an empty object will be returned. If the + * socket has been destroyed, `null` will be returned. + * @since v11.2.0 + */ + getCertificate(): PeerCertificate | object | null; + /** + * Returns an object containing information on the negotiated cipher suite. + * + * For example, a TLSv1.2 protocol with AES256-SHA cipher: + * + * ```json + * { + * "name": "AES256-SHA", + * "standardName": "TLS_RSA_WITH_AES_256_CBC_SHA", + * "version": "SSLv3" + * } + * ``` + * + * See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information. + * @since v0.11.4 + */ + getCipher(): CipherNameAndProtocol; + /** + * Returns an object describing ephemeral key agreement in [perfect forward + * secrecy](https://nodejs.org/docs/latest-v26.x/api/tls.html#perfect-forward-secrecy) on a client connection. It returns an empty object when the key + * agreement is not ephemeral. As this is only supported on a client socket; + * `null` is returned if called on a server socket. The supported types are `'DH'`, + * `'ECDH'`, and `'TLSGroup'`. For `'DH'` and `'ECDH'`, the object describes peer + * temporary key parameters. For `'TLSGroup'`, the object identifies the negotiated + * TLS Supported Group used for key agreement when a peer temporary key object is + * not available. + * + * The `name` property is available only when type is `'ECDH'` or `'TLSGroup'`. The + * `size` property is not available when type is `'TLSGroup'`. For `'TLSGroup'`, + * `name` is the negotiated TLS Supported Group name. Standardized TLS group names + * and code points are listed in the [IANA TLS Supported Groups registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8). + * + * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`. + * @since v5.0.0 + */ + getEphemeralKeyInfo(): EphemeralKeyInfo | object | null; + /** + * As the `Finished` messages are message digests of the complete handshake + * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can + * be used for external authentication procedures when the authentication + * provided by SSL/TLS is not desired or is not enough. + * + * Corresponds to the `SSL_get_finished` routine in OpenSSL and may be used + * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). + * @since v9.9.0 + * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet. + */ + getFinished(): NonSharedBuffer | undefined; + /** + * Returns an object representing the peer's certificate. If the peer does not + * provide a certificate, an empty object will be returned. If the socket has been + * destroyed, `null` will be returned. + * + * If the full certificate chain was requested, each certificate will include an`issuerCertificate` property containing an object representing its issuer's + * certificate. + * @since v0.11.4 + * @param detailed Include the full certificate chain if `true`, otherwise include just the peer's certificate. + * @return A certificate object. + */ + getPeerCertificate(detailed: true): DetailedPeerCertificate; + getPeerCertificate(detailed?: false): PeerCertificate; + getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; + /** + * As the `Finished` messages are message digests of the complete handshake + * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can + * be used for external authentication procedures when the authentication + * provided by SSL/TLS is not desired or is not enough. + * + * Corresponds to the `SSL_get_peer_finished` routine in OpenSSL and may be used + * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). + * @since v9.9.0 + * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so + * far. + */ + getPeerFinished(): NonSharedBuffer | undefined; + /** + * Returns a string containing the negotiated SSL/TLS protocol version of the + * current connection. The value `'unknown'` will be returned for connected + * sockets that have not completed the handshaking process. The value `null` will + * be returned for server sockets or disconnected client sockets. + * + * Protocol versions are: + * + * * `'SSLv3'` + * * `'TLSv1'` + * * `'TLSv1.1'` + * * `'TLSv1.2'` + * * `'TLSv1.3'` + * + * See the OpenSSL [`SSL_get_version`](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html) documentation for more information. + * @since v5.7.0 + */ + getProtocol(): string | null; + /** + * Returns the TLS session data or `undefined` if no session was + * negotiated. On the client, the data can be provided to the `session` option of {@link connect} to resume the connection. On the server, it may be useful + * for debugging. + * + * See `Session Resumption` for more information. + * + * Note: `getSession()` works only for TLSv1.2 and below. For TLSv1.3, applications + * must use the `'session'` event (it also works for TLSv1.2 and below). + * @since v0.11.4 + */ + getSession(): NonSharedBuffer | undefined; + /** + * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information. + * @since v12.11.0 + * @return List of signature algorithms shared between the server and the client in the order of decreasing preference. + */ + getSharedSigalgs(): string[]; + /** + * For a client, returns the TLS session ticket if one is available, or`undefined`. For a server, always returns `undefined`. + * + * It may be useful for debugging. + * + * See `Session Resumption` for more information. + * @since v0.11.4 + */ + getTLSTicket(): NonSharedBuffer | undefined; + /** + * See `Session Resumption` for more information. + * @since v0.5.6 + * @return `true` if the session was reused, `false` otherwise. + */ + isSessionReused(): boolean; + /** + * The `tlsSocket.renegotiate()` method initiates a TLS renegotiation process. + * Upon completion, the `callback` function will be passed a single argument + * that is either an `Error` (if the request failed) or `null`. + * + * This method can be used to request a peer's certificate after the secure + * connection has been established. + * + * When running as the server, the socket will be destroyed with an error after `handshakeTimeout` timeout. + * + * For TLSv1.3, renegotiation cannot be initiated, it is not supported by the + * protocol. + * @since v0.11.8 + * @param callback If `renegotiate()` returned `true`, callback is attached once to the `'secure'` event. If `renegotiate()` returned `false`, `callback` will be called in the next tick with + * an error, unless the `tlsSocket` has been destroyed, in which case `callback` will not be called at all. + * @return `true` if renegotiation was initiated, `false` otherwise. + */ + renegotiate( + options: { + rejectUnauthorized?: boolean | undefined; + requestCert?: boolean | undefined; + }, + callback: (err: Error | null) => void, + ): undefined | boolean; + /** + * The SNI (Server Name Indication) host name associated with the socket. This is + * `null` before the handshake completes. Once the handshake completes it settles + * as either the host name string, or `false` if SNI was not used. + * @since v0.11.3 + */ + servername: string | false | null; + /** + * The `tlsSocket.setKeyCert()` method sets the private key and certificate to use for the socket. + * This is mainly useful if you wish to select a server certificate from a TLS server's `ALPNCallback`. + * @since v22.5.0, v20.17.0 + * @param context An object containing at least `key` and `cert` properties from the {@link createSecureContext()} `options`, + * or a TLS context object created with {@link createSecureContext()} itself. + */ + setKeyCert(context: SecureContextOptions | SecureContext): void; + /** + * The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size. + * Returns `true` if setting the limit succeeded; `false` otherwise. + * + * Smaller fragment sizes decrease the buffering latency on the client: larger + * fragments are buffered by the TLS layer until the entire fragment is received + * and its integrity is verified; large fragments can span multiple roundtrips + * and their processing can be delayed due to packet loss or reordering. However, + * smaller fragments add extra TLS framing bytes and CPU overhead, which may + * decrease overall server throughput. + * @since v0.11.11 + * @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`. + */ + setMaxSendFragment(size: number): boolean; + /** + * Disables TLS renegotiation for this `TLSSocket` instance. Once called, attempts + * to renegotiate will trigger an `'error'` event on the `TLSSocket`. + * @since v8.4.0 + */ + disableRenegotiation(): void; + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * + * The format of the output is identical to the output of`openssl s_client -trace` or `openssl s_server -trace`. While it is produced by + * OpenSSL's `SSL_trace()` function, the format is undocumented, can change + * without notice, and should not be relied on. + * @since v12.2.0 + */ + enableTrace(): void; + /** + * Returns the peer certificate as an `X509Certificate` object. + * + * If there is no peer certificate, or the socket has been destroyed,`undefined` will be returned. + * @since v15.9.0 + */ + getPeerX509Certificate(): X509Certificate | undefined; + /** + * Returns the local certificate as an `X509Certificate` object. + * + * If there is no local certificate, or the socket has been destroyed,`undefined` will be returned. + * @since v15.9.0 + */ + getX509Certificate(): X509Certificate | undefined; + /** + * Keying material is used for validations to prevent different kind of attacks in + * network protocols, for example in the specifications of IEEE 802.1X. + * + * Example + * + * ```js + * const keyingMaterial = tlsSocket.exportKeyingMaterial( + * 128, + * 'client finished'); + * + * /* + * Example return value of keyingMaterial: + * + * + * ``` + * + * See the OpenSSL [`SSL_export_keying_material`](https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html) documentation for more + * information. + * @since v13.10.0, v12.17.0 + * @param length number of bytes to retrieve from keying material + * @param label an application specific label, typically this will be a value from the [IANA Exporter Label + * Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels). + * @param context Optionally provide a context. + * @return requested bytes of the keying material + */ + exportKeyingMaterial(length: number, label: string, context: Buffer): NonSharedBuffer; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: TLSSocketEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: TLSSocketEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: TLSSocketEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: TLSSocketEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: TLSSocketEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: TLSSocketEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: TLSSocketEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: TLSSocketEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface CommonConnectionOptions { + /** + * An optional TLS context object from tls.createSecureContext() + */ + secureContext?: SecureContext | undefined; + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * @default false + */ + enableTrace?: boolean | undefined; + /** + * If true the server will request a certificate from clients that + * connect and attempt to verify that certificate. Defaults to + * false. + */ + requestCert?: boolean | undefined; + /** + * An array of strings, or a single `Buffer`, `TypedArray`, or `DataView` containing the supported + * ALPN protocols. Buffers should have the format `[len][name][len][name]...` + * e.g. `'\x08http/1.1\x08http/1.0'`, where the `len` byte is the length of the + * next protocol name. Passing an array is usually much simpler, e.g. + * `['http/1.1', 'http/1.0']`. Protocols earlier in the list have higher + * preference than those later. + */ + ALPNProtocols?: readonly string[] | NodeJS.ArrayBufferView | undefined; + /** + * SNICallback(servername, cb) A function that will be + * called if the client supports SNI TLS extension. Two arguments + * will be passed when called: servername and cb. SNICallback should + * invoke cb(null, ctx), where ctx is a SecureContext instance. + * (tls.createSecureContext(...) can be used to get a proper + * SecureContext.) If SNICallback wasn't provided the default callback + * with high-level API will be used (see below). + */ + SNICallback?: ((servername: string, cb: (err: Error | null, ctx?: SecureContext) => void) => void) | undefined; + /** + * If true the server will reject any connection which is not + * authorized with the list of supplied CAs. This option only has an + * effect if requestCert is true. + * @default true + */ + rejectUnauthorized?: boolean | undefined; + /** + * If true, specifies that the OCSP status request extension will be + * added to the client hello and an 'OCSPResponse' event will be + * emitted on the socket before establishing a secure communication. + */ + requestOCSP?: boolean | undefined; + } + interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts { + /** + * Abort the connection if the SSL/TLS handshake does not finish in the + * specified number of milliseconds. A 'tlsClientError' is emitted on + * the tls.Server object whenever a handshake times out. Default: + * 120000 (120 seconds). + */ + handshakeTimeout?: number | undefined; + /** + * The number of seconds after which a TLS session created by the + * server will no longer be resumable. See Session Resumption for more + * information. Default: 300. + */ + sessionTimeout?: number | undefined; + /** + * 48-bytes of cryptographically strong pseudo-random data. + */ + ticketKeys?: Buffer | undefined; + /** + * @param socket + * @param identity identity parameter sent from the client. + * @return pre-shared key that must either be + * a buffer or `null` to stop the negotiation process. Returned PSK must be + * compatible with the selected cipher's digest. + * + * When negotiating TLS-PSK (pre-shared keys), this function is called + * with the identity provided by the client. + * If the return value is `null` the negotiation process will stop and an + * "unknown_psk_identity" alert message will be sent to the other party. + * If the server wishes to hide the fact that the PSK identity was not known, + * the callback must provide some random data as `psk` to make the connection + * fail with "decrypt_error" before negotiation is finished. + * PSK ciphers are disabled by default, and using TLS-PSK thus + * requires explicitly specifying a cipher suite with the `ciphers` option. + * More information can be found in the RFC 4279. + */ + pskCallback?: ((socket: TLSSocket, identity: string) => NodeJS.ArrayBufferView | null) | undefined; + /** + * hint to send to a client to help + * with selecting the identity during TLS-PSK negotiation. Will be ignored + * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be + * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code. + */ + pskIdentityHint?: string | undefined; + } + interface PSKCallbackNegotation { + psk: NodeJS.ArrayBufferView; + identity: string; + } + interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions { + host?: string | undefined; + port?: number | undefined; + path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. + socket?: stream.Duplex | undefined; // Establish secure connection on a given socket rather than creating a new socket + checkServerIdentity?: typeof checkServerIdentity | undefined; + servername?: string | undefined; // SNI TLS Extension + session?: Buffer | undefined; + minDHSize?: number | undefined; + lookup?: net.LookupFunction | undefined; + timeout?: number | undefined; + /** + * When negotiating TLS-PSK (pre-shared keys), this function is called + * with optional identity `hint` provided by the server or `null` + * in case of TLS 1.3 where `hint` was removed. + * It will be necessary to provide a custom `tls.checkServerIdentity()` + * for the connection as the default one will try to check hostname/IP + * of the server against the certificate but that's not applicable for PSK + * because there won't be a certificate present. + * More information can be found in the RFC 4279. + * + * @param hint message sent from the server to help client + * decide which identity to use during negotiation. + * Always `null` if TLS 1.3 is used. + * @returns Return `null` to stop the negotiation process. `psk` must be + * compatible with the selected cipher's digest. + * `identity` must use UTF-8 encoding. + */ + pskCallback?: ((hint: string | null) => PSKCallbackNegotation | null) | undefined; + } + interface ServerEventMap extends net.ServerEventMap { + "connection": [socket: net.Socket]; + "keylog": [line: NonSharedBuffer, tlsSocket: TLSSocket]; + "newSession": [sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void]; + "OCSPRequest": [ + certificate: NonSharedBuffer, + issuer: NonSharedBuffer, + callback: (err: Error | null, resp: Buffer | null) => void, + ]; + "resumeSession": [sessionId: Buffer, callback: (err: Error | null, sessionData?: Buffer) => void]; + "secureConnection": [tlsSocket: TLSSocket]; + "tlsClientError": [exception: Error, tlsSocket: TLSSocket]; + } + /** + * Accepts encrypted connections using TLS or SSL. + * @since v0.3.2 + */ + class Server extends net.Server { + constructor(secureConnectionListener?: (socket: TLSSocket) => void); + constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void); + /** + * The `server.addContext()` method adds a secure context that will be used if + * the client request's SNI name matches the supplied `hostname` (or wildcard). + * + * When there are multiple matching contexts, the most recently added one is + * used. + * @since v0.5.3 + * @param hostname A SNI host name or wildcard (e.g. `'*'`) + * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc), or a TLS context object created + * with {@link createSecureContext} itself. + */ + addContext(hostname: string, context: SecureContextOptions | SecureContext): void; + /** + * Returns the session ticket keys. + * + * See `Session Resumption` for more information. + * @since v3.0.0 + * @return A 48-byte buffer containing the session ticket keys. + */ + getTicketKeys(): NonSharedBuffer; + /** + * The `server.setSecureContext()` method replaces the secure context of an + * existing server. Existing connections to the server are not interrupted. + * @since v11.0.0 + * @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc). + */ + setSecureContext(options: SecureContextOptions): void; + /** + * Sets the session ticket keys. + * + * Changes to the ticket keys are effective only for future server connections. + * Existing or currently pending server connections will use the previous keys. + * + * See `Session Resumption` for more information. + * @since v3.0.0 + * @param keys A 48-byte buffer containing the session ticket keys. + */ + setTicketKeys(keys: Buffer): void; + // #region InternalEventEmitter + addListener(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ServerEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ServerEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: ServerEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: ServerEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1"; + type CertificateCompressionAlgorithm = "zlib" | "brotli" | "zstd"; + interface SecureContextOptions { + /** + * If set, this will be called when a client opens a connection using the ALPN extension. + * One argument will be passed to the callback: an object containing `servername` and `protocols` fields, + * respectively containing the server name from the SNI extension (if any) and an array of + * ALPN protocol name strings. The callback must return either one of the strings listed in `protocols`, + * which will be returned to the client as the selected ALPN protocol, or `undefined`, + * to reject the connection with a fatal alert. If a string is returned that does not match one of + * the client's ALPN protocols, an error will be thrown. + * This option cannot be used with the `ALPNProtocols` option, and setting both options will throw an error. + */ + ALPNCallback?: ((arg: { servername: string; protocols: string[] }) => string | undefined) | undefined; + /** + * Treat intermediate (non-self-signed) + * certificates in the trust CA certificate list as trusted. + * @since v22.9.0, v20.18.0 + */ + allowPartialTrustChain?: boolean | undefined; + /** + * Optionally override the trusted CA certificates. Default is to trust + * the well-known CAs curated by Mozilla. Mozilla's CAs are completely + * replaced when CAs are explicitly specified using this option. + */ + ca?: string | Buffer | Array | undefined; + /** + * Cert chains in PEM format. One cert chain should be provided per + * private key. Each cert chain should consist of the PEM formatted + * certificate for a provided private key, followed by the PEM + * formatted intermediate certificates (if any), in order, and not + * including the root CA (the root CA must be pre-known to the peer, + * see ca). When providing multiple cert chains, they do not have to + * be in the same order as their private keys in key. If the + * intermediate certificates are not provided, the peer will not be + * able to validate the certificate, and the handshake will fail. + */ + cert?: string | Buffer | Array | undefined; + /** + * An array of supported certificate + * compression algorithm names, in preference order. Supported values are + * `'zlib'`, `'brotli'`, and `'zstd'`. When set, enables TLS certificate + * compression ([RFC 8879](https://tools.ietf.org/html/rfc8879)) which compresses certificates during the TLS + * handshake, reducing handshake size. Only effective with TLSv1.3. + * **Default:** `[]` (disabled). + */ + certificateCompression?: readonly CertificateCompressionAlgorithm[] | undefined; + /** + * Colon-separated list of supported signature algorithms. The list + * can contain digest algorithms (SHA256, MD5 etc.), public key + * algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g + * 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512). + */ + sigalgs?: string | undefined; + /** + * Cipher suite specification, replacing the default. For more + * information, see modifying the default cipher suite. Permitted + * ciphers can be obtained via tls.getCiphers(). Cipher names must be + * uppercased in order for OpenSSL to accept them. + */ + ciphers?: string | undefined; + /** + * Name of an OpenSSL engine which can provide the client certificate. + * @deprecated + */ + clientCertEngine?: string | undefined; + /** + * PEM formatted CRLs (Certificate Revocation Lists). + */ + crl?: string | Buffer | Array | undefined; + /** + * `'auto'` or custom Diffie-Hellman parameters, required for non-ECDHE perfect forward secrecy. + * If omitted or invalid, the parameters are silently discarded and DHE ciphers will not be available. + * ECDHE-based perfect forward secrecy will still be available. + */ + dhparam?: string | Buffer | undefined; + /** + * A string describing a named curve, TLS group, or + * colon-separated list of named curves or TLS groups to use for key agreement, + * for example `P-521:P-384:P-256`, `X25519`, or `X25519MLKEM768`. The + * historical name of this option refers to ECDH key agreement in TLSv1.2 and + * below. In TLSv1.3, this option configures the TLS Supported Groups and + * key share groups offered or accepted by the TLS stack. Set to `auto` to + * select the group automatically. Use `crypto.getCurves()` to obtain a + * list of available elliptic curve names. For TLS group names, use + * `openssl list -tls-groups` or consult the [IANA TLS Supported Groups + * registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8). + */ + ecdhCurve?: string | undefined; + /** + * Attempt to use the server's cipher suite preferences instead of the + * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be + * set in secureOptions + */ + honorCipherOrder?: boolean | undefined; + /** + * Private keys in PEM format. PEM allows the option of private keys + * being encrypted. Encrypted keys will be decrypted with + * options.passphrase. Multiple keys using different algorithms can be + * provided either as an array of unencrypted key strings or buffers, + * or an array of objects in the form {pem: [, + * passphrase: ]}. The object form can only occur in an array. + * object.passphrase is optional. Encrypted keys will be decrypted with + * object.passphrase if provided, or options.passphrase if it is not. + */ + key?: string | Buffer | Array | undefined; + /** + * Name of an OpenSSL engine to get private key from. Should be used + * together with privateKeyIdentifier. + * @deprecated + */ + privateKeyEngine?: string | undefined; + /** + * Identifier of a private key managed by an OpenSSL engine. Should be + * used together with privateKeyEngine. Should not be set together with + * key, because both options define a private key in different ways. + * @deprecated + */ + privateKeyIdentifier?: string | undefined; + /** + * Optionally set the maximum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. + * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using + * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to + * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used. + */ + maxVersion?: SecureVersion | undefined; + /** + * Optionally set the minimum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. It is not recommended to use + * less than TLSv1.2, but it may be required for interoperability. + * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using + * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to + * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to + * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used. + */ + minVersion?: SecureVersion | undefined; + /** + * Shared passphrase used for a single private key and/or a PFX. + */ + passphrase?: string | undefined; + /** + * PFX or PKCS12 encoded private key and certificate chain. pfx is an + * alternative to providing key and cert individually. PFX is usually + * encrypted, if it is, passphrase will be used to decrypt it. Multiple + * PFX can be provided either as an array of unencrypted PFX buffers, + * or an array of objects in the form {buf: [, + * passphrase: ]}. The object form can only occur in an array. + * object.passphrase is optional. Encrypted PFX will be decrypted with + * object.passphrase if provided, or options.passphrase if it is not. + */ + pfx?: string | Buffer | Array | undefined; + /** + * Optionally affect the OpenSSL protocol behavior, which is not + * usually necessary. This should be used carefully if at all! Value is + * a numeric bitmask of the SSL_OP_* options from OpenSSL Options + */ + secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options + /** + * Legacy mechanism to select the TLS protocol version to use, it does + * not support independent control of the minimum and maximum version, + * and does not support limiting the protocol to TLSv1.3. Use + * minVersion and maxVersion instead. The possible values are listed as + * SSL_METHODS, use the function names as strings. For example, use + * 'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow + * any TLS protocol version up to TLSv1.3. It is not recommended to use + * TLS versions less than 1.2, but it may be required for + * interoperability. Default: none, see minVersion. + */ + secureProtocol?: string | undefined; + /** + * Opaque identifier used by servers to ensure session state is not + * shared between applications. Unused by clients. + */ + sessionIdContext?: string | undefined; + /** + * 48-bytes of cryptographically strong pseudo-random data. + * See Session Resumption for more information. + */ + ticketKeys?: Buffer | undefined; + /** + * The number of seconds after which a TLS session created by the + * server will no longer be resumable. See Session Resumption for more + * information. Default: 300. + */ + sessionTimeout?: number | undefined; + } + interface SecureContext { + context: any; + } + /** + * Verifies the certificate `cert` is issued to `hostname`. + * + * Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on + * failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type). + * + * This function is intended to be used in combination with the`checkServerIdentity` option that can be passed to {@link connect} and as + * such operates on a `certificate object`. For other purposes, consider using `x509.checkHost()` instead. + * + * This function can be overwritten by providing an alternative function as the `options.checkServerIdentity` option that is passed to `tls.connect()`. The + * overwriting function can call `tls.checkServerIdentity()` of course, to augment + * the checks done with additional verification. + * + * This function is only called if the certificate passed all other checks, such as + * being issued by trusted CA (`options.ca`). + * + * Earlier versions of Node.js incorrectly accepted certificates for a given`hostname` if a matching `uniformResourceIdentifier` subject alternative name + * was present (see [CVE-2021-44531](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531)). Applications that wish to accept`uniformResourceIdentifier` subject alternative names can use + * a custom `options.checkServerIdentity` function that implements the desired behavior. + * @since v0.8.4 + * @param hostname The host name or IP address to verify the certificate against. + * @param cert A `certificate object` representing the peer's certificate. + */ + function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined; + /** + * Creates a new {@link Server}. The `secureConnectionListener`, if provided, is + * automatically set as a listener for the `'secureConnection'` event. + * + * The `ticketKeys` options is automatically shared between `node:cluster` module + * workers. + * + * The following illustrates a simple echo server: + * + * ```js + * import tls from 'node:tls'; + * import fs from 'node:fs'; + * + * const options = { + * key: fs.readFileSync('server-key.pem'), + * cert: fs.readFileSync('server-cert.pem'), + * + * // This is necessary only if using client certificate authentication. + * requestCert: true, + * + * // This is necessary only if the client uses a self-signed certificate. + * ca: [ fs.readFileSync('client-cert.pem') ], + * }; + * + * const server = tls.createServer(options, (socket) => { + * console.log('server connected', + * socket.authorized ? 'authorized' : 'unauthorized'); + * socket.write('welcome!\n'); + * socket.setEncoding('utf8'); + * socket.pipe(socket); + * }); + * server.listen(8000, () => { + * console.log('server bound'); + * }); + * ``` + * + * The server can be tested by connecting to it using the example client from {@link connect}. + * @since v0.3.2 + */ + function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server; + function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; + /** + * The `callback` function, if specified, will be added as a listener for the `'secureConnect'` event. + * + * `tls.connect()` returns a {@link TLSSocket} object. + * + * Unlike the `https` API, `tls.connect()` does not enable the + * SNI (Server Name Indication) extension by default, which may cause some + * servers to return an incorrect certificate or reject the connection + * altogether. To enable SNI, set the `servername` option in addition + * to `host`. + * + * The following illustrates a client for the echo server example from {@link createServer}: + * + * ```js + * // Assumes an echo server that is listening on port 8000. + * import tls from 'node:tls'; + * import fs from 'node:fs'; + * + * const options = { + * // Necessary only if the server requires client certificate authentication. + * key: fs.readFileSync('client-key.pem'), + * cert: fs.readFileSync('client-cert.pem'), + * + * // Necessary only if the server uses a self-signed certificate. + * ca: [ fs.readFileSync('server-cert.pem') ], + * + * // Necessary only if the server's cert isn't for "localhost". + * checkServerIdentity: () => { return null; }, + * }; + * + * const socket = tls.connect(8000, options, () => { + * console.log('client connected', + * socket.authorized ? 'authorized' : 'unauthorized'); + * process.stdin.pipe(socket); + * process.stdin.resume(); + * }); + * socket.setEncoding('utf8'); + * socket.on('data', (data) => { + * console.log(data); + * }); + * socket.on('end', () => { + * console.log('server ends connection'); + * }); + * ``` + * @since v0.11.3 + */ + function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + function connect( + port: number, + host?: string, + options?: ConnectionOptions, + secureConnectListener?: () => void, + ): TLSSocket; + function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + /** + * `{@link createServer}` sets the default value of the `honorCipherOrder` option + * to `true`, other APIs that create secure contexts leave it unset. + * + * `{@link createServer}` uses a 128 bit truncated SHA1 hash value generated + * from `process.argv` as the default value of the `sessionIdContext` option, other + * APIs that create secure contexts have no default value. + * + * The `tls.createSecureContext()` method creates a `SecureContext` object. It is + * usable as an argument to several `tls` APIs, such as `server.addContext()`, + * but has no public methods. The {@link Server} constructor and the {@link createServer} method do not support the `secureContext` option. + * + * A key is _required_ for ciphers that use certificates. Either `key` or `pfx` can be used to provide it. + * + * If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of + * CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt). + * + * Custom DHE parameters are discouraged in favor of the new `dhparam: 'auto' `option. When set to `'auto'`, well-known DHE parameters of sufficient strength + * will be selected automatically. Otherwise, if necessary, `openssl dhparam` can + * be used to create custom parameters. The key length must be greater than or + * equal to 1024 bits or else an error will be thrown. Although 1024 bits is + * permissible, use 2048 bits or larger for stronger security. + * @since v0.11.13 + */ + function createSecureContext(options?: SecureContextOptions): SecureContext; + /** + * Returns an array containing the CA certificates from various sources, depending on `type`: + * + * * `"default"`: return the CA certificates that will be used by the Node.js TLS clients by default. + * * When `--use-bundled-ca` is enabled (default), or `--use-openssl-ca` is not enabled, + * this would include CA certificates from the bundled Mozilla CA store. + * * When `--use-system-ca` is enabled, this would also include certificates from the system's + * trusted store. + * * When `NODE_EXTRA_CA_CERTS` is used, this would also include certificates loaded from the specified + * file. + * * `"system"`: return the CA certificates that are loaded from the system's trusted store, according + * to rules set by `--use-system-ca`. This can be used to get the certificates from the system + * when `--use-system-ca` is not enabled. + * * `"bundled"`: return the CA certificates from the bundled Mozilla CA store. This would be the same + * as `tls.rootCertificates`. + * * `"extra"`: return the CA certificates loaded from `NODE_EXTRA_CA_CERTS`. It's an empty array if + * `NODE_EXTRA_CA_CERTS` is not set. + * @since v22.15.0 + * @param type The type of CA certificates that will be returned. Valid values + * are `"default"`, `"system"`, `"bundled"` and `"extra"`. + * **Default:** `"default"`. + * @returns An array of PEM-encoded certificates. The array may contain duplicates + * if the same certificate is repeatedly stored in multiple sources. + */ + function getCACertificates(type?: "default" | "system" | "bundled" | "extra"): string[]; + /** + * Returns an array with the names of the supported TLS ciphers. The names are + * lower-case for historical reasons, but must be uppercased to be used in + * the `ciphers` option of `{@link createSecureContext}`. + * + * Not all supported ciphers are enabled by default. See + * [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v26.x/api/tls.html#modifying-the-default-tls-cipher-suite). + * + * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for + * TLSv1.2 and below. + * + * ```js + * console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...] + * ``` + * @since v0.10.2 + */ + function getCiphers(): string[]; + /** + * Returns an array with the names of the RFC 8879 certificate compression + * algorithms supported by the current OpenSSL build, suitable for use in the + * `certificateCompression` option of `tls.createSecureContext()`. Possible + * values include `'zlib'`, `'brotli'`, and `'zstd'`. + * + * The array is empty when certificate compression is unavailable. + * + * ```js + * console.log(tls.getCertificateCompressionAlgorithms()); // ['zlib', 'brotli', 'zstd'] + * ``` + * @since v26.4.0 + */ + function getCertificateCompressionAlgorithms(): CertificateCompressionAlgorithm[]; + /** + * Sets the default CA certificates used by Node.js TLS clients. If the provided + * certificates are parsed successfully, they will become the default CA + * certificate list returned by {@link getCACertificates} and used + * by subsequent TLS connections that don't specify their own CA certificates. + * The certificates will be deduplicated before being set as the default. + * + * This function only affects the current Node.js thread. Previous + * sessions cached by the HTTPS agent won't be affected by this change, so + * this method should be called before any unwanted cachable TLS connections are + * made. + * + * To use system CA certificates as the default: + * + * ```js + * import tls from 'node:tls'; + * tls.setDefaultCACertificates(tls.getCACertificates('system')); + * ``` + * + * This function completely replaces the default CA certificate list. To add additional + * certificates to the existing defaults, get the current certificates and append to them: + * + * ```js + * import tls from 'node:tls'; + * const currentCerts = tls.getCACertificates('default'); + * const additionalCerts = ['-----BEGIN CERTIFICATE-----\n...']; + * tls.setDefaultCACertificates([...currentCerts, ...additionalCerts]); + * ``` + * @since v24.5.0 + * @param certs An array of CA certificates in PEM format. + */ + function setDefaultCACertificates(certs: ReadonlyArray): void; + /** + * The default named curve or TLS group list to use for key agreement in a TLS + * server. The default value is `'auto'`. See `tls.createSecureContext()` for + * further information. + * @since v0.11.13 + */ + let DEFAULT_ECDH_CURVE: string; + /** + * The default value of the `maxVersion` option of `{@link createSecureContext()}`. + * It can be assigned any of the supported TLS protocol versions, + * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.3'`, unless + * changed using CLI options. Using `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using + * `--tls-max-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options + * are provided, the highest maximum is used. + * @since v11.4.0 + */ + let DEFAULT_MAX_VERSION: SecureVersion; + /** + * The default value of the `minVersion` option of `{@link createSecureContext()}`. + * It can be assigned any of the supported TLS protocol versions, + * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.2'`, unless + * changed using CLI options. Using `--tls-min-v1.0` sets the default to + * `'TLSv1'`. Using `--tls-min-v1.1` sets the default to `'TLSv1.1'`. Using + * `--tls-min-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options + * are provided, the lowest minimum is used. + * @since v11.4.0 + */ + let DEFAULT_MIN_VERSION: SecureVersion; + /** + * The default value of the `ciphers` option of `{@link createSecureContext()}`. + * It can be assigned any of the supported OpenSSL ciphers. + * Defaults to the content of `crypto.constants.defaultCoreCipherList`, unless + * changed using CLI options using `--tls-default-ciphers`. + * @since v19.8.0 + */ + let DEFAULT_CIPHERS: string; + /** + * An immutable array of strings representing the root certificates (in PEM format) + * from the bundled Mozilla CA store as supplied by the current Node.js version. + * + * The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store + * that is fixed at release time. It is identical on all supported platforms. + * @since v12.3.0 + */ + const rootCertificates: readonly string[]; +} +declare module "tls" { + export * from "node:tls"; +} diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts new file mode 100644 index 0000000..5fa7a39 --- /dev/null +++ b/node_modules/@types/node/trace_events.d.ts @@ -0,0 +1,103 @@ +declare module "node:trace_events" { + /** + * The `Tracing` object is used to enable or disable tracing for sets of + * categories. Instances are created using the + * `trace_events.createTracing()` method. + * + * When created, the `Tracing` object is disabled. Calling the + * `tracing.enable()` method adds the categories to the set of enabled trace + * event categories. Calling `tracing.disable()` will remove the categories + * from the set of enabled trace event categories. + */ + interface Tracing { + /** + * A comma-separated list of the trace event categories covered by this + * `Tracing` object. + * @since v10.0.0 + */ + readonly categories: string; + /** + * Disables this `Tracing` object. + * + * Only trace event categories _not_ covered by other enabled `Tracing` + * objects and _not_ specified by the `--trace-event-categories` flag + * will be disabled. + * + * ```js + * import trace_events from 'node:trace_events'; + * const t1 = trace_events.createTracing({ categories: ['node', 'v8'] }); + * const t2 = trace_events.createTracing({ categories: ['node.perf', 'node'] }); + * t1.enable(); + * t2.enable(); + * + * // Prints 'node,node.perf,v8' + * console.log(trace_events.getEnabledCategories()); + * + * t2.disable(); // Will only disable emission of the 'node.perf' category + * + * // Prints 'node,v8' + * console.log(trace_events.getEnabledCategories()); + * ``` + * @since v10.0.0 + */ + disable(): void; + /** + * Enables this `Tracing` object for the set of categories covered by + * the `Tracing` object. + * @since v10.0.0 + */ + enable(): void; + /** + * `true` only if the `Tracing` object has been enabled. + * @since v10.0.0 + */ + readonly enabled: boolean; + } + interface CreateTracingOptions { + /** + * An array of trace category names. Values included in the array are + * coerced to a string when possible. An error will be thrown if the + * value cannot be coerced. + */ + categories: string[]; + } + /** + * Creates and returns a `Tracing` object for the given set of `categories`. + * + * ```js + * import trace_events from 'node:trace_events'; + * const categories = ['node.perf', 'node.async_hooks']; + * const tracing = trace_events.createTracing({ categories }); + * tracing.enable(); + * // do stuff + * tracing.disable(); + * ``` + * @since v10.0.0 + */ + function createTracing(options: CreateTracingOptions): Tracing; + /** + * Returns a comma-separated list of all currently-enabled trace event + * categories. The current set of enabled trace event categories is determined + * by the _union_ of all currently-enabled `Tracing` objects and any categories + * enabled using the `--trace-event-categories` flag. + * + * Given the file `test.js` below, the command `node --trace-event-categories node.perf test.js` will print `'node.async_hooks,node.perf'` to the console. + * + * ```js + * import trace_events from 'node:trace_events'; + * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] }); + * const t2 = trace_events.createTracing({ categories: ['node.perf'] }); + * const t3 = trace_events.createTracing({ categories: ['v8'] }); + * + * t1.enable(); + * t2.enable(); + * + * console.log(trace_events.getEnabledCategories()); + * ``` + * @since v10.0.0 + */ + function getEnabledCategories(): string | undefined; +} +declare module "trace_events" { + export * from "node:trace_events"; +} diff --git a/node_modules/@types/node/ts5.6/buffer.buffer.d.ts b/node_modules/@types/node/ts5.6/buffer.buffer.d.ts new file mode 100644 index 0000000..626ec28 --- /dev/null +++ b/node_modules/@types/node/ts5.6/buffer.buffer.d.ts @@ -0,0 +1,467 @@ +declare module "node:buffer" { + global { + interface BufferConstructor { + // see ../buffer.d.ts for implementation shared with all TypeScript versions + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. + */ + new(str: string, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). + */ + new(size: number): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + new(array: ArrayLike): Buffer; + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}/{SharedArrayBuffer}. + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. + */ + new(arrayBuffer: ArrayBufferLike): Buffer; + /** + * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. + * Array entries outside that range will be truncated to fit into it. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. + * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); + * ``` + * + * If `array` is an `Array`-like object (that is, one with a `length` property of + * type `number`), it is treated as if it is an array, unless it is a `Buffer` or + * a `Uint8Array`. This means all other `TypedArray` variants get treated as an + * `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use + * `Buffer.copyBytesFrom()`. + * + * A `TypeError` will be thrown if `array` is not an `Array` or another type + * appropriate for `Buffer.from()` variants. + * + * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal + * `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v5.10.0 + */ + from(array: WithImplicitCoercion>): Buffer; + /** + * This creates a view of the `ArrayBuffer` without copying the underlying + * memory. For example, when passed a reference to the `.buffer` property of a + * `TypedArray` instance, the newly created `Buffer` will share the same + * allocated memory as the `TypedArray`'s underlying `ArrayBuffer`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const arr = new Uint16Array(2); + * + * arr[0] = 5000; + * arr[1] = 4000; + * + * // Shares memory with `arr`. + * const buf = Buffer.from(arr.buffer); + * + * console.log(buf); + * // Prints: + * + * // Changing the original Uint16Array changes the Buffer also. + * arr[1] = 6000; + * + * console.log(buf); + * // Prints: + * ``` + * + * The optional `byteOffset` and `length` arguments specify a memory range within + * the `arrayBuffer` that will be shared by the `Buffer`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const ab = new ArrayBuffer(10); + * const buf = Buffer.from(ab, 0, 2); + * + * console.log(buf.length); + * // Prints: 2 + * ``` + * + * A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a + * `SharedArrayBuffer` or another type appropriate for `Buffer.from()` + * variants. + * + * It is important to remember that a backing `ArrayBuffer` can cover a range + * of memory that extends beyond the bounds of a `TypedArray` view. A new + * `Buffer` created using the `buffer` property of a `TypedArray` may extend + * beyond the range of the `TypedArray`: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements + * const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements + * console.log(arrA.buffer === arrB.buffer); // true + * + * const buf = Buffer.from(arrB.buffer); + * console.log(buf); + * // Prints: + * ``` + * @since v5.10.0 + * @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the + * `.buffer` property of a `TypedArray`. + * @param byteOffset Index of first byte to expose. **Default:** `0`. + * @param length Number of bytes to expose. **Default:** + * `arrayBuffer.byteLength - byteOffset`. + */ + from( + arrayBuffer: WithImplicitCoercion, + byteOffset?: number, + length?: number, + ): Buffer; + /** + * Creates a new `Buffer` containing `string`. The `encoding` parameter identifies + * the character encoding to be used when converting `string` into bytes. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('this is a tést'); + * const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); + * + * console.log(buf1.toString()); + * // Prints: this is a tést + * console.log(buf2.toString()); + * // Prints: this is a tést + * console.log(buf1.toString('latin1')); + * // Prints: this is a tést + * ``` + * + * A `TypeError` will be thrown if `string` is not a string or another type + * appropriate for `Buffer.from()` variants. + * + * `Buffer.from(string)` may also use the internal `Buffer` pool like + * `Buffer.allocUnsafe()` does. + * @since v5.10.0 + * @param string A string to encode. + * @param encoding The encoding of `string`. **Default:** `'utf8'`. + */ + from(string: WithImplicitCoercion, encoding?: BufferEncoding): Buffer; + from(arrayOrString: WithImplicitCoercion | string>): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param values to create a new Buffer + */ + of(...items: number[]): Buffer; + /** + * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together. + * + * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned. + * + * If `totalLength` is not provided, it is calculated from the `Buffer` instances + * in `list` by adding their lengths. + * + * If `totalLength` is provided, it must be an unsigned integer. If the + * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is + * truncated to `totalLength`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a single `Buffer` from a list of three `Buffer` instances. + * + * const buf1 = Buffer.alloc(10); + * const buf2 = Buffer.alloc(14); + * const buf3 = Buffer.alloc(18); + * const totalLength = buf1.length + buf2.length + buf3.length; + * + * console.log(totalLength); + * // Prints: 42 + * + * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); + * + * console.log(bufA); + * // Prints: + * console.log(bufA.length); + * // Prints: 42 + * ``` + * + * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v0.7.11 + * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. + * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. + */ + concat(list: readonly Uint8Array[], totalLength?: number): Buffer; + /** + * Copies the underlying memory of `view` into a new `Buffer`. + * + * ```js + * const u16 = new Uint16Array([0, 0xffff]); + * const buf = Buffer.copyBytesFrom(u16, 1, 1); + * u16[1] = 0; + * console.log(buf.length); // 2 + * console.log(buf[0]); // 255 + * console.log(buf[1]); // 255 + * ``` + * @since v19.8.0 + * @param view The {TypedArray} to copy. + * @param [offset=0] The starting offset within `view`. + * @param [length=view.length - offset] The number of elements from `view` to copy. + */ + copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(5); + * + * console.log(buf); + * // Prints: + * ``` + * + * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. + * + * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(5, 'a'); + * + * console.log(buf); + * // Prints: + * ``` + * + * If both `fill` and `encoding` are specified, the allocated `Buffer` will be + * initialized by calling `buf.fill(fill, encoding)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); + * + * console.log(buf); + * // Prints: + * ``` + * + * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance + * contents will never contain sensitive data from previous allocations, including + * data that might not have been allocated for `Buffer`s. + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + * @param [fill=0] A value to pre-fill the new `Buffer` with. + * @param [encoding='utf8'] If `fill` is a string, this is its encoding. + */ + alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(10); + * + * console.log(buf); + * // Prints (contents may vary): + * + * buf.fill(0); + * + * console.log(buf); + * // Prints: + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * + * The `Buffer` module pre-allocates an internal `Buffer` instance of + * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`, + * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two). + * + * Use of this pre-allocated internal memory pool is a key difference between + * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. + * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less + * than or equal to half `Buffer.poolSize`. The + * difference is subtle but can be important when an application requires the + * additional performance that `Buffer.allocUnsafe()` provides. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafe(size: number): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if + * `size` is 0. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize + * such `Buffer` instances with zeroes. + * + * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, + * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This + * allows applications to avoid the garbage collection overhead of creating many + * individually allocated `Buffer` instances. This approach improves both + * performance and memory usage by eliminating the need to track and clean up as + * many individual `ArrayBuffer` objects. + * + * However, in the case where a developer may need to retain a small chunk of + * memory from a pool for an indeterminate amount of time, it may be appropriate + * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and + * then copying out the relevant bits. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Need to keep around a few small chunks of memory. + * const store = []; + * + * socket.on('readable', () => { + * let data; + * while (null !== (data = readable.read())) { + * // Allocate for retained data. + * const sb = Buffer.allocUnsafeSlow(10); + * + * // Copy the data into the new allocation. + * data.copy(sb, 0, 0, 10); + * + * store.push(sb); + * } + * }); + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.12.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafeSlow(size: number): Buffer; + } + interface Buffer extends Uint8Array { + // see ../buffer.d.ts for implementation shared with all TypeScript versions + + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * This method is not compatible with the `Uint8Array.prototype.slice()`, + * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('buffer'); + * + * const copiedBuf = Uint8Array.prototype.slice.call(buf); + * copiedBuf[0]++; + * console.log(copiedBuf.toString()); + * // Prints: cuffer + * + * console.log(buf.toString()); + * // Prints: buffer + * + * // With buf.slice(), the original buffer is modified. + * const notReallyCopiedBuf = buf.slice(); + * notReallyCopiedBuf[0]++; + * console.log(notReallyCopiedBuf.toString()); + * // Prints: cuffer + * console.log(buf.toString()); + * // Also prints: cuffer (!) + * ``` + * @since v0.3.0 + * @deprecated Use `subarray` instead. + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + slice(start?: number, end?: number): Buffer; + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * Specifying `end` greater than `buf.length` will return the same result as + * that of `end` equal to `buf.length`. + * + * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). + * + * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte + * // from the original `Buffer`. + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * const buf2 = buf1.subarray(0, 3); + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: abc + * + * buf1[0] = 33; + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: !bc + * ``` + * + * Specifying negative indexes causes the slice to be generated relative to the + * end of `buf` rather than the beginning. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('buffer'); + * + * console.log(buf.subarray(-6, -1).toString()); + * // Prints: buffe + * // (Equivalent to buf.subarray(0, 5).) + * + * console.log(buf.subarray(-6, -2).toString()); + * // Prints: buff + * // (Equivalent to buf.subarray(0, 4).) + * + * console.log(buf.subarray(-5, -2).toString()); + * // Prints: uff + * // (Equivalent to buf.subarray(1, 4).) + * ``` + * @since v3.0.0 + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + subarray(start?: number, end?: number): Buffer; + } + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedBuffer = Buffer; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type AllowSharedBuffer = Buffer; + } + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type BufferView = Buffer; +} diff --git a/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts b/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts new file mode 100644 index 0000000..f148cc4 --- /dev/null +++ b/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts @@ -0,0 +1,71 @@ +// Interface declaration for Float16Array, required in @types/node v24+. +// These definitions are specific to TS <=5.6. + +// This needs all of the "common" properties/methods of the TypedArrays, +// otherwise the type unions `TypedArray` and `ArrayBufferView` will be +// empty objects. +interface Float16Array extends Pick { + readonly BYTES_PER_ELEMENT: number; + readonly buffer: ArrayBufferLike; + readonly byteLength: number; + readonly byteOffset: number; + readonly length: number; + readonly [Symbol.toStringTag]: "Float16Array"; + at(index: number): number | undefined; + copyWithin(target: number, start: number, end?: number): this; + every(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): boolean; + fill(value: number, start?: number, end?: number): this; + filter(predicate: (value: number, index: number, array: Float16Array) => any, thisArg?: any): Float16Array; + find(predicate: (value: number, index: number, obj: Float16Array) => boolean, thisArg?: any): number | undefined; + findIndex(predicate: (value: number, index: number, obj: Float16Array) => boolean, thisArg?: any): number; + findLast( + predicate: (value: number, index: number, array: Float16Array) => value is S, + thisArg?: any, + ): S | undefined; + findLast( + predicate: (value: number, index: number, array: Float16Array) => unknown, + thisArg?: any, + ): number | undefined; + findLastIndex(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): number; + forEach(callbackfn: (value: number, index: number, array: Float16Array) => void, thisArg?: any): void; + includes(searchElement: number, fromIndex?: number): boolean; + indexOf(searchElement: number, fromIndex?: number): number; + join(separator?: string): string; + lastIndexOf(searchElement: number, fromIndex?: number): number; + map(callbackfn: (value: number, index: number, array: Float16Array) => number, thisArg?: any): Float16Array; + reduce( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, + ): number; + reduce( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, + initialValue: number, + ): number; + reduce( + callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float16Array) => U, + initialValue: U, + ): U; + reduceRight( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, + ): number; + reduceRight( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, + initialValue: number, + ): number; + reduceRight( + callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float16Array) => U, + initialValue: U, + ): U; + reverse(): Float16Array; + set(array: ArrayLike, offset?: number): void; + slice(start?: number, end?: number): Float16Array; + some(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): boolean; + sort(compareFn?: (a: number, b: number) => number): this; + subarray(begin?: number, end?: number): Float16Array; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toReversed(): Float16Array; + toSorted(compareFn?: (a: number, b: number) => number): Float16Array; + toString(): string; + valueOf(): Float16Array; + with(index: number, value: number): Float16Array; + [index: number]: number; +} diff --git a/node_modules/@types/node/ts5.6/globals.typedarray.d.ts b/node_modules/@types/node/ts5.6/globals.typedarray.d.ts new file mode 100644 index 0000000..57a1ab4 --- /dev/null +++ b/node_modules/@types/node/ts5.6/globals.typedarray.d.ts @@ -0,0 +1,36 @@ +export {}; // Make this a module + +declare global { + namespace NodeJS { + type TypedArray = + | Uint8Array + | Uint8ClampedArray + | Uint16Array + | Uint32Array + | Int8Array + | Int16Array + | Int32Array + | BigUint64Array + | BigInt64Array + | Float16Array + | Float32Array + | Float64Array; + type ArrayBufferView = TypedArray | DataView; + + type NonSharedUint8Array = Uint8Array; + type NonSharedUint8ClampedArray = Uint8ClampedArray; + type NonSharedUint16Array = Uint16Array; + type NonSharedUint32Array = Uint32Array; + type NonSharedInt8Array = Int8Array; + type NonSharedInt16Array = Int16Array; + type NonSharedInt32Array = Int32Array; + type NonSharedBigUint64Array = BigUint64Array; + type NonSharedBigInt64Array = BigInt64Array; + type NonSharedFloat16Array = Float16Array; + type NonSharedFloat32Array = Float32Array; + type NonSharedFloat64Array = Float64Array; + type NonSharedDataView = DataView; + type NonSharedTypedArray = TypedArray; + type NonSharedArrayBufferView = ArrayBufferView; + } +} diff --git a/node_modules/@types/node/ts5.6/index.d.ts b/node_modules/@types/node/ts5.6/index.d.ts new file mode 100644 index 0000000..6d093bd --- /dev/null +++ b/node_modules/@types/node/ts5.6/index.d.ts @@ -0,0 +1,118 @@ +/** + * License for programmatically and manually incorporated + * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc + * + * Copyright Node.js contributors. All rights reserved. + * 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. + */ + +// NOTE: These definitions support Node.js and TypeScript 5.6. + +// Reference required TypeScript libraries: +/// +/// + +// TypeScript library polyfills required for TypeScript <=5.6: +/// + +// Definitions for Node.js modules specific to TypeScript <=5.6: +/// +/// + +// Definitions for Node.js modules that are not specific to any version of TypeScript: +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// diff --git a/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts b/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts new file mode 100644 index 0000000..110b1eb --- /dev/null +++ b/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts @@ -0,0 +1,72 @@ +// Interface declaration for Float16Array, required in @types/node v24+. +// These definitions are specific to TS 5.7. + +// This needs all of the "common" properties/methods of the TypedArrays, +// otherwise the type unions `TypedArray` and `ArrayBufferView` will be +// empty objects. +interface Float16Array { + readonly BYTES_PER_ELEMENT: number; + readonly buffer: TArrayBuffer; + readonly byteLength: number; + readonly byteOffset: number; + readonly length: number; + readonly [Symbol.toStringTag]: "Float16Array"; + at(index: number): number | undefined; + copyWithin(target: number, start: number, end?: number): this; + entries(): ArrayIterator<[number, number]>; + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + fill(value: number, start?: number, end?: number): this; + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float16Array; + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + findLast( + predicate: (value: number, index: number, array: this) => value is S, + thisArg?: any, + ): S | undefined; + findLast(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): number | undefined; + findLastIndex(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): number; + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + includes(searchElement: number, fromIndex?: number): boolean; + indexOf(searchElement: number, fromIndex?: number): number; + join(separator?: string): string; + keys(): ArrayIterator; + lastIndexOf(searchElement: number, fromIndex?: number): number; + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float16Array; + reduce( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, + ): number; + reduce( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, + initialValue: number, + ): number; + reduce( + callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, + initialValue: U, + ): U; + reduceRight( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, + ): number; + reduceRight( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, + initialValue: number, + ): number; + reduceRight( + callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, + initialValue: U, + ): U; + reverse(): this; + set(array: ArrayLike, offset?: number): void; + slice(start?: number, end?: number): Float16Array; + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + sort(compareFn?: (a: number, b: number) => number): this; + subarray(begin?: number, end?: number): Float16Array; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toReversed(): Float16Array; + toSorted(compareFn?: (a: number, b: number) => number): Float16Array; + toString(): string; + valueOf(): this; + values(): ArrayIterator; + with(index: number, value: number): Float16Array; + [Symbol.iterator](): ArrayIterator; + [index: number]: number; +} diff --git a/node_modules/@types/node/ts5.7/index.d.ts b/node_modules/@types/node/ts5.7/index.d.ts new file mode 100644 index 0000000..a9ee9e9 --- /dev/null +++ b/node_modules/@types/node/ts5.7/index.d.ts @@ -0,0 +1,118 @@ +/** + * License for programmatically and manually incorporated + * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc + * + * Copyright Node.js contributors. All rights reserved. + * 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. + */ + +// NOTE: These definitions support Node.js and TypeScript 5.7. + +// Reference required TypeScript libraries: +/// +/// + +// TypeScript library polyfills required for TypeScript 5.7: +/// + +// Definitions for Node.js modules specific to TypeScript 5.7+: +/// +/// + +// Definitions for Node.js modules that are not specific to any version of TypeScript: +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts new file mode 100644 index 0000000..0569bef --- /dev/null +++ b/node_modules/@types/node/tty.d.ts @@ -0,0 +1,226 @@ +declare module "node:tty" { + import * as net from "node:net"; + /** + * The `tty.isatty()` method returns `true` if the given `fd` is associated with + * a TTY and `false` if it is not, including whenever `fd` is not a non-negative + * integer. + * @since v0.5.8 + * @param fd A numeric file descriptor + */ + function isatty(fd: number): boolean; + /** + * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js + * process and there should be no reason to create additional instances. + * @since v0.5.8 + */ + class ReadStream extends net.Socket { + constructor(fd: number, options?: net.SocketConstructorOpts); + /** + * A `boolean` that is `true` if the TTY is currently configured to operate as a + * raw device. + * + * This flag is always `false` when a process starts, even if the terminal is + * operating in raw mode. Its value will change with subsequent calls to `setRawMode`. + * @since v0.7.7 + */ + isRaw: boolean; + /** + * Allows configuration of `tty.ReadStream` so that it operates as a raw device. + * + * When in raw mode, input is always available character-by-character, not + * including modifiers. Additionally, all special processing of input characters + * by the terminal is disabled, including echoing input + * characters. Ctrl+C will no longer cause a `SIGINT` when + * in this mode. This mode does not affect terminal output processing, such as + * newline translation on Unix terminals. + * @since v0.7.7 + * @param mode If `true`, configures the `tty.ReadStream` to operate as a raw device. If `false`, configures the `tty.ReadStream` to operate in its default mode. The `readStream.isRaw` + * property will be set to the resulting mode. + * @return The read stream instance. + */ + setRawMode(mode: boolean): this; + /** + * A `boolean` that is always `true` for `tty.ReadStream` instances. + * @since v0.5.8 + */ + isTTY: boolean; + } + /** + * -1 - to the left from cursor + * 0 - the entire line + * 1 - to the right from cursor + */ + type Direction = -1 | 0 | 1; + interface WriteStreamEventMap extends net.SocketEventMap { + "resize": []; + } + /** + * Represents the writable side of a TTY. In normal circumstances, `process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there + * should be no reason to create additional instances. + * @since v0.5.8 + */ + class WriteStream extends net.Socket { + constructor(fd: number); + /** + * `writeStream.clearLine()` clears the current line of this `WriteStream` in a + * direction identified by `dir`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + clearLine(dir: Direction, callback?: () => void): boolean; + /** + * `writeStream.clearScreenDown()` clears this `WriteStream` from the current + * cursor down. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + clearScreenDown(callback?: () => void): boolean; + /** + * `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified + * position. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + cursorTo(x: number, y?: number, callback?: () => void): boolean; + cursorTo(x: number, callback: () => void): boolean; + /** + * `writeStream.moveCursor()` moves this `WriteStream`'s cursor _relative_ to its + * current position. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + moveCursor(dx: number, dy: number, callback?: () => void): boolean; + /** + * Returns: + * + * * `1` for 2, + * * `4` for 16, + * * `8` for 256, + * * `24` for 16,777,216 colors supported. + * + * Use this to determine what colors the terminal supports. Due to the nature of + * colors in terminals it is possible to either have false positives or false + * negatives. It depends on process information and the environment variables that + * may lie about what terminal is used. + * It is possible to pass in an `env` object to simulate the usage of a specific + * terminal. This can be useful to check how specific environment settings behave. + * + * To enforce a specific color support, use one of the below environment settings. + * + * * 2 colors: `FORCE_COLOR = 0` (Disables colors) + * * 16 colors: `FORCE_COLOR = 1` + * * 256 colors: `FORCE_COLOR = 2` + * * 16,777,216 colors: `FORCE_COLOR = 3` + * + * Disabling color support is also possible by using the `NO_COLOR` and `NODE_DISABLE_COLORS` environment variables. + * @since v9.9.0 + * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. + */ + getColorDepth(env?: object): number; + /** + * Returns `true` if the `writeStream` supports at least as many colors as provided + * in `count`. Minimum support is 2 (black and white). + * + * This has the same false positives and negatives as described in `writeStream.getColorDepth()`. + * + * ```js + * process.stdout.hasColors(); + * // Returns true or false depending on if `stdout` supports at least 16 colors. + * process.stdout.hasColors(256); + * // Returns true or false depending on if `stdout` supports at least 256 colors. + * process.stdout.hasColors({ TMUX: '1' }); + * // Returns true. + * process.stdout.hasColors(2 ** 24, { TMUX: '1' }); + * // Returns false (the environment setting pretends to support 2 ** 8 colors). + * ``` + * @since v11.13.0, v10.16.0 + * @param [count=16] The number of colors that are requested (minimum 2). + * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. + */ + hasColors(count?: number): boolean; + hasColors(env?: object): boolean; + hasColors(count: number, env?: object): boolean; + /** + * `writeStream.getWindowSize()` returns the size of the TTY + * corresponding to this `WriteStream`. The array is of the type `[numColumns, numRows]` where `numColumns` and `numRows` represent the number + * of columns and rows in the corresponding TTY. + * @since v0.7.7 + */ + getWindowSize(): [number, number]; + /** + * A `number` specifying the number of columns the TTY currently has. This property + * is updated whenever the `'resize'` event is emitted. + * @since v0.7.7 + */ + columns: number; + /** + * A `number` specifying the number of rows the TTY currently has. This property + * is updated whenever the `'resize'` event is emitted. + * @since v0.7.7 + */ + rows: number; + /** + * A `boolean` that is always `true`. + * @since v0.5.8 + */ + isTTY: boolean; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: WriteStreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: WriteStreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } +} +declare module "tty" { + export * from "node:tty"; +} diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts new file mode 100644 index 0000000..d6ea8c5 --- /dev/null +++ b/node_modules/@types/node/url.d.ts @@ -0,0 +1,556 @@ +declare module "node:url" { + import { Blob, NonSharedBuffer } from "node:buffer"; + import { ClientRequestArgs } from "node:http"; + import { ParsedUrlQuery, ParsedUrlQueryInput } from "node:querystring"; + // Input to `url.format` + interface UrlObject { + auth?: string | null | undefined; + hash?: string | null | undefined; + host?: string | null | undefined; + hostname?: string | null | undefined; + href?: string | null | undefined; + pathname?: string | null | undefined; + protocol?: string | null | undefined; + search?: string | null | undefined; + slashes?: boolean | null | undefined; + port?: string | number | null | undefined; + query?: string | null | ParsedUrlQueryInput | undefined; + } + // Output of `url.parse` + interface Url { + auth: string | null; + hash: string | null; + host: string | null; + hostname: string | null; + href: string; + path: string | null; + pathname: string | null; + protocol: string | null; + search: string | null; + slashes: boolean | null; + port: string | null; + query: string | null | ParsedUrlQuery; + } + interface UrlWithParsedQuery extends Url { + query: ParsedUrlQuery; + } + interface UrlWithStringQuery extends Url { + query: string | null; + } + interface FileUrlToPathOptions { + /** + * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. + * @default undefined + * @since v22.1.0 + */ + windows?: boolean | undefined; + } + interface PathToFileUrlOptions { + /** + * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. + * @default undefined + * @since v22.1.0 + */ + windows?: boolean | undefined; + } + /** + * The `url.parse()` method takes a URL string, parses it, and returns a URL + * object. + * + * A `TypeError` is thrown if `urlString` is not a string. + * + * A `URIError` is thrown if the `auth` property is present but cannot be decoded. + * + * `url.parse()` uses a lenient, non-standard algorithm for parsing URL + * strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) + * and incorrect handling of usernames and passwords. Do not use with untrusted + * input. CVEs are not issued for `url.parse()` vulnerabilities. Use the + * [WHATWG URL](https://nodejs.org/docs/latest-v26.x/api/url.html#the-whatwg-url-api) API instead, for example: + * + * ```js + * function getURL(req) { + * const proto = req.headers['x-forwarded-proto'] || 'https'; + * const host = req.headers['x-forwarded-host'] || req.headers.host || 'example.com'; + * return new URL(req.url || '/', `${proto}://${host}`); + * } + * ``` + * + * The example above assumes well-formed headers are forwarded from a reverse + * proxy to your Node.js server. If you are not using a reverse proxy, you should + * use the example below: + * + * ```js + * function getURL(req) { + * return new URL(req.url || '/', 'https://example.com'); + * } + * ``` + * @since v0.1.25 + * @deprecated Use the WHATWG URL API instead. + * @param urlString The URL string to parse. + * @param parseQueryString If `true`, the `query` property will always + * be set to an object returned by the [`querystring`](https://nodejs.org/docs/latest-v26.x/api/querystring.html) module's `parse()` + * method. If `false`, the `query` property on the returned URL object will be an + * unparsed, undecoded string. **Default:** `false`. + * @param slashesDenoteHost If `true`, the first token after the literal + * string `//` and preceding the next `/` will be interpreted as the `host`. + * For instance, given `//foo/bar`, the result would be + * `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`. + * **Default:** `false`. + */ + function parse( + urlString: string, + parseQueryString?: false, + slashesDenoteHost?: boolean, + ): UrlWithStringQuery; + function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; + function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; + /** + * The `url.format()` method returns a formatted URL string derived from `urlObject`. + * + * ```js + * import url from 'node:url'; + * url.format({ + * protocol: 'https', + * hostname: 'example.com', + * pathname: '/some/path', + * query: { + * page: 1, + * format: 'json', + * }, + * }); + * + * // => 'https://example.com/some/path?page=1&format=json' + * ``` + * + * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. + * + * The formatting process operates as follows: + * + * * A new empty string `result` is created. + * * If `urlObject.protocol` is a string, it is appended as-is to `result`. + * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. + * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII + * colon (`:`) character, the literal string `:` will be appended to `result`. + * * If either of the following conditions is true, then the literal string `//` will be appended to `result`: + * * `urlObject.slashes` property is true; + * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`; + * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string + * and appended to `result` followed by the literal string `@`. + * * If the `urlObject.host` property is `undefined` then: + * * If the `urlObject.hostname` is a string, it is appended to `result`. + * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, + * an `Error` is thrown. + * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`: + * * The literal string `:` is appended to `result`, and + * * The value of `urlObject.port` is coerced to a string and appended to `result`. + * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`. + * * If the `urlObject.pathname` property is a string that is not an empty string: + * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash + * (`/`), then the literal string `'/'` is appended to `result`. + * * The value of `urlObject.pathname` is appended to `result`. + * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the + * `querystring` module's `stringify()` method passing the value of `urlObject.query`. + * * Otherwise, if `urlObject.search` is a string: + * * If the value of `urlObject.search` _does not start_ with the ASCII question + * mark (`?`) character, the literal string `?` is appended to `result`. + * * The value of `urlObject.search` is appended to `result`. + * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.hash` property is a string: + * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`) + * character, the literal string `#` is appended to `result`. + * * The value of `urlObject.hash` is appended to `result`. + * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a + * string, an `Error` is thrown. + * * `result` is returned. + * @since v0.1.25 + * @legacy Use the WHATWG URL API instead. + * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. + */ + function format(urlObject: URL, options?: URLFormatOptions): string; + /** + * The `url.format()` method returns a formatted URL string derived from `urlObject`. + * + * ```js + * import url from 'node:url'; + * url.format({ + * protocol: 'https', + * hostname: 'example.com', + * pathname: '/some/path', + * query: { + * page: 1, + * format: 'json', + * }, + * }); + * + * // => 'https://example.com/some/path?page=1&format=json' + * ``` + * + * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. + * + * The formatting process operates as follows: + * + * * A new empty string `result` is created. + * * If `urlObject.protocol` is a string, it is appended as-is to `result`. + * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. + * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII + * colon (`:`) character, the literal string `:` will be appended to `result`. + * * If either of the following conditions is true, then the literal string `//` will be appended to `result`: + * * `urlObject.slashes` property is true; + * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`; + * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string + * and appended to `result` followed by the literal string `@`. + * * If the `urlObject.host` property is `undefined` then: + * * If the `urlObject.hostname` is a string, it is appended to `result`. + * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, + * an `Error` is thrown. + * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`: + * * The literal string `:` is appended to `result`, and + * * The value of `urlObject.port` is coerced to a string and appended to `result`. + * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`. + * * If the `urlObject.pathname` property is a string that is not an empty string: + * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash + * (`/`), then the literal string `'/'` is appended to `result`. + * * The value of `urlObject.pathname` is appended to `result`. + * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the + * `querystring` module's `stringify()` method passing the value of `urlObject.query`. + * * Otherwise, if `urlObject.search` is a string: + * * If the value of `urlObject.search` _does not start_ with the ASCII question + * mark (`?`) character, the literal string `?` is appended to `result`. + * * The value of `urlObject.search` is appended to `result`. + * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.hash` property is a string: + * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`) + * character, the literal string `#` is appended to `result`. + * * The value of `urlObject.hash` is appended to `result`. + * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a + * string, an `Error` is thrown. + * * `result` is returned. + * @since v0.1.25 + * @legacy Use the WHATWG URL API instead. + * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). + */ + function format(urlObject: UrlObject): string; + /** + * `url.format(urlString)` is shorthand for `url.format(url.parse(urlString))`. + * + * Because it invokes the deprecated `url.parse()` internally, passing a string argument + * to `url.format()` is itself deprecated. + * + * Canonicalizing a URL string can be performed using the WHATWG URL API, by + * constructing a new URL object and calling `url.toString()`. + * + * ```js + * import { URL } from 'node:url'; + * + * const unformatted = 'http://[fe80:0:0:0:0:0:0:1]:/a/b?a=b#abc'; + * const formatted = new URL(unformatted).toString(); + * + * console.log(formatted); // Prints: http://[fe80::1]/a/b?a=b#abc + * ``` + * @since v0.1.25 + * @deprecated Use the WHATWG URL API instead. + * @param urlString A string that will be passed to `url.parse()` and then formatted. + */ + function format(urlString: string): string; + /** + * The `url.resolve()` method resolves a target URL relative to a base URL in a + * manner similar to that of a web browser resolving an anchor tag. + * + * ```js + * import url from 'node:url'; + * url.resolve('/one/two/three', 'four'); // '/one/two/four' + * url.resolve('http://example.com/', '/one'); // 'http://example.com/one' + * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two' + * ``` + * + * Because it invokes the deprecated `url.parse()` internally, `url.resolve()` is itself deprecated. + * + * To achieve the same result using the WHATWG URL API: + * + * ```js + * function resolve(from, to) { + * const resolvedUrl = new URL(to, new URL(from, 'resolve://')); + * if (resolvedUrl.protocol === 'resolve:') { + * // `from` is a relative URL. + * const { pathname, search, hash } = resolvedUrl; + * return pathname + search + hash; + * } + * return resolvedUrl.toString(); + * } + * + * resolve('/one/two/three', 'four'); // '/one/two/four' + * resolve('http://example.com/', '/one'); // 'http://example.com/one' + * resolve('http://example.com/one', '/two'); // 'http://example.com/two' + * ``` + * @since v0.1.25 + * @deprecated Use the WHATWG URL API instead. + * @param from The base URL to use if `to` is a relative URL. + * @param to The target URL to resolve. + */ + function resolve(from: string, to: string): string; + /** + * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an + * invalid domain, the empty string is returned. + * + * It performs the inverse operation to {@link domainToUnicode}. + * + * ```js + * import url from 'node:url'; + * + * console.log(url.domainToASCII('español.com')); + * // Prints xn--espaol-zwa.com + * console.log(url.domainToASCII('中文.com')); + * // Prints xn--fiq228c.com + * console.log(url.domainToASCII('xn--iñvalid.com')); + * // Prints an empty string + * ``` + * @since v7.4.0, v6.13.0 + */ + function domainToASCII(domain: string): string; + /** + * Returns the Unicode serialization of the `domain`. If `domain` is an invalid + * domain, the empty string is returned. + * + * It performs the inverse operation to {@link domainToASCII}. + * + * ```js + * import url from 'node:url'; + * + * console.log(url.domainToUnicode('xn--espaol-zwa.com')); + * // Prints español.com + * console.log(url.domainToUnicode('xn--fiq228c.com')); + * // Prints 中文.com + * console.log(url.domainToUnicode('xn--iñvalid.com')); + * // Prints an empty string + * ``` + * @since v7.4.0, v6.13.0 + */ + function domainToUnicode(domain: string): string; + /** + * This function ensures the correct decodings of percent-encoded characters as + * well as ensuring a cross-platform valid absolute path string. + * + * ```js + * import { fileURLToPath } from 'node:url'; + * + * const __filename = fileURLToPath(import.meta.url); + * + * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/ + * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows) + * + * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt + * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows) + * + * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt + * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX) + * + * new URL('file:///hello world').pathname; // Incorrect: /hello%20world + * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX) + * ``` + * + * **Security Considerations:** + * + * This function decodes percent-encoded characters, including encoded dot-segments + * (`%2e` as `.` and `%2e%2e` as `..`), and then normalizes the resulting path. + * This means that encoded directory traversal sequences (such as `%2e%2e`) are + * decoded and processed as actual path traversal, even though encoded slashes + * (`%2F`, `%5C`) are correctly rejected. + * + * **Applications must not rely on `fileURLToPath()` alone to prevent directory + * traversal attacks.** Always perform explicit path validation and security checks + * on the returned path value to ensure it remains within expected boundaries + * before using it for file system operations. + * @since v10.12.0 + * @param url The file URL string or URL object to convert to a path. + * @return The fully-resolved platform-specific Node.js file path. + */ + function fileURLToPath(url: string | URL, options?: FileUrlToPathOptions): string; + /** + * Like `url.fileURLToPath(...)` except that instead of returning a string + * representation of the path, a `Buffer` is returned. This conversion is + * helpful when the input URL contains percent-encoded segments that are + * not valid UTF-8 / Unicode sequences. + * + * **Security Considerations:** + * + * This function has the same security considerations as `url.fileURLToPath()`. + * It decodes percent-encoded characters, including encoded dot-segments + * (`%2e` as `.` and `%2e%2e` as `..`), and normalizes the path. **Applications + * must not rely on this function alone to prevent directory traversal attacks.** + * Always perform explicit path validation on the returned buffer value before + * using it for file system operations. + * @since v24.3.0 + * @param url The file URL string or URL object to convert to a path. + * @returns The fully-resolved platform-specific Node.js file path + * as a `Buffer`. + */ + function fileURLToPathBuffer(url: string | URL, options?: FileUrlToPathOptions): NonSharedBuffer; + /** + * This function ensures that `path` is resolved absolutely, and that the URL + * control characters are correctly encoded when converting into a File URL. + * + * ```js + * import { pathToFileURL } from 'node:url'; + * + * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1 + * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX) + * + * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c + * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX) + * ``` + * @since v10.12.0 + * @param path The path to convert to a File URL. + * @return The file URL object. + */ + function pathToFileURL(path: string, options?: PathToFileUrlOptions): URL; + /** + * This utility function converts a URL object into an ordinary options object as + * expected by the `http.request()` and `https.request()` APIs. + * + * ```js + * import { urlToHttpOptions } from 'node:url'; + * const myURL = new URL('https://a:b@測試?abc#foo'); + * + * console.log(urlToHttpOptions(myURL)); + * /* + * { + * protocol: 'https:', + * hostname: 'xn--g6w251d', + * hash: '#foo', + * search: '?abc', + * pathname: '/', + * path: '/?abc', + * href: 'https://a:b@xn--g6w251d/?abc#foo', + * auth: 'a:b' + * } + * + * ``` + * @since v15.7.0, v14.18.0 + * @param url The `WHATWG URL` object to convert to an options object. + * @return Options object + */ + function urlToHttpOptions(url: URL): ClientRequestArgs; + interface URLFormatOptions { + /** + * `true` if the serialized URL string should include the username and password, `false` otherwise. + * @default true + */ + auth?: boolean | undefined; + /** + * `true` if the serialized URL string should include the fragment, `false` otherwise. + * @default true + */ + fragment?: boolean | undefined; + /** + * `true` if the serialized URL string should include the search query, `false` otherwise. + * @default true + */ + search?: boolean | undefined; + /** + * `true` if Unicode characters appearing in the host component of the URL string should be encoded directly as opposed to + * being Punycode encoded. + * @default false + */ + unicode?: boolean | undefined; + } + // #region web types + type URLPatternInput = string | URLPatternInit; + interface URLPatternComponentResult { + input: string; + groups: Record; + } + interface URLPatternInit { + protocol?: string; + username?: string; + password?: string; + hostname?: string; + port?: string; + pathname?: string; + search?: string; + hash?: string; + baseURL?: string; + } + interface URLPatternOptions { + ignoreCase?: boolean; + } + interface URLPatternResult { + inputs: URLPatternInput[]; + protocol: URLPatternComponentResult; + username: URLPatternComponentResult; + password: URLPatternComponentResult; + hostname: URLPatternComponentResult; + port: URLPatternComponentResult; + pathname: URLPatternComponentResult; + search: URLPatternComponentResult; + hash: URLPatternComponentResult; + } + interface URL { + hash: string; + host: string; + hostname: string; + href: string; + readonly origin: string; + password: string; + pathname: string; + port: string; + protocol: string; + search: string; + readonly searchParams: URLSearchParams; + username: string; + toJSON(): string; + } + var URL: { + prototype: URL; + new(url: string | URL, base?: string | URL): URL; + canParse(input: string | URL, base?: string | URL): boolean; + createObjectURL(blob: Blob): string; + parse(input: string | URL, base?: string | URL): URL | null; + revokeObjectURL(id: string): void; + }; + interface URLPattern { + readonly hasRegExpGroups: boolean; + readonly hash: string; + readonly hostname: string; + readonly password: string; + readonly pathname: string; + readonly port: string; + readonly protocol: string; + readonly search: string; + readonly username: string; + exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; + test(input?: URLPatternInput, baseURL?: string | URL): boolean; + } + var URLPattern: { + prototype: URLPattern; + new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; + new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; + }; + interface URLSearchParams { + readonly size: number; + append(name: string, value: string): void; + delete(name: string, value?: string): void; + get(name: string): string | null; + getAll(name: string): string[]; + has(name: string, value?: string): boolean; + set(name: string, value: string): void; + sort(): void; + forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void; + [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; + entries(): URLSearchParamsIterator<[string, string]>; + keys(): URLSearchParamsIterator; + values(): URLSearchParamsIterator; + } + var URLSearchParams: { + prototype: URLSearchParams; + new(init?: string[][] | Record | string | URLSearchParams): URLSearchParams; + }; + interface URLSearchParamsIterator extends NodeJS.Iterator { + [Symbol.iterator](): URLSearchParamsIterator; + } + // #endregion +} +declare module "url" { + export * from "node:url"; +} diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts new file mode 100644 index 0000000..e6d87ff --- /dev/null +++ b/node_modules/@types/node/util.d.ts @@ -0,0 +1,1677 @@ +declare module "node:util" { + export * as types from "node:util/types"; + export type InspectStyle = + | "special" + | "number" + | "bigint" + | "boolean" + | "undefined" + | "null" + | "string" + | "symbol" + | "date" + | "name" + | "regexp" + | "module"; + export interface InspectStyles extends Record string)> { + regexp: { + (value: string): string; + colors: InspectColor[]; + }; + } + export type InspectColorModifier = + | "reset" + | "bold" + | "dim" + | "italic" + | "underline" + | "blink" + | "inverse" + | "hidden" + | "strikethrough" + | "doubleunderline"; + export type InspectColorForeground = + | "black" + | "red" + | "green" + | "yellow" + | "blue" + | "magenta" + | "cyan" + | "white" + | "gray" + | "redBright" + | "greenBright" + | "yellowBright" + | "blueBright" + | "magentaBright" + | "cyanBright" + | "whiteBright"; + export type InspectColorBackground = `bg${Capitalize}`; + export type InspectColor = InspectColorModifier | InspectColorForeground | InspectColorBackground; + export interface InspectColors extends Record {} + export interface InspectOptions { + /** + * If `true`, object's non-enumerable symbols and properties are included in the formatted result. + * `WeakMap` and `WeakSet` entries are also included as well as user defined prototype properties (excluding method properties). + * @default false + */ + showHidden?: boolean | undefined; + /** + * Specifies the number of times to recurse while formatting object. + * This is useful for inspecting large objects. + * To recurse up to the maximum call stack size pass `Infinity` or `null`. + * @default 2 + */ + depth?: number | null | undefined; + /** + * If `true`, the output is styled with ANSI color codes. Colors are customizable. + */ + colors?: boolean | undefined; + /** + * If `false`, `[util.inspect.custom](depth, opts, inspect)` functions are not invoked. + * @default true + */ + customInspect?: boolean | undefined; + /** + * If `true`, `Proxy` inspection includes the target and handler objects. + * @default false + */ + showProxy?: boolean | undefined; + /** + * Specifies the maximum number of `Array`, `TypedArray`, `WeakMap`, and `WeakSet` elements + * to include when formatting. Set to `null` or `Infinity` to show all elements. + * Set to `0` or negative to show no elements. + * @default 100 + */ + maxArrayLength?: number | null | undefined; + /** + * Specifies the maximum number of characters to + * include when formatting. Set to `null` or `Infinity` to show all elements. + * Set to `0` or negative to show no characters. + * @default 10000 + */ + maxStringLength?: number | null | undefined; + /** + * The length at which input values are split across multiple lines. + * Set to `Infinity` to format the input as a single line + * (in combination with `compact` set to `true` or any number >= `1`). + * @default 80 + */ + breakLength?: number | undefined; + /** + * Setting this to `false` causes each object key + * to be displayed on a new line. It will also add new lines to text that is + * longer than `breakLength`. If set to a number, the most `n` inner elements + * are united on a single line as long as all properties fit into + * `breakLength`. Short array elements are also grouped together. Note that no + * text will be reduced below 16 characters, no matter the `breakLength` size. + * For more information, see the example below. + * @default true + */ + compact?: boolean | number | undefined; + /** + * If set to `true` or a function, all properties of an object, and `Set` and `Map` + * entries are sorted in the resulting string. + * If set to `true` the default sort is used. + * If set to a function, it is used as a compare function. + */ + sorted?: boolean | ((a: string, b: string) => number) | undefined; + /** + * If set to `true`, getters are going to be + * inspected as well. If set to `'get'` only getters without setter are going + * to be inspected. If set to `'set'` only getters having a corresponding + * setter are going to be inspected. This might cause side effects depending on + * the getter function. + * @default false + */ + getters?: "get" | "set" | boolean | undefined; + /** + * If set to `true`, an underscore is used to separate every three digits in all bigints and numbers. + * @default false + */ + numericSeparator?: boolean | undefined; + } + export interface InspectContext extends Required { + stylize(text: string, styleType: InspectStyle): string; + } + import _inspect = inspect; + export interface Inspectable { + [inspect.custom](depth: number, options: InspectContext, inspect: typeof _inspect): any; + } + export interface CallSiteObject { + /** + * Returns the name of the function associated with this call site. + */ + functionName: string; + /** + * Returns the name of the resource that contains the script for the + * function for this call site. + */ + scriptName: string; + /** + * Returns the unique id of the script, as in Chrome DevTools protocol + * [`Runtime.ScriptId`](https://chromedevtools.github.io/devtools-protocol/1-3/Runtime/#type-ScriptId). + * @since v22.14.0 + */ + scriptId: string; + /** + * Returns the number, 1-based, of the line for the associate function call. + */ + lineNumber: number; + /** + * Returns the 1-based column offset on the line for the associated function call. + */ + columnNumber: number; + } + export type DiffEntry = [operation: -1 | 0 | 1, value: string]; + /** + * `util.diff()` compares two string or array values and returns an array of difference entries. + * It uses the Myers diff algorithm to compute minimal differences, which is the same algorithm + * used internally by assertion error messages. + * + * If the values are equal, an empty array is returned. + * + * ```js + * const { diff } = require('node:util'); + * + * // Comparing strings + * const actualString = '12345678'; + * const expectedString = '12!!5!7!'; + * console.log(diff(actualString, expectedString)); + * // [ + * // [0, '1'], + * // [0, '2'], + * // [1, '3'], + * // [1, '4'], + * // [-1, '!'], + * // [-1, '!'], + * // [0, '5'], + * // [1, '6'], + * // [-1, '!'], + * // [0, '7'], + * // [1, '8'], + * // [-1, '!'], + * // ] + * // Comparing arrays + * const actualArray = ['1', '2', '3']; + * const expectedArray = ['1', '3', '4']; + * console.log(diff(actualArray, expectedArray)); + * // [ + * // [0, '1'], + * // [1, '2'], + * // [0, '3'], + * // [-1, '4'], + * // ] + * // Equal values return empty array + * console.log(diff('same', 'same')); + * // [] + * ``` + * @since v22.15.0 + * @experimental + * @param actual The first value to compare + * @param expected The second value to compare + * @returns An array of difference entries. Each entry is an array with two elements: + * * Index 0: `number` Operation code: `-1` for delete, `0` for no-op/unchanged, `1` for insert + * * Index 1: `string` The value associated with the operation + */ + export function diff(actual: string | readonly string[], expected: string | readonly string[]): DiffEntry[]; + /** + * The `util.format()` method returns a formatted string using the first argument + * as a `printf`-like format string which can contain zero or more format + * specifiers. Each specifier is replaced with the converted value from the + * corresponding argument. Supported specifiers are: + * + * If a specifier does not have a corresponding argument, it is not replaced: + * + * ```js + * util.format('%s:%s', 'foo'); + * // Returns: 'foo:%s' + * ``` + * + * Values that are not part of the format string are formatted using `util.inspect()` if their type is not `string`. + * + * If there are more arguments passed to the `util.format()` method than the + * number of specifiers, the extra arguments are concatenated to the returned + * string, separated by spaces: + * + * ```js + * util.format('%s:%s', 'foo', 'bar', 'baz'); + * // Returns: 'foo:bar baz' + * ``` + * + * If the first argument does not contain a valid format specifier, `util.format()` returns a string that is the concatenation of all arguments separated by spaces: + * + * ```js + * util.format(1, 2, 3); + * // Returns: '1 2 3' + * ``` + * + * If only one argument is passed to `util.format()`, it is returned as it is + * without any formatting: + * + * ```js + * util.format('%% %s'); + * // Returns: '%% %s' + * ``` + * + * `util.format()` is a synchronous method that is intended as a debugging tool. + * Some input values can have a significant performance overhead that can block the + * event loop. Use this function with care and never in a hot code path. + * @since v0.5.3 + * @param format A `printf`-like format string. + */ + export function format(format?: any, ...param: any[]): string; + /** + * This function is identical to {@link format}, except in that it takes + * an `inspectOptions` argument which specifies options that are passed along to {@link inspect}. + * + * ```js + * util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 }); + * // Returns 'See object { foo: 42 }', where `42` is colored as a number + * // when printed to a terminal. + * ``` + * @since v10.0.0 + */ + export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string; + export interface GetCallSitesOptions { + /** + * Reconstruct the original location in the stacktrace from the source-map. + * Enabled by default with the flag `--enable-source-maps`. + */ + sourceMap?: boolean | undefined; + } + /** + * Returns an array of call site objects containing the stack of + * the caller function. + * + * Unlike accessing an `error.stack`, the result returned from this API is not + * interfered with `Error.prepareStackTrace`. + * + * ```js + * import { getCallSites } from 'node:util'; + * + * function exampleFunction() { + * const callSites = getCallSites(); + * + * console.log('Call Sites:'); + * callSites.forEach((callSite, index) => { + * console.log(`CallSite ${index + 1}:`); + * console.log(`Function Name: ${callSite.functionName}`); + * console.log(`Script Name: ${callSite.scriptName}`); + * console.log(`Line Number: ${callSite.lineNumber}`); + * console.log(`Column Number: ${callSite.columnNumber}`); + * }); + * // CallSite 1: + * // Function Name: exampleFunction + * // Script Name: /home/example.js + * // Line Number: 5 + * // Column Number: 26 + * + * // CallSite 2: + * // Function Name: anotherFunction + * // Script Name: /home/example.js + * // Line Number: 22 + * // Column Number: 3 + * + * // ... + * } + * + * // A function to simulate another stack layer + * function anotherFunction() { + * exampleFunction(); + * } + * + * anotherFunction(); + * ``` + * + * It is possible to reconstruct the original locations by setting the option `sourceMap` to `true`. + * If the source map is not available, the original location will be the same as the current location. + * When the `--enable-source-maps` flag is enabled, `sourceMap` will be true by default. + * + * ```ts + * import { getCallSites } from 'node:util'; + * + * interface Foo { + * foo: string; + * } + * + * const callSites = getCallSites({ sourceMap: true }); + * + * // With sourceMap: + * // Function Name: '' + * // Script Name: example.js + * // Line Number: 7 + * // Column Number: 26 + * + * // Without sourceMap: + * // Function Name: '' + * // Script Name: example.js + * // Line Number: 2 + * // Column Number: 26 + * ``` + * @param frameCount Number of frames to capture as call site objects. + * **Default:** `10`. Allowable range is between 1 and 200. + * @return An array of call site objects + * @since v22.9.0 + */ + export function getCallSites(frameCount?: number, options?: GetCallSitesOptions): CallSiteObject[]; + export function getCallSites(options: GetCallSitesOptions): CallSiteObject[]; + /** + * Returns the string name for a numeric error code that comes from a Node.js API. + * The mapping between error codes and error names is platform-dependent. + * See `Common System Errors` for the names of common errors. + * + * ```js + * fs.access('file/that/does/not/exist', (err) => { + * const name = util.getSystemErrorName(err.errno); + * console.error(name); // ENOENT + * }); + * ``` + * @since v9.7.0 + */ + export function getSystemErrorName(err: number): string; + /** + * Enable or disable printing a stack trace on `SIGINT`. The API is only available on the main thread. + * @since 24.6.0 + */ + export function setTraceSigInt(enable: boolean): void; + /** + * Returns a Map of all system error codes available from the Node.js API. + * The mapping between error codes and error names is platform-dependent. + * See `Common System Errors` for the names of common errors. + * + * ```js + * fs.access('file/that/does/not/exist', (err) => { + * const errorMap = util.getSystemErrorMap(); + * const name = errorMap.get(err.errno); + * console.error(name); // ENOENT + * }); + * ``` + * @since v16.0.0, v14.17.0 + */ + export function getSystemErrorMap(): Map; + /** + * Returns the string message for a numeric error code that comes from a Node.js + * API. + * The mapping between error codes and string messages is platform-dependent. + * + * ```js + * fs.access('file/that/does/not/exist', (err) => { + * const message = util.getSystemErrorMessage(err.errno); + * console.error(message); // no such file or directory + * }); + * ``` + * @since v22.12.0 + */ + export function getSystemErrorMessage(err: number): string; + /** + * Returns the `string` after replacing any surrogate code points + * (or equivalently, any unpaired surrogate code units) with the + * Unicode "replacement character" U+FFFD. + * @since v16.8.0, v14.18.0 + */ + export function toUSVString(string: string): string; + /** + * Creates and returns an `AbortController` instance whose `AbortSignal` is marked + * as transferable and can be used with `structuredClone()` or `postMessage()`. + * @since v18.11.0 + * @returns A transferable AbortController + */ + export function transferableAbortController(): AbortController; + /** + * Marks the given `AbortSignal` as transferable so that it can be used with`structuredClone()` and `postMessage()`. + * + * ```js + * const signal = transferableAbortSignal(AbortSignal.timeout(100)); + * const channel = new MessageChannel(); + * channel.port2.postMessage(signal, [signal]); + * ``` + * @since v18.11.0 + * @param signal The AbortSignal + * @returns The same AbortSignal + */ + export function transferableAbortSignal(signal: AbortSignal): AbortSignal; + /** + * Listens to abort event on the provided `signal` and returns a promise that resolves when the `signal` is aborted. + * If `resource` is provided, it weakly references the operation's associated object, + * so if `resource` is garbage collected before the `signal` aborts, + * then returned promise shall remain pending. + * This prevents memory leaks in long-running or non-cancelable operations. + * + * ```js + * import { aborted } from 'node:util'; + * + * // Obtain an object with an abortable signal, like a custom resource or operation. + * const dependent = obtainSomethingAbortable(); + * + * // Pass `dependent` as the resource, indicating the promise should only resolve + * // if `dependent` is still in memory when the signal is aborted. + * aborted(dependent.signal, dependent).then(() => { + * // This code runs when `dependent` is aborted. + * console.log('Dependent resource was aborted.'); + * }); + * + * // Simulate an event that triggers the abort. + * dependent.on('event', () => { + * dependent.abort(); // This will cause the `aborted` promise to resolve. + * }); + * ``` + * @since v19.7.0 + * @param resource Any non-null object tied to the abortable operation and held weakly. + * If `resource` is garbage collected before the `signal` aborts, the promise remains pending, + * allowing Node.js to stop tracking it. + * This helps prevent memory leaks in long-running or non-cancelable operations. + */ + export function aborted(signal: AbortSignal, resource: any): Promise; + /** + * The `util.inspect()` method returns a string representation of `object` that is + * intended for debugging. The output of `util.inspect` may change at any time + * and should not be depended upon programmatically. Additional `options` may be + * passed that alter the result. + * `util.inspect()` will use the constructor's name and/or `Symbol.toStringTag` + * property to make an identifiable tag for an inspected value. + * + * ```js + * class Foo { + * get [Symbol.toStringTag]() { + * return 'bar'; + * } + * } + * + * class Bar {} + * + * const baz = Object.create(null, { [Symbol.toStringTag]: { value: 'foo' } }); + * + * util.inspect(new Foo()); // 'Foo [bar] {}' + * util.inspect(new Bar()); // 'Bar {}' + * util.inspect(baz); // '[foo] {}' + * ``` + * + * Circular references point to their anchor by using a reference index: + * + * ```js + * import { inspect } from 'node:util'; + * + * const obj = {}; + * obj.a = [obj]; + * obj.b = {}; + * obj.b.inner = obj.b; + * obj.b.obj = obj; + * + * console.log(inspect(obj)); + * // { + * // a: [ [Circular *1] ], + * // b: { inner: [Circular *2], obj: [Circular *1] } + * // } + * ``` + * + * The following example inspects all properties of the `util` object: + * + * ```js + * import util from 'node:util'; + * + * console.log(util.inspect(util, { showHidden: true, depth: null })); + * ``` + * + * The following example highlights the effect of the `compact` option: + * + * ```js + * import { inspect } from 'node:util'; + * + * const o = { + * a: [1, 2, [[ + * 'Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit, sed do ' + + * 'eiusmod \ntempor incididunt ut labore et dolore magna aliqua.', + * 'test', + * 'foo']], 4], + * b: new Map([['za', 1], ['zb', 'test']]), + * }; + * console.log(inspect(o, { compact: true, depth: 5, breakLength: 80 })); + * + * // { a: + * // [ 1, + * // 2, + * // [ [ 'Lorem ipsum dolor sit amet,\nconsectetur [...]', // A long line + * // 'test', + * // 'foo' ] ], + * // 4 ], + * // b: Map(2) { 'za' => 1, 'zb' => 'test' } } + * + * // Setting `compact` to false or an integer creates more reader friendly output. + * console.log(inspect(o, { compact: false, depth: 5, breakLength: 80 })); + * + * // { + * // a: [ + * // 1, + * // 2, + * // [ + * // [ + * // 'Lorem ipsum dolor sit amet,\n' + + * // 'consectetur adipiscing elit, sed do eiusmod \n' + + * // 'tempor incididunt ut labore et dolore magna aliqua.', + * // 'test', + * // 'foo' + * // ] + * // ], + * // 4 + * // ], + * // b: Map(2) { + * // 'za' => 1, + * // 'zb' => 'test' + * // } + * // } + * + * // Setting `breakLength` to e.g. 150 will print the "Lorem ipsum" text in a + * // single line. + * ``` + * + * The `showHidden` option allows `WeakMap` and `WeakSet` entries to be + * inspected. If there are more entries than `maxArrayLength`, there is no + * guarantee which entries are displayed. That means retrieving the same + * `WeakSet` entries twice may result in different output. Furthermore, entries + * with no remaining strong references may be garbage collected at any time. + * + * ```js + * import { inspect } from 'node:util'; + * + * const obj = { a: 1 }; + * const obj2 = { b: 2 }; + * const weakSet = new WeakSet([obj, obj2]); + * + * console.log(inspect(weakSet, { showHidden: true })); + * // WeakSet { { a: 1 }, { b: 2 } } + * ``` + * + * The `sorted` option ensures that an object's property insertion order does not + * impact the result of `util.inspect()`. + * + * ```js + * import { inspect } from 'node:util'; + * import assert from 'node:assert'; + * + * const o1 = { + * b: [2, 3, 1], + * a: '`a` comes before `b`', + * c: new Set([2, 3, 1]), + * }; + * console.log(inspect(o1, { sorted: true })); + * // { a: '`a` comes before `b`', b: [ 2, 3, 1 ], c: Set(3) { 1, 2, 3 } } + * console.log(inspect(o1, { sorted: (a, b) => b.localeCompare(a) })); + * // { c: Set(3) { 3, 2, 1 }, b: [ 2, 3, 1 ], a: '`a` comes before `b`' } + * + * const o2 = { + * c: new Set([2, 1, 3]), + * a: '`a` comes before `b`', + * b: [2, 3, 1], + * }; + * assert.strict.equal( + * inspect(o1, { sorted: true }), + * inspect(o2, { sorted: true }), + * ); + * ``` + * + * The `numericSeparator` option adds an underscore every three digits to all + * numbers. + * + * ```js + * import { inspect } from 'node:util'; + * + * const thousand = 1000; + * const million = 1000000; + * const bigNumber = 123456789n; + * const bigDecimal = 1234.12345; + * + * console.log(inspect(thousand, { numericSeparator: true })); + * // 1_000 + * console.log(inspect(million, { numericSeparator: true })); + * // 1_000_000 + * console.log(inspect(bigNumber, { numericSeparator: true })); + * // 123_456_789n + * console.log(inspect(bigDecimal, { numericSeparator: true })); + * // 1_234.123_45 + * ``` + * + * `util.inspect()` is a synchronous method intended for debugging. Its maximum + * output length is approximately 128 MiB. Inputs that result in longer output will + * be truncated. + * @since v0.3.0 + * @param object Any JavaScript primitive or `Object`. + * @return The representation of `object`. + */ + export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; + export function inspect(object: any, options?: InspectOptions): string; + export namespace inspect { + const custom: unique symbol; + let colors: InspectColors; + let styles: InspectStyles; + let defaultOptions: InspectOptions; + let replDefaults: InspectOptions; + } + /** + * Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray). + * + * Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`. + * + * ```js + * import util from 'node:util'; + * + * util.isArray([]); + * // Returns: true + * util.isArray(new Array()); + * // Returns: true + * util.isArray({}); + * // Returns: false + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Use `isArray` instead. + */ + export function isArray(object: unknown): object is unknown[]; + /** + * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and + * `extends` keywords to get language level inheritance support. Also note + * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179). + * + * Inherit the prototype methods from one + * [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The + * prototype of `constructor` will be set to a new object created from + * `superConstructor`. + * + * This mainly adds some input validation on top of + * `Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`. + * As an additional convenience, `superConstructor` will be accessible + * through the `constructor.super_` property. + * + * ```js + * const util = require('node:util'); + * const EventEmitter = require('node:events'); + * + * function MyStream() { + * EventEmitter.call(this); + * } + * + * util.inherits(MyStream, EventEmitter); + * + * MyStream.prototype.write = function(data) { + * this.emit('data', data); + * }; + * + * const stream = new MyStream(); + * + * console.log(stream instanceof EventEmitter); // true + * console.log(MyStream.super_ === EventEmitter); // true + * + * stream.on('data', (data) => { + * console.log(`Received data: "${data}"`); + * }); + * stream.write('It works!'); // Received data: "It works!" + * ``` + * + * ES6 example using `class` and `extends`: + * + * ```js + * import EventEmitter from 'node:events'; + * + * class MyStream extends EventEmitter { + * write(data) { + * this.emit('data', data); + * } + * } + * + * const stream = new MyStream(); + * + * stream.on('data', (data) => { + * console.log(`Received data: "${data}"`); + * }); + * stream.write('With ES6'); + * ``` + * @since v0.3.0 + * @legacy Use ES2015 class syntax and `extends` keyword instead. + */ + export function inherits(constructor: unknown, superConstructor: unknown): void; + /** + * The `util.convertProcessSignalToExitCode()` method converts a signal name to its + * corresponding POSIX exit code. Following the POSIX standard, the exit code + * for a process terminated by a signal is calculated as `128 + signal number`. + * + * If `signal` is not a valid signal name, then an error will be thrown. See + * [`signal(7)`](https://man7.org/linux/man-pages/man7/signal.7.html) for a list of valid signals. + * + * ```js + * import { convertProcessSignalToExitCode } from 'node:util'; + * + * console.log(convertProcessSignalToExitCode('SIGTERM')); // 143 (128 + 15) + * console.log(convertProcessSignalToExitCode('SIGKILL')); // 137 (128 + 9) + * ``` + * + * This is particularly useful when working with processes to determine + * the exit code based on the signal that terminated the process. + * @since v25.4.0 + * @param signal A signal name (e.g. `'SIGTERM'`) + * @returns The exit code corresponding to `signal` + */ + export function convertProcessSignalToExitCode(signal: NodeJS.Signals): number; + export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void; + export interface DebugLogger extends DebugLoggerFunction { + /** + * The `util.debuglog().enabled` getter is used to create a test that can be used + * in conditionals based on the existence of the `NODE_DEBUG` environment variable. + * If the `section` name appears within the value of that environment variable, + * then the returned value will be `true`. If not, then the returned value will be + * `false`. + * + * ```js + * import { debuglog } from 'node:util'; + * const enabled = debuglog('foo').enabled; + * if (enabled) { + * console.log('hello from foo [%d]', 123); + * } + * ``` + * + * If this program is run with `NODE_DEBUG=foo` in the environment, then it will + * output something like: + * + * ```console + * hello from foo [123] + * ``` + */ + enabled: boolean; + } + /** + * The `util.debuglog()` method is used to create a function that conditionally + * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG` + * environment variable. If the `section` name appears within the value of that + * environment variable, then the returned function operates similar to + * `console.error()`. If not, then the returned function is a no-op. + * + * ```js + * import { debuglog } from 'node:util'; + * const log = debuglog('foo'); + * + * log('hello from foo [%d]', 123); + * ``` + * + * If this program is run with `NODE_DEBUG=foo` in the environment, then + * it will output something like: + * + * ```console + * FOO 3245: hello from foo [123] + * ``` + * + * where `3245` is the process id. If it is not run with that + * environment variable set, then it will not print anything. + * + * The `section` supports wildcard also: + * + * ```js + * import { debuglog } from 'node:util'; + * const log = debuglog('foo-bar'); + * + * log('hi there, it\'s foo-bar [%d]', 2333); + * ``` + * + * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output + * something like: + * + * ```console + * FOO-BAR 3257: hi there, it's foo-bar [2333] + * ``` + * + * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG` + * environment variable: `NODE_DEBUG=fs,net,tls`. + * + * The optional `callback` argument can be used to replace the logging function + * with a different function that doesn't have any initialization or + * unnecessary wrapping. + * + * ```js + * import { debuglog } from 'node:util'; + * let log = debuglog('internals', (debug) => { + * // Replace with a logging function that optimizes out + * // testing if the section is enabled + * log = debug; + * }); + * ``` + * @since v0.11.3 + * @param section A string identifying the portion of the application for which the `debuglog` function is being created. + * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function. + * @return The logging function + */ + export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger; + export { debuglog as debug }; + export interface DeprecateOptions { + /** + * When false do not change the prototype of object + * while emitting the deprecation warning. + * @since v25.2.0 + * @default true + */ + modifyPrototype?: boolean | undefined; + } + /** + * The `util.deprecate()` method wraps `fn` (which may be a function or class) in + * such a way that it is marked as deprecated. + * + * ```js + * import { deprecate } from 'node:util'; + * + * export const obsoleteFunction = deprecate(() => { + * // Do something here. + * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.'); + * ``` + * + * When called, `util.deprecate()` will return a function that will emit a + * `DeprecationWarning` using the `'warning'` event. The warning will + * be emitted and printed to `stderr` the first time the returned function is + * called. After the warning is emitted, the wrapped function is called without + * emitting a warning. + * + * If the same optional `code` is supplied in multiple calls to `util.deprecate()`, + * the warning will be emitted only once for that `code`. + * + * ```js + * import { deprecate } from 'node:util'; + * + * const fn1 = deprecate( + * () => 'a value', + * 'deprecation message', + * 'DEP0001', + * ); + * const fn2 = deprecate( + * () => 'a different value', + * 'other dep message', + * 'DEP0001', + * ); + * fn1(); // Emits a deprecation warning with code DEP0001 + * fn2(); // Does not emit a deprecation warning because it has the same code + * ``` + * + * If either the `--no-deprecation` or `--no-warnings` command-line flags are + * used, or if the `process.noDeprecation` property is set to `true` _prior_ to + * the first deprecation warning, the `util.deprecate()` method does nothing. + * + * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set, + * or the `process.traceDeprecation` property is set to `true`, a warning and a + * stack trace are printed to `stderr` the first time the deprecated function is + * called. + * + * If the `--throw-deprecation` command-line flag is set, or the + * `process.throwDeprecation` property is set to `true`, then an exception will be + * thrown when the deprecated function is called. + * + * The `--throw-deprecation` command-line flag and `process.throwDeprecation` + * property take precedence over `--trace-deprecation` and + * `process.traceDeprecation`. + * @since v0.8.0 + * @param fn The function that is being deprecated. + * @param msg A warning message to display when the deprecated function is invoked. + * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes. + * @return The deprecated function wrapped to emit a warning. + */ + export function deprecate(fn: T, msg: string, code?: string, options?: DeprecateOptions): T; + export interface IsDeepStrictEqualOptions { + /** + * If `true`, prototype and constructor + * comparison is skipped during deep strict equality check. + * @since v24.9.0 + * @default false + */ + skipPrototype?: boolean | undefined; + } + /** + * Returns `true` if there is deep strict equality between `val1` and `val2`. + * Otherwise, returns `false`. + * + * See `assert.deepStrictEqual()` for more information about deep strict + * equality. + * @since v9.0.0 + */ + export function isDeepStrictEqual(val1: unknown, val2: unknown, options?: IsDeepStrictEqualOptions): boolean; + /** + * Returns `str` with any ANSI escape codes removed. + * + * ```js + * console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m')); + * // Prints "value" + * ``` + * @since v16.11.0 + */ + export function stripVTControlCharacters(str: string): string; + /** + * Takes an `async` function (or a function that returns a `Promise`) and returns a + * function following the error-first callback style, i.e. taking + * an `(err, value) => ...` callback as the last argument. In the callback, the + * first argument will be the rejection reason (or `null` if the `Promise` + * resolved), and the second argument will be the resolved value. + * + * ```js + * import { callbackify } from 'node:util'; + * + * async function fn() { + * return 'hello world'; + * } + * const callbackFunction = callbackify(fn); + * + * callbackFunction((err, ret) => { + * if (err) throw err; + * console.log(ret); + * }); + * ``` + * + * Will print: + * + * ```text + * hello world + * ``` + * + * The callback is executed asynchronously, and will have a limited stack trace. + * If the callback throws, the process will emit an `'uncaughtException'` + * event, and if not handled will exit. + * + * Since `null` has a special meaning as the first argument to a callback, if a + * wrapped function rejects a `Promise` with a falsy value as a reason, the value + * is wrapped in an `Error` with the original value stored in a field named + * `reason`. + * + * ```js + * import util from 'node:util'; + * + * function fn() { + * return Promise.reject(null); + * } + * const callbackFunction = util.callbackify(fn); + * + * callbackFunction((err, ret) => { + * // When the Promise was rejected with `null` it is wrapped with an Error and + * // the original value is stored in `reason`. + * err && Object.hasOwn(err, 'reason') && err.reason === null; // true + * }); + * ``` + * @since v8.2.0 + * @param fn An `async` function + * @return a callback style function + */ + export function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: () => Promise, + ): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1) => Promise, + ): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1) => Promise, + ): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2) => Promise, + ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2) => Promise, + ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise, + ): ( + arg1: T1, + arg2: T2, + arg3: T3, + arg4: T4, + callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, + ) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, + ): ( + arg1: T1, + arg2: T2, + arg3: T3, + arg4: T4, + arg5: T5, + callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, + ) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, + ): ( + arg1: T1, + arg2: T2, + arg3: T3, + arg4: T4, + arg5: T5, + arg6: T6, + callback: (err: NodeJS.ErrnoException) => void, + ) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, + ): ( + arg1: T1, + arg2: T2, + arg3: T3, + arg4: T4, + arg5: T5, + arg6: T6, + callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, + ) => void; + export interface CustomPromisifyLegacy extends Function { + __promisify__: TCustom; + } + export interface CustomPromisifySymbol extends Function { + [promisify.custom]: TCustom; + } + export type CustomPromisify = + | CustomPromisifySymbol + | CustomPromisifyLegacy; + /** + * Takes a function following the common error-first callback style, i.e. taking + * an `(err, value) => ...` callback as the last argument, and returns a version + * that returns promises. + * + * ```js + * import { promisify } from 'node:util'; + * import { stat } from 'node:fs'; + * + * const promisifiedStat = promisify(stat); + * promisifiedStat('.').then((stats) => { + * // Do something with `stats` + * }).catch((error) => { + * // Handle the error. + * }); + * ``` + * + * Or, equivalently using `async function`s: + * + * ```js + * import { promisify } from 'node:util'; + * import { stat } from 'node:fs'; + * + * const promisifiedStat = promisify(stat); + * + * async function callStat() { + * const stats = await promisifiedStat('.'); + * console.log(`This directory is owned by ${stats.uid}`); + * } + * + * callStat(); + * ``` + * + * If there is an `original[util.promisify.custom]` property present, `promisify` + * will return its value, see [Custom promisified functions](https://nodejs.org/docs/latest-v26.x/api/util.html#custom-promisified-functions). + * + * `promisify()` assumes that `original` is a function taking a callback as its + * final argument in all cases. If `original` is not a function, `promisify()` + * will throw an error. If `original` is a function but its last argument is not + * an error-first callback, it will still be passed an error-first + * callback as its last argument. + * + * Using `promisify()` on class methods or other methods that use `this` may not + * work as expected unless handled specially: + * + * ```js + * import { promisify } from 'node:util'; + * + * class Foo { + * constructor() { + * this.a = 42; + * } + * + * bar(callback) { + * callback(null, this.a); + * } + * } + * + * const foo = new Foo(); + * + * const naiveBar = promisify(foo.bar); + * // TypeError: Cannot read properties of undefined (reading 'a') + * // naiveBar().then(a => console.log(a)); + * + * naiveBar.call(foo).then((a) => console.log(a)); // '42' + * + * const bindBar = naiveBar.bind(foo); + * bindBar().then((a) => console.log(a)); // '42' + * ``` + * @since v8.0.0 + */ + export function promisify(fn: CustomPromisify): TCustom; + export function promisify( + fn: (callback: (err: any, result: TResult) => void) => void, + ): () => Promise; + export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise; + export function promisify( + fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1) => Promise; + export function promisify(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify(fn: Function): Function; + export namespace promisify { + /** + * That can be used to declare custom promisified variants of functions. + */ + const custom: unique symbol; + } + /** + * Stability: 1.1 - Active development + * Given an example `.env` file: + * + * ```js + * import { parseEnv } from 'node:util'; + * + * parseEnv('HELLO=world\nHELLO=oh my\n'); + * // Returns: { HELLO: 'oh my' } + * ``` + * @param content The raw contents of a `.env` file. + * @since v20.12.0 + */ + export function parseEnv(content: string): NodeJS.Dict; + export interface StyleTextOptions { + /** + * When true, `stream` is checked to see if it can handle colors. + * @default true + */ + validateStream?: boolean | undefined; + /** + * A stream that will be validated if it can be colored. + * @default process.stdout + */ + stream?: NodeJS.WritableStream | undefined; + } + /** + * This function returns a formatted text considering the `format` passed + * for printing in a terminal. It is aware of the terminal's capabilities + * and acts according to the configuration set via `NO_COLOR`, + * `NODE_DISABLE_COLORS` and `FORCE_COLOR` environment variables. + * + * ```js + * import { styleText } from 'node:util'; + * import { stderr } from 'node:process'; + * + * const successMessage = styleText('green', 'Success!'); + * console.log(successMessage); + * + * const errorMessage = styleText( + * 'red', + * 'Error! Error!', + * // Validate if process.stderr has TTY + * { stream: stderr }, + * ); + * console.error(errorMessage); + * ``` + * + * `util.inspect.colors` also provides text formats such as `italic`, and + * `underline` and you can combine both: + * + * ```js + * console.log( + * util.styleText(['underline', 'italic'], 'My italic underlined message'), + * ); + * ``` + * + * When passing an array of formats, the order of the format applied + * is left to right so the following style might overwrite the previous one. + * + * ```js + * console.log( + * util.styleText(['red', 'green'], 'text'), // green + * ); + * ``` + * + * The special format value `none` applies no additional styling to the text. + * + * In addition to predefined color names, `util.styleText()` supports hex color + * strings using ANSI TrueColor (24-bit) escape sequences. Hex colors can be + * specified in either 3-digit (`#RGB`) or 6-digit (`#RRGGBB`) format: + * + * ```js + * import { styleText } from 'node:util'; + * + * // 6-digit hex color + * console.log(styleText('#ff5733', 'Orange text')); + * + * // 3-digit hex color (shorthand) + * console.log(styleText('#f00', 'Red text')); + * ``` + * + * The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v26.x/api/util.html#modifiers). + * @param format A text format or an Array of text formats defined in `util.inspect.colors`, or a hex color in `#RGB` + * or `#RRGGBB` form. + * @param text The text to to be formatted. + * @since v20.12.0 + */ + export function styleText( + format: InspectColor | readonly InspectColor[] | `#${string}`, + text: string, + options?: StyleTextOptions, + ): string; + //// parseArgs + /** + * Provides a higher level API for command-line argument parsing than interacting + * with `process.argv` directly. Takes a specification for the expected arguments + * and returns a structured object with the parsed options and positionals. + * + * ```js + * import { parseArgs } from 'node:util'; + * const args = ['-f', '--bar', 'b']; + * const options = { + * foo: { + * type: 'boolean', + * short: 'f', + * }, + * bar: { + * type: 'string', + * }, + * }; + * const { + * values, + * positionals, + * } = parseArgs({ args, options }); + * console.log(values, positionals); + * // Prints: [Object: null prototype] { foo: true, bar: 'b' } [] + * ``` + * @since v18.3.0, v16.17.0 + * @param config Used to provide arguments for parsing and to configure the parser. `config` supports the following properties: + * @return The parsed command line arguments: + */ + export function parseArgs(config?: T): ParsedResults; + /** + * Type of argument used in {@link parseArgs}. + */ + export type ParseArgsOptionsType = "boolean" | "string"; + export interface ParseArgsOptionDescriptor { + /** + * Type of argument. + */ + type: ParseArgsOptionsType; + /** + * Whether this option can be provided multiple times. + * If `true`, all values will be collected in an array. + * If `false`, values for the option are last-wins. + * @default false. + */ + multiple?: boolean | undefined; + /** + * A single character alias for the option. + */ + short?: string | undefined; + /** + * The value to assign to + * the option if it does not appear in the arguments to be parsed. The value + * must match the type specified by the `type` property. If `multiple` is + * `true`, it must be an array. No default value is applied when the option + * does appear in the arguments to be parsed, even if the provided value + * is falsy. + * @since v18.11.0 + */ + default?: string | boolean | string[] | boolean[] | undefined; + } + export interface ParseArgsOptionsConfig { + [longOption: string]: ParseArgsOptionDescriptor; + } + export interface ParseArgsConfig { + /** + * Array of argument strings. + */ + args?: readonly string[] | undefined; + /** + * Used to describe arguments known to the parser. + */ + options?: ParseArgsOptionsConfig | undefined; + /** + * Should an error be thrown when unknown arguments are encountered, + * or when arguments are passed that do not match the `type` configured in `options`. + * @default true + */ + strict?: boolean | undefined; + /** + * Whether this command accepts positional arguments. + */ + allowPositionals?: boolean | undefined; + /** + * If `true`, allows explicitly setting boolean options to `false` by prefixing the option name with `--no-`. + * @default false + * @since v22.4.0 + */ + allowNegative?: boolean | undefined; + /** + * Return the parsed tokens. This is useful for extending the built-in behavior, + * from adding additional checks through to reprocessing the tokens in different ways. + * @default false + */ + tokens?: boolean | undefined; + } + /* + IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties. + TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936 + This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present". + But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present. + So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value. + This is technically incorrect but is a much nicer UX for the common case. + The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false. + */ + type IfDefaultsTrue = T extends true ? IfTrue + : T extends false ? IfFalse + : IfTrue; + // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false` + type IfDefaultsFalse = T extends false ? IfFalse + : T extends true ? IfTrue + : IfFalse; + type ExtractOptionValue = IfDefaultsTrue< + T["strict"], + O["type"] extends "string" ? string : O["type"] extends "boolean" ? boolean : string | boolean, + string | boolean + >; + type ApplyOptionalModifiers> = ( + & { -readonly [LongOption in keyof O]?: V[LongOption] } + & { [LongOption in keyof O as O[LongOption]["default"] extends {} ? LongOption : never]: V[LongOption] } + ) extends infer P ? { [K in keyof P]: P[K] } : never; // resolve intersection to object + type ParsedValues = + & IfDefaultsTrue + & (T["options"] extends ParseArgsOptionsConfig ? ApplyOptionalModifiers< + T["options"], + { + [LongOption in keyof T["options"]]: IfDefaultsFalse< + T["options"][LongOption]["multiple"], + Array>, + ExtractOptionValue + >; + } + > + : {}); + type ParsedPositionals = IfDefaultsTrue< + T["strict"], + IfDefaultsFalse, + IfDefaultsTrue + >; + type PreciseTokenForOptions< + K extends string, + O extends ParseArgsOptionDescriptor, + > = O["type"] extends "string" ? { + kind: "option"; + index: number; + name: K; + rawName: string; + value: string; + inlineValue: boolean; + } + : O["type"] extends "boolean" ? { + kind: "option"; + index: number; + name: K; + rawName: string; + value: undefined; + inlineValue: undefined; + } + : OptionToken & { name: K }; + type TokenForOptions< + T extends ParseArgsConfig, + K extends keyof T["options"] = keyof T["options"], + > = K extends unknown + ? T["options"] extends ParseArgsOptionsConfig ? PreciseTokenForOptions + : OptionToken + : never; + type ParsedOptionToken = IfDefaultsTrue, OptionToken>; + type ParsedPositionalToken = IfDefaultsTrue< + T["strict"], + IfDefaultsFalse, + IfDefaultsTrue + >; + type ParsedTokens = Array< + ParsedOptionToken | ParsedPositionalToken | { kind: "option-terminator"; index: number } + >; + type PreciseParsedResults = IfDefaultsFalse< + T["tokens"], + { + values: ParsedValues; + positionals: ParsedPositionals; + tokens: ParsedTokens; + }, + { + values: ParsedValues; + positionals: ParsedPositionals; + } + >; + type OptionToken = + | { kind: "option"; index: number; name: string; rawName: string; value: string; inlineValue: boolean } + | { + kind: "option"; + index: number; + name: string; + rawName: string; + value: undefined; + inlineValue: undefined; + }; + type Token = + | OptionToken + | { kind: "positional"; index: number; value: string } + | { kind: "option-terminator"; index: number }; + // If ParseArgsConfig extends T, then the user passed config constructed elsewhere. + // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above. + type ParsedResults = ParseArgsConfig extends T ? { + values: { + [longOption: string]: undefined | string | boolean | Array; + }; + positionals: string[]; + tokens?: Token[]; + } + : PreciseParsedResults; + /** + * An implementation of [the MIMEType class](https://bmeck.github.io/node-proposal-mime-api/). + * + * In accordance with browser conventions, all properties of `MIMEType` objects + * are implemented as getters and setters on the class prototype, rather than as + * data properties on the object itself. + * + * A MIME string is a structured string containing multiple meaningful + * components. When parsed, a `MIMEType` object is returned containing + * properties for each of these components. + * @since v19.1.0, v18.13.0 + */ + export class MIMEType { + /** + * Creates a new MIMEType object by parsing the input. + * + * A `TypeError` will be thrown if the `input` is not a valid MIME. + * Note that an effort will be made to coerce the given values into strings. + * @param input The input MIME to parse. + */ + constructor(input: string | { toString: () => string }); + /** + * Gets and sets the type portion of the MIME. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const myMIME = new MIMEType('text/javascript'); + * console.log(myMIME.type); + * // Prints: text + * myMIME.type = 'application'; + * console.log(myMIME.type); + * // Prints: application + * console.log(String(myMIME)); + * // Prints: application/javascript + * ``` + */ + type: string; + /** + * Gets and sets the subtype portion of the MIME. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const myMIME = new MIMEType('text/ecmascript'); + * console.log(myMIME.subtype); + * // Prints: ecmascript + * myMIME.subtype = 'javascript'; + * console.log(myMIME.subtype); + * // Prints: javascript + * console.log(String(myMIME)); + * // Prints: text/javascript + * ``` + */ + subtype: string; + /** + * Gets the essence of the MIME. This property is read only. + * Use `mime.type` or `mime.subtype` to alter the MIME. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const myMIME = new MIMEType('text/javascript;key=value'); + * console.log(myMIME.essence); + * // Prints: text/javascript + * myMIME.type = 'application'; + * console.log(myMIME.essence); + * // Prints: application/javascript + * console.log(String(myMIME)); + * // Prints: application/javascript;key=value + * ``` + */ + readonly essence: string; + /** + * Gets the `MIMEParams` object representing the + * parameters of the MIME. This property is read-only. See `MIMEParams` documentation for details. + */ + readonly params: MIMEParams; + /** + * The `toString()` method on the `MIMEType` object returns the serialized MIME. + * + * Because of the need for standard compliance, this method does not allow users + * to customize the serialization process of the MIME. + */ + toString(): string; + } + /** + * The `MIMEParams` API provides read and write access to the parameters of a `MIMEType`. + * @since v19.1.0, v18.13.0 + */ + export class MIMEParams { + /** + * Remove all name-value pairs whose name is `name`. + */ + delete(name: string): void; + /** + * Returns an iterator over each of the name-value pairs in the parameters. + * Each item of the iterator is a JavaScript `Array`. The first item of the array + * is the `name`, the second item of the array is the `value`. + */ + entries(): NodeJS.Iterator<[name: string, value: string]>; + /** + * Returns the value of the first name-value pair whose name is `name`. If there + * are no such pairs, `null` is returned. + * @return or `null` if there is no name-value pair with the given `name`. + */ + get(name: string): string | null; + /** + * Returns `true` if there is at least one name-value pair whose name is `name`. + */ + has(name: string): boolean; + /** + * Returns an iterator over the names of each name-value pair. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const { params } = new MIMEType('text/plain;foo=0;bar=1'); + * for (const name of params.keys()) { + * console.log(name); + * } + * // Prints: + * // foo + * // bar + * ``` + */ + keys(): NodeJS.Iterator; + /** + * Sets the value in the `MIMEParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`, + * set the first such pair's value to `value`. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const { params } = new MIMEType('text/plain;foo=0;bar=1'); + * params.set('foo', 'def'); + * params.set('baz', 'xyz'); + * console.log(params.toString()); + * // Prints: foo=def;bar=1;baz=xyz + * ``` + */ + set(name: string, value: string): void; + /** + * Returns an iterator over the values of each name-value pair. + */ + values(): NodeJS.Iterator; + /** + * Returns an iterator over each of the name-value pairs in the parameters. + */ + [Symbol.iterator](): NodeJS.Iterator<[name: string, value: string]>; + } + // #region web types + export interface TextDecodeOptions { + stream?: boolean; + } + export interface TextDecoderCommon { + readonly encoding: string; + readonly fatal: boolean; + readonly ignoreBOM: boolean; + } + export interface TextDecoderOptions { + fatal?: boolean; + ignoreBOM?: boolean; + } + export interface TextEncoderCommon { + readonly encoding: string; + } + export interface TextEncoderEncodeIntoResult { + read: number; + written: number; + } + export interface TextDecoder extends TextDecoderCommon { + decode(input?: NodeJS.AllowSharedBufferSource, options?: TextDecodeOptions): string; + } + export var TextDecoder: { + prototype: TextDecoder; + new(label?: string, options?: TextDecoderOptions): TextDecoder; + }; + export interface TextEncoder extends TextEncoderCommon { + encode(input?: string): NodeJS.NonSharedUint8Array; + encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult; + } + export var TextEncoder: { + prototype: TextEncoder; + new(): TextEncoder; + }; + // #endregion +} +declare module "util" { + export * from "node:util"; +} diff --git a/node_modules/@types/node/util/types.d.ts b/node_modules/@types/node/util/types.d.ts new file mode 100644 index 0000000..174c0fa --- /dev/null +++ b/node_modules/@types/node/util/types.d.ts @@ -0,0 +1,558 @@ +declare module "node:util/types" { + import { KeyObject, webcrypto } from "node:crypto"; + /** + * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or + * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. + * + * See also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`. + * + * ```js + * util.types.isAnyArrayBuffer(new ArrayBuffer()); // Returns true + * util.types.isAnyArrayBuffer(new SharedArrayBuffer()); // Returns true + * ``` + * @since v10.0.0 + */ + function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike; + /** + * Returns `true` if the value is an `arguments` object. + * + * ```js + * function foo() { + * util.types.isArgumentsObject(arguments); // Returns true + * } + * ``` + * @since v10.0.0 + */ + function isArgumentsObject(object: unknown): object is IArguments; + /** + * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance. + * This does _not_ include [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances. Usually, it is + * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. + * + * ```js + * util.types.isArrayBuffer(new ArrayBuffer()); // Returns true + * util.types.isArrayBuffer(new SharedArrayBuffer()); // Returns false + * ``` + * @since v10.0.0 + */ + function isArrayBuffer(object: unknown): object is ArrayBuffer; + /** + * Returns `true` if the value is an instance of one of the [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) views, such as typed + * array objects or [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView). Equivalent to + * [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * + * ```js + * util.types.isArrayBufferView(new Int8Array()); // true + * util.types.isArrayBufferView(Buffer.from('hello world')); // true + * util.types.isArrayBufferView(new DataView(new ArrayBuffer(16))); // true + * util.types.isArrayBufferView(new ArrayBuffer()); // false + * ``` + * @since v10.0.0 + */ + function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView; + /** + * Returns `true` if the value is an [async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function). + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * util.types.isAsyncFunction(function foo() {}); // Returns false + * util.types.isAsyncFunction(async function foo() {}); // Returns true + * ``` + * @since v10.0.0 + */ + function isAsyncFunction(object: unknown): boolean; + /** + * Returns `true` if the value is a `BigInt64Array` instance. + * + * ```js + * util.types.isBigInt64Array(new BigInt64Array()); // Returns true + * util.types.isBigInt64Array(new BigUint64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isBigInt64Array(value: unknown): value is BigInt64Array; + /** + * Returns `true` if the value is a BigInt object, e.g. created + * by `Object(BigInt(123))`. + * + * ```js + * util.types.isBigIntObject(Object(BigInt(123))); // Returns true + * util.types.isBigIntObject(BigInt(123)); // Returns false + * util.types.isBigIntObject(123); // Returns false + * ``` + * @since v10.4.0 + */ + function isBigIntObject(object: unknown): object is BigInt; + /** + * Returns `true` if the value is a `BigUint64Array` instance. + * + * ```js + * util.types.isBigUint64Array(new BigInt64Array()); // Returns false + * util.types.isBigUint64Array(new BigUint64Array()); // Returns true + * ``` + * @since v10.0.0 + */ + function isBigUint64Array(value: unknown): value is BigUint64Array; + /** + * Returns `true` if the value is a boolean object, e.g. created + * by `new Boolean()`. + * + * ```js + * util.types.isBooleanObject(false); // Returns false + * util.types.isBooleanObject(true); // Returns false + * util.types.isBooleanObject(new Boolean(false)); // Returns true + * util.types.isBooleanObject(new Boolean(true)); // Returns true + * util.types.isBooleanObject(Boolean(false)); // Returns false + * util.types.isBooleanObject(Boolean(true)); // Returns false + * ``` + * @since v10.0.0 + */ + function isBooleanObject(object: unknown): object is Boolean; + /** + * Returns `true` if the value is any boxed primitive object, e.g. created + * by `new Boolean()`, `new String()` or `Object(Symbol())`. + * + * For example: + * + * ```js + * util.types.isBoxedPrimitive(false); // Returns false + * util.types.isBoxedPrimitive(new Boolean(false)); // Returns true + * util.types.isBoxedPrimitive(Symbol('foo')); // Returns false + * util.types.isBoxedPrimitive(Object(Symbol('foo'))); // Returns true + * util.types.isBoxedPrimitive(Object(BigInt(5))); // Returns true + * ``` + * @since v10.11.0 + */ + function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol; + /** + * Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance. + * + * ```js + * const ab = new ArrayBuffer(20); + * util.types.isDataView(new DataView(ab)); // Returns true + * util.types.isDataView(new Float64Array()); // Returns false + * ``` + * + * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * @since v10.0.0 + */ + function isDataView(object: unknown): object is DataView; + /** + * Returns `true` if the value is a built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) instance. + * + * ```js + * util.types.isDate(new Date()); // Returns true + * ``` + * @since v10.0.0 + */ + function isDate(object: unknown): object is Date; + /** + * Returns `true` if the value is a native `External` value. + * + * A native `External` value is a special type of object that contains a + * raw C++ pointer (`void*`) for access from native code, and has no other + * properties. Such objects are created either by Node.js internals or native + * addons. In JavaScript, they are + * [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a + * `null` prototype. + * + * ```c + * #include + * #include + * napi_value result; + * static napi_value MyNapi(napi_env env, napi_callback_info info) { + * int* raw = (int*) malloc(1024); + * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &result); + * if (status != napi_ok) { + * napi_throw_error(env, NULL, "napi_create_external failed"); + * return NULL; + * } + * return result; + * } + * ... + * DECLARE_NAPI_PROPERTY("myNapi", MyNapi) + * ... + * ``` + * + * ```js + * import native from 'napi_addon.node'; + * import { types } from 'node:util'; + * + * const data = native.myNapi(); + * types.isExternal(data); // returns true + * types.isExternal(0); // returns false + * types.isExternal(new String('foo')); // returns false + * ``` + * + * For further information on `napi_create_external`, refer to + * [`napi_create_external()`](https://nodejs.org/docs/latest-v26.x/api/n-api.html#napi_create_external). + * @since v10.0.0 + */ + function isExternal(object: unknown): boolean; + /** + * Returns `true` if the value is a built-in [`Float16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float16Array) instance. + * + * ```js + * util.types.isFloat16Array(new ArrayBuffer()); // Returns false + * util.types.isFloat16Array(new Float16Array()); // Returns true + * util.types.isFloat16Array(new Float32Array()); // Returns false + * ``` + * @since v24.0.0 + */ + function isFloat16Array(object: unknown): object is Float16Array; + /** + * Returns `true` if the value is a built-in [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) instance. + * + * ```js + * util.types.isFloat32Array(new ArrayBuffer()); // Returns false + * util.types.isFloat32Array(new Float32Array()); // Returns true + * util.types.isFloat32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isFloat32Array(object: unknown): object is Float32Array; + /** + * Returns `true` if the value is a built-in [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) instance. + * + * ```js + * util.types.isFloat64Array(new ArrayBuffer()); // Returns false + * util.types.isFloat64Array(new Uint8Array()); // Returns false + * util.types.isFloat64Array(new Float64Array()); // Returns true + * ``` + * @since v10.0.0 + */ + function isFloat64Array(object: unknown): object is Float64Array; + /** + * Returns `true` if the value is a generator function. + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * util.types.isGeneratorFunction(function foo() {}); // Returns false + * util.types.isGeneratorFunction(function* foo() {}); // Returns true + * ``` + * @since v10.0.0 + */ + function isGeneratorFunction(object: unknown): object is GeneratorFunction; + /** + * Returns `true` if the value is a generator object as returned from a + * built-in generator function. + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * function* foo() {} + * const generator = foo(); + * util.types.isGeneratorObject(generator); // Returns true + * ``` + * @since v10.0.0 + */ + function isGeneratorObject(object: unknown): object is Generator; + /** + * Returns `true` if the value is a built-in [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) instance. + * + * ```js + * util.types.isInt8Array(new ArrayBuffer()); // Returns false + * util.types.isInt8Array(new Int8Array()); // Returns true + * util.types.isInt8Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt8Array(object: unknown): object is Int8Array; + /** + * Returns `true` if the value is a built-in [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) instance. + * + * ```js + * util.types.isInt16Array(new ArrayBuffer()); // Returns false + * util.types.isInt16Array(new Int16Array()); // Returns true + * util.types.isInt16Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt16Array(object: unknown): object is Int16Array; + /** + * Returns `true` if the value is a built-in [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) instance. + * + * ```js + * util.types.isInt32Array(new ArrayBuffer()); // Returns false + * util.types.isInt32Array(new Int32Array()); // Returns true + * util.types.isInt32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt32Array(object: unknown): object is Int32Array; + /** + * Returns `true` if the value is a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. + * + * ```js + * util.types.isMap(new Map()); // Returns true + * ``` + * @since v10.0.0 + */ + function isMap( + object: T | {}, + ): object is T extends ReadonlyMap ? (unknown extends T ? never : ReadonlyMap) + : Map; + /** + * Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. + * + * ```js + * const map = new Map(); + * util.types.isMapIterator(map.keys()); // Returns true + * util.types.isMapIterator(map.values()); // Returns true + * util.types.isMapIterator(map.entries()); // Returns true + * util.types.isMapIterator(map[Symbol.iterator]()); // Returns true + * ``` + * @since v10.0.0 + */ + function isMapIterator(object: unknown): boolean; + /** + * Returns `true` if the value is an instance of a [Module Namespace Object](https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects). + * + * ```js + * import * as ns from './a.js'; + * + * util.types.isModuleNamespaceObject(ns); // Returns true + * ``` + * @since v10.0.0 + */ + function isModuleNamespaceObject(value: unknown): boolean; + /** + * Returns `true` if the value was returned by the constructor of a + * [built-in `Error` type](https://tc39.es/ecma262/#sec-error-objects). + * + * ```js + * console.log(util.types.isNativeError(new Error())); // true + * console.log(util.types.isNativeError(new TypeError())); // true + * console.log(util.types.isNativeError(new RangeError())); // true + * ``` + * + * Subclasses of the native error types are also native errors: + * + * ```js + * class MyError extends Error {} + * console.log(util.types.isNativeError(new MyError())); // true + * ``` + * + * A value being `instanceof` a native error class is not equivalent to `isNativeError()` + * returning `true` for that value. `isNativeError()` returns `true` for errors + * which come from a different [realm](https://tc39.es/ecma262/#realm) while `instanceof Error` returns `false` + * for these errors: + * + * ```js + * import { createContext, runInContext } from 'node:vm'; + * import { types } from 'node:util'; + * + * const context = createContext({}); + * const myError = runInContext('new Error()', context); + * console.log(types.isNativeError(myError)); // true + * console.log(myError instanceof Error); // false + * ``` + * + * Conversely, `isNativeError()` returns `false` for all objects which were not + * returned by the constructor of a native error. That includes values + * which are `instanceof` native errors: + * + * ```js + * const myError = { __proto__: Error.prototype }; + * console.log(util.types.isNativeError(myError)); // false + * console.log(myError instanceof Error); // true + * ``` + * @since v10.0.0 + * @deprecated The `util.types.isNativeError` API is deprecated. Please use `Error.isError` instead. + */ + function isNativeError(object: unknown): object is Error; + /** + * Returns `true` if the value is a number object, e.g. created + * by `new Number()`. + * + * ```js + * util.types.isNumberObject(0); // Returns false + * util.types.isNumberObject(new Number(0)); // Returns true + * ``` + * @since v10.0.0 + */ + function isNumberObject(object: unknown): object is Number; + /** + * Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). + * + * ```js + * util.types.isPromise(Promise.resolve(42)); // Returns true + * ``` + * @since v10.0.0 + */ + function isPromise(object: unknown): object is Promise; + /** + * Returns `true` if the value is a [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) instance. + * + * ```js + * const target = {}; + * const proxy = new Proxy(target, {}); + * util.types.isProxy(target); // Returns false + * util.types.isProxy(proxy); // Returns true + * ``` + * @since v10.0.0 + */ + function isProxy(object: unknown): boolean; + /** + * Returns `true` if the value is a regular expression object. + * + * ```js + * util.types.isRegExp(/abc/); // Returns true + * util.types.isRegExp(new RegExp('abc')); // Returns true + * ``` + * @since v10.0.0 + */ + function isRegExp(object: unknown): object is RegExp; + /** + * Returns `true` if the value is a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. + * + * ```js + * util.types.isSet(new Set()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSet( + object: T | {}, + ): object is T extends ReadonlySet ? (unknown extends T ? never : ReadonlySet) : Set; + /** + * Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. + * + * ```js + * const set = new Set(); + * util.types.isSetIterator(set.keys()); // Returns true + * util.types.isSetIterator(set.values()); // Returns true + * util.types.isSetIterator(set.entries()); // Returns true + * util.types.isSetIterator(set[Symbol.iterator]()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSetIterator(object: unknown): boolean; + /** + * Returns `true` if the value is a built-in [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. + * This does _not_ include [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instances. Usually, it is + * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. + * + * ```js + * util.types.isSharedArrayBuffer(new ArrayBuffer()); // Returns false + * util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer; + /** + * Returns `true` if the value is a string object, e.g. created + * by `new String()`. + * + * ```js + * util.types.isStringObject('foo'); // Returns false + * util.types.isStringObject(new String('foo')); // Returns true + * ``` + * @since v10.0.0 + */ + function isStringObject(object: unknown): object is String; + /** + * Returns `true` if the value is a symbol object, created + * by calling `Object()` on a `Symbol` primitive. + * + * ```js + * const symbol = Symbol('foo'); + * util.types.isSymbolObject(symbol); // Returns false + * util.types.isSymbolObject(Object(symbol)); // Returns true + * ``` + * @since v10.0.0 + */ + function isSymbolObject(object: unknown): object is Symbol; + /** + * Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance. + * + * ```js + * util.types.isTypedArray(new ArrayBuffer()); // Returns false + * util.types.isTypedArray(new Uint8Array()); // Returns true + * util.types.isTypedArray(new Float64Array()); // Returns true + * ``` + * + * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * @since v10.0.0 + */ + function isTypedArray(object: unknown): object is NodeJS.TypedArray; + /** + * Returns `true` if the value is a built-in [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instance. + * + * ```js + * util.types.isUint8Array(new ArrayBuffer()); // Returns false + * util.types.isUint8Array(new Uint8Array()); // Returns true + * util.types.isUint8Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint8Array(object: unknown): object is Uint8Array; + /** + * Returns `true` if the value is a built-in [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) instance. + * + * ```js + * util.types.isUint8ClampedArray(new ArrayBuffer()); // Returns false + * util.types.isUint8ClampedArray(new Uint8ClampedArray()); // Returns true + * util.types.isUint8ClampedArray(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray; + /** + * Returns `true` if the value is a built-in [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) instance. + * + * ```js + * util.types.isUint16Array(new ArrayBuffer()); // Returns false + * util.types.isUint16Array(new Uint16Array()); // Returns true + * util.types.isUint16Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint16Array(object: unknown): object is Uint16Array; + /** + * Returns `true` if the value is a built-in [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) instance. + * + * ```js + * util.types.isUint32Array(new ArrayBuffer()); // Returns false + * util.types.isUint32Array(new Uint32Array()); // Returns true + * util.types.isUint32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint32Array(object: unknown): object is Uint32Array; + /** + * Returns `true` if the value is a built-in [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) instance. + * + * ```js + * util.types.isWeakMap(new WeakMap()); // Returns true + * ``` + * @since v10.0.0 + */ + function isWeakMap(object: unknown): object is WeakMap; + /** + * Returns `true` if the value is a built-in [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) instance. + * + * ```js + * util.types.isWeakSet(new WeakSet()); // Returns true + * ``` + * @since v10.0.0 + */ + function isWeakSet(object: unknown): object is WeakSet; + /** + * Returns `true` if `value` is a `KeyObject`, `false` otherwise. + * @since v16.2.0 + */ + function isKeyObject(object: unknown): object is KeyObject; + /** + * Returns `true` if `value` is a `CryptoKey`, `false` otherwise. + * @since v16.2.0 + */ + function isCryptoKey(object: unknown): object is webcrypto.CryptoKey; +} +declare module "util/types" { + export * from "node:util/types"; +} diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts new file mode 100644 index 0000000..ed5c7b1 --- /dev/null +++ b/node_modules/@types/node/v8.d.ts @@ -0,0 +1,1059 @@ +declare module "node:v8" { + import { NonSharedBuffer } from "node:buffer"; + import { Readable } from "node:stream"; + interface HeapSpaceInfo { + space_name: string; + space_size: number; + space_used_size: number; + space_available_size: number; + physical_space_size: number; + } + // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */ + type DoesZapCodeSpaceFlag = 0 | 1; + interface HeapInfo { + total_heap_size: number; + total_heap_size_executable: number; + total_physical_size: number; + total_available_size: number; + used_heap_size: number; + heap_size_limit: number; + malloced_memory: number; + peak_malloced_memory: number; + does_zap_garbage: DoesZapCodeSpaceFlag; + number_of_native_contexts: number; + number_of_detached_contexts: number; + total_global_handles_size: number; + used_global_handles_size: number; + external_memory: number; + total_allocated_bytes: number; + } + interface HeapCodeStatistics { + code_and_metadata_size: number; + bytecode_and_metadata_size: number; + external_script_source_size: number; + } + interface HeapSnapshotOptions { + /** + * If true, expose internals in the heap snapshot. + * @default false + */ + exposeInternals?: boolean | undefined; + /** + * If true, expose numeric values in artificial fields. + * @default false + */ + exposeNumericValues?: boolean | undefined; + } + /** + * Returns an integer representing a version tag derived from the V8 version, + * command-line flags, and detected CPU features. This is useful for determining + * whether a `vm.Script` `cachedData` buffer is compatible with this instance + * of V8. + * + * ```js + * console.log(v8.cachedDataVersionTag()); // 3947234607 + * // The value returned by v8.cachedDataVersionTag() is derived from the V8 + * // version, command-line flags, and detected CPU features. Test that the value + * // does indeed update when flags are toggled. + * v8.setFlagsFromString('--allow_natives_syntax'); + * console.log(v8.cachedDataVersionTag()); // 183726201 + * ``` + * @since v8.0.0 + */ + function cachedDataVersionTag(): number; + /** + * Returns an object with the following properties: + * + * `does_zap_garbage` is a 0/1 boolean, which signifies whether the `--zap_code_space` option is enabled or not. This makes V8 overwrite heap + * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger + * because it continuously touches all heap pages and that makes them less likely + * to get swapped out by the operating system. + * + * `number_of_native_contexts` The value of native\_context is the number of the + * top-level contexts currently active. Increase of this number over time indicates + * a memory leak. + * + * `number_of_detached_contexts` The value of detached\_context is the number + * of contexts that were detached and not yet garbage collected. This number + * being non-zero indicates a potential memory leak. + * + * `total_global_handles_size` The value of total\_global\_handles\_size is the + * total memory size of V8 global handles. + * + * `used_global_handles_size` The value of used\_global\_handles\_size is the + * used memory size of V8 global handles. + * + * `external_memory` The value of external\_memory is the memory size of array + * buffers and external strings. + * + * `total_allocated_bytes` The value of total allocated bytes since the Isolate + * creation. + * + * ```json + * { + * "total_heap_size": 7326976, + * "total_heap_size_executable": 4194304, + * "total_physical_size": 7326976, + * "total_available_size": 1152656, + * "used_heap_size": 3476208, + * "heap_size_limit": 1535115264, + * "malloced_memory": 16384, + * "peak_malloced_memory": 1127496, + * "does_zap_garbage": 0, + * "number_of_native_contexts": 1, + * "number_of_detached_contexts": 0, + * "total_global_handles_size": 8192, + * "used_global_handles_size": 3296, + * "external_memory": 318824 + * } + * ``` + * @since v1.0.0 + */ + function getHeapStatistics(): HeapInfo; + /** + * It returns an object with a structure similar to the + * [`cppgc::HeapStatistics`](https://v8docs.nodesource.com/node-22.4/d7/d51/heap-statistics_8h_source.html) + * object. See the [V8 documentation](https://v8docs.nodesource.com/node-22.4/df/d2f/structcppgc_1_1_heap_statistics.html) + * for more information about the properties of the object. + * + * ```js + * // Detailed + * ({ + * committed_size_bytes: 131072, + * resident_size_bytes: 131072, + * used_size_bytes: 152, + * space_statistics: [ + * { + * name: 'NormalPageSpace0', + * committed_size_bytes: 0, + * resident_size_bytes: 0, + * used_size_bytes: 0, + * page_stats: [{}], + * free_list_stats: {}, + * }, + * { + * name: 'NormalPageSpace1', + * committed_size_bytes: 131072, + * resident_size_bytes: 131072, + * used_size_bytes: 152, + * page_stats: [{}], + * free_list_stats: {}, + * }, + * { + * name: 'NormalPageSpace2', + * committed_size_bytes: 0, + * resident_size_bytes: 0, + * used_size_bytes: 0, + * page_stats: [{}], + * free_list_stats: {}, + * }, + * { + * name: 'NormalPageSpace3', + * committed_size_bytes: 0, + * resident_size_bytes: 0, + * used_size_bytes: 0, + * page_stats: [{}], + * free_list_stats: {}, + * }, + * { + * name: 'LargePageSpace', + * committed_size_bytes: 0, + * resident_size_bytes: 0, + * used_size_bytes: 0, + * page_stats: [{}], + * free_list_stats: {}, + * }, + * ], + * type_names: [], + * detail_level: 'detailed', + * }); + * ``` + * + * ```js + * // Brief + * ({ + * committed_size_bytes: 131072, + * resident_size_bytes: 131072, + * used_size_bytes: 128864, + * space_statistics: [], + * type_names: [], + * detail_level: 'brief', + * }); + * ``` + * @since v22.15.0 + * @param detailLevel **Default:** `'detailed'`. Specifies the level of detail in the returned statistics. + * Accepted values are: + * * `'brief'`: Brief statistics contain only the top-level + * allocated and used + * memory statistics for the entire heap. + * * `'detailed'`: Detailed statistics also contain a break + * down per space and page, as well as freelist statistics + * and object type histograms. + */ + function getCppHeapStatistics(detailLevel?: "brief" | "detailed"): object; + /** + * Returns statistics about the V8 heap spaces, i.e. the segments which make up + * the V8 heap. Neither the ordering of heap spaces, nor the availability of a + * heap space can be guaranteed as the statistics are provided via the + * V8 [`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the + * next. + * + * The value returned is an array of objects containing the following properties: + * + * ```json + * [ + * { + * "space_name": "new_space", + * "space_size": 2063872, + * "space_used_size": 951112, + * "space_available_size": 80824, + * "physical_space_size": 2063872 + * }, + * { + * "space_name": "old_space", + * "space_size": 3090560, + * "space_used_size": 2493792, + * "space_available_size": 0, + * "physical_space_size": 3090560 + * }, + * { + * "space_name": "code_space", + * "space_size": 1260160, + * "space_used_size": 644256, + * "space_available_size": 960, + * "physical_space_size": 1260160 + * }, + * { + * "space_name": "map_space", + * "space_size": 1094160, + * "space_used_size": 201608, + * "space_available_size": 0, + * "physical_space_size": 1094160 + * }, + * { + * "space_name": "large_object_space", + * "space_size": 0, + * "space_used_size": 0, + * "space_available_size": 1490980608, + * "physical_space_size": 0 + * } + * ] + * ``` + * @since v6.0.0 + */ + function getHeapSpaceStatistics(): HeapSpaceInfo[]; + /** + * The `v8.setFlagsFromString()` method can be used to programmatically set + * V8 command-line flags. This method should be used with care. Changing settings + * after the VM has started may result in unpredictable behavior, including + * crashes and data loss; or it may simply do nothing. + * + * The V8 options available for a version of Node.js may be determined by running `node --v8-options`. + * + * Usage: + * + * ```js + * // Print GC events to stdout for one minute. + * import v8 from 'node:v8'; + * v8.setFlagsFromString('--trace_gc'); + * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3); + * ``` + * @since v1.0.0 + */ + function setFlagsFromString(flags: string): void; + /** + * This is similar to the [`queryObjects()` console API](https://developer.chrome.com/docs/devtools/console/utilities#queryObjects-function) + * provided by the Chromium DevTools console. It can be used to search for objects that have the matching constructor on its prototype chain + * in the heap after a full garbage collection, which can be useful for memory leak regression tests. To avoid surprising results, users should + * avoid using this API on constructors whose implementation they don't control, or on constructors that can be invoked by other parties in the + * application. + * + * To avoid accidental leaks, this API does not return raw references to the objects found. By default, it returns the count of the objects + * found. If `options.format` is `'summary'`, it returns an array containing brief string representations for each object. The visibility provided + * in this API is similar to what the heap snapshot provides, while users can save the cost of serialization and parsing and directly filter the + * target objects during the search. + * + * Only objects created in the current execution context are included in the results. + * + * ```js + * import { queryObjects } from 'node:v8'; + * class A { foo = 'bar'; } + * console.log(queryObjects(A)); // 0 + * const a = new A(); + * console.log(queryObjects(A)); // 1 + * // [ "A { foo: 'bar' }" ] + * console.log(queryObjects(A, { format: 'summary' })); + * + * class B extends A { bar = 'qux'; } + * const b = new B(); + * console.log(queryObjects(B)); // 1 + * // [ "B { foo: 'bar', bar: 'qux' }" ] + * console.log(queryObjects(B, { format: 'summary' })); + * + * // Note that, when there are child classes inheriting from a constructor, + * // the constructor also shows up in the prototype chain of the child + * // classes's prototoype, so the child classes's prototoype would also be + * // included in the result. + * console.log(queryObjects(A)); // 3 + * // [ "B { foo: 'bar', bar: 'qux' }", 'A {}', "A { foo: 'bar' }" ] + * console.log(queryObjects(A, { format: 'summary' })); + * ``` + * @param ctor The constructor that can be used to search on the prototype chain in order to filter target objects in the heap. + * @since v20.13.0 + */ + function queryObjects(ctor: Function): number | string[]; + function queryObjects(ctor: Function, options: { format: "count" }): number; + function queryObjects(ctor: Function, options: { format: "summary" }): string[]; + /** + * Generates a snapshot of the current V8 heap and returns a Readable + * Stream that may be used to read the JSON serialized representation. + * This JSON stream format is intended to be used with tools such as + * Chrome DevTools. The JSON schema is undocumented and specific to the + * V8 engine. Therefore, the schema may change from one version of V8 to the next. + * + * Creating a heap snapshot requires memory about twice the size of the heap at + * the time the snapshot is created. This results in the risk of OOM killers + * terminating the process. + * + * Generating a snapshot is a synchronous operation which blocks the event loop + * for a duration depending on the heap size. + * + * ```js + * // Print heap snapshot to the console + * import v8 from 'node:v8'; + * const stream = v8.getHeapSnapshot(); + * stream.pipe(process.stdout); + * ``` + * @since v11.13.0 + * @return A Readable containing the V8 heap snapshot. + */ + function getHeapSnapshot(options?: HeapSnapshotOptions): Readable; + /** + * Generates a snapshot of the current V8 heap and writes it to a JSON + * file. This file is intended to be used with tools such as Chrome + * DevTools. The JSON schema is undocumented and specific to the V8 + * engine, and may change from one version of V8 to the next. + * + * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will + * not contain any information about the workers, and vice versa. + * + * Creating a heap snapshot requires memory about twice the size of the heap at + * the time the snapshot is created. This results in the risk of OOM killers + * terminating the process. + * + * Generating a snapshot is a synchronous operation which blocks the event loop + * for a duration depending on the heap size. + * + * ```js + * import { writeHeapSnapshot } from 'node:v8'; + * import { + * Worker, + * isMainThread, + * parentPort, + * } from 'node:worker_threads'; + * + * if (isMainThread) { + * const worker = new Worker(__filename); + * + * worker.once('message', (filename) => { + * console.log(`worker heapdump: ${filename}`); + * // Now get a heapdump for the main thread. + * console.log(`main thread heapdump: ${writeHeapSnapshot()}`); + * }); + * + * // Tell the worker to create a heapdump. + * worker.postMessage('heapdump'); + * } else { + * parentPort.once('message', (message) => { + * if (message === 'heapdump') { + * // Generate a heapdump for the worker + * // and return the filename to the parent. + * parentPort.postMessage(writeHeapSnapshot()); + * } + * }); + * } + * ``` + * @since v11.13.0 + * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be + * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a + * worker thread. + * @return The filename where the snapshot was saved. + */ + function writeHeapSnapshot(filename?: string, options?: HeapSnapshotOptions): string; + /** + * Get statistics about code and its metadata in the heap, see + * V8 [`GetHeapCodeAndMetadataStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#a6079122af17612ef54ef3348ce170866) API. Returns an object with the + * following properties: + * + * ```json + * { + * "code_and_metadata_size": 212208, + * "bytecode_and_metadata_size": 161368, + * "external_script_source_size": 1410794, + * "cpu_profiler_metadata_size": 0 + * } + * ``` + * @since v12.8.0 + */ + function getHeapCodeStatistics(): HeapCodeStatistics; + /** + * @since v25.0.0 + */ + interface SyncCPUProfileHandle { + /** + * Stopping collecting the profile and return the profile data. + * @since v25.0.0 + */ + stop(): string; + /** + * Stopping collecting the profile and the profile will be discarded. + * @since v25.0.0 + */ + [Symbol.dispose](): void; + } + /** + * @since v26.1.0 + */ + interface SyncHeapProfileHandle { + /** + * Stopping collecting the profile and return the profile data. + * @since v26.1.0 + */ + stop(): string; + /** + * Stopping collecting the profile and the profile will be discarded. + * @since v26.1.0 + */ + [Symbol.dispose](): void; + } + /** + * @since v24.8.0 + */ + interface CPUProfileHandle { + /** + * Stopping collecting the profile, then return a Promise that fulfills with an error or the + * profile data. + * @since v24.8.0 + */ + stop(): Promise; + /** + * Stopping collecting the profile and the profile will be discarded. + * @since v24.8.0 + */ + [Symbol.asyncDispose](): Promise; + } + /** + * @since v24.9.0 + */ + interface HeapProfileHandle { + /** + * Stopping collecting the profile, then return a Promise that fulfills with an error or the + * profile data. + * @since v24.9.0 + */ + stop(): Promise; + /** + * Stopping collecting the profile and the profile will be discarded. + * @since v24.9.0 + */ + [Symbol.asyncDispose](): Promise; + } + interface CPUProfileOptions { + /** + * Requested sampling interval in milliseconds. **Default:** `0`. + */ + sampleInterval?: number | undefined; + /** + * Maximum number of samples to keep before older + * entries are discarded. **Default:** `4294967295`. + */ + maxBufferSize?: number | undefined; + } + /** + * Starting a CPU profile then return a `SyncCPUProfileHandle` object. + * This API supports `using` syntax. + * + * ```js + * const handle = v8.startCpuProfile({ sampleInterval: 1, maxBufferSize: 10_000 }); + * const profile = handle.stop(); + * console.log(profile); + * ``` + * @since v25.0.0 + */ + function startCpuProfile(options?: CPUProfileOptions): SyncCPUProfileHandle; + interface HeapProfileOptions { + /** + * The average sampling interval in bytes. + * **Default:** `524288` (512 KiB). + */ + sampleInterval?: number | undefined; + /** + * The maximum stack depth for samples. + * **Default:** `16`. + */ + stackDepth?: number | undefined; + /** + * Force garbage collection before taking the profile. + * **Default:** `false`. + */ + forceGC?: boolean | undefined; + /** + * Include objects collected + * by major GC. **Default:** `false`. + */ + includeObjectsCollectedByMajorGC?: boolean | undefined; + /** + * Include objects collected + * by minor GC. **Default:** `false`. + */ + includeObjectsCollectedByMinorGC?: boolean | undefined; + } + /** + * Starting a heap profile then return a `SyncHeapProfileHandle` object. + * This API supports `using` syntax. + * + * ```js + * import v8 from 'node:v8'; + * + * const handle = v8.startHeapProfile(); + * const profile = handle.stop(); + * console.log(profile); + * ``` + * + * With custom parameters: + * + * ```js + * import v8 from 'node:v8'; + * + * const handle = v8.startHeapProfile({ + * sampleInterval: 1024, + * stackDepth: 8, + * forceGC: true, + * includeObjectsCollectedByMajorGC: true, + * }); + * const profile = handle.stop(); + * console.log(profile); + * ``` + * @since v26.1.0 + */ + function startHeapProfile(options?: HeapProfileOptions): SyncHeapProfileHandle; + /** + * V8 only supports `Latin-1/ISO-8859-1` and `UTF16` as the underlying representation of a string. + * If the `content` uses `Latin-1/ISO-8859-1` as the underlying representation, this function will return true; + * otherwise, it returns false. + * + * If this method returns false, that does not mean that the string contains some characters not in `Latin-1/ISO-8859-1`. + * Sometimes a `Latin-1` string may also be represented as `UTF16`. + * + * ```js + * const { isStringOneByteRepresentation } = require('node:v8'); + * + * const Encoding = { + * latin1: 1, + * utf16le: 2, + * }; + * const buffer = Buffer.alloc(100); + * function writeString(input) { + * if (isStringOneByteRepresentation(input)) { + * buffer.writeUint8(Encoding.latin1); + * buffer.writeUint32LE(input.length, 1); + * buffer.write(input, 5, 'latin1'); + * } else { + * buffer.writeUint8(Encoding.utf16le); + * buffer.writeUint32LE(input.length * 2, 1); + * buffer.write(input, 5, 'utf16le'); + * } + * } + * writeString('hello'); + * writeString('你好'); + * ``` + * @since v23.10.0, v22.15.0 + */ + function isStringOneByteRepresentation(content: string): boolean; + /** + * @since v8.0.0 + */ + class Serializer { + /** + * Writes out a header, which includes the serialization format version. + */ + writeHeader(): void; + /** + * Serializes a JavaScript value and adds the serialized representation to the + * internal buffer. + * + * This throws an error if `value` cannot be serialized. + */ + writeValue(val: any): boolean; + /** + * Returns the stored internal buffer. This serializer should not be used once + * the buffer is released. Calling this method results in undefined behavior + * if a previous write has failed. + */ + releaseBuffer(): NonSharedBuffer; + /** + * Marks an `ArrayBuffer` as having its contents transferred out of band. + * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`. + * @param id A 32-bit unsigned integer. + * @param arrayBuffer An `ArrayBuffer` instance. + */ + transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; + /** + * Write a raw 32-bit unsigned integer. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeUint32(value: number): void; + /** + * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeUint64(hi: number, lo: number): void; + /** + * Write a JS `number` value. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeDouble(value: number): void; + /** + * Write raw bytes into the serializer's internal buffer. The deserializer + * will require a way to compute the length of the buffer. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeRawBytes(buffer: NodeJS.ArrayBufferView): void; + } + /** + * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only + * stores the part of their underlying `ArrayBuffer`s that they are referring to. + * @since v8.0.0 + */ + class DefaultSerializer extends Serializer {} + /** + * @since v8.0.0 + */ + class Deserializer { + constructor(data: NodeJS.TypedArray); + /** + * Reads and validates a header (including the format version). + * May, for example, reject an invalid or unsupported wire format. In that case, + * an `Error` is thrown. + */ + readHeader(): boolean; + /** + * Deserializes a JavaScript value from the buffer and returns it. + */ + readValue(): any; + /** + * Marks an `ArrayBuffer` as having its contents transferred out of band. + * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of + * `SharedArrayBuffer`s). + * @param id A 32-bit unsigned integer. + * @param arrayBuffer An `ArrayBuffer` instance. + */ + transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; + /** + * Reads the underlying wire format version. Likely mostly to be useful to + * legacy code reading old wire format versions. May not be called before `.readHeader()`. + */ + getWireFormatVersion(): number; + /** + * Read a raw 32-bit unsigned integer and return it. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readUint32(): number; + /** + * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]` with two 32-bit unsigned integer entries. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readUint64(): [number, number]; + /** + * Read a JS `number` value. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readDouble(): number; + /** + * Read raw bytes from the deserializer's internal buffer. The `length` parameter + * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readRawBytes(length: number): Buffer; + } + /** + * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`. + * @since v8.0.0 + */ + class DefaultDeserializer extends Deserializer {} + /** + * Uses a `DefaultSerializer` to serialize `value` into a buffer. + * + * `ERR_BUFFER_TOO_LARGE` will be thrown when trying to + * serialize a huge object which requires buffer + * larger than `buffer.constants.MAX_LENGTH`. + * @since v8.0.0 + */ + function serialize(value: any): NonSharedBuffer; + /** + * Uses a `DefaultDeserializer` with default options to read a JS value + * from a buffer. + * @since v8.0.0 + * @param buffer A buffer returned by {@link serialize}. + */ + function deserialize(buffer: NodeJS.ArrayBufferView): any; + /** + * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple + * times during the lifetime of the process. Each time the execution counter will + * be reset and a new coverage report will be written to the directory specified + * by `NODE_V8_COVERAGE`. + * + * When the process is about to exit, one last coverage will still be written to + * disk unless {@link stopCoverage} is invoked before the process exits. + * @since v15.1.0, v14.18.0, v12.22.0 + */ + function takeCoverage(): void; + /** + * The `v8.stopCoverage()` method allows the user to stop the coverage collection + * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count + * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand. + * @since v15.1.0, v14.18.0, v12.22.0 + */ + function stopCoverage(): void; + /** + * The API is a no-op if `--heapsnapshot-near-heap-limit` is already set from the command line or the API is called more than once. + * `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information. + * @since v18.10.0, v16.18.0 + */ + function setHeapSnapshotNearHeapLimit(limit: number): void; + /** + * This API collects GC data in current thread. + * @since v19.6.0, v18.15.0 + */ + class GCProfiler { + /** + * Start collecting GC data. + * @since v19.6.0, v18.15.0 + */ + start(): void; + /** + * Stop collecting GC data and return an object. The content of object + * is as follows. + * + * ```json + * { + * "version": 1, + * "startTime": 1674059033862, + * "statistics": [ + * { + * "gcType": "Scavenge", + * "beforeGC": { + * "heapStatistics": { + * "totalHeapSize": 5005312, + * "totalHeapSizeExecutable": 524288, + * "totalPhysicalSize": 5226496, + * "totalAvailableSize": 4341325216, + * "totalGlobalHandlesSize": 8192, + * "usedGlobalHandlesSize": 2112, + * "usedHeapSize": 4883840, + * "heapSizeLimit": 4345298944, + * "mallocedMemory": 254128, + * "externalMemory": 225138, + * "peakMallocedMemory": 181760 + * }, + * "heapSpaceStatistics": [ + * { + * "spaceName": "read_only_space", + * "spaceSize": 0, + * "spaceUsedSize": 0, + * "spaceAvailableSize": 0, + * "physicalSpaceSize": 0 + * } + * ] + * }, + * "cost": 1574.14, + * "afterGC": { + * "heapStatistics": { + * "totalHeapSize": 6053888, + * "totalHeapSizeExecutable": 524288, + * "totalPhysicalSize": 5500928, + * "totalAvailableSize": 4341101384, + * "totalGlobalHandlesSize": 8192, + * "usedGlobalHandlesSize": 2112, + * "usedHeapSize": 4059096, + * "heapSizeLimit": 4345298944, + * "mallocedMemory": 254128, + * "externalMemory": 225138, + * "peakMallocedMemory": 181760 + * }, + * "heapSpaceStatistics": [ + * { + * "spaceName": "read_only_space", + * "spaceSize": 0, + * "spaceUsedSize": 0, + * "spaceAvailableSize": 0, + * "physicalSpaceSize": 0 + * } + * ] + * } + * } + * ], + * "endTime": 1674059036865 + * } + * ``` + * + * Here's an example. + * + * ```js + * import { GCProfiler } from 'node:v8'; + * const profiler = new GCProfiler(); + * profiler.start(); + * setTimeout(() => { + * console.log(profiler.stop()); + * }, 1000); + * ``` + * @since v19.6.0, v18.15.0 + */ + stop(): GCProfilerResult; + /** + * Stop collecting GC data, and discard the profile. + * @since v25.5.0 + */ + [Symbol.dispose](): void; + } + interface GCProfilerResult { + version: number; + startTime: number; + endTime: number; + statistics: Array<{ + gcType: string; + cost: number; + beforeGC: { + heapStatistics: HeapStatistics; + heapSpaceStatistics: HeapSpaceStatistics[]; + }; + afterGC: { + heapStatistics: HeapStatistics; + heapSpaceStatistics: HeapSpaceStatistics[]; + }; + }>; + } + interface HeapStatistics { + totalHeapSize: number; + totalHeapSizeExecutable: number; + totalPhysicalSize: number; + totalAvailableSize: number; + totalGlobalHandlesSize: number; + usedGlobalHandlesSize: number; + usedHeapSize: number; + heapSizeLimit: number; + mallocedMemory: number; + externalMemory: number; + peakMallocedMemory: number; + } + interface HeapSpaceStatistics { + spaceName: string; + spaceSize: number; + spaceUsedSize: number; + spaceAvailableSize: number; + physicalSpaceSize: number; + } + /** + * Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will + * happen if a promise is created without ever getting a continuation. + * @since v17.1.0, v16.14.0 + * @param promise The promise being created. + * @param parent The promise continued from, if applicable. + */ + interface Init { + (promise: Promise, parent: Promise): void; + } + /** + * Called before a promise continuation executes. This can be in the form of `then()`, `catch()`, or `finally()` handlers or an await resuming. + * + * The before callback will be called 0 to N times. The before callback will typically be called 0 times if no continuation was ever made for the promise. + * The before callback may be called many times in the case where many continuations have been made from the same promise. + * @since v17.1.0, v16.14.0 + */ + interface Before { + (promise: Promise): void; + } + /** + * Called immediately after a promise continuation executes. This may be after a `then()`, `catch()`, or `finally()` handler or before an await after another await. + * @since v17.1.0, v16.14.0 + */ + interface After { + (promise: Promise): void; + } + /** + * Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of {@link Promise.resolve()} or + * {@link Promise.reject()}. + * @since v17.1.0, v16.14.0 + */ + interface Settled { + (promise: Promise): void; + } + /** + * Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or + * around an await, and when the promise resolves or rejects. + * + * Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the `init()`, `before()`, `after()`, and + * `settled()` callbacks must not be async functions as they create more promises which would produce an infinite loop. + * @since v17.1.0, v16.14.0 + */ + interface HookCallbacks { + init?: Init; + before?: Before; + after?: After; + settled?: Settled; + } + interface PromiseHooks { + /** + * The `init` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param init The {@link Init | `init` callback} to call when a promise is created. + * @return Call to stop the hook. + */ + onInit: (init: Init) => Function; + /** + * The `settled` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param settled The {@link Settled | `settled` callback} to call when a promise is created. + * @return Call to stop the hook. + */ + onSettled: (settled: Settled) => Function; + /** + * The `before` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param before The {@link Before | `before` callback} to call before a promise continuation executes. + * @return Call to stop the hook. + */ + onBefore: (before: Before) => Function; + /** + * The `after` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param after The {@link After | `after` callback} to call after a promise continuation executes. + * @return Call to stop the hook. + */ + onAfter: (after: After) => Function; + /** + * Registers functions to be called for different lifetime events of each promise. + * The callbacks `init()`/`before()`/`after()`/`settled()` are called for the respective events during a promise's lifetime. + * All callbacks are optional. For example, if only promise creation needs to be tracked, then only the init callback needs to be passed. + * The hook callbacks must be plain functions. Providing async functions will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param callbacks The {@link HookCallbacks | Hook Callbacks} to register + * @return Used for disabling hooks + */ + createHook: (callbacks: HookCallbacks) => Function; + } + /** + * The `promiseHooks` interface can be used to track promise lifecycle events. + * @since v17.1.0, v16.14.0 + */ + const promiseHooks: PromiseHooks; + type StartupSnapshotCallbackFn = (args: any) => any; + /** + * The `v8.startupSnapshot` interface can be used to add serialization and deserialization hooks for custom startup snapshots. + * + * ```bash + * $ node --snapshot-blob snapshot.blob --build-snapshot entry.js + * # This launches a process with the snapshot + * $ node --snapshot-blob snapshot.blob + * ``` + * + * In the example above, `entry.js` can use methods from the `v8.startupSnapshot` interface to specify how to save information for custom objects + * in the snapshot during serialization and how the information can be used to synchronize these objects during deserialization of the snapshot. + * For example, if the `entry.js` contains the following script: + * + * ```js + * import fs from 'node:fs'; + * import zlib from 'node:zlib'; + * import path from 'node:path'; + * import assert from 'node:assert'; + * + * import v8 from 'node:v8'; + * + * class BookShelf { + * storage = new Map(); + * + * // Reading a series of files from directory and store them into storage. + * constructor(directory, books) { + * for (const book of books) { + * this.storage.set(book, fs.readFileSync(path.join(directory, book))); + * } + * } + * + * static compressAll(shelf) { + * for (const [ book, content ] of shelf.storage) { + * shelf.storage.set(book, zlib.gzipSync(content)); + * } + * } + * + * static decompressAll(shelf) { + * for (const [ book, content ] of shelf.storage) { + * shelf.storage.set(book, zlib.gunzipSync(content)); + * } + * } + * } + * + * // __dirname here is where the snapshot script is placed + * // during snapshot building time. + * const shelf = new BookShelf(__dirname, [ + * 'book1.en_US.txt', + * 'book1.es_ES.txt', + * 'book2.zh_CN.txt', + * ]); + * + * assert(v8.startupSnapshot.isBuildingSnapshot()); + * // On snapshot serialization, compress the books to reduce size. + * v8.startupSnapshot.addSerializeCallback(BookShelf.compressAll, shelf); + * // On snapshot deserialization, decompress the books. + * v8.startupSnapshot.addDeserializeCallback(BookShelf.decompressAll, shelf); + * v8.startupSnapshot.setDeserializeMainFunction((shelf) => { + * // process.env and process.argv are refreshed during snapshot + * // deserialization. + * const lang = process.env.BOOK_LANG || 'en_US'; + * const book = process.argv[1]; + * const name = `${book}.${lang}.txt`; + * console.log(shelf.storage.get(name)); + * }, shelf); + * ``` + * + * The resulted binary will get print the data deserialized from the snapshot during start up, using the refreshed `process.env` and `process.argv` of the launched process: + * + * ```bash + * $ BOOK_LANG=es_ES node --snapshot-blob snapshot.blob book1 + * # Prints content of book1.es_ES.txt deserialized from the snapshot. + * ``` + * + * Currently the application deserialized from a user-land snapshot cannot be snapshotted again, so these APIs are only available to applications that are not deserialized from a user-land snapshot. + * + * @since v18.6.0, v16.17.0 + */ + namespace startupSnapshot { + /** + * Add a callback that will be called when the Node.js instance is about to get serialized into a snapshot and exit. + * This can be used to release resources that should not or cannot be serialized or to convert user data into a form more suitable for serialization. + * @since v18.6.0, v16.17.0 + */ + function addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; + /** + * Add a callback that will be called when the Node.js instance is deserialized from a snapshot. + * The `callback` and the `data` (if provided) will be serialized into the snapshot, they can be used to re-initialize the state of the application or + * to re-acquire resources that the application needs when the application is restarted from the snapshot. + * @since v18.6.0, v16.17.0 + */ + function addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; + /** + * This sets the entry point of the Node.js application when it is deserialized from a snapshot. This can be called only once in the snapshot building script. + * If called, the deserialized application no longer needs an additional entry point script to start up and will simply invoke the callback along with the deserialized + * data (if provided), otherwise an entry point script still needs to be provided to the deserialized application. + * @since v18.6.0, v16.17.0 + */ + function setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void; + /** + * Returns true if the Node.js instance is run to build a snapshot. + * @since v18.6.0, v16.17.0 + */ + function isBuildingSnapshot(): boolean; + } +} +declare module "v8" { + export * from "node:v8"; +} diff --git a/node_modules/@types/node/vfs.d.ts b/node_modules/@types/node/vfs.d.ts new file mode 100644 index 0000000..1bcae33 --- /dev/null +++ b/node_modules/@types/node/vfs.d.ts @@ -0,0 +1,211 @@ +declare module "node:vfs" { + /** + * Convenience factory equivalent to `new VirtualFileSystem(provider, options)`. + * + * ```js + * const vfs = require('node:vfs'); + * + * // Default in-memory provider + * const memoryVfs = vfs.create(); + * + * // Explicit provider + * const realVfs = vfs.create(new vfs.RealFSProvider('/tmp/sandbox')); + * ``` + * @since v26.4.0 + * @param provider The provider to use. **Default:** `new MemoryProvider()`. + */ + function create(provider?: VirtualProvider, options?: VirtualFileSystemOptions): VirtualFileSystem; + function create(options: VirtualFileSystemOptions): VirtualFileSystem; + interface VirtualFileSystemOptions { + /** + * Whether to emit the experimental warning. **Default:** `true`. + */ + emitExperimentalWarning?: boolean | undefined; + } + /** + * A `VirtualFileSystem` wraps a {@link VirtualProvider} and exposes a + * `node:fs`-like API. Each instance maintains its own file tree. + * @since v26.4.0 + */ + class VirtualFileSystem { + /** + * @param provider The provider to use. **Default:** `new MemoryProvider()`. + */ + constructor(provider?: VirtualProvider, options?: VirtualFileSystemOptions); + constructor(options: VirtualFileSystemOptions); + /** + * The provider backing this VFS instance. + * @since v26.4.0 + */ + readonly provider: VirtualProvider; + /** + * `true` when the underlying provider is read-only. + * @since v26.4.0 + */ + readonly readonly: boolean; + } + interface VirtualFileSystem extends + // Synchronous API + Pick< + typeof import("node:fs"), + | "existsSync" + | "statSync" + | "lstatSync" + | "readFileSync" + | "writeFileSync" + | "appendFileSync" + | "readdirSync" + | "mkdirSync" + | "rmdirSync" + | "unlinkSync" + | "renameSync" + | "copyFileSync" + | "realpathSync" + | "readlinkSync" + | "symlinkSync" + | "accessSync" + | "rmSync" + | "truncateSync" + | "ftruncateSync" + | "linkSync" + | "chmodSync" + | "chownSync" + | "utimesSync" + | "lutimesSync" + | "mkdtempSync" + | "opendirSync" + | "openAsBlob" + | "openSync" + | "closeSync" + | "readSync" + | "writeSync" + | "fstatSync" + | "createReadStream" + | "createWriteStream" + | "watch" + | "watchFile" + | "unwatchFile" + >, + // Callback API + Pick< + typeof import("node:fs"), + | "readFile" + | "writeFile" + | "stat" + | "lstat" + | "readdir" + | "realpath" + | "readlink" + | "access" + | "open" + | "close" + | "read" + | "write" + | "rm" + | "fstat" + | "truncate" + | "ftruncate" + | "link" + | "mkdtemp" + | "opendir" + > + { + // Promise API + readonly promises: Pick< + typeof import("node:fs/promises"), + | "readFile" + | "writeFile" + | "appendFile" + | "stat" + | "lstat" + | "readdir" + | "mkdir" + | "rmdir" + | "unlink" + | "rename" + | "copyFile" + | "realpath" + | "readlink" + | "symlink" + | "access" + | "rm" + | "truncate" + | "link" + | "mkdtemp" + | "chmod" + | "chown" + | "lchown" + | "utimes" + | "lutimes" + | "open" + | "lchmod" + | "watch" + >; + } + /** + * The base class for all VFS providers. Subclasses implement the essential + * primitives (such as `open`, `stat`, `readdir`, `mkdir`, `rmdir`, `unlink`, + * `rename`, etc.) and inherit default implementations of the derived + * methods (such as `readFile`, `writeFile`, `exists`, `copyFile`, `access`, etc.). + * @since v26.4.0 + */ + abstract class VirtualProvider { + get readonly(): boolean; + get supportsSymlinks(): boolean; + get supportsWatch(): boolean; + } + /** + * The default in-memory provider. Stores files, directories, and symbolic + * links in a `Map`-backed tree, supports symlinks (`supportsSymlinks === + * true`), and supports watching (`supportsWatch === true`). + * @since v26.4.0 + */ + class MemoryProvider extends VirtualProvider { + /** + * Locks the provider into read-only mode. Subsequent writes through any + * `VirtualFileSystem` using this provider throw `EROFS`. There is no + * way to revert the provider to writable. + * + * ```js + * const vfs = require('node:vfs'); + * + * const provider = new vfs.MemoryProvider(); + * const myVfs = vfs.create(provider); + * myVfs.writeFileSync('/seed.txt', 'initial'); + * + * provider.setReadOnly(); + * + * myVfs.writeFileSync('/x.txt', 'fail'); // throws EROFS + * ``` + * @since v26.4.0 + */ + setReadOnly(): void; + } + /** + * A provider that wraps a directory (i.e. one on the actual file system) and + * exposes its contents through the VFS API. All VFS paths are resolved relative to + * the root and verified to stay inside it; symbolic links resolving outside the + * root are rejected. This path mapping is not a sandbox or access-control + * mechanism. + * @since v26.4.0 + */ + class RealFSProvider extends VirtualProvider { + /** + * ```js + * const vfs = require('node:vfs'); + * + * const realVfs = vfs.create(new vfs.RealFSProvider('/tmp/vfs-root')); + * realVfs.writeFileSync('/file.txt', 'hello'); // writes /tmp/vfs-root/file.txt + * ``` + * @since v26.4.0 + * @param rootPath The absolute file-system path to use as the root. + * Must be a non-empty string. + */ + constructor(rootPath: string); + /** + * The resolved absolute path used as the root. + * @since v26.4.0 + */ + readonly rootPath: string; + } +} diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts new file mode 100644 index 0000000..526c311 --- /dev/null +++ b/node_modules/@types/node/vm.d.ts @@ -0,0 +1,1137 @@ +declare module "node:vm" { + import { NonSharedBuffer } from "node:buffer"; + import { ImportAttributes, ImportPhase } from "node:module"; + interface Context extends NodeJS.Dict {} + interface BaseOptions { + /** + * Specifies the filename used in stack traces produced by this script. + * @default '' + */ + filename?: string | undefined; + /** + * Specifies the line number offset that is displayed in stack traces produced by this script. + * @default 0 + */ + lineOffset?: number | undefined; + /** + * Specifies the column number offset that is displayed in stack traces produced by this script. + * @default 0 + */ + columnOffset?: number | undefined; + } + type DynamicModuleLoader = ( + specifier: string, + referrer: T, + importAttributes: ImportAttributes, + phase: ImportPhase, + ) => Module | Promise; + interface ScriptOptions extends BaseOptions { + /** + * Provides an optional data with V8's code cache data for the supplied source. + */ + cachedData?: NodeJS.ArrayBufferView | undefined; + /** @deprecated in favor of `script.createCachedData()` */ + produceCachedData?: boolean | undefined; + /** + * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is + * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see + * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis). + * @experimental + */ + importModuleDynamically?: + | DynamicModuleLoader` + +[Get supported base64-js with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-base64-js?utm_source=npm-base64-js&utm_medium=referral&utm_campaign=readme) + +## methods + +`base64js` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument. + +* `byteLength` - Takes a base64 string and returns length of byte array +* `toByteArray` - Takes a base64 string and returns a byte array +* `fromByteArray` - Takes a byte array and returns a base64 string + +## license + +MIT diff --git a/node_modules/base64-js/base64js.min.js b/node_modules/base64-js/base64js.min.js new file mode 100644 index 0000000..908ac83 --- /dev/null +++ b/node_modules/base64-js/base64js.min.js @@ -0,0 +1 @@ +(function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,b.base64js=a()}})(function(){return function(){function b(d,e,g){function a(j,i){if(!e[j]){if(!d[j]){var f="function"==typeof require&&require;if(!i&&f)return f(j,!0);if(h)return h(j,!0);var c=new Error("Cannot find module '"+j+"'");throw c.code="MODULE_NOT_FOUND",c}var k=e[j]={exports:{}};d[j][0].call(k.exports,function(b){var c=d[j][1][b];return a(c||b)},k,k.exports,b,d,e,g)}return e[j].exports}for(var h="function"==typeof require&&require,c=0;c>16,j[k++]=255&b>>8,j[k++]=255&b;return 2===h&&(b=l[a.charCodeAt(c)]<<2|l[a.charCodeAt(c+1)]>>4,j[k++]=255&b),1===h&&(b=l[a.charCodeAt(c)]<<10|l[a.charCodeAt(c+1)]<<4|l[a.charCodeAt(c+2)]>>2,j[k++]=255&b>>8,j[k++]=255&b),j}function g(a){return k[63&a>>18]+k[63&a>>12]+k[63&a>>6]+k[63&a]}function h(a,b,c){for(var d,e=[],f=b;fj?j:g+f));return 1===d?(b=a[c-1],e.push(k[b>>2]+k[63&b<<4]+"==")):2===d&&(b=(a[c-2]<<8)+a[c-1],e.push(k[b>>10]+k[63&b>>4]+k[63&b<<2]+"=")),e.join("")}c.byteLength=function(a){var b=d(a),c=b[0],e=b[1];return 3*(c+e)/4-e},c.toByteArray=f,c.fromByteArray=j;for(var k=[],l=[],m="undefined"==typeof Uint8Array?Array:Uint8Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,p=n.length;o 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} diff --git a/node_modules/base64-js/package.json b/node_modules/base64-js/package.json new file mode 100644 index 0000000..c3972e3 --- /dev/null +++ b/node_modules/base64-js/package.json @@ -0,0 +1,47 @@ +{ + "name": "base64-js", + "description": "Base64 encoding/decoding in pure JS", + "version": "1.5.1", + "author": "T. Jameson Little ", + "typings": "index.d.ts", + "bugs": { + "url": "https://github.com/beatgammit/base64-js/issues" + }, + "devDependencies": { + "babel-minify": "^0.5.1", + "benchmark": "^2.1.4", + "browserify": "^16.3.0", + "standard": "*", + "tape": "4.x" + }, + "homepage": "https://github.com/beatgammit/base64-js", + "keywords": [ + "base64" + ], + "license": "MIT", + "main": "index.js", + "repository": { + "type": "git", + "url": "git://github.com/beatgammit/base64-js.git" + }, + "scripts": { + "build": "browserify -s base64js -r ./ | minify > base64js.min.js", + "lint": "standard", + "test": "npm run lint && npm run unit", + "unit": "tape test/*.js" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] +} diff --git a/node_modules/big-integer/BigInteger.d.ts b/node_modules/big-integer/BigInteger.d.ts new file mode 100644 index 0000000..df5b865 --- /dev/null +++ b/node_modules/big-integer/BigInteger.d.ts @@ -0,0 +1,2393 @@ +/** + * Type definitions for BigInteger.js + * Definitions by: Tommy Frazier + */ +export = bigInt; +export as namespace bigInt; + +declare var bigInt: bigInt.BigIntegerStatic; + +declare namespace bigInt { + type BigNumber = number | bigint | string | BigInteger; + + interface BigIntegerStatic { + /** + * Equivalent to bigInt(0). + */ + (): BigInteger; + + /** + * Parse a Javascript number into a bigInt. + */ + (number: number): BigInteger; + + /** + * Parse a Javascript native bigint into a bigInt. + */ + (number: bigint): BigInteger; + + /** + * Parse a string into a bigInt. + * Default base is 10. + * Default alphabet is "0123456789abcdefghijklmnopqrstuvwxyz". + * caseSensitive defaults to false. + */ + (string: string, base?: BigNumber, alphabet?: string, caseSensitive?: boolean): BigInteger; + + /** + * no-op. + */ + (bigInt: BigInteger): BigInteger; + + /** + * Constructs a bigInt from an array of digits in specified base. + * The optional isNegative flag will make the number negative. + */ + fromArray: (digits: BigNumber[], base?: BigNumber, isNegative?: boolean) => BigInteger; + + /** + * Finds the greatest common denominator of a and b. + */ + gcd: (a: BigNumber, b: BigNumber) => BigInteger; + + + /** + * Returns true if x is a BigInteger, false otherwise. + */ + isInstance: (x: any) => x is BigInteger; + + /** + * Finds the least common multiple of a and b. + */ + lcm: (a: BigNumber, b: BigNumber) => BigInteger; + + /** + * Returns the largest of a and b. + */ + max: (a: BigNumber, b: BigNumber) => BigInteger; + + /** + * Returns the smallest of a and b. + */ + min: (a: BigNumber, b: BigNumber) => BigInteger; + + /** + * Equivalent to bigInt(-1). + */ + minusOne: BigInteger; + + /** + * Equivalent to bigInt(1). + */ + one: BigInteger; + + /** + * Returns a random number between min and max. + */ + randBetween: (min: BigNumber, max: BigNumber, rng?: () => number) => BigInteger; + + /** + * Equivalent to bigInt(0). + */ + zero: BigInteger; + } + + interface BigInteger { + /** + * Returns the absolute value of a bigInt. + */ + abs(): BigInteger; + + /** + * Performs addition. + */ + add(number: BigNumber): BigInteger; + + /** + * Performs the bitwise AND operation. + */ + and(number: BigNumber): BigInteger; + + /** + * Returns the number of digits required to represent a bigInt in binary. + */ + bitLength(): BigInteger; + + /** + * Performs a comparison between two numbers. If the numbers are equal, it returns 0. + * If the first number is greater, it returns 1. If the first number is lesser, it returns -1. + */ + compare(number: BigNumber): number; + + /** + * Performs a comparison between the absolute value of two numbers. + */ + compareAbs(number: BigNumber): number; + + /** + * Alias for the compare method. + */ + compareTo(number: BigNumber): number; + + /** + * Performs integer division, disregarding the remainder. + */ + divide(number: BigNumber): BigInteger; + + /** + * Performs division and returns an object with two properties: quotient and remainder. + * The sign of the remainder will match the sign of the dividend. + */ + divmod(number: BigNumber): { quotient: BigInteger, remainder: BigInteger }; + + /** + * Alias for the equals method. + */ + eq(number: BigNumber): boolean; + + /** + * Checks if two numbers are equal. + */ + equals(number: BigNumber): boolean; + + /** + * Alias for the greaterOrEquals method. + */ + geq(number: BigNumber): boolean; + + /** + * Checks if the first number is greater than the second. + */ + greater(number: BigNumber): boolean; + + /** + * Checks if the first number is greater than or equal to the second. + */ + greaterOrEquals(number: BigNumber): boolean; + + /** + * Alias for the greater method. + */ + gt(number: BigNumber): boolean; + + /** + * Returns true if the first number is divisible by the second number, false otherwise. + */ + isDivisibleBy(number: BigNumber): boolean; + + /** + * Returns true if the number is even, false otherwise. + */ + isEven(): boolean; + + /** + * Returns true if the number is negative, false otherwise. + * Returns false for 0 and true for -0. + */ + isNegative(): boolean; + + /** + * Returns true if the number is odd, false otherwise. + */ + isOdd(): boolean; + + /** + * Return true if the number is positive, false otherwise. + * Returns true for 0 and false for -0. + */ + isPositive(): boolean; + + /** + * Returns true if the number is prime, false otherwise. + */ + isPrime(strict?: boolean): boolean; + + /** + * Returns true if the number is very likely to be prime, false otherwise. + */ + isProbablePrime(iterations?: number, rng?: () => number): boolean; + + /** + * Returns true if the number is 1 or -1, false otherwise. + */ + isUnit(): boolean; + + /** + * Return true if the number is 0 or -0, false otherwise. + */ + isZero(): boolean; + + /** + * Alias for the lesserOrEquals method. + */ + leq(number: BigNumber): boolean; + + /** + * Checks if the first number is lesser than the second. + */ + lesser(number: BigNumber): boolean; + + /** + * Checks if the first number is less than or equal to the second. + */ + lesserOrEquals(number: BigNumber): boolean; + + /** + * Alias for the lesser method. + */ + lt(number: BigNumber): boolean; + + /** + * Alias for the subtract method. + */ + minus(number: BigNumber): BigInteger; + + /** + * Performs division and returns the remainder, disregarding the quotient. + * The sign of the remainder will match the sign of the dividend. + */ + mod(number: BigNumber): BigInteger; + + /** + * Finds the multiplicative inverse of the number modulo mod. + */ + modInv(number: BigNumber): BigInteger; + + /** + * Takes the number to the power exp modulo mod. + */ + modPow(exp: BigNumber, mod: BigNumber): BigInteger; + + /** + * Performs multiplication. + */ + multiply(number: BigNumber): BigInteger; + + /** + * Reverses the sign of the number. + */ + negate(): BigInteger; + + /** + * Alias for the notEquals method. + */ + neq(number: BigNumber): boolean; + + /** + * Adds one to the number. + */ + next(): BigInteger; + + /** + * Performs the bitwise NOT operation. + */ + not(): BigInteger; + + /** + * Checks if two numbers are not equal. + */ + notEquals(number: BigNumber): boolean; + + /** + * Performs the bitwise OR operation. + */ + or(number: BigNumber): BigInteger; + + /** + * Alias for the divide method. + */ + over(number: BigNumber): BigInteger; + + /** + * Alias for the add method. + */ + plus(number: BigNumber): BigInteger; + + /** + * Performs exponentiation. If the exponent is less than 0, pow returns 0. + * bigInt.zero.pow(0) returns 1. + */ + pow(number: BigNumber): BigInteger; + + /** + * Subtracts one from the number. + */ + prev(): BigInteger; + + /** + * Alias for the mod method. + */ + remainder(number: BigNumber): BigInteger; + + /** + * Shifts the number left by n places in its binary representation. + * If a negative number is provided, it will shift right. + * + * Throws an error if number is outside of the range [-9007199254740992, 9007199254740992]. + */ + shiftLeft(number: BigNumber): BigInteger; + + /** + * Shifts the number right by n places in its binary representation. + * If a negative number is provided, it will shift left. + * + * Throws an error if number is outside of the range [-9007199254740992, 9007199254740992]. + */ + shiftRight(number: BigNumber): BigInteger; + + /** + * Squares the number. + */ + square(): BigInteger; + + /** + * Performs subtraction. + */ + subtract(number: BigNumber): BigInteger; + + /** + * Alias for the multiply method. + */ + times(number: BigNumber): BigInteger; + + /** + * + * Converts a bigInt to an object representing it as an array of integers module the given radix. + */ + toArray(radix: number): BaseArray; + + /** + * Converts a bigInt into a native Javascript number. Loses precision for numbers outside the range. + */ + toJSNumber(): number; + + /** + * Converts a bigInt to a string. + */ + toString(radix?: number, alphabet?: string): string; + + /** + * Converts a bigInt to a string. This method is called behind the scenes in JSON.stringify. + */ + toJSON(): string; + + /** + * Converts a bigInt to a native Javascript number. This override allows you to use native + * arithmetic operators without explicit conversion. + */ + valueOf(): number; + + /** + * Performs the bitwise XOR operation. + */ + xor(number: BigNumber): BigInteger; + } + + // Array constant accessors + interface BigIntegerStatic { + '-999': BigInteger; + '-998': BigInteger; + '-997': BigInteger; + '-996': BigInteger; + '-995': BigInteger; + '-994': BigInteger; + '-993': BigInteger; + '-992': BigInteger; + '-991': BigInteger; + '-990': BigInteger; + '-989': BigInteger; + '-988': BigInteger; + '-987': BigInteger; + '-986': BigInteger; + '-985': BigInteger; + '-984': BigInteger; + '-983': BigInteger; + '-982': BigInteger; + '-981': BigInteger; + '-980': BigInteger; + '-979': BigInteger; + '-978': BigInteger; + '-977': BigInteger; + '-976': BigInteger; + '-975': BigInteger; + '-974': BigInteger; + '-973': BigInteger; + '-972': BigInteger; + '-971': BigInteger; + '-970': BigInteger; + '-969': BigInteger; + '-968': BigInteger; + '-967': BigInteger; + '-966': BigInteger; + '-965': BigInteger; + '-964': BigInteger; + '-963': BigInteger; + '-962': BigInteger; + '-961': BigInteger; + '-960': BigInteger; + '-959': BigInteger; + '-958': BigInteger; + '-957': BigInteger; + '-956': BigInteger; + '-955': BigInteger; + '-954': BigInteger; + '-953': BigInteger; + '-952': BigInteger; + '-951': BigInteger; + '-950': BigInteger; + '-949': BigInteger; + '-948': BigInteger; + '-947': BigInteger; + '-946': BigInteger; + '-945': BigInteger; + '-944': BigInteger; + '-943': BigInteger; + '-942': BigInteger; + '-941': BigInteger; + '-940': BigInteger; + '-939': BigInteger; + '-938': BigInteger; + '-937': BigInteger; + '-936': BigInteger; + '-935': BigInteger; + '-934': BigInteger; + '-933': BigInteger; + '-932': BigInteger; + '-931': BigInteger; + '-930': BigInteger; + '-929': BigInteger; + '-928': BigInteger; + '-927': BigInteger; + '-926': BigInteger; + '-925': BigInteger; + '-924': BigInteger; + '-923': BigInteger; + '-922': BigInteger; + '-921': BigInteger; + '-920': BigInteger; + '-919': BigInteger; + '-918': BigInteger; + '-917': BigInteger; + '-916': BigInteger; + '-915': BigInteger; + '-914': BigInteger; + '-913': BigInteger; + '-912': BigInteger; + '-911': BigInteger; + '-910': BigInteger; + '-909': BigInteger; + '-908': BigInteger; + '-907': BigInteger; + '-906': BigInteger; + '-905': BigInteger; + '-904': BigInteger; + '-903': BigInteger; + '-902': BigInteger; + '-901': BigInteger; + '-900': BigInteger; + '-899': BigInteger; + '-898': BigInteger; + '-897': BigInteger; + '-896': BigInteger; + '-895': BigInteger; + '-894': BigInteger; + '-893': BigInteger; + '-892': BigInteger; + '-891': BigInteger; + '-890': BigInteger; + '-889': BigInteger; + '-888': BigInteger; + '-887': BigInteger; + '-886': BigInteger; + '-885': BigInteger; + '-884': BigInteger; + '-883': BigInteger; + '-882': BigInteger; + '-881': BigInteger; + '-880': BigInteger; + '-879': BigInteger; + '-878': BigInteger; + '-877': BigInteger; + '-876': BigInteger; + '-875': BigInteger; + '-874': BigInteger; + '-873': BigInteger; + '-872': BigInteger; + '-871': BigInteger; + '-870': BigInteger; + '-869': BigInteger; + '-868': BigInteger; + '-867': BigInteger; + '-866': BigInteger; + '-865': BigInteger; + '-864': BigInteger; + '-863': BigInteger; + '-862': BigInteger; + '-861': BigInteger; + '-860': BigInteger; + '-859': BigInteger; + '-858': BigInteger; + '-857': BigInteger; + '-856': BigInteger; + '-855': BigInteger; + '-854': BigInteger; + '-853': BigInteger; + '-852': BigInteger; + '-851': BigInteger; + '-850': BigInteger; + '-849': BigInteger; + '-848': BigInteger; + '-847': BigInteger; + '-846': BigInteger; + '-845': BigInteger; + '-844': BigInteger; + '-843': BigInteger; + '-842': BigInteger; + '-841': BigInteger; + '-840': BigInteger; + '-839': BigInteger; + '-838': BigInteger; + '-837': BigInteger; + '-836': BigInteger; + '-835': BigInteger; + '-834': BigInteger; + '-833': BigInteger; + '-832': BigInteger; + '-831': BigInteger; + '-830': BigInteger; + '-829': BigInteger; + '-828': BigInteger; + '-827': BigInteger; + '-826': BigInteger; + '-825': BigInteger; + '-824': BigInteger; + '-823': BigInteger; + '-822': BigInteger; + '-821': BigInteger; + '-820': BigInteger; + '-819': BigInteger; + '-818': BigInteger; + '-817': BigInteger; + '-816': BigInteger; + '-815': BigInteger; + '-814': BigInteger; + '-813': BigInteger; + '-812': BigInteger; + '-811': BigInteger; + '-810': BigInteger; + '-809': BigInteger; + '-808': BigInteger; + '-807': BigInteger; + '-806': BigInteger; + '-805': BigInteger; + '-804': BigInteger; + '-803': BigInteger; + '-802': BigInteger; + '-801': BigInteger; + '-800': BigInteger; + '-799': BigInteger; + '-798': BigInteger; + '-797': BigInteger; + '-796': BigInteger; + '-795': BigInteger; + '-794': BigInteger; + '-793': BigInteger; + '-792': BigInteger; + '-791': BigInteger; + '-790': BigInteger; + '-789': BigInteger; + '-788': BigInteger; + '-787': BigInteger; + '-786': BigInteger; + '-785': BigInteger; + '-784': BigInteger; + '-783': BigInteger; + '-782': BigInteger; + '-781': BigInteger; + '-780': BigInteger; + '-779': BigInteger; + '-778': BigInteger; + '-777': BigInteger; + '-776': BigInteger; + '-775': BigInteger; + '-774': BigInteger; + '-773': BigInteger; + '-772': BigInteger; + '-771': BigInteger; + '-770': BigInteger; + '-769': BigInteger; + '-768': BigInteger; + '-767': BigInteger; + '-766': BigInteger; + '-765': BigInteger; + '-764': BigInteger; + '-763': BigInteger; + '-762': BigInteger; + '-761': BigInteger; + '-760': BigInteger; + '-759': BigInteger; + '-758': BigInteger; + '-757': BigInteger; + '-756': BigInteger; + '-755': BigInteger; + '-754': BigInteger; + '-753': BigInteger; + '-752': BigInteger; + '-751': BigInteger; + '-750': BigInteger; + '-749': BigInteger; + '-748': BigInteger; + '-747': BigInteger; + '-746': BigInteger; + '-745': BigInteger; + '-744': BigInteger; + '-743': BigInteger; + '-742': BigInteger; + '-741': BigInteger; + '-740': BigInteger; + '-739': BigInteger; + '-738': BigInteger; + '-737': BigInteger; + '-736': BigInteger; + '-735': BigInteger; + '-734': BigInteger; + '-733': BigInteger; + '-732': BigInteger; + '-731': BigInteger; + '-730': BigInteger; + '-729': BigInteger; + '-728': BigInteger; + '-727': BigInteger; + '-726': BigInteger; + '-725': BigInteger; + '-724': BigInteger; + '-723': BigInteger; + '-722': BigInteger; + '-721': BigInteger; + '-720': BigInteger; + '-719': BigInteger; + '-718': BigInteger; + '-717': BigInteger; + '-716': BigInteger; + '-715': BigInteger; + '-714': BigInteger; + '-713': BigInteger; + '-712': BigInteger; + '-711': BigInteger; + '-710': BigInteger; + '-709': BigInteger; + '-708': BigInteger; + '-707': BigInteger; + '-706': BigInteger; + '-705': BigInteger; + '-704': BigInteger; + '-703': BigInteger; + '-702': BigInteger; + '-701': BigInteger; + '-700': BigInteger; + '-699': BigInteger; + '-698': BigInteger; + '-697': BigInteger; + '-696': BigInteger; + '-695': BigInteger; + '-694': BigInteger; + '-693': BigInteger; + '-692': BigInteger; + '-691': BigInteger; + '-690': BigInteger; + '-689': BigInteger; + '-688': BigInteger; + '-687': BigInteger; + '-686': BigInteger; + '-685': BigInteger; + '-684': BigInteger; + '-683': BigInteger; + '-682': BigInteger; + '-681': BigInteger; + '-680': BigInteger; + '-679': BigInteger; + '-678': BigInteger; + '-677': BigInteger; + '-676': BigInteger; + '-675': BigInteger; + '-674': BigInteger; + '-673': BigInteger; + '-672': BigInteger; + '-671': BigInteger; + '-670': BigInteger; + '-669': BigInteger; + '-668': BigInteger; + '-667': BigInteger; + '-666': BigInteger; + '-665': BigInteger; + '-664': BigInteger; + '-663': BigInteger; + '-662': BigInteger; + '-661': BigInteger; + '-660': BigInteger; + '-659': BigInteger; + '-658': BigInteger; + '-657': BigInteger; + '-656': BigInteger; + '-655': BigInteger; + '-654': BigInteger; + '-653': BigInteger; + '-652': BigInteger; + '-651': BigInteger; + '-650': BigInteger; + '-649': BigInteger; + '-648': BigInteger; + '-647': BigInteger; + '-646': BigInteger; + '-645': BigInteger; + '-644': BigInteger; + '-643': BigInteger; + '-642': BigInteger; + '-641': BigInteger; + '-640': BigInteger; + '-639': BigInteger; + '-638': BigInteger; + '-637': BigInteger; + '-636': BigInteger; + '-635': BigInteger; + '-634': BigInteger; + '-633': BigInteger; + '-632': BigInteger; + '-631': BigInteger; + '-630': BigInteger; + '-629': BigInteger; + '-628': BigInteger; + '-627': BigInteger; + '-626': BigInteger; + '-625': BigInteger; + '-624': BigInteger; + '-623': BigInteger; + '-622': BigInteger; + '-621': BigInteger; + '-620': BigInteger; + '-619': BigInteger; + '-618': BigInteger; + '-617': BigInteger; + '-616': BigInteger; + '-615': BigInteger; + '-614': BigInteger; + '-613': BigInteger; + '-612': BigInteger; + '-611': BigInteger; + '-610': BigInteger; + '-609': BigInteger; + '-608': BigInteger; + '-607': BigInteger; + '-606': BigInteger; + '-605': BigInteger; + '-604': BigInteger; + '-603': BigInteger; + '-602': BigInteger; + '-601': BigInteger; + '-600': BigInteger; + '-599': BigInteger; + '-598': BigInteger; + '-597': BigInteger; + '-596': BigInteger; + '-595': BigInteger; + '-594': BigInteger; + '-593': BigInteger; + '-592': BigInteger; + '-591': BigInteger; + '-590': BigInteger; + '-589': BigInteger; + '-588': BigInteger; + '-587': BigInteger; + '-586': BigInteger; + '-585': BigInteger; + '-584': BigInteger; + '-583': BigInteger; + '-582': BigInteger; + '-581': BigInteger; + '-580': BigInteger; + '-579': BigInteger; + '-578': BigInteger; + '-577': BigInteger; + '-576': BigInteger; + '-575': BigInteger; + '-574': BigInteger; + '-573': BigInteger; + '-572': BigInteger; + '-571': BigInteger; + '-570': BigInteger; + '-569': BigInteger; + '-568': BigInteger; + '-567': BigInteger; + '-566': BigInteger; + '-565': BigInteger; + '-564': BigInteger; + '-563': BigInteger; + '-562': BigInteger; + '-561': BigInteger; + '-560': BigInteger; + '-559': BigInteger; + '-558': BigInteger; + '-557': BigInteger; + '-556': BigInteger; + '-555': BigInteger; + '-554': BigInteger; + '-553': BigInteger; + '-552': BigInteger; + '-551': BigInteger; + '-550': BigInteger; + '-549': BigInteger; + '-548': BigInteger; + '-547': BigInteger; + '-546': BigInteger; + '-545': BigInteger; + '-544': BigInteger; + '-543': BigInteger; + '-542': BigInteger; + '-541': BigInteger; + '-540': BigInteger; + '-539': BigInteger; + '-538': BigInteger; + '-537': BigInteger; + '-536': BigInteger; + '-535': BigInteger; + '-534': BigInteger; + '-533': BigInteger; + '-532': BigInteger; + '-531': BigInteger; + '-530': BigInteger; + '-529': BigInteger; + '-528': BigInteger; + '-527': BigInteger; + '-526': BigInteger; + '-525': BigInteger; + '-524': BigInteger; + '-523': BigInteger; + '-522': BigInteger; + '-521': BigInteger; + '-520': BigInteger; + '-519': BigInteger; + '-518': BigInteger; + '-517': BigInteger; + '-516': BigInteger; + '-515': BigInteger; + '-514': BigInteger; + '-513': BigInteger; + '-512': BigInteger; + '-511': BigInteger; + '-510': BigInteger; + '-509': BigInteger; + '-508': BigInteger; + '-507': BigInteger; + '-506': BigInteger; + '-505': BigInteger; + '-504': BigInteger; + '-503': BigInteger; + '-502': BigInteger; + '-501': BigInteger; + '-500': BigInteger; + '-499': BigInteger; + '-498': BigInteger; + '-497': BigInteger; + '-496': BigInteger; + '-495': BigInteger; + '-494': BigInteger; + '-493': BigInteger; + '-492': BigInteger; + '-491': BigInteger; + '-490': BigInteger; + '-489': BigInteger; + '-488': BigInteger; + '-487': BigInteger; + '-486': BigInteger; + '-485': BigInteger; + '-484': BigInteger; + '-483': BigInteger; + '-482': BigInteger; + '-481': BigInteger; + '-480': BigInteger; + '-479': BigInteger; + '-478': BigInteger; + '-477': BigInteger; + '-476': BigInteger; + '-475': BigInteger; + '-474': BigInteger; + '-473': BigInteger; + '-472': BigInteger; + '-471': BigInteger; + '-470': BigInteger; + '-469': BigInteger; + '-468': BigInteger; + '-467': BigInteger; + '-466': BigInteger; + '-465': BigInteger; + '-464': BigInteger; + '-463': BigInteger; + '-462': BigInteger; + '-461': BigInteger; + '-460': BigInteger; + '-459': BigInteger; + '-458': BigInteger; + '-457': BigInteger; + '-456': BigInteger; + '-455': BigInteger; + '-454': BigInteger; + '-453': BigInteger; + '-452': BigInteger; + '-451': BigInteger; + '-450': BigInteger; + '-449': BigInteger; + '-448': BigInteger; + '-447': BigInteger; + '-446': BigInteger; + '-445': BigInteger; + '-444': BigInteger; + '-443': BigInteger; + '-442': BigInteger; + '-441': BigInteger; + '-440': BigInteger; + '-439': BigInteger; + '-438': BigInteger; + '-437': BigInteger; + '-436': BigInteger; + '-435': BigInteger; + '-434': BigInteger; + '-433': BigInteger; + '-432': BigInteger; + '-431': BigInteger; + '-430': BigInteger; + '-429': BigInteger; + '-428': BigInteger; + '-427': BigInteger; + '-426': BigInteger; + '-425': BigInteger; + '-424': BigInteger; + '-423': BigInteger; + '-422': BigInteger; + '-421': BigInteger; + '-420': BigInteger; + '-419': BigInteger; + '-418': BigInteger; + '-417': BigInteger; + '-416': BigInteger; + '-415': BigInteger; + '-414': BigInteger; + '-413': BigInteger; + '-412': BigInteger; + '-411': BigInteger; + '-410': BigInteger; + '-409': BigInteger; + '-408': BigInteger; + '-407': BigInteger; + '-406': BigInteger; + '-405': BigInteger; + '-404': BigInteger; + '-403': BigInteger; + '-402': BigInteger; + '-401': BigInteger; + '-400': BigInteger; + '-399': BigInteger; + '-398': BigInteger; + '-397': BigInteger; + '-396': BigInteger; + '-395': BigInteger; + '-394': BigInteger; + '-393': BigInteger; + '-392': BigInteger; + '-391': BigInteger; + '-390': BigInteger; + '-389': BigInteger; + '-388': BigInteger; + '-387': BigInteger; + '-386': BigInteger; + '-385': BigInteger; + '-384': BigInteger; + '-383': BigInteger; + '-382': BigInteger; + '-381': BigInteger; + '-380': BigInteger; + '-379': BigInteger; + '-378': BigInteger; + '-377': BigInteger; + '-376': BigInteger; + '-375': BigInteger; + '-374': BigInteger; + '-373': BigInteger; + '-372': BigInteger; + '-371': BigInteger; + '-370': BigInteger; + '-369': BigInteger; + '-368': BigInteger; + '-367': BigInteger; + '-366': BigInteger; + '-365': BigInteger; + '-364': BigInteger; + '-363': BigInteger; + '-362': BigInteger; + '-361': BigInteger; + '-360': BigInteger; + '-359': BigInteger; + '-358': BigInteger; + '-357': BigInteger; + '-356': BigInteger; + '-355': BigInteger; + '-354': BigInteger; + '-353': BigInteger; + '-352': BigInteger; + '-351': BigInteger; + '-350': BigInteger; + '-349': BigInteger; + '-348': BigInteger; + '-347': BigInteger; + '-346': BigInteger; + '-345': BigInteger; + '-344': BigInteger; + '-343': BigInteger; + '-342': BigInteger; + '-341': BigInteger; + '-340': BigInteger; + '-339': BigInteger; + '-338': BigInteger; + '-337': BigInteger; + '-336': BigInteger; + '-335': BigInteger; + '-334': BigInteger; + '-333': BigInteger; + '-332': BigInteger; + '-331': BigInteger; + '-330': BigInteger; + '-329': BigInteger; + '-328': BigInteger; + '-327': BigInteger; + '-326': BigInteger; + '-325': BigInteger; + '-324': BigInteger; + '-323': BigInteger; + '-322': BigInteger; + '-321': BigInteger; + '-320': BigInteger; + '-319': BigInteger; + '-318': BigInteger; + '-317': BigInteger; + '-316': BigInteger; + '-315': BigInteger; + '-314': BigInteger; + '-313': BigInteger; + '-312': BigInteger; + '-311': BigInteger; + '-310': BigInteger; + '-309': BigInteger; + '-308': BigInteger; + '-307': BigInteger; + '-306': BigInteger; + '-305': BigInteger; + '-304': BigInteger; + '-303': BigInteger; + '-302': BigInteger; + '-301': BigInteger; + '-300': BigInteger; + '-299': BigInteger; + '-298': BigInteger; + '-297': BigInteger; + '-296': BigInteger; + '-295': BigInteger; + '-294': BigInteger; + '-293': BigInteger; + '-292': BigInteger; + '-291': BigInteger; + '-290': BigInteger; + '-289': BigInteger; + '-288': BigInteger; + '-287': BigInteger; + '-286': BigInteger; + '-285': BigInteger; + '-284': BigInteger; + '-283': BigInteger; + '-282': BigInteger; + '-281': BigInteger; + '-280': BigInteger; + '-279': BigInteger; + '-278': BigInteger; + '-277': BigInteger; + '-276': BigInteger; + '-275': BigInteger; + '-274': BigInteger; + '-273': BigInteger; + '-272': BigInteger; + '-271': BigInteger; + '-270': BigInteger; + '-269': BigInteger; + '-268': BigInteger; + '-267': BigInteger; + '-266': BigInteger; + '-265': BigInteger; + '-264': BigInteger; + '-263': BigInteger; + '-262': BigInteger; + '-261': BigInteger; + '-260': BigInteger; + '-259': BigInteger; + '-258': BigInteger; + '-257': BigInteger; + '-256': BigInteger; + '-255': BigInteger; + '-254': BigInteger; + '-253': BigInteger; + '-252': BigInteger; + '-251': BigInteger; + '-250': BigInteger; + '-249': BigInteger; + '-248': BigInteger; + '-247': BigInteger; + '-246': BigInteger; + '-245': BigInteger; + '-244': BigInteger; + '-243': BigInteger; + '-242': BigInteger; + '-241': BigInteger; + '-240': BigInteger; + '-239': BigInteger; + '-238': BigInteger; + '-237': BigInteger; + '-236': BigInteger; + '-235': BigInteger; + '-234': BigInteger; + '-233': BigInteger; + '-232': BigInteger; + '-231': BigInteger; + '-230': BigInteger; + '-229': BigInteger; + '-228': BigInteger; + '-227': BigInteger; + '-226': BigInteger; + '-225': BigInteger; + '-224': BigInteger; + '-223': BigInteger; + '-222': BigInteger; + '-221': BigInteger; + '-220': BigInteger; + '-219': BigInteger; + '-218': BigInteger; + '-217': BigInteger; + '-216': BigInteger; + '-215': BigInteger; + '-214': BigInteger; + '-213': BigInteger; + '-212': BigInteger; + '-211': BigInteger; + '-210': BigInteger; + '-209': BigInteger; + '-208': BigInteger; + '-207': BigInteger; + '-206': BigInteger; + '-205': BigInteger; + '-204': BigInteger; + '-203': BigInteger; + '-202': BigInteger; + '-201': BigInteger; + '-200': BigInteger; + '-199': BigInteger; + '-198': BigInteger; + '-197': BigInteger; + '-196': BigInteger; + '-195': BigInteger; + '-194': BigInteger; + '-193': BigInteger; + '-192': BigInteger; + '-191': BigInteger; + '-190': BigInteger; + '-189': BigInteger; + '-188': BigInteger; + '-187': BigInteger; + '-186': BigInteger; + '-185': BigInteger; + '-184': BigInteger; + '-183': BigInteger; + '-182': BigInteger; + '-181': BigInteger; + '-180': BigInteger; + '-179': BigInteger; + '-178': BigInteger; + '-177': BigInteger; + '-176': BigInteger; + '-175': BigInteger; + '-174': BigInteger; + '-173': BigInteger; + '-172': BigInteger; + '-171': BigInteger; + '-170': BigInteger; + '-169': BigInteger; + '-168': BigInteger; + '-167': BigInteger; + '-166': BigInteger; + '-165': BigInteger; + '-164': BigInteger; + '-163': BigInteger; + '-162': BigInteger; + '-161': BigInteger; + '-160': BigInteger; + '-159': BigInteger; + '-158': BigInteger; + '-157': BigInteger; + '-156': BigInteger; + '-155': BigInteger; + '-154': BigInteger; + '-153': BigInteger; + '-152': BigInteger; + '-151': BigInteger; + '-150': BigInteger; + '-149': BigInteger; + '-148': BigInteger; + '-147': BigInteger; + '-146': BigInteger; + '-145': BigInteger; + '-144': BigInteger; + '-143': BigInteger; + '-142': BigInteger; + '-141': BigInteger; + '-140': BigInteger; + '-139': BigInteger; + '-138': BigInteger; + '-137': BigInteger; + '-136': BigInteger; + '-135': BigInteger; + '-134': BigInteger; + '-133': BigInteger; + '-132': BigInteger; + '-131': BigInteger; + '-130': BigInteger; + '-129': BigInteger; + '-128': BigInteger; + '-127': BigInteger; + '-126': BigInteger; + '-125': BigInteger; + '-124': BigInteger; + '-123': BigInteger; + '-122': BigInteger; + '-121': BigInteger; + '-120': BigInteger; + '-119': BigInteger; + '-118': BigInteger; + '-117': BigInteger; + '-116': BigInteger; + '-115': BigInteger; + '-114': BigInteger; + '-113': BigInteger; + '-112': BigInteger; + '-111': BigInteger; + '-110': BigInteger; + '-109': BigInteger; + '-108': BigInteger; + '-107': BigInteger; + '-106': BigInteger; + '-105': BigInteger; + '-104': BigInteger; + '-103': BigInteger; + '-102': BigInteger; + '-101': BigInteger; + '-100': BigInteger; + '-99': BigInteger; + '-98': BigInteger; + '-97': BigInteger; + '-96': BigInteger; + '-95': BigInteger; + '-94': BigInteger; + '-93': BigInteger; + '-92': BigInteger; + '-91': BigInteger; + '-90': BigInteger; + '-89': BigInteger; + '-88': BigInteger; + '-87': BigInteger; + '-86': BigInteger; + '-85': BigInteger; + '-84': BigInteger; + '-83': BigInteger; + '-82': BigInteger; + '-81': BigInteger; + '-80': BigInteger; + '-79': BigInteger; + '-78': BigInteger; + '-77': BigInteger; + '-76': BigInteger; + '-75': BigInteger; + '-74': BigInteger; + '-73': BigInteger; + '-72': BigInteger; + '-71': BigInteger; + '-70': BigInteger; + '-69': BigInteger; + '-68': BigInteger; + '-67': BigInteger; + '-66': BigInteger; + '-65': BigInteger; + '-64': BigInteger; + '-63': BigInteger; + '-62': BigInteger; + '-61': BigInteger; + '-60': BigInteger; + '-59': BigInteger; + '-58': BigInteger; + '-57': BigInteger; + '-56': BigInteger; + '-55': BigInteger; + '-54': BigInteger; + '-53': BigInteger; + '-52': BigInteger; + '-51': BigInteger; + '-50': BigInteger; + '-49': BigInteger; + '-48': BigInteger; + '-47': BigInteger; + '-46': BigInteger; + '-45': BigInteger; + '-44': BigInteger; + '-43': BigInteger; + '-42': BigInteger; + '-41': BigInteger; + '-40': BigInteger; + '-39': BigInteger; + '-38': BigInteger; + '-37': BigInteger; + '-36': BigInteger; + '-35': BigInteger; + '-34': BigInteger; + '-33': BigInteger; + '-32': BigInteger; + '-31': BigInteger; + '-30': BigInteger; + '-29': BigInteger; + '-28': BigInteger; + '-27': BigInteger; + '-26': BigInteger; + '-25': BigInteger; + '-24': BigInteger; + '-23': BigInteger; + '-22': BigInteger; + '-21': BigInteger; + '-20': BigInteger; + '-19': BigInteger; + '-18': BigInteger; + '-17': BigInteger; + '-16': BigInteger; + '-15': BigInteger; + '-14': BigInteger; + '-13': BigInteger; + '-12': BigInteger; + '-11': BigInteger; + '-10': BigInteger; + '-9': BigInteger; + '-8': BigInteger; + '-7': BigInteger; + '-6': BigInteger; + '-5': BigInteger; + '-4': BigInteger; + '-3': BigInteger; + '-2': BigInteger; + '-1': BigInteger; + '0': BigInteger; + '1': BigInteger; + '2': BigInteger; + '3': BigInteger; + '4': BigInteger; + '5': BigInteger; + '6': BigInteger; + '7': BigInteger; + '8': BigInteger; + '9': BigInteger; + '10': BigInteger; + '11': BigInteger; + '12': BigInteger; + '13': BigInteger; + '14': BigInteger; + '15': BigInteger; + '16': BigInteger; + '17': BigInteger; + '18': BigInteger; + '19': BigInteger; + '20': BigInteger; + '21': BigInteger; + '22': BigInteger; + '23': BigInteger; + '24': BigInteger; + '25': BigInteger; + '26': BigInteger; + '27': BigInteger; + '28': BigInteger; + '29': BigInteger; + '30': BigInteger; + '31': BigInteger; + '32': BigInteger; + '33': BigInteger; + '34': BigInteger; + '35': BigInteger; + '36': BigInteger; + '37': BigInteger; + '38': BigInteger; + '39': BigInteger; + '40': BigInteger; + '41': BigInteger; + '42': BigInteger; + '43': BigInteger; + '44': BigInteger; + '45': BigInteger; + '46': BigInteger; + '47': BigInteger; + '48': BigInteger; + '49': BigInteger; + '50': BigInteger; + '51': BigInteger; + '52': BigInteger; + '53': BigInteger; + '54': BigInteger; + '55': BigInteger; + '56': BigInteger; + '57': BigInteger; + '58': BigInteger; + '59': BigInteger; + '60': BigInteger; + '61': BigInteger; + '62': BigInteger; + '63': BigInteger; + '64': BigInteger; + '65': BigInteger; + '66': BigInteger; + '67': BigInteger; + '68': BigInteger; + '69': BigInteger; + '70': BigInteger; + '71': BigInteger; + '72': BigInteger; + '73': BigInteger; + '74': BigInteger; + '75': BigInteger; + '76': BigInteger; + '77': BigInteger; + '78': BigInteger; + '79': BigInteger; + '80': BigInteger; + '81': BigInteger; + '82': BigInteger; + '83': BigInteger; + '84': BigInteger; + '85': BigInteger; + '86': BigInteger; + '87': BigInteger; + '88': BigInteger; + '89': BigInteger; + '90': BigInteger; + '91': BigInteger; + '92': BigInteger; + '93': BigInteger; + '94': BigInteger; + '95': BigInteger; + '96': BigInteger; + '97': BigInteger; + '98': BigInteger; + '99': BigInteger; + '100': BigInteger; + '101': BigInteger; + '102': BigInteger; + '103': BigInteger; + '104': BigInteger; + '105': BigInteger; + '106': BigInteger; + '107': BigInteger; + '108': BigInteger; + '109': BigInteger; + '110': BigInteger; + '111': BigInteger; + '112': BigInteger; + '113': BigInteger; + '114': BigInteger; + '115': BigInteger; + '116': BigInteger; + '117': BigInteger; + '118': BigInteger; + '119': BigInteger; + '120': BigInteger; + '121': BigInteger; + '122': BigInteger; + '123': BigInteger; + '124': BigInteger; + '125': BigInteger; + '126': BigInteger; + '127': BigInteger; + '128': BigInteger; + '129': BigInteger; + '130': BigInteger; + '131': BigInteger; + '132': BigInteger; + '133': BigInteger; + '134': BigInteger; + '135': BigInteger; + '136': BigInteger; + '137': BigInteger; + '138': BigInteger; + '139': BigInteger; + '140': BigInteger; + '141': BigInteger; + '142': BigInteger; + '143': BigInteger; + '144': BigInteger; + '145': BigInteger; + '146': BigInteger; + '147': BigInteger; + '148': BigInteger; + '149': BigInteger; + '150': BigInteger; + '151': BigInteger; + '152': BigInteger; + '153': BigInteger; + '154': BigInteger; + '155': BigInteger; + '156': BigInteger; + '157': BigInteger; + '158': BigInteger; + '159': BigInteger; + '160': BigInteger; + '161': BigInteger; + '162': BigInteger; + '163': BigInteger; + '164': BigInteger; + '165': BigInteger; + '166': BigInteger; + '167': BigInteger; + '168': BigInteger; + '169': BigInteger; + '170': BigInteger; + '171': BigInteger; + '172': BigInteger; + '173': BigInteger; + '174': BigInteger; + '175': BigInteger; + '176': BigInteger; + '177': BigInteger; + '178': BigInteger; + '179': BigInteger; + '180': BigInteger; + '181': BigInteger; + '182': BigInteger; + '183': BigInteger; + '184': BigInteger; + '185': BigInteger; + '186': BigInteger; + '187': BigInteger; + '188': BigInteger; + '189': BigInteger; + '190': BigInteger; + '191': BigInteger; + '192': BigInteger; + '193': BigInteger; + '194': BigInteger; + '195': BigInteger; + '196': BigInteger; + '197': BigInteger; + '198': BigInteger; + '199': BigInteger; + '200': BigInteger; + '201': BigInteger; + '202': BigInteger; + '203': BigInteger; + '204': BigInteger; + '205': BigInteger; + '206': BigInteger; + '207': BigInteger; + '208': BigInteger; + '209': BigInteger; + '210': BigInteger; + '211': BigInteger; + '212': BigInteger; + '213': BigInteger; + '214': BigInteger; + '215': BigInteger; + '216': BigInteger; + '217': BigInteger; + '218': BigInteger; + '219': BigInteger; + '220': BigInteger; + '221': BigInteger; + '222': BigInteger; + '223': BigInteger; + '224': BigInteger; + '225': BigInteger; + '226': BigInteger; + '227': BigInteger; + '228': BigInteger; + '229': BigInteger; + '230': BigInteger; + '231': BigInteger; + '232': BigInteger; + '233': BigInteger; + '234': BigInteger; + '235': BigInteger; + '236': BigInteger; + '237': BigInteger; + '238': BigInteger; + '239': BigInteger; + '240': BigInteger; + '241': BigInteger; + '242': BigInteger; + '243': BigInteger; + '244': BigInteger; + '245': BigInteger; + '246': BigInteger; + '247': BigInteger; + '248': BigInteger; + '249': BigInteger; + '250': BigInteger; + '251': BigInteger; + '252': BigInteger; + '253': BigInteger; + '254': BigInteger; + '255': BigInteger; + '256': BigInteger; + '257': BigInteger; + '258': BigInteger; + '259': BigInteger; + '260': BigInteger; + '261': BigInteger; + '262': BigInteger; + '263': BigInteger; + '264': BigInteger; + '265': BigInteger; + '266': BigInteger; + '267': BigInteger; + '268': BigInteger; + '269': BigInteger; + '270': BigInteger; + '271': BigInteger; + '272': BigInteger; + '273': BigInteger; + '274': BigInteger; + '275': BigInteger; + '276': BigInteger; + '277': BigInteger; + '278': BigInteger; + '279': BigInteger; + '280': BigInteger; + '281': BigInteger; + '282': BigInteger; + '283': BigInteger; + '284': BigInteger; + '285': BigInteger; + '286': BigInteger; + '287': BigInteger; + '288': BigInteger; + '289': BigInteger; + '290': BigInteger; + '291': BigInteger; + '292': BigInteger; + '293': BigInteger; + '294': BigInteger; + '295': BigInteger; + '296': BigInteger; + '297': BigInteger; + '298': BigInteger; + '299': BigInteger; + '300': BigInteger; + '301': BigInteger; + '302': BigInteger; + '303': BigInteger; + '304': BigInteger; + '305': BigInteger; + '306': BigInteger; + '307': BigInteger; + '308': BigInteger; + '309': BigInteger; + '310': BigInteger; + '311': BigInteger; + '312': BigInteger; + '313': BigInteger; + '314': BigInteger; + '315': BigInteger; + '316': BigInteger; + '317': BigInteger; + '318': BigInteger; + '319': BigInteger; + '320': BigInteger; + '321': BigInteger; + '322': BigInteger; + '323': BigInteger; + '324': BigInteger; + '325': BigInteger; + '326': BigInteger; + '327': BigInteger; + '328': BigInteger; + '329': BigInteger; + '330': BigInteger; + '331': BigInteger; + '332': BigInteger; + '333': BigInteger; + '334': BigInteger; + '335': BigInteger; + '336': BigInteger; + '337': BigInteger; + '338': BigInteger; + '339': BigInteger; + '340': BigInteger; + '341': BigInteger; + '342': BigInteger; + '343': BigInteger; + '344': BigInteger; + '345': BigInteger; + '346': BigInteger; + '347': BigInteger; + '348': BigInteger; + '349': BigInteger; + '350': BigInteger; + '351': BigInteger; + '352': BigInteger; + '353': BigInteger; + '354': BigInteger; + '355': BigInteger; + '356': BigInteger; + '357': BigInteger; + '358': BigInteger; + '359': BigInteger; + '360': BigInteger; + '361': BigInteger; + '362': BigInteger; + '363': BigInteger; + '364': BigInteger; + '365': BigInteger; + '366': BigInteger; + '367': BigInteger; + '368': BigInteger; + '369': BigInteger; + '370': BigInteger; + '371': BigInteger; + '372': BigInteger; + '373': BigInteger; + '374': BigInteger; + '375': BigInteger; + '376': BigInteger; + '377': BigInteger; + '378': BigInteger; + '379': BigInteger; + '380': BigInteger; + '381': BigInteger; + '382': BigInteger; + '383': BigInteger; + '384': BigInteger; + '385': BigInteger; + '386': BigInteger; + '387': BigInteger; + '388': BigInteger; + '389': BigInteger; + '390': BigInteger; + '391': BigInteger; + '392': BigInteger; + '393': BigInteger; + '394': BigInteger; + '395': BigInteger; + '396': BigInteger; + '397': BigInteger; + '398': BigInteger; + '399': BigInteger; + '400': BigInteger; + '401': BigInteger; + '402': BigInteger; + '403': BigInteger; + '404': BigInteger; + '405': BigInteger; + '406': BigInteger; + '407': BigInteger; + '408': BigInteger; + '409': BigInteger; + '410': BigInteger; + '411': BigInteger; + '412': BigInteger; + '413': BigInteger; + '414': BigInteger; + '415': BigInteger; + '416': BigInteger; + '417': BigInteger; + '418': BigInteger; + '419': BigInteger; + '420': BigInteger; + '421': BigInteger; + '422': BigInteger; + '423': BigInteger; + '424': BigInteger; + '425': BigInteger; + '426': BigInteger; + '427': BigInteger; + '428': BigInteger; + '429': BigInteger; + '430': BigInteger; + '431': BigInteger; + '432': BigInteger; + '433': BigInteger; + '434': BigInteger; + '435': BigInteger; + '436': BigInteger; + '437': BigInteger; + '438': BigInteger; + '439': BigInteger; + '440': BigInteger; + '441': BigInteger; + '442': BigInteger; + '443': BigInteger; + '444': BigInteger; + '445': BigInteger; + '446': BigInteger; + '447': BigInteger; + '448': BigInteger; + '449': BigInteger; + '450': BigInteger; + '451': BigInteger; + '452': BigInteger; + '453': BigInteger; + '454': BigInteger; + '455': BigInteger; + '456': BigInteger; + '457': BigInteger; + '458': BigInteger; + '459': BigInteger; + '460': BigInteger; + '461': BigInteger; + '462': BigInteger; + '463': BigInteger; + '464': BigInteger; + '465': BigInteger; + '466': BigInteger; + '467': BigInteger; + '468': BigInteger; + '469': BigInteger; + '470': BigInteger; + '471': BigInteger; + '472': BigInteger; + '473': BigInteger; + '474': BigInteger; + '475': BigInteger; + '476': BigInteger; + '477': BigInteger; + '478': BigInteger; + '479': BigInteger; + '480': BigInteger; + '481': BigInteger; + '482': BigInteger; + '483': BigInteger; + '484': BigInteger; + '485': BigInteger; + '486': BigInteger; + '487': BigInteger; + '488': BigInteger; + '489': BigInteger; + '490': BigInteger; + '491': BigInteger; + '492': BigInteger; + '493': BigInteger; + '494': BigInteger; + '495': BigInteger; + '496': BigInteger; + '497': BigInteger; + '498': BigInteger; + '499': BigInteger; + '500': BigInteger; + '501': BigInteger; + '502': BigInteger; + '503': BigInteger; + '504': BigInteger; + '505': BigInteger; + '506': BigInteger; + '507': BigInteger; + '508': BigInteger; + '509': BigInteger; + '510': BigInteger; + '511': BigInteger; + '512': BigInteger; + '513': BigInteger; + '514': BigInteger; + '515': BigInteger; + '516': BigInteger; + '517': BigInteger; + '518': BigInteger; + '519': BigInteger; + '520': BigInteger; + '521': BigInteger; + '522': BigInteger; + '523': BigInteger; + '524': BigInteger; + '525': BigInteger; + '526': BigInteger; + '527': BigInteger; + '528': BigInteger; + '529': BigInteger; + '530': BigInteger; + '531': BigInteger; + '532': BigInteger; + '533': BigInteger; + '534': BigInteger; + '535': BigInteger; + '536': BigInteger; + '537': BigInteger; + '538': BigInteger; + '539': BigInteger; + '540': BigInteger; + '541': BigInteger; + '542': BigInteger; + '543': BigInteger; + '544': BigInteger; + '545': BigInteger; + '546': BigInteger; + '547': BigInteger; + '548': BigInteger; + '549': BigInteger; + '550': BigInteger; + '551': BigInteger; + '552': BigInteger; + '553': BigInteger; + '554': BigInteger; + '555': BigInteger; + '556': BigInteger; + '557': BigInteger; + '558': BigInteger; + '559': BigInteger; + '560': BigInteger; + '561': BigInteger; + '562': BigInteger; + '563': BigInteger; + '564': BigInteger; + '565': BigInteger; + '566': BigInteger; + '567': BigInteger; + '568': BigInteger; + '569': BigInteger; + '570': BigInteger; + '571': BigInteger; + '572': BigInteger; + '573': BigInteger; + '574': BigInteger; + '575': BigInteger; + '576': BigInteger; + '577': BigInteger; + '578': BigInteger; + '579': BigInteger; + '580': BigInteger; + '581': BigInteger; + '582': BigInteger; + '583': BigInteger; + '584': BigInteger; + '585': BigInteger; + '586': BigInteger; + '587': BigInteger; + '588': BigInteger; + '589': BigInteger; + '590': BigInteger; + '591': BigInteger; + '592': BigInteger; + '593': BigInteger; + '594': BigInteger; + '595': BigInteger; + '596': BigInteger; + '597': BigInteger; + '598': BigInteger; + '599': BigInteger; + '600': BigInteger; + '601': BigInteger; + '602': BigInteger; + '603': BigInteger; + '604': BigInteger; + '605': BigInteger; + '606': BigInteger; + '607': BigInteger; + '608': BigInteger; + '609': BigInteger; + '610': BigInteger; + '611': BigInteger; + '612': BigInteger; + '613': BigInteger; + '614': BigInteger; + '615': BigInteger; + '616': BigInteger; + '617': BigInteger; + '618': BigInteger; + '619': BigInteger; + '620': BigInteger; + '621': BigInteger; + '622': BigInteger; + '623': BigInteger; + '624': BigInteger; + '625': BigInteger; + '626': BigInteger; + '627': BigInteger; + '628': BigInteger; + '629': BigInteger; + '630': BigInteger; + '631': BigInteger; + '632': BigInteger; + '633': BigInteger; + '634': BigInteger; + '635': BigInteger; + '636': BigInteger; + '637': BigInteger; + '638': BigInteger; + '639': BigInteger; + '640': BigInteger; + '641': BigInteger; + '642': BigInteger; + '643': BigInteger; + '644': BigInteger; + '645': BigInteger; + '646': BigInteger; + '647': BigInteger; + '648': BigInteger; + '649': BigInteger; + '650': BigInteger; + '651': BigInteger; + '652': BigInteger; + '653': BigInteger; + '654': BigInteger; + '655': BigInteger; + '656': BigInteger; + '657': BigInteger; + '658': BigInteger; + '659': BigInteger; + '660': BigInteger; + '661': BigInteger; + '662': BigInteger; + '663': BigInteger; + '664': BigInteger; + '665': BigInteger; + '666': BigInteger; + '667': BigInteger; + '668': BigInteger; + '669': BigInteger; + '670': BigInteger; + '671': BigInteger; + '672': BigInteger; + '673': BigInteger; + '674': BigInteger; + '675': BigInteger; + '676': BigInteger; + '677': BigInteger; + '678': BigInteger; + '679': BigInteger; + '680': BigInteger; + '681': BigInteger; + '682': BigInteger; + '683': BigInteger; + '684': BigInteger; + '685': BigInteger; + '686': BigInteger; + '687': BigInteger; + '688': BigInteger; + '689': BigInteger; + '690': BigInteger; + '691': BigInteger; + '692': BigInteger; + '693': BigInteger; + '694': BigInteger; + '695': BigInteger; + '696': BigInteger; + '697': BigInteger; + '698': BigInteger; + '699': BigInteger; + '700': BigInteger; + '701': BigInteger; + '702': BigInteger; + '703': BigInteger; + '704': BigInteger; + '705': BigInteger; + '706': BigInteger; + '707': BigInteger; + '708': BigInteger; + '709': BigInteger; + '710': BigInteger; + '711': BigInteger; + '712': BigInteger; + '713': BigInteger; + '714': BigInteger; + '715': BigInteger; + '716': BigInteger; + '717': BigInteger; + '718': BigInteger; + '719': BigInteger; + '720': BigInteger; + '721': BigInteger; + '722': BigInteger; + '723': BigInteger; + '724': BigInteger; + '725': BigInteger; + '726': BigInteger; + '727': BigInteger; + '728': BigInteger; + '729': BigInteger; + '730': BigInteger; + '731': BigInteger; + '732': BigInteger; + '733': BigInteger; + '734': BigInteger; + '735': BigInteger; + '736': BigInteger; + '737': BigInteger; + '738': BigInteger; + '739': BigInteger; + '740': BigInteger; + '741': BigInteger; + '742': BigInteger; + '743': BigInteger; + '744': BigInteger; + '745': BigInteger; + '746': BigInteger; + '747': BigInteger; + '748': BigInteger; + '749': BigInteger; + '750': BigInteger; + '751': BigInteger; + '752': BigInteger; + '753': BigInteger; + '754': BigInteger; + '755': BigInteger; + '756': BigInteger; + '757': BigInteger; + '758': BigInteger; + '759': BigInteger; + '760': BigInteger; + '761': BigInteger; + '762': BigInteger; + '763': BigInteger; + '764': BigInteger; + '765': BigInteger; + '766': BigInteger; + '767': BigInteger; + '768': BigInteger; + '769': BigInteger; + '770': BigInteger; + '771': BigInteger; + '772': BigInteger; + '773': BigInteger; + '774': BigInteger; + '775': BigInteger; + '776': BigInteger; + '777': BigInteger; + '778': BigInteger; + '779': BigInteger; + '780': BigInteger; + '781': BigInteger; + '782': BigInteger; + '783': BigInteger; + '784': BigInteger; + '785': BigInteger; + '786': BigInteger; + '787': BigInteger; + '788': BigInteger; + '789': BigInteger; + '790': BigInteger; + '791': BigInteger; + '792': BigInteger; + '793': BigInteger; + '794': BigInteger; + '795': BigInteger; + '796': BigInteger; + '797': BigInteger; + '798': BigInteger; + '799': BigInteger; + '800': BigInteger; + '801': BigInteger; + '802': BigInteger; + '803': BigInteger; + '804': BigInteger; + '805': BigInteger; + '806': BigInteger; + '807': BigInteger; + '808': BigInteger; + '809': BigInteger; + '810': BigInteger; + '811': BigInteger; + '812': BigInteger; + '813': BigInteger; + '814': BigInteger; + '815': BigInteger; + '816': BigInteger; + '817': BigInteger; + '818': BigInteger; + '819': BigInteger; + '820': BigInteger; + '821': BigInteger; + '822': BigInteger; + '823': BigInteger; + '824': BigInteger; + '825': BigInteger; + '826': BigInteger; + '827': BigInteger; + '828': BigInteger; + '829': BigInteger; + '830': BigInteger; + '831': BigInteger; + '832': BigInteger; + '833': BigInteger; + '834': BigInteger; + '835': BigInteger; + '836': BigInteger; + '837': BigInteger; + '838': BigInteger; + '839': BigInteger; + '840': BigInteger; + '841': BigInteger; + '842': BigInteger; + '843': BigInteger; + '844': BigInteger; + '845': BigInteger; + '846': BigInteger; + '847': BigInteger; + '848': BigInteger; + '849': BigInteger; + '850': BigInteger; + '851': BigInteger; + '852': BigInteger; + '853': BigInteger; + '854': BigInteger; + '855': BigInteger; + '856': BigInteger; + '857': BigInteger; + '858': BigInteger; + '859': BigInteger; + '860': BigInteger; + '861': BigInteger; + '862': BigInteger; + '863': BigInteger; + '864': BigInteger; + '865': BigInteger; + '866': BigInteger; + '867': BigInteger; + '868': BigInteger; + '869': BigInteger; + '870': BigInteger; + '871': BigInteger; + '872': BigInteger; + '873': BigInteger; + '874': BigInteger; + '875': BigInteger; + '876': BigInteger; + '877': BigInteger; + '878': BigInteger; + '879': BigInteger; + '880': BigInteger; + '881': BigInteger; + '882': BigInteger; + '883': BigInteger; + '884': BigInteger; + '885': BigInteger; + '886': BigInteger; + '887': BigInteger; + '888': BigInteger; + '889': BigInteger; + '890': BigInteger; + '891': BigInteger; + '892': BigInteger; + '893': BigInteger; + '894': BigInteger; + '895': BigInteger; + '896': BigInteger; + '897': BigInteger; + '898': BigInteger; + '899': BigInteger; + '900': BigInteger; + '901': BigInteger; + '902': BigInteger; + '903': BigInteger; + '904': BigInteger; + '905': BigInteger; + '906': BigInteger; + '907': BigInteger; + '908': BigInteger; + '909': BigInteger; + '910': BigInteger; + '911': BigInteger; + '912': BigInteger; + '913': BigInteger; + '914': BigInteger; + '915': BigInteger; + '916': BigInteger; + '917': BigInteger; + '918': BigInteger; + '919': BigInteger; + '920': BigInteger; + '921': BigInteger; + '922': BigInteger; + '923': BigInteger; + '924': BigInteger; + '925': BigInteger; + '926': BigInteger; + '927': BigInteger; + '928': BigInteger; + '929': BigInteger; + '930': BigInteger; + '931': BigInteger; + '932': BigInteger; + '933': BigInteger; + '934': BigInteger; + '935': BigInteger; + '936': BigInteger; + '937': BigInteger; + '938': BigInteger; + '939': BigInteger; + '940': BigInteger; + '941': BigInteger; + '942': BigInteger; + '943': BigInteger; + '944': BigInteger; + '945': BigInteger; + '946': BigInteger; + '947': BigInteger; + '948': BigInteger; + '949': BigInteger; + '950': BigInteger; + '951': BigInteger; + '952': BigInteger; + '953': BigInteger; + '954': BigInteger; + '955': BigInteger; + '956': BigInteger; + '957': BigInteger; + '958': BigInteger; + '959': BigInteger; + '960': BigInteger; + '961': BigInteger; + '962': BigInteger; + '963': BigInteger; + '964': BigInteger; + '965': BigInteger; + '966': BigInteger; + '967': BigInteger; + '968': BigInteger; + '969': BigInteger; + '970': BigInteger; + '971': BigInteger; + '972': BigInteger; + '973': BigInteger; + '974': BigInteger; + '975': BigInteger; + '976': BigInteger; + '977': BigInteger; + '978': BigInteger; + '979': BigInteger; + '980': BigInteger; + '981': BigInteger; + '982': BigInteger; + '983': BigInteger; + '984': BigInteger; + '985': BigInteger; + '986': BigInteger; + '987': BigInteger; + '988': BigInteger; + '989': BigInteger; + '990': BigInteger; + '991': BigInteger; + '992': BigInteger; + '993': BigInteger; + '994': BigInteger; + '995': BigInteger; + '996': BigInteger; + '997': BigInteger; + '998': BigInteger; + '999': BigInteger; + } + + interface BaseArray { + value: number[], + isNegative: boolean + } +} diff --git a/node_modules/big-integer/BigInteger.js b/node_modules/big-integer/BigInteger.js new file mode 100644 index 0000000..87e43df --- /dev/null +++ b/node_modules/big-integer/BigInteger.js @@ -0,0 +1,1453 @@ +var bigInt = (function (undefined) { + "use strict"; + + var BASE = 1e7, + LOG_BASE = 7, + MAX_INT = 9007199254740992, + MAX_INT_ARR = smallToArray(MAX_INT), + DEFAULT_ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz"; + + var supportsNativeBigInt = typeof BigInt === "function"; + + function Integer(v, radix, alphabet, caseSensitive) { + if (typeof v === "undefined") return Integer[0]; + if (typeof radix !== "undefined") return +radix === 10 && !alphabet ? parseValue(v) : parseBase(v, radix, alphabet, caseSensitive); + return parseValue(v); + } + + function BigInteger(value, sign) { + this.value = value; + this.sign = sign; + this.isSmall = false; + } + BigInteger.prototype = Object.create(Integer.prototype); + + function SmallInteger(value) { + this.value = value; + this.sign = value < 0; + this.isSmall = true; + } + SmallInteger.prototype = Object.create(Integer.prototype); + + function NativeBigInt(value) { + this.value = value; + } + NativeBigInt.prototype = Object.create(Integer.prototype); + + function isPrecise(n) { + return -MAX_INT < n && n < MAX_INT; + } + + function smallToArray(n) { // For performance reasons doesn't reference BASE, need to change this function if BASE changes + if (n < 1e7) + return [n]; + if (n < 1e14) + return [n % 1e7, Math.floor(n / 1e7)]; + return [n % 1e7, Math.floor(n / 1e7) % 1e7, Math.floor(n / 1e14)]; + } + + function arrayToSmall(arr) { // If BASE changes this function may need to change + trim(arr); + var length = arr.length; + if (length < 4 && compareAbs(arr, MAX_INT_ARR) < 0) { + switch (length) { + case 0: return 0; + case 1: return arr[0]; + case 2: return arr[0] + arr[1] * BASE; + default: return arr[0] + (arr[1] + arr[2] * BASE) * BASE; + } + } + return arr; + } + + function trim(v) { + var i = v.length; + while (v[--i] === 0); + v.length = i + 1; + } + + function createArray(length) { // function shamelessly stolen from Yaffle's library https://github.com/Yaffle/BigInteger + var x = new Array(length); + var i = -1; + while (++i < length) { + x[i] = 0; + } + return x; + } + + function truncate(n) { + if (n > 0) return Math.floor(n); + return Math.ceil(n); + } + + function add(a, b) { // assumes a and b are arrays with a.length >= b.length + var l_a = a.length, + l_b = b.length, + r = new Array(l_a), + carry = 0, + base = BASE, + sum, i; + for (i = 0; i < l_b; i++) { + sum = a[i] + b[i] + carry; + carry = sum >= base ? 1 : 0; + r[i] = sum - carry * base; + } + while (i < l_a) { + sum = a[i] + carry; + carry = sum === base ? 1 : 0; + r[i++] = sum - carry * base; + } + if (carry > 0) r.push(carry); + return r; + } + + function addAny(a, b) { + if (a.length >= b.length) return add(a, b); + return add(b, a); + } + + function addSmall(a, carry) { // assumes a is array, carry is number with 0 <= carry < MAX_INT + var l = a.length, + r = new Array(l), + base = BASE, + sum, i; + for (i = 0; i < l; i++) { + sum = a[i] - base + carry; + carry = Math.floor(sum / base); + r[i] = sum - carry * base; + carry += 1; + } + while (carry > 0) { + r[i++] = carry % base; + carry = Math.floor(carry / base); + } + return r; + } + + BigInteger.prototype.add = function (v) { + var n = parseValue(v); + if (this.sign !== n.sign) { + return this.subtract(n.negate()); + } + var a = this.value, b = n.value; + if (n.isSmall) { + return new BigInteger(addSmall(a, Math.abs(b)), this.sign); + } + return new BigInteger(addAny(a, b), this.sign); + }; + BigInteger.prototype.plus = BigInteger.prototype.add; + + SmallInteger.prototype.add = function (v) { + var n = parseValue(v); + var a = this.value; + if (a < 0 !== n.sign) { + return this.subtract(n.negate()); + } + var b = n.value; + if (n.isSmall) { + if (isPrecise(a + b)) return new SmallInteger(a + b); + b = smallToArray(Math.abs(b)); + } + return new BigInteger(addSmall(b, Math.abs(a)), a < 0); + }; + SmallInteger.prototype.plus = SmallInteger.prototype.add; + + NativeBigInt.prototype.add = function (v) { + return new NativeBigInt(this.value + parseValue(v).value); + } + NativeBigInt.prototype.plus = NativeBigInt.prototype.add; + + function subtract(a, b) { // assumes a and b are arrays with a >= b + var a_l = a.length, + b_l = b.length, + r = new Array(a_l), + borrow = 0, + base = BASE, + i, difference; + for (i = 0; i < b_l; i++) { + difference = a[i] - borrow - b[i]; + if (difference < 0) { + difference += base; + borrow = 1; + } else borrow = 0; + r[i] = difference; + } + for (i = b_l; i < a_l; i++) { + difference = a[i] - borrow; + if (difference < 0) difference += base; + else { + r[i++] = difference; + break; + } + r[i] = difference; + } + for (; i < a_l; i++) { + r[i] = a[i]; + } + trim(r); + return r; + } + + function subtractAny(a, b, sign) { + var value; + if (compareAbs(a, b) >= 0) { + value = subtract(a, b); + } else { + value = subtract(b, a); + sign = !sign; + } + value = arrayToSmall(value); + if (typeof value === "number") { + if (sign) value = -value; + return new SmallInteger(value); + } + return new BigInteger(value, sign); + } + + function subtractSmall(a, b, sign) { // assumes a is array, b is number with 0 <= b < MAX_INT + var l = a.length, + r = new Array(l), + carry = -b, + base = BASE, + i, difference; + for (i = 0; i < l; i++) { + difference = a[i] + carry; + carry = Math.floor(difference / base); + difference %= base; + r[i] = difference < 0 ? difference + base : difference; + } + r = arrayToSmall(r); + if (typeof r === "number") { + if (sign) r = -r; + return new SmallInteger(r); + } return new BigInteger(r, sign); + } + + BigInteger.prototype.subtract = function (v) { + var n = parseValue(v); + if (this.sign !== n.sign) { + return this.add(n.negate()); + } + var a = this.value, b = n.value; + if (n.isSmall) + return subtractSmall(a, Math.abs(b), this.sign); + return subtractAny(a, b, this.sign); + }; + BigInteger.prototype.minus = BigInteger.prototype.subtract; + + SmallInteger.prototype.subtract = function (v) { + var n = parseValue(v); + var a = this.value; + if (a < 0 !== n.sign) { + return this.add(n.negate()); + } + var b = n.value; + if (n.isSmall) { + return new SmallInteger(a - b); + } + return subtractSmall(b, Math.abs(a), a >= 0); + }; + SmallInteger.prototype.minus = SmallInteger.prototype.subtract; + + NativeBigInt.prototype.subtract = function (v) { + return new NativeBigInt(this.value - parseValue(v).value); + } + NativeBigInt.prototype.minus = NativeBigInt.prototype.subtract; + + BigInteger.prototype.negate = function () { + return new BigInteger(this.value, !this.sign); + }; + SmallInteger.prototype.negate = function () { + var sign = this.sign; + var small = new SmallInteger(-this.value); + small.sign = !sign; + return small; + }; + NativeBigInt.prototype.negate = function () { + return new NativeBigInt(-this.value); + } + + BigInteger.prototype.abs = function () { + return new BigInteger(this.value, false); + }; + SmallInteger.prototype.abs = function () { + return new SmallInteger(Math.abs(this.value)); + }; + NativeBigInt.prototype.abs = function () { + return new NativeBigInt(this.value >= 0 ? this.value : -this.value); + } + + + function multiplyLong(a, b) { + var a_l = a.length, + b_l = b.length, + l = a_l + b_l, + r = createArray(l), + base = BASE, + product, carry, i, a_i, b_j; + for (i = 0; i < a_l; ++i) { + a_i = a[i]; + for (var j = 0; j < b_l; ++j) { + b_j = b[j]; + product = a_i * b_j + r[i + j]; + carry = Math.floor(product / base); + r[i + j] = product - carry * base; + r[i + j + 1] += carry; + } + } + trim(r); + return r; + } + + function multiplySmall(a, b) { // assumes a is array, b is number with |b| < BASE + var l = a.length, + r = new Array(l), + base = BASE, + carry = 0, + product, i; + for (i = 0; i < l; i++) { + product = a[i] * b + carry; + carry = Math.floor(product / base); + r[i] = product - carry * base; + } + while (carry > 0) { + r[i++] = carry % base; + carry = Math.floor(carry / base); + } + return r; + } + + function shiftLeft(x, n) { + var r = []; + while (n-- > 0) r.push(0); + return r.concat(x); + } + + function multiplyKaratsuba(x, y) { + var n = Math.max(x.length, y.length); + + if (n <= 30) return multiplyLong(x, y); + n = Math.ceil(n / 2); + + var b = x.slice(n), + a = x.slice(0, n), + d = y.slice(n), + c = y.slice(0, n); + + var ac = multiplyKaratsuba(a, c), + bd = multiplyKaratsuba(b, d), + abcd = multiplyKaratsuba(addAny(a, b), addAny(c, d)); + + var product = addAny(addAny(ac, shiftLeft(subtract(subtract(abcd, ac), bd), n)), shiftLeft(bd, 2 * n)); + trim(product); + return product; + } + + // The following function is derived from a surface fit of a graph plotting the performance difference + // between long multiplication and karatsuba multiplication versus the lengths of the two arrays. + function useKaratsuba(l1, l2) { + return -0.012 * l1 - 0.012 * l2 + 0.000015 * l1 * l2 > 0; + } + + BigInteger.prototype.multiply = function (v) { + var n = parseValue(v), + a = this.value, b = n.value, + sign = this.sign !== n.sign, + abs; + if (n.isSmall) { + if (b === 0) return Integer[0]; + if (b === 1) return this; + if (b === -1) return this.negate(); + abs = Math.abs(b); + if (abs < BASE) { + return new BigInteger(multiplySmall(a, abs), sign); + } + b = smallToArray(abs); + } + if (useKaratsuba(a.length, b.length)) // Karatsuba is only faster for certain array sizes + return new BigInteger(multiplyKaratsuba(a, b), sign); + return new BigInteger(multiplyLong(a, b), sign); + }; + + BigInteger.prototype.times = BigInteger.prototype.multiply; + + function multiplySmallAndArray(a, b, sign) { // a >= 0 + if (a < BASE) { + return new BigInteger(multiplySmall(b, a), sign); + } + return new BigInteger(multiplyLong(b, smallToArray(a)), sign); + } + SmallInteger.prototype._multiplyBySmall = function (a) { + if (isPrecise(a.value * this.value)) { + return new SmallInteger(a.value * this.value); + } + return multiplySmallAndArray(Math.abs(a.value), smallToArray(Math.abs(this.value)), this.sign !== a.sign); + }; + BigInteger.prototype._multiplyBySmall = function (a) { + if (a.value === 0) return Integer[0]; + if (a.value === 1) return this; + if (a.value === -1) return this.negate(); + return multiplySmallAndArray(Math.abs(a.value), this.value, this.sign !== a.sign); + }; + SmallInteger.prototype.multiply = function (v) { + return parseValue(v)._multiplyBySmall(this); + }; + SmallInteger.prototype.times = SmallInteger.prototype.multiply; + + NativeBigInt.prototype.multiply = function (v) { + return new NativeBigInt(this.value * parseValue(v).value); + } + NativeBigInt.prototype.times = NativeBigInt.prototype.multiply; + + function square(a) { + //console.assert(2 * BASE * BASE < MAX_INT); + var l = a.length, + r = createArray(l + l), + base = BASE, + product, carry, i, a_i, a_j; + for (i = 0; i < l; i++) { + a_i = a[i]; + carry = 0 - a_i * a_i; + for (var j = i; j < l; j++) { + a_j = a[j]; + product = 2 * (a_i * a_j) + r[i + j] + carry; + carry = Math.floor(product / base); + r[i + j] = product - carry * base; + } + r[i + l] = carry; + } + trim(r); + return r; + } + + BigInteger.prototype.square = function () { + return new BigInteger(square(this.value), false); + }; + + SmallInteger.prototype.square = function () { + var value = this.value * this.value; + if (isPrecise(value)) return new SmallInteger(value); + return new BigInteger(square(smallToArray(Math.abs(this.value))), false); + }; + + NativeBigInt.prototype.square = function (v) { + return new NativeBigInt(this.value * this.value); + } + + function divMod1(a, b) { // Left over from previous version. Performs faster than divMod2 on smaller input sizes. + var a_l = a.length, + b_l = b.length, + base = BASE, + result = createArray(b.length), + divisorMostSignificantDigit = b[b_l - 1], + // normalization + lambda = Math.ceil(base / (2 * divisorMostSignificantDigit)), + remainder = multiplySmall(a, lambda), + divisor = multiplySmall(b, lambda), + quotientDigit, shift, carry, borrow, i, l, q; + if (remainder.length <= a_l) remainder.push(0); + divisor.push(0); + divisorMostSignificantDigit = divisor[b_l - 1]; + for (shift = a_l - b_l; shift >= 0; shift--) { + quotientDigit = base - 1; + if (remainder[shift + b_l] !== divisorMostSignificantDigit) { + quotientDigit = Math.floor((remainder[shift + b_l] * base + remainder[shift + b_l - 1]) / divisorMostSignificantDigit); + } + // quotientDigit <= base - 1 + carry = 0; + borrow = 0; + l = divisor.length; + for (i = 0; i < l; i++) { + carry += quotientDigit * divisor[i]; + q = Math.floor(carry / base); + borrow += remainder[shift + i] - (carry - q * base); + carry = q; + if (borrow < 0) { + remainder[shift + i] = borrow + base; + borrow = -1; + } else { + remainder[shift + i] = borrow; + borrow = 0; + } + } + while (borrow !== 0) { + quotientDigit -= 1; + carry = 0; + for (i = 0; i < l; i++) { + carry += remainder[shift + i] - base + divisor[i]; + if (carry < 0) { + remainder[shift + i] = carry + base; + carry = 0; + } else { + remainder[shift + i] = carry; + carry = 1; + } + } + borrow += carry; + } + result[shift] = quotientDigit; + } + // denormalization + remainder = divModSmall(remainder, lambda)[0]; + return [arrayToSmall(result), arrayToSmall(remainder)]; + } + + function divMod2(a, b) { // Implementation idea shamelessly stolen from Silent Matt's library http://silentmatt.com/biginteger/ + // Performs faster than divMod1 on larger input sizes. + var a_l = a.length, + b_l = b.length, + result = [], + part = [], + base = BASE, + guess, xlen, highx, highy, check; + while (a_l) { + part.unshift(a[--a_l]); + trim(part); + if (compareAbs(part, b) < 0) { + result.push(0); + continue; + } + xlen = part.length; + highx = part[xlen - 1] * base + part[xlen - 2]; + highy = b[b_l - 1] * base + b[b_l - 2]; + if (xlen > b_l) { + highx = (highx + 1) * base; + } + guess = Math.ceil(highx / highy); + do { + check = multiplySmall(b, guess); + if (compareAbs(check, part) <= 0) break; + guess--; + } while (guess); + result.push(guess); + part = subtract(part, check); + } + result.reverse(); + return [arrayToSmall(result), arrayToSmall(part)]; + } + + function divModSmall(value, lambda) { + var length = value.length, + quotient = createArray(length), + base = BASE, + i, q, remainder, divisor; + remainder = 0; + for (i = length - 1; i >= 0; --i) { + divisor = remainder * base + value[i]; + q = truncate(divisor / lambda); + remainder = divisor - q * lambda; + quotient[i] = q | 0; + } + return [quotient, remainder | 0]; + } + + function divModAny(self, v) { + var value, n = parseValue(v); + if (supportsNativeBigInt) { + return [new NativeBigInt(self.value / n.value), new NativeBigInt(self.value % n.value)]; + } + var a = self.value, b = n.value; + var quotient; + if (b === 0) throw new Error("Cannot divide by zero"); + if (self.isSmall) { + if (n.isSmall) { + return [new SmallInteger(truncate(a / b)), new SmallInteger(a % b)]; + } + return [Integer[0], self]; + } + if (n.isSmall) { + if (b === 1) return [self, Integer[0]]; + if (b == -1) return [self.negate(), Integer[0]]; + var abs = Math.abs(b); + if (abs < BASE) { + value = divModSmall(a, abs); + quotient = arrayToSmall(value[0]); + var remainder = value[1]; + if (self.sign) remainder = -remainder; + if (typeof quotient === "number") { + if (self.sign !== n.sign) quotient = -quotient; + return [new SmallInteger(quotient), new SmallInteger(remainder)]; + } + return [new BigInteger(quotient, self.sign !== n.sign), new SmallInteger(remainder)]; + } + b = smallToArray(abs); + } + var comparison = compareAbs(a, b); + if (comparison === -1) return [Integer[0], self]; + if (comparison === 0) return [Integer[self.sign === n.sign ? 1 : -1], Integer[0]]; + + // divMod1 is faster on smaller input sizes + if (a.length + b.length <= 200) + value = divMod1(a, b); + else value = divMod2(a, b); + + quotient = value[0]; + var qSign = self.sign !== n.sign, + mod = value[1], + mSign = self.sign; + if (typeof quotient === "number") { + if (qSign) quotient = -quotient; + quotient = new SmallInteger(quotient); + } else quotient = new BigInteger(quotient, qSign); + if (typeof mod === "number") { + if (mSign) mod = -mod; + mod = new SmallInteger(mod); + } else mod = new BigInteger(mod, mSign); + return [quotient, mod]; + } + + BigInteger.prototype.divmod = function (v) { + var result = divModAny(this, v); + return { + quotient: result[0], + remainder: result[1] + }; + }; + NativeBigInt.prototype.divmod = SmallInteger.prototype.divmod = BigInteger.prototype.divmod; + + + BigInteger.prototype.divide = function (v) { + return divModAny(this, v)[0]; + }; + NativeBigInt.prototype.over = NativeBigInt.prototype.divide = function (v) { + return new NativeBigInt(this.value / parseValue(v).value); + }; + SmallInteger.prototype.over = SmallInteger.prototype.divide = BigInteger.prototype.over = BigInteger.prototype.divide; + + BigInteger.prototype.mod = function (v) { + return divModAny(this, v)[1]; + }; + NativeBigInt.prototype.mod = NativeBigInt.prototype.remainder = function (v) { + return new NativeBigInt(this.value % parseValue(v).value); + }; + SmallInteger.prototype.remainder = SmallInteger.prototype.mod = BigInteger.prototype.remainder = BigInteger.prototype.mod; + + BigInteger.prototype.pow = function (v) { + var n = parseValue(v), + a = this.value, + b = n.value, + value, x, y; + if (b === 0) return Integer[1]; + if (a === 0) return Integer[0]; + if (a === 1) return Integer[1]; + if (a === -1) return n.isEven() ? Integer[1] : Integer[-1]; + if (n.sign) { + return Integer[0]; + } + if (!n.isSmall) throw new Error("The exponent " + n.toString() + " is too large."); + if (this.isSmall) { + if (isPrecise(value = Math.pow(a, b))) + return new SmallInteger(truncate(value)); + } + x = this; + y = Integer[1]; + while (true) { + if (b & 1 === 1) { + y = y.times(x); + --b; + } + if (b === 0) break; + b /= 2; + x = x.square(); + } + return y; + }; + SmallInteger.prototype.pow = BigInteger.prototype.pow; + + NativeBigInt.prototype.pow = function (v) { + var n = parseValue(v); + var a = this.value, b = n.value; + var _0 = BigInt(0), _1 = BigInt(1), _2 = BigInt(2); + if (b === _0) return Integer[1]; + if (a === _0) return Integer[0]; + if (a === _1) return Integer[1]; + if (a === BigInt(-1)) return n.isEven() ? Integer[1] : Integer[-1]; + if (n.isNegative()) return new NativeBigInt(_0); + var x = this; + var y = Integer[1]; + while (true) { + if ((b & _1) === _1) { + y = y.times(x); + --b; + } + if (b === _0) break; + b /= _2; + x = x.square(); + } + return y; + } + + BigInteger.prototype.modPow = function (exp, mod) { + exp = parseValue(exp); + mod = parseValue(mod); + if (mod.isZero()) throw new Error("Cannot take modPow with modulus 0"); + var r = Integer[1], + base = this.mod(mod); + if (exp.isNegative()) { + exp = exp.multiply(Integer[-1]); + base = base.modInv(mod); + } + while (exp.isPositive()) { + if (base.isZero()) return Integer[0]; + if (exp.isOdd()) r = r.multiply(base).mod(mod); + exp = exp.divide(2); + base = base.square().mod(mod); + } + return r; + }; + NativeBigInt.prototype.modPow = SmallInteger.prototype.modPow = BigInteger.prototype.modPow; + + function compareAbs(a, b) { + if (a.length !== b.length) { + return a.length > b.length ? 1 : -1; + } + for (var i = a.length - 1; i >= 0; i--) { + if (a[i] !== b[i]) return a[i] > b[i] ? 1 : -1; + } + return 0; + } + + BigInteger.prototype.compareAbs = function (v) { + var n = parseValue(v), + a = this.value, + b = n.value; + if (n.isSmall) return 1; + return compareAbs(a, b); + }; + SmallInteger.prototype.compareAbs = function (v) { + var n = parseValue(v), + a = Math.abs(this.value), + b = n.value; + if (n.isSmall) { + b = Math.abs(b); + return a === b ? 0 : a > b ? 1 : -1; + } + return -1; + }; + NativeBigInt.prototype.compareAbs = function (v) { + var a = this.value; + var b = parseValue(v).value; + a = a >= 0 ? a : -a; + b = b >= 0 ? b : -b; + return a === b ? 0 : a > b ? 1 : -1; + } + + BigInteger.prototype.compare = function (v) { + // See discussion about comparison with Infinity: + // https://github.com/peterolson/BigInteger.js/issues/61 + if (v === Infinity) { + return -1; + } + if (v === -Infinity) { + return 1; + } + + var n = parseValue(v), + a = this.value, + b = n.value; + if (this.sign !== n.sign) { + return n.sign ? 1 : -1; + } + if (n.isSmall) { + return this.sign ? -1 : 1; + } + return compareAbs(a, b) * (this.sign ? -1 : 1); + }; + BigInteger.prototype.compareTo = BigInteger.prototype.compare; + + SmallInteger.prototype.compare = function (v) { + if (v === Infinity) { + return -1; + } + if (v === -Infinity) { + return 1; + } + + var n = parseValue(v), + a = this.value, + b = n.value; + if (n.isSmall) { + return a == b ? 0 : a > b ? 1 : -1; + } + if (a < 0 !== n.sign) { + return a < 0 ? -1 : 1; + } + return a < 0 ? 1 : -1; + }; + SmallInteger.prototype.compareTo = SmallInteger.prototype.compare; + + NativeBigInt.prototype.compare = function (v) { + if (v === Infinity) { + return -1; + } + if (v === -Infinity) { + return 1; + } + var a = this.value; + var b = parseValue(v).value; + return a === b ? 0 : a > b ? 1 : -1; + } + NativeBigInt.prototype.compareTo = NativeBigInt.prototype.compare; + + BigInteger.prototype.equals = function (v) { + return this.compare(v) === 0; + }; + NativeBigInt.prototype.eq = NativeBigInt.prototype.equals = SmallInteger.prototype.eq = SmallInteger.prototype.equals = BigInteger.prototype.eq = BigInteger.prototype.equals; + + BigInteger.prototype.notEquals = function (v) { + return this.compare(v) !== 0; + }; + NativeBigInt.prototype.neq = NativeBigInt.prototype.notEquals = SmallInteger.prototype.neq = SmallInteger.prototype.notEquals = BigInteger.prototype.neq = BigInteger.prototype.notEquals; + + BigInteger.prototype.greater = function (v) { + return this.compare(v) > 0; + }; + NativeBigInt.prototype.gt = NativeBigInt.prototype.greater = SmallInteger.prototype.gt = SmallInteger.prototype.greater = BigInteger.prototype.gt = BigInteger.prototype.greater; + + BigInteger.prototype.lesser = function (v) { + return this.compare(v) < 0; + }; + NativeBigInt.prototype.lt = NativeBigInt.prototype.lesser = SmallInteger.prototype.lt = SmallInteger.prototype.lesser = BigInteger.prototype.lt = BigInteger.prototype.lesser; + + BigInteger.prototype.greaterOrEquals = function (v) { + return this.compare(v) >= 0; + }; + NativeBigInt.prototype.geq = NativeBigInt.prototype.greaterOrEquals = SmallInteger.prototype.geq = SmallInteger.prototype.greaterOrEquals = BigInteger.prototype.geq = BigInteger.prototype.greaterOrEquals; + + BigInteger.prototype.lesserOrEquals = function (v) { + return this.compare(v) <= 0; + }; + NativeBigInt.prototype.leq = NativeBigInt.prototype.lesserOrEquals = SmallInteger.prototype.leq = SmallInteger.prototype.lesserOrEquals = BigInteger.prototype.leq = BigInteger.prototype.lesserOrEquals; + + BigInteger.prototype.isEven = function () { + return (this.value[0] & 1) === 0; + }; + SmallInteger.prototype.isEven = function () { + return (this.value & 1) === 0; + }; + NativeBigInt.prototype.isEven = function () { + return (this.value & BigInt(1)) === BigInt(0); + } + + BigInteger.prototype.isOdd = function () { + return (this.value[0] & 1) === 1; + }; + SmallInteger.prototype.isOdd = function () { + return (this.value & 1) === 1; + }; + NativeBigInt.prototype.isOdd = function () { + return (this.value & BigInt(1)) === BigInt(1); + } + + BigInteger.prototype.isPositive = function () { + return !this.sign; + }; + SmallInteger.prototype.isPositive = function () { + return this.value > 0; + }; + NativeBigInt.prototype.isPositive = SmallInteger.prototype.isPositive; + + BigInteger.prototype.isNegative = function () { + return this.sign; + }; + SmallInteger.prototype.isNegative = function () { + return this.value < 0; + }; + NativeBigInt.prototype.isNegative = SmallInteger.prototype.isNegative; + + BigInteger.prototype.isUnit = function () { + return false; + }; + SmallInteger.prototype.isUnit = function () { + return Math.abs(this.value) === 1; + }; + NativeBigInt.prototype.isUnit = function () { + return this.abs().value === BigInt(1); + } + + BigInteger.prototype.isZero = function () { + return false; + }; + SmallInteger.prototype.isZero = function () { + return this.value === 0; + }; + NativeBigInt.prototype.isZero = function () { + return this.value === BigInt(0); + } + + BigInteger.prototype.isDivisibleBy = function (v) { + var n = parseValue(v); + if (n.isZero()) return false; + if (n.isUnit()) return true; + if (n.compareAbs(2) === 0) return this.isEven(); + return this.mod(n).isZero(); + }; + NativeBigInt.prototype.isDivisibleBy = SmallInteger.prototype.isDivisibleBy = BigInteger.prototype.isDivisibleBy; + + function isBasicPrime(v) { + var n = v.abs(); + if (n.isUnit()) return false; + if (n.equals(2) || n.equals(3) || n.equals(5)) return true; + if (n.isEven() || n.isDivisibleBy(3) || n.isDivisibleBy(5)) return false; + if (n.lesser(49)) return true; + // we don't know if it's prime: let the other functions figure it out + } + + function millerRabinTest(n, a) { + var nPrev = n.prev(), + b = nPrev, + r = 0, + d, t, i, x; + while (b.isEven()) b = b.divide(2), r++; + next: for (i = 0; i < a.length; i++) { + if (n.lesser(a[i])) continue; + x = bigInt(a[i]).modPow(b, n); + if (x.isUnit() || x.equals(nPrev)) continue; + for (d = r - 1; d != 0; d--) { + x = x.square().mod(n); + if (x.isUnit()) return false; + if (x.equals(nPrev)) continue next; + } + return false; + } + return true; + } + + // Set "strict" to true to force GRH-supported lower bound of 2*log(N)^2 + BigInteger.prototype.isPrime = function (strict) { + var isPrime = isBasicPrime(this); + if (isPrime !== undefined) return isPrime; + var n = this.abs(); + var bits = n.bitLength(); + if (bits <= 64) + return millerRabinTest(n, [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]); + var logN = Math.log(2) * bits.toJSNumber(); + var t = Math.ceil((strict === true) ? (2 * Math.pow(logN, 2)) : logN); + for (var a = [], i = 0; i < t; i++) { + a.push(bigInt(i + 2)); + } + return millerRabinTest(n, a); + }; + NativeBigInt.prototype.isPrime = SmallInteger.prototype.isPrime = BigInteger.prototype.isPrime; + + BigInteger.prototype.isProbablePrime = function (iterations, rng) { + var isPrime = isBasicPrime(this); + if (isPrime !== undefined) return isPrime; + var n = this.abs(); + var t = iterations === undefined ? 5 : iterations; + for (var a = [], i = 0; i < t; i++) { + a.push(bigInt.randBetween(2, n.minus(2), rng)); + } + return millerRabinTest(n, a); + }; + NativeBigInt.prototype.isProbablePrime = SmallInteger.prototype.isProbablePrime = BigInteger.prototype.isProbablePrime; + + BigInteger.prototype.modInv = function (n) { + var t = bigInt.zero, newT = bigInt.one, r = parseValue(n), newR = this.abs(), q, lastT, lastR; + while (!newR.isZero()) { + q = r.divide(newR); + lastT = t; + lastR = r; + t = newT; + r = newR; + newT = lastT.subtract(q.multiply(newT)); + newR = lastR.subtract(q.multiply(newR)); + } + if (!r.isUnit()) throw new Error(this.toString() + " and " + n.toString() + " are not co-prime"); + if (t.compare(0) === -1) { + t = t.add(n); + } + if (this.isNegative()) { + return t.negate(); + } + return t; + }; + + NativeBigInt.prototype.modInv = SmallInteger.prototype.modInv = BigInteger.prototype.modInv; + + BigInteger.prototype.next = function () { + var value = this.value; + if (this.sign) { + return subtractSmall(value, 1, this.sign); + } + return new BigInteger(addSmall(value, 1), this.sign); + }; + SmallInteger.prototype.next = function () { + var value = this.value; + if (value + 1 < MAX_INT) return new SmallInteger(value + 1); + return new BigInteger(MAX_INT_ARR, false); + }; + NativeBigInt.prototype.next = function () { + return new NativeBigInt(this.value + BigInt(1)); + } + + BigInteger.prototype.prev = function () { + var value = this.value; + if (this.sign) { + return new BigInteger(addSmall(value, 1), true); + } + return subtractSmall(value, 1, this.sign); + }; + SmallInteger.prototype.prev = function () { + var value = this.value; + if (value - 1 > -MAX_INT) return new SmallInteger(value - 1); + return new BigInteger(MAX_INT_ARR, true); + }; + NativeBigInt.prototype.prev = function () { + return new NativeBigInt(this.value - BigInt(1)); + } + + var powersOfTwo = [1]; + while (2 * powersOfTwo[powersOfTwo.length - 1] <= BASE) powersOfTwo.push(2 * powersOfTwo[powersOfTwo.length - 1]); + var powers2Length = powersOfTwo.length, highestPower2 = powersOfTwo[powers2Length - 1]; + + function shift_isSmall(n) { + return Math.abs(n) <= BASE; + } + + BigInteger.prototype.shiftLeft = function (v) { + var n = parseValue(v).toJSNumber(); + if (!shift_isSmall(n)) { + throw new Error(String(n) + " is too large for shifting."); + } + if (n < 0) return this.shiftRight(-n); + var result = this; + if (result.isZero()) return result; + while (n >= powers2Length) { + result = result.multiply(highestPower2); + n -= powers2Length - 1; + } + return result.multiply(powersOfTwo[n]); + }; + NativeBigInt.prototype.shiftLeft = SmallInteger.prototype.shiftLeft = BigInteger.prototype.shiftLeft; + + BigInteger.prototype.shiftRight = function (v) { + var remQuo; + var n = parseValue(v).toJSNumber(); + if (!shift_isSmall(n)) { + throw new Error(String(n) + " is too large for shifting."); + } + if (n < 0) return this.shiftLeft(-n); + var result = this; + while (n >= powers2Length) { + if (result.isZero() || (result.isNegative() && result.isUnit())) return result; + remQuo = divModAny(result, highestPower2); + result = remQuo[1].isNegative() ? remQuo[0].prev() : remQuo[0]; + n -= powers2Length - 1; + } + remQuo = divModAny(result, powersOfTwo[n]); + return remQuo[1].isNegative() ? remQuo[0].prev() : remQuo[0]; + }; + NativeBigInt.prototype.shiftRight = SmallInteger.prototype.shiftRight = BigInteger.prototype.shiftRight; + + function bitwise(x, y, fn) { + y = parseValue(y); + var xSign = x.isNegative(), ySign = y.isNegative(); + var xRem = xSign ? x.not() : x, + yRem = ySign ? y.not() : y; + var xDigit = 0, yDigit = 0; + var xDivMod = null, yDivMod = null; + var result = []; + while (!xRem.isZero() || !yRem.isZero()) { + xDivMod = divModAny(xRem, highestPower2); + xDigit = xDivMod[1].toJSNumber(); + if (xSign) { + xDigit = highestPower2 - 1 - xDigit; // two's complement for negative numbers + } + + yDivMod = divModAny(yRem, highestPower2); + yDigit = yDivMod[1].toJSNumber(); + if (ySign) { + yDigit = highestPower2 - 1 - yDigit; // two's complement for negative numbers + } + + xRem = xDivMod[0]; + yRem = yDivMod[0]; + result.push(fn(xDigit, yDigit)); + } + var sum = fn(xSign ? 1 : 0, ySign ? 1 : 0) !== 0 ? bigInt(-1) : bigInt(0); + for (var i = result.length - 1; i >= 0; i -= 1) { + sum = sum.multiply(highestPower2).add(bigInt(result[i])); + } + return sum; + } + + BigInteger.prototype.not = function () { + return this.negate().prev(); + }; + NativeBigInt.prototype.not = SmallInteger.prototype.not = BigInteger.prototype.not; + + BigInteger.prototype.and = function (n) { + return bitwise(this, n, function (a, b) { return a & b; }); + }; + NativeBigInt.prototype.and = SmallInteger.prototype.and = BigInteger.prototype.and; + + BigInteger.prototype.or = function (n) { + return bitwise(this, n, function (a, b) { return a | b; }); + }; + NativeBigInt.prototype.or = SmallInteger.prototype.or = BigInteger.prototype.or; + + BigInteger.prototype.xor = function (n) { + return bitwise(this, n, function (a, b) { return a ^ b; }); + }; + NativeBigInt.prototype.xor = SmallInteger.prototype.xor = BigInteger.prototype.xor; + + var LOBMASK_I = 1 << 30, LOBMASK_BI = (BASE & -BASE) * (BASE & -BASE) | LOBMASK_I; + function roughLOB(n) { // get lowestOneBit (rough) + // SmallInteger: return Min(lowestOneBit(n), 1 << 30) + // BigInteger: return Min(lowestOneBit(n), 1 << 14) [BASE=1e7] + var v = n.value, + x = typeof v === "number" ? v | LOBMASK_I : + typeof v === "bigint" ? v | BigInt(LOBMASK_I) : + v[0] + v[1] * BASE | LOBMASK_BI; + return x & -x; + } + + function integerLogarithm(value, base) { + if (base.compareTo(value) <= 0) { + var tmp = integerLogarithm(value, base.square(base)); + var p = tmp.p; + var e = tmp.e; + var t = p.multiply(base); + return t.compareTo(value) <= 0 ? { p: t, e: e * 2 + 1 } : { p: p, e: e * 2 }; + } + return { p: bigInt(1), e: 0 }; + } + + BigInteger.prototype.bitLength = function () { + var n = this; + if (n.compareTo(bigInt(0)) < 0) { + n = n.negate().subtract(bigInt(1)); + } + if (n.compareTo(bigInt(0)) === 0) { + return bigInt(0); + } + return bigInt(integerLogarithm(n, bigInt(2)).e).add(bigInt(1)); + } + NativeBigInt.prototype.bitLength = SmallInteger.prototype.bitLength = BigInteger.prototype.bitLength; + + function max(a, b) { + a = parseValue(a); + b = parseValue(b); + return a.greater(b) ? a : b; + } + function min(a, b) { + a = parseValue(a); + b = parseValue(b); + return a.lesser(b) ? a : b; + } + function gcd(a, b) { + a = parseValue(a).abs(); + b = parseValue(b).abs(); + if (a.equals(b)) return a; + if (a.isZero()) return b; + if (b.isZero()) return a; + var c = Integer[1], d, t; + while (a.isEven() && b.isEven()) { + d = min(roughLOB(a), roughLOB(b)); + a = a.divide(d); + b = b.divide(d); + c = c.multiply(d); + } + while (a.isEven()) { + a = a.divide(roughLOB(a)); + } + do { + while (b.isEven()) { + b = b.divide(roughLOB(b)); + } + if (a.greater(b)) { + t = b; b = a; a = t; + } + b = b.subtract(a); + } while (!b.isZero()); + return c.isUnit() ? a : a.multiply(c); + } + function lcm(a, b) { + a = parseValue(a).abs(); + b = parseValue(b).abs(); + return a.divide(gcd(a, b)).multiply(b); + } + function randBetween(a, b, rng) { + a = parseValue(a); + b = parseValue(b); + var usedRNG = rng || Math.random; + var low = min(a, b), high = max(a, b); + var range = high.subtract(low).add(1); + if (range.isSmall) return low.add(Math.floor(usedRNG() * range)); + var digits = toBase(range, BASE).value; + var result = [], restricted = true; + for (var i = 0; i < digits.length; i++) { + var top = restricted ? digits[i] + (i + 1 < digits.length ? digits[i + 1] / BASE : 0) : BASE; + var digit = truncate(usedRNG() * top); + result.push(digit); + if (digit < digits[i]) restricted = false; + } + return low.add(Integer.fromArray(result, BASE, false)); + } + + var parseBase = function (text, base, alphabet, caseSensitive) { + alphabet = alphabet || DEFAULT_ALPHABET; + text = String(text); + if (!caseSensitive) { + text = text.toLowerCase(); + alphabet = alphabet.toLowerCase(); + } + var length = text.length; + var i; + var absBase = Math.abs(base); + var alphabetValues = {}; + for (i = 0; i < alphabet.length; i++) { + alphabetValues[alphabet[i]] = i; + } + for (i = 0; i < length; i++) { + var c = text[i]; + if (c === "-") continue; + if (c in alphabetValues) { + if (alphabetValues[c] >= absBase) { + if (c === "1" && absBase === 1) continue; + throw new Error(c + " is not a valid digit in base " + base + "."); + } + } + } + base = parseValue(base); + var digits = []; + var isNegative = text[0] === "-"; + for (i = isNegative ? 1 : 0; i < text.length; i++) { + var c = text[i]; + if (c in alphabetValues) digits.push(parseValue(alphabetValues[c])); + else if (c === "<") { + var start = i; + do { i++; } while (text[i] !== ">" && i < text.length); + digits.push(parseValue(text.slice(start + 1, i))); + } + else throw new Error(c + " is not a valid character"); + } + return parseBaseFromArray(digits, base, isNegative); + }; + + function parseBaseFromArray(digits, base, isNegative) { + var val = Integer[0], pow = Integer[1], i; + for (i = digits.length - 1; i >= 0; i--) { + val = val.add(digits[i].times(pow)); + pow = pow.times(base); + } + return isNegative ? val.negate() : val; + } + + function stringify(digit, alphabet) { + alphabet = alphabet || DEFAULT_ALPHABET; + if (digit < alphabet.length) { + return alphabet[digit]; + } + return "<" + digit + ">"; + } + + function toBase(n, base) { + base = bigInt(base); + if (base.isZero()) { + if (n.isZero()) return { value: [0], isNegative: false }; + throw new Error("Cannot convert nonzero numbers to base 0."); + } + if (base.equals(-1)) { + if (n.isZero()) return { value: [0], isNegative: false }; + if (n.isNegative()) + return { + value: [].concat.apply([], Array.apply(null, Array(-n.toJSNumber())) + .map(Array.prototype.valueOf, [1, 0]) + ), + isNegative: false + }; + + var arr = Array.apply(null, Array(n.toJSNumber() - 1)) + .map(Array.prototype.valueOf, [0, 1]); + arr.unshift([1]); + return { + value: [].concat.apply([], arr), + isNegative: false + }; + } + + var neg = false; + if (n.isNegative() && base.isPositive()) { + neg = true; + n = n.abs(); + } + if (base.isUnit()) { + if (n.isZero()) return { value: [0], isNegative: false }; + + return { + value: Array.apply(null, Array(n.toJSNumber())) + .map(Number.prototype.valueOf, 1), + isNegative: neg + }; + } + var out = []; + var left = n, divmod; + while (left.isNegative() || left.compareAbs(base) >= 0) { + divmod = left.divmod(base); + left = divmod.quotient; + var digit = divmod.remainder; + if (digit.isNegative()) { + digit = base.minus(digit).abs(); + left = left.next(); + } + out.push(digit.toJSNumber()); + } + out.push(left.toJSNumber()); + return { value: out.reverse(), isNegative: neg }; + } + + function toBaseString(n, base, alphabet) { + var arr = toBase(n, base); + return (arr.isNegative ? "-" : "") + arr.value.map(function (x) { + return stringify(x, alphabet); + }).join(''); + } + + BigInteger.prototype.toArray = function (radix) { + return toBase(this, radix); + }; + + SmallInteger.prototype.toArray = function (radix) { + return toBase(this, radix); + }; + + NativeBigInt.prototype.toArray = function (radix) { + return toBase(this, radix); + }; + + BigInteger.prototype.toString = function (radix, alphabet) { + if (radix === undefined) radix = 10; + if (radix !== 10 || alphabet) return toBaseString(this, radix, alphabet); + var v = this.value, l = v.length, str = String(v[--l]), zeros = "0000000", digit; + while (--l >= 0) { + digit = String(v[l]); + str += zeros.slice(digit.length) + digit; + } + var sign = this.sign ? "-" : ""; + return sign + str; + }; + + SmallInteger.prototype.toString = function (radix, alphabet) { + if (radix === undefined) radix = 10; + if (radix != 10 || alphabet) return toBaseString(this, radix, alphabet); + return String(this.value); + }; + + NativeBigInt.prototype.toString = SmallInteger.prototype.toString; + + NativeBigInt.prototype.toJSON = BigInteger.prototype.toJSON = SmallInteger.prototype.toJSON = function () { return this.toString(); } + + BigInteger.prototype.valueOf = function () { + return parseInt(this.toString(), 10); + }; + BigInteger.prototype.toJSNumber = BigInteger.prototype.valueOf; + + SmallInteger.prototype.valueOf = function () { + return this.value; + }; + SmallInteger.prototype.toJSNumber = SmallInteger.prototype.valueOf; + NativeBigInt.prototype.valueOf = NativeBigInt.prototype.toJSNumber = function () { + return parseInt(this.toString(), 10); + } + + function parseStringValue(v) { + if (isPrecise(+v)) { + var x = +v; + if (x === truncate(x)) + return supportsNativeBigInt ? new NativeBigInt(BigInt(x)) : new SmallInteger(x); + throw new Error("Invalid integer: " + v); + } + var sign = v[0] === "-"; + if (sign) v = v.slice(1); + var split = v.split(/e/i); + if (split.length > 2) throw new Error("Invalid integer: " + split.join("e")); + if (split.length === 2) { + var exp = split[1]; + if (exp[0] === "+") exp = exp.slice(1); + exp = +exp; + if (exp !== truncate(exp) || !isPrecise(exp)) throw new Error("Invalid integer: " + exp + " is not a valid exponent."); + var text = split[0]; + var decimalPlace = text.indexOf("."); + if (decimalPlace >= 0) { + exp -= text.length - decimalPlace - 1; + text = text.slice(0, decimalPlace) + text.slice(decimalPlace + 1); + } + if (exp < 0) throw new Error("Cannot include negative exponent part for integers"); + text += (new Array(exp + 1)).join("0"); + v = text; + } + var isValid = /^([0-9][0-9]*)$/.test(v); + if (!isValid) throw new Error("Invalid integer: " + v); + if (supportsNativeBigInt) { + return new NativeBigInt(BigInt(sign ? "-" + v : v)); + } + var r = [], max = v.length, l = LOG_BASE, min = max - l; + while (max > 0) { + r.push(+v.slice(min, max)); + min -= l; + if (min < 0) min = 0; + max -= l; + } + trim(r); + return new BigInteger(r, sign); + } + + function parseNumberValue(v) { + if (supportsNativeBigInt) { + return new NativeBigInt(BigInt(v)); + } + if (isPrecise(v)) { + if (v !== truncate(v)) throw new Error(v + " is not an integer."); + return new SmallInteger(v); + } + return parseStringValue(v.toString()); + } + + function parseValue(v) { + if (typeof v === "number") { + return parseNumberValue(v); + } + if (typeof v === "string") { + return parseStringValue(v); + } + if (typeof v === "bigint") { + return new NativeBigInt(v); + } + return v; + } + // Pre-define numbers in range [-999,999] + for (var i = 0; i < 1000; i++) { + Integer[i] = parseValue(i); + if (i > 0) Integer[-i] = parseValue(-i); + } + // Backwards compatibility + Integer.one = Integer[1]; + Integer.zero = Integer[0]; + Integer.minusOne = Integer[-1]; + Integer.max = max; + Integer.min = min; + Integer.gcd = gcd; + Integer.lcm = lcm; + Integer.isInstance = function (x) { return x instanceof BigInteger || x instanceof SmallInteger || x instanceof NativeBigInt; }; + Integer.randBetween = randBetween; + + Integer.fromArray = function (digits, base, isNegative) { + return parseBaseFromArray(digits.map(parseValue), parseValue(base || 10), isNegative); + }; + + return Integer; +})(); + +// Node.js check +if (typeof module !== "undefined" && module.hasOwnProperty("exports")) { + module.exports = bigInt; +} + +//amd check +if (typeof define === "function" && define.amd) { + define( function () { + return bigInt; + }); +} diff --git a/node_modules/big-integer/BigInteger.min.js b/node_modules/big-integer/BigInteger.min.js new file mode 100644 index 0000000..a960fa6 --- /dev/null +++ b/node_modules/big-integer/BigInteger.min.js @@ -0,0 +1 @@ +var bigInt=function(undefined){"use strict";var BASE=1e7,LOG_BASE=7,MAX_INT=9007199254740992,MAX_INT_ARR=smallToArray(MAX_INT),DEFAULT_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyz";var supportsNativeBigInt=typeof BigInt==="function";function Integer(v,radix,alphabet,caseSensitive){if(typeof v==="undefined")return Integer[0];if(typeof radix!=="undefined")return+radix===10&&!alphabet?parseValue(v):parseBase(v,radix,alphabet,caseSensitive);return parseValue(v)}function BigInteger(value,sign){this.value=value;this.sign=sign;this.isSmall=false}BigInteger.prototype=Object.create(Integer.prototype);function SmallInteger(value){this.value=value;this.sign=value<0;this.isSmall=true}SmallInteger.prototype=Object.create(Integer.prototype);function NativeBigInt(value){this.value=value}NativeBigInt.prototype=Object.create(Integer.prototype);function isPrecise(n){return-MAX_INT0)return Math.floor(n);return Math.ceil(n)}function add(a,b){var l_a=a.length,l_b=b.length,r=new Array(l_a),carry=0,base=BASE,sum,i;for(i=0;i=base?1:0;r[i]=sum-carry*base}while(i0)r.push(carry);return r}function addAny(a,b){if(a.length>=b.length)return add(a,b);return add(b,a)}function addSmall(a,carry){var l=a.length,r=new Array(l),base=BASE,sum,i;for(i=0;i0){r[i++]=carry%base;carry=Math.floor(carry/base)}return r}BigInteger.prototype.add=function(v){var n=parseValue(v);if(this.sign!==n.sign){return this.subtract(n.negate())}var a=this.value,b=n.value;if(n.isSmall){return new BigInteger(addSmall(a,Math.abs(b)),this.sign)}return new BigInteger(addAny(a,b),this.sign)};BigInteger.prototype.plus=BigInteger.prototype.add;SmallInteger.prototype.add=function(v){var n=parseValue(v);var a=this.value;if(a<0!==n.sign){return this.subtract(n.negate())}var b=n.value;if(n.isSmall){if(isPrecise(a+b))return new SmallInteger(a+b);b=smallToArray(Math.abs(b))}return new BigInteger(addSmall(b,Math.abs(a)),a<0)};SmallInteger.prototype.plus=SmallInteger.prototype.add;NativeBigInt.prototype.add=function(v){return new NativeBigInt(this.value+parseValue(v).value)};NativeBigInt.prototype.plus=NativeBigInt.prototype.add;function subtract(a,b){var a_l=a.length,b_l=b.length,r=new Array(a_l),borrow=0,base=BASE,i,difference;for(i=0;i=0){value=subtract(a,b)}else{value=subtract(b,a);sign=!sign}value=arrayToSmall(value);if(typeof value==="number"){if(sign)value=-value;return new SmallInteger(value)}return new BigInteger(value,sign)}function subtractSmall(a,b,sign){var l=a.length,r=new Array(l),carry=-b,base=BASE,i,difference;for(i=0;i=0)};SmallInteger.prototype.minus=SmallInteger.prototype.subtract;NativeBigInt.prototype.subtract=function(v){return new NativeBigInt(this.value-parseValue(v).value)};NativeBigInt.prototype.minus=NativeBigInt.prototype.subtract;BigInteger.prototype.negate=function(){return new BigInteger(this.value,!this.sign)};SmallInteger.prototype.negate=function(){var sign=this.sign;var small=new SmallInteger(-this.value);small.sign=!sign;return small};NativeBigInt.prototype.negate=function(){return new NativeBigInt(-this.value)};BigInteger.prototype.abs=function(){return new BigInteger(this.value,false)};SmallInteger.prototype.abs=function(){return new SmallInteger(Math.abs(this.value))};NativeBigInt.prototype.abs=function(){return new NativeBigInt(this.value>=0?this.value:-this.value)};function multiplyLong(a,b){var a_l=a.length,b_l=b.length,l=a_l+b_l,r=createArray(l),base=BASE,product,carry,i,a_i,b_j;for(i=0;i0){r[i++]=carry%base;carry=Math.floor(carry/base)}return r}function shiftLeft(x,n){var r=[];while(n-- >0)r.push(0);return r.concat(x)}function multiplyKaratsuba(x,y){var n=Math.max(x.length,y.length);if(n<=30)return multiplyLong(x,y);n=Math.ceil(n/2);var b=x.slice(n),a=x.slice(0,n),d=y.slice(n),c=y.slice(0,n);var ac=multiplyKaratsuba(a,c),bd=multiplyKaratsuba(b,d),abcd=multiplyKaratsuba(addAny(a,b),addAny(c,d));var product=addAny(addAny(ac,shiftLeft(subtract(subtract(abcd,ac),bd),n)),shiftLeft(bd,2*n));trim(product);return product}function useKaratsuba(l1,l2){return-.012*l1-.012*l2+15e-6*l1*l2>0}BigInteger.prototype.multiply=function(v){var n=parseValue(v),a=this.value,b=n.value,sign=this.sign!==n.sign,abs;if(n.isSmall){if(b===0)return Integer[0];if(b===1)return this;if(b===-1)return this.negate();abs=Math.abs(b);if(abs=0;shift--){quotientDigit=base-1;if(remainder[shift+b_l]!==divisorMostSignificantDigit){quotientDigit=Math.floor((remainder[shift+b_l]*base+remainder[shift+b_l-1])/divisorMostSignificantDigit)}carry=0;borrow=0;l=divisor.length;for(i=0;ib_l){highx=(highx+1)*base}guess=Math.ceil(highx/highy);do{check=multiplySmall(b,guess);if(compareAbs(check,part)<=0)break;guess--}while(guess);result.push(guess);part=subtract(part,check)}result.reverse();return[arrayToSmall(result),arrayToSmall(part)]}function divModSmall(value,lambda){var length=value.length,quotient=createArray(length),base=BASE,i,q,remainder,divisor;remainder=0;for(i=length-1;i>=0;--i){divisor=remainder*base+value[i];q=truncate(divisor/lambda);remainder=divisor-q*lambda;quotient[i]=q|0}return[quotient,remainder|0]}function divModAny(self,v){var value,n=parseValue(v);if(supportsNativeBigInt){return[new NativeBigInt(self.value/n.value),new NativeBigInt(self.value%n.value)]}var a=self.value,b=n.value;var quotient;if(b===0)throw new Error("Cannot divide by zero");if(self.isSmall){if(n.isSmall){return[new SmallInteger(truncate(a/b)),new SmallInteger(a%b)]}return[Integer[0],self]}if(n.isSmall){if(b===1)return[self,Integer[0]];if(b==-1)return[self.negate(),Integer[0]];var abs=Math.abs(b);if(absb.length?1:-1}for(var i=a.length-1;i>=0;i--){if(a[i]!==b[i])return a[i]>b[i]?1:-1}return 0}BigInteger.prototype.compareAbs=function(v){var n=parseValue(v),a=this.value,b=n.value;if(n.isSmall)return 1;return compareAbs(a,b)};SmallInteger.prototype.compareAbs=function(v){var n=parseValue(v),a=Math.abs(this.value),b=n.value;if(n.isSmall){b=Math.abs(b);return a===b?0:a>b?1:-1}return-1};NativeBigInt.prototype.compareAbs=function(v){var a=this.value;var b=parseValue(v).value;a=a>=0?a:-a;b=b>=0?b:-b;return a===b?0:a>b?1:-1};BigInteger.prototype.compare=function(v){if(v===Infinity){return-1}if(v===-Infinity){return 1}var n=parseValue(v),a=this.value,b=n.value;if(this.sign!==n.sign){return n.sign?1:-1}if(n.isSmall){return this.sign?-1:1}return compareAbs(a,b)*(this.sign?-1:1)};BigInteger.prototype.compareTo=BigInteger.prototype.compare;SmallInteger.prototype.compare=function(v){if(v===Infinity){return-1}if(v===-Infinity){return 1}var n=parseValue(v),a=this.value,b=n.value;if(n.isSmall){return a==b?0:a>b?1:-1}if(a<0!==n.sign){return a<0?-1:1}return a<0?1:-1};SmallInteger.prototype.compareTo=SmallInteger.prototype.compare;NativeBigInt.prototype.compare=function(v){if(v===Infinity){return-1}if(v===-Infinity){return 1}var a=this.value;var b=parseValue(v).value;return a===b?0:a>b?1:-1};NativeBigInt.prototype.compareTo=NativeBigInt.prototype.compare;BigInteger.prototype.equals=function(v){return this.compare(v)===0};NativeBigInt.prototype.eq=NativeBigInt.prototype.equals=SmallInteger.prototype.eq=SmallInteger.prototype.equals=BigInteger.prototype.eq=BigInteger.prototype.equals;BigInteger.prototype.notEquals=function(v){return this.compare(v)!==0};NativeBigInt.prototype.neq=NativeBigInt.prototype.notEquals=SmallInteger.prototype.neq=SmallInteger.prototype.notEquals=BigInteger.prototype.neq=BigInteger.prototype.notEquals;BigInteger.prototype.greater=function(v){return this.compare(v)>0};NativeBigInt.prototype.gt=NativeBigInt.prototype.greater=SmallInteger.prototype.gt=SmallInteger.prototype.greater=BigInteger.prototype.gt=BigInteger.prototype.greater;BigInteger.prototype.lesser=function(v){return this.compare(v)<0};NativeBigInt.prototype.lt=NativeBigInt.prototype.lesser=SmallInteger.prototype.lt=SmallInteger.prototype.lesser=BigInteger.prototype.lt=BigInteger.prototype.lesser;BigInteger.prototype.greaterOrEquals=function(v){return this.compare(v)>=0};NativeBigInt.prototype.geq=NativeBigInt.prototype.greaterOrEquals=SmallInteger.prototype.geq=SmallInteger.prototype.greaterOrEquals=BigInteger.prototype.geq=BigInteger.prototype.greaterOrEquals;BigInteger.prototype.lesserOrEquals=function(v){return this.compare(v)<=0};NativeBigInt.prototype.leq=NativeBigInt.prototype.lesserOrEquals=SmallInteger.prototype.leq=SmallInteger.prototype.lesserOrEquals=BigInteger.prototype.leq=BigInteger.prototype.lesserOrEquals;BigInteger.prototype.isEven=function(){return(this.value[0]&1)===0};SmallInteger.prototype.isEven=function(){return(this.value&1)===0};NativeBigInt.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)};BigInteger.prototype.isOdd=function(){return(this.value[0]&1)===1};SmallInteger.prototype.isOdd=function(){return(this.value&1)===1};NativeBigInt.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)};BigInteger.prototype.isPositive=function(){return!this.sign};SmallInteger.prototype.isPositive=function(){return this.value>0};NativeBigInt.prototype.isPositive=SmallInteger.prototype.isPositive;BigInteger.prototype.isNegative=function(){return this.sign};SmallInteger.prototype.isNegative=function(){return this.value<0};NativeBigInt.prototype.isNegative=SmallInteger.prototype.isNegative;BigInteger.prototype.isUnit=function(){return false};SmallInteger.prototype.isUnit=function(){return Math.abs(this.value)===1};NativeBigInt.prototype.isUnit=function(){return this.abs().value===BigInt(1)};BigInteger.prototype.isZero=function(){return false};SmallInteger.prototype.isZero=function(){return this.value===0};NativeBigInt.prototype.isZero=function(){return this.value===BigInt(0)};BigInteger.prototype.isDivisibleBy=function(v){var n=parseValue(v);if(n.isZero())return false;if(n.isUnit())return true;if(n.compareAbs(2)===0)return this.isEven();return this.mod(n).isZero()};NativeBigInt.prototype.isDivisibleBy=SmallInteger.prototype.isDivisibleBy=BigInteger.prototype.isDivisibleBy;function isBasicPrime(v){var n=v.abs();if(n.isUnit())return false;if(n.equals(2)||n.equals(3)||n.equals(5))return true;if(n.isEven()||n.isDivisibleBy(3)||n.isDivisibleBy(5))return false;if(n.lesser(49))return true}function millerRabinTest(n,a){var nPrev=n.prev(),b=nPrev,r=0,d,t,i,x;while(b.isEven())b=b.divide(2),r++;next:for(i=0;i-MAX_INT)return new SmallInteger(value-1);return new BigInteger(MAX_INT_ARR,true)};NativeBigInt.prototype.prev=function(){return new NativeBigInt(this.value-BigInt(1))};var powersOfTwo=[1];while(2*powersOfTwo[powersOfTwo.length-1]<=BASE)powersOfTwo.push(2*powersOfTwo[powersOfTwo.length-1]);var powers2Length=powersOfTwo.length,highestPower2=powersOfTwo[powers2Length-1];function shift_isSmall(n){return Math.abs(n)<=BASE}BigInteger.prototype.shiftLeft=function(v){var n=parseValue(v).toJSNumber();if(!shift_isSmall(n)){throw new Error(String(n)+" is too large for shifting.")}if(n<0)return this.shiftRight(-n);var result=this;if(result.isZero())return result;while(n>=powers2Length){result=result.multiply(highestPower2);n-=powers2Length-1}return result.multiply(powersOfTwo[n])};NativeBigInt.prototype.shiftLeft=SmallInteger.prototype.shiftLeft=BigInteger.prototype.shiftLeft;BigInteger.prototype.shiftRight=function(v){var remQuo;var n=parseValue(v).toJSNumber();if(!shift_isSmall(n)){throw new Error(String(n)+" is too large for shifting.")}if(n<0)return this.shiftLeft(-n);var result=this;while(n>=powers2Length){if(result.isZero()||result.isNegative()&&result.isUnit())return result;remQuo=divModAny(result,highestPower2);result=remQuo[1].isNegative()?remQuo[0].prev():remQuo[0];n-=powers2Length-1}remQuo=divModAny(result,powersOfTwo[n]);return remQuo[1].isNegative()?remQuo[0].prev():remQuo[0]};NativeBigInt.prototype.shiftRight=SmallInteger.prototype.shiftRight=BigInteger.prototype.shiftRight;function bitwise(x,y,fn){y=parseValue(y);var xSign=x.isNegative(),ySign=y.isNegative();var xRem=xSign?x.not():x,yRem=ySign?y.not():y;var xDigit=0,yDigit=0;var xDivMod=null,yDivMod=null;var result=[];while(!xRem.isZero()||!yRem.isZero()){xDivMod=divModAny(xRem,highestPower2);xDigit=xDivMod[1].toJSNumber();if(xSign){xDigit=highestPower2-1-xDigit}yDivMod=divModAny(yRem,highestPower2);yDigit=yDivMod[1].toJSNumber();if(ySign){yDigit=highestPower2-1-yDigit}xRem=xDivMod[0];yRem=yDivMod[0];result.push(fn(xDigit,yDigit))}var sum=fn(xSign?1:0,ySign?1:0)!==0?bigInt(-1):bigInt(0);for(var i=result.length-1;i>=0;i-=1){sum=sum.multiply(highestPower2).add(bigInt(result[i]))}return sum}BigInteger.prototype.not=function(){return this.negate().prev()};NativeBigInt.prototype.not=SmallInteger.prototype.not=BigInteger.prototype.not;BigInteger.prototype.and=function(n){return bitwise(this,n,function(a,b){return a&b})};NativeBigInt.prototype.and=SmallInteger.prototype.and=BigInteger.prototype.and;BigInteger.prototype.or=function(n){return bitwise(this,n,function(a,b){return a|b})};NativeBigInt.prototype.or=SmallInteger.prototype.or=BigInteger.prototype.or;BigInteger.prototype.xor=function(n){return bitwise(this,n,function(a,b){return a^b})};NativeBigInt.prototype.xor=SmallInteger.prototype.xor=BigInteger.prototype.xor;var LOBMASK_I=1<<30,LOBMASK_BI=(BASE&-BASE)*(BASE&-BASE)|LOBMASK_I;function roughLOB(n){var v=n.value,x=typeof v==="number"?v|LOBMASK_I:typeof v==="bigint"?v|BigInt(LOBMASK_I):v[0]+v[1]*BASE|LOBMASK_BI;return x&-x}function integerLogarithm(value,base){if(base.compareTo(value)<=0){var tmp=integerLogarithm(value,base.square(base));var p=tmp.p;var e=tmp.e;var t=p.multiply(base);return t.compareTo(value)<=0?{p:t,e:e*2+1}:{p:p,e:e*2}}return{p:bigInt(1),e:0}}BigInteger.prototype.bitLength=function(){var n=this;if(n.compareTo(bigInt(0))<0){n=n.negate().subtract(bigInt(1))}if(n.compareTo(bigInt(0))===0){return bigInt(0)}return bigInt(integerLogarithm(n,bigInt(2)).e).add(bigInt(1))};NativeBigInt.prototype.bitLength=SmallInteger.prototype.bitLength=BigInteger.prototype.bitLength;function max(a,b){a=parseValue(a);b=parseValue(b);return a.greater(b)?a:b}function min(a,b){a=parseValue(a);b=parseValue(b);return a.lesser(b)?a:b}function gcd(a,b){a=parseValue(a).abs();b=parseValue(b).abs();if(a.equals(b))return a;if(a.isZero())return b;if(b.isZero())return a;var c=Integer[1],d,t;while(a.isEven()&&b.isEven()){d=min(roughLOB(a),roughLOB(b));a=a.divide(d);b=b.divide(d);c=c.multiply(d)}while(a.isEven()){a=a.divide(roughLOB(a))}do{while(b.isEven()){b=b.divide(roughLOB(b))}if(a.greater(b)){t=b;b=a;a=t}b=b.subtract(a)}while(!b.isZero());return c.isUnit()?a:a.multiply(c)}function lcm(a,b){a=parseValue(a).abs();b=parseValue(b).abs();return a.divide(gcd(a,b)).multiply(b)}function randBetween(a,b,rng){a=parseValue(a);b=parseValue(b);var usedRNG=rng||Math.random;var low=min(a,b),high=max(a,b);var range=high.subtract(low).add(1);if(range.isSmall)return low.add(Math.floor(usedRNG()*range));var digits=toBase(range,BASE).value;var result=[],restricted=true;for(var i=0;i=absBase){if(c==="1"&&absBase===1)continue;throw new Error(c+" is not a valid digit in base "+base+".")}}}base=parseValue(base);var digits=[];var isNegative=text[0]==="-";for(i=isNegative?1:0;i"&&i=0;i--){val=val.add(digits[i].times(pow));pow=pow.times(base)}return isNegative?val.negate():val}function stringify(digit,alphabet){alphabet=alphabet||DEFAULT_ALPHABET;if(digit"}function toBase(n,base){base=bigInt(base);if(base.isZero()){if(n.isZero())return{value:[0],isNegative:false};throw new Error("Cannot convert nonzero numbers to base 0.")}if(base.equals(-1)){if(n.isZero())return{value:[0],isNegative:false};if(n.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-n.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:false};var arr=Array.apply(null,Array(n.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);arr.unshift([1]);return{value:[].concat.apply([],arr),isNegative:false}}var neg=false;if(n.isNegative()&&base.isPositive()){neg=true;n=n.abs()}if(base.isUnit()){if(n.isZero())return{value:[0],isNegative:false};return{value:Array.apply(null,Array(n.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:neg}}var out=[];var left=n,divmod;while(left.isNegative()||left.compareAbs(base)>=0){divmod=left.divmod(base);left=divmod.quotient;var digit=divmod.remainder;if(digit.isNegative()){digit=base.minus(digit).abs();left=left.next()}out.push(digit.toJSNumber())}out.push(left.toJSNumber());return{value:out.reverse(),isNegative:neg}}function toBaseString(n,base,alphabet){var arr=toBase(n,base);return(arr.isNegative?"-":"")+arr.value.map(function(x){return stringify(x,alphabet)}).join("")}BigInteger.prototype.toArray=function(radix){return toBase(this,radix)};SmallInteger.prototype.toArray=function(radix){return toBase(this,radix)};NativeBigInt.prototype.toArray=function(radix){return toBase(this,radix)};BigInteger.prototype.toString=function(radix,alphabet){if(radix===undefined)radix=10;if(radix!==10||alphabet)return toBaseString(this,radix,alphabet);var v=this.value,l=v.length,str=String(v[--l]),zeros="0000000",digit;while(--l>=0){digit=String(v[l]);str+=zeros.slice(digit.length)+digit}var sign=this.sign?"-":"";return sign+str};SmallInteger.prototype.toString=function(radix,alphabet){if(radix===undefined)radix=10;if(radix!=10||alphabet)return toBaseString(this,radix,alphabet);return String(this.value)};NativeBigInt.prototype.toString=SmallInteger.prototype.toString;NativeBigInt.prototype.toJSON=BigInteger.prototype.toJSON=SmallInteger.prototype.toJSON=function(){return this.toString()};BigInteger.prototype.valueOf=function(){return parseInt(this.toString(),10)};BigInteger.prototype.toJSNumber=BigInteger.prototype.valueOf;SmallInteger.prototype.valueOf=function(){return this.value};SmallInteger.prototype.toJSNumber=SmallInteger.prototype.valueOf;NativeBigInt.prototype.valueOf=NativeBigInt.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function parseStringValue(v){if(isPrecise(+v)){var x=+v;if(x===truncate(x))return supportsNativeBigInt?new NativeBigInt(BigInt(x)):new SmallInteger(x);throw new Error("Invalid integer: "+v)}var sign=v[0]==="-";if(sign)v=v.slice(1);var split=v.split(/e/i);if(split.length>2)throw new Error("Invalid integer: "+split.join("e"));if(split.length===2){var exp=split[1];if(exp[0]==="+")exp=exp.slice(1);exp=+exp;if(exp!==truncate(exp)||!isPrecise(exp))throw new Error("Invalid integer: "+exp+" is not a valid exponent.");var text=split[0];var decimalPlace=text.indexOf(".");if(decimalPlace>=0){exp-=text.length-decimalPlace-1;text=text.slice(0,decimalPlace)+text.slice(decimalPlace+1)}if(exp<0)throw new Error("Cannot include negative exponent part for integers");text+=new Array(exp+1).join("0");v=text}var isValid=/^([0-9][0-9]*)$/.test(v);if(!isValid)throw new Error("Invalid integer: "+v);if(supportsNativeBigInt){return new NativeBigInt(BigInt(sign?"-"+v:v))}var r=[],max=v.length,l=LOG_BASE,min=max-l;while(max>0){r.push(+v.slice(min,max));min-=l;if(min<0)min=0;max-=l}trim(r);return new BigInteger(r,sign)}function parseNumberValue(v){if(supportsNativeBigInt){return new NativeBigInt(BigInt(v))}if(isPrecise(v)){if(v!==truncate(v))throw new Error(v+" is not an integer.");return new SmallInteger(v)}return parseStringValue(v.toString())}function parseValue(v){if(typeof v==="number"){return parseNumberValue(v)}if(typeof v==="string"){return parseStringValue(v)}if(typeof v==="bigint"){return new NativeBigInt(v)}return v}for(var i=0;i<1e3;i++){Integer[i]=parseValue(i);if(i>0)Integer[-i]=parseValue(-i)}Integer.one=Integer[1];Integer.zero=Integer[0];Integer.minusOne=Integer[-1];Integer.max=max;Integer.min=min;Integer.gcd=gcd;Integer.lcm=lcm;Integer.isInstance=function(x){return x instanceof BigInteger||x instanceof SmallInteger||x instanceof NativeBigInt};Integer.randBetween=randBetween;Integer.fromArray=function(digits,base,isNegative){return parseBaseFromArray(digits.map(parseValue),parseValue(base||10),isNegative)};return Integer}();if(typeof module!=="undefined"&&module.hasOwnProperty("exports")){module.exports=bigInt}if(typeof define==="function"&&define.amd){define(function(){return bigInt})} \ No newline at end of file diff --git a/node_modules/big-integer/LICENSE b/node_modules/big-integer/LICENSE new file mode 100644 index 0000000..3ce22da --- /dev/null +++ b/node_modules/big-integer/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +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 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. + +For more information, please refer to diff --git a/node_modules/big-integer/README.md b/node_modules/big-integer/README.md new file mode 100644 index 0000000..42a6cd4 --- /dev/null +++ b/node_modules/big-integer/README.md @@ -0,0 +1,589 @@ +# BigInteger.js [![Build Status][travis-img]][travis-url] [![Coverage Status][coveralls-img]][coveralls-url] [![Monthly Downloads][downloads-img]][downloads-url] + +[travis-url]: https://travis-ci.org/peterolson/BigInteger.js +[travis-img]: https://travis-ci.org/peterolson/BigInteger.js.svg?branch=master +[coveralls-url]: https://coveralls.io/github/peterolson/BigInteger.js?branch=master +[coveralls-img]: https://coveralls.io/repos/peterolson/BigInteger.js/badge.svg?branch=master&service=github +[downloads-url]: https://www.npmjs.com/package/big-integer +[downloads-img]: https://img.shields.io/npm/dm/big-integer.svg + +**BigInteger.js** is an arbitrary-length integer library for Javascript, allowing arithmetic operations on integers of unlimited size, notwithstanding memory and time limitations. + +**Update (December 2, 2018):** [`BigInt` is being added as a native feature of JavaScript](https://tc39.github.io/proposal-bigint/). This library now works as a polyfill: if the environment supports the native `BigInt`, this library acts as a thin wrapper over the native implementation. + +## Installation + +If you are using a browser, you can download [BigInteger.js from GitHub](http://peterolson.github.com/BigInteger.js/BigInteger.min.js) or just hotlink to it: + + + +If you are using node, you can install BigInteger with [npm](https://npmjs.org/). + + npm install big-integer + +Then you can include it in your code: + + var bigInt = require("big-integer"); + + +## Usage +### `bigInt(number, [base], [alphabet], [caseSensitive])` + +You can create a bigInt by calling the `bigInt` function. You can pass in + + - a string, which it will parse as an bigInt and throw an `"Invalid integer"` error if the parsing fails. + - a Javascript number, which it will parse as an bigInt and throw an `"Invalid integer"` error if the parsing fails. + - another bigInt. + - nothing, and it will return `bigInt.zero`. + + If you provide a second parameter, then it will parse `number` as a number in base `base`. Note that `base` can be any bigInt (even negative or zero). The letters "a-z" and "A-Z" will be interpreted as the numbers 10 to 35. Higher digits can be specified in angle brackets (`<` and `>`). The default `base` is `10`. + + You can specify a custom alphabet for base conversion with the third parameter. The default `alphabet` is `"0123456789abcdefghijklmnopqrstuvwxyz"`. + + The fourth parameter specifies whether or not the number string should be case-sensitive, i.e. whether `a` and `A` should be treated as different digits. By default `caseSensitive` is `false`. + +Examples: + + var zero = bigInt(); + var ninetyThree = bigInt(93); + var largeNumber = bigInt("75643564363473453456342378564387956906736546456235345"); + var googol = bigInt("1e100"); + var bigNumber = bigInt(largeNumber); + + var maximumByte = bigInt("FF", 16); + var fiftyFiveGoogol = bigInt("<55>0", googol); + +Note that Javascript numbers larger than `9007199254740992` and smaller than `-9007199254740992` are not precisely represented numbers and will not produce exact results. If you are dealing with numbers outside that range, it is better to pass in strings. + +### Method Chaining + +Note that bigInt operations return bigInts, which allows you to chain methods, for example: + + var salary = bigInt(dollarsPerHour).times(hoursWorked).plus(randomBonuses) + +### Constants + +There are three named constants already stored that you do not have to construct with the `bigInt` function yourself: + + - `bigInt.one`, equivalent to `bigInt(1)` + - `bigInt.zero`, equivalent to `bigInt(0)` + - `bigInt.minusOne`, equivalent to `bigInt(-1)` + +The numbers from -999 to 999 are also already prestored and can be accessed using `bigInt[index]`, for example: + + - `bigInt[-999]`, equivalent to `bigInt(-999)` + - `bigInt[256]`, equivalent to `bigInt(256)` + +### Methods + +#### `abs()` + +Returns the absolute value of a bigInt. + + - `bigInt(-45).abs()` => `45` + - `bigInt(45).abs()` => `45` + +#### `add(number)` + +Performs addition. + + - `bigInt(5).add(7)` => `12` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Addition) + +#### `and(number)` + +Performs the bitwise AND operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). + + - `bigInt(6).and(3)` => `2` + - `bigInt(6).and(-3)` => `4` + +#### `bitLength()` + +Returns the number of digits required to represent a bigInt in binary. + + - `bigInt(5)` => `3` (since 5 is `101` in binary, which is three digits long) + +#### `compare(number)` + +Performs a comparison between two numbers. If the numbers are equal, it returns `0`. If the first number is greater, it returns `1`. If the first number is lesser, it returns `-1`. + + - `bigInt(5).compare(5)` => `0` + - `bigInt(5).compare(4)` => `1` + - `bigInt(4).compare(5)` => `-1` + +#### `compareAbs(number)` + +Performs a comparison between the absolute value of two numbers. + + - `bigInt(5).compareAbs(-5)` => `0` + - `bigInt(5).compareAbs(4)` => `1` + - `bigInt(4).compareAbs(-5)` => `-1` + +#### `compareTo(number)` + +Alias for the `compare` method. + +#### `divide(number)` + +Performs integer division, disregarding the remainder. + + - `bigInt(59).divide(5)` => `11` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `divmod(number)` + +Performs division and returns an object with two properties: `quotient` and `remainder`. The sign of the remainder will match the sign of the dividend. + + - `bigInt(59).divmod(5)` => `{quotient: bigInt(11), remainder: bigInt(4) }` + - `bigInt(-5).divmod(2)` => `{quotient: bigInt(-2), remainder: bigInt(-1) }` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `eq(number)` + +Alias for the `equals` method. + +#### `equals(number)` + +Checks if two numbers are equal. + + - `bigInt(5).equals(5)` => `true` + - `bigInt(4).equals(7)` => `false` + +#### `geq(number)` + +Alias for the `greaterOrEquals` method. + + +#### `greater(number)` + +Checks if the first number is greater than the second. + + - `bigInt(5).greater(6)` => `false` + - `bigInt(5).greater(5)` => `false` + - `bigInt(5).greater(4)` => `true` + +#### `greaterOrEquals(number)` + +Checks if the first number is greater than or equal to the second. + + - `bigInt(5).greaterOrEquals(6)` => `false` + - `bigInt(5).greaterOrEquals(5)` => `true` + - `bigInt(5).greaterOrEquals(4)` => `true` + +#### `gt(number)` + +Alias for the `greater` method. + +#### `isDivisibleBy(number)` + +Returns `true` if the first number is divisible by the second number, `false` otherwise. + + - `bigInt(999).isDivisibleBy(333)` => `true` + - `bigInt(99).isDivisibleBy(5)` => `false` + +#### `isEven()` + +Returns `true` if the number is even, `false` otherwise. + + - `bigInt(6).isEven()` => `true` + - `bigInt(3).isEven()` => `false` + +#### `isNegative()` + +Returns `true` if the number is negative, `false` otherwise. +Returns `false` for `0` and `-0`. + + - `bigInt(-23).isNegative()` => `true` + - `bigInt(50).isNegative()` => `false` + +#### `isOdd()` + +Returns `true` if the number is odd, `false` otherwise. + + - `bigInt(13).isOdd()` => `true` + - `bigInt(40).isOdd()` => `false` + +#### `isPositive()` + +Return `true` if the number is positive, `false` otherwise. +Returns `false` for `0` and `-0`. + + - `bigInt(54).isPositive()` => `true` + - `bigInt(-1).isPositive()` => `false` + +#### `isPrime(strict?)` + +Returns `true` if the number is prime, `false` otherwise. +Set "strict" boolean to true to force GRH-supported lower bound of 2*log(N)^2. + + - `bigInt(5).isPrime()` => `true` + - `bigInt(6).isPrime()` => `false` + +#### `isProbablePrime([iterations], [rng])` + +Returns `true` if the number is very likely to be prime, `false` otherwise. +Supplying `iterations` is optional - it determines the number of iterations of the test (default: `5`). The more iterations, the lower chance of getting a false positive. +This uses the [Miller Rabin test](https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test). + + - `bigInt(5).isProbablePrime()` => `true` + - `bigInt(49).isProbablePrime()` => `false` + - `bigInt(1729).isProbablePrime()` => `false` + +Note that this function is not deterministic, since it relies on random sampling of factors, so the result for some numbers is not always the same - unless you pass a predictable random number generator as `rng`. The behavior and requirements are the same as with `randBetween`. + + - `bigInt(1729).isProbablePrime(1, () => 0.1)` => `false` + - `bigInt(1729).isProbablePrime(1, () => 0.2)` => `true` + +If the number is composite then the Miller–Rabin primality test declares the number probably prime with a probability at most `4` to the power `−iterations`. +If the number is prime, this function always returns `true`. + +#### `isUnit()` + +Returns `true` if the number is `1` or `-1`, `false` otherwise. + + - `bigInt.one.isUnit()` => `true` + - `bigInt.minusOne.isUnit()` => `true` + - `bigInt(5).isUnit()` => `false` + +#### `isZero()` + +Return `true` if the number is `0` or `-0`, `false` otherwise. + + - `bigInt.zero.isZero()` => `true` + - `bigInt("-0").isZero()` => `true` + - `bigInt(50).isZero()` => `false` + +#### `leq(number)` + +Alias for the `lesserOrEquals` method. + +#### `lesser(number)` + +Checks if the first number is lesser than the second. + + - `bigInt(5).lesser(6)` => `true` + - `bigInt(5).lesser(5)` => `false` + - `bigInt(5).lesser(4)` => `false` + +#### `lesserOrEquals(number)` + +Checks if the first number is less than or equal to the second. + + - `bigInt(5).lesserOrEquals(6)` => `true` + - `bigInt(5).lesserOrEquals(5)` => `true` + - `bigInt(5).lesserOrEquals(4)` => `false` + +#### `lt(number)` + +Alias for the `lesser` method. + +#### `minus(number)` + +Alias for the `subtract` method. + + - `bigInt(3).minus(5)` => `-2` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Subtraction) + +#### `mod(number)` + +Performs division and returns the remainder, disregarding the quotient. The sign of the remainder will match the sign of the dividend. + + - `bigInt(59).mod(5)` => `4` + - `bigInt(-5).mod(2)` => `-1` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `modInv(mod)` + +Finds the [multiplicative inverse](https://en.wikipedia.org/wiki/Modular_multiplicative_inverse) of the number modulo `mod`. + + - `bigInt(3).modInv(11)` => `4` + - `bigInt(42).modInv(2017)` => `1969` + +#### `modPow(exp, mod)` + +Takes the number to the power `exp` modulo `mod`. + + - `bigInt(10).modPow(3, 30)` => `10` + +#### `multiply(number)` + +Performs multiplication. + + - `bigInt(111).multiply(111)` => `12321` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Multiplication) + +#### `neq(number)` + +Alias for the `notEquals` method. + +#### `next()` + +Adds one to the number. + + - `bigInt(6).next()` => `7` + +#### `not()` + +Performs the bitwise NOT operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). + + - `bigInt(10).not()` => `-11` + - `bigInt(0).not()` => `-1` + +#### `notEquals(number)` + +Checks if two numbers are not equal. + + - `bigInt(5).notEquals(5)` => `false` + - `bigInt(4).notEquals(7)` => `true` + +#### `or(number)` + +Performs the bitwise OR operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). + + - `bigInt(13).or(10)` => `15` + - `bigInt(13).or(-8)` => `-3` + +#### `over(number)` + +Alias for the `divide` method. + + - `bigInt(59).over(5)` => `11` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `plus(number)` + +Alias for the `add` method. + + - `bigInt(5).plus(7)` => `12` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Addition) + +#### `pow(number)` + +Performs exponentiation. If the exponent is less than `0`, `pow` returns `0`. `bigInt.zero.pow(0)` returns `1`. + + - `bigInt(16).pow(16)` => `18446744073709551616` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Exponentiation) + +#### `prev(number)` + +Subtracts one from the number. + + - `bigInt(6).prev()` => `5` + +#### `remainder(number)` + +Alias for the `mod` method. + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `shiftLeft(n)` + +Shifts the number left by `n` places in its binary representation. If a negative number is provided, it will shift right. Throws an error if `n` is outside of the range `[-9007199254740992, 9007199254740992]`. + + - `bigInt(8).shiftLeft(2)` => `32` + - `bigInt(8).shiftLeft(-2)` => `2` + +#### `shiftRight(n)` + +Shifts the number right by `n` places in its binary representation. If a negative number is provided, it will shift left. Throws an error if `n` is outside of the range `[-9007199254740992, 9007199254740992]`. + + - `bigInt(8).shiftRight(2)` => `2` + - `bigInt(8).shiftRight(-2)` => `32` + +#### `square()` + +Squares the number + + - `bigInt(3).square()` => `9` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Squaring) + +#### `subtract(number)` + +Performs subtraction. + + - `bigInt(3).subtract(5)` => `-2` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Subtraction) + +#### `times(number)` + +Alias for the `multiply` method. + + - `bigInt(111).times(111)` => `12321` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Multiplication) + +#### `toArray(radix)` + +Converts a bigInt into an object with the properties "value" and "isNegative." "Value" is an array of integers modulo the given radix. "isNegative" is a boolean that represents the sign of the result. + + - `bigInt("1e9").toArray(10)` => { + value: [1, 0, 0, 0, 0, 0, 0, 0, 0, 0], + isNegative: false + } + - `bigInt("1e9").toArray(16)` => { + value: [3, 11, 9, 10, 12, 10, 0, 0], + isNegative: false + } + - `bigInt(567890).toArray(100)` => { + value: [56, 78, 90], + isNegative: false + } + +Negative bases are supported. + + - `bigInt(12345).toArray(-10)` => { + value: [2, 8, 4, 6, 5], + isNegative: false + } + +Base 1 and base -1 are also supported. + + - `bigInt(-15).toArray(1)` => { + value: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], + isNegative: true + } + - `bigInt(-15).toArray(-1)` => { + value: [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], + isNegative: false + } + +Base 0 is only allowed for the number zero. + + - `bigInt(0).toArray(0)` => { + value: [0], + isNegative: false + } + - `bigInt(1).toArray(0)` => `Error: Cannot convert nonzero numbers to base 0.` + +#### `toJSNumber()` + +Converts a bigInt into a native Javascript number. Loses precision for numbers outside the range `[-9007199254740992, 9007199254740992]`. + + - `bigInt("18446744073709551616").toJSNumber()` => `18446744073709552000` + +#### `xor(number)` + +Performs the bitwise XOR operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). + + - `bigInt(12).xor(5)` => `9` + - `bigInt(12).xor(-5)` => `-9` + +### Static Methods + +#### `fromArray(digits, base = 10, isNegative?)` + +Constructs a bigInt from an array of digits in base `base`. The optional `isNegative` flag will make the number negative. + + - `bigInt.fromArray([1, 2, 3, 4, 5], 10)` => `12345` + - `bigInt.fromArray([1, 0, 0], 2, true)` => `-4` + +#### `gcd(a, b)` + +Finds the greatest common denominator of `a` and `b`. + + - `bigInt.gcd(42,56)` => `14` + +#### `isInstance(x)` + +Returns `true` if `x` is a BigInteger, `false` otherwise. + + - `bigInt.isInstance(bigInt(14))` => `true` + - `bigInt.isInstance(14)` => `false` + +#### `lcm(a,b)` + +Finds the least common multiple of `a` and `b`. + + - `bigInt.lcm(21, 6)` => `42` + +#### `max(a,b)` + +Returns the largest of `a` and `b`. + + - `bigInt.max(77, 432)` => `432` + +#### `min(a,b)` + +Returns the smallest of `a` and `b`. + + - `bigInt.min(77, 432)` => `77` + +#### `randBetween(min, max, [rng])` + +Returns a random number between `min` and `max`, optionally using `rng` to generate randomness. + + - `bigInt.randBetween("-1e100", "1e100")` => (for example) `8494907165436643479673097939554427056789510374838494147955756275846226209006506706784609314471378745` + +`rng` should take no arguments and return a `number` between 0 and 1. It defaults to `Math.random`. + + - `bigInt.randBetween("-1e100", "1e100", () => 0.5)` => (always) `50000005000000500000050000005000000500000050000005000000500000050000005000000500000050000005000000` + + +### Override Methods + +#### `toString(radix = 10, [alphabet])` + +Converts a bigInt to a string. There is an optional radix parameter (which defaults to 10) that converts the number to the given radix. Digits in the range `10-35` will use the letters `a-z`. + + - `bigInt("1e9").toString()` => `"1000000000"` + - `bigInt("1e9").toString(16)` => `"3b9aca00"` + + You can use a custom base alphabet with the second parameter. The default `alphabet` is `"0123456789abcdefghijklmnopqrstuvwxyz"`. + + - `bigInt("5").toString(2, "aA")` => `"AaA"` + +**Note that arithmetical operators will trigger the `valueOf` function rather than the `toString` function.** When converting a bigInteger to a string, you should use the `toString` method or the `String` function instead of adding the empty string. + + - `bigInt("999999999999999999").toString()` => `"999999999999999999"` + - `String(bigInt("999999999999999999"))` => `"999999999999999999"` + - `bigInt("999999999999999999") + ""` => `1000000000000000000` + +Bases larger than 36 are supported. If a digit is greater than or equal to 36, it will be enclosed in angle brackets. + + - `bigInt(567890).toString(100)` => `"<56><78><90>"` + +Negative bases are also supported. + + - `bigInt(12345).toString(-10)` => `"28465"` + +Base 1 and base -1 are also supported. + + - `bigInt(-15).toString(1)` => `"-111111111111111"` + - `bigInt(-15).toString(-1)` => `"101010101010101010101010101010"` + +Base 0 is only allowed for the number zero. + + - `bigInt(0).toString(0)` => `0` + - `bigInt(1).toString(0)` => `Error: Cannot convert nonzero numbers to base 0.` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#toString) + +#### `valueOf()` + +Converts a bigInt to a native Javascript number. This override allows you to use native arithmetic operators without explicit conversion: + + - `bigInt("100") + bigInt("200") === 300; //true` + +## Contributors + +To contribute, just fork the project, make some changes, and submit a pull request. Please verify that the unit tests pass before submitting. + +The unit tests are contained in the `spec/spec.js` file. You can run them locally by opening the `spec/SpecRunner.html` or file or running `npm test`. You can also [run the tests online from GitHub](http://peterolson.github.io/BigInteger.js/spec/SpecRunner.html). + +There are performance benchmarks that can be viewed from the `benchmarks/index.html` page. You can [run them online from GitHub](http://peterolson.github.io/BigInteger.js/benchmark/). + +## License + +This project is public domain. For more details, read about the [Unlicense](http://unlicense.org/). diff --git a/node_modules/big-integer/bower.json b/node_modules/big-integer/bower.json new file mode 100644 index 0000000..c744605 --- /dev/null +++ b/node_modules/big-integer/bower.json @@ -0,0 +1,29 @@ +{ + "name": "big-integer", + "description": "An arbitrary length integer library for Javascript", + "main": "./BigInteger.js", + "authors": [ + "Peter Olson" + ], + "license": "Unlicense", + "keywords": [ + "math", + "big", + "bignum", + "bigint", + "biginteger", + "integer", + "arbitrary", + "precision", + "arithmetic" + ], + "homepage": "https://github.com/peterolson/BigInteger.js", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "coverage", + "tests" + ] +} diff --git a/node_modules/big-integer/package.json b/node_modules/big-integer/package.json new file mode 100644 index 0000000..093bf9d --- /dev/null +++ b/node_modules/big-integer/package.json @@ -0,0 +1,48 @@ +{ + "name": "big-integer", + "version": "1.6.52", + "author": "Peter Olson ", + "description": "An arbitrary length integer library for Javascript", + "contributors": [], + "bin": {}, + "scripts": { + "test": "tsc && karma start my.conf.js && node spec/tsDefinitions.js", + "minify": "uglifyjs BigInteger.js -o BigInteger.min.js" + }, + "main": "./BigInteger", + "repository": { + "type": "git", + "url": "git@github.com:peterolson/BigInteger.js.git" + }, + "keywords": [ + "math", + "big", + "bignum", + "bigint", + "biginteger", + "integer", + "arbitrary", + "precision", + "arithmetic" + ], + "devDependencies": { + "@types/lodash": "^4.14.175", + "@types/node": "^7.10.2", + "coveralls": "^3.0.6", + "jasmine": "3.5.0", + "jasmine-core": "^3.5.0", + "karma": "^6.3.4", + "karma-cli": "^2.0.0", + "karma-coverage": "^2.0.3", + "karma-jasmine": "^4.0.1", + "karma-phantomjs-launcher": "^1.0.4", + "lodash": "^4.17.21", + "typescript": "^5.3.2", + "uglify-js": "^3.17.4" + }, + "license": "Unlicense", + "engines": { + "node": ">=0.6" + }, + "typings": "./BigInteger.d.ts" +} diff --git a/node_modules/big-integer/tsconfig.json b/node_modules/big-integer/tsconfig.json new file mode 100644 index 0000000..e5eea42 --- /dev/null +++ b/node_modules/big-integer/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "esnext", + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "./", + "moduleResolution": "node", + "allowJs": true, + "typeRoots": [ + "./" + ], + "types": [], + "forceConsistentCasingInFileNames": true + }, + "files": [ + "BigInteger.d.ts", + "spec/tsDefinitions.ts" + ] +} diff --git a/node_modules/bplist-parser/.editorconfig b/node_modules/bplist-parser/.editorconfig new file mode 100644 index 0000000..c6812c1 --- /dev/null +++ b/node_modules/bplist-parser/.editorconfig @@ -0,0 +1,12 @@ +; EditorConfig file: https://EditorConfig.org +; Install the "EditorConfig" plugin into your editor to use + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true diff --git a/node_modules/bplist-parser/.eslintignore b/node_modules/bplist-parser/.eslintignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/node_modules/bplist-parser/.eslintignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/bplist-parser/.eslintrc.js b/node_modules/bplist-parser/.eslintrc.js new file mode 100644 index 0000000..d5bac76 --- /dev/null +++ b/node_modules/bplist-parser/.eslintrc.js @@ -0,0 +1,296 @@ +module.exports = { + "env": { + "mocha": true, + "node": true, + "commonjs": true, + "es6": true + }, + "extends": "eslint:recommended", + "globals": { + "Atomics": "readonly", + "SharedArrayBuffer": "readonly" + }, + "parserOptions": { + "ecmaVersion": 2018 + }, + "rules": { + "accessor-pairs": "error", + "array-bracket-newline": "error", + "array-bracket-spacing": "off", + "array-callback-return": "error", + "array-element-newline": "off", + "arrow-body-style": "error", + "arrow-parens": "error", + "arrow-spacing": "error", + "block-scoped-var": "error", + "block-spacing": "error", + "brace-style": [ + "error", + "1tbs" + ], + "callback-return": "off", + "camelcase": "off", + "capitalized-comments": "off", + "class-methods-use-this": "error", + "comma-dangle": "error", + "comma-spacing": [ + "error", + { + "after": true, + "before": false + } + ], + "comma-style": "error", + "complexity": "error", + "computed-property-spacing": [ + "error", + "never" + ], + "consistent-return": "off", + "consistent-this": "error", + "curly": "off", + "default-case": "error", + "dot-location": "error", + "dot-notation": "off", + "eol-last": "error", + "eqeqeq": "off", + "func-call-spacing": "error", + "func-name-matching": "error", + "func-names": "off", + "func-style": [ + "error", + "declaration" + ], + "function-paren-newline": "error", + "generator-star-spacing": "error", + "global-require": "error", + "guard-for-in": "error", + "handle-callback-err": "error", + "id-blacklist": "error", + "id-length": "off", + "id-match": "error", + "implicit-arrow-linebreak": "error", + "indent": "off", + "indent-legacy": "off", + "init-declarations": "off", + "jsx-quotes": "error", + "key-spacing": "off", + "keyword-spacing": [ + "error", + { + "after": true, + "before": true + } + ], + "line-comment-position": "off", + "linebreak-style": [ + "error", + "unix" + ], + "lines-around-comment": "error", + "lines-around-directive": "error", + "lines-between-class-members": "error", + "max-classes-per-file": "error", + "max-depth": "error", + "max-len": "off", + "max-lines": "off", + "max-lines-per-function": "off", + "max-nested-callbacks": "error", + "max-params": "error", + "max-statements": "off", + "max-statements-per-line": "error", + "multiline-comment-style": [ + "error", + "separate-lines" + ], + "multiline-ternary": "error", + "new-cap": "error", + "new-parens": "error", + "newline-after-var": "off", + "newline-before-return": "off", + "newline-per-chained-call": "error", + "no-alert": "error", + "no-array-constructor": "error", + "no-async-promise-executor": "error", + "no-await-in-loop": "error", + "no-bitwise": "off", + "no-buffer-constructor": "error", + "no-caller": "error", + "no-catch-shadow": "error", + "no-confusing-arrow": "error", + "no-continue": "error", + "no-div-regex": "error", + "no-duplicate-imports": "error", + "no-else-return": "error", + "no-empty-function": "error", + "no-eq-null": "error", + "no-eval": "error", + "no-extend-native": "error", + "no-extra-bind": "error", + "no-extra-label": "error", + "no-extra-parens": "off", + "no-floating-decimal": "error", + "no-implicit-coercion": "error", + "no-implicit-globals": "error", + "no-implied-eval": "error", + "no-inline-comments": "off", + "no-invalid-this": "error", + "no-iterator": "error", + "no-label-var": "error", + "no-labels": "error", + "no-lone-blocks": "error", + "no-lonely-if": "error", + "no-loop-func": "error", + "no-magic-numbers": "off", + "no-misleading-character-class": "error", + "no-mixed-operators": "off", + "no-mixed-requires": "error", + "no-multi-assign": "off", + "no-multi-spaces": [ + "error", + { + "ignoreEOLComments": true + } + ], + "no-multi-str": "error", + "no-multiple-empty-lines": "error", + "no-native-reassign": "error", + "no-negated-condition": "error", + "no-negated-in-lhs": "error", + "no-nested-ternary": "error", + "no-new": "error", + "no-new-func": "error", + "no-new-object": "error", + "no-new-require": "error", + "no-new-wrappers": "error", + "no-octal-escape": "error", + "no-param-reassign": "off", + "no-path-concat": "error", + "no-plusplus": [ + "error", + { + "allowForLoopAfterthoughts": true + } + ], + "no-process-env": "error", + "no-process-exit": "error", + "no-proto": "error", + "no-prototype-builtins": "error", + "no-restricted-globals": "error", + "no-restricted-imports": "error", + "no-restricted-modules": "error", + "no-restricted-properties": "error", + "no-restricted-syntax": "error", + "no-return-assign": "error", + "no-return-await": "error", + "no-script-url": "error", + "no-self-compare": "error", + "no-sequences": "error", + "no-shadow": "off", + "no-shadow-restricted-names": "error", + "no-spaced-func": "error", + // "no-sync": "error", + "no-tabs": "error", + "no-template-curly-in-string": "error", + "no-ternary": "error", + "no-throw-literal": "error", + "no-trailing-spaces": "error", + "no-undef-init": "error", + "no-undefined": "error", + "no-underscore-dangle": "error", + "no-unmodified-loop-condition": "error", + "no-unneeded-ternary": "error", + "no-unused-expressions": "error", + "no-use-before-define": "off", + "no-useless-call": "error", + "no-useless-catch": "error", + "no-useless-computed-key": "error", + "no-useless-concat": "error", + "no-useless-constructor": "error", + "no-useless-rename": "error", + "no-useless-return": "error", + "no-var": "error", + "no-void": "error", + "no-warning-comments": "error", + "no-whitespace-before-property": "error", + "no-with": "error", + "nonblock-statement-body-position": "error", + "object-curly-newline": "error", + "object-curly-spacing": [ + "error", + "never" + ], + "object-property-newline": "error", + "object-shorthand": "error", + "one-var": "off", + "one-var-declaration-per-line": "error", + "operator-assignment": [ + "error", + "always" + ], + "operator-linebreak": "error", + "padded-blocks": "off", + "padding-line-between-statements": "error", + "prefer-arrow-callback": "off", + "prefer-const": "error", + "prefer-destructuring": "error", + "prefer-named-capture-group": "error", + "prefer-numeric-literals": "error", + "prefer-object-spread": "error", + "prefer-promise-reject-errors": "error", + "prefer-reflect": "error", + "prefer-rest-params": "error", + "prefer-spread": "error", + "prefer-template": "off", + "quote-props": "off", + "quotes": "off", + "radix": "error", + "require-atomic-updates": "error", + "require-await": "error", + "require-jsdoc": "off", + "require-unicode-regexp": "error", + "rest-spread-spacing": "error", + "semi": "error", + "semi-spacing": [ + "error", + { + "after": true, + "before": false + } + ], + "semi-style": [ + "error", + "last" + ], + "sort-imports": "error", + "sort-keys": "error", + "sort-vars": "error", + "space-before-blocks": "error", + "space-before-function-paren": "off", + "space-in-parens": [ + "error", + "never" + ], + "space-infix-ops": "off", + "space-unary-ops": "error", + "spaced-comment": "off", + "strict": "error", + "switch-colon-spacing": "error", + "symbol-description": "error", + "template-curly-spacing": "error", + "template-tag-spacing": "error", + "unicode-bom": [ + "error", + "never" + ], + "valid-jsdoc": "error", + "vars-on-top": "error", + "wrap-iife": "error", + "wrap-regex": "error", + "yield-star-spacing": "error", + "yoda": [ + "error", + "never" + ] + } +}; diff --git a/node_modules/bplist-parser/README.md b/node_modules/bplist-parser/README.md new file mode 100644 index 0000000..eb54064 --- /dev/null +++ b/node_modules/bplist-parser/README.md @@ -0,0 +1,48 @@ +# bplist-parser + +Binary Mac OS X Plist (property list) parser. + +## Installation + +```bash +$ npm install bplist-parser +``` + +## Quick Examples + +```javascript +const bplist = require('bplist-parser'); + +(async () => { + + const obj = await bplist.parseFile('myPlist.bplist'); + + console.log(JSON.stringify(obj)); + +})(); +``` + +## License + +(The MIT License) + +Copyright (c) 2012 Near Infinity Corporation + +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/bplist-parser/bplistParser.d.ts b/node_modules/bplist-parser/bplistParser.d.ts new file mode 100644 index 0000000..1064269 --- /dev/null +++ b/node_modules/bplist-parser/bplistParser.d.ts @@ -0,0 +1,8 @@ +declare namespace bPlistParser { + type CallbackFunction = (error: Error|null, result: [T]) => void + export function parseFile(fileNameOrBuffer: string|Buffer, callback?: CallbackFunction): Promise<[T]> + export function parseFileSync(fileNameOrBuffer: string|Buffer): [T] + export function parseBuffer(buffer: string|Buffer): [T] +} + +export = bPlistParser diff --git a/node_modules/bplist-parser/bplistParser.js b/node_modules/bplist-parser/bplistParser.js new file mode 100644 index 0000000..f6fb983 --- /dev/null +++ b/node_modules/bplist-parser/bplistParser.js @@ -0,0 +1,373 @@ +/* eslint-disable no-console */ + +'use strict'; + +// adapted from https://github.com/3breadt/dd-plist + +const fs = require('fs'); +const bigInt = require('big-integer'); +const debug = false; + +exports.maxObjectSize = 100 * 1000 * 1000; // 100Meg +exports.maxObjectCount = 32768; + +// EPOCH = new SimpleDateFormat("yyyy MM dd zzz").parse("2001 01 01 GMT").getTime(); +// ...but that's annoying in a static initializer because it can throw exceptions, ick. +// So we just hardcode the correct value. +const EPOCH = 978307200000; + +// UID object definition +const UID = exports.UID = function(id) { + this.UID = id; +}; + +exports.parseFile = function (fileNameOrBuffer, callback) { + return new Promise(function (resolve, reject) { + function tryParseBuffer(buffer) { + let err = null; + let result; + try { + result = parseBuffer(buffer); + resolve(result); + } catch (ex) { + err = ex; + reject(err); + } finally { + if (callback) callback(err, result); + } + } + + if (Buffer.isBuffer(fileNameOrBuffer)) { + return tryParseBuffer(fileNameOrBuffer); + } + fs.readFile(fileNameOrBuffer, function (err, data) { + if (err) { + reject(err); + return callback(err); + } + tryParseBuffer(data); + }); + }); +}; + +exports.parseFileSync = function (fileNameOrBuffer) { + if (!Buffer.isBuffer(fileNameOrBuffer)) { + fileNameOrBuffer = fs.readFileSync(fileNameOrBuffer); + } + return parseBuffer(fileNameOrBuffer); +}; + +const parseBuffer = exports.parseBuffer = function (buffer) { + // check header + const header = buffer.slice(0, 'bplist'.length).toString('utf8'); + if (header !== 'bplist') { + throw new Error("Invalid binary plist. Expected 'bplist' at offset 0."); + } + + // Handle trailer, last 32 bytes of the file + const trailer = buffer.slice(buffer.length - 32, buffer.length); + // 6 null bytes (index 0 to 5) + const offsetSize = trailer.readUInt8(6); + if (debug) { + console.log("offsetSize: " + offsetSize); + } + const objectRefSize = trailer.readUInt8(7); + if (debug) { + console.log("objectRefSize: " + objectRefSize); + } + const numObjects = readUInt64BE(trailer, 8); + if (debug) { + console.log("numObjects: " + numObjects); + } + const topObject = readUInt64BE(trailer, 16); + if (debug) { + console.log("topObject: " + topObject); + } + const offsetTableOffset = readUInt64BE(trailer, 24); + if (debug) { + console.log("offsetTableOffset: " + offsetTableOffset); + } + + if (numObjects > exports.maxObjectCount) { + throw new Error("maxObjectCount exceeded"); + } + + // Handle offset table + const offsetTable = []; + + for (let i = 0; i < numObjects; i++) { + const offsetBytes = buffer.slice(offsetTableOffset + i * offsetSize, offsetTableOffset + (i + 1) * offsetSize); + offsetTable[i] = readUInt(offsetBytes, 0); + if (debug) { + console.log("Offset for Object #" + i + " is " + offsetTable[i] + " [" + offsetTable[i].toString(16) + "]"); + } + } + + // Parses an object inside the currently parsed binary property list. + // For the format specification check + // + // Apple's binary property list parser implementation. + function parseObject(tableOffset) { + const offset = offsetTable[tableOffset]; + const type = buffer[offset]; + const objType = (type & 0xF0) >> 4; //First 4 bits + const objInfo = (type & 0x0F); //Second 4 bits + switch (objType) { + case 0x0: + return parseSimple(); + case 0x1: + return parseInteger(); + case 0x8: + return parseUID(); + case 0x2: + return parseReal(); + case 0x3: + return parseDate(); + case 0x4: + return parseData(); + case 0x5: // ASCII + return parsePlistString(); + case 0x6: // UTF-16 + return parsePlistString(true); + case 0xA: + return parseArray(); + case 0xD: + return parseDictionary(); + default: + throw new Error("Unhandled type 0x" + objType.toString(16)); + } + + function parseSimple() { + //Simple + switch (objInfo) { + case 0x0: // null + return null; + case 0x8: // false + return false; + case 0x9: // true + return true; + case 0xF: // filler byte + return null; + default: + throw new Error("Unhandled simple type 0x" + objType.toString(16)); + } + } + + function bufferToHexString(buffer) { + let str = ''; + let i; + for (i = 0; i < buffer.length; i++) { + if (buffer[i] != 0x00) { + break; + } + } + for (; i < buffer.length; i++) { + const part = '00' + buffer[i].toString(16); + str += part.substr(part.length - 2); + } + return str; + } + + function parseInteger() { + const length = Math.pow(2, objInfo); + if (length < exports.maxObjectSize) { + const data = buffer.slice(offset + 1, offset + 1 + length); + if (length === 16) { + const str = bufferToHexString(data); + return bigInt(str, 16); + } + return data.reduce((acc, curr) => { + acc <<= 8; + acc |= curr & 255; + return acc; + }); + } + throw new Error("Too little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + + } + + function parseUID() { + const length = objInfo + 1; + if (length < exports.maxObjectSize) { + return new UID(readUInt(buffer.slice(offset + 1, offset + 1 + length))); + } + throw new Error("Too little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + + function parseReal() { + const length = Math.pow(2, objInfo); + if (length < exports.maxObjectSize) { + const realBuffer = buffer.slice(offset + 1, offset + 1 + length); + if (length === 4) { + return realBuffer.readFloatBE(0); + } + if (length === 8) { + return realBuffer.readDoubleBE(0); + } + } else { + throw new Error("Too little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseDate() { + if (objInfo != 0x3) { + console.error("Unknown date type :" + objInfo + ". Parsing anyway..."); + } + const dateBuffer = buffer.slice(offset + 1, offset + 9); + return new Date(EPOCH + (1000 * dateBuffer.readDoubleBE(0))); + } + + function parseData() { + let dataoffset = 1; + let length = objInfo; + if (objInfo == 0xF) { + const int_type = buffer[offset + 1]; + const intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0x4: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + const intInfo = int_type & 0x0F; + const intLength = Math.pow(2, intInfo); + dataoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length < exports.maxObjectSize) { + return buffer.slice(offset + dataoffset, offset + dataoffset + length); + } + throw new Error("Too little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + + function parsePlistString (isUtf16) { + isUtf16 = isUtf16 || 0; + let enc = "utf8"; + let length = objInfo; + let stroffset = 1; + if (objInfo == 0xF) { + const int_type = buffer[offset + 1]; + const intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("UNEXPECTED LENGTH-INT TYPE! " + intType); + } + const intInfo = int_type & 0x0F; + const intLength = Math.pow(2, intInfo); + stroffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + // length is String length -> to get byte length multiply by 2, as 1 character takes 2 bytes in UTF-16 + length *= (isUtf16 + 1); + if (length < exports.maxObjectSize) { + let plistString = Buffer.from(buffer.slice(offset + stroffset, offset + stroffset + length)); + if (isUtf16) { + plistString = swapBytes(plistString); + enc = "ucs2"; + } + return plistString.toString(enc); + } + throw new Error("Too little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + + function parseArray() { + let length = objInfo; + let arrayoffset = 1; + if (objInfo == 0xF) { + const int_type = buffer[offset + 1]; + const intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0xa: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + const intInfo = int_type & 0x0F; + const intLength = Math.pow(2, intInfo); + arrayoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length * objectRefSize > exports.maxObjectSize) { + throw new Error("Too little heap space available!"); + } + const array = []; + for (let i = 0; i < length; i++) { + const objRef = readUInt(buffer.slice(offset + arrayoffset + i * objectRefSize, offset + arrayoffset + (i + 1) * objectRefSize)); + array[i] = parseObject(objRef); + } + return array; + } + + function parseDictionary() { + let length = objInfo; + let dictoffset = 1; + if (objInfo == 0xF) { + const int_type = buffer[offset + 1]; + const intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0xD: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + const intInfo = int_type & 0x0F; + const intLength = Math.pow(2, intInfo); + dictoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length * 2 * objectRefSize > exports.maxObjectSize) { + throw new Error("Too little heap space available!"); + } + if (debug) { + console.log("Parsing dictionary #" + tableOffset); + } + const dict = {}; + for (let i = 0; i < length; i++) { + const keyRef = readUInt(buffer.slice(offset + dictoffset + i * objectRefSize, offset + dictoffset + (i + 1) * objectRefSize)); + const valRef = readUInt(buffer.slice(offset + dictoffset + (length * objectRefSize) + i * objectRefSize, offset + dictoffset + (length * objectRefSize) + (i + 1) * objectRefSize)); + const key = parseObject(keyRef); + const val = parseObject(valRef); + if (debug) { + console.log(" DICT #" + tableOffset + ": Mapped " + key + " to " + val); + } + dict[key] = val; + } + return dict; + } + } + + return [ parseObject(topObject) ]; +}; + +function readUInt(buffer, start) { + start = start || 0; + + let l = 0; + for (let i = start; i < buffer.length; i++) { + l <<= 8; + l |= buffer[i] & 0xFF; + } + return l; +} + +// we're just going to toss the high order bits because javascript doesn't have 64-bit ints +function readUInt64BE(buffer, start) { + const data = buffer.slice(start, start + 8); + return data.readUInt32BE(4, 8); +} + +function swapBytes(buffer) { + const len = buffer.length; + for (let i = 0; i < len; i += 2) { + const a = buffer[i]; + buffer[i] = buffer[i+1]; + buffer[i+1] = a; + } + return buffer; +} diff --git a/node_modules/bplist-parser/package.json b/node_modules/bplist-parser/package.json new file mode 100644 index 0000000..7ea058b --- /dev/null +++ b/node_modules/bplist-parser/package.json @@ -0,0 +1,35 @@ +{ + "name": "bplist-parser", + "version": "0.3.2", + "description": "Binary plist parser.", + "main": "bplistParser.js", + "scripts": { + "test": "mocha test" + }, + "keywords": [ + "bplist", + "plist", + "parser" + ], + "author": "Joe Ferner ", + "contributors": [ + "Brett Zamir" + ], + "license": "MIT", + "devDependencies": { + "eslint": "6.5.x", + "mocha": "6.2.x" + }, + "homepage": "https://github.com/nearinfinity/node-bplist-parser", + "bugs": "https://github.com/nearinfinity/node-bplist-parser/issues", + "engines": { + "node": ">= 5.10.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/nearinfinity/node-bplist-parser.git" + }, + "dependencies": { + "big-integer": "1.6.x" + } +} diff --git a/node_modules/brace-expansion/.github/FUNDING.yml b/node_modules/brace-expansion/.github/FUNDING.yml new file mode 100644 index 0000000..79d1eaf --- /dev/null +++ b/node_modules/brace-expansion/.github/FUNDING.yml @@ -0,0 +1,2 @@ +tidelift: "npm/brace-expansion" +patreon: juliangruber diff --git a/node_modules/brace-expansion/LICENSE b/node_modules/brace-expansion/LICENSE new file mode 100644 index 0000000..de32266 --- /dev/null +++ b/node_modules/brace-expansion/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013 Julian Gruber + +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/brace-expansion/README.md b/node_modules/brace-expansion/README.md new file mode 100644 index 0000000..bda4ed3 --- /dev/null +++ b/node_modules/brace-expansion/README.md @@ -0,0 +1,157 @@ +# brace-expansion + +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +as known from sh/bash, in JavaScript. + +[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) +[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) + +[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) + +## Example + +```js +var expand = require('brace-expansion'); + +expand('file-{a,b,c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('-v{,,}') +// => ['-v', '-v', '-v'] + +expand('file{0..2}.jpg') +// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] + +expand('file-{a..c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('file{2..0}.jpg') +// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] + +expand('file{0..4..2}.jpg') +// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] + +expand('file-{a..e..2}.jpg') +// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] + +expand('file{00..10..5}.jpg') +// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] + +expand('{{A..C},{a..c}}') +// => ['A', 'B', 'C', 'a', 'b', 'c'] + +expand('ppp{,config,oe{,conf}}') +// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] +``` + +## API + +```js +var expand = require('brace-expansion'); +``` + +### var expanded = expand(str, [options]) + +Return an array of all possible and valid expansions of `str`. If none are +found, `[str]` is returned. + +The `options` object can provide a `max` value to cap the number +of expansions allowed. This is limited to `100_000` by default, +to prevent DoS attacks. + +```js +const expansions = expand('{1..100}'.repeat(5), { + max: 100, +}) +// expansions.length will be 100, not 100^5 +``` + +The `options` object can also provide a `maxLength` value to cap the +total number of characters across all expansions. This is limited to +`4_000_000` by default, to prevent memory exhaustion from inputs whose +result count stays under `max` while each result grows very long. + +```js +const expansions = expand('{a,b}'.repeat(1500), { + maxLength: 10_000, +}) +``` + +Valid expansions are: + +```js +/^(.*,)+(.+)?$/ +// {a,b,...} +``` + +A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +A numeric sequence from `x` to `y` inclusive, with optional increment. +If `x` or `y` start with a leading `0`, all the numbers will be padded +to have equal length. Negative numbers and backwards iteration work too. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +An alphabetic sequence from `x` to `y` inclusive, with optional increment. +`x` and `y` must be exactly one character, and if given, `incr` must be a +number. + +For compatibility reasons, the string `${` is not eligible for brace expansion. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install brace-expansion +``` + +## Contributors + +- [Julian Gruber](https://github.com/juliangruber) +- [Isaac Z. Schlueter](https://github.com/isaacs) + +## Sponsors + +This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! + +Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! + +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.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/brace-expansion/index.js b/node_modules/brace-expansion/index.js new file mode 100644 index 0000000..3e0975d --- /dev/null +++ b/node_modules/brace-expansion/index.js @@ -0,0 +1,394 @@ +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +var EXPANSION_MAX = 100000 + +// `EXPANSION_MAX` caps the *number* of expansions, but not their length. An +// input like `'{a,b}'.repeat(1500)` stays under that count - its output is +// truncated to 100k results - while making every result ~1500 characters +// long. The result set, and the intermediate arrays built while combining +// brace sets, then grow large enough to exhaust memory and crash the process +// (CVE-2026-14257). `EXPANSION_MAX_LENGTH` bounds the total number of +// characters the accumulator may hold at any point, so memory stays flat no +// matter how many brace groups are chained. The limit sits well above any +// realistic expansion (100k results hitting `EXPANSION_MAX` measure ~1M +// characters) so legitimate input is unaffected. +var EXPANSION_MAX_LENGTH = 4000000 + +// `expand` recurses once per level of brace *nesting* - both when expanding a +// set's comma members and when re-wrapping a set whose body is a single part. +// The CVE-2026-14257 fix made the *tail* iterative (recursion on `m.post`, one +// level per chained group), which left nesting depth unbounded: about 3,100 +// levels of `{{{...a,b...}}}` - only ~6KB of input - exhausted the native stack +// and crashed the process. `EXPANSION_MAX_DEPTH` bounds how deep the parser +// will follow nesting. It sits far above any realistic pattern and well below +// the depth at which the stack runs out. +var EXPANSION_MAX_DEPTH = 1000 + +// Bash keeps a quirk where a brace group followed by a comma set still expands +// (`{a},b}`). The parser implements it by rewriting the string and restarting +// the scan, absorbing one `}` per pass. `n` trailing braces therefore cost `n` +// full passes over a string that itself grows by one `escClose` sentinel each +// time - quadratic in `n`, with a ~26x constant from the sentinel's length. +// 128KB of `'{a}' + '}'.repeat(n) + ',z}'` blocked the event loop for 27 +// seconds to produce two results. `EXPANSION_MAX_REWRITES` bounds how many +// times the scan may restart. Real `{a},b}` input needs a handful. +var EXPANSION_MAX_REWRITES = 1000 + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Like `target.push(...items)` but doesn't overflow the stack +function pushAll(target, items) { + for (var i = 0; i < items.length; i++) { + target.push(items[i]); + } +} + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + var parts = []; + + // Walk the brace groups iteratively. Recursing on `post` once per group let a + // chain of them exhaust the stack - the parsing-side counterpart to + // the `expand` overflow fixed for CVE-2026-14257, and not something `max` or + // `maxLength` can bound, since it happens before expansion. + // + // The part the next chunk continues + var carry = ''; + + for (;;) { + var m = balanced('{', '}', str); + + if (!m) { + var tail = str.split(','); + tail[0] = carry + tail[0]; + pushAll(parts, tail); + return parts; + } + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[0] = carry + p[0]; + p[p.length-1] += '{' + body + '}'; + + if (!post.length) { + pushAll(parts, p); + return parts; + } + + carry = p.pop(); + pushAll(parts, p); + str = post; + } +} + +function expandTop(str, options) { + if (!str) + return []; + + options = options || {}; + var max = options.max == null ? EXPANSION_MAX : options.max; + var maxLength = options.maxLength == null ? EXPANSION_MAX_LENGTH : options.maxLength; + var maxDepth = options.maxDepth == null ? EXPANSION_MAX_DEPTH : options.maxDepth; + var maxRewrites = options.maxRewrites == null ? EXPANSION_MAX_REWRITES : options.maxRewrites; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), max, maxLength, maxDepth, 0, maxRewrites, true).map(unescapeBraces); +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +// Build `{ acc[a] + pre + values[v] }` for every combination, capping the +// number of results at `max` and the total number of characters at `maxLength`. +// This is the one place output grows, so bounding it here keeps the single +// accumulator - and therefore memory - flat regardless of how many brace groups +// are combined (CVE-2026-14257). +function combine( + acc, + pre, + values, + max, + maxLength, + dropEmpties +) { + var out = [] + var length = 0 + for (var a = 0; a < acc.length; a++) { + for (var v = 0; v < values.length; v++) { + if (out.length >= max) return out + var expansion = acc[a] + pre + values[v] + // Bash drops empty results at the top level. Skip them before they count + // against `max`, so `max` bounds the number of *kept* results. + if (dropEmpties && !expansion) continue + if (length + expansion.length > maxLength) return out + out.push(expansion) + length += expansion.length + } + } + return out +} + +// The expansion values of a single numeric (`1..5`) or alphabetic (`a..e..2`) +// sequence body. +function expandSequence( + body, + isAlphaSequence, + max, + maxLength +) { + var n = body.split(/\.\./) + var N = [] + // A sequence body always splits into two or three parts, but the compiler + // can't know that. + /* c8 ignore start */ + if (n[0] === undefined || n[1] === undefined) { + return N + } + /* c8 ignore stop */ + var x = numeric(n[0]) + var y = numeric(n[1]) + var width = Math.max(n[0].length, n[1].length) + var incr = + n.length === 3 && n[2] !== undefined ? + Math.max(Math.abs(numeric(n[2])), 1) + : 1 + var test = lte + var reverse = y < x + if (reverse) { + incr *= -1 + test = gte + } + var pad = n.some(isPadded) + + var length = 0 + for (var i = x; test(i, y) && N.length < max; i += incr) { + var c + if (isAlphaSequence) { + c = String.fromCharCode(i) + if (c === '\\') { + c = '' + } + } else { + c = String(i) + if (pad) { + var need = width - c.length + if (need > 0) { + var z = new Array(need + 1).join('0') + if (i < 0) { + c = '-' + z + c.slice(1) + } else { + c = z + c + } + } + } + } + if (length + c.length > maxLength) break + N.push(c) + length += c.length + } + return N +} + +function expand( + str, + max, + maxLength, + maxDepth, + depth, + maxRewrites, + isTop +) { + // Too deeply nested to keep following: treat the rest as literal, the same + // way a group that cannot expand is already handled. Truncating rather than + // throwing keeps expansion total, matching `max` and `maxLength`. + if (depth > maxDepth) { + return [str]; + } + + // Consume the string's top-level brace groups left to right, threading a + // running set of combined prefixes (`acc`). Expanding the tail iteratively - + // rather than recursing on `m.post` once per group - keeps the native stack + // depth constant, so deeply chained input (`'{a,b}'.repeat(3000)`) can no + // longer overflow the stack, and leaves a single accumulator whose size + // `maxLength` bounds directly (CVE-2026-14257). + var acc = [''] + + // Bash drops empty results, but only when the *first* top-level group is a + // comma set - a sequence like `{a..\}` may legitimately yield ''. The drop + // is on the final strings, so it is applied to whichever `combine` produces + // them (the one with no brace set left in the tail). + // How many times the `{a},b}` rewrite below has restarted the scan. Each pass + // re-reads the whole string, so leaving this unbounded is quadratic. + var rewrites = 0 + var dropEmpties = false + var firstGroup = true + + for (;;) { + const m = balanced('{', '}', str) + + // No brace set left: the rest of the string is literal. + if (!m) { + return combine(acc, str, [''], max, maxLength, dropEmpties) + } + + // no need to expand pre, since it is guaranteed to be free of brace-sets + const pre = m.pre + + if (/\$$/.test(pre)) { + acc = combine( + acc, + pre + '{' + m.body + '}', + [''], + max, + maxLength, + dropEmpties && !m.post.length + ) + firstGroup = false + if (!m.post.length) break + str = m.post + continue + } + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (rewrites < maxRewrites && m.post.match(/,(?!,).*\}/)) { + rewrites++; + str = m.pre + '{' + m.body + escClose + m.post; + isTop = true; + continue; + } + // Nothing here expands, so the whole remaining string is literal. + return combine( + acc, + pre + '{' + m.body + '}' + m.post, + [''], + max, + maxLength, + dropEmpties + ) + } + + if (firstGroup) { + dropEmpties = isTop && !isSequence + firstGroup = false + } + + var values; + if (isSequence) { + values = expandSequence(m.body, isAlphaSequence, max, maxLength); + } else { + var n = parseCommaParts(m.body); + if (n.length === 1 && n[0] !== undefined) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], max, maxLength, maxDepth, depth + 1, maxRewrites, false).map(embrace); + //XXX is this necessary? Can't seem to hit it in tests. + /* c8 ignore start */ + if (n.length === 1) { + acc = combine( + acc, + pre + n[0], + [''], + max, + maxLength, + dropEmpties && !m.post.length + ) + if (!m.post.length) break + str = m.post + continue + } + /* c8 ignore stop */ + } + + // Values that `combine` is going to drop as empty produce no result, so + // they must not count against `max` - otherwise `{a,,b}` with `max: 2` + // would stop at `['a', '']` and yield one result instead of two. Skipping + // them outright keeps `values` bounded while leaving `max` a bound on + // *kept* results. + var dropsEmpties = dropEmpties && !m.post.length && !pre + for (var d = 0; dropsEmpties && d < acc.length; d++) { + if (acc[d]) { + dropsEmpties = false + } + } + + values = [] + var valuesLength = 0 + outer: for (var j = 0; j < n.length; j++) { + var expanded = expand(n[j], max, maxLength, maxDepth, depth + 1, maxRewrites, false) + for (var k = 0; k < expanded.length; k++) { + var v = expanded[k] + if (dropsEmpties && !v) continue + if (values.length >= max || valuesLength + v.length > maxLength) { + break outer + } + values.push(v) + valuesLength += v.length + } + } + } + + acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length) + if (!m.post.length) break + str = m.post + } + + return acc +} diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json new file mode 100644 index 0000000..4c64599 --- /dev/null +++ b/node_modules/brace-expansion/package.json @@ -0,0 +1,49 @@ +{ + "name": "brace-expansion", + "description": "Brace expansion as known from sh/bash", + "version": "2.1.7", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "homepage": "https://github.com/juliangruber/brace-expansion", + "main": "index.js", + "scripts": { + "test": "tape test/*.js", + "gentest": "bash test/generate.sh", + "bench": "matcha test/perf/bench.js" + }, + "dependencies": { + "balanced-match": "^1.0.0" + }, + "devDependencies": { + "@c4312/matcha": "^1.3.1", + "tape": "^4.6.0" + }, + "keywords": [], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..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" + ] + }, + "publishConfig": { + "tag": "2.x" + } +} diff --git a/node_modules/buffer-crc32/LICENSE b/node_modules/buffer-crc32/LICENSE new file mode 100644 index 0000000..4cef10e --- /dev/null +++ b/node_modules/buffer-crc32/LICENSE @@ -0,0 +1,19 @@ +The MIT License + +Copyright (c) 2013 Brian J. Brennan + +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/buffer-crc32/README.md b/node_modules/buffer-crc32/README.md new file mode 100644 index 0000000..0d9d8b8 --- /dev/null +++ b/node_modules/buffer-crc32/README.md @@ -0,0 +1,47 @@ +# buffer-crc32 + +[![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32) + +crc32 that works with binary data and fancy character sets, outputs +buffer, signed or unsigned data and has tests. + +Derived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix + +# install +``` +npm install buffer-crc32 +``` + +# example +```js +var crc32 = require('buffer-crc32'); +// works with buffers +var buf = Buffer([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00]) +crc32(buf) // -> + +// has convenience methods for getting signed or unsigned ints +crc32.signed(buf) // -> -1805997238 +crc32.unsigned(buf) // -> 2488970058 + +// will cast to buffer if given a string, so you can +// directly use foreign characters safely +crc32('自動販売機') // -> + +// and works in append mode too +var partialCrc = crc32('hey'); +var partialCrc = crc32(' ', partialCrc); +var partialCrc = crc32('sup', partialCrc); +var partialCrc = crc32(' ', partialCrc); +var finalCrc = crc32('bros', partialCrc); // -> +``` + +# tests +This was tested against the output of zlib's crc32 method. You can run +the tests with`npm test` (requires tap) + +# see also +https://github.com/alexgorbatchev/node-crc, `crc.buffer.crc32` also +supports buffer inputs and return unsigned ints (thanks @tjholowaychuk). + +# license +MIT/X11 diff --git a/node_modules/buffer-crc32/index.js b/node_modules/buffer-crc32/index.js new file mode 100644 index 0000000..6727dd3 --- /dev/null +++ b/node_modules/buffer-crc32/index.js @@ -0,0 +1,111 @@ +var Buffer = require('buffer').Buffer; + +var CRC_TABLE = [ + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, + 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, + 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, + 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, + 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, + 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, + 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, + 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, + 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, + 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, + 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, + 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, + 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, + 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, + 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, + 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, + 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, + 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, + 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, + 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, + 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, + 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, + 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, + 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, + 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, + 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, + 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, + 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, + 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, + 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, + 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, + 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, + 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, + 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, + 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, + 0x2d02ef8d +]; + +if (typeof Int32Array !== 'undefined') { + CRC_TABLE = new Int32Array(CRC_TABLE); +} + +function ensureBuffer(input) { + if (Buffer.isBuffer(input)) { + return input; + } + + var hasNewBufferAPI = + typeof Buffer.alloc === "function" && + typeof Buffer.from === "function"; + + if (typeof input === "number") { + return hasNewBufferAPI ? Buffer.alloc(input) : new Buffer(input); + } + else if (typeof input === "string") { + return hasNewBufferAPI ? Buffer.from(input) : new Buffer(input); + } + else { + throw new Error("input must be buffer, number, or string, received " + + typeof input); + } +} + +function bufferizeInt(num) { + var tmp = ensureBuffer(4); + tmp.writeInt32BE(num, 0); + return tmp; +} + +function _crc32(buf, previous) { + buf = ensureBuffer(buf); + if (Buffer.isBuffer(previous)) { + previous = previous.readUInt32BE(0); + } + var crc = ~~previous ^ -1; + for (var n = 0; n < buf.length; n++) { + crc = CRC_TABLE[(crc ^ buf[n]) & 0xff] ^ (crc >>> 8); + } + return (crc ^ -1); +} + +function crc32() { + return bufferizeInt(_crc32.apply(null, arguments)); +} +crc32.signed = function () { + return _crc32.apply(null, arguments); +}; +crc32.unsigned = function () { + return _crc32.apply(null, arguments) >>> 0; +}; + +module.exports = crc32; diff --git a/node_modules/buffer-crc32/package.json b/node_modules/buffer-crc32/package.json new file mode 100644 index 0000000..e896bec --- /dev/null +++ b/node_modules/buffer-crc32/package.json @@ -0,0 +1,39 @@ +{ + "author": "Brian J. Brennan ", + "name": "buffer-crc32", + "description": "A pure javascript CRC32 algorithm that plays nice with binary data", + "version": "0.2.13", + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/brianloveswords/buffer-crc32/raw/master/LICENSE" + } + ], + "contributors": [ + { + "name": "Vladimir Kuznetsov", + "github": "mistakster" + } + ], + "homepage": "https://github.com/brianloveswords/buffer-crc32", + "repository": { + "type": "git", + "url": "git://github.com/brianloveswords/buffer-crc32.git" + }, + "main": "index.js", + "scripts": { + "test": "./node_modules/.bin/tap tests/*.test.js" + }, + "dependencies": {}, + "devDependencies": { + "tap": "~0.2.5" + }, + "optionalDependencies": {}, + "engines": { + "node": "*" + }, + "license": "MIT", + "files": [ + "index.js" + ] +} diff --git a/node_modules/chownr/LICENSE b/node_modules/chownr/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/chownr/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and 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/chownr/README.md b/node_modules/chownr/README.md new file mode 100644 index 0000000..70e9a54 --- /dev/null +++ b/node_modules/chownr/README.md @@ -0,0 +1,3 @@ +Like `chown -R`. + +Takes the same arguments as `fs.chown()` diff --git a/node_modules/chownr/chownr.js b/node_modules/chownr/chownr.js new file mode 100644 index 0000000..0d40932 --- /dev/null +++ b/node_modules/chownr/chownr.js @@ -0,0 +1,167 @@ +'use strict' +const fs = require('fs') +const path = require('path') + +/* istanbul ignore next */ +const LCHOWN = fs.lchown ? 'lchown' : 'chown' +/* istanbul ignore next */ +const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync' + +/* istanbul ignore next */ +const needEISDIRHandled = fs.lchown && + !process.version.match(/v1[1-9]+\./) && + !process.version.match(/v10\.[6-9]/) + +const lchownSync = (path, uid, gid) => { + try { + return fs[LCHOWNSYNC](path, uid, gid) + } catch (er) { + if (er.code !== 'ENOENT') + throw er + } +} + +/* istanbul ignore next */ +const chownSync = (path, uid, gid) => { + try { + return fs.chownSync(path, uid, gid) + } catch (er) { + if (er.code !== 'ENOENT') + throw er + } +} + +/* istanbul ignore next */ +const handleEISDIR = + needEISDIRHandled ? (path, uid, gid, cb) => er => { + // Node prior to v10 had a very questionable implementation of + // fs.lchown, which would always try to call fs.open on a directory + // Fall back to fs.chown in those cases. + if (!er || er.code !== 'EISDIR') + cb(er) + else + fs.chown(path, uid, gid, cb) + } + : (_, __, ___, cb) => cb + +/* istanbul ignore next */ +const handleEISDirSync = + needEISDIRHandled ? (path, uid, gid) => { + try { + return lchownSync(path, uid, gid) + } catch (er) { + if (er.code !== 'EISDIR') + throw er + chownSync(path, uid, gid) + } + } + : (path, uid, gid) => lchownSync(path, uid, gid) + +// fs.readdir could only accept an options object as of node v6 +const nodeVersion = process.version +let readdir = (path, options, cb) => fs.readdir(path, options, cb) +let readdirSync = (path, options) => fs.readdirSync(path, options) +/* istanbul ignore next */ +if (/^v4\./.test(nodeVersion)) + readdir = (path, options, cb) => fs.readdir(path, cb) + +const chown = (cpath, uid, gid, cb) => { + fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, er => { + // Skip ENOENT error + cb(er && er.code !== 'ENOENT' ? er : null) + })) +} + +const chownrKid = (p, child, uid, gid, cb) => { + if (typeof child === 'string') + return fs.lstat(path.resolve(p, child), (er, stats) => { + // Skip ENOENT error + if (er) + return cb(er.code !== 'ENOENT' ? er : null) + stats.name = child + chownrKid(p, stats, uid, gid, cb) + }) + + if (child.isDirectory()) { + chownr(path.resolve(p, child.name), uid, gid, er => { + if (er) + return cb(er) + const cpath = path.resolve(p, child.name) + chown(cpath, uid, gid, cb) + }) + } else { + const cpath = path.resolve(p, child.name) + chown(cpath, uid, gid, cb) + } +} + + +const chownr = (p, uid, gid, cb) => { + readdir(p, { withFileTypes: true }, (er, children) => { + // any error other than ENOTDIR or ENOTSUP means it's not readable, + // or doesn't exist. give up. + if (er) { + if (er.code === 'ENOENT') + return cb() + else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP') + return cb(er) + } + if (er || !children.length) + return chown(p, uid, gid, cb) + + let len = children.length + let errState = null + const then = er => { + if (errState) + return + if (er) + return cb(errState = er) + if (-- len === 0) + return chown(p, uid, gid, cb) + } + + children.forEach(child => chownrKid(p, child, uid, gid, then)) + }) +} + +const chownrKidSync = (p, child, uid, gid) => { + if (typeof child === 'string') { + try { + const stats = fs.lstatSync(path.resolve(p, child)) + stats.name = child + child = stats + } catch (er) { + if (er.code === 'ENOENT') + return + else + throw er + } + } + + if (child.isDirectory()) + chownrSync(path.resolve(p, child.name), uid, gid) + + handleEISDirSync(path.resolve(p, child.name), uid, gid) +} + +const chownrSync = (p, uid, gid) => { + let children + try { + children = readdirSync(p, { withFileTypes: true }) + } catch (er) { + if (er.code === 'ENOENT') + return + else if (er.code === 'ENOTDIR' || er.code === 'ENOTSUP') + return handleEISDirSync(p, uid, gid) + else + throw er + } + + if (children && children.length) + children.forEach(child => chownrKidSync(p, child, uid, gid)) + + return handleEISDirSync(p, uid, gid) +} + +module.exports = chownr +chownr.sync = chownrSync diff --git a/node_modules/chownr/package.json b/node_modules/chownr/package.json new file mode 100644 index 0000000..5b0214c --- /dev/null +++ b/node_modules/chownr/package.json @@ -0,0 +1,32 @@ +{ + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "name": "chownr", + "description": "like `chown -R`", + "version": "2.0.0", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/chownr.git" + }, + "main": "chownr.js", + "files": [ + "chownr.js" + ], + "devDependencies": { + "mkdirp": "0.3", + "rimraf": "^2.7.1", + "tap": "^14.10.6" + }, + "tap": { + "check-coverage": true + }, + "scripts": { + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags" + }, + "license": "ISC", + "engines": { + "node": ">=10" + } +} diff --git a/node_modules/color-convert/CHANGELOG.md b/node_modules/color-convert/CHANGELOG.md new file mode 100644 index 0000000..0a7bce4 --- /dev/null +++ b/node_modules/color-convert/CHANGELOG.md @@ -0,0 +1,54 @@ +# 1.0.0 - 2016-01-07 + +- Removed: unused speed test +- Added: Automatic routing between previously unsupported conversions +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Removed: `convert()` class +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Changed: all functions to lookup dictionary +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Changed: `ansi` to `ansi256` +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Fixed: argument grouping for functions requiring only one argument +([#27](https://github.com/Qix-/color-convert/pull/27)) + +# 0.6.0 - 2015-07-23 + +- Added: methods to handle +[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors: + - rgb2ansi16 + - rgb2ansi + - hsl2ansi16 + - hsl2ansi + - hsv2ansi16 + - hsv2ansi + - hwb2ansi16 + - hwb2ansi + - cmyk2ansi16 + - cmyk2ansi + - keyword2ansi16 + - keyword2ansi + - ansi162rgb + - ansi162hsl + - ansi162hsv + - ansi162hwb + - ansi162cmyk + - ansi162keyword + - ansi2rgb + - ansi2hsl + - ansi2hsv + - ansi2hwb + - ansi2cmyk + - ansi2keyword +([#18](https://github.com/harthur/color-convert/pull/18)) + +# 0.5.3 - 2015-06-02 + +- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]` +([#15](https://github.com/harthur/color-convert/issues/15)) + +--- + +Check out commit logs for older releases diff --git a/node_modules/color-convert/LICENSE b/node_modules/color-convert/LICENSE new file mode 100644 index 0000000..5b4c386 --- /dev/null +++ b/node_modules/color-convert/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2011-2016 Heather Arthur + +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/color-convert/README.md b/node_modules/color-convert/README.md new file mode 100644 index 0000000..d4b08fc --- /dev/null +++ b/node_modules/color-convert/README.md @@ -0,0 +1,68 @@ +# color-convert + +[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert) + +Color-convert is a color conversion library for JavaScript and node. +It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest): + +```js +var convert = require('color-convert'); + +convert.rgb.hsl(140, 200, 100); // [96, 48, 59] +convert.keyword.rgb('blue'); // [0, 0, 255] + +var rgbChannels = convert.rgb.channels; // 3 +var cmykChannels = convert.cmyk.channels; // 4 +var ansiChannels = convert.ansi16.channels; // 1 +``` + +# Install + +```console +$ npm install color-convert +``` + +# API + +Simply get the property of the _from_ and _to_ conversion that you're looking for. + +All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function. + +All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha). + +```js +var convert = require('color-convert'); + +// Hex to LAB +convert.hex.lab('DEADBF'); // [ 76, 21, -2 ] +convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ] + +// RGB to CMYK +convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ] +convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ] +``` + +### Arrays +All functions that accept multiple arguments also support passing an array. + +Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.) + +```js +var convert = require('color-convert'); + +convert.rgb.hex(123, 45, 67); // '7B2D43' +convert.rgb.hex([123, 45, 67]); // '7B2D43' +``` + +## Routing + +Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex). + +Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js). + +# Contribute + +If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request. + +# License +Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE). diff --git a/node_modules/color-convert/conversions.js b/node_modules/color-convert/conversions.js new file mode 100644 index 0000000..2657f26 --- /dev/null +++ b/node_modules/color-convert/conversions.js @@ -0,0 +1,839 @@ +/* MIT license */ +/* eslint-disable no-mixed-operators */ +const cssKeywords = require('color-name'); + +// NOTE: conversions should only return primitive values (i.e. arrays, or +// values that give correct `typeof` results). +// do not use box values types (i.e. Number(), String(), etc.) + +const reverseKeywords = {}; +for (const key of Object.keys(cssKeywords)) { + reverseKeywords[cssKeywords[key]] = key; +} + +const convert = { + rgb: {channels: 3, labels: 'rgb'}, + hsl: {channels: 3, labels: 'hsl'}, + hsv: {channels: 3, labels: 'hsv'}, + hwb: {channels: 3, labels: 'hwb'}, + cmyk: {channels: 4, labels: 'cmyk'}, + xyz: {channels: 3, labels: 'xyz'}, + lab: {channels: 3, labels: 'lab'}, + lch: {channels: 3, labels: 'lch'}, + hex: {channels: 1, labels: ['hex']}, + keyword: {channels: 1, labels: ['keyword']}, + ansi16: {channels: 1, labels: ['ansi16']}, + ansi256: {channels: 1, labels: ['ansi256']}, + hcg: {channels: 3, labels: ['h', 'c', 'g']}, + apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, + gray: {channels: 1, labels: ['gray']} +}; + +module.exports = convert; + +// Hide .channels and .labels properties +for (const model of Object.keys(convert)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + const {channels, labels} = convert[model]; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', {value: channels}); + Object.defineProperty(convert[model], 'labels', {value: labels}); +} + +convert.rgb.hsl = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const min = Math.min(r, g, b); + const max = Math.max(r, g, b); + const delta = max - min; + let h; + let s; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + const l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; +}; + +convert.rgb.hsv = function (rgb) { + let rdif; + let gdif; + let bdif; + let h; + let s; + + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const v = Math.max(r, g, b); + const diff = v - Math.min(r, g, b); + const diffc = function (c) { + return (v - c) / 6 / diff + 1 / 2; + }; + + if (diff === 0) { + h = 0; + s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = (1 / 3) + rdif - bdif; + } else if (b === v) { + h = (2 / 3) + gdif - rdif; + } + + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } + } + + return [ + h * 360, + s * 100, + v * 100 + ]; +}; + +convert.rgb.hwb = function (rgb) { + const r = rgb[0]; + const g = rgb[1]; + let b = rgb[2]; + const h = convert.rgb.hsl(rgb)[0]; + const w = 1 / 255 * Math.min(r, Math.min(g, b)); + + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + + return [h, w * 100, b * 100]; +}; + +convert.rgb.cmyk = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + + const k = Math.min(1 - r, 1 - g, 1 - b); + const c = (1 - r - k) / (1 - k) || 0; + const m = (1 - g - k) / (1 - k) || 0; + const y = (1 - b - k) / (1 - k) || 0; + + return [c * 100, m * 100, y * 100, k * 100]; +}; + +function comparativeDistance(x, y) { + /* + See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance + */ + return ( + ((x[0] - y[0]) ** 2) + + ((x[1] - y[1]) ** 2) + + ((x[2] - y[2]) ** 2) + ); +} + +convert.rgb.keyword = function (rgb) { + const reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + + let currentClosestDistance = Infinity; + let currentClosestKeyword; + + for (const keyword of Object.keys(cssKeywords)) { + const value = cssKeywords[keyword]; + + // Compute comparative distance + const distance = comparativeDistance(rgb, value); + + // Check if its less, if so set as closest + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + + return currentClosestKeyword; +}; + +convert.keyword.rgb = function (keyword) { + return cssKeywords[keyword]; +}; + +convert.rgb.xyz = function (rgb) { + let r = rgb[0] / 255; + let g = rgb[1] / 255; + let b = rgb[2] / 255; + + // Assume sRGB + r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92); + g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92); + b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92); + + const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); + const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); + const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); + + return [x * 100, y * 100, z * 100]; +}; + +convert.rgb.lab = function (rgb) { + const xyz = convert.rgb.xyz(rgb); + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); + + const l = (116 * y) - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.hsl.rgb = function (hsl) { + const h = hsl[0] / 360; + const s = hsl[1] / 100; + const l = hsl[2] / 100; + let t2; + let t3; + let val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + const t1 = 2 * l - t2; + + const rgb = [0, 0, 0]; + for (let i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; +}; + +convert.hsl.hsv = function (hsl) { + const h = hsl[0]; + let s = hsl[1] / 100; + let l = hsl[2] / 100; + let smin = s; + const lmin = Math.max(l, 0.01); + + l *= 2; + s *= (l <= 1) ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + const v = (l + s) / 2; + const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); + + return [h, sv * 100, v * 100]; +}; + +convert.hsv.rgb = function (hsv) { + const h = hsv[0] / 60; + const s = hsv[1] / 100; + let v = hsv[2] / 100; + const hi = Math.floor(h) % 6; + + const f = h - Math.floor(h); + const p = 255 * v * (1 - s); + const q = 255 * v * (1 - (s * f)); + const t = 255 * v * (1 - (s * (1 - f))); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } +}; + +convert.hsv.hsl = function (hsv) { + const h = hsv[0]; + const s = hsv[1] / 100; + const v = hsv[2] / 100; + const vmin = Math.max(v, 0.01); + let sl; + let l; + + l = (2 - s) * v; + const lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= (lmin <= 1) ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + + return [h, sl * 100, l * 100]; +}; + +// http://dev.w3.org/csswg/css-color/#hwb-to-rgb +convert.hwb.rgb = function (hwb) { + const h = hwb[0] / 360; + let wh = hwb[1] / 100; + let bl = hwb[2] / 100; + const ratio = wh + bl; + let f; + + // Wh + bl cant be > 1 + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + const i = Math.floor(6 * h); + const v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + const n = wh + f * (v - wh); // Linear interpolation + + let r; + let g; + let b; + /* eslint-disable max-statements-per-line,no-multi-spaces */ + switch (i) { + default: + case 6: + case 0: r = v; g = n; b = wh; break; + case 1: r = n; g = v; b = wh; break; + case 2: r = wh; g = v; b = n; break; + case 3: r = wh; g = n; b = v; break; + case 4: r = n; g = wh; b = v; break; + case 5: r = v; g = wh; b = n; break; + } + /* eslint-enable max-statements-per-line,no-multi-spaces */ + + return [r * 255, g * 255, b * 255]; +}; + +convert.cmyk.rgb = function (cmyk) { + const c = cmyk[0] / 100; + const m = cmyk[1] / 100; + const y = cmyk[2] / 100; + const k = cmyk[3] / 100; + + const r = 1 - Math.min(1, c * (1 - k) + k); + const g = 1 - Math.min(1, m * (1 - k) + k); + const b = 1 - Math.min(1, y * (1 - k) + k); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.rgb = function (xyz) { + const x = xyz[0] / 100; + const y = xyz[1] / 100; + const z = xyz[2] / 100; + let r; + let g; + let b; + + r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); + g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); + b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); + + // Assume sRGB + r = r > 0.0031308 + ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055) + : r * 12.92; + + g = g > 0.0031308 + ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055) + : g * 12.92; + + b = b > 0.0031308 + ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055) + : b * 12.92; + + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.lab = function (xyz) { + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); + + const l = (116 * y) - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.lab.xyz = function (lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let x; + let y; + let z; + + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + + const y2 = y ** 3; + const x2 = x ** 3; + const z2 = z ** 3; + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + + x *= 95.047; + y *= 100; + z *= 108.883; + + return [x, y, z]; +}; + +convert.lab.lch = function (lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let h; + + const hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + const c = Math.sqrt(a * a + b * b); + + return [l, c, h]; +}; + +convert.lch.lab = function (lch) { + const l = lch[0]; + const c = lch[1]; + const h = lch[2]; + + const hr = h / 360 * 2 * Math.PI; + const a = c * Math.cos(hr); + const b = c * Math.sin(hr); + + return [l, a, b]; +}; + +convert.rgb.ansi16 = function (args, saturation = null) { + const [r, g, b] = args; + let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization + + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + let ansi = 30 + + ((Math.round(b / 255) << 2) + | (Math.round(g / 255) << 1) + | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; +}; + +convert.hsv.ansi16 = function (args) { + // Optimization here; we already know the value and don't need to get + // it converted for us. + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); +}; + +convert.rgb.ansi256 = function (args) { + const r = args[0]; + const g = args[1]; + const b = args[2]; + + // We use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round(((r - 8) / 247) * 24) + 232; + } + + const ansi = 16 + + (36 * Math.round(r / 255 * 5)) + + (6 * Math.round(g / 255 * 5)) + + Math.round(b / 255 * 5); + + return ansi; +}; + +convert.ansi16.rgb = function (args) { + let color = args % 10; + + // Handle greyscale + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + + return [color, color, color]; + } + + const mult = (~~(args > 50) + 1) * 0.5; + const r = ((color & 1) * mult) * 255; + const g = (((color >> 1) & 1) * mult) * 255; + const b = (((color >> 2) & 1) * mult) * 255; + + return [r, g, b]; +}; + +convert.ansi256.rgb = function (args) { + // Handle greyscale + if (args >= 232) { + const c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + + let rem; + const r = Math.floor(args / 36) / 5 * 255; + const g = Math.floor((rem = args % 36) / 6) / 5 * 255; + const b = (rem % 6) / 5 * 255; + + return [r, g, b]; +}; + +convert.rgb.hex = function (args) { + const integer = ((Math.round(args[0]) & 0xFF) << 16) + + ((Math.round(args[1]) & 0xFF) << 8) + + (Math.round(args[2]) & 0xFF); + + const string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.hex.rgb = function (args) { + const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + + let colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(char => { + return char + char; + }).join(''); + } + + const integer = parseInt(colorString, 16); + const r = (integer >> 16) & 0xFF; + const g = (integer >> 8) & 0xFF; + const b = integer & 0xFF; + + return [r, g, b]; +}; + +convert.rgb.hcg = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const max = Math.max(Math.max(r, g), b); + const min = Math.min(Math.min(r, g), b); + const chroma = (max - min); + let grayscale; + let hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else + if (max === r) { + hue = ((g - b) / chroma) % 6; + } else + if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma; + } + + hue /= 6; + hue %= 1; + + return [hue * 360, chroma * 100, grayscale * 100]; +}; + +convert.hsl.hcg = function (hsl) { + const s = hsl[1] / 100; + const l = hsl[2] / 100; + + const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l)); + + let f = 0; + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; +}; + +convert.hsv.hcg = function (hsv) { + const s = hsv[1] / 100; + const v = hsv[2] / 100; + + const c = s * v; + let f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; +}; + +convert.hcg.rgb = function (hcg) { + const h = hcg[0] / 360; + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + const pure = [0, 0, 0]; + const hi = (h % 1) * 6; + const v = hi % 1; + const w = 1 - v; + let mg = 0; + + /* eslint-disable max-statements-per-line */ + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; pure[1] = v; pure[2] = 0; break; + case 1: + pure[0] = w; pure[1] = 1; pure[2] = 0; break; + case 2: + pure[0] = 0; pure[1] = 1; pure[2] = v; break; + case 3: + pure[0] = 0; pure[1] = w; pure[2] = 1; break; + case 4: + pure[0] = v; pure[1] = 0; pure[2] = 1; break; + default: + pure[0] = 1; pure[1] = 0; pure[2] = w; + } + /* eslint-enable max-statements-per-line */ + + mg = (1.0 - c) * g; + + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; +}; + +convert.hcg.hsv = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + const v = c + g * (1.0 - c); + let f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; +}; + +convert.hcg.hsl = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + const l = g * (1.0 - c) + 0.5 * c; + let s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else + if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; +}; + +convert.hcg.hwb = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + const v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; +}; + +convert.hwb.hcg = function (hwb) { + const w = hwb[1] / 100; + const b = hwb[2] / 100; + const v = 1 - b; + const c = v - w; + let g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; +}; + +convert.apple.rgb = function (apple) { + return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; +}; + +convert.rgb.apple = function (rgb) { + return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; +}; + +convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; +}; + +convert.gray.hsl = function (args) { + return [0, 0, args[0]]; +}; + +convert.gray.hsv = convert.gray.hsl; + +convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; +}; + +convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; +}; + +convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; +}; + +convert.gray.hex = function (gray) { + const val = Math.round(gray[0] / 100 * 255) & 0xFF; + const integer = (val << 16) + (val << 8) + val; + + const string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.rgb.gray = function (rgb) { + const val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; +}; diff --git a/node_modules/color-convert/index.js b/node_modules/color-convert/index.js new file mode 100644 index 0000000..b648e57 --- /dev/null +++ b/node_modules/color-convert/index.js @@ -0,0 +1,81 @@ +const conversions = require('./conversions'); +const route = require('./route'); + +const convert = {}; + +const models = Object.keys(conversions); + +function wrapRaw(fn) { + const wrappedFn = function (...args) { + const arg0 = args[0]; + if (arg0 === undefined || arg0 === null) { + return arg0; + } + + if (arg0.length > 1) { + args = arg0; + } + + return fn(args); + }; + + // Preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +function wrapRounded(fn) { + const wrappedFn = function (...args) { + const arg0 = args[0]; + + if (arg0 === undefined || arg0 === null) { + return arg0; + } + + if (arg0.length > 1) { + args = arg0; + } + + const result = fn(args); + + // We're assuming the result is an array here. + // see notice in conversions.js; don't use box types + // in conversion functions. + if (typeof result === 'object') { + for (let len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + + return result; + }; + + // Preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +models.forEach(fromModel => { + convert[fromModel] = {}; + + Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); + Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); + + const routes = route(fromModel); + const routeModels = Object.keys(routes); + + routeModels.forEach(toModel => { + const fn = routes[toModel]; + + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); +}); + +module.exports = convert; diff --git a/node_modules/color-convert/package.json b/node_modules/color-convert/package.json new file mode 100644 index 0000000..6e48000 --- /dev/null +++ b/node_modules/color-convert/package.json @@ -0,0 +1,48 @@ +{ + "name": "color-convert", + "description": "Plain color conversion functions", + "version": "2.0.1", + "author": "Heather Arthur ", + "license": "MIT", + "repository": "Qix-/color-convert", + "scripts": { + "pretest": "xo", + "test": "node test/basic.js" + }, + "engines": { + "node": ">=7.0.0" + }, + "keywords": [ + "color", + "colour", + "convert", + "converter", + "conversion", + "rgb", + "hsl", + "hsv", + "hwb", + "cmyk", + "ansi", + "ansi16" + ], + "files": [ + "index.js", + "conversions.js", + "route.js" + ], + "xo": { + "rules": { + "default-case": 0, + "no-inline-comments": 0, + "operator-linebreak": 0 + } + }, + "devDependencies": { + "chalk": "^2.4.2", + "xo": "^0.24.0" + }, + "dependencies": { + "color-name": "~1.1.4" + } +} diff --git a/node_modules/color-convert/route.js b/node_modules/color-convert/route.js new file mode 100644 index 0000000..1a08521 --- /dev/null +++ b/node_modules/color-convert/route.js @@ -0,0 +1,97 @@ +const conversions = require('./conversions'); + +/* + This function routes a model to all other models. + + all functions that are routed have a property `.conversion` attached + to the returned synthetic function. This property is an array + of strings, each with the steps in between the 'from' and 'to' + color models (inclusive). + + conversions that are not possible simply are not included. +*/ + +function buildGraph() { + const graph = {}; + // https://jsperf.com/object-keys-vs-for-in-with-closure/3 + const models = Object.keys(conversions); + + for (let len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; + } + + return graph; +} + +// https://en.wikipedia.org/wiki/Breadth-first_search +function deriveBFS(fromModel) { + const graph = buildGraph(); + const queue = [fromModel]; // Unshift -> queue -> pop + + graph[fromModel].distance = 0; + + while (queue.length) { + const current = queue.pop(); + const adjacents = Object.keys(conversions[current]); + + for (let len = adjacents.length, i = 0; i < len; i++) { + const adjacent = adjacents[i]; + const node = graph[adjacent]; + + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + + return graph; +} + +function link(from, to) { + return function (args) { + return to(from(args)); + }; +} + +function wrapConversion(toModel, graph) { + const path = [graph[toModel].parent, toModel]; + let fn = conversions[graph[toModel].parent][toModel]; + + let cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; + } + + fn.conversion = path; + return fn; +} + +module.exports = function (fromModel) { + const graph = deriveBFS(fromModel); + const conversion = {}; + + const models = Object.keys(graph); + for (let len = models.length, i = 0; i < len; i++) { + const toModel = models[i]; + const node = graph[toModel]; + + if (node.parent === null) { + // No possible conversion, or this node is the source model. + continue; + } + + conversion[toModel] = wrapConversion(toModel, graph); + } + + return conversion; +}; + diff --git a/node_modules/color-name/LICENSE b/node_modules/color-name/LICENSE new file mode 100644 index 0000000..c6b1001 --- /dev/null +++ b/node_modules/color-name/LICENSE @@ -0,0 +1,8 @@ +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +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/color-name/README.md b/node_modules/color-name/README.md new file mode 100644 index 0000000..932b979 --- /dev/null +++ b/node_modules/color-name/README.md @@ -0,0 +1,11 @@ +A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. + +[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) + + +```js +var colors = require('color-name'); +colors.red //[255,0,0] +``` + + diff --git a/node_modules/color-name/index.js b/node_modules/color-name/index.js new file mode 100644 index 0000000..b7c198a --- /dev/null +++ b/node_modules/color-name/index.js @@ -0,0 +1,152 @@ +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; diff --git a/node_modules/color-name/package.json b/node_modules/color-name/package.json new file mode 100644 index 0000000..782dd82 --- /dev/null +++ b/node_modules/color-name/package.json @@ -0,0 +1,28 @@ +{ + "name": "color-name", + "version": "1.1.4", + "description": "A list of color names and its values", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:colorjs/color-name.git" + }, + "keywords": [ + "color-name", + "color", + "color-keyword", + "keyword" + ], + "author": "DY ", + "license": "MIT", + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, + "homepage": "https://github.com/colorjs/color-name" +} 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..ed19cff --- /dev/null +++ b/node_modules/commander/Readme.md @@ -0,0 +1,1129 @@ +# Commander.js + +[![Build Status](https://github.com/tj/commander.js/workflows/build/badge.svg)](https://github.com/tj/commander.js/actions?query=workflow%3A%22build%22) +[![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. + +Read this in other languages: English | [简体中文](./Readme_zh-CN.md) + +- [Commander.js](#commanderjs) + - [Installation](#installation) + - [Quick Start](#quick-start) + - [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 boolean|value](#other-option-types-negatable-boolean-and-booleanvalue) + - [Required option](#required-option) + - [Variadic option](#variadic-option) + - [Version option](#version-option) + - [More configuration](#more-configuration) + - [Custom option processing](#custom-option-processing) + - [Commands](#commands) + - [Command-arguments](#command-arguments) + - [More configuration](#more-configuration-1) + - [Custom argument processing](#custom-argument-processing) + - [Action handler](#action-handler) + - [Stand-alone executable (sub)commands](#stand-alone-executable-subcommands) + - [Life cycle hooks](#life-cycle-hooks) + - [Automated help](#automated-help) + - [Custom help](#custom-help) + - [Display help after errors](#display-help-after-errors) + - [Display help from code](#display-help-from-code) + - [.name](#name) + - [.usage](#usage) + - [.description and .summary](#description-and-summary) + - [.helpOption(flags, description)](#helpoptionflags-description) + - [.addHelpCommand()](#addhelpcommand) + - [More configuration](#more-configuration-2) + - [Custom event listeners](#custom-event-listeners) + - [Bits and pieces](#bits-and-pieces) + - [.parse() and .parseAsync()](#parse-and-parseasync) + - [Parsing Configuration](#parsing-configuration) + - [Legacy options as properties](#legacy-options-as-properties) + - [TypeScript](#typescript) + - [createCommand()](#createcommand) + - [Node options such as `--harmony`](#node-options-such-as---harmony) + - [Debugging stand-alone executable subcommands](#debugging-stand-alone-executable-subcommands) + - [Display error](#display-error) + - [Override exit and output handling](#override-exit-and-output-handling) + - [Additional documentation](#additional-documentation) + - [Support](#support) + - [Commander for enterprise](#commander-for-enterprise) + +For information about terms used in this document see: [terminology](./docs/terminology.md) + +## Installation + +```sh +npm install commander +``` + +## Quick Start + +You write code to describe your command line interface. +Commander looks after parsing the arguments into options and command-arguments, +displays usage errors for problems, and implements a help system. + +Commander is strict and displays an error for unrecognised options. +The two most used option types are a boolean option, and an option which takes its value from the following argument. + +Example file: [split.js](./examples/split.js) + +```js +const { program } = require('commander'); + +program + .option('--first') + .option('-s, --separator '); + +program.parse(); + +const options = program.opts(); +const limit = options.first ? 1 : undefined; +console.log(program.args[0].split(options.separator, limit)); +``` + +```console +$ node split.js -s / --fits a/b/c +error: unknown option '--fits' +(Did you mean --first?) +$ node split.js -s / --first a/b/c +[ 'a' ] +``` + +Here is a more complete program using a subcommand and with descriptions for the help. In a multi-command program, you have an action handler for each command (or stand-alone executables for the commands). + +Example file: [string-util.js](./examples/string-util.js) + +```js +const { Command } = require('commander'); +const program = new Command(); + +program + .name('string-util') + .description('CLI to some JavaScript string utilities') + .version('0.8.0'); + +program.command('split') + .description('Split a string into substrings and display as an array') + .argument('', 'string to split') + .option('--first', 'display just the first substring') + .option('-s, --separator ', 'separator character', ',') + .action((str, options) => { + const limit = options.first ? 1 : undefined; + console.log(str.split(options.separator, limit)); + }); + +program.parse(); +``` + +```console +$ node string-util.js help split +Usage: string-util split [options] + +Split a string into substrings and display as an array. + +Arguments: + string string to split + +Options: + --first display just the first substring + -s, --separator separator character (default: ",") + -h, --help display help for command + +$ node string-util.js split --separator=/ a/b/c +[ 'a', 'b', 'c' ] +``` + +More samples can be found in the [examples](https://github.com/tj/commander.js/tree/master/examples) directory. + +## 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 +// CommonJS (.cjs) +const { program } = require('commander'); +``` + +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 +// CommonJS (.cjs) +const { Command } = require('commander'); +const program = new Command(); +``` + +```js +// ECMAScript (.mjs) +import { Command } from 'commander'; +const program = new Command(); +``` + +```ts +// TypeScript (.ts) +import { Command } from 'commander'; +const program = new Command(); +``` + +## 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 or vertical bar ('|'). + +The parsed options can be accessed by calling `.opts()` on a `Command` object, and are passed to the action handler. + +Multi-word options such as "--template-engine" are camel-cased, becoming `program.opts().templateEngine` etc. + +An option and its option-argument can be separated by a space, or combined into the same argument. The option-argument can follow the short option directly or follow an `=` for a long option. + +```sh +serve -p 80 +serve -p80 +serve --port 80 +serve --port=80 +``` + +You can use `--` to indicate the end of the options, and any remaining arguments will be used without being interpreted. + +By default options on the command line are not positional, and can be specified before or after other arguments. + +There are additional related routines for when `.opts()` is not enough: + +- `.optsWithGlobals()` returns merged local and global option values +- `.getOptionValue()` and `.setOptionValue()` work with a single option value +- `.getOptionValueSource()` and `.setOptionValueWithSource()` include where the option value came from + +### Common option types, boolean and value + +The two most used option types are a boolean option, and an option which takes its value +from the following argument (declared with angle brackets like `--expect `). Both are `undefined` unless specified on command line. + +Example file: [options-common.js](./examples/options-common.js) + +```js +program + .option('-d, --debug', 'output extra debugging') + .option('-s, --small', 'small pizza size') + .option('-p, --pizza-type ', 'flavour of pizza'); + +program.parse(process.argv); + +const options = program.opts(); +if (options.debug) console.log(options); +console.log('pizza details:'); +if (options.small) console.log('- small pizza size'); +if (options.pizzaType) console.log(`- ${options.pizzaType}`); +``` + +```console +$ pizza-options -p +error: option '-p, --pizza-type ' argument missing +$ pizza-options -d -s -p vegetarian +{ debug: true, small: true, pizzaType: 'vegetarian' } +pizza details: +- small pizza size +- vegetarian +$ pizza-options --pizza-type=cheese +pizza details: +- cheese +``` + +Multiple boolean short options may be combined together following the dash, and may be followed by a single short option taking a value. +For example `-d -s -p cheese` may be written as `-ds -p cheese` or even `-dsp cheese`. + +Options with an expected option-argument are greedy and will consume the following argument whatever the value. +So `--id -xyz` reads `-xyz` as the option-argument. + +`program.parse(arguments)` processes the arguments, leaving any args not consumed by the program options in the `program.args` array. The parameter is optional and defaults to `process.argv`. + +### Default option value + +You can specify a default value for an option. + +Example file: [options-defaults.js](./examples/options-defaults.js) + +```js +program + .option('-c, --cheese ', 'add the specified type of cheese', 'blue'); + +program.parse(); + +console.log(`cheese: ${program.opts().cheese}`); +``` + +```console +$ pizza-options +cheese: blue +$ pizza-options --cheese stilton +cheese: stilton +``` + +### Other option types, negatable boolean and boolean|value + +You can define 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. + +Example file: [options-negatable.js](./examples/options-negatable.js) + +```js +program + .option('--no-sauce', 'Remove sauce') + .option('--cheese ', 'cheese flavour', 'mozzarella') + .option('--no-cheese', 'plain with no cheese') + .parse(); + +const options = program.opts(); +const sauceStr = options.sauce ? 'sauce' : 'no sauce'; +const cheeseStr = (options.cheese === false) ? 'no cheese' : `${options.cheese} cheese`; +console.log(`You ordered a pizza with ${sauceStr} and ${cheeseStr}`); +``` + +```console +$ 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 may be used as a boolean option but may optionally take an option-argument +(declared with square brackets like `--optional [value]`). + +Example file: [options-boolean-or-value.js](./examples/options-boolean-or-value.js) + +```js +program + .option('-c, --cheese [type]', 'Add cheese with optional type'); + +program.parse(process.argv); + +const options = program.opts(); +if (options.cheese === undefined) console.log('no cheese'); +else if (options.cheese === true) console.log('add cheese'); +else console.log(`add cheese type ${options.cheese}`); +``` + +```console +$ pizza-options +no cheese +$ pizza-options --cheese +add cheese +$ pizza-options --cheese mozzarella +add cheese type mozzarella +``` + +Options with an optional option-argument are not greedy and will ignore arguments starting with a dash. +So `id` behaves as a boolean option for `--id -5`, but you can use a combined form if needed like `--id=-5`. + +For information about possible ambiguous cases, see [options taking varying arguments](./docs/options-taking-varying-arguments.md). + +### Required option + +You may specify a required (mandatory) option using `.requiredOption()`. The option must have a value after parsing, usually specified on the command line, or perhaps from a default value (say from environment). The method is otherwise the same as `.option()` in format, taking flags and description, and optional default value or custom processing. + +Example file: [options-required.js](./examples/options-required.js) + +```js +program + .requiredOption('-c, --cheese ', 'pizza must have cheese'); + +program.parse(); +``` + +```console +$ pizza +error: required option '-c, --cheese ' not specified +``` + +### Variadic option + +You may make an option variadic by appending `...` to the value placeholder when declaring the option. On the command line you +can then specify multiple option-arguments, and the parsed option value will be an array. The extra arguments +are read until the first argument starting with a dash. The special argument `--` stops option processing entirely. If a value +is specified in the same argument as the option then no further values are read. + +Example file: [options-variadic.js](./examples/options-variadic.js) + +```js +program + .option('-n, --number ', 'specify numbers') + .option('-l, --letter [letters...]', 'specify letters'); + +program.parse(); + +console.log('Options: ', program.opts()); +console.log('Remaining arguments: ', program.args); +``` + +```console +$ collect -n 1 2 3 --letter a b c +Options: { number: [ '1', '2', '3' ], letter: [ 'a', 'b', 'c' ] } +Remaining arguments: [] +$ collect --letter=A -n80 operand +Options: { number: [ '80' ], letter: [ 'A' ] } +Remaining arguments: [ 'operand' ] +$ collect --letter -n 1 -n 2 3 -- operand +Options: { number: [ '1', '2', '3' ], letter: true } +Remaining arguments: [ 'operand' ] +``` + +For information about possible ambiguous cases, see [options taking varying arguments](./docs/options-taking-varying-arguments.md). + +### 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'); +``` + +```console +$ ./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. + +```js +program.version('0.0.1', '-v, --vers', 'output the current version'); +``` + +### More configuration + +You can add most options using the `.option()` method, but there are some additional features available +by constructing an `Option` explicitly for less common cases. + +Example files: [options-extra.js](./examples/options-extra.js), [options-env.js](./examples/options-env.js), [options-conflicts.js](./examples/options-conflicts.js), [options-implies.js](./examples/options-implies.js) + +```js +program + .addOption(new Option('-s, --secret').hideHelp()) + .addOption(new Option('-t, --timeout ', 'timeout in seconds').default(60, 'one minute')) + .addOption(new Option('-d, --drink ', 'drink size').choices(['small', 'medium', 'large'])) + .addOption(new Option('-p, --port ', 'port number').env('PORT')) + .addOption(new Option('--donate [amount]', 'optional donation in dollars').preset('20').argParser(parseFloat)) + .addOption(new Option('--disable-server', 'disables the server').conflicts('port')) + .addOption(new Option('--free-drink', 'small drink included free ').implies({ drink: 'small' })); +``` + +```console +$ extra --help +Usage: help [options] + +Options: + -t, --timeout timeout in seconds (default: one minute) + -d, --drink drink cup size (choices: "small", "medium", "large") + -p, --port port number (env: PORT) + --donate [amount] optional donation in dollars (preset: "20") + --disable-server disables the server + --free-drink small drink included free + -h, --help display help for command + +$ extra --drink huge +error: option '-d, --drink ' argument 'huge' is invalid. Allowed choices are small, medium, large. + +$ PORT=80 extra --donate --free-drink +Options: { timeout: 60, donate: 20, port: '80', freeDrink: true, drink: 'small' } + +$ extra --disable-server --port 8000 +error: option '--disable-server' cannot be used with option '-p, --port ' +``` + +Specify a required (mandatory) option using the `Option` method `.makeOptionMandatory()`. This matches the `Command` method [.requiredOption()](#required-option). + +### Custom option processing + +You may specify a function to do custom processing of option-arguments. The callback function receives two parameters, +the user specified option-argument and the previous value for the option. It returns the new value for the option. + +This allows you to coerce the option-argument 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 parameter. + +Example file: [options-custom-processing.js](./examples/options-custom-processing.js) + +```js +function myParseInt(value, dummyPrevious) { + // parseInt takes a string and a radix + const parsedValue = parseInt(value, 10); + if (isNaN(parsedValue)) { + throw new commander.InvalidArgumentError('Not a number.'); + } + return parsedValue; +} + +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(); + +const options = program.opts(); +if (options.float !== undefined) console.log(`float: ${options.float}`); +if (options.integer !== undefined) console.log(`integer: ${options.integer}`); +if (options.verbose > 0) console.log(`verbosity: ${options.verbose}`); +if (options.collect.length > 0) console.log(options.collect); +if (options.list !== undefined) console.log(options.list); +``` + +```console +$ 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' ] +``` + +## Commands + +You can specify (sub)commands using `.command()` or `.addCommand()`. There are two ways these can be implemented: using an action handler attached to the command, or as a stand-alone executable file (described in more detail later). The subcommands may be nested ([example](./examples/nestedCommands.js)). + +In the first parameter to `.command()` you specify the command name. You may append the command-arguments after the command name, or specify them separately using `.argument()`. The arguments may be `` or `[optional]`, and the last argument may also be `variadic...`. + +You can use `.addCommand()` to add an already configured subcommand to the program. + +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 stand-alone executable file, indicated by adding description as second parameter to `.command`. +// Returns `this` for adding more commands. +program + .command('start ', 'start named service') + .command('stop [service]', 'stop named service, or all if no name supplied'); + +// Command prepared separately. +// Returns `this` for adding more commands. +program + .addCommand(build.makeBuildCommand()); +``` + +Configuration options can be passed with the call to `.command()` and `.addCommand()`. Specifying `hidden: true` will +remove the command from the generated help output. Specifying `isDefault: true` will run the subcommand if no other +subcommand is specified ([example](./examples/defaultCommand.js)). + +You can add alternative names for a command with `.alias()`. ([example](./examples/alias.js)) + +For safety, `.addCommand()` does not automatically copy the inherited settings from the parent command. There is a helper routine `.copyInheritedSettings()` for copying the settings when they are wanted. + +### Command-arguments + +For subcommands, you can specify the argument syntax in the call to `.command()` (as shown above). This +is the only method usable for subcommands implemented using a stand-alone executable, but for other subcommands +you can instead use the following method. + +To configure a command, you can use `.argument()` to specify each expected command-argument. +You supply the argument name and an optional description. The argument may be `` or `[optional]`. +You can specify a default value for an optional command-argument. + +Example file: [argument.js](./examples/argument.js) + +```js +program + .version('0.1.0') + .argument('', 'user to login') + .argument('[password]', 'password for user, if required', 'no password given') + .action((username, password) => { + console.log('username:', username); + console.log('password:', password); + }); +``` + + 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. A variadic argument is passed to the action handler as an array. For example: + +```js +program + .version('0.1.0') + .command('rmdir') + .argument('') + .action(function (dirs) { + dirs.forEach((dir) => { + console.log('rmdir %s', dir); + }); + }); +``` + +There is a convenience method to add multiple arguments at once, but without descriptions: + +```js +program + .arguments(' '); +``` + +#### More configuration + +There are some additional features available by constructing an `Argument` explicitly for less common cases. + +Example file: [arguments-extra.js](./examples/arguments-extra.js) + +```js +program + .addArgument(new commander.Argument('', 'drink cup size').choices(['small', 'medium', 'large'])) + .addArgument(new commander.Argument('[timeout]', 'timeout in seconds').default(60, 'one minute')) +``` + +#### Custom argument processing + +You may specify a function to do custom processing of command-arguments (like for option-arguments). +The callback function receives two parameters, the user specified command-argument and the previous value for the argument. +It returns the new value for the argument. + +The processed argument values are passed to the action handler, and saved as `.processedArgs`. + +You can optionally specify the default/starting value for the argument after the function parameter. + +Example file: [arguments-custom-processing.js](./examples/arguments-custom-processing.js) + +```js +program + .command('add') + .argument('', 'integer argument', myParseInt) + .argument('[second]', 'integer argument', myParseInt, 1000) + .action((first, second) => { + console.log(`${first} + ${second} = ${first + second}`); + }) +; +``` + +### Action handler + +The action handler gets passed a parameter for each command-argument you declared, and two additional parameters +which are the parsed options and the command object itself. + +Example file: [thank.js](./examples/thank.js) + +```js +program + .argument('') + .option('-t, --title ', 'title to use before name') + .option('-d, --debug', 'display some debugging') + .action((name, options, command) => { + if (options.debug) { + console.error('Called %s with options %o', command.name(), options); + } + const title = options.title ? `${options.title} ` : ''; + console.log(`Thank-you ${title}${name}`); + }); +``` + +If you prefer, you can work with the command directly and skip declaring the parameters for the action handler. The `this` keyword is set to the running command and can be used from a function expression (but not from an arrow function). + +Example file: [action-this.js](./examples/action-this.js) + +```js +program + .command('serve') + .argument(' + +``` + + +## API + +### Parsing + +Parsing a plist from filename: + +``` javascript +var fs = require('fs'); +var plist = require('plist'); + +var obj = plist.parse(fs.readFileSync('myPlist.plist', 'utf8')); +console.log(JSON.stringify(obj)); +``` + +Parsing a plist from string payload: + +``` javascript +var plist = require('plist'); + +var xml = + '' + + '' + + '' + + 'metadata' + + '' + + 'bundle-identifier' + + 'com.company.app' + + 'bundle-version' + + '0.1.1' + + 'kind' + + 'software' + + 'title' + + 'AppName' + + '' + + ''; + +console.log(plist.parse(xml)); + +// [ +// "metadata", +// { +// "bundle-identifier": "com.company.app", +// "bundle-version": "0.1.1", +// "kind": "software", +// "title": "AppName" +// } +// ] +``` + +### Building + +Given an existing JavaScript Object, you can turn it into an XML document +that complies with the plist DTD: + +``` javascript +var plist = require('plist'); + +var json = [ + "metadata", + { + "bundle-identifier": "com.company.app", + "bundle-version": "0.1.1", + "kind": "software", + "title": "AppName" + } +]; + +console.log(plist.build(json)); + +// +// +// +// metadata +// +// bundle-identifier +// com.company.app +// bundle-version +// 0.1.1 +// kind +// software +// title +// AppName +// +// +``` + +## Cross Platform Testing Credits + +Much thanks to Sauce Labs for providing free resources that enable cross-browser testing on this project! + +[![Testing Powered By SauceLabs](https://opensource.saucelabs.com/images/opensauce/powered-by-saucelabs-badge-red.png?sanitize=true "Testing Powered By SauceLabs")](https://saucelabs.com) + + +## License + +[(The MIT License)](LICENSE) diff --git a/node_modules/plist/dist/plist-build.js b/node_modules/plist/dist/plist-build.js new file mode 100644 index 0000000..0eeef51 --- /dev/null +++ b/node_modules/plist/dist/plist-build.js @@ -0,0 +1,5348 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.plist = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} + +},{}],3:[function(require,module,exports){ +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +// The _isBuffer check is for Safari 5-7 support, because it's missing +// Object.prototype.constructor. Remove this eventually +module.exports = function (obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) +} + +function isBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +} + +// For Node v0.10 support. Remove this eventually. +function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) +} + +},{}],4:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + module.exports = { + Disconnected: 1, + Preceding: 2, + Following: 4, + Contains: 8, + ContainedBy: 16, + ImplementationSpecific: 32 + }; + +}).call(this); + +},{}],5:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + module.exports = { + Element: 1, + Attribute: 2, + Text: 3, + CData: 4, + EntityReference: 5, + EntityDeclaration: 6, + ProcessingInstruction: 7, + Comment: 8, + Document: 9, + DocType: 10, + DocumentFragment: 11, + NotationDeclaration: 12, + // Numeric codes up to 200 are reserved to W3C for possible future use. + // Following are types internal to this library: + Declaration: 201, + Raw: 202, + AttributeDeclaration: 203, + ElementDeclaration: 204, + Dummy: 205 + }; + +}).call(this); + +},{}],6:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + // Copies all enumerable own properties from `sources` to `target` + var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject, + hasProp = {}.hasOwnProperty; + + assign = function(target, ...sources) { + var i, key, len, source; + if (isFunction(Object.assign)) { + Object.assign.apply(null, arguments); + } else { + for (i = 0, len = sources.length; i < len; i++) { + source = sources[i]; + if (source != null) { + for (key in source) { + if (!hasProp.call(source, key)) continue; + target[key] = source[key]; + } + } + } + } + return target; + }; + + // Determines if `val` is a Function object + isFunction = function(val) { + return !!val && Object.prototype.toString.call(val) === '[object Function]'; + }; + + // Determines if `val` is an Object + isObject = function(val) { + var ref; + return !!val && ((ref = typeof val) === 'function' || ref === 'object'); + }; + + // Determines if `val` is an Array + isArray = function(val) { + if (isFunction(Array.isArray)) { + return Array.isArray(val); + } else { + return Object.prototype.toString.call(val) === '[object Array]'; + } + }; + + // Determines if `val` is an empty Array or an Object with no own properties + isEmpty = function(val) { + var key; + if (isArray(val)) { + return !val.length; + } else { + for (key in val) { + if (!hasProp.call(val, key)) continue; + return false; + } + return true; + } + }; + + // Determines if `val` is a plain Object + isPlainObject = function(val) { + var ctor, proto; + return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object)); + }; + + // Gets the primitive value of an object + getValue = function(obj) { + if (isFunction(obj.valueOf)) { + return obj.valueOf(); + } else { + return obj; + } + }; + + module.exports.assign = assign; + + module.exports.isFunction = isFunction; + + module.exports.isObject = isObject; + + module.exports.isArray = isArray; + + module.exports.isEmpty = isEmpty; + + module.exports.isPlainObject = isPlainObject; + + module.exports.getValue = getValue; + +}).call(this); + +},{}],7:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + module.exports = { + None: 0, + OpenTag: 1, + InsideTag: 2, + CloseTag: 3 + }; + +}).call(this); + +},{}],8:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLAttribute, XMLNode; + + NodeType = require('./NodeType'); + + XMLNode = require('./XMLNode'); + + // Represents an attribute + module.exports = XMLAttribute = (function() { + class XMLAttribute { + // Initializes a new instance of `XMLAttribute` + + // `parent` the parent node + // `name` attribute target + // `value` attribute value + constructor(parent, name, value) { + this.parent = parent; + if (this.parent) { + this.options = this.parent.options; + this.stringify = this.parent.stringify; + } + if (name == null) { + throw new Error("Missing attribute name. " + this.debugInfo(name)); + } + this.name = this.stringify.name(name); + this.value = this.stringify.attValue(value); + this.type = NodeType.Attribute; + // DOM level 3 + this.isId = false; + this.schemaTypeInfo = null; + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.attribute(this, this.options.writer.filterOptions(options)); + } + + + // Returns debug string for this node + debugInfo(name) { + name = name || this.name; + if (name == null) { + return "parent: <" + this.parent.name + ">"; + } else { + return "attribute: {" + name + "}, parent: <" + this.parent.name + ">"; + } + } + + isEqualNode(node) { + if (node.namespaceURI !== this.namespaceURI) { + return false; + } + if (node.prefix !== this.prefix) { + return false; + } + if (node.localName !== this.localName) { + return false; + } + if (node.value !== this.value) { + return false; + } + return true; + } + + }; + + // DOM level 1 + Object.defineProperty(XMLAttribute.prototype, 'nodeType', { + get: function() { + return this.type; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'ownerElement', { + get: function() { + return this.parent; + } + }); + + // DOM level 3 + Object.defineProperty(XMLAttribute.prototype, 'textContent', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + // DOM level 4 + Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'prefix', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'localName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'specified', { + get: function() { + return true; + } + }); + + return XMLAttribute; + + }).call(this); + +}).call(this); + +},{"./NodeType":5,"./XMLNode":27}],9:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLCData, XMLCharacterData; + + NodeType = require('./NodeType'); + + XMLCharacterData = require('./XMLCharacterData'); + + // Represents a CDATA node + module.exports = XMLCData = class XMLCData extends XMLCharacterData { + // Initializes a new instance of `XMLCData` + + // `text` CDATA text + constructor(parent, text) { + super(parent); + if (text == null) { + throw new Error("Missing CDATA text. " + this.debugInfo()); + } + this.name = "#cdata-section"; + this.type = NodeType.CData; + this.value = this.stringify.cdata(text); + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.cdata(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); + +},{"./NodeType":5,"./XMLCharacterData":10}],10:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var XMLCharacterData, XMLNode; + + XMLNode = require('./XMLNode'); + + // Represents a character data node + module.exports = XMLCharacterData = (function() { + class XMLCharacterData extends XMLNode { + // Initializes a new instance of `XMLCharacterData` + + constructor(parent) { + super(parent); + this.value = ''; + } + + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // DOM level 1 functions to be implemented later + substringData(offset, count) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + appendData(arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + insertData(offset, arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + deleteData(offset, count) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + replaceData(offset, count, arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + isEqualNode(node) { + if (!super.isEqualNode(node)) { + return false; + } + if (node.data !== this.data) { + return false; + } + return true; + } + + }; + + // DOM level 1 + Object.defineProperty(XMLCharacterData.prototype, 'data', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + Object.defineProperty(XMLCharacterData.prototype, 'length', { + get: function() { + return this.value.length; + } + }); + + // DOM level 3 + Object.defineProperty(XMLCharacterData.prototype, 'textContent', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + return XMLCharacterData; + + }).call(this); + +}).call(this); + +},{"./XMLNode":27}],11:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLCharacterData, XMLComment; + + NodeType = require('./NodeType'); + + XMLCharacterData = require('./XMLCharacterData'); + + // Represents a comment node + module.exports = XMLComment = class XMLComment extends XMLCharacterData { + // Initializes a new instance of `XMLComment` + + // `text` comment text + constructor(parent, text) { + super(parent); + if (text == null) { + throw new Error("Missing comment text. " + this.debugInfo()); + } + this.name = "#comment"; + this.type = NodeType.Comment; + this.value = this.stringify.comment(text); + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.comment(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); + +},{"./NodeType":5,"./XMLCharacterData":10}],12:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList; + + XMLDOMErrorHandler = require('./XMLDOMErrorHandler'); + + XMLDOMStringList = require('./XMLDOMStringList'); + + // Implements the DOMConfiguration interface + module.exports = XMLDOMConfiguration = (function() { + class XMLDOMConfiguration { + constructor() { + var clonedSelf; + this.defaultParams = { + "canonical-form": false, + "cdata-sections": false, + "comments": false, + "datatype-normalization": false, + "element-content-whitespace": true, + "entities": true, + "error-handler": new XMLDOMErrorHandler(), + "infoset": true, + "validate-if-schema": false, + "namespaces": true, + "namespace-declarations": true, + "normalize-characters": false, + "schema-location": '', + "schema-type": '', + "split-cdata-sections": true, + "validate": false, + "well-formed": true + }; + this.params = clonedSelf = Object.create(this.defaultParams); + } + + // Gets the value of a parameter. + + // `name` name of the parameter + getParameter(name) { + if (this.params.hasOwnProperty(name)) { + return this.params[name]; + } else { + return null; + } + } + + // Checks if setting a parameter to a specific value is supported. + + // `name` name of the parameter + // `value` parameter value + canSetParameter(name, value) { + return true; + } + + // Sets the value of a parameter. + + // `name` name of the parameter + // `value` new value or null if the user wishes to unset the parameter + setParameter(name, value) { + if (value != null) { + return this.params[name] = value; + } else { + return delete this.params[name]; + } + } + + }; + + // Returns the list of parameter names + Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', { + get: function() { + return new XMLDOMStringList(Object.keys(this.defaultParams)); + } + }); + + return XMLDOMConfiguration; + + }).call(this); + +}).call(this); + +},{"./XMLDOMErrorHandler":13,"./XMLDOMStringList":15}],13:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + // Represents the error handler for DOM operations + var XMLDOMErrorHandler; + + module.exports = XMLDOMErrorHandler = class XMLDOMErrorHandler { + // Initializes a new instance of `XMLDOMErrorHandler` + + constructor() {} + + // Called on the error handler when an error occurs. + + // `error` the error message as a string + handleError(error) { + throw new Error(error); + } + + }; + +}).call(this); + +},{}],14:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + // Implements the DOMImplementation interface + var XMLDOMImplementation; + + module.exports = XMLDOMImplementation = class XMLDOMImplementation { + // Tests if the DOM implementation implements a specific feature. + + // `feature` package name of the feature to test. In Level 1, the + // legal values are "HTML" and "XML" (case-insensitive). + // `version` version number of the package name to test. + // In Level 1, this is the string "1.0". If the version is + // not specified, supporting any version of the feature will + // cause the method to return true. + hasFeature(feature, version) { + return true; + } + + // Creates a new document type declaration. + + // `qualifiedName` qualified name of the document type to be created + // `publicId` public identifier of the external subset + // `systemId` system identifier of the external subset + createDocumentType(qualifiedName, publicId, systemId) { + throw new Error("This DOM method is not implemented."); + } + + // Creates a new document. + + // `namespaceURI` namespace URI of the document element to create + // `qualifiedName` the qualified name of the document to be created + // `doctype` the type of document to be created or null + createDocument(namespaceURI, qualifiedName, doctype) { + throw new Error("This DOM method is not implemented."); + } + + // Creates a new HTML document. + + // `title` document title + createHTMLDocument(title) { + throw new Error("This DOM method is not implemented."); + } + + // Returns a specialized object which implements the specialized APIs + // of the specified feature and version. + + // `feature` name of the feature requested. + // `version` version number of the feature to test + getFeature(feature, version) { + throw new Error("This DOM method is not implemented."); + } + + }; + +}).call(this); + +},{}],15:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + // Represents a list of string entries + var XMLDOMStringList; + + module.exports = XMLDOMStringList = (function() { + class XMLDOMStringList { + // Initializes a new instance of `XMLDOMStringList` + // This is just a wrapper around an ordinary + // JS array. + + // `arr` the array of string values + constructor(arr) { + this.arr = arr || []; + } + + // Returns the indexth item in the collection. + + // `index` index into the collection + item(index) { + return this.arr[index] || null; + } + + // Test if a string is part of this DOMStringList. + + // `str` the string to look for + contains(str) { + return this.arr.indexOf(str) !== -1; + } + + }; + + // Returns the number of strings in the list. + Object.defineProperty(XMLDOMStringList.prototype, 'length', { + get: function() { + return this.arr.length; + } + }); + + return XMLDOMStringList; + + }).call(this); + +}).call(this); + +},{}],16:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDTDAttList, XMLNode; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents an attribute list + module.exports = XMLDTDAttList = class XMLDTDAttList extends XMLNode { + // Initializes a new instance of `XMLDTDAttList` + + // `parent` the parent `XMLDocType` element + // `elementName` the name of the element containing this attribute + // `attributeName` attribute name + // `attributeType` type of the attribute + // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, + // #FIXED or #DEFAULT) + // `defaultValue` default value of the attribute + // (only used for #FIXED or #DEFAULT) + constructor(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { + super(parent); + if (elementName == null) { + throw new Error("Missing DTD element name. " + this.debugInfo()); + } + if (attributeName == null) { + throw new Error("Missing DTD attribute name. " + this.debugInfo(elementName)); + } + if (!attributeType) { + throw new Error("Missing DTD attribute type. " + this.debugInfo(elementName)); + } + if (!defaultValueType) { + throw new Error("Missing DTD attribute default. " + this.debugInfo(elementName)); + } + if (defaultValueType.indexOf('#') !== 0) { + defaultValueType = '#' + defaultValueType; + } + if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { + throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(elementName)); + } + if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { + throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(elementName)); + } + this.elementName = this.stringify.name(elementName); + this.type = NodeType.AttributeDeclaration; + this.attributeName = this.stringify.name(attributeName); + this.attributeType = this.stringify.dtdAttType(attributeType); + if (defaultValue) { + this.defaultValue = this.stringify.dtdAttDefault(defaultValue); + } + this.defaultValueType = defaultValueType; + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); + +},{"./NodeType":5,"./XMLNode":27}],17:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDTDElement, XMLNode; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents an attribute + module.exports = XMLDTDElement = class XMLDTDElement extends XMLNode { + // Initializes a new instance of `XMLDTDElement` + + // `parent` the parent `XMLDocType` element + // `name` element name + // `value` element content (defaults to #PCDATA) + constructor(parent, name, value) { + super(parent); + if (name == null) { + throw new Error("Missing DTD element name. " + this.debugInfo()); + } + if (!value) { + value = '(#PCDATA)'; + } + if (Array.isArray(value)) { + value = '(' + value.join(',') + ')'; + } + this.name = this.stringify.name(name); + this.type = NodeType.ElementDeclaration; + this.value = this.stringify.dtdElementValue(value); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); + +},{"./NodeType":5,"./XMLNode":27}],18:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDTDEntity, XMLNode, isObject; + + ({isObject} = require('./Utility')); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents an entity declaration in the DTD + module.exports = XMLDTDEntity = (function() { + class XMLDTDEntity extends XMLNode { + // Initializes a new instance of `XMLDTDEntity` + + // `parent` the parent `XMLDocType` element + // `pe` whether this is a parameter entity or a general entity + // defaults to `false` (general entity) + // `name` the name of the entity + // `value` internal entity value or an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + // `value.nData` notation declaration + constructor(parent, pe, name, value) { + super(parent); + if (name == null) { + throw new Error("Missing DTD entity name. " + this.debugInfo(name)); + } + if (value == null) { + throw new Error("Missing DTD entity value. " + this.debugInfo(name)); + } + this.pe = !!pe; + this.name = this.stringify.name(name); + this.type = NodeType.EntityDeclaration; + if (!isObject(value)) { + this.value = this.stringify.dtdEntityValue(value); + this.internal = true; + } else { + if (!value.pubID && !value.sysID) { + throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name)); + } + if (value.pubID && !value.sysID) { + throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name)); + } + this.internal = false; + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + if (value.nData != null) { + this.nData = this.stringify.dtdNData(value.nData); + } + if (this.pe && this.nData) { + throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name)); + } + } + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options)); + } + + }; + + // DOM level 1 + Object.defineProperty(XMLDTDEntity.prototype, 'publicId', { + get: function() { + return this.pubID; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'systemId', { + get: function() { + return this.sysID; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'notationName', { + get: function() { + return this.nData || null; + } + }); + + // DOM level 3 + Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', { + get: function() { + return null; + } + }); + + return XMLDTDEntity; + + }).call(this); + +}).call(this); + +},{"./NodeType":5,"./Utility":6,"./XMLNode":27}],19:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDTDNotation, XMLNode; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents a NOTATION entry in the DTD + module.exports = XMLDTDNotation = (function() { + class XMLDTDNotation extends XMLNode { + // Initializes a new instance of `XMLDTDNotation` + + // `parent` the parent `XMLDocType` element + // `name` the name of the notation + // `value` an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + constructor(parent, name, value) { + super(parent); + if (name == null) { + throw new Error("Missing DTD notation name. " + this.debugInfo(name)); + } + if (!value.pubID && !value.sysID) { + throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name)); + } + this.name = this.stringify.name(name); + this.type = NodeType.NotationDeclaration; + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options)); + } + + }; + + // DOM level 1 + Object.defineProperty(XMLDTDNotation.prototype, 'publicId', { + get: function() { + return this.pubID; + } + }); + + Object.defineProperty(XMLDTDNotation.prototype, 'systemId', { + get: function() { + return this.sysID; + } + }); + + return XMLDTDNotation; + + }).call(this); + +}).call(this); + +},{"./NodeType":5,"./XMLNode":27}],20:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDeclaration, XMLNode, isObject; + + ({isObject} = require('./Utility')); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents the XML declaration + module.exports = XMLDeclaration = class XMLDeclaration extends XMLNode { + // Initializes a new instance of `XMLDeclaration` + + // `parent` the document object + + // `version` A version number string, e.g. 1.0 + // `encoding` Encoding declaration, e.g. UTF-8 + // `standalone` standalone document declaration: true or false + constructor(parent, version, encoding, standalone) { + super(parent); + // arguments may also be passed as an object + if (isObject(version)) { + ({version, encoding, standalone} = version); + } + if (!version) { + version = '1.0'; + } + this.type = NodeType.Declaration; + this.version = this.stringify.xmlVersion(version); + if (encoding != null) { + this.encoding = this.stringify.xmlEncoding(encoding); + } + if (standalone != null) { + this.standalone = this.stringify.xmlStandalone(standalone); + } + } + + // Converts to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.declaration(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); + +},{"./NodeType":5,"./Utility":6,"./XMLNode":27}],21:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject; + + ({isObject} = require('./Utility')); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + XMLDTDAttList = require('./XMLDTDAttList'); + + XMLDTDEntity = require('./XMLDTDEntity'); + + XMLDTDElement = require('./XMLDTDElement'); + + XMLDTDNotation = require('./XMLDTDNotation'); + + XMLNamedNodeMap = require('./XMLNamedNodeMap'); + + // Represents doctype declaration + module.exports = XMLDocType = (function() { + class XMLDocType extends XMLNode { + // Initializes a new instance of `XMLDocType` + + // `parent` the document object + + // `pubID` public identifier of the external subset + // `sysID` system identifier of the external subset + constructor(parent, pubID, sysID) { + var child, i, len, ref; + super(parent); + this.type = NodeType.DocType; + // set DTD name to the name of the root node + if (parent.children) { + ref = parent.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.Element) { + this.name = child.name; + break; + } + } + } + this.documentObject = parent; + // arguments may also be passed as an object + if (isObject(pubID)) { + ({pubID, sysID} = pubID); + } + if (sysID == null) { + [sysID, pubID] = [pubID, sysID]; + } + if (pubID != null) { + this.pubID = this.stringify.dtdPubID(pubID); + } + if (sysID != null) { + this.sysID = this.stringify.dtdSysID(sysID); + } + } + + // Creates an element type declaration + + // `name` element name + // `value` element content (defaults to #PCDATA) + element(name, value) { + var child; + child = new XMLDTDElement(this, name, value); + this.children.push(child); + return this; + } + + // Creates an attribute declaration + + // `elementName` the name of the element containing this attribute + // `attributeName` attribute name + // `attributeType` type of the attribute (defaults to CDATA) + // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or + // #DEFAULT) (defaults to #IMPLIED) + // `defaultValue` default value of the attribute + // (only used for #FIXED or #DEFAULT) + attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var child; + child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.children.push(child); + return this; + } + + // Creates a general entity declaration + + // `name` the name of the entity + // `value` internal entity value or an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + // `value.nData` notation declaration + entity(name, value) { + var child; + child = new XMLDTDEntity(this, false, name, value); + this.children.push(child); + return this; + } + + // Creates a parameter entity declaration + + // `name` the name of the entity + // `value` internal entity value or an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + pEntity(name, value) { + var child; + child = new XMLDTDEntity(this, true, name, value); + this.children.push(child); + return this; + } + + // Creates a NOTATION declaration + + // `name` the name of the notation + // `value` an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + notation(name, value) { + var child; + child = new XMLDTDNotation(this, name, value); + this.children.push(child); + return this; + } + + // Converts to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.docType(this, this.options.writer.filterOptions(options)); + } + + // Aliases + ele(name, value) { + return this.element(name, value); + } + + att(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); + } + + ent(name, value) { + return this.entity(name, value); + } + + pent(name, value) { + return this.pEntity(name, value); + } + + not(name, value) { + return this.notation(name, value); + } + + up() { + return this.root() || this.documentObject; + } + + isEqualNode(node) { + if (!super.isEqualNode(node)) { + return false; + } + if (node.name !== this.name) { + return false; + } + if (node.publicId !== this.publicId) { + return false; + } + if (node.systemId !== this.systemId) { + return false; + } + return true; + } + + }; + + // DOM level 1 + Object.defineProperty(XMLDocType.prototype, 'entities', { + get: function() { + var child, i, len, nodes, ref; + nodes = {}; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if ((child.type === NodeType.EntityDeclaration) && !child.pe) { + nodes[child.name] = child; + } + } + return new XMLNamedNodeMap(nodes); + } + }); + + Object.defineProperty(XMLDocType.prototype, 'notations', { + get: function() { + var child, i, len, nodes, ref; + nodes = {}; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.NotationDeclaration) { + nodes[child.name] = child; + } + } + return new XMLNamedNodeMap(nodes); + } + }); + + // DOM level 2 + Object.defineProperty(XMLDocType.prototype, 'publicId', { + get: function() { + return this.pubID; + } + }); + + Object.defineProperty(XMLDocType.prototype, 'systemId', { + get: function() { + return this.sysID; + } + }); + + Object.defineProperty(XMLDocType.prototype, 'internalSubset', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + return XMLDocType; + + }).call(this); + +}).call(this); + +},{"./NodeType":5,"./Utility":6,"./XMLDTDAttList":16,"./XMLDTDElement":17,"./XMLDTDEntity":18,"./XMLDTDNotation":19,"./XMLNamedNodeMap":26,"./XMLNode":27}],22:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject; + + ({isPlainObject} = require('./Utility')); + + XMLDOMImplementation = require('./XMLDOMImplementation'); + + XMLDOMConfiguration = require('./XMLDOMConfiguration'); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + XMLStringifier = require('./XMLStringifier'); + + XMLStringWriter = require('./XMLStringWriter'); + + // Represents an XML builder + module.exports = XMLDocument = (function() { + class XMLDocument extends XMLNode { + // Initializes a new instance of `XMLDocument` + + // `options.keepNullNodes` whether nodes with null values will be kept + // or ignored: true or false + // `options.keepNullAttributes` whether attributes with null values will be + // kept or ignored: true or false + // `options.ignoreDecorators` whether decorator strings will be ignored when + // converting JS objects: true or false + // `options.separateArrayItems` whether array items are created as separate + // nodes when passed as an object value: true or false + // `options.noDoubleEncoding` whether existing html entities are encoded: + // true or false + // `options.stringify` a set of functions to use for converting values to + // strings + // `options.writer` the default XML writer to use for converting nodes to + // string. If the default writer is not set, the built-in XMLStringWriter + // will be used instead. + constructor(options) { + super(null); + this.name = "#document"; + this.type = NodeType.Document; + this.documentURI = null; + this.domConfig = new XMLDOMConfiguration(); + options || (options = {}); + if (!options.writer) { + options.writer = new XMLStringWriter(); + } + this.options = options; + this.stringify = new XMLStringifier(options); + } + + // Ends the document and passes it to the given XML writer + + // `writer` is either an XML writer or a plain object to pass to the + // constructor of the default XML writer. The default writer is assigned when + // creating the XML document. Following flags are recognized by the + // built-in XMLStringWriter: + // `writer.pretty` pretty prints the result + // `writer.indent` indentation for pretty print + // `writer.offset` how many indentations to add to every line for pretty print + // `writer.newline` newline sequence for pretty print + end(writer) { + var writerOptions; + writerOptions = {}; + if (!writer) { + writer = this.options.writer; + } else if (isPlainObject(writer)) { + writerOptions = writer; + writer = this.options.writer; + } + return writer.document(this, writer.filterOptions(writerOptions)); + } + + // Converts the XML document to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.document(this, this.options.writer.filterOptions(options)); + } + + // DOM level 1 functions to be implemented later + createElement(tagName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createDocumentFragment() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createTextNode(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createComment(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createCDATASection(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createProcessingInstruction(target, data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createAttribute(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createEntityReference(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByTagName(tagname) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM level 2 functions to be implemented later + importNode(importedNode, deep) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createElementNS(namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createAttributeNS(namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByTagNameNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementById(elementId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM level 3 functions to be implemented later + adoptNode(source) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + normalizeDocument() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + renameNode(node, namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM level 4 functions to be implemented later + getElementsByClassName(classNames) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createEvent(eventInterface) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createRange() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createNodeIterator(root, whatToShow, filter) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createTreeWalker(root, whatToShow, filter) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + }; + + // DOM level 1 + Object.defineProperty(XMLDocument.prototype, 'implementation', { + value: new XMLDOMImplementation() + }); + + Object.defineProperty(XMLDocument.prototype, 'doctype', { + get: function() { + var child, i, len, ref; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.DocType) { + return child; + } + } + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'documentElement', { + get: function() { + return this.rootObject || null; + } + }); + + // DOM level 3 + Object.defineProperty(XMLDocument.prototype, 'inputEncoding', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', { + get: function() { + return false; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].encoding; + } else { + return null; + } + } + }); + + Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].standalone === 'yes'; + } else { + return false; + } + } + }); + + Object.defineProperty(XMLDocument.prototype, 'xmlVersion', { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].version; + } else { + return "1.0"; + } + } + }); + + // DOM level 4 + Object.defineProperty(XMLDocument.prototype, 'URL', { + get: function() { + return this.documentURI; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'origin', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'compatMode', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'characterSet', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'contentType', { + get: function() { + return null; + } + }); + + return XMLDocument; + + }).call(this); + +}).call(this); + +},{"./NodeType":5,"./Utility":6,"./XMLDOMConfiguration":12,"./XMLDOMImplementation":14,"./XMLNode":27,"./XMLStringWriter":32,"./XMLStringifier":33}],23:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject, + hasProp = {}.hasOwnProperty; + + ({isObject, isFunction, isPlainObject, getValue} = require('./Utility')); + + NodeType = require('./NodeType'); + + XMLDocument = require('./XMLDocument'); + + XMLElement = require('./XMLElement'); + + XMLCData = require('./XMLCData'); + + XMLComment = require('./XMLComment'); + + XMLRaw = require('./XMLRaw'); + + XMLText = require('./XMLText'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + XMLDeclaration = require('./XMLDeclaration'); + + XMLDocType = require('./XMLDocType'); + + XMLDTDAttList = require('./XMLDTDAttList'); + + XMLDTDEntity = require('./XMLDTDEntity'); + + XMLDTDElement = require('./XMLDTDElement'); + + XMLDTDNotation = require('./XMLDTDNotation'); + + XMLAttribute = require('./XMLAttribute'); + + XMLStringifier = require('./XMLStringifier'); + + XMLStringWriter = require('./XMLStringWriter'); + + WriterState = require('./WriterState'); + + // Represents an XML builder + module.exports = XMLDocumentCB = class XMLDocumentCB { + // Initializes a new instance of `XMLDocumentCB` + + // `options.keepNullNodes` whether nodes with null values will be kept + // or ignored: true or false + // `options.keepNullAttributes` whether attributes with null values will be + // kept or ignored: true or false + // `options.ignoreDecorators` whether decorator strings will be ignored when + // converting JS objects: true or false + // `options.separateArrayItems` whether array items are created as separate + // nodes when passed as an object value: true or false + // `options.noDoubleEncoding` whether existing html entities are encoded: + // true or false + // `options.stringify` a set of functions to use for converting values to + // strings + // `options.writer` the default XML writer to use for converting nodes to + // string. If the default writer is not set, the built-in XMLStringWriter + // will be used instead. + + // `onData` the function to be called when a new chunk of XML is output. The + // string containing the XML chunk is passed to `onData` as its first + // argument, and the current indentation level as its second argument. + // `onEnd` the function to be called when the XML document is completed with + // `end`. `onEnd` does not receive any arguments. + constructor(options, onData, onEnd) { + var writerOptions; + this.name = "?xml"; + this.type = NodeType.Document; + options || (options = {}); + writerOptions = {}; + if (!options.writer) { + options.writer = new XMLStringWriter(); + } else if (isPlainObject(options.writer)) { + writerOptions = options.writer; + options.writer = new XMLStringWriter(); + } + this.options = options; + this.writer = options.writer; + this.writerOptions = this.writer.filterOptions(writerOptions); + this.stringify = new XMLStringifier(options); + this.onDataCallback = onData || function() {}; + this.onEndCallback = onEnd || function() {}; + this.currentNode = null; + this.currentLevel = -1; + this.openTags = {}; + this.documentStarted = false; + this.documentCompleted = false; + this.root = null; + } + + // Creates a child element node from the given XMLNode + + // `node` the child node + createChildNode(node) { + var att, attName, attributes, child, i, len, ref, ref1; + switch (node.type) { + case NodeType.CData: + this.cdata(node.value); + break; + case NodeType.Comment: + this.comment(node.value); + break; + case NodeType.Element: + attributes = {}; + ref = node.attribs; + for (attName in ref) { + if (!hasProp.call(ref, attName)) continue; + att = ref[attName]; + attributes[attName] = att.value; + } + this.node(node.name, attributes); + break; + case NodeType.Dummy: + this.dummy(); + break; + case NodeType.Raw: + this.raw(node.value); + break; + case NodeType.Text: + this.text(node.value); + break; + case NodeType.ProcessingInstruction: + this.instruction(node.target, node.value); + break; + default: + throw new Error("This XML node type is not supported in a JS object: " + node.constructor.name); + } + ref1 = node.children; + // write child nodes recursively + for (i = 0, len = ref1.length; i < len; i++) { + child = ref1[i]; + this.createChildNode(child); + if (child.type === NodeType.Element) { + this.up(); + } + } + return this; + } + + // Creates a dummy node + + dummy() { + // no-op, just return this + return this; + } + + // Creates a node + + // `name` name of the node + // `attributes` an object containing name/value pairs of attributes + // `text` element text + node(name, attributes, text) { + if (name == null) { + throw new Error("Missing node name."); + } + if (this.root && this.currentLevel === -1) { + throw new Error("Document can only have one root node. " + this.debugInfo(name)); + } + this.openCurrent(); + name = getValue(name); + if (attributes == null) { + attributes = {}; + } + attributes = getValue(attributes); + // swap argument order: text <-> attributes + if (!isObject(attributes)) { + [text, attributes] = [attributes, text]; + } + this.currentNode = new XMLElement(this, name, attributes); + this.currentNode.children = false; + this.currentLevel++; + this.openTags[this.currentLevel] = this.currentNode; + if (text != null) { + this.text(text); + } + return this; + } + + // Creates a child element node or an element type declaration when called + // inside the DTD + + // `name` name of the node + // `attributes` an object containing name/value pairs of attributes + // `text` element text + element(name, attributes, text) { + var child, i, len, oldValidationFlag, ref, root; + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + this.dtdElement(...arguments); + } else { + if (Array.isArray(name) || isObject(name) || isFunction(name)) { + oldValidationFlag = this.options.noValidation; + this.options.noValidation = true; + root = new XMLDocument(this.options).element('TEMP_ROOT'); + root.element(name); + this.options.noValidation = oldValidationFlag; + ref = root.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + this.createChildNode(child); + if (child.type === NodeType.Element) { + this.up(); + } + } + } else { + this.node(name, attributes, text); + } + } + return this; + } + + // Adds or modifies an attribute + + // `name` attribute name + // `value` attribute value + attribute(name, value) { + var attName, attValue; + if (!this.currentNode || this.currentNode.children) { + throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(name)); + } + if (name != null) { + name = getValue(name); + } + if (isObject(name)) { // expand if object + for (attName in name) { + if (!hasProp.call(name, attName)) continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (this.options.keepNullAttributes && (value == null)) { + this.currentNode.attribs[name] = new XMLAttribute(this, name, ""); + } else if (value != null) { + this.currentNode.attribs[name] = new XMLAttribute(this, name, value); + } + } + return this; + } + + // Creates a text node + + // `value` element text + text(value) { + var node; + this.openCurrent(); + node = new XMLText(this, value); + this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates a CDATA node + + // `value` element text without CDATA delimiters + cdata(value) { + var node; + this.openCurrent(); + node = new XMLCData(this, value); + this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates a comment node + + // `value` comment text + comment(value) { + var node; + this.openCurrent(); + node = new XMLComment(this, value); + this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Adds unescaped raw text + + // `value` text + raw(value) { + var node; + this.openCurrent(); + node = new XMLRaw(this, value); + this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Adds a processing instruction + + // `target` instruction target + // `value` instruction value + instruction(target, value) { + var i, insTarget, insValue, len, node; + this.openCurrent(); + if (target != null) { + target = getValue(target); + } + if (value != null) { + value = getValue(value); + } + if (Array.isArray(target)) { // expand if array + for (i = 0, len = target.length; i < len; i++) { + insTarget = target[i]; + this.instruction(insTarget); + } + } else if (isObject(target)) { // expand if object + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + node = new XMLProcessingInstruction(this, target, value); + this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + } + return this; + } + + // Creates the xml declaration + + // `version` A version number string, e.g. 1.0 + // `encoding` Encoding declaration, e.g. UTF-8 + // `standalone` standalone document declaration: true or false + declaration(version, encoding, standalone) { + var node; + this.openCurrent(); + if (this.documentStarted) { + throw new Error("declaration() must be the first node."); + } + node = new XMLDeclaration(this, version, encoding, standalone); + this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates the document type declaration + + // `root` the name of the root node + // `pubID` the public identifier of the external subset + // `sysID` the system identifier of the external subset + doctype(root, pubID, sysID) { + this.openCurrent(); + if (root == null) { + throw new Error("Missing root node name."); + } + if (this.root) { + throw new Error("dtd() must come before the root node."); + } + this.currentNode = new XMLDocType(this, pubID, sysID); + this.currentNode.rootNodeName = root; + this.currentNode.children = false; + this.currentLevel++; + this.openTags[this.currentLevel] = this.currentNode; + return this; + } + + // Creates an element type declaration + + // `name` element name + // `value` element content (defaults to #PCDATA) + dtdElement(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDElement(this, name, value); + this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates an attribute declaration + + // `elementName` the name of the element containing this attribute + // `attributeName` attribute name + // `attributeType` type of the attribute (defaults to CDATA) + // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or + // #DEFAULT) (defaults to #IMPLIED) + // `defaultValue` default value of the attribute + // (only used for #FIXED or #DEFAULT) + attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var node; + this.openCurrent(); + node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates a general entity declaration + + // `name` the name of the entity + // `value` internal entity value or an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + // `value.nData` notation declaration + entity(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDEntity(this, false, name, value); + this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates a parameter entity declaration + + // `name` the name of the entity + // `value` internal entity value or an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + pEntity(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDEntity(this, true, name, value); + this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates a NOTATION declaration + + // `name` the name of the notation + // `value` an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + notation(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDNotation(this, name, value); + this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Gets the parent node + up() { + if (this.currentLevel < 0) { + throw new Error("The document node has no parent."); + } + if (this.currentNode) { + if (this.currentNode.children) { + this.closeNode(this.currentNode); + } else { + this.openNode(this.currentNode); + } + this.currentNode = null; + } else { + this.closeNode(this.openTags[this.currentLevel]); + } + delete this.openTags[this.currentLevel]; + this.currentLevel--; + return this; + } + + // Ends the document + end() { + while (this.currentLevel >= 0) { + this.up(); + } + return this.onEnd(); + } + + // Opens the current parent node + openCurrent() { + if (this.currentNode) { + this.currentNode.children = true; + return this.openNode(this.currentNode); + } + } + + // Writes the opening tag of the current node or the entire node if it has + // no child nodes + openNode(node) { + var att, chunk, name, ref; + if (!node.isOpen) { + if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) { + this.root = node; + } + chunk = ''; + if (node.type === NodeType.Element) { + this.writerOptions.state = WriterState.OpenTag; + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name; + ref = node.attribs; + for (name in ref) { + if (!hasProp.call(ref, name)) continue; + att = ref[name]; + chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel); + } + chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel); + this.writerOptions.state = WriterState.InsideTag; // if node.type is NodeType.DocType + } else { + this.writerOptions.state = WriterState.OpenTag; + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ''; + } + chunk += this.writer.endline(node, this.writerOptions, this.currentLevel); + } + this.onData(chunk, this.currentLevel); + return node.isOpen = true; + } + } + + // Writes the closing tag of the current node + closeNode(node) { + var chunk; + if (!node.isClosed) { + chunk = ''; + this.writerOptions.state = WriterState.CloseTag; + if (node.type === NodeType.Element) { + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '' + this.writer.endline(node, this.writerOptions, this.currentLevel); // if node.type is NodeType.DocType + } else { + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel); + } + this.writerOptions.state = WriterState.None; + this.onData(chunk, this.currentLevel); + return node.isClosed = true; + } + } + + // Called when a new chunk of XML is output + + // `chunk` a string containing the XML chunk + // `level` current indentation level + onData(chunk, level) { + this.documentStarted = true; + return this.onDataCallback(chunk, level + 1); + } + + // Called when the XML document is completed + onEnd() { + this.documentCompleted = true; + return this.onEndCallback(); + } + + // Returns debug string + debugInfo(name) { + if (name == null) { + return ""; + } else { + return "node: <" + name + ">"; + } + } + + // Node aliases + ele() { + return this.element(...arguments); + } + + nod(name, attributes, text) { + return this.node(name, attributes, text); + } + + txt(value) { + return this.text(value); + } + + dat(value) { + return this.cdata(value); + } + + com(value) { + return this.comment(value); + } + + ins(target, value) { + return this.instruction(target, value); + } + + dec(version, encoding, standalone) { + return this.declaration(version, encoding, standalone); + } + + dtd(root, pubID, sysID) { + return this.doctype(root, pubID, sysID); + } + + e(name, attributes, text) { + return this.element(name, attributes, text); + } + + n(name, attributes, text) { + return this.node(name, attributes, text); + } + + t(value) { + return this.text(value); + } + + d(value) { + return this.cdata(value); + } + + c(value) { + return this.comment(value); + } + + r(value) { + return this.raw(value); + } + + i(target, value) { + return this.instruction(target, value); + } + + // Attribute aliases + att() { + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + return this.attList(...arguments); + } else { + return this.attribute(...arguments); + } + } + + a() { + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + return this.attList(...arguments); + } else { + return this.attribute(...arguments); + } + } + + // DTD aliases + // att() and ele() are defined above + ent(name, value) { + return this.entity(name, value); + } + + pent(name, value) { + return this.pEntity(name, value); + } + + not(name, value) { + return this.notation(name, value); + } + + }; + +}).call(this); + +},{"./NodeType":5,"./Utility":6,"./WriterState":7,"./XMLAttribute":8,"./XMLCData":9,"./XMLComment":11,"./XMLDTDAttList":16,"./XMLDTDElement":17,"./XMLDTDEntity":18,"./XMLDTDNotation":19,"./XMLDeclaration":20,"./XMLDocType":21,"./XMLDocument":22,"./XMLElement":25,"./XMLProcessingInstruction":29,"./XMLRaw":30,"./XMLStringWriter":32,"./XMLStringifier":33,"./XMLText":34}],24:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDummy, XMLNode; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents a raw node + module.exports = XMLDummy = class XMLDummy extends XMLNode { + // Initializes a new instance of `XMLDummy` + + // `XMLDummy` is a special node representing a node with + // a null value. Dummy nodes are created while recursively + // building the XML tree. Simply skipping null values doesn't + // work because that would break the recursive chain. + constructor(parent) { + super(parent); + this.type = NodeType.Dummy; + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return ''; + } + + }; + +}).call(this); + +},{"./NodeType":5,"./XMLNode":27}],25:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, + hasProp = {}.hasOwnProperty; + + ({isObject, isFunction, getValue} = require('./Utility')); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + XMLAttribute = require('./XMLAttribute'); + + XMLNamedNodeMap = require('./XMLNamedNodeMap'); + + // Represents an element of the XML document + module.exports = XMLElement = (function() { + class XMLElement extends XMLNode { + // Initializes a new instance of `XMLElement` + + // `parent` the parent node + // `name` element name + // `attributes` an object containing name/value pairs of attributes + constructor(parent, name, attributes) { + var child, j, len, ref; + super(parent); + if (name == null) { + throw new Error("Missing element name. " + this.debugInfo()); + } + this.name = this.stringify.name(name); + this.type = NodeType.Element; + this.attribs = {}; + this.schemaTypeInfo = null; + if (attributes != null) { + this.attribute(attributes); + } + // set properties if this is the root node + if (parent.type === NodeType.Document) { + this.isRoot = true; + this.documentObject = parent; + parent.rootObject = this; + // set dtd name + if (parent.children) { + ref = parent.children; + for (j = 0, len = ref.length; j < len; j++) { + child = ref[j]; + if (child.type === NodeType.DocType) { + child.name = this.name; + break; + } + } + } + } + } + + // Creates and returns a deep clone of `this` + + clone() { + var att, attName, clonedSelf, ref; + clonedSelf = Object.create(this); + // remove document element + if (clonedSelf.isRoot) { + clonedSelf.documentObject = null; + } + // clone attributes + clonedSelf.attribs = {}; + ref = this.attribs; + for (attName in ref) { + if (!hasProp.call(ref, attName)) continue; + att = ref[attName]; + clonedSelf.attribs[attName] = att.clone(); + } + // clone child nodes + clonedSelf.children = []; + this.children.forEach(function(child) { + var clonedChild; + clonedChild = child.clone(); + clonedChild.parent = clonedSelf; + return clonedSelf.children.push(clonedChild); + }); + return clonedSelf; + } + + // Adds or modifies an attribute + + // `name` attribute name + // `value` attribute value + attribute(name, value) { + var attName, attValue; + if (name != null) { + name = getValue(name); + } + if (isObject(name)) { // expand if object + for (attName in name) { + if (!hasProp.call(name, attName)) continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (this.options.keepNullAttributes && (value == null)) { + this.attribs[name] = new XMLAttribute(this, name, ""); + } else if (value != null) { + this.attribs[name] = new XMLAttribute(this, name, value); + } + } + return this; + } + + // Removes an attribute + + // `name` attribute name + removeAttribute(name) { + var attName, j, len; + // Also defined in DOM level 1 + // removeAttribute(name) removes an attribute by name. + if (name == null) { + throw new Error("Missing attribute name. " + this.debugInfo()); + } + name = getValue(name); + if (Array.isArray(name)) { // expand if array + for (j = 0, len = name.length; j < len; j++) { + attName = name[j]; + delete this.attribs[attName]; + } + } else { + delete this.attribs[name]; + } + return this; + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + // `options.allowEmpty` do not self close empty element tags + toString(options) { + return this.options.writer.element(this, this.options.writer.filterOptions(options)); + } + + // Aliases + att(name, value) { + return this.attribute(name, value); + } + + a(name, value) { + return this.attribute(name, value); + } + + // DOM Level 1 + getAttribute(name) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name].value; + } else { + return null; + } + } + + setAttribute(name, value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getAttributeNode(name) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name]; + } else { + return null; + } + } + + setAttributeNode(newAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + removeAttributeNode(oldAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByTagName(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM Level 2 + getAttributeNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + setAttributeNS(namespaceURI, qualifiedName, value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + removeAttributeNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getAttributeNodeNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + setAttributeNodeNS(newAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByTagNameNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + hasAttribute(name) { + return this.attribs.hasOwnProperty(name); + } + + hasAttributeNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM Level 3 + setIdAttribute(name, isId) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name].isId; + } else { + return isId; + } + } + + setIdAttributeNS(namespaceURI, localName, isId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + setIdAttributeNode(idAttr, isId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM Level 4 + getElementsByTagName(tagname) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByTagNameNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByClassName(classNames) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + isEqualNode(node) { + var i, j, ref; + if (!super.isEqualNode(node)) { + return false; + } + if (node.namespaceURI !== this.namespaceURI) { + return false; + } + if (node.prefix !== this.prefix) { + return false; + } + if (node.localName !== this.localName) { + return false; + } + if (node.attribs.length !== this.attribs.length) { + return false; + } + for (i = j = 0, ref = this.attribs.length - 1; (0 <= ref ? j <= ref : j >= ref); i = 0 <= ref ? ++j : --j) { + if (!this.attribs[i].isEqualNode(node.attribs[i])) { + return false; + } + } + return true; + } + + }; + + // DOM level 1 + Object.defineProperty(XMLElement.prototype, 'tagName', { + get: function() { + return this.name; + } + }); + + // DOM level 4 + Object.defineProperty(XMLElement.prototype, 'namespaceURI', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLElement.prototype, 'prefix', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLElement.prototype, 'localName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLElement.prototype, 'id', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + Object.defineProperty(XMLElement.prototype, 'className', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + Object.defineProperty(XMLElement.prototype, 'classList', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + Object.defineProperty(XMLElement.prototype, 'attributes', { + get: function() { + if (!this.attributeMap || !this.attributeMap.nodes) { + this.attributeMap = new XMLNamedNodeMap(this.attribs); + } + return this.attributeMap; + } + }); + + return XMLElement; + + }).call(this); + +}).call(this); + +},{"./NodeType":5,"./Utility":6,"./XMLAttribute":8,"./XMLNamedNodeMap":26,"./XMLNode":27}],26:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + // Represents a map of nodes accessed by a string key + var XMLNamedNodeMap; + + module.exports = XMLNamedNodeMap = (function() { + class XMLNamedNodeMap { + // Initializes a new instance of `XMLNamedNodeMap` + // This is just a wrapper around an ordinary + // JS object. + + // `nodes` the object containing nodes. + constructor(nodes) { + this.nodes = nodes; + } + + // Creates and returns a deep clone of `this` + + clone() { + // this class should not be cloned since it wraps + // around a given object. The calling function should check + // whether the wrapped object is null and supply a new object + // (from the clone). + return this.nodes = null; + } + + // DOM Level 1 + getNamedItem(name) { + return this.nodes[name]; + } + + setNamedItem(node) { + var oldNode; + oldNode = this.nodes[node.nodeName]; + this.nodes[node.nodeName] = node; + return oldNode || null; + } + + removeNamedItem(name) { + var oldNode; + oldNode = this.nodes[name]; + delete this.nodes[name]; + return oldNode || null; + } + + item(index) { + return this.nodes[Object.keys(this.nodes)[index]] || null; + } + + // DOM level 2 functions to be implemented later + getNamedItemNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented."); + } + + setNamedItemNS(node) { + throw new Error("This DOM method is not implemented."); + } + + removeNamedItemNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented."); + } + + }; + + + // DOM level 1 + Object.defineProperty(XMLNamedNodeMap.prototype, 'length', { + get: function() { + return Object.keys(this.nodes).length || 0; + } + }); + + return XMLNamedNodeMap; + + }).call(this); + +}).call(this); + +},{}],27:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, + hasProp = {}.hasOwnProperty, + splice = [].splice; + + ({isObject, isFunction, isEmpty, getValue} = require('./Utility')); + + XMLElement = null; + + XMLCData = null; + + XMLComment = null; + + XMLDeclaration = null; + + XMLDocType = null; + + XMLRaw = null; + + XMLText = null; + + XMLProcessingInstruction = null; + + XMLDummy = null; + + NodeType = null; + + XMLNodeList = null; + + XMLNamedNodeMap = null; + + DocumentPosition = null; + + // Represents a generic XMl element + module.exports = XMLNode = (function() { + class XMLNode { + // Initializes a new instance of `XMLNode` + + // `parent` the parent node + constructor(parent1) { + this.parent = parent1; + if (this.parent) { + this.options = this.parent.options; + this.stringify = this.parent.stringify; + } + this.value = null; + this.children = []; + this.baseURI = null; + // first execution, load dependencies that are otherwise + // circular (so we can't load them at the top) + if (!XMLElement) { + XMLElement = require('./XMLElement'); + XMLCData = require('./XMLCData'); + XMLComment = require('./XMLComment'); + XMLDeclaration = require('./XMLDeclaration'); + XMLDocType = require('./XMLDocType'); + XMLRaw = require('./XMLRaw'); + XMLText = require('./XMLText'); + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + XMLDummy = require('./XMLDummy'); + NodeType = require('./NodeType'); + XMLNodeList = require('./XMLNodeList'); + XMLNamedNodeMap = require('./XMLNamedNodeMap'); + DocumentPosition = require('./DocumentPosition'); + } + } + + + // Sets the parent node of this node and its children recursively + + // `parent` the parent node + setParent(parent) { + var child, j, len, ref1, results; + this.parent = parent; + if (parent) { + this.options = parent.options; + this.stringify = parent.stringify; + } + ref1 = this.children; + results = []; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + results.push(child.setParent(this)); + } + return results; + } + + // Creates a child element node + + // `name` node name or an object describing the XML tree + // `attributes` an object containing name/value pairs of attributes + // `text` element text + element(name, attributes, text) { + var childNode, item, j, k, key, lastChild, len, len1, val; + lastChild = null; + if (attributes === null && (text == null)) { + [attributes, text] = [{}, null]; + } + if (attributes == null) { + attributes = {}; + } + attributes = getValue(attributes); + // swap argument order: text <-> attributes + if (!isObject(attributes)) { + [text, attributes] = [attributes, text]; + } + if (name != null) { + name = getValue(name); + } + // expand if array + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + item = name[j]; + lastChild = this.element(item); + } + // evaluate if function + } else if (isFunction(name)) { + lastChild = this.element(name.apply()); + // expand if object + } else if (isObject(name)) { + for (key in name) { + if (!hasProp.call(name, key)) continue; + val = name[key]; + if (isFunction(val)) { + // evaluate if function + val = val.apply(); + } + // assign attributes + if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { + lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); + // skip empty arrays + } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) { + lastChild = this.dummy(); + // empty objects produce one node + } else if (isObject(val) && isEmpty(val)) { + lastChild = this.element(key); + // skip null and undefined nodes + } else if (!this.options.keepNullNodes && (val == null)) { + lastChild = this.dummy(); + + // expand list by creating child nodes + } else if (!this.options.separateArrayItems && Array.isArray(val)) { + for (k = 0, len1 = val.length; k < len1; k++) { + item = val[k]; + childNode = {}; + childNode[key] = item; + lastChild = this.element(childNode); + } + + // expand child nodes under parent + } else if (isObject(val)) { + // if the key is #text expand child nodes under this node to support mixed content + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.element(val); + } else { + lastChild = this.element(key); + lastChild.element(val); + } + } else { + + // text node + lastChild = this.element(key, val); + } + } + // skip null nodes + } else if (!this.options.keepNullNodes && text === null) { + lastChild = this.dummy(); + } else { + // text node + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.text(text); + // cdata node + } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { + lastChild = this.cdata(text); + // comment node + } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { + lastChild = this.comment(text); + // raw text node + } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { + lastChild = this.raw(text); + // processing instruction + } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) { + lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text); + } else { + // element node + lastChild = this.node(name, attributes, text); + } + } + if (lastChild == null) { + throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo()); + } + return lastChild; + } + + // Creates a child element node before the current node + + // `name` node name or an object describing the XML tree + // `attributes` an object containing name/value pairs of attributes + // `text` element text + insertBefore(name, attributes, text) { + var child, i, newChild, refChild, removed; + // DOM level 1 + // insertBefore(newChild, refChild) inserts the child node newChild before refChild + if (name != null ? name.type : void 0) { + newChild = name; + refChild = attributes; + newChild.setParent(this); + if (refChild) { + // temporarily remove children starting *with* refChild + i = children.indexOf(refChild); + removed = children.splice(i); + + // add the new child + children.push(newChild); + + // add back removed children after new child + Array.prototype.push.apply(children, removed); + } else { + children.push(newChild); + } + return newChild; + } else { + if (this.isRoot) { + throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); + } + + // temporarily remove children starting *with* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + + // add the new child + child = this.parent.element(name, attributes, text); + + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return child; + } + } + + // Creates a child element node after the current node + + // `name` node name or an object describing the XML tree + // `attributes` an object containing name/value pairs of attributes + // `text` element text + insertAfter(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); + } + + // temporarily remove children starting *after* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + + // add the new child + child = this.parent.element(name, attributes, text); + + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return child; + } + + // Deletes a child element node + + remove() { + var i, ref1; + if (this.isRoot) { + throw new Error("Cannot remove the root element. " + this.debugInfo()); + } + i = this.parent.children.indexOf(this); + splice.apply(this.parent.children, [i, i - i + 1].concat(ref1 = [])), ref1; + return this.parent; + } + + // Creates a node + + // `name` name of the node + // `attributes` an object containing name/value pairs of attributes + // `text` element text + node(name, attributes, text) { + var child; + if (name != null) { + name = getValue(name); + } + attributes || (attributes = {}); + attributes = getValue(attributes); + // swap argument order: text <-> attributes + if (!isObject(attributes)) { + [text, attributes] = [attributes, text]; + } + child = new XMLElement(this, name, attributes); + if (text != null) { + child.text(text); + } + this.children.push(child); + return child; + } + + // Creates a text node + + // `value` element text + text(value) { + var child; + if (isObject(value)) { + this.element(value); + } + child = new XMLText(this, value); + this.children.push(child); + return this; + } + + // Creates a CDATA node + + // `value` element text without CDATA delimiters + cdata(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + } + + // Creates a comment node + + // `value` comment text + comment(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + } + + // Creates a comment node before the current node + + // `value` comment text + commentBefore(value) { + var child, i, removed; + // temporarily remove children starting *with* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + // add the new child + child = this.parent.comment(value); + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return this; + } + + // Creates a comment node after the current node + + // `value` comment text + commentAfter(value) { + var child, i, removed; + // temporarily remove children starting *after* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + // add the new child + child = this.parent.comment(value); + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return this; + } + + // Adds unescaped raw text + + // `value` text + raw(value) { + var child; + child = new XMLRaw(this, value); + this.children.push(child); + return this; + } + + // Adds a dummy node + dummy() { + var child; + child = new XMLDummy(this); + // Normally when a new node is created it is added to the child node collection. + // However, dummy nodes are never added to the XML tree. They are created while + // converting JS objects to XML nodes in order not to break the recursive function + // chain. They can be thought of as invisible nodes. They can be traversed through + // by using prev(), next(), up(), etc. functions but they do not exists in the tree. + + // @children.push child + return child; + } + + // Adds a processing instruction + + // `target` instruction target + // `value` instruction value + instruction(target, value) { + var insTarget, insValue, instruction, j, len; + if (target != null) { + target = getValue(target); + } + if (value != null) { + value = getValue(value); + } + if (Array.isArray(target)) { // expand if array + for (j = 0, len = target.length; j < len; j++) { + insTarget = target[j]; + this.instruction(insTarget); + } + } else if (isObject(target)) { // expand if object + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + instruction = new XMLProcessingInstruction(this, target, value); + this.children.push(instruction); + } + return this; + } + + // Creates a processing instruction node before the current node + + // `target` instruction target + // `value` instruction value + instructionBefore(target, value) { + var child, i, removed; + // temporarily remove children starting *with* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + // add the new child + child = this.parent.instruction(target, value); + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return this; + } + + // Creates a processing instruction node after the current node + + // `target` instruction target + // `value` instruction value + instructionAfter(target, value) { + var child, i, removed; + // temporarily remove children starting *after* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + // add the new child + child = this.parent.instruction(target, value); + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return this; + } + + // Creates the xml declaration + + // `version` A version number string, e.g. 1.0 + // `encoding` Encoding declaration, e.g. UTF-8 + // `standalone` standalone document declaration: true or false + declaration(version, encoding, standalone) { + var doc, xmldec; + doc = this.document(); + xmldec = new XMLDeclaration(doc, version, encoding, standalone); + // Replace XML declaration if exists, otherwise insert at top + if (doc.children.length === 0) { + doc.children.unshift(xmldec); + } else if (doc.children[0].type === NodeType.Declaration) { + doc.children[0] = xmldec; + } else { + doc.children.unshift(xmldec); + } + return doc.root() || doc; + } + + // Creates the document type declaration + + // `pubID` the public identifier of the external subset + // `sysID` the system identifier of the external subset + dtd(pubID, sysID) { + var child, doc, doctype, i, j, k, len, len1, ref1, ref2; + doc = this.document(); + doctype = new XMLDocType(doc, pubID, sysID); + ref1 = doc.children; + // Replace DTD if exists + for (i = j = 0, len = ref1.length; j < len; i = ++j) { + child = ref1[i]; + if (child.type === NodeType.DocType) { + doc.children[i] = doctype; + return doctype; + } + } + ref2 = doc.children; + // insert before root node if the root node exists + for (i = k = 0, len1 = ref2.length; k < len1; i = ++k) { + child = ref2[i]; + if (child.isRoot) { + doc.children.splice(i, 0, doctype); + return doctype; + } + } + // otherwise append to end + doc.children.push(doctype); + return doctype; + } + + // Gets the parent node + up() { + if (this.isRoot) { + throw new Error("The root node has no parent. Use doc() if you need to get the document object."); + } + return this.parent; + } + + // Gets the root node + root() { + var node; + node = this; + while (node) { + if (node.type === NodeType.Document) { + return node.rootObject; + } else if (node.isRoot) { + return node; + } else { + node = node.parent; + } + } + } + + // Gets the node representing the XML document + document() { + var node; + node = this; + while (node) { + if (node.type === NodeType.Document) { + return node; + } else { + node = node.parent; + } + } + } + + // Ends the document and converts string + end(options) { + return this.document().end(options); + } + + // Gets the previous node + prev() { + var i; + i = this.parent.children.indexOf(this); + if (i < 1) { + throw new Error("Already at the first node. " + this.debugInfo()); + } + return this.parent.children[i - 1]; + } + + // Gets the next node + next() { + var i; + i = this.parent.children.indexOf(this); + if (i === -1 || i === this.parent.children.length - 1) { + throw new Error("Already at the last node. " + this.debugInfo()); + } + return this.parent.children[i + 1]; + } + + // Imports cloned root from another XML document + + // `doc` the XML document to insert nodes from + importDocument(doc) { + var child, clonedRoot, j, len, ref1; + clonedRoot = doc.root().clone(); + clonedRoot.parent = this; + clonedRoot.isRoot = false; + this.children.push(clonedRoot); + // set properties if imported element becomes the root node + if (this.type === NodeType.Document) { + clonedRoot.isRoot = true; + clonedRoot.documentObject = this; + this.rootObject = clonedRoot; + // set dtd name + if (this.children) { + ref1 = this.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + if (child.type === NodeType.DocType) { + child.name = clonedRoot.name; + break; + } + } + } + } + return this; + } + + + // Returns debug string for this node + debugInfo(name) { + var ref1, ref2; + name = name || this.name; + if ((name == null) && !((ref1 = this.parent) != null ? ref1.name : void 0)) { + return ""; + } else if (name == null) { + return "parent: <" + this.parent.name + ">"; + } else if (!((ref2 = this.parent) != null ? ref2.name : void 0)) { + return "node: <" + name + ">"; + } else { + return "node: <" + name + ">, parent: <" + this.parent.name + ">"; + } + } + + // Aliases + ele(name, attributes, text) { + return this.element(name, attributes, text); + } + + nod(name, attributes, text) { + return this.node(name, attributes, text); + } + + txt(value) { + return this.text(value); + } + + dat(value) { + return this.cdata(value); + } + + com(value) { + return this.comment(value); + } + + ins(target, value) { + return this.instruction(target, value); + } + + doc() { + return this.document(); + } + + dec(version, encoding, standalone) { + return this.declaration(version, encoding, standalone); + } + + e(name, attributes, text) { + return this.element(name, attributes, text); + } + + n(name, attributes, text) { + return this.node(name, attributes, text); + } + + t(value) { + return this.text(value); + } + + d(value) { + return this.cdata(value); + } + + c(value) { + return this.comment(value); + } + + r(value) { + return this.raw(value); + } + + i(target, value) { + return this.instruction(target, value); + } + + u() { + return this.up(); + } + + // can be deprecated in a future release + importXMLBuilder(doc) { + return this.importDocument(doc); + } + + // Adds or modifies an attribute. + + // `name` attribute name + // `value` attribute value + attribute(name, value) { + throw new Error("attribute() applies to element nodes only."); + } + + att(name, value) { + return this.attribute(name, value); + } + + a(name, value) { + return this.attribute(name, value); + } + + // Removes an attribute + + // `name` attribute name + removeAttribute(name) { + throw new Error("attribute() applies to element nodes only."); + } + + // DOM level 1 functions to be implemented later + replaceChild(newChild, oldChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + removeChild(oldChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + appendChild(newChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + hasChildNodes() { + return this.children.length !== 0; + } + + cloneNode(deep) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + normalize() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM level 2 + isSupported(feature, version) { + return true; + } + + hasAttributes() { + return this.attribs.length !== 0; + } + + // DOM level 3 functions to be implemented later + compareDocumentPosition(other) { + var ref, res; + ref = this; + if (ref === other) { + return 0; + } else if (this.document() !== other.document()) { + res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific; + if (Math.random() < 0.5) { + res |= DocumentPosition.Preceding; + } else { + res |= DocumentPosition.Following; + } + return res; + } else if (ref.isAncestor(other)) { + return DocumentPosition.Contains | DocumentPosition.Preceding; + } else if (ref.isDescendant(other)) { + return DocumentPosition.Contains | DocumentPosition.Following; + } else if (ref.isPreceding(other)) { + return DocumentPosition.Preceding; + } else { + return DocumentPosition.Following; + } + } + + isSameNode(other) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + lookupPrefix(namespaceURI) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + isDefaultNamespace(namespaceURI) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + lookupNamespaceURI(prefix) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + isEqualNode(node) { + var i, j, ref1; + if (node.nodeType !== this.nodeType) { + return false; + } + if (node.children.length !== this.children.length) { + return false; + } + for (i = j = 0, ref1 = this.children.length - 1; (0 <= ref1 ? j <= ref1 : j >= ref1); i = 0 <= ref1 ? ++j : --j) { + if (!this.children[i].isEqualNode(node.children[i])) { + return false; + } + } + return true; + } + + getFeature(feature, version) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + setUserData(key, data, handler) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getUserData(key) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // Returns true if other is an inclusive descendant of node, + // and false otherwise. + contains(other) { + if (!other) { + return false; + } + return other === this || this.isDescendant(other); + } + + // An object A is called a descendant of an object B, if either A is + // a child of B or A is a child of an object C that is a descendant of B. + isDescendant(node) { + var child, isDescendantChild, j, len, ref1; + ref1 = this.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + if (node === child) { + return true; + } + isDescendantChild = child.isDescendant(node); + if (isDescendantChild) { + return true; + } + } + return false; + } + + // An object A is called an ancestor of an object B if and only if + // B is a descendant of A. + isAncestor(node) { + return node.isDescendant(this); + } + + // An object A is preceding an object B if A and B are in the + // same tree and A comes before B in tree order. + isPreceding(node) { + var nodePos, thisPos; + nodePos = this.treePosition(node); + thisPos = this.treePosition(this); + if (nodePos === -1 || thisPos === -1) { + return false; + } else { + return nodePos < thisPos; + } + } + + // An object A is folllowing an object B if A and B are in the + // same tree and A comes after B in tree order. + isFollowing(node) { + var nodePos, thisPos; + nodePos = this.treePosition(node); + thisPos = this.treePosition(this); + if (nodePos === -1 || thisPos === -1) { + return false; + } else { + return nodePos > thisPos; + } + } + + // Returns the preorder position of the given node in the tree, or -1 + // if the node is not in the tree. + treePosition(node) { + var found, pos; + pos = 0; + found = false; + this.foreachTreeNode(this.document(), function(childNode) { + pos++; + if (!found && childNode === node) { + return found = true; + } + }); + if (found) { + return pos; + } else { + return -1; + } + } + + + // Depth-first preorder traversal through the XML tree + foreachTreeNode(node, func) { + var child, j, len, ref1, res; + node || (node = this.document()); + ref1 = node.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + if (res = func(child)) { + return res; + } else { + res = this.foreachTreeNode(child, func); + if (res) { + return res; + } + } + } + } + + }; + + // DOM level 1 + Object.defineProperty(XMLNode.prototype, 'nodeName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLNode.prototype, 'nodeType', { + get: function() { + return this.type; + } + }); + + Object.defineProperty(XMLNode.prototype, 'nodeValue', { + get: function() { + return this.value; + } + }); + + Object.defineProperty(XMLNode.prototype, 'parentNode', { + get: function() { + return this.parent; + } + }); + + Object.defineProperty(XMLNode.prototype, 'childNodes', { + get: function() { + if (!this.childNodeList || !this.childNodeList.nodes) { + this.childNodeList = new XMLNodeList(this.children); + } + return this.childNodeList; + } + }); + + Object.defineProperty(XMLNode.prototype, 'firstChild', { + get: function() { + return this.children[0] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'lastChild', { + get: function() { + return this.children[this.children.length - 1] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'previousSibling', { + get: function() { + var i; + i = this.parent.children.indexOf(this); + return this.parent.children[i - 1] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'nextSibling', { + get: function() { + var i; + i = this.parent.children.indexOf(this); + return this.parent.children[i + 1] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'ownerDocument', { + get: function() { + return this.document() || null; + } + }); + + // DOM level 3 + Object.defineProperty(XMLNode.prototype, 'textContent', { + get: function() { + var child, j, len, ref1, str; + if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) { + str = ''; + ref1 = this.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + if (child.textContent) { + str += child.textContent; + } + } + return str; + } else { + return null; + } + }, + set: function(value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + return XMLNode; + + }).call(this); + +}).call(this); + +},{"./DocumentPosition":4,"./NodeType":5,"./Utility":6,"./XMLCData":9,"./XMLComment":11,"./XMLDeclaration":20,"./XMLDocType":21,"./XMLDummy":24,"./XMLElement":25,"./XMLNamedNodeMap":26,"./XMLNodeList":28,"./XMLProcessingInstruction":29,"./XMLRaw":30,"./XMLText":34}],28:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + // Represents a list of nodes + var XMLNodeList; + + module.exports = XMLNodeList = (function() { + class XMLNodeList { + // Initializes a new instance of `XMLNodeList` + // This is just a wrapper around an ordinary + // JS array. + + // `nodes` the array containing nodes. + constructor(nodes) { + this.nodes = nodes; + } + + // Creates and returns a deep clone of `this` + + clone() { + // this class should not be cloned since it wraps + // around a given array. The calling function should check + // whether the wrapped array is null and supply a new array + // (from the clone). + return this.nodes = null; + } + + // DOM Level 1 + item(index) { + return this.nodes[index] || null; + } + + }; + + // DOM level 1 + Object.defineProperty(XMLNodeList.prototype, 'length', { + get: function() { + return this.nodes.length || 0; + } + }); + + return XMLNodeList; + + }).call(this); + +}).call(this); + +},{}],29:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLCharacterData, XMLProcessingInstruction; + + NodeType = require('./NodeType'); + + XMLCharacterData = require('./XMLCharacterData'); + + // Represents a processing instruction + module.exports = XMLProcessingInstruction = class XMLProcessingInstruction extends XMLCharacterData { + // Initializes a new instance of `XMLProcessingInstruction` + + // `parent` the parent node + // `target` instruction target + // `value` instruction value + constructor(parent, target, value) { + super(parent); + if (target == null) { + throw new Error("Missing instruction target. " + this.debugInfo()); + } + this.type = NodeType.ProcessingInstruction; + this.target = this.stringify.insTarget(target); + this.name = this.target; + if (value) { + this.value = this.stringify.insValue(value); + } + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options)); + } + + isEqualNode(node) { + if (!super.isEqualNode(node)) { + return false; + } + if (node.target !== this.target) { + return false; + } + return true; + } + + }; + +}).call(this); + +},{"./NodeType":5,"./XMLCharacterData":10}],30:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLNode, XMLRaw; + + NodeType = require('./NodeType'); + + XMLNode = require('./XMLNode'); + + // Represents a raw node + module.exports = XMLRaw = class XMLRaw extends XMLNode { + // Initializes a new instance of `XMLRaw` + + // `text` raw text + constructor(parent, text) { + super(parent); + if (text == null) { + throw new Error("Missing raw text. " + this.debugInfo()); + } + this.type = NodeType.Raw; + this.value = this.stringify.raw(text); + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.raw(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); + +},{"./NodeType":5,"./XMLNode":27}],31:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, WriterState, XMLStreamWriter, XMLWriterBase, + hasProp = {}.hasOwnProperty; + + NodeType = require('./NodeType'); + + XMLWriterBase = require('./XMLWriterBase'); + + WriterState = require('./WriterState'); + + // Prints XML nodes to a stream + module.exports = XMLStreamWriter = class XMLStreamWriter extends XMLWriterBase { + // Initializes a new instance of `XMLStreamWriter` + + // `stream` output stream + // `options.pretty` pretty prints the result + // `options.indent` indentation string + // `options.newline` newline sequence + // `options.offset` a fixed number of indentations to add to every line + // `options.allowEmpty` do not self close empty element tags + // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF + // `options.spaceBeforeSlash` add a space before the closing slash of empty elements + constructor(stream, options) { + super(options); + this.stream = stream; + } + + endline(node, options, level) { + if (node.isLastRootNode && options.state === WriterState.CloseTag) { + return ''; + } else { + return super.endline(node, options, level); + } + } + + document(doc, options) { + var child, i, j, k, len1, len2, ref, ref1, results; + ref = doc.children; + // set a flag so that we don't insert a newline after the last root level node + for (i = j = 0, len1 = ref.length; j < len1; i = ++j) { + child = ref[i]; + child.isLastRootNode = i === doc.children.length - 1; + } + options = this.filterOptions(options); + ref1 = doc.children; + results = []; + for (k = 0, len2 = ref1.length; k < len2; k++) { + child = ref1[k]; + results.push(this.writeChildNode(child, options, 0)); + } + return results; + } + + cdata(node, options, level) { + return this.stream.write(super.cdata(node, options, level)); + } + + comment(node, options, level) { + return this.stream.write(super.comment(node, options, level)); + } + + declaration(node, options, level) { + return this.stream.write(super.declaration(node, options, level)); + } + + docType(node, options, level) { + var child, j, len1, ref; + level || (level = 0); + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + this.stream.write(this.indent(node, options, level)); + this.stream.write(' 0) { + this.stream.write(' ['); + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.InsideTag; + ref = node.children; + for (j = 0, len1 = ref.length; j < len1; j++) { + child = ref[j]; + this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + this.stream.write(']'); + } + // close tag + options.state = WriterState.CloseTag; + this.stream.write(options.spaceBeforeSlash + '>'); + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.None; + return this.closeNode(node, options, level); + } + + element(node, options, level) { + var att, attLen, child, childNodeCount, firstChildNode, j, len, len1, name, prettySuppressed, r, ratt, ref, ref1, ref2, rline; + level || (level = 0); + // open tag + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '<' + node.name; + // attributes + if (options.pretty && options.width > 0) { + len = r.length; + ref = node.attribs; + for (name in ref) { + if (!hasProp.call(ref, name)) continue; + att = ref[name]; + ratt = this.attribute(att, options, level); + attLen = ratt.length; + if (len + attLen > options.width) { + rline = this.indent(node, options, level + 1) + ratt; + r += this.endline(node, options, level) + rline; + len = rline.length; + } else { + rline = ' ' + ratt; + r += rline; + len += rline.length; + } + } + } else { + ref1 = node.attribs; + for (name in ref1) { + if (!hasProp.call(ref1, name)) continue; + att = ref1[name]; + r += this.attribute(att, options, level); + } + } + this.stream.write(r); + childNodeCount = node.children.length; + firstChildNode = childNodeCount === 0 ? null : node.children[0]; + if (childNodeCount === 0 || node.children.every(function(e) { + return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === ''; + })) { + // empty element + if (options.allowEmpty) { + this.stream.write('>'); + options.state = WriterState.CloseTag; + this.stream.write(''); + } else { + options.state = WriterState.CloseTag; + this.stream.write(options.spaceBeforeSlash + '/>'); + } + } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) { + // do not indent text-only nodes + this.stream.write('>'); + options.state = WriterState.InsideTag; + options.suppressPrettyCount++; + prettySuppressed = true; + this.writeChildNode(firstChildNode, options, level + 1); + options.suppressPrettyCount--; + prettySuppressed = false; + options.state = WriterState.CloseTag; + this.stream.write(''); + } else { + this.stream.write('>' + this.endline(node, options, level)); + options.state = WriterState.InsideTag; + ref2 = node.children; + // inner tags + for (j = 0, len1 = ref2.length; j < len1; j++) { + child = ref2[j]; + this.writeChildNode(child, options, level + 1); + } + // close tag + options.state = WriterState.CloseTag; + this.stream.write(this.indent(node, options, level) + ''); + } + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.None; + return this.closeNode(node, options, level); + } + + processingInstruction(node, options, level) { + return this.stream.write(super.processingInstruction(node, options, level)); + } + + raw(node, options, level) { + return this.stream.write(super.raw(node, options, level)); + } + + text(node, options, level) { + return this.stream.write(super.text(node, options, level)); + } + + dtdAttList(node, options, level) { + return this.stream.write(super.dtdAttList(node, options, level)); + } + + dtdElement(node, options, level) { + return this.stream.write(super.dtdElement(node, options, level)); + } + + dtdEntity(node, options, level) { + return this.stream.write(super.dtdEntity(node, options, level)); + } + + dtdNotation(node, options, level) { + return this.stream.write(super.dtdNotation(node, options, level)); + } + + }; + +}).call(this); + +},{"./NodeType":5,"./WriterState":7,"./XMLWriterBase":35}],32:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var XMLStringWriter, XMLWriterBase; + + XMLWriterBase = require('./XMLWriterBase'); + + // Prints XML nodes as plain text + module.exports = XMLStringWriter = class XMLStringWriter extends XMLWriterBase { + // Initializes a new instance of `XMLStringWriter` + + // `options.pretty` pretty prints the result + // `options.indent` indentation string + // `options.newline` newline sequence + // `options.offset` a fixed number of indentations to add to every line + // `options.allowEmpty` do not self close empty element tags + // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF + // `options.spaceBeforeSlash` add a space before the closing slash of empty elements + constructor(options) { + super(options); + } + + document(doc, options) { + var child, i, len, r, ref; + options = this.filterOptions(options); + r = ''; + ref = doc.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + r += this.writeChildNode(child, options, 0); + } + // remove trailing newline + if (options.pretty && r.slice(-options.newline.length) === options.newline) { + r = r.slice(0, -options.newline.length); + } + return r; + } + + }; + +}).call(this); + +},{"./XMLWriterBase":35}],33:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + // Converts values to strings + var XMLStringifier, + hasProp = {}.hasOwnProperty; + + module.exports = XMLStringifier = (function() { + class XMLStringifier { + // Initializes a new instance of `XMLStringifier` + + // `options.version` The version number string of the XML spec to validate against, e.g. 1.0 + // `options.noDoubleEncoding` whether existing html entities are encoded: true or false + // `options.stringify` a set of functions to use for converting values to strings + // `options.noValidation` whether values will be validated and escaped or returned as is + // `options.invalidCharReplacement` a character to replace invalid characters and disable character validation + constructor(options) { + var key, ref, value; + // Checks whether the given string contains legal characters + // Fails with an exception on error + + // `str` the string to check + this.assertLegalChar = this.assertLegalChar.bind(this); + // Checks whether the given string contains legal characters for a name + // Fails with an exception on error + + // `str` the string to check + this.assertLegalName = this.assertLegalName.bind(this); + options || (options = {}); + this.options = options; + if (!this.options.version) { + this.options.version = '1.0'; + } + ref = options.stringify || {}; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + value = ref[key]; + this[key] = value; + } + } + + // Defaults + name(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalName('' + val || ''); + } + + text(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar(this.textEscape('' + val || '')); + } + + cdata(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + val = val.replace(']]>', ']]]]>'); + return this.assertLegalChar(val); + } + + comment(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (val.match(/--/)) { + throw new Error("Comment text cannot contain double-hypen: " + val); + } + return this.assertLegalChar(val); + } + + raw(val) { + if (this.options.noValidation) { + return val; + } + return '' + val || ''; + } + + attValue(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar(this.attEscape(val = '' + val || '')); + } + + insTarget(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + insValue(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (val.match(/\?>/)) { + throw new Error("Invalid processing instruction value: " + val); + } + return this.assertLegalChar(val); + } + + xmlVersion(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (!val.match(/1\.[0-9]+/)) { + throw new Error("Invalid version number: " + val); + } + return val; + } + + xmlEncoding(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) { + throw new Error("Invalid encoding: " + val); + } + return this.assertLegalChar(val); + } + + xmlStandalone(val) { + if (this.options.noValidation) { + return val; + } + if (val) { + return "yes"; + } else { + return "no"; + } + } + + dtdPubID(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdSysID(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdElementValue(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdAttType(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdAttDefault(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdEntityValue(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdNData(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + assertLegalChar(str) { + var regex, res; + if (this.options.noValidation) { + return str; + } + if (this.options.version === '1.0') { + // Valid characters from https://www.w3.org/TR/xml/#charsets + // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. + // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] + // This ES5 compatible Regexp has been generated using the "regenerate" NPM module: + // let xml_10_InvalidChars = regenerate() + // .addRange(0x0000, 0x0008) + // .add(0x000B, 0x000C) + // .addRange(0x000E, 0x001F) + // .addRange(0xD800, 0xDFFF) + // .addRange(0xFFFE, 0xFFFF) + regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g; + if (this.options.invalidCharReplacement !== void 0) { + str = str.replace(regex, this.options.invalidCharReplacement); + } else if (res = str.match(regex)) { + throw new Error(`Invalid character in string: ${str} at index ${res.index}`); + } + } else if (this.options.version === '1.1') { + // Valid characters from https://www.w3.org/TR/xml11/#charsets + // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. + // [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] + // This ES5 compatible Regexp has been generated using the "regenerate" NPM module: + // let xml_11_InvalidChars = regenerate() + // .add(0x0000) + // .addRange(0xD800, 0xDFFF) + // .addRange(0xFFFE, 0xFFFF) + regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g; + if (this.options.invalidCharReplacement !== void 0) { + str = str.replace(regex, this.options.invalidCharReplacement); + } else if (res = str.match(regex)) { + throw new Error(`Invalid character in string: ${str} at index ${res.index}`); + } + } + return str; + } + + assertLegalName(str) { + var regex; + if (this.options.noValidation) { + return str; + } + str = this.assertLegalChar(str); + regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/; + if (!str.match(regex)) { + throw new Error(`Invalid character in name: ${str}`); + } + return str; + } + + // Escapes special characters in text + + // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping + + // `str` the string to escape + textEscape(str) { + var ampregex; + if (this.options.noValidation) { + return str; + } + ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g; + return str.replace(ampregex, '&').replace(//g, '>').replace(/\r/g, ' '); + } + + // Escapes special characters in attribute values + + // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping + + // `str` the string to escape + attEscape(str) { + var ampregex; + if (this.options.noValidation) { + return str; + } + ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g; + return str.replace(ampregex, '&').replace(/ 0) { + return new Array(indentLevel).join(options.indent); + } + } + return ''; + } + + // Returns the newline string + + // `node` current node + // `options` writer options + // `level` current indentation level + endline(node, options, level) { + if (!options.pretty || options.suppressPrettyCount) { + return ''; + } else { + return options.newline; + } + } + + attribute(att, options, level) { + var r; + this.openAttribute(att, options, level); + if (options.pretty && options.width > 0) { + r = att.name + '="' + att.value + '"'; + } else { + r = ' ' + att.name + '="' + att.value + '"'; + } + this.closeAttribute(att, options, level); + return r; + } + + cdata(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + comment(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + declaration(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + ''; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + docType(node, options, level) { + var child, i, len1, r, ref; + level || (level = 0); + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + r += ' 0) { + r += ' ['; + r += this.endline(node, options, level); + options.state = WriterState.InsideTag; + ref = node.children; + for (i = 0, len1 = ref.length; i < len1; i++) { + child = ref[i]; + r += this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + r += ']'; + } + // close tag + options.state = WriterState.CloseTag; + r += options.spaceBeforeSlash + '>'; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + element(node, options, level) { + var att, attLen, child, childNodeCount, firstChildNode, i, j, len, len1, len2, name, prettySuppressed, r, ratt, ref, ref1, ref2, ref3, rline; + level || (level = 0); + prettySuppressed = false; + // open tag + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '<' + node.name; + // attributes + if (options.pretty && options.width > 0) { + len = r.length; + ref = node.attribs; + for (name in ref) { + if (!hasProp.call(ref, name)) continue; + att = ref[name]; + ratt = this.attribute(att, options, level); + attLen = ratt.length; + if (len + attLen > options.width) { + rline = this.indent(node, options, level + 1) + ratt; + r += this.endline(node, options, level) + rline; + len = rline.length; + } else { + rline = ' ' + ratt; + r += rline; + len += rline.length; + } + } + } else { + ref1 = node.attribs; + for (name in ref1) { + if (!hasProp.call(ref1, name)) continue; + att = ref1[name]; + r += this.attribute(att, options, level); + } + } + childNodeCount = node.children.length; + firstChildNode = childNodeCount === 0 ? null : node.children[0]; + if (childNodeCount === 0 || node.children.every(function(e) { + return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === ''; + })) { + // empty element + if (options.allowEmpty) { + r += '>'; + options.state = WriterState.CloseTag; + r += '' + this.endline(node, options, level); + } else { + options.state = WriterState.CloseTag; + r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level); + } + } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) { + // do not indent text-only nodes + r += '>'; + options.state = WriterState.InsideTag; + options.suppressPrettyCount++; + prettySuppressed = true; + r += this.writeChildNode(firstChildNode, options, level + 1); + options.suppressPrettyCount--; + prettySuppressed = false; + options.state = WriterState.CloseTag; + r += '' + this.endline(node, options, level); + } else { + // if ANY are a text node, then suppress pretty now + if (options.dontPrettyTextNodes) { + ref2 = node.children; + for (i = 0, len1 = ref2.length; i < len1; i++) { + child = ref2[i]; + if ((child.type === NodeType.Text || child.type === NodeType.Raw || child.type === NodeType.CData) && (child.value != null)) { + options.suppressPrettyCount++; + prettySuppressed = true; + break; + } + } + } + // close the opening tag, after dealing with newline + r += '>' + this.endline(node, options, level); + options.state = WriterState.InsideTag; + ref3 = node.children; + // inner tags + for (j = 0, len2 = ref3.length; j < len2; j++) { + child = ref3[j]; + r += this.writeChildNode(child, options, level + 1); + } + // close tag + options.state = WriterState.CloseTag; + r += this.indent(node, options, level) + ''; + if (prettySuppressed) { + options.suppressPrettyCount--; + } + r += this.endline(node, options, level); + options.state = WriterState.None; + } + this.closeNode(node, options, level); + return r; + } + + writeChildNode(node, options, level) { + switch (node.type) { + case NodeType.CData: + return this.cdata(node, options, level); + case NodeType.Comment: + return this.comment(node, options, level); + case NodeType.Element: + return this.element(node, options, level); + case NodeType.Raw: + return this.raw(node, options, level); + case NodeType.Text: + return this.text(node, options, level); + case NodeType.ProcessingInstruction: + return this.processingInstruction(node, options, level); + case NodeType.Dummy: + return ''; + case NodeType.Declaration: + return this.declaration(node, options, level); + case NodeType.DocType: + return this.docType(node, options, level); + case NodeType.AttributeDeclaration: + return this.dtdAttList(node, options, level); + case NodeType.ElementDeclaration: + return this.dtdElement(node, options, level); + case NodeType.EntityDeclaration: + return this.dtdEntity(node, options, level); + case NodeType.NotationDeclaration: + return this.dtdNotation(node, options, level); + default: + throw new Error("Unknown XML node type: " + node.constructor.name); + } + } + + processingInstruction(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + ''; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + raw(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + options.state = WriterState.InsideTag; + r += node.value; + options.state = WriterState.CloseTag; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + text(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + options.state = WriterState.InsideTag; + r += node.value; + options.state = WriterState.CloseTag; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + dtdAttList(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + dtdElement(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + dtdEntity(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + dtdNotation(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + openNode(node, options, level) {} + + closeNode(node, options, level) {} + + openAttribute(att, options, level) {} + + closeAttribute(att, options, level) {} + + }; + +}).call(this); + +},{"./NodeType":5,"./Utility":6,"./WriterState":7,"./XMLCData":9,"./XMLComment":11,"./XMLDTDAttList":16,"./XMLDTDElement":17,"./XMLDTDEntity":18,"./XMLDTDNotation":19,"./XMLDeclaration":20,"./XMLDocType":21,"./XMLDummy":24,"./XMLElement":25,"./XMLProcessingInstruction":29,"./XMLRaw":30,"./XMLText":34}],36:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction; + + ({assign, isFunction} = require('./Utility')); + + XMLDOMImplementation = require('./XMLDOMImplementation'); + + XMLDocument = require('./XMLDocument'); + + XMLDocumentCB = require('./XMLDocumentCB'); + + XMLStringWriter = require('./XMLStringWriter'); + + XMLStreamWriter = require('./XMLStreamWriter'); + + NodeType = require('./NodeType'); + + WriterState = require('./WriterState'); + + // Creates a new document and returns the root node for + // chain-building the document tree + + // `name` name of the root element + + // `xmldec.version` A version number string, e.g. 1.0 + // `xmldec.encoding` Encoding declaration, e.g. UTF-8 + // `xmldec.standalone` standalone document declaration: true or false + + // `doctype.pubID` public identifier of the external subset + // `doctype.sysID` system identifier of the external subset + + // `options.headless` whether XML declaration and doctype will be included: + // true or false + // `options.keepNullNodes` whether nodes with null values will be kept + // or ignored: true or false + // `options.keepNullAttributes` whether attributes with null values will be + // kept or ignored: true or false + // `options.ignoreDecorators` whether decorator strings will be ignored when + // converting JS objects: true or false + // `options.separateArrayItems` whether array items are created as separate + // nodes when passed as an object value: true or false + // `options.noDoubleEncoding` whether existing html entities are encoded: + // true or false + // `options.stringify` a set of functions to use for converting values to + // strings + // `options.writer` the default XML writer to use for converting nodes to + // string. If the default writer is not set, the built-in XMLStringWriter + // will be used instead. + module.exports.create = function(name, xmldec, doctype, options) { + var doc, root; + if (name == null) { + throw new Error("Root element needs a name."); + } + options = assign({}, xmldec, doctype, options); + // create the document node + doc = new XMLDocument(options); + // add the root node + root = doc.element(name); + // prolog + if (!options.headless) { + doc.declaration(options); + if ((options.pubID != null) || (options.sysID != null)) { + doc.dtd(options); + } + } + return root; + }; + + // Creates a new document and returns the document node for + // chain-building the document tree + + // `options.keepNullNodes` whether nodes with null values will be kept + // or ignored: true or false + // `options.keepNullAttributes` whether attributes with null values will be + // kept or ignored: true or false + // `options.ignoreDecorators` whether decorator strings will be ignored when + // converting JS objects: true or false + // `options.separateArrayItems` whether array items are created as separate + // nodes when passed as an object value: true or false + // `options.noDoubleEncoding` whether existing html entities are encoded: + // true or false + // `options.stringify` a set of functions to use for converting values to + // strings + // `options.writer` the default XML writer to use for converting nodes to + // string. If the default writer is not set, the built-in XMLStringWriter + // will be used instead. + + // `onData` the function to be called when a new chunk of XML is output. The + // string containing the XML chunk is passed to `onData` as its single + // argument. + // `onEnd` the function to be called when the XML document is completed with + // `end`. `onEnd` does not receive any arguments. + module.exports.begin = function(options, onData, onEnd) { + if (isFunction(options)) { + [onData, onEnd] = [options, onData]; + options = {}; + } + if (onData) { + return new XMLDocumentCB(options, onData, onEnd); + } else { + return new XMLDocument(options); + } + }; + + module.exports.stringWriter = function(options) { + return new XMLStringWriter(options); + }; + + module.exports.streamWriter = function(stream, options) { + return new XMLStreamWriter(stream, options); + }; + + module.exports.implementation = new XMLDOMImplementation(); + + module.exports.nodeType = NodeType; + + module.exports.writerState = WriterState; + +}).call(this); + +},{"./NodeType":5,"./Utility":6,"./WriterState":7,"./XMLDOMImplementation":14,"./XMLDocument":22,"./XMLDocumentCB":23,"./XMLStreamWriter":31,"./XMLStringWriter":32}]},{},[1])(1) +}); diff --git a/node_modules/plist/dist/plist-parse.js b/node_modules/plist/dist/plist-parse.js new file mode 100644 index 0000000..6b3e472 --- /dev/null +++ b/node_modules/plist/dist/plist-parse.js @@ -0,0 +1,10709 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.plist = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i, + * and raw CDATA nodes. + * + * @param {Element} node + * @returns {Boolean} + * @api private + */ + +function shouldIgnoreNode(node) { + return ( + node.nodeType === TEXT_NODE || + node.nodeType === COMMENT_NODE || + node.nodeType === CDATA_NODE + ); +} + +/** + * Check if the node is empty. Some plist file has such node: + * + * this node shoud be ignored. + * + * @see https://github.com/TooTallNate/plist.js/issues/66 + * @param {Element} node + * @returns {Boolean} + * @api private + */ +function isEmptyNode(node) { + if (!node.childNodes || node.childNodes.length === 0) { + return true; + } else { + return false; + } +} + +function invariant(test, message) { + if (!test) { + throw new Error(message); + } +} + +/** + * Parses a Plist XML string. Returns an Object. + * + * @param {String} xml - the XML String to decode + * @returns {Mixed} the decoded value from the Plist XML + * @api public + */ + +function parse(xml) { + var doc = new DOMParser().parseFromString(xml, "text/xml"); + invariant( + doc.documentElement.nodeName === "plist", + "malformed document. First element should be ", + ); + var plist = parsePlistXML(doc.documentElement); + + // the root node gets interpreted as an Array, + // so pull out the inner data first + if (plist.length == 1) plist = plist[0]; + + return plist; +} + +/** + * Convert an XML based plist document into a JSON representation. + * + * @param {Object} xml_node - current XML node in the plist + * @returns {Mixed} built up JSON object + * @api private + */ + +function parsePlistXML(node) { + var i, new_obj, key, val, new_arr, res, counter, type; + + if (!node) return null; + + if (node.nodeName === "plist") { + new_arr = []; + if (isEmptyNode(node)) { + return new_arr; + } + for (i = 0; i < node.childNodes.length; i++) { + if (!shouldIgnoreNode(node.childNodes[i])) { + new_arr.push(parsePlistXML(node.childNodes[i])); + } + } + return new_arr; + } else if (node.nodeName === "dict") { + new_obj = {}; + key = null; + counter = 0; + if (isEmptyNode(node)) { + return new_obj; + } + for (i = 0; i < node.childNodes.length; i++) { + if (shouldIgnoreNode(node.childNodes[i])) continue; + if (counter % 2 === 0) { + invariant( + node.childNodes[i].nodeName === "key", + "Missing key while parsing .", + ); + key = parsePlistXML(node.childNodes[i]); + } else { + invariant( + node.childNodes[i].nodeName !== "key", + 'Unexpected key "' + + parsePlistXML(node.childNodes[i]) + + '" while parsing .', + ); + new_obj[key] = parsePlistXML(node.childNodes[i]); + } + counter += 1; + } + if (counter % 2 === 1) { + new_obj[key] = ""; + } + + return new_obj; + } else if (node.nodeName === "array") { + new_arr = []; + if (isEmptyNode(node)) { + return new_arr; + } + for (i = 0; i < node.childNodes.length; i++) { + if (!shouldIgnoreNode(node.childNodes[i])) { + res = parsePlistXML(node.childNodes[i]); + if (null != res) new_arr.push(res); + } + } + return new_arr; + } else if (node.nodeName === "#text") { + // TODO: what should we do with text types? (CDATA sections) + } else if (node.nodeName === "key") { + if (isEmptyNode(node)) { + return ""; + } + + invariant( + node.childNodes[0].nodeValue !== "__proto__", + "__proto__ keys can lead to prototype pollution. More details on CVE-2022-22912", + ); + + return node.childNodes[0].nodeValue; + } else if (node.nodeName === "string") { + res = ""; + if (isEmptyNode(node)) { + return res; + } + for (i = 0; i < node.childNodes.length; i++) { + var type = node.childNodes[i].nodeType; + if (type === TEXT_NODE || type === CDATA_NODE) { + res += node.childNodes[i].nodeValue; + } + } + return res; + } else if (node.nodeName === "integer") { + invariant(!isEmptyNode(node), 'Cannot parse "" as integer.'); + return parseInt(node.childNodes[0].nodeValue, 10); + } else if (node.nodeName === "real") { + invariant(!isEmptyNode(node), 'Cannot parse "" as real.'); + res = ""; + for (i = 0; i < node.childNodes.length; i++) { + if (node.childNodes[i].nodeType === TEXT_NODE) { + res += node.childNodes[i].nodeValue; + } + } + return parseFloat(res); + } else if (node.nodeName === "data") { + res = ""; + if (isEmptyNode(node)) { + return Buffer.from(res, "base64"); + } + for (i = 0; i < node.childNodes.length; i++) { + if (node.childNodes[i].nodeType === TEXT_NODE) { + res += node.childNodes[i].nodeValue.replace(/\s+/g, ""); + } + } + return Buffer.from(res, "base64"); + } else if (node.nodeName === "date") { + invariant(!isEmptyNode(node), 'Cannot parse "" as Date.'); + return new Date(node.childNodes[0].nodeValue); + } else if (node.nodeName === "null") { + return null; + } else if (node.nodeName === "true") { + return true; + } else if (node.nodeName === "false") { + return false; + } else { + throw new Error("Invalid PLIST tag " + node.nodeName); + } +} + +}).call(this)}).call(this,require("buffer").Buffer) +},{"@xmldom/xmldom":8,"buffer":11}],2:[function(require,module,exports){ +'use strict'; + +/** + * Ponyfill for `Array.prototype.find` which is only available in ES6 runtimes. + * + * Works with anything that has a `length` property and index access properties, + * including NodeList. + * + * @param {T[] | { length: number; [number]: T }} list + * @param {function (item: T, index: number, list:T[]):boolean} predicate + * @param {Partial>?} ac + * Allows injecting a custom implementation in tests (`Array.prototype` by default). + * @returns {T | undefined} + * @template {unknown} T + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find + * @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find + */ +function find(list, predicate, ac) { + if (ac === undefined) { + ac = Array.prototype; + } + if (list && typeof ac.find === 'function') { + return ac.find.call(list, predicate); + } + for (var i = 0; i < list.length; i++) { + if (hasOwn(list, i)) { + var item = list[i]; + if (predicate.call(undefined, item, i, list)) { + return item; + } + } + } +} + +/** + * "Shallow freezes" an object to render it immutable. + * Uses `Object.freeze` if available, + * otherwise the immutability is only in the type. + * + * Is used to create "enum like" objects. + * + * If `Object.getOwnPropertyDescriptors` is available, + * a new object with all properties of object but without any prototype is created and returned + * after freezing it. + * + * @param {T} object + * The object to freeze. + * @param {Pick} [oc=Object] + * `Object` by default, + * allows to inject custom object constructor for tests. + * @returns {Readonly} + * @template {Object} T + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze + * @prettierignore + */ +function freeze(object, oc) { + if (oc === undefined) { + oc = Object; + } + if (oc && typeof oc.getOwnPropertyDescriptors === 'function') { + object = oc.create(null, oc.getOwnPropertyDescriptors(object)); + } + return oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object; +} + +/** + * Implementation for `Object.hasOwn` but ES5 compatible. + * + * @param {any} object + * @param {string | number} key + * @returns {boolean} + */ +function hasOwn(object, key) { + return Object.prototype.hasOwnProperty.call(object, key); +} + +/** + * Since xmldom can not rely on `Object.assign`, + * it uses/provides a simplified version that is sufficient for its needs. + * + * @param {Object} target + * @param {Object | null | undefined} source + * @returns {Object} + * The target with the merged/overridden properties. + * @throws {TypeError} + * If target is not an object. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign + * @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign + */ +function assign(target, source) { + if (target === null || typeof target !== 'object') { + throw new TypeError('target is not an object'); + } + for (var key in source) { + if (hasOwn(source, key)) { + target[key] = source[key]; + } + } + return target; +} + +/** + * A number of attributes are boolean attributes. + * The presence of a boolean attribute on an element represents the `true` value, + * and the absence of the attribute represents the `false` value. + * + * If the attribute is present, its value must either be the empty string, or a value that is + * an ASCII case-insensitive match for the attribute's canonical name, + * with no leading or trailing whitespace. + * + * Note: The values `"true"` and `"false"` are not allowed on boolean attributes. + * To represent a `false` value, the attribute has to be omitted altogether. + * + * @see https://html.spec.whatwg.org/#boolean-attributes + * @see https://html.spec.whatwg.org/#attributes-3 + */ +var HTML_BOOLEAN_ATTRIBUTES = freeze({ + allowfullscreen: true, + async: true, + autofocus: true, + autoplay: true, + checked: true, + controls: true, + default: true, + defer: true, + disabled: true, + formnovalidate: true, + hidden: true, + ismap: true, + itemscope: true, + loop: true, + multiple: true, + muted: true, + nomodule: true, + novalidate: true, + open: true, + playsinline: true, + readonly: true, + required: true, + reversed: true, + selected: true, +}); + +/** + * Check if `name` is matching one of the HTML boolean attribute names. + * This method doesn't check if such attributes are allowed in the context of the current + * document/parsing. + * + * @param {string} name + * @returns {boolean} + * @see {@link HTML_BOOLEAN_ATTRIBUTES} + * @see https://html.spec.whatwg.org/#boolean-attributes + * @see https://html.spec.whatwg.org/#attributes-3 + */ +function isHTMLBooleanAttribute(name) { + return hasOwn(HTML_BOOLEAN_ATTRIBUTES, name.toLowerCase()); +} + +/** + * Void elements only have a start tag; end tags must not be specified for void elements. + * These elements should be written as self-closing like this: ``. + * This should not be confused with optional tags that HTML allows to omit the end tag for + * (like `li`, `tr` and others), which can have content after them, + * so they can not be written as self-closing. + * xmldom does not have any logic for optional end tags cases, + * and will report them as a warning. + * Content that would go into the unopened element, + * will instead be added as a sibling text node. + * + * @type {Readonly<{ + * area: boolean; + * col: boolean; + * img: boolean; + * wbr: boolean; + * link: boolean; + * hr: boolean; + * source: boolean; + * br: boolean; + * input: boolean; + * param: boolean; + * meta: boolean; + * embed: boolean; + * track: boolean; + * base: boolean; + * }>} + * @see https://html.spec.whatwg.org/#void-elements + * @see https://html.spec.whatwg.org/#optional-tags + */ +var HTML_VOID_ELEMENTS = freeze({ + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true, +}); + +/** + * Check if `tagName` is matching one of the HTML void element names. + * This method doesn't check if such tags are allowed in the context of the current + * document/parsing. + * + * @param {string} tagName + * @returns {boolean} + * @see {@link HTML_VOID_ELEMENTS} + * @see https://html.spec.whatwg.org/#void-elements + */ +function isHTMLVoidElement(tagName) { + return hasOwn(HTML_VOID_ELEMENTS, tagName.toLowerCase()); +} + +/** + * Tag names that are raw text elements according to HTML spec. + * The value denotes whether they are escapable or not. + * + * @see {@link isHTMLEscapableRawTextElement} + * @see {@link isHTMLRawTextElement} + * @see https://html.spec.whatwg.org/#raw-text-elements + * @see https://html.spec.whatwg.org/#escapable-raw-text-elements + */ +var HTML_RAW_TEXT_ELEMENTS = freeze({ + script: false, + style: false, + textarea: true, + title: true, +}); + +/** + * Check if `tagName` is matching one of the HTML raw text element names. + * This method doesn't check if such tags are allowed in the context of the current + * document/parsing. + * + * @param {string} tagName + * @returns {boolean} + * @see {@link isHTMLEscapableRawTextElement} + * @see {@link HTML_RAW_TEXT_ELEMENTS} + * @see https://html.spec.whatwg.org/#raw-text-elements + * @see https://html.spec.whatwg.org/#escapable-raw-text-elements + */ +function isHTMLRawTextElement(tagName) { + var key = tagName.toLowerCase(); + return hasOwn(HTML_RAW_TEXT_ELEMENTS, key) && !HTML_RAW_TEXT_ELEMENTS[key]; +} +/** + * Check if `tagName` is matching one of the HTML escapable raw text element names. + * This method doesn't check if such tags are allowed in the context of the current + * document/parsing. + * + * @param {string} tagName + * @returns {boolean} + * @see {@link isHTMLRawTextElement} + * @see {@link HTML_RAW_TEXT_ELEMENTS} + * @see https://html.spec.whatwg.org/#raw-text-elements + * @see https://html.spec.whatwg.org/#escapable-raw-text-elements + */ +function isHTMLEscapableRawTextElement(tagName) { + var key = tagName.toLowerCase(); + return hasOwn(HTML_RAW_TEXT_ELEMENTS, key) && HTML_RAW_TEXT_ELEMENTS[key]; +} +/** + * Only returns true if `value` matches MIME_TYPE.HTML, which indicates an HTML document. + * + * @param {string} mimeType + * @returns {mimeType is 'text/html'} + * @see https://www.iana.org/assignments/media-types/text/html + * @see https://en.wikipedia.org/wiki/HTML + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString + * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring + */ +function isHTMLMimeType(mimeType) { + return mimeType === MIME_TYPE.HTML; +} +/** + * For both the `text/html` and the `application/xhtml+xml` namespace the spec defines that the + * HTML namespace is provided as the default. + * + * @param {string} mimeType + * @returns {boolean} + * @see https://dom.spec.whatwg.org/#dom-document-createelement + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument + */ +function hasDefaultHTMLNamespace(mimeType) { + return isHTMLMimeType(mimeType) || mimeType === MIME_TYPE.XML_XHTML_APPLICATION; +} + +/** + * All mime types that are allowed as input to `DOMParser.parseFromString` + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#Argument02 + * MDN + * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparsersupportedtype + * WHATWG HTML Spec + * @see {@link DOMParser.prototype.parseFromString} + */ +var MIME_TYPE = freeze({ + /** + * `text/html`, the only mime type that triggers treating an XML document as HTML. + * + * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration + * @see https://en.wikipedia.org/wiki/HTML Wikipedia + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN + * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring + * WHATWG HTML Spec + */ + HTML: 'text/html', + + /** + * `application/xml`, the standard mime type for XML documents. + * + * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType + * registration + * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303 + * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia + */ + XML_APPLICATION: 'application/xml', + + /** + * `text/xml`, an alias for `application/xml`. + * + * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303 + * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration + * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia + */ + XML_TEXT: 'text/xml', + + /** + * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace, + * but is parsed as an XML document. + * + * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType + * registration + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec + * @see https://en.wikipedia.org/wiki/XHTML Wikipedia + */ + XML_XHTML_APPLICATION: 'application/xhtml+xml', + + /** + * `image/svg+xml`, + * + * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration + * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1 + * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia + */ + XML_SVG_IMAGE: 'image/svg+xml', +}); +/** + * @typedef {'application/xhtml+xml' | 'application/xml' | 'image/svg+xml' | 'text/html' | 'text/xml'} + * MimeType + */ +/** + * @type {MimeType[]} + * @private + * Basically `Object.values`, which is not available in ES5. + */ +var _MIME_TYPES = Object.keys(MIME_TYPE).map(function (key) { + return MIME_TYPE[key]; +}); + +/** + * Only returns true if `mimeType` is one of the allowed values for + * `DOMParser.parseFromString`. + * + * @param {string} mimeType + * @returns {mimeType is 'application/xhtml+xml' | 'application/xml' | 'image/svg+xml' | 'text/html' | 'text/xml'} + * + */ +function isValidMimeType(mimeType) { + return _MIME_TYPES.indexOf(mimeType) > -1; +} +/** + * Namespaces that are used in this code base. + * + * @see http://www.w3.org/TR/REC-xml-names + */ +var NAMESPACE = freeze({ + /** + * The XHTML namespace. + * + * @see http://www.w3.org/1999/xhtml + */ + HTML: 'http://www.w3.org/1999/xhtml', + + /** + * The SVG namespace. + * + * @see http://www.w3.org/2000/svg + */ + SVG: 'http://www.w3.org/2000/svg', + + /** + * The `xml:` namespace. + * + * @see http://www.w3.org/XML/1998/namespace + */ + XML: 'http://www.w3.org/XML/1998/namespace', + + /** + * The `xmlns:` namespace. + * + * @see https://www.w3.org/2000/xmlns/ + */ + XMLNS: 'http://www.w3.org/2000/xmlns/', +}); + +exports.assign = assign; +exports.find = find; +exports.freeze = freeze; +exports.HTML_BOOLEAN_ATTRIBUTES = HTML_BOOLEAN_ATTRIBUTES; +exports.HTML_RAW_TEXT_ELEMENTS = HTML_RAW_TEXT_ELEMENTS; +exports.HTML_VOID_ELEMENTS = HTML_VOID_ELEMENTS; +exports.hasDefaultHTMLNamespace = hasDefaultHTMLNamespace; +exports.hasOwn = hasOwn; +exports.isHTMLBooleanAttribute = isHTMLBooleanAttribute; +exports.isHTMLRawTextElement = isHTMLRawTextElement; +exports.isHTMLEscapableRawTextElement = isHTMLEscapableRawTextElement; +exports.isHTMLMimeType = isHTMLMimeType; +exports.isHTMLVoidElement = isHTMLVoidElement; +exports.isValidMimeType = isValidMimeType; +exports.MIME_TYPE = MIME_TYPE; +exports.NAMESPACE = NAMESPACE; + +},{}],3:[function(require,module,exports){ +'use strict'; + +var conventions = require('./conventions'); +var dom = require('./dom'); +var errors = require('./errors'); +var entities = require('./entities'); +var sax = require('./sax'); + +var DOMImplementation = dom.DOMImplementation; + +var hasDefaultHTMLNamespace = conventions.hasDefaultHTMLNamespace; +var isHTMLMimeType = conventions.isHTMLMimeType; +var isValidMimeType = conventions.isValidMimeType; +var MIME_TYPE = conventions.MIME_TYPE; +var NAMESPACE = conventions.NAMESPACE; +var ParseError = errors.ParseError; + +var XMLReader = sax.XMLReader; + +/** + * Normalizes line ending according to , + * including some Unicode "newline" characters: + * + * > XML parsed entities are often stored in computer files which, + * > for editing convenience, are organized into lines. + * > These lines are typically separated by some combination + * > of the characters CARRIAGE RETURN (#xD) and LINE FEED (#xA). + * > + * > To simplify the tasks of applications, the XML processor must behave + * > as if it normalized all line breaks in external parsed entities (including the document entity) + * > on input, before parsing, by translating the following to a single #xA character: + * > + * > 1. the two-character sequence #xD #xA, + * > 2. the two-character sequence #xD #x85, + * > 3. the single character #x85, + * > 4. the single character #x2028, + * > 5. the single character #x2029, + * > 6. any #xD character that is not immediately followed by #xA or #x85. + * + * @param {string} input + * @returns {string} + * @prettierignore + */ +function normalizeLineEndings(input) { + return input.replace(/\r[\n\u0085]/g, '\n').replace(/[\r\u0085\u2028\u2029]/g, '\n'); +} + +/** + * @typedef Locator + * @property {number} [columnNumber] + * @property {number} [lineNumber] + */ + +/** + * @typedef DOMParserOptions + * @property {typeof assign} [assign] + * The method to use instead of `conventions.assign`, which is used to copy values from + * `options` before they are used for parsing. + * @property {typeof DOMHandler} [domHandler] + * For internal testing: The class for creating an instance for handling events from the SAX + * parser. + * *****Warning: By configuring a faulty implementation, the specified behavior can completely + * be broken.*****. + * @property {Function} [errorHandler] + * DEPRECATED! use `onError` instead. + * @property {function(level:ErrorLevel, message:string, context: DOMHandler):void} + * [onError] + * A function invoked for every error that occurs during parsing. + * + * If it is not provided, all errors are reported to `console.error` + * and only `fatalError`s are thrown as a `ParseError`, + * which prevents any further processing. + * If the provided method throws, a `ParserError` is thrown, + * which prevents any further processing. + * + * Be aware that many `warning`s are considered an error that prevents further processing in + * most implementations. + * @property {boolean} [locator=true] + * Configures if the nodes created during parsing will have a `lineNumber` and a `columnNumber` + * attribute describing their location in the XML string. + * Default is true. + * @property {(string) => string} [normalizeLineEndings] + * used to replace line endings before parsing, defaults to exported `normalizeLineEndings`, + * which normalizes line endings according to , + * including some Unicode "newline" characters. + * @property {Object} [xmlns] + * The XML namespaces that should be assumed when parsing. + * The default namespace can be provided by the key that is the empty string. + * When the `mimeType` for HTML, XHTML or SVG are passed to `parseFromString`, + * the default namespace that will be used, + * will be overridden according to the specification. + * @see {@link normalizeLineEndings} + */ + +/** + * The DOMParser interface provides the ability to parse XML or HTML source code from a string + * into a DOM `Document`. + * + * ***xmldom is different from the spec in that it allows an `options` parameter, + * to control the behavior***. + * + * @class + * @param {DOMParserOptions} [options] + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser + * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization + */ +function DOMParser(options) { + options = options || {}; + if (options.locator === undefined) { + options.locator = true; + } + + /** + * The method to use instead of `conventions.assign`, which is used to copy values from + * `options` + * before they are used for parsing. + * + * @type {conventions.assign} + * @private + * @see {@link conventions.assign} + * @readonly + */ + this.assign = options.assign || conventions.assign; + + /** + * For internal testing: The class for creating an instance for handling events from the SAX + * parser. + * *****Warning: By configuring a faulty implementation, the specified behavior can completely + * be broken*****. + * + * @type {typeof DOMHandler} + * @private + * @readonly + */ + this.domHandler = options.domHandler || DOMHandler; + + /** + * A function that is invoked for every error that occurs during parsing. + * + * If it is not provided, all errors are reported to `console.error` + * and only `fatalError`s are thrown as a `ParseError`, + * which prevents any further processing. + * If the provided method throws, a `ParserError` is thrown, + * which prevents any further processing. + * + * Be aware that many `warning`s are considered an error that prevents further processing in + * most implementations. + * + * @type {function(level:ErrorLevel, message:string, context: DOMHandler):void} + * @see {@link onErrorStopParsing} + * @see {@link onWarningStopParsing} + */ + this.onError = options.onError || options.errorHandler; + if (options.errorHandler && typeof options.errorHandler !== 'function') { + throw new TypeError('errorHandler object is no longer supported, switch to onError!'); + } else if (options.errorHandler) { + options.errorHandler('warning', 'The `errorHandler` option has been deprecated, use `onError` instead!', this); + } + + /** + * used to replace line endings before parsing, defaults to `normalizeLineEndings` + * + * @type {(string) => string} + * @readonly + */ + this.normalizeLineEndings = options.normalizeLineEndings || normalizeLineEndings; + + /** + * Configures if the nodes created during parsing will have a `lineNumber` and a + * `columnNumber` + * attribute describing their location in the XML string. + * Default is true. + * + * @type {boolean} + * @readonly + */ + this.locator = !!options.locator; + + /** + * The default namespace can be provided by the key that is the empty string. + * When the `mimeType` for HTML, XHTML or SVG are passed to `parseFromString`, + * the default namespace that will be used, + * will be overridden according to the specification. + * + * @type {Readonly} + * @readonly + */ + this.xmlns = this.assign(Object.create(null), options.xmlns); +} + +/** + * Parses `source` using the options in the way configured by the `DOMParserOptions` of `this` + * `DOMParser`. If `mimeType` is `text/html` an HTML `Document` is created, + * otherwise an XML `Document` is created. + * + * __It behaves different from the description in the living standard__: + * - Uses the `options` passed to the `DOMParser` constructor to modify the behavior. + * - Any unexpected input is reported to `onError` with either a `warning`, + * `error` or `fatalError` level. + * - Any `fatalError` throws a `ParseError` which prevents further processing. + * - Any error thrown by `onError` is converted to a `ParseError` which prevents further + * processing - If no `Document` was created during parsing it is reported as a `fatalError`. + * *****Warning: By configuring a faulty DOMHandler implementation, + * the specified behavior can completely be broken*****. + * + * @param {string} source + * The XML mime type only allows string input! + * @param {string} [mimeType='application/xml'] + * the mimeType or contentType of the document to be created determines the `type` of document + * created (XML or HTML) + * @returns {Document} + * The `Document` node. + * @throws {ParseError} + * for any `fatalError` or anything that is thrown by `onError` + * @throws {TypeError} + * for any invalid `mimeType` + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString + * @see https://html.spec.whatwg.org/#dom-domparser-parsefromstring-dev + */ +DOMParser.prototype.parseFromString = function (source, mimeType) { + if (!isValidMimeType(mimeType)) { + throw new TypeError('DOMParser.parseFromString: the provided mimeType "' + mimeType + '" is not valid.'); + } + var defaultNSMap = this.assign(Object.create(null), this.xmlns); + var entityMap = entities.XML_ENTITIES; + var defaultNamespace = defaultNSMap[''] || null; + if (hasDefaultHTMLNamespace(mimeType)) { + entityMap = entities.HTML_ENTITIES; + defaultNamespace = NAMESPACE.HTML; + } else if (mimeType === MIME_TYPE.XML_SVG_IMAGE) { + defaultNamespace = NAMESPACE.SVG; + } + defaultNSMap[''] = defaultNamespace; + defaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML; + + var domBuilder = new this.domHandler({ + mimeType: mimeType, + defaultNamespace: defaultNamespace, + onError: this.onError, + }); + var locator = this.locator ? {} : undefined; + if (this.locator) { + domBuilder.setDocumentLocator(locator); + } + + var sax = new XMLReader(); + sax.errorHandler = domBuilder; + sax.domBuilder = domBuilder; + var isXml = !conventions.isHTMLMimeType(mimeType); + if (isXml && typeof source !== 'string') { + sax.errorHandler.fatalError('source is not a string'); + } + sax.parse(this.normalizeLineEndings(String(source)), defaultNSMap, entityMap); + if (!domBuilder.doc.documentElement) { + sax.errorHandler.fatalError('missing root element'); + } + return domBuilder.doc; +}; + +/** + * @typedef DOMHandlerOptions + * @property {string} [mimeType=MIME_TYPE.XML_APPLICATION] + * @property {string | null} [defaultNamespace=null] + */ +/** + * The class that is used to handle events from the SAX parser to create the related DOM + * elements. + * + * Some methods are only implemented as an empty function, + * since they are (at least currently) not relevant for xmldom. + * + * @class + * @param {DOMHandlerOptions} [options] + * @see http://www.saxproject.org/apidoc/org/xml/sax/ext/DefaultHandler2.html + */ +function DOMHandler(options) { + var opt = options || {}; + /** + * The mime type is used to determine if the DOM handler will create an XML or HTML document. + * Only if it is set to `text/html` it will create an HTML document. + * It defaults to MIME_TYPE.XML_APPLICATION. + * + * @type {string} + * @see {@link MIME_TYPE} + * @readonly + */ + this.mimeType = opt.mimeType || MIME_TYPE.XML_APPLICATION; + + /** + * The namespace to use to create an XML document. + * For the following reasons this is required: + * - The SAX API for `startDocument` doesn't offer any way to pass a namespace, + * since at that point there is no way for the parser to know what the default namespace from + * the document will be. + * - When creating using `DOMImplementation.createDocument` it is required to pass a + * namespace, + * to determine the correct `Document.contentType`, which should match `this.mimeType`. + * - When parsing an XML document with the `application/xhtml+xml` mimeType, + * the HTML namespace needs to be the default namespace. + * + * @type {string | null} + * @private + * @readonly + */ + this.defaultNamespace = opt.defaultNamespace || null; + + /** + * @type {boolean} + * @private + */ + this.cdata = false; + + /** + * The last `Element` that was created by `startElement`. + * `endElement` sets it to the `currentElement.parentNode`. + * + * Note: The sax parser currently sets it to white space text nodes between tags. + * + * @type {Element | Node | undefined} + * @private + */ + this.currentElement = undefined; + + /** + * The Document that is created as part of `startDocument`, + * and returned by `DOMParser.parseFromString`. + * + * @type {Document | undefined} + * @readonly + */ + this.doc = undefined; + + /** + * The locator is stored as part of setDocumentLocator. + * It is controlled and mutated by the SAX parser to store the current parsing position. + * It is used by DOMHandler to set `columnNumber` and `lineNumber` + * on the DOM nodes. + * + * @type {Readonly | undefined} + * @private + * @readonly (the + * sax parser currently sometimes set's it) + */ + this.locator = undefined; + /** + * @type {function (level:ErrorLevel ,message:string, context:DOMHandler):void} + * @readonly + */ + this.onError = opt.onError; +} + +function position(locator, node) { + node.lineNumber = locator.lineNumber; + node.columnNumber = locator.columnNumber; +} + +DOMHandler.prototype = { + /** + * Either creates an XML or an HTML document and stores it under `this.doc`. + * If it is an XML document, `this.defaultNamespace` is used to create it, + * and it will not contain any `childNodes`. + * If it is an HTML document, it will be created without any `childNodes`. + * + * @see http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html + */ + startDocument: function () { + var impl = new DOMImplementation(); + this.doc = isHTMLMimeType(this.mimeType) ? impl.createHTMLDocument(false) : impl.createDocument(this.defaultNamespace, ''); + }, + startElement: function (namespaceURI, localName, qName, attrs) { + var doc = this.doc; + var el = doc.createElementNS(namespaceURI, qName || localName); + var len = attrs.length; + appendElement(this, el); + this.currentElement = el; + + this.locator && position(this.locator, el); + for (var i = 0; i < len; i++) { + var namespaceURI = attrs.getURI(i); + var value = attrs.getValue(i); + var qName = attrs.getQName(i); + var attr = doc.createAttributeNS(namespaceURI, qName); + this.locator && position(attrs.getLocator(i), attr); + attr.value = attr.nodeValue = value; + el.setAttributeNode(attr); + } + }, + endElement: function (namespaceURI, localName, qName) { + this.currentElement = this.currentElement.parentNode; + }, + startPrefixMapping: function (prefix, uri) {}, + endPrefixMapping: function (prefix) {}, + processingInstruction: function (target, data) { + var ins = this.doc.createProcessingInstruction(target, data); + this.locator && position(this.locator, ins); + appendElement(this, ins); + }, + ignorableWhitespace: function (ch, start, length) {}, + characters: function (chars, start, length) { + chars = _toString.apply(this, arguments); + //console.log(chars) + if (chars) { + if (this.cdata) { + var charNode = this.doc.createCDATASection(chars); + } else { + var charNode = this.doc.createTextNode(chars); + } + if (this.currentElement) { + this.currentElement.appendChild(charNode); + } else if (/^\s*$/.test(chars)) { + this.doc.appendChild(charNode); + //process xml + } + this.locator && position(this.locator, charNode); + } + }, + skippedEntity: function (name) {}, + endDocument: function () { + this.doc.normalize(); + }, + /** + * Stores the locator to be able to set the `columnNumber` and `lineNumber` + * on the created DOM nodes. + * + * @param {Locator} locator + */ + setDocumentLocator: function (locator) { + if (locator) { + locator.lineNumber = 0; + } + this.locator = locator; + }, + //LexicalHandler + comment: function (chars, start, length) { + chars = _toString.apply(this, arguments); + var comm = this.doc.createComment(chars); + this.locator && position(this.locator, comm); + appendElement(this, comm); + }, + + startCDATA: function () { + //used in characters() methods + this.cdata = true; + }, + endCDATA: function () { + this.cdata = false; + }, + + startDTD: function (name, publicId, systemId, internalSubset) { + var impl = this.doc.implementation; + if (impl && impl.createDocumentType) { + var dt = impl.createDocumentType(name, publicId, systemId, internalSubset); + this.locator && position(this.locator, dt); + appendElement(this, dt); + this.doc.doctype = dt; + } + }, + reportError: function (level, message) { + if (typeof this.onError === 'function') { + try { + this.onError(level, message, this); + } catch (e) { + throw new ParseError('Reporting ' + level + ' "' + message + '" caused ' + e, this.locator); + } + } else { + console.error('[xmldom ' + level + ']\t' + message, _locator(this.locator)); + } + }, + /** + * @see http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html + */ + warning: function (message) { + this.reportError('warning', message); + }, + error: function (message) { + this.reportError('error', message); + }, + /** + * This function reports a fatal error and throws a ParseError. + * + * @param {string} message + * - The message to be used for reporting and throwing the error. + * @returns {never} + * This function always throws an error and never returns a value. + * @throws {ParseError} + * Always throws a ParseError with the provided message. + */ + fatalError: function (message) { + this.reportError('fatalError', message); + throw new ParseError(message, this.locator); + }, +}; + +function _locator(l) { + if (l) { + return '\n@#[line:' + l.lineNumber + ',col:' + l.columnNumber + ']'; + } +} + +function _toString(chars, start, length) { + if (typeof chars == 'string') { + return chars.substr(start, length); + } else { + //java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)") + if (chars.length >= start + length || start) { + return new java.lang.String(chars, start, length) + ''; + } + return chars; + } +} + +/* + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html + * used method of org.xml.sax.ext.LexicalHandler: + * #comment(chars, start, length) + * #startCDATA() + * #endCDATA() + * #startDTD(name, publicId, systemId) + * + * + * IGNORED method of org.xml.sax.ext.LexicalHandler: + * #endDTD() + * #startEntity(name) + * #endEntity(name) + * + * + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html + * IGNORED method of org.xml.sax.ext.DeclHandler + * #attributeDecl(eName, aName, type, mode, value) + * #elementDecl(name, model) + * #externalEntityDecl(name, publicId, systemId) + * #internalEntityDecl(name, value) + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html + * IGNORED method of org.xml.sax.EntityResolver2 + * #resolveEntity(String name,String publicId,String baseURI,String systemId) + * #resolveEntity(publicId, systemId) + * #getExternalSubset(name, baseURI) + * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html + * IGNORED method of org.xml.sax.DTDHandler + * #notationDecl(name, publicId, systemId) {}; + * #unparsedEntityDecl(name, publicId, systemId, notationName) {}; + */ +'endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl'.replace( + /\w+/g, + function (key) { + DOMHandler.prototype[key] = function () { + return null; + }; + } +); + +/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */ +function appendElement(handler, node) { + if (!handler.currentElement) { + handler.doc.appendChild(node); + } else { + handler.currentElement.appendChild(node); + } +} + +/** + * A method that prevents any further parsing when an `error` + * with level `error` is reported during parsing. + * + * @see {@link DOMParserOptions.onError} + * @see {@link onWarningStopParsing} + */ +function onErrorStopParsing(level) { + if (level === 'error') throw 'onErrorStopParsing'; +} + +/** + * A method that prevents any further parsing when any `error` is reported during parsing. + * + * @see {@link DOMParserOptions.onError} + * @see {@link onErrorStopParsing} + */ +function onWarningStopParsing() { + throw 'onWarningStopParsing'; +} + +exports.__DOMHandler = DOMHandler; +exports.DOMParser = DOMParser; +exports.normalizeLineEndings = normalizeLineEndings; +exports.onErrorStopParsing = onErrorStopParsing; +exports.onWarningStopParsing = onWarningStopParsing; + +},{"./conventions":2,"./dom":4,"./entities":5,"./errors":6,"./sax":9}],4:[function(require,module,exports){ +'use strict'; + +var conventions = require('./conventions'); +var find = conventions.find; +var hasDefaultHTMLNamespace = conventions.hasDefaultHTMLNamespace; +var hasOwn = conventions.hasOwn; +var isHTMLMimeType = conventions.isHTMLMimeType; +var isHTMLRawTextElement = conventions.isHTMLRawTextElement; +var isHTMLVoidElement = conventions.isHTMLVoidElement; +var MIME_TYPE = conventions.MIME_TYPE; +var NAMESPACE = conventions.NAMESPACE; + +/** + * Private DOM Constructor symbol + * + * Internal symbol used for construction of all classes whose constructors should be private. + * Currently used for checks in `Node`, `Document`, `Element`, `Attr`, `CharacterData`, `Text`, `Comment`, + * `CDATASection`, `DocumentType`, `Notation`, `Entity`, `EntityReference`, `DocumentFragment`, `ProcessingInstruction` + * so the constructor can't be used from outside the module. + */ +var PDC = Symbol(); + +var errors = require('./errors'); +var DOMException = errors.DOMException; +var DOMExceptionName = errors.DOMExceptionName; + +var g = require('./grammar'); + +/** + * Checks if the given symbol equals the Private DOM Constructor symbol (PDC) + * and throws an Illegal constructor exception when the symbols don't match. + * This ensures that the constructor remains private and can't be used outside this module. + */ +function checkSymbol(symbol) { + if (symbol !== PDC) { + throw new TypeError('Illegal constructor'); + } +} + +/** + * A prerequisite for `[].filter`, to drop elements that are empty. + * + * @param {string} input + * The string to be checked. + * @returns {boolean} + * Returns `true` if the input string is not empty, `false` otherwise. + */ +function notEmptyString(input) { + return input !== ''; +} +/** + * Splits a string on ASCII whitespace characters (U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, + * U+0020 SPACE). + * It follows the definition from the infra specification from WHATWG. + * + * @param {string} input + * The string to be split. + * @returns {string[]} + * An array of the split strings. The array can be empty if the input string is empty or only + * contains whitespace characters. + * @see {@link https://infra.spec.whatwg.org/#split-on-ascii-whitespace} + * @see {@link https://infra.spec.whatwg.org/#ascii-whitespace} + */ +function splitOnASCIIWhitespace(input) { + // U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, U+0020 SPACE + return input ? input.split(/[\t\n\f\r ]+/).filter(notEmptyString) : []; +} + +/** + * Adds element as a key to current if it is not already present. + * + * @param {Record} current + * The current record object to which the element will be added as a key. + * The object's keys are string types and values are either boolean or undefined. + * @param {string} element + * The string to be added as a key to the current record. + * @returns {Record} + * The updated record object after the addition of the new element. + */ +function orderedSetReducer(current, element) { + if (!hasOwn(current, element)) { + current[element] = true; + } + return current; +} + +/** + * Converts a string into an ordered set by splitting the input on ASCII whitespace and + * ensuring uniqueness of elements. + * This follows the definition of an ordered set from the infra specification by WHATWG. + * + * @param {string} input + * The input string to be transformed into an ordered set. + * @returns {string[]} + * An array of unique strings obtained from the input, preserving the original order. + * The array can be empty if the input string is empty or only contains whitespace characters. + * @see {@link https://infra.spec.whatwg.org/#ordered-set} + */ +function toOrderedSet(input) { + if (!input) return []; + var list = splitOnASCIIWhitespace(input); + return Object.keys(list.reduce(orderedSetReducer, {})); +} + +/** + * Uses `list.indexOf` to implement a function that behaves like `Array.prototype.includes`. + * This function is used in environments where `Array.prototype.includes` may not be available. + * + * @param {any[]} list + * The array in which to search for the element. + * @returns {function(any): boolean} + * A function that accepts an element and returns a boolean indicating whether the element is + * included in the provided list. + */ +function arrayIncludes(list) { + return function (element) { + return list && list.indexOf(element) !== -1; + }; +} + +/** + * Validates a qualified name based on the criteria provided in the DOM specification by + * WHATWG. + * + * @param {string} qualifiedName + * The qualified name to be validated. + * @throws {DOMException} + * With code {@link DOMException.INVALID_CHARACTER_ERR} if the qualified name contains an + * invalid character. + * @see {@link https://dom.spec.whatwg.org/#validate} + */ +function validateQualifiedName(qualifiedName) { + if (!g.QName_exact.test(qualifiedName)) { + throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 'invalid character in qualified name "' + qualifiedName + '"'); + } +} + +/** + * Validates a qualified name and the namespace associated with it, + * based on the criteria provided in the DOM specification by WHATWG. + * + * @param {string | null} namespace + * The namespace to be validated. It can be a string or null. + * @param {string} qualifiedName + * The qualified name to be validated. + * @returns {[namespace: string | null, prefix: string | null, localName: string]} + * Returns a tuple with the namespace, + * prefix and local name of the qualified name. + * @throws {DOMException} + * Throws a DOMException if the qualified name or the namespace is not valid. + * @see {@link https://dom.spec.whatwg.org/#validate-and-extract} + */ +function validateAndExtract(namespace, qualifiedName) { + validateQualifiedName(qualifiedName); + namespace = namespace || null; + /** + * @type {string | null} + */ + var prefix = null; + var localName = qualifiedName; + if (qualifiedName.indexOf(':') >= 0) { + var splitResult = qualifiedName.split(':'); + prefix = splitResult[0]; + localName = splitResult[1]; + } + if (prefix !== null && namespace === null) { + throw new DOMException(DOMException.NAMESPACE_ERR, 'prefix is non-null and namespace is null'); + } + if (prefix === 'xml' && namespace !== conventions.NAMESPACE.XML) { + throw new DOMException(DOMException.NAMESPACE_ERR, 'prefix is "xml" and namespace is not the XML namespace'); + } + if ((prefix === 'xmlns' || qualifiedName === 'xmlns') && namespace !== conventions.NAMESPACE.XMLNS) { + throw new DOMException( + DOMException.NAMESPACE_ERR, + 'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace' + ); + } + if (namespace === conventions.NAMESPACE.XMLNS && prefix !== 'xmlns' && qualifiedName !== 'xmlns') { + throw new DOMException( + DOMException.NAMESPACE_ERR, + 'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"' + ); + } + return [namespace, prefix, localName]; +} + +/** + * Copies properties from one object to another. + * It only copies the object's own (not inherited) properties. + * + * @param {Object} src + * The source object from which properties are copied. + * @param {Object} dest + * The destination object to which properties are copied. + */ +function copy(src, dest) { + for (var p in src) { + if (hasOwn(src, p)) { + dest[p] = src[p]; + } + } +} + +/** + * Extends a class with the properties and methods of a super class. + * It uses a form of prototypal inheritance, and establishes the `constructor` property + * correctly(?). + * + * It is not clear to the current maintainers if this implementation is making sense, + * since it creates an intermediate prototype function, + * which all properties of `Super` are copied onto using `_copy`. + * + * @param {Object} Class + * The class that is to be extended. + * @param {Object} Super + * The super class from which properties and methods are inherited. + * @private + */ +function _extends(Class, Super) { + var pt = Class.prototype; + if (!(pt instanceof Super)) { + function t() {} + t.prototype = Super.prototype; + t = new t(); + copy(pt, t); + Class.prototype = pt = t; + } + if (pt.constructor != Class) { + if (typeof Class != 'function') { + console.error('unknown Class:' + Class); + } + pt.constructor = Class; + } +} + +var NodeType = {}; +var ELEMENT_NODE = (NodeType.ELEMENT_NODE = 1); +var ATTRIBUTE_NODE = (NodeType.ATTRIBUTE_NODE = 2); +var TEXT_NODE = (NodeType.TEXT_NODE = 3); +var CDATA_SECTION_NODE = (NodeType.CDATA_SECTION_NODE = 4); +var ENTITY_REFERENCE_NODE = (NodeType.ENTITY_REFERENCE_NODE = 5); +var ENTITY_NODE = (NodeType.ENTITY_NODE = 6); +var PROCESSING_INSTRUCTION_NODE = (NodeType.PROCESSING_INSTRUCTION_NODE = 7); +var COMMENT_NODE = (NodeType.COMMENT_NODE = 8); +var DOCUMENT_NODE = (NodeType.DOCUMENT_NODE = 9); +var DOCUMENT_TYPE_NODE = (NodeType.DOCUMENT_TYPE_NODE = 10); +var DOCUMENT_FRAGMENT_NODE = (NodeType.DOCUMENT_FRAGMENT_NODE = 11); +var NOTATION_NODE = (NodeType.NOTATION_NODE = 12); + +var DocumentPosition = conventions.freeze({ + DOCUMENT_POSITION_DISCONNECTED: 1, + DOCUMENT_POSITION_PRECEDING: 2, + DOCUMENT_POSITION_FOLLOWING: 4, + DOCUMENT_POSITION_CONTAINS: 8, + DOCUMENT_POSITION_CONTAINED_BY: 16, + DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32, +}); + +//helper functions for compareDocumentPosition +/** + * Finds the common ancestor in two parent chains. + * + * @param {Node[]} a + * The first parent chain. + * @param {Node[]} b + * The second parent chain. + * @returns {Node} + * The common ancestor node if it exists. If there is no common ancestor, the function will + * return `null`. + */ +function commonAncestor(a, b) { + if (b.length < a.length) return commonAncestor(b, a); + var c = null; + for (var n in a) { + if (a[n] !== b[n]) return c; + c = a[n]; + } + return c; +} + +/** + * Assigns a unique identifier to a document to ensure consistency while comparing unrelated + * nodes. + * + * @param {Document} doc + * The document to which a unique identifier is to be assigned. + * @returns {string} + * The unique identifier of the document. If the document already had a unique identifier, the + * function will return the existing one. + */ +function docGUID(doc) { + if (!doc.guid) doc.guid = Math.random(); + return doc.guid; +} +//-- end of helper functions + +/** + * The NodeList interface provides the abstraction of an ordered collection of nodes, + * without defining or constraining how this collection is implemented. + * NodeList objects in the DOM are live. + * The items in the NodeList are accessible via an integral index, starting from 0. + * You can also access the items of the NodeList with a `for...of` loop. + * + * @class NodeList + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177 + * @constructs NodeList + */ +function NodeList() {} +NodeList.prototype = { + /** + * The number of nodes in the list. The range of valid child node indices is 0 to length-1 + * inclusive. + * + * @type {number} + */ + length: 0, + /** + * Returns the item at `index`. If index is greater than or equal to the number of nodes in + * the list, this returns null. + * + * @param index + * Unsigned long Index into the collection. + * @returns {Node | null} + * The node at position `index` in the NodeList, + * or null if that is not a valid index. + */ + item: function (index) { + return index >= 0 && index < this.length ? this[index] : null; + }, + /** + * Returns a string representation of the NodeList. + * + * Accepts the same `options` object as `XMLSerializer.prototype.serializeToString` + * (`requireWellFormed`, `splitCDATASections`, `nodeFilter`). Passing a function is treated as + * a legacy `nodeFilter` for backward compatibility. + * + * @param {Object | function} [options] + * @param {boolean} [options.requireWellFormed=false] + * @param {boolean} [options.splitCDATASections=true] + * @param {function} [options.nodeFilter] + * @returns {string} + */ + toString: function (options) { + var opts; + if (typeof options === 'function') { + opts = { requireWellFormed: false, splitCDATASections: true, nodeFilter: options }; + } else if (!!options) { + opts = { + requireWellFormed: !!options.requireWellFormed, + splitCDATASections: options.splitCDATASections !== false, + nodeFilter: options.nodeFilter || null, + }; + } else { + opts = { requireWellFormed: false, splitCDATASections: true, nodeFilter: null }; + } + for (var buf = [], i = 0; i < this.length; i++) { + serializeToString(this[i], buf, null, opts); + } + return buf.join(''); + }, + /** + * Filters the NodeList based on a predicate. + * + * @param {function(Node): boolean} predicate + * - A predicate function to filter the NodeList. + * @returns {Node[]} + * An array of nodes that satisfy the predicate. + * @private + */ + filter: function (predicate) { + return Array.prototype.filter.call(this, predicate); + }, + /** + * Returns the first index at which a given node can be found in the NodeList, or -1 if it is + * not present. + * + * @param {Node} item + * - The Node item to locate in the NodeList. + * @returns {number} + * The first index of the node in the NodeList; -1 if not found. + * @private + */ + indexOf: function (item) { + return Array.prototype.indexOf.call(this, item); + }, +}; +NodeList.prototype[Symbol.iterator] = function () { + var me = this; + var index = 0; + + return { + next: function () { + if (index < me.length) { + return { + value: me[index++], + done: false, + }; + } else { + return { + done: true, + }; + } + }, + return: function () { + return { + done: true, + }; + }, + }; +}; + +/** + * Represents a live collection of nodes that is automatically updated when its associated + * document changes. + * + * @class LiveNodeList + * @param {Node} node + * The associated node. + * @param {function} refresh + * The function to refresh the live node list. + * @augments NodeList + * @constructs LiveNodeList + */ +function LiveNodeList(node, refresh) { + this._node = node; + this._refresh = refresh; + _updateLiveList(this); +} +/** + * Updates the live node list. + * + * @param {LiveNodeList} list + * The live node list to update. + * @private + */ +function _updateLiveList(list) { + var inc = list._node._inc || list._node.ownerDocument._inc; + if (list._inc !== inc) { + var ls = list._refresh(list._node); + __set__(list, 'length', ls.length); + if (!list.$$length || ls.length < list.$$length) { + for (var i = ls.length; i in list; i++) { + if (hasOwn(list, i)) { + delete list[i]; + } + } + } + copy(ls, list); + list._inc = inc; + } +} +/** + * Returns the node at position `index` in the LiveNodeList, or null if that is not a valid + * index. + * + * @param {number} i + * Index into the collection. + * @returns {Node | null} + * The node at position `index` in the LiveNodeList, or null if that is not a valid index. + */ +LiveNodeList.prototype.item = function (i) { + _updateLiveList(this); + return this[i] || null; +}; + +_extends(LiveNodeList, NodeList); + +/** + * Objects implementing the NamedNodeMap interface are used to represent collections of nodes + * that can be accessed by name. + * Note that NamedNodeMap does not inherit from NodeList; + * NamedNodeMaps are not maintained in any particular order. + * Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal + * index, + * but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, + * and does not imply that the DOM specifies an order to these Nodes. + * NamedNodeMap objects in the DOM are live. + * used for attributes or DocumentType entities + * + * This implementation only supports property indices, but does not support named properties, + * as specified in the living standard. + * + * @class NamedNodeMap + * @see https://dom.spec.whatwg.org/#interface-namednodemap + * @see https://webidl.spec.whatwg.org/#dfn-supported-property-names + * @constructs NamedNodeMap + */ +function NamedNodeMap() {} +/** + * Returns the index of a node within the list. + * + * @param {Array} list + * The list of nodes. + * @param {Node} node + * The node to find. + * @returns {number} + * The index of the node within the list, or -1 if not found. + * @private + */ +function _findNodeIndex(list, node) { + var i = 0; + while (i < list.length) { + if (list[i] === node) { + return i; + } + i++; + } +} +/** + * Adds a new attribute to the list and updates the owner element of the attribute. + * + * @param {Element} el + * The element which will become the owner of the new attribute. + * @param {NamedNodeMap} list + * The list to which the new attribute will be added. + * @param {Attr} newAttr + * The new attribute to be added. + * @param {Attr} oldAttr + * The old attribute to be replaced, or null if no attribute is to be replaced. + * @returns {void} + * @private + */ +function _addNamedNode(el, list, newAttr, oldAttr) { + if (oldAttr) { + list[_findNodeIndex(list, oldAttr)] = newAttr; + } else { + list[list.length] = newAttr; + list.length++; + } + if (el) { + newAttr.ownerElement = el; + var doc = el.ownerDocument; + if (doc) { + oldAttr && _onRemoveAttribute(doc, el, oldAttr); + _onAddAttribute(doc, el, newAttr); + } + } +} +/** + * Removes an attribute from the list and updates the owner element of the attribute. + * + * @param {Element} el + * The element which is the current owner of the attribute. + * @param {NamedNodeMap} list + * The list from which the attribute will be removed. + * @param {Attr} attr + * The attribute to be removed. + * @returns {void} + * @private + */ +function _removeNamedNode(el, list, attr) { + //console.log('remove attr:'+attr) + var i = _findNodeIndex(list, attr); + if (i >= 0) { + var lastIndex = list.length - 1; + while (i <= lastIndex) { + list[i] = list[++i]; + } + list.length = lastIndex; + if (el) { + var doc = el.ownerDocument; + if (doc) { + _onRemoveAttribute(doc, el, attr); + } + attr.ownerElement = null; + } + } +} +NamedNodeMap.prototype = { + length: 0, + item: NodeList.prototype.item, + + /** + * Get an attribute by name. Note: Name is in lower case in case of HTML namespace and + * document. + * + * @param {string} localName + * The local name of the attribute. + * @returns {Attr | null} + * The attribute with the given local name, or null if no such attribute exists. + * @see https://dom.spec.whatwg.org/#concept-element-attributes-get-by-name + */ + getNamedItem: function (localName) { + if (this._ownerElement && this._ownerElement._isInHTMLDocumentAndNamespace()) { + localName = localName.toLowerCase(); + } + var i = 0; + while (i < this.length) { + var attr = this[i]; + if (attr.nodeName === localName) { + return attr; + } + i++; + } + return null; + }, + + /** + * Set an attribute. + * + * @param {Attr} attr + * The attribute to set. + * @returns {Attr | null} + * The old attribute with the same local name and namespace URI as the new one, or null if no + * such attribute exists. + * @throws {DOMException} + * With code: + * - {@link INUSE_ATTRIBUTE_ERR} - If the attribute is already an attribute of another + * element. + * @see https://dom.spec.whatwg.org/#concept-element-attributes-set + */ + setNamedItem: function (attr) { + var el = attr.ownerElement; + if (el && el !== this._ownerElement) { + throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR); + } + var oldAttr = this.getNamedItemNS(attr.namespaceURI, attr.localName); + if (oldAttr === attr) { + return attr; + } + _addNamedNode(this._ownerElement, this, attr, oldAttr); + return oldAttr; + }, + + /** + * Set an attribute, replacing an existing attribute with the same local name and namespace + * URI if one exists. + * + * @param {Attr} attr + * The attribute to set. + * @returns {Attr | null} + * The old attribute with the same local name and namespace URI as the new one, or null if no + * such attribute exists. + * @throws {DOMException} + * Throws a DOMException with the name "InUseAttributeError" if the attribute is already an + * attribute of another element. + * @see https://dom.spec.whatwg.org/#concept-element-attributes-set + */ + setNamedItemNS: function (attr) { + return this.setNamedItem(attr); + }, + + /** + * Removes an attribute specified by the local name. + * + * @param {string} localName + * The local name of the attribute to be removed. + * @returns {Attr} + * The attribute node that was removed. + * @throws {DOMException} + * With code: + * - {@link DOMException.NOT_FOUND_ERR} if no attribute with the given name is found. + * @see https://dom.spec.whatwg.org/#dom-namednodemap-removenameditem + * @see https://dom.spec.whatwg.org/#concept-element-attributes-remove-by-name + */ + removeNamedItem: function (localName) { + var attr = this.getNamedItem(localName); + if (!attr) { + throw new DOMException(DOMException.NOT_FOUND_ERR, localName); + } + _removeNamedNode(this._ownerElement, this, attr); + return attr; + }, + + /** + * Removes an attribute specified by the namespace and local name. + * + * @param {string | null} namespaceURI + * The namespace URI of the attribute to be removed. + * @param {string} localName + * The local name of the attribute to be removed. + * @returns {Attr} + * The attribute node that was removed. + * @throws {DOMException} + * With code: + * - {@link DOMException.NOT_FOUND_ERR} if no attribute with the given namespace URI and local + * name is found. + * @see https://dom.spec.whatwg.org/#dom-namednodemap-removenameditemns + * @see https://dom.spec.whatwg.org/#concept-element-attributes-remove-by-namespace + */ + removeNamedItemNS: function (namespaceURI, localName) { + var attr = this.getNamedItemNS(namespaceURI, localName); + if (!attr) { + throw new DOMException(DOMException.NOT_FOUND_ERR, namespaceURI ? namespaceURI + ' : ' + localName : localName); + } + _removeNamedNode(this._ownerElement, this, attr); + return attr; + }, + + /** + * Get an attribute by namespace and local name. + * + * @param {string | null} namespaceURI + * The namespace URI of the attribute. + * @param {string} localName + * The local name of the attribute. + * @returns {Attr | null} + * The attribute with the given namespace URI and local name, or null if no such attribute + * exists. + * @see https://dom.spec.whatwg.org/#concept-element-attributes-get-by-namespace + */ + getNamedItemNS: function (namespaceURI, localName) { + if (!namespaceURI) { + namespaceURI = null; + } + var i = 0; + while (i < this.length) { + var node = this[i]; + if (node.localName === localName && node.namespaceURI === namespaceURI) { + return node; + } + i++; + } + return null; + }, +}; +NamedNodeMap.prototype[Symbol.iterator] = function () { + var me = this; + var index = 0; + + return { + next: function () { + if (index < me.length) { + return { + value: me[index++], + done: false, + }; + } else { + return { + done: true, + }; + } + }, + return: function () { + return { + done: true, + }; + }, + }; +}; + +/** + * The DOMImplementation interface provides a number of methods for performing operations that + * are independent of any particular instance of the document object model. + * + * The DOMImplementation interface represents an object providing methods which are not + * dependent on any particular document. + * Such an object is returned by the `Document.implementation` property. + * + * **The individual methods describe the differences compared to the specs**. + * + * @class DOMImplementation + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation MDN + * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 DOM Level 1 Core + * (Initial) + * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 DOM Level 2 Core + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490 DOM Level 3 Core + * @see https://dom.spec.whatwg.org/#domimplementation DOM Living Standard + * @constructs DOMImplementation + */ +function DOMImplementation() {} + +DOMImplementation.prototype = { + /** + * Test if the DOM implementation implements a specific feature and version, as specified in + * {@link https://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMFeatures DOM Features}. + * + * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given + * feature is supported. The different implementations fairly diverged in what kind of + * features were reported. The latest version of the spec settled to force this method to + * always return true, where the functionality was accurate and in use. + * + * @deprecated + * It is deprecated and modern browsers return true in all cases. + * @function DOMImplementation#hasFeature + * @param {string} feature + * The name of the feature to test. + * @param {string} [version] + * This is the version number of the feature to test. + * @returns {boolean} + * Always returns true. + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN + * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core + * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-5CED94D7 DOM Level 3 Core + */ + hasFeature: function (feature, version) { + return true; + }, + /** + * Creates a DOM Document object of the specified type with its document element. Note that + * based on the {@link DocumentType} + * given to create the document, the implementation may instantiate specialized + * {@link Document} objects that support additional features than the "Core", such as "HTML" + * {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#DOM2HTML DOM Level 2 HTML}. + * On the other hand, setting the {@link DocumentType} after the document was created makes + * this very unlikely to happen. Alternatively, specialized {@link Document} creation methods, + * such as createHTMLDocument + * {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#DOM2HTML DOM Level 2 HTML}, + * can be used to obtain specific types of {@link Document} objects. + * + * __It behaves slightly different from the description in the living standard__: + * - There is no interface/class `XMLDocument`, it returns a `Document` + * instance (with it's `type` set to `'xml'`). + * - `encoding`, `mode`, `origin`, `url` fields are currently not declared. + * + * @function DOMImplementation.createDocument + * @param {string | null} namespaceURI + * The + * {@link https://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-namespaceURI namespace URI} + * of the document element to create or null. + * @param {string | null} qualifiedName + * The + * {@link https://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-qualifiedname qualified name} + * of the document element to be created or null. + * @param {DocumentType | null} [doctype=null] + * The type of document to be created or null. When doctype is not null, its + * {@link Node#ownerDocument} attribute is set to the document being created. Default is + * `null` + * @returns {Document} + * A new {@link Document} object with its document element. If the NamespaceURI, + * qualifiedName, and doctype are null, the returned {@link Document} is empty with no + * document element. + * @throws {DOMException} + * With code: + * + * - `INVALID_CHARACTER_ERR`: Raised if the specified qualified name is not an XML name + * according to {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#XML XML 1.0}. + * - `NAMESPACE_ERR`: Raised if the qualifiedName is malformed, if the qualifiedName has a + * prefix and the namespaceURI is null, or if the qualifiedName is null and the namespaceURI + * is different from null, or if the qualifiedName has a prefix that is "xml" and the + * namespaceURI is different from "{@link http://www.w3.org/XML/1998/namespace}" + * {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#Namespaces XML Namespaces}, + * or if the DOM implementation does not support the "XML" feature but a non-null namespace + * URI was provided, since namespaces were defined by XML. + * - `WRONG_DOCUMENT_ERR`: Raised if doctype has already been used with a different document + * or was created from a different implementation. + * - `NOT_SUPPORTED_ERR`: May be raised if the implementation does not support the feature + * "XML" and the language exposed through the Document does not support XML Namespaces (such + * as {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#HTML40 HTML 4.01}). + * @since DOM Level 2. + * @see {@link #createHTMLDocument} + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument DOM Living Standard + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-2-Core-DOM-createDocument DOM + * Level 3 Core + * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM + * Level 2 Core (initial) + */ + createDocument: function (namespaceURI, qualifiedName, doctype) { + var contentType = MIME_TYPE.XML_APPLICATION; + if (namespaceURI === NAMESPACE.HTML) { + contentType = MIME_TYPE.XML_XHTML_APPLICATION; + } else if (namespaceURI === NAMESPACE.SVG) { + contentType = MIME_TYPE.XML_SVG_IMAGE; + } + var doc = new Document(PDC, { contentType: contentType }); + doc.implementation = this; + doc.childNodes = new NodeList(); + doc.doctype = doctype || null; + if (doctype) { + doc.appendChild(doctype); + } + if (qualifiedName) { + var root = doc.createElementNS(namespaceURI, qualifiedName); + doc.appendChild(root); + } + return doc; + }, + /** + * Creates an empty DocumentType node. Entity declarations and notations are not made + * available. Entity reference expansions and default attribute additions do not occur. + * + * **This behavior is slightly different from the one in the specs**: + * - `encoding`, `mode`, `origin`, `url` fields are currently not declared. + * - `publicId` and `systemId` contain the raw data including any possible quotes, + * so they can always be serialized back to the original value + * - `internalSubset` contains the raw string between `[` and `]` if present, + * but is not parsed or validated in any form. + * + * @function DOMImplementation#createDocumentType + * @param {string} qualifiedName + * The {@link https://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-qualifiedname qualified + * name} of the document type to be created. + * @param {string} [publicId] + * The external subset public identifier. Stored verbatim including surrounding quotes. + * When serialized with `requireWellFormed: true`, the serializer throws `InvalidStateError` + * if the value is non-empty and does not match the XML `PubidLiteral` production + * (W3C DOM Parsing §3.2.1.3; XML 1.0 production [12]). Creation-time validation is not + * enforced — deferred to a future breaking release. + * @param {string} [systemId] + * The external subset system identifier. Stored verbatim including surrounding quotes. + * When serialized with `requireWellFormed: true`, the serializer throws `InvalidStateError` + * if the value is non-empty and does not match the XML `SystemLiteral` production + * (W3C DOM Parsing §3.2.1.3; XML 1.0 production [11]). Creation-time validation is not + * enforced — deferred to a future breaking release. + * @param {string} [internalSubset] + * The internal subset or an empty string if it is not present. Stored verbatim. + * When serialized with `requireWellFormed: true`, the serializer throws `InvalidStateError` + * if the value contains `"]>"`. Creation-time validation is not enforced. + * @returns {DocumentType} + * A new {@link DocumentType} node with {@link Node#ownerDocument} set to null. + * @throws {DOMException} + * With code: + * + * - `INVALID_CHARACTER_ERR`: Raised if the specified qualified name is not an XML name + * according to {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#XML XML 1.0}. + * - `NAMESPACE_ERR`: Raised if the qualifiedName is malformed. + * - `NOT_SUPPORTED_ERR`: May be raised if the implementation does not support the feature + * "XML" and the language exposed through the Document does not support XML Namespaces (such + * as {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#HTML40 HTML 4.01}). + * @since DOM Level 2. + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType + * MDN + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living + * Standard + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-3-Core-DOM-createDocType DOM + * Level 3 Core + * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM + * Level 2 Core + * @see https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md#050 + * @see https://www.w3.org/TR/DOM-Level-2-Core/#core-ID-Core-DocType-internalSubset + * @prettierignore + */ + createDocumentType: function (qualifiedName, publicId, systemId, internalSubset) { + validateQualifiedName(qualifiedName); + var node = new DocumentType(PDC); + node.name = qualifiedName; + node.nodeName = qualifiedName; + node.publicId = publicId || ''; + node.systemId = systemId || ''; + node.internalSubset = internalSubset || ''; + node.childNodes = new NodeList(); + + return node; + }, + /** + * Returns an HTML document, that might already have a basic DOM structure. + * + * __It behaves slightly different from the description in the living standard__: + * - If the first argument is `false` no initial nodes are added (steps 3-7 in the specs are + * omitted) + * - `encoding`, `mode`, `origin`, `url` fields are currently not declared. + * + * @param {string | false} [title] + * A string containing the title to give the new HTML document. + * @returns {Document} + * The HTML document. + * @since WHATWG Living Standard. + * @see {@link #createDocument} + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument + * @see https://dom.spec.whatwg.org/#html-document + */ + createHTMLDocument: function (title) { + var doc = new Document(PDC, { contentType: MIME_TYPE.HTML }); + doc.implementation = this; + doc.childNodes = new NodeList(); + if (title !== false) { + doc.doctype = this.createDocumentType('html'); + doc.doctype.ownerDocument = doc; + doc.appendChild(doc.doctype); + var htmlNode = doc.createElement('html'); + doc.appendChild(htmlNode); + var headNode = doc.createElement('head'); + htmlNode.appendChild(headNode); + if (typeof title === 'string') { + var titleNode = doc.createElement('title'); + titleNode.appendChild(doc.createTextNode(title)); + headNode.appendChild(titleNode); + } + htmlNode.appendChild(doc.createElement('body')); + } + return doc; + }, +}; + +/** + * The DOM Node interface is an abstract base class upon which many other DOM API objects are + * based, thus letting those object types to be used similarly and often interchangeably. As an + * abstract class, there is no such thing as a plain Node object. All objects that implement + * Node functionality are based on one of its subclasses. Most notable are Document, Element, + * and DocumentFragment. + * + * In addition, every kind of DOM node is represented by an interface based on Node. These + * include Attr, CharacterData (which Text, Comment, CDATASection and ProcessingInstruction are + * all based on), and DocumentType. + * + * In some cases, a particular feature of the base Node interface may not apply to one of its + * child interfaces; in that case, the inheriting node may return null or throw an exception, + * depending on circumstances. For example, attempting to add children to a node type that + * cannot have children will throw an exception. + * + * **This behavior is slightly different from the in the specs**: + * - unimplemented interfaces: `EventTarget` + * + * @class + * @abstract + * @param {Symbol} symbol + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247 + * @see https://dom.spec.whatwg.org/#node + * @prettierignore + */ +function Node(symbol) { + checkSymbol(symbol); +} + +Node.prototype = { + /** + * The first child of this node. + * + * @type {Node | null} + */ + firstChild: null, + /** + * The last child of this node. + * + * @type {Node | null} + */ + lastChild: null, + /** + * The previous sibling of this node. + * + * @type {Node | null} + */ + previousSibling: null, + /** + * The next sibling of this node. + * + * @type {Node | null} + */ + nextSibling: null, + /** + * The parent node of this node. + * + * @type {Node | null} + */ + parentNode: null, + /** + * The parent element of this node. + * + * @type {Element | null} + */ + get parentElement() { + return this.parentNode && this.parentNode.nodeType === this.ELEMENT_NODE ? this.parentNode : null; + }, + /** + * The child nodes of this node. + * + * @type {NodeList} + */ + childNodes: null, + /** + * The document object associated with this node. + * + * @type {Document | null} + */ + ownerDocument: null, + /** + * The value of this node. + * + * @type {string | null} + */ + nodeValue: null, + /** + * The namespace URI of this node. + * + * @type {string | null} + */ + namespaceURI: null, + /** + * The prefix of the namespace for this node. + * + * @type {string | null} + */ + prefix: null, + /** + * The local part of the qualified name of this node. + * + * @type {string | null} + */ + localName: null, + /** + * The baseURI is currently always `about:blank`, + * since that's what happens when you create a document from scratch. + * + * @type {'about:blank'} + */ + baseURI: 'about:blank', + /** + * Is true if this node is part of a document. + * + * @type {boolean} + */ + get isConnected() { + var rootNode = this.getRootNode(); + return rootNode && rootNode.nodeType === rootNode.DOCUMENT_NODE; + }, + /** + * Checks whether `other` is an inclusive descendant of this node. + * + * @param {Node | null | undefined} other + * The node to check. + * @returns {boolean} + * True if `other` is an inclusive descendant of this node; false otherwise. + * @see https://dom.spec.whatwg.org/#dom-node-contains + */ + contains: function (other) { + if (!other) return false; + var parent = other; + do { + if (this === parent) return true; + parent = parent.parentNode; + } while (parent); + return false; + }, + /** + * @typedef GetRootNodeOptions + * @property {boolean} [composed=false] + */ + /** + * Searches for the root node of this node. + * + * **This behavior is slightly different from the in the specs**: + * - ignores `options.composed`, since `ShadowRoot`s are unsupported, always returns root. + * + * @param {GetRootNodeOptions} [options] + * @returns {Node} + * Root node. + * @see https://dom.spec.whatwg.org/#dom-node-getrootnode + * @see https://dom.spec.whatwg.org/#concept-shadow-including-root + */ + getRootNode: function (options) { + var parent = this; + do { + if (!parent.parentNode) { + return parent; + } + parent = parent.parentNode; + } while (parent); + }, + /** + * Checks whether the given node is equal to this node. + * + * Two nodes are equal when they have the same type, defining characteristics (for the type), + * and the same childNodes. The comparison is iterative to avoid stack overflows on + * deeply-nested trees. Attribute nodes of each Element pair are also pushed onto the stack + * and compared the same way. + * + * @param {Node} [otherNode] + * @returns {boolean} + * @see https://dom.spec.whatwg.org/#concept-node-equals + * @see ../docs/walk-dom.md. + */ + isEqualNode: function (otherNode) { + if (!otherNode) return false; + + // Use an explicit {node, other} pair stack to avoid call-stack overflow on deep trees. + // walkDOM cannot be used here — parallel two-tree traversal requires pairing + // corresponding nodes at each step across both trees simultaneously. + var stack = [{ node: this, other: otherNode }]; + while (stack.length > 0) { + var pair = stack.pop(); + var node = pair.node; + var other = pair.other; + + if (node.nodeType !== other.nodeType) return false; + + switch (node.nodeType) { + case node.DOCUMENT_TYPE_NODE: + if (node.name !== other.name) return false; + if (node.publicId !== other.publicId) return false; + if (node.systemId !== other.systemId) return false; + break; + case node.ELEMENT_NODE: + if (node.namespaceURI !== other.namespaceURI) return false; + if (node.prefix !== other.prefix) return false; + if (node.localName !== other.localName) return false; + if (node.attributes.length !== other.attributes.length) return false; + for (var i = 0; i < node.attributes.length; i++) { + var attr = node.attributes.item(i); + var otherAttr = other.getAttributeNodeNS(attr.namespaceURI, attr.localName); + if (!otherAttr) return false; + stack.push({ node: attr, other: otherAttr }); + } + break; + case node.ATTRIBUTE_NODE: + if (node.namespaceURI !== other.namespaceURI) return false; + if (node.localName !== other.localName) return false; + if (node.value !== other.value) return false; + break; + case node.PROCESSING_INSTRUCTION_NODE: + if (node.target !== other.target || node.data !== other.data) return false; + break; + case node.TEXT_NODE: + case node.CDATA_SECTION_NODE: + case node.COMMENT_NODE: + if (node.data !== other.data) return false; + break; + } + + if (node.childNodes.length !== other.childNodes.length) return false; + + // Push children in reverse order so index 0 is processed first (LIFO). + for (var i = node.childNodes.length - 1; i >= 0; i--) { + stack.push({ node: node.childNodes[i], other: other.childNodes[i] }); + } + } + + return true; + }, + /** + * Checks whether or not the given node is this node. + * + * @param {Node} [otherNode] + */ + isSameNode: function (otherNode) { + return this === otherNode; + }, + /** + * Inserts a node before a reference node as a child of this node. + * + * @param {Node} newChild + * The new child node to be inserted. + * @param {Node | null} refChild + * The reference node before which newChild will be inserted. + * @returns {Node} + * The new child node successfully inserted. + * @throws {DOMException} + * Throws a DOMException if inserting the node would result in a DOM tree that is not + * well-formed, or if `child` is provided but is not a child of `parent`. + * See {@link _insertBefore} for more details. + * @since Modified in DOM L2 + */ + insertBefore: function (newChild, refChild) { + return _insertBefore(this, newChild, refChild); + }, + /** + * Replaces an old child node with a new child node within this node. + * + * @param {Node} newChild + * The new node that is to replace the old node. + * If it already exists in the DOM, it is removed from its original position. + * @param {Node} oldChild + * The existing child node to be replaced. + * @returns {Node} + * Returns the replaced child node. + * @throws {DOMException} + * Throws a DOMException if replacing the node would result in a DOM tree that is not + * well-formed, or if `oldChild` is not a child of `this`. + * This can also occur if the pre-replacement validity assertion fails. + * See {@link _insertBefore}, {@link Node.removeChild}, and + * {@link assertPreReplacementValidityInDocument} for more details. + * @see https://dom.spec.whatwg.org/#concept-node-replace + */ + replaceChild: function (newChild, oldChild) { + _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument); + if (oldChild) { + this.removeChild(oldChild); + } + }, + /** + * Removes an existing child node from this node. + * + * @param {Node} oldChild + * The child node to be removed. + * @returns {Node} + * Returns the removed child node. + * @throws {DOMException} + * Throws a DOMException if `oldChild` is not a child of `this`. + * See {@link _removeChild} for more details. + */ + removeChild: function (oldChild) { + return _removeChild(this, oldChild); + }, + /** + * Appends a child node to this node. + * + * @param {Node} newChild + * The child node to be appended to this node. + * If it already exists in the DOM, it is removed from its original position. + * @returns {Node} + * Returns the appended child node. + * @throws {DOMException} + * Throws a DOMException if appending the node would result in a DOM tree that is not + * well-formed, or if `newChild` is not a valid Node. + * See {@link insertBefore} for more details. + */ + appendChild: function (newChild) { + return this.insertBefore(newChild, null); + }, + /** + * Determines whether this node has any child nodes. + * + * @returns {boolean} + * Returns true if this node has any child nodes, and false otherwise. + */ + hasChildNodes: function () { + return this.firstChild != null; + }, + /** + * Creates a copy of the calling node. + * + * @param {boolean} deep + * If true, the contents of the node are recursively copied. + * If false, only the node itself (and its attributes, if it is an element) are copied. + * @returns {Node} + * Returns the newly created copy of the node. + * @throws {DOMException} + * May throw a DOMException if operations within {@link Element#setAttributeNode} or + * {@link Node#appendChild} (which are potentially invoked in this method) do not meet their + * specific constraints. + * @see {@link cloneNode} + */ + cloneNode: function (deep) { + return cloneNode(this.ownerDocument || this, this, deep); + }, + /** + * Puts the specified node and all of its subtree into a "normalized" form. In a normalized + * subtree, no text nodes in the subtree are empty and there are no adjacent text nodes. + * + * Specifically, this method merges any adjacent text nodes (i.e., nodes for which `nodeType` + * is `TEXT_NODE`) into a single node with the combined data. It also removes any empty text + * nodes. + * + * This method iterativly traverses all child nodes to normalize all descendent nodes within + * the subtree. + * + * @throws {DOMException} + * May throw a DOMException if operations within removeChild or appendData (which are + * potentially invoked in this method) do not meet their specific constraints. + * @since Modified in DOM Level 2 + * @see {@link Node.removeChild} + * @see {@link CharacterData.appendData} + * @see ../docs/walk-dom.md. + */ + normalize: function () { + walkDOM(this, null, { + enter: function (node) { + // Merge adjacent text children of node before walkDOM schedules them. + // walkDOM reads lastChild/previousSibling after enter returns, so the + // surviving post-merge children are what it descends into. + var child = node.firstChild; + while (child) { + var next = child.nextSibling; + if (next !== null && next.nodeType === TEXT_NODE && child.nodeType === TEXT_NODE) { + node.removeChild(next); + child.appendData(next.data); + // Do not advance child: re-check new nextSibling for another text run + } else { + child = next; + } + } + return true; // descend into surviving children + }, + }); + }, + /** + * Checks whether the DOM implementation implements a specific feature and its version. + * + * @deprecated + * Since `DOMImplementation.hasFeature` is deprecated and always returns true. + * @param {string} feature + * The package name of the feature to test. This is the same name that can be passed to the + * method `hasFeature` on `DOMImplementation`. + * @param {string} version + * This is the version number of the package name to test. + * @returns {boolean} + * Returns true in all cases in the current implementation. + * @since Introduced in DOM Level 2 + * @see {@link DOMImplementation.hasFeature} + */ + isSupported: function (feature, version) { + return this.ownerDocument.implementation.hasFeature(feature, version); + }, + /** + * Look up the prefix associated to the given namespace URI, starting from this node. + * **The default namespace declarations are ignored by this method.** + * See Namespace Prefix Lookup for details on the algorithm used by this method. + * + * **This behavior is different from the in the specs**: + * - no node type specific handling + * - uses the internal attribute _nsMap for resolving namespaces that is updated when changing attributes + * + * @param {string | null} namespaceURI + * The namespace URI for which to find the associated prefix. + * @returns {string | null} + * The associated prefix, if found; otherwise, null. + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix + * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo + * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix + * @see https://github.com/xmldom/xmldom/issues/322 + * @prettierignore + */ + lookupPrefix: function (namespaceURI) { + var el = this; + while (el) { + var map = el._nsMap; + //console.dir(map) + if (map) { + for (var n in map) { + if (hasOwn(map, n) && map[n] === namespaceURI) { + return n; + } + } + } + el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode; + } + return null; + }, + /** + * This function is used to look up the namespace URI associated with the given prefix, + * starting from this node. + * + * **This behavior is different from the in the specs**: + * - no node type specific handling + * - uses the internal attribute _nsMap for resolving namespaces that is updated when changing attributes + * + * @param {string | null} prefix + * The prefix for which to find the associated namespace URI. + * @returns {string | null} + * The associated namespace URI, if found; otherwise, null. + * @since DOM Level 3 + * @see https://dom.spec.whatwg.org/#dom-node-lookupnamespaceuri + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespaceURI + * @prettierignore + */ + lookupNamespaceURI: function (prefix) { + var el = this; + while (el) { + var map = el._nsMap; + //console.dir(map) + if (map) { + if (hasOwn(map, prefix)) { + return map[prefix]; + } + } + el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode; + } + return null; + }, + /** + * Determines whether the given namespace URI is the default namespace. + * + * The function works by looking up the prefix associated with the given namespace URI. If no + * prefix is found (i.e., the namespace URI is not registered in the namespace map of this + * node or any of its ancestors), it returns `true`, implying the namespace URI is considered + * the default. + * + * **This behavior is different from the in the specs**: + * - no node type specific handling + * - uses the internal attribute _nsMap for resolving namespaces that is updated when changing attributes + * + * @param {string | null} namespaceURI + * The namespace URI to be checked. + * @returns {boolean} + * Returns true if the given namespace URI is the default namespace, false otherwise. + * @since DOM Level 3 + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isDefaultNamespace + * @see https://dom.spec.whatwg.org/#dom-node-isdefaultnamespace + * @prettierignore + */ + isDefaultNamespace: function (namespaceURI) { + var prefix = this.lookupPrefix(namespaceURI); + return prefix == null; + }, + /** + * Compares the reference node with a node with regard to their position in the document and + * according to the document order. + * + * @param {Node} other + * The node to compare the reference node to. + * @returns {number} + * Returns how the node is positioned relatively to the reference node according to the + * bitmask. 0 if reference node and given node are the same. + * @since DOM Level 3 + * @see https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#Node3-compare + * @see https://dom.spec.whatwg.org/#dom-node-comparedocumentposition + */ + compareDocumentPosition: function (other) { + if (this === other) return 0; + var node1 = other; + var node2 = this; + var attr1 = null; + var attr2 = null; + if (node1 instanceof Attr) { + attr1 = node1; + node1 = attr1.ownerElement; + } + if (node2 instanceof Attr) { + attr2 = node2; + node2 = attr2.ownerElement; + if (attr1 && node1 && node2 === node1) { + for (var i = 0, attr; (attr = node2.attributes[i]); i++) { + if (attr === attr1) + return DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC + DocumentPosition.DOCUMENT_POSITION_PRECEDING; + if (attr === attr2) + return DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC + DocumentPosition.DOCUMENT_POSITION_FOLLOWING; + } + } + } + if (!node1 || !node2 || node2.ownerDocument !== node1.ownerDocument) { + return ( + DocumentPosition.DOCUMENT_POSITION_DISCONNECTED + + DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC + + (docGUID(node2.ownerDocument) > docGUID(node1.ownerDocument) + ? DocumentPosition.DOCUMENT_POSITION_FOLLOWING + : DocumentPosition.DOCUMENT_POSITION_PRECEDING) + ); + } + if (attr2 && node1 === node2) { + return DocumentPosition.DOCUMENT_POSITION_CONTAINS + DocumentPosition.DOCUMENT_POSITION_PRECEDING; + } + if (attr1 && node1 === node2) { + return DocumentPosition.DOCUMENT_POSITION_CONTAINED_BY + DocumentPosition.DOCUMENT_POSITION_FOLLOWING; + } + + var chain1 = []; + var ancestor1 = node1.parentNode; + while (ancestor1) { + if (!attr2 && ancestor1 === node2) { + return DocumentPosition.DOCUMENT_POSITION_CONTAINED_BY + DocumentPosition.DOCUMENT_POSITION_FOLLOWING; + } + chain1.push(ancestor1); + ancestor1 = ancestor1.parentNode; + } + chain1.reverse(); + + var chain2 = []; + var ancestor2 = node2.parentNode; + while (ancestor2) { + if (!attr1 && ancestor2 === node1) { + return DocumentPosition.DOCUMENT_POSITION_CONTAINS + DocumentPosition.DOCUMENT_POSITION_PRECEDING; + } + chain2.push(ancestor2); + ancestor2 = ancestor2.parentNode; + } + chain2.reverse(); + + var ca = commonAncestor(chain1, chain2); + for (var n in ca.childNodes) { + var child = ca.childNodes[n]; + if (child === node2) return DocumentPosition.DOCUMENT_POSITION_FOLLOWING; + if (child === node1) return DocumentPosition.DOCUMENT_POSITION_PRECEDING; + if (chain2.indexOf(child) >= 0) return DocumentPosition.DOCUMENT_POSITION_FOLLOWING; + if (chain1.indexOf(child) >= 0) return DocumentPosition.DOCUMENT_POSITION_PRECEDING; + } + return 0; + }, +}; + +/** + * Encodes special XML characters to their corresponding entities. + * + * @param {string} c + * The character to be encoded. + * @returns {string} + * The encoded character. + * @private + */ +function _xmlEncoder(c) { + return ( + (c == '<' && '<') || (c == '>' && '>') || (c == '&' && '&') || (c == '"' && '"') || '&#' + c.charCodeAt() + ';' + ); +} + +copy(NodeType, Node); +copy(NodeType, Node.prototype); +copy(DocumentPosition, Node); +copy(DocumentPosition, Node.prototype); + +/** + * Visits every node in the subtree rooted at `node` in depth-first pre-order. + * + * Delegates to {@link walkDOM} for traversal. The `callback` is called on each node; + * if it returns a truthy value, traversal stops immediately. + * + * @param {Node} node + * Root of the subtree to visit. + * @param {function(Node): *} callback + * Called for each node. A truthy return value stops traversal early. + */ +function _visitNode(node, callback) { + walkDOM(node, null, { + enter: function (n) { + return callback(n) ? walkDOM.STOP : true; + }, + }); +} + +/** + * Depth-first pre/post-order DOM tree walker. + * + * Visits every node in the subtree rooted at `node`. For each node: + * + * 1. Calls `callbacks.enter(node, context)` before descending into the node's children. The + * return value becomes the `context` passed to each child's `enter` call and to the matching + * `exit` call. + * 2. If `enter` returns `null` or `undefined`, the node's children are skipped; + * sibling traversal continues normally. + * 3. If `enter` returns `walkDOM.STOP`, the entire traversal is aborted immediately — no + * further `enter` or `exit` calls are made. + * 4. `lastChild` and `previousSibling` are read **after** `enter` returns, so `enter` may + * safely modify the node's own child list before the walker descends. Modifying siblings of + * the current node or any other part of the tree produces unpredictable results: nodes already + * queued on the stack are visited regardless of DOM changes, and newly inserted nodes outside + * the current child list are never visited. + * 5. Calls `callbacks.exit(node, context)` (if provided) after all of a node's children have + * been visited, passing the same `context` that `enter` + * returned for that node. + * + * This implementation uses an explicit stack and does not recurse — it is safe on arbitrarily + * deep trees. + * + * @param {Node} node + * Root of the subtree to walk. + * @param {*} context + * Initial context value passed to the root node's `enter`. + * @param {{ enter: function(Node, *): *, exit?: function(Node, *): void }} callbacks + * @returns {void | walkDOM.STOP} + * @see ../docs/walk-dom.md. + */ +function walkDOM(node, context, callbacks) { + // Each stack frame is {node, context, phase}: + // walkDOM.ENTER — call enter, then push children + // walkDOM.EXIT — call exit + var stack = [{ node: node, context: context, phase: walkDOM.ENTER }]; + while (stack.length > 0) { + var frame = stack.pop(); + if (frame.phase === walkDOM.ENTER) { + var childContext = callbacks.enter(frame.node, frame.context); + if (childContext === walkDOM.STOP) { + return walkDOM.STOP; + } + // Push exit frame before children so it fires after all children are processed (Last In First Out) + stack.push({ node: frame.node, context: childContext, phase: walkDOM.EXIT }); + if (childContext === null || childContext === undefined) { + continue; // skip children + } + // lastChild is read after enter returns, so enter may modify the child list. + var child = frame.node.lastChild; + // Traverse from lastChild backwards so that pushing onto the stack + // naturally yields firstChild on top (processed first). + while (child) { + stack.push({ node: child, context: childContext, phase: walkDOM.ENTER }); + child = child.previousSibling; + } + } else { + // frame.phase === walkDOM.EXIT + if (callbacks.exit) { + callbacks.exit(frame.node, frame.context); + } + } + } +} + +/** + * Sentinel value returned from a `walkDOM` `enter` callback to abort the entire traversal + * immediately. + * + * @type {symbol} + */ +walkDOM.STOP = Symbol('walkDOM.STOP'); +/** + * Phase constant for a stack frame that has not yet been visited. + * The `enter` callback is called and children are scheduled. + * + * @type {number} + */ +walkDOM.ENTER = 0; +/** + * Phase constant for a stack frame whose subtree has been fully visited. + * The `exit` callback is called. + * + * @type {number} + */ +walkDOM.EXIT = 1; + +/** + * @typedef DocumentOptions + * @property {string} [contentType=MIME_TYPE.XML_APPLICATION] + */ +/** + * The Document interface describes the common properties and methods for any kind of document. + * + * It should usually be created using `new DOMImplementation().createDocument(...)` + * or `new DOMImplementation().createHTMLDocument(...)`. + * + * The constructor is considered a private API and offers to initially set the `contentType` + * property via it's options parameter. + * + * @class + * @param {Symbol} symbol + * @param {DocumentOptions} [options] + * @augments Node + * @private + * @see https://developer.mozilla.org/en-US/docs/Web/API/Document + * @see https://dom.spec.whatwg.org/#interface-document + */ +function Document(symbol, options) { + checkSymbol(symbol); + + var opt = options || {}; + this.ownerDocument = this; + /** + * The mime type of the document is determined at creation time and can not be modified. + * + * @type {string} + * @see https://dom.spec.whatwg.org/#concept-document-content-type + * @see {@link DOMImplementation} + * @see {@link MIME_TYPE} + * @readonly + */ + this.contentType = opt.contentType || MIME_TYPE.XML_APPLICATION; + /** + * @type {'html' | 'xml'} + * @see https://dom.spec.whatwg.org/#concept-document-type + * @see {@link DOMImplementation} + * @readonly + */ + this.type = isHTMLMimeType(this.contentType) ? 'html' : 'xml'; +} + +/** + * Updates the namespace mapping of an element when a new attribute is added. + * + * @param {Document} doc + * The document that the element belongs to. + * @param {Element} el + * The element to which the attribute is being added. + * @param {Attr} newAttr + * The new attribute being added. + * @private + */ +function _onAddAttribute(doc, el, newAttr) { + doc && doc._inc++; + var ns = newAttr.namespaceURI; + if (ns === NAMESPACE.XMLNS) { + //update namespace + el._nsMap[newAttr.prefix ? newAttr.localName : ''] = newAttr.value; + } +} + +/** + * Updates the namespace mapping of an element when an attribute is removed. + * + * @param {Document} doc + * The document that the element belongs to. + * @param {Element} el + * The element from which the attribute is being removed. + * @param {Attr} newAttr + * The attribute being removed. + * @param {boolean} remove + * Indicates whether the attribute is to be removed. + * @private + */ +function _onRemoveAttribute(doc, el, newAttr, remove) { + doc && doc._inc++; + var ns = newAttr.namespaceURI; + if (ns === NAMESPACE.XMLNS) { + //update namespace + delete el._nsMap[newAttr.prefix ? newAttr.localName : '']; + } +} + +/** + * Updates `parent.childNodes`, adjusting the indexed items and its `length`. + * If `newChild` is provided and has no nextSibling, it will be appended. + * Otherwise, it's assumed that an item has been removed or inserted, + * and `parent.firstNode` and its `.nextSibling` to re-indexing all child nodes of `parent`. + * + * @param {Document} doc + * The parent document of `el`. + * @param {Node} parent + * The parent node whose childNodes list needs to be updated. + * @param {Node} [newChild] + * The new child node to be appended. If not provided, the function assumes a node has been + * removed. + * @private + */ +function _onUpdateChild(doc, parent, newChild) { + if (doc && doc._inc) { + doc._inc++; + var childNodes = parent.childNodes; + // assumes nextSibling and previousSibling were already configured upfront + if (newChild && !newChild.nextSibling) { + // if an item has been appended, we only need to update the last index and the length + childNodes[childNodes.length++] = newChild; + } else { + // otherwise we need to reindex all items, + // which can take a while when processing nodes with a lot of children + var child = parent.firstChild; + var i = 0; + while (child) { + childNodes[i++] = child; + child = child.nextSibling; + } + childNodes.length = i; + delete childNodes[childNodes.length]; + } + } +} + +/** + * Removes the connections between `parentNode` and `child` + * and any existing `child.previousSibling` or `child.nextSibling`. + * + * @param {Node} parentNode + * The parent node from which the child node is to be removed. + * @param {Node} child + * The child node to be removed from the parentNode. + * @returns {Node} + * Returns the child node that was removed. + * @throws {DOMException} + * With code: + * - {@link DOMException.NOT_FOUND_ERR} If the parentNode is not the parent of the child node. + * @private + * @see https://github.com/xmldom/xmldom/issues/135 + * @see https://github.com/xmldom/xmldom/issues/145 + */ +function _removeChild(parentNode, child) { + if (parentNode !== child.parentNode) { + throw new DOMException(DOMException.NOT_FOUND_ERR, "child's parent is not parent"); + } + var oldPreviousSibling = child.previousSibling; + var oldNextSibling = child.nextSibling; + if (oldPreviousSibling) { + oldPreviousSibling.nextSibling = oldNextSibling; + } else { + parentNode.firstChild = oldNextSibling; + } + if (oldNextSibling) { + oldNextSibling.previousSibling = oldPreviousSibling; + } else { + parentNode.lastChild = oldPreviousSibling; + } + _onUpdateChild(parentNode.ownerDocument, parentNode); + child.parentNode = null; + child.previousSibling = null; + child.nextSibling = null; + return child; +} + +/** + * Returns `true` if `node` can be a parent for insertion. + * + * @param {Node} node + * @returns {boolean} + */ +function hasValidParentNodeType(node) { + return ( + node && + (node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE) + ); +} + +/** + * Returns `true` if `node` can be inserted according to it's `nodeType`. + * + * @param {Node} node + * @returns {boolean} + */ +function hasInsertableNodeType(node) { + return ( + node && + (node.nodeType === Node.CDATA_SECTION_NODE || + node.nodeType === Node.COMMENT_NODE || + node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || + node.nodeType === Node.DOCUMENT_TYPE_NODE || + node.nodeType === Node.ELEMENT_NODE || + node.nodeType === Node.PROCESSING_INSTRUCTION_NODE || + node.nodeType === Node.TEXT_NODE) + ); +} + +/** + * Returns true if `node` is a DOCTYPE node. + * + * @param {Node} node + * @returns {boolean} + */ +function isDocTypeNode(node) { + return node && node.nodeType === Node.DOCUMENT_TYPE_NODE; +} + +/** + * Returns true if the node is an element. + * + * @param {Node} node + * @returns {boolean} + */ +function isElementNode(node) { + return node && node.nodeType === Node.ELEMENT_NODE; +} +/** + * Returns true if `node` is a text node. + * + * @param {Node} node + * @returns {boolean} + */ +function isTextNode(node) { + return node && node.nodeType === Node.TEXT_NODE; +} + +/** + * Check if en element node can be inserted before `child`, or at the end if child is falsy, + * according to the presence and position of a doctype node on the same level. + * + * @param {Document} doc + * The document node. + * @param {Node} child + * The node that would become the nextSibling if the element would be inserted. + * @returns {boolean} + * `true` if an element can be inserted before child. + * @private + */ +function isElementInsertionPossible(doc, child) { + var parentChildNodes = doc.childNodes || []; + if (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) { + return false; + } + var docTypeNode = find(parentChildNodes, isDocTypeNode); + return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child)); +} + +/** + * Check if en element node can be inserted before `child`, or at the end if child is falsy, + * according to the presence and position of a doctype node on the same level. + * + * @param {Node} doc + * The document node. + * @param {Node} child + * The node that would become the nextSibling if the element would be inserted. + * @returns {boolean} + * `true` if an element can be inserted before child. + * @private + */ +function isElementReplacementPossible(doc, child) { + var parentChildNodes = doc.childNodes || []; + + function hasElementChildThatIsNotChild(node) { + return isElementNode(node) && node !== child; + } + + if (find(parentChildNodes, hasElementChildThatIsNotChild)) { + return false; + } + var docTypeNode = find(parentChildNodes, isDocTypeNode); + return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child)); +} + +/** + * Asserts pre-insertion validity of a node into a parent before a child. + * Throws errors for invalid node combinations that would result in an ill-formed DOM. + * + * @param {Node} parent + * The parent node to insert `node` into. + * @param {Node} node + * The node to insert. + * @param {Node | null} child + * The node that should become the `nextSibling` of `node`. If null, no sibling is considered. + * @throws {DOMException} + * With code: + * - {@link DOMException.HIERARCHY_REQUEST_ERR} If `parent` is not a Document, + * DocumentFragment, or Element node. + * - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is a host-including inclusive + * ancestor of `parent`. (Currently not implemented) + * - {@link DOMException.NOT_FOUND_ERR} If `child` is non-null and its `parent` is not + * `parent`. + * - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is not a DocumentFragment, + * DocumentType, Element, or CharacterData node. + * - {@link DOMException.HIERARCHY_REQUEST_ERR} If either `node` is a Text node and `parent` is + * a document, or if `node` is a doctype and `parent` is not a document. + * @private + * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity + * @see https://dom.spec.whatwg.org/#concept-node-replace + */ +function assertPreInsertionValidity1to5(parent, node, child) { + // 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a "HierarchyRequestError" DOMException. + if (!hasValidParentNodeType(parent)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType); + } + // 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a "HierarchyRequestError" DOMException. + // not implemented! + // 3. If `child` is non-null and its parent is not `parent`, then throw a "NotFoundError" DOMException. + if (child && child.parentNode !== parent) { + throw new DOMException(DOMException.NOT_FOUND_ERR, 'child not in parent'); + } + if ( + // 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a "HierarchyRequestError" DOMException. + !hasInsertableNodeType(node) || + // 5. If either `node` is a Text node and `parent` is a document, + // the sax parser currently adds top level text nodes, this will be fixed in 0.9.0 + // || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE) + // or `node` is a doctype and `parent` is not a document, then throw a "HierarchyRequestError" DOMException. + (isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE) + ) { + throw new DOMException( + DOMException.HIERARCHY_REQUEST_ERR, + 'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType + ); + } +} + +/** + * Asserts pre-insertion validity of a node into a document before a child. + * Throws errors for invalid node combinations that would result in an ill-formed DOM. + * + * @param {Document} parent + * The parent node to insert `node` into. + * @param {Node} node + * The node to insert. + * @param {Node | undefined} child + * The node that should become the `nextSibling` of `node`. If undefined, no sibling is + * considered. + * @returns {Node} + * @throws {DOMException} + * With code: + * - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is a DocumentFragment with more than + * one element child or has a Text node child. + * - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is a DocumentFragment with one + * element child and either `parent` has an element child, `child` is a doctype, or `child` is + * non-null and a doctype is following `child`. + * - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is an Element and `parent` has an + * element child, `child` is a doctype, or `child` is non-null and a doctype is following + * `child`. + * - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is a DocumentType and `parent` has a + * doctype child, `child` is non-null and an element is preceding `child`, or `child` is null + * and `parent` has an element child. + * @private + * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity + * @see https://dom.spec.whatwg.org/#concept-node-replace + */ +function assertPreInsertionValidityInDocument(parent, node, child) { + var parentChildNodes = parent.childNodes || []; + var nodeChildNodes = node.childNodes || []; + + // DocumentFragment + if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { + var nodeChildElements = nodeChildNodes.filter(isElementNode); + // If node has more than one element child or has a Text node child. + if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment'); + } + // Otherwise, if `node` has one element child and either `parent` has an element child, + // `child` is a doctype, or `child` is non-null and a doctype is following `child`. + if (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype'); + } + } + // Element + if (isElementNode(node)) { + // `parent` has an element child, `child` is a doctype, + // or `child` is non-null and a doctype is following `child`. + if (!isElementInsertionPossible(parent, child)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype'); + } + } + // DocumentType + if (isDocTypeNode(node)) { + // `parent` has a doctype child, + if (find(parentChildNodes, isDocTypeNode)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed'); + } + var parentElementChild = find(parentChildNodes, isElementNode); + // `child` is non-null and an element is preceding `child`, + if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element'); + } + // or `child` is null and `parent` has an element child. + if (!child && parentElementChild) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present'); + } + } +} + +/** + * @param {Document} parent + * The parent node to insert `node` into. + * @param {Node} node + * The node to insert. + * @param {Node | undefined} child + * the node that should become the `nextSibling` of `node` + * @returns {Node} + * @throws {DOMException} + * For several node combinations that would create a DOM that is not well-formed. + * @throws {DOMException} + * If `child` is provided but is not a child of `parent`. + * @private + * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity + * @see https://dom.spec.whatwg.org/#concept-node-replace + */ +function assertPreReplacementValidityInDocument(parent, node, child) { + var parentChildNodes = parent.childNodes || []; + var nodeChildNodes = node.childNodes || []; + + // DocumentFragment + if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { + var nodeChildElements = nodeChildNodes.filter(isElementNode); + // If `node` has more than one element child or has a Text node child. + if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment'); + } + // Otherwise, if `node` has one element child and either `parent` has an element child that is not `child` or a doctype is following `child`. + if (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype'); + } + } + // Element + if (isElementNode(node)) { + // `parent` has an element child that is not `child` or a doctype is following `child`. + if (!isElementReplacementPossible(parent, child)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype'); + } + } + // DocumentType + if (isDocTypeNode(node)) { + function hasDoctypeChildThatIsNotChild(node) { + return isDocTypeNode(node) && node !== child; + } + + // `parent` has a doctype child that is not `child`, + if (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed'); + } + var parentElementChild = find(parentChildNodes, isElementNode); + // or an element is preceding `child`. + if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element'); + } + } +} + +/** + * Inserts a node into a parent node before a child node. + * + * @param {Node} parent + * The parent node to insert the node into. + * @param {Node} node + * The node to insert into the parent. + * @param {Node | null} child + * The node that should become the next sibling of the node. + * If null, the function inserts the node at the end of the children of the parent node. + * @param {Function} [_inDocumentAssertion] + * An optional function to check pre-insertion validity if parent is a document node. + * Defaults to {@link assertPreInsertionValidityInDocument} + * @returns {Node} + * Returns the inserted node. + * @throws {DOMException} + * Throws a DOMException if inserting the node would result in a DOM tree that is not + * well-formed. See {@link assertPreInsertionValidity1to5}, + * {@link assertPreInsertionValidityInDocument}. + * @throws {DOMException} + * Throws a DOMException if child is provided but is not a child of the parent. See + * {@link Node.removeChild} + * @private + * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity + */ +function _insertBefore(parent, node, child, _inDocumentAssertion) { + // To ensure pre-insertion validity of a node into a parent before a child, run these steps: + assertPreInsertionValidity1to5(parent, node, child); + + // If parent is a document, and any of the statements below, switched on the interface node implements, + // are true, then throw a "HierarchyRequestError" DOMException. + if (parent.nodeType === Node.DOCUMENT_NODE) { + (_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child); + } + + var cp = node.parentNode; + if (cp) { + cp.removeChild(node); //remove and update + } + if (node.nodeType === DOCUMENT_FRAGMENT_NODE) { + var newFirst = node.firstChild; + if (newFirst == null) { + return node; + } + var newLast = node.lastChild; + } else { + newFirst = newLast = node; + } + var pre = child ? child.previousSibling : parent.lastChild; + + newFirst.previousSibling = pre; + newLast.nextSibling = child; + + if (pre) { + pre.nextSibling = newFirst; + } else { + parent.firstChild = newFirst; + } + if (child == null) { + parent.lastChild = newLast; + } else { + child.previousSibling = newLast; + } + do { + newFirst.parentNode = parent; + } while (newFirst !== newLast && (newFirst = newFirst.nextSibling)); + _onUpdateChild(parent.ownerDocument || parent, parent, node); + if (node.nodeType == DOCUMENT_FRAGMENT_NODE) { + node.firstChild = node.lastChild = null; + } + + return node; +} + +Document.prototype = { + /** + * The implementation that created this document. + * + * @type DOMImplementation + * @readonly + */ + implementation: null, + nodeName: '#document', + nodeType: DOCUMENT_NODE, + /** + * The DocumentType node of the document. + * + * @type DocumentType + * @readonly + */ + doctype: null, + documentElement: null, + _inc: 1, + + insertBefore: function (newChild, refChild) { + //raises + if (newChild.nodeType === DOCUMENT_FRAGMENT_NODE) { + var child = newChild.firstChild; + while (child) { + var next = child.nextSibling; + this.insertBefore(child, refChild); + child = next; + } + return newChild; + } + _insertBefore(this, newChild, refChild); + newChild.ownerDocument = this; + if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) { + this.documentElement = newChild; + } + + return newChild; + }, + removeChild: function (oldChild) { + var removed = _removeChild(this, oldChild); + if (removed === this.documentElement) { + this.documentElement = null; + } + return removed; + }, + replaceChild: function (newChild, oldChild) { + //raises + _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument); + newChild.ownerDocument = this; + if (oldChild) { + this.removeChild(oldChild); + } + if (isElementNode(newChild)) { + this.documentElement = newChild; + } + }, + /** + * Imports a node from another document into this document, creating a new copy owned by this + * document. The source node and its subtree are not modified. + * + * @param {Node} importedNode + * The node to import. + * @param {boolean} deep + * If true, the contents of the node are recursively imported. + * If false, only the node itself (and its attributes, if it is an element) are imported. + * @returns {Node} + * Returns the newly created import of the node. + * @see {@link importNode} + * @see {@link https://dom.spec.whatwg.org/#dom-document-importnode} + */ + importNode: function (importedNode, deep) { + return importNode(this, importedNode, deep); + }, + // Introduced in DOM Level 2: + getElementById: function (id) { + var rtv = null; + _visitNode(this.documentElement, function (node) { + if (node.nodeType == ELEMENT_NODE) { + if (node.getAttribute('id') == id) { + rtv = node; + return true; + } + } + }); + return rtv; + }, + + /** + * Creates a new `Element` that is owned by this `Document`. + * In HTML Documents `localName` is the lower cased `tagName`, + * otherwise no transformation is being applied. + * When `contentType` implies the HTML namespace, it will be set as `namespaceURI`. + * + * __This implementation differs from the specification:__ - The provided name is not checked + * against the `Name` production, + * so no related error will be thrown. + * - There is no interface `HTMLElement`, it is always an `Element`. + * - There is no support for a second argument to indicate using custom elements. + * + * @param {string} tagName + * @returns {Element} + * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement + * @see https://dom.spec.whatwg.org/#dom-document-createelement + * @see https://dom.spec.whatwg.org/#concept-create-element + */ + createElement: function (tagName) { + var node = new Element(PDC); + node.ownerDocument = this; + if (this.type === 'html') { + tagName = tagName.toLowerCase(); + } + if (hasDefaultHTMLNamespace(this.contentType)) { + node.namespaceURI = NAMESPACE.HTML; + } + node.nodeName = tagName; + node.tagName = tagName; + node.localName = tagName; + node.childNodes = new NodeList(); + var attrs = (node.attributes = new NamedNodeMap()); + attrs._ownerElement = node; + return node; + }, + /** + * @returns {DocumentFragment} + */ + createDocumentFragment: function () { + var node = new DocumentFragment(PDC); + node.ownerDocument = this; + node.childNodes = new NodeList(); + return node; + }, + /** + * @param {string} data + * @returns {Text} + */ + createTextNode: function (data) { + var node = new Text(PDC); + node.ownerDocument = this; + node.childNodes = new NodeList(); + node.appendData(data); + return node; + }, + /** + * @param {string} data + * @returns {Comment} + * @see https://dom.spec.whatwg.org/#dom-document-createcomment + * @see https://www.w3.org/TR/xml/#NT-Comment XML 1.0 production [15] + * @see https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-xml §3.2.1.3 + * + * Note: no validation is performed at creation time. When the resulting document is + * serialized with `requireWellFormed: true`, the serializer throws `InvalidStateError` + * if the comment data contains `--` anywhere, ends with `-`, or contains characters + * outside the XML Char production (W3C DOM Parsing §3.2.1.3). Without that option the + * data is emitted verbatim. + */ + createComment: function (data) { + var node = new Comment(PDC); + node.ownerDocument = this; + node.childNodes = new NodeList(); + node.appendData(data); + return node; + }, + /** + * Returns a new CDATASection node whose data is `data`. + * + * __This implementation differs from the specification:__ - calling this method on an HTML + * document does not throw `NotSupportedError`. + * + * @param {string} data + * @returns {CDATASection} + * @throws {DOMException} + * With code `INVALID_CHARACTER_ERR` if `data` contains `"]]>"`. + * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createCDATASection + * @see https://dom.spec.whatwg.org/#dom-document-createcdatasection + */ + createCDATASection: function (data) { + if (data.indexOf(']]>') !== -1) { + throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 'data contains "]]>"'); + } + var node = new CDATASection(PDC); + node.ownerDocument = this; + node.childNodes = new NodeList(); + node.appendData(data); + return node; + }, + /** + * Returns a ProcessingInstruction node whose target is target and data is data. + * + * __This behavior is slightly different from the in the specs__: + * - it does not do any input validation on the arguments and doesn't throw + * "InvalidCharacterError". + * + * Note: When the resulting document is serialized with `requireWellFormed: true`, the + * serializer throws `InvalidStateError` if `.target` contains `:` or is an ASCII + * case-insensitive match for `"xml"`, or if `.data` contains `?>` or characters outside the + * XML Char production (W3C DOM Parsing §3.2.1.7). Without that option the data is emitted + * verbatim. + * + * @param {string} target + * @param {string} data + * @returns {ProcessingInstruction} + * @see https://developer.mozilla.org/docs/Web/API/Document/createProcessingInstruction + * @see https://dom.spec.whatwg.org/#dom-document-createprocessinginstruction + * @see https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-xml §3.2.1.7 + */ + createProcessingInstruction: function (target, data) { + var node = new ProcessingInstruction(PDC); + node.ownerDocument = this; + node.childNodes = new NodeList(); + node.nodeName = node.target = target; + node.nodeValue = node.data = data; + return node; + }, + /** + * Creates an `Attr` node that is owned by this document. + * In HTML Documents `localName` is the lower cased `name`, + * otherwise no transformation is being applied. + * + * __This implementation differs from the specification:__ - The provided name is not checked + * against the `Name` production, + * so no related error will be thrown. + * + * @param {string} name + * @returns {Attr} + * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createAttribute + * @see https://dom.spec.whatwg.org/#dom-document-createattribute + */ + createAttribute: function (name) { + if (!g.QName_exact.test(name)) { + throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 'invalid character in name "' + name + '"'); + } + if (this.type === 'html') { + name = name.toLowerCase(); + } + return this._createAttribute(name); + }, + _createAttribute: function (name) { + var node = new Attr(PDC); + node.ownerDocument = this; + node.childNodes = new NodeList(); + node.name = name; + node.nodeName = name; + node.localName = name; + node.specified = true; + return node; + }, + /** + * Creates an EntityReference object. + * The current implementation does not fill the `childNodes` with those of the corresponding + * `Entity` + * + * @deprecated + * In DOM Level 4. + * @param {string} name + * The name of the entity to reference. No namespace well-formedness checks are performed. + * @returns {EntityReference} + * @throws {DOMException} + * With code `INVALID_CHARACTER_ERR` when `name` is not valid. + * @throws {DOMException} + * with code `NOT_SUPPORTED_ERR` when the document is of type `html` + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-392B75AE + */ + createEntityReference: function (name) { + if (!g.Name.test(name)) { + throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 'not a valid xml name "' + name + '"'); + } + if (this.type === 'html') { + throw new DOMException('document is an html document', DOMExceptionName.NotSupportedError); + } + + var node = new EntityReference(PDC); + node.ownerDocument = this; + node.childNodes = new NodeList(); + node.nodeName = name; + return node; + }, + // Introduced in DOM Level 2: + /** + * @param {string} namespaceURI + * @param {string} qualifiedName + * @returns {Element} + */ + createElementNS: function (namespaceURI, qualifiedName) { + var validated = validateAndExtract(namespaceURI, qualifiedName); + var node = new Element(PDC); + var attrs = (node.attributes = new NamedNodeMap()); + node.childNodes = new NodeList(); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.tagName = qualifiedName; + node.namespaceURI = validated[0]; + node.prefix = validated[1]; + node.localName = validated[2]; + attrs._ownerElement = node; + return node; + }, + // Introduced in DOM Level 2: + /** + * @param {string} namespaceURI + * @param {string} qualifiedName + * @returns {Attr} + */ + createAttributeNS: function (namespaceURI, qualifiedName) { + var validated = validateAndExtract(namespaceURI, qualifiedName); + var node = new Attr(PDC); + node.ownerDocument = this; + node.childNodes = new NodeList(); + node.nodeName = qualifiedName; + node.name = qualifiedName; + node.specified = true; + node.namespaceURI = validated[0]; + node.prefix = validated[1]; + node.localName = validated[2]; + return node; + }, +}; +_extends(Document, Node); + +function Element(symbol) { + checkSymbol(symbol); + + this._nsMap = Object.create(null); +} +Element.prototype = { + nodeType: ELEMENT_NODE, + /** + * The attributes of this element. + * + * @type {NamedNodeMap | null} + */ + attributes: null, + getQualifiedName: function () { + return this.prefix ? this.prefix + ':' + this.localName : this.localName; + }, + _isInHTMLDocumentAndNamespace: function () { + return this.ownerDocument.type === 'html' && this.namespaceURI === NAMESPACE.HTML; + }, + /** + * Implementaton of Level2 Core function hasAttributes. + * + * @returns {boolean} + * True if attribute list is not empty. + * @see https://www.w3.org/TR/DOM-Level-2-Core/#core-ID-NodeHasAttrs + */ + hasAttributes: function () { + return !!(this.attributes && this.attributes.length); + }, + hasAttribute: function (name) { + return !!this.getAttributeNode(name); + }, + /** + * Returns element’s first attribute whose qualified name is `name`, and `null` + * if there is no such attribute. + * + * @param {string} name + * @returns {string | null} + */ + getAttribute: function (name) { + var attr = this.getAttributeNode(name); + return attr ? attr.value : null; + }, + getAttributeNode: function (name) { + if (this._isInHTMLDocumentAndNamespace()) { + name = name.toLowerCase(); + } + return this.attributes.getNamedItem(name); + }, + /** + * Sets the value of element’s first attribute whose qualified name is qualifiedName to value. + * + * @param {string} name + * @param {string} value + */ + setAttribute: function (name, value) { + if (this._isInHTMLDocumentAndNamespace()) { + name = name.toLowerCase(); + } + var attr = this.getAttributeNode(name); + if (attr) { + attr.value = attr.nodeValue = '' + value; + } else { + attr = this.ownerDocument._createAttribute(name); + attr.value = attr.nodeValue = '' + value; + this.setAttributeNode(attr); + } + }, + removeAttribute: function (name) { + var attr = this.getAttributeNode(name); + attr && this.removeAttributeNode(attr); + }, + setAttributeNode: function (newAttr) { + return this.attributes.setNamedItem(newAttr); + }, + setAttributeNodeNS: function (newAttr) { + return this.attributes.setNamedItemNS(newAttr); + }, + removeAttributeNode: function (oldAttr) { + //console.log(this == oldAttr.ownerElement) + return this.attributes.removeNamedItem(oldAttr.nodeName); + }, + //get real attribute name,and remove it by removeAttributeNode + removeAttributeNS: function (namespaceURI, localName) { + var old = this.getAttributeNodeNS(namespaceURI, localName); + old && this.removeAttributeNode(old); + }, + + hasAttributeNS: function (namespaceURI, localName) { + return this.getAttributeNodeNS(namespaceURI, localName) != null; + }, + /** + * Returns element’s attribute whose namespace is `namespaceURI` and local name is + * `localName`, + * or `null` if there is no such attribute. + * + * @param {string} namespaceURI + * @param {string} localName + * @returns {string | null} + */ + getAttributeNS: function (namespaceURI, localName) { + var attr = this.getAttributeNodeNS(namespaceURI, localName); + return attr ? attr.value : null; + }, + /** + * Sets the value of element’s attribute whose namespace is `namespaceURI` and local name is + * `localName` to value. + * + * @param {string} namespaceURI + * @param {string} qualifiedName + * @param {string} value + * @see https://dom.spec.whatwg.org/#dom-element-setattributens + */ + setAttributeNS: function (namespaceURI, qualifiedName, value) { + var validated = validateAndExtract(namespaceURI, qualifiedName); + var localName = validated[2]; + var attr = this.getAttributeNodeNS(namespaceURI, localName); + if (attr) { + attr.value = attr.nodeValue = '' + value; + } else { + attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); + attr.value = attr.nodeValue = '' + value; + this.setAttributeNode(attr); + } + }, + getAttributeNodeNS: function (namespaceURI, localName) { + return this.attributes.getNamedItemNS(namespaceURI, localName); + }, + + /** + * Returns a LiveNodeList of all child elements which have **all** of the given class name(s). + * + * Returns an empty list if `classNames` is an empty string or only contains HTML white space + * characters. + * + * Warning: This returns a live LiveNodeList. + * Changes in the DOM will reflect in the array as the changes occur. + * If an element selected by this array no longer qualifies for the selector, + * it will automatically be removed. Be aware of this for iteration purposes. + * + * @param {string} classNames + * Is a string representing the class name(s) to match; multiple class names are separated by + * (ASCII-)whitespace. + * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/getElementsByClassName + * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName + * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname + */ + getElementsByClassName: function (classNames) { + var classNamesSet = toOrderedSet(classNames); + return new LiveNodeList(this, function (base) { + var ls = []; + if (classNamesSet.length > 0) { + _visitNode(base, function (node) { + if (node !== base && node.nodeType === ELEMENT_NODE) { + var nodeClassNames = node.getAttribute('class'); + // can be null if the attribute does not exist + if (nodeClassNames) { + // before splitting and iterating just compare them for the most common case + var matches = classNames === nodeClassNames; + if (!matches) { + var nodeClassNamesSet = toOrderedSet(nodeClassNames); + matches = classNamesSet.every(arrayIncludes(nodeClassNamesSet)); + } + if (matches) { + ls.push(node); + } + } + } + }); + } + return ls; + }); + }, + + /** + * Returns a LiveNodeList of elements with the given qualifiedName. + * Searching for all descendants can be done by passing `*` as `qualifiedName`. + * + * All descendants of the specified element are searched, but not the element itself. + * The returned list is live, which means it updates itself with the DOM tree automatically. + * Therefore, there is no need to call `Element.getElementsByTagName()` + * with the same element and arguments repeatedly if the DOM changes in between calls. + * + * When called on an HTML element in an HTML document, + * `getElementsByTagName` lower-cases the argument before searching for it. + * This is undesirable when trying to match camel-cased SVG elements (such as + * ``) in an HTML document. + * Instead, use `Element.getElementsByTagNameNS()`, + * which preserves the capitalization of the tag name. + * + * `Element.getElementsByTagName` is similar to `Document.getElementsByTagName()`, + * except that it only searches for elements that are descendants of the specified element. + * + * @param {string} qualifiedName + * @returns {LiveNodeList} + * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/getElementsByTagName + * @see https://dom.spec.whatwg.org/#concept-getelementsbytagname + */ + getElementsByTagName: function (qualifiedName) { + var isHTMLDocument = (this.nodeType === DOCUMENT_NODE ? this : this.ownerDocument).type === 'html'; + var lowerQualifiedName = qualifiedName.toLowerCase(); + return new LiveNodeList(this, function (base) { + var ls = []; + _visitNode(base, function (node) { + if (node === base || node.nodeType !== ELEMENT_NODE) { + return; + } + if (qualifiedName === '*') { + ls.push(node); + } else { + var nodeQualifiedName = node.getQualifiedName(); + var matchingQName = isHTMLDocument && node.namespaceURI === NAMESPACE.HTML ? lowerQualifiedName : qualifiedName; + if (nodeQualifiedName === matchingQName) { + ls.push(node); + } + } + }); + return ls; + }); + }, + getElementsByTagNameNS: function (namespaceURI, localName) { + return new LiveNodeList(this, function (base) { + var ls = []; + _visitNode(base, function (node) { + if ( + node !== base && + node.nodeType === ELEMENT_NODE && + (namespaceURI === '*' || node.namespaceURI === namespaceURI) && + (localName === '*' || node.localName == localName) + ) { + ls.push(node); + } + }); + return ls; + }); + }, +}; +Document.prototype.getElementsByClassName = Element.prototype.getElementsByClassName; +Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; +Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; + +_extends(Element, Node); +function Attr(symbol) { + checkSymbol(symbol); + + this.namespaceURI = null; + this.prefix = null; + this.ownerElement = null; +} +Attr.prototype.nodeType = ATTRIBUTE_NODE; +_extends(Attr, Node); + +function CharacterData(symbol) { + checkSymbol(symbol); +} +CharacterData.prototype = { + data: '', + substringData: function (offset, count) { + return this.data.substring(offset, offset + count); + }, + appendData: function (text) { + text = this.data + text; + this.nodeValue = this.data = text; + this.length = text.length; + }, + insertData: function (offset, text) { + this.replaceData(offset, 0, text); + }, + deleteData: function (offset, count) { + this.replaceData(offset, count, ''); + }, + replaceData: function (offset, count, text) { + var start = this.data.substring(0, offset); + var end = this.data.substring(offset + count); + text = start + text + end; + this.nodeValue = this.data = text; + this.length = text.length; + }, +}; +_extends(CharacterData, Node); +function Text(symbol) { + checkSymbol(symbol); +} +Text.prototype = { + nodeName: '#text', + nodeType: TEXT_NODE, + splitText: function (offset) { + var text = this.data; + var newText = text.substring(offset); + text = text.substring(0, offset); + this.data = this.nodeValue = text; + this.length = text.length; + var newNode = this.ownerDocument.createTextNode(newText); + if (this.parentNode) { + this.parentNode.insertBefore(newNode, this.nextSibling); + } + return newNode; + }, +}; +_extends(Text, CharacterData); +function Comment(symbol) { + checkSymbol(symbol); +} +Comment.prototype = { + nodeName: '#comment', + nodeType: COMMENT_NODE, +}; +_extends(Comment, CharacterData); + +function CDATASection(symbol) { + checkSymbol(symbol); +} +CDATASection.prototype = { + nodeName: '#cdata-section', + nodeType: CDATA_SECTION_NODE, +}; +_extends(CDATASection, Text); + +/** + * @class DocumentType + * @augments Node + * @property {string} publicId + * The external subset public identifier, stored verbatim (including surrounding quotes). + * Declared `readonly` by the WHATWG DOM spec; xmldom does not enforce this constraint — + * direct property writes succeed and the written value is serialized verbatim. + * When serialized with `requireWellFormed: true`, the serializer validates the value against + * the XML `PubidLiteral` production and throws `InvalidStateError` if it does not match. + * @property {string} systemId + * The external subset system identifier, stored verbatim (including surrounding quotes). + * Declared `readonly` by the WHATWG DOM spec; xmldom does not enforce this constraint — + * direct property writes succeed and the written value is serialized verbatim. + * When serialized with `requireWellFormed: true`, the serializer validates the value against + * the XML `SystemLiteral` production and throws `InvalidStateError` if it does not match. + * @property {string} internalSubset + * The internal subset string (the raw content between `[` and `]`), or an empty string. + * Declared `readonly` by the WHATWG DOM spec; xmldom does not enforce this constraint — + * direct property writes succeed and the written value is serialized verbatim. + * When serialized with `requireWellFormed: true`, the serializer throws `InvalidStateError` + * if the value contains `"]>"`. + * @see https://developer.mozilla.org/en-US/docs/Web/API/DocumentType MDN + * @see https://dom.spec.whatwg.org/#interface-documenttype WHATWG DOM + * @prettierignore + */ +function DocumentType(symbol) { + checkSymbol(symbol); +} +DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; +_extends(DocumentType, Node); + +function Notation(symbol) { + checkSymbol(symbol); +} +Notation.prototype.nodeType = NOTATION_NODE; +_extends(Notation, Node); + +function Entity(symbol) { + checkSymbol(symbol); +} +Entity.prototype.nodeType = ENTITY_NODE; +_extends(Entity, Node); + +function EntityReference(symbol) { + checkSymbol(symbol); +} +EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; +_extends(EntityReference, Node); + +function DocumentFragment(symbol) { + checkSymbol(symbol); +} +DocumentFragment.prototype.nodeName = '#document-fragment'; +DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; +_extends(DocumentFragment, Node); + +function ProcessingInstruction(symbol) { + checkSymbol(symbol); +} +ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; +_extends(ProcessingInstruction, CharacterData); +function XMLSerializer() {} +/** + * Returns the result of serializing `node` to XML. + * + * When `options.requireWellFormed` is `true`, the serializer throws `InvalidStateError` for + * content that would produce ill-formed XML (e.g. CDATASection data containing `"]]>"`, Text + * data containing characters outside the XML Char production, or a Document with no + * `documentElement`). + * + * When `options.splitCDATASections` is `false`, CDATASection data is emitted verbatim even + * when it contains `"]]>"`. When `true` (the default), `"]]>"` sequences are split across + * concatenated CDATA sections — this behavior is **deprecated** and will be removed in the + * next breaking release. Callers should migrate to `{ requireWellFormed: true }`, which throws + * `InvalidStateError` instead of transforming. + * + * __This implementation differs from the specification:__ - CDATASection serialization is not + * specified by W3C DOM Parsing or WHATWG DOM Parsing (see + * {@link https://github.com/w3c/DOM-Parsing/issues/38 w3c/DOM-Parsing#38}). + * When `splitCDATASections` is `true` (the default), `"]]>"` sequences in CDATASection data + * are split across concatenated CDATA sections — this mechanism is derived from DOM Level 3 + * Core and is **deprecated**. The split mechanics will be removed in the next breaking + * release. Callers that rely on this behavior should migrate to `{ requireWellFormed: true }`. + * - W3C DOM Parsing §3.2.1.1 requires well-formedness checks on Element `localName`s, + * prefixes, + * and attribute serialization (duplicate attributes, namespace declarations, attribute value + * characters) when `requireWellFormed` is `true`. These checks are **not implemented** in this + * release — see the tracking issue filed against the next breaking milestone. + * + * @param {Node} node + * @param {Object | function} [options] + * Options object, or a legacy nodeFilter function (backward compatible). + * @param {boolean} [options.requireWellFormed=false] + * When `true`, throws `InvalidStateError` for content that would produce ill-formed XML. + * @param {boolean} [options.splitCDATASections=true] + * When `true` (default), splits `"]]>"` sequences in CDATASection data across concatenated + * CDATA sections. **Deprecated** — will be removed in the next breaking release. + * @param {function} [options.nodeFilter] + * A filter function applied to each node before serialization. + * @returns {string} + * @throws {DOMException} + * With name `InvalidStateError` when `requireWellFormed` is `true` and any of the following + * conditions hold: + * - CDATASection data contains `"]]>"` + * - Text data contains characters outside the XML Char production + * - a Comment node's data contains `--` anywhere or ends with `-` + * - a ProcessingInstruction's target contains `:` or is an ASCII case-insensitive match for + * `"xml"`, or its data contains `?>` or characters outside the XML Char production + * - a DocumentType's `publicId` is non-empty and does not match the XML `PubidLiteral` + * production (W3C DOM Parsing §3.2.1.3; XML 1.0 production [12]) + * - a DocumentType's `systemId` is non-empty and does not match the XML `SystemLiteral` + * production (W3C DOM Parsing §3.2.1.3; XML 1.0 production [11]) + * - a DocumentType's `internalSubset` contains `"]>"` + * - the Document has no `documentElement` + * @see https://developer.mozilla.org/docs/Web/API/XMLSerializer/serializeToString + * @see https://html.spec.whatwg.org/#dom-xmlserializer-serializetostring + * @see https://github.com/w3c/DOM-Parsing/issues/84 + * @prettierignore + */ +XMLSerializer.prototype.serializeToString = function (node, options) { + return nodeSerializeToString.call(node, options); +}; +Node.prototype.toString = nodeSerializeToString; +function nodeSerializeToString(options) { + // Normalize the user-supplied options into a single internal opts object so that the + // internal serializer always works with a consistent shape rather than positional flags. + var opts; + if (typeof options === 'function') { + opts = { requireWellFormed: false, splitCDATASections: true, nodeFilter: options }; + } else if (options != null) { + opts = { + requireWellFormed: !!options.requireWellFormed, + splitCDATASections: options.splitCDATASections !== false, + nodeFilter: options.nodeFilter || null, + }; + } else { + opts = { requireWellFormed: false, splitCDATASections: true, nodeFilter: null }; + } + var buf = []; + var refNode = (this.nodeType === DOCUMENT_NODE && this.documentElement) || this; + var prefix = refNode.prefix; + var uri = refNode.namespaceURI; + + if (uri && prefix == null) { + var prefix = refNode.lookupPrefix(uri); + if (prefix == null) { + var visibleNamespaces = [ + { namespace: uri, prefix: null }, + //{namespace:uri,prefix:''} + ]; + } + } + serializeToString(this, buf, visibleNamespaces, opts); + return buf.join(''); +} + +function needNamespaceDefine(node, isHTML, visibleNamespaces) { + var prefix = node.prefix || ''; + var uri = node.namespaceURI; + // According to [Namespaces in XML 1.0](https://www.w3.org/TR/REC-xml-names/#ns-using) , + // and more specifically https://www.w3.org/TR/REC-xml-names/#nsc-NoPrefixUndecl : + // > In a namespace declaration for a prefix [...], the attribute value MUST NOT be empty. + // in a similar manner [Namespaces in XML 1.1](https://www.w3.org/TR/xml-names11/#ns-using) + // and more specifically https://www.w3.org/TR/xml-names11/#nsc-NSDeclared : + // > [...] Furthermore, the attribute value [...] must not be an empty string. + // so serializing empty namespace value like xmlns:ds="" would produce an invalid XML document. + if (!uri) { + return false; + } + if ((prefix === 'xml' && uri === NAMESPACE.XML) || uri === NAMESPACE.XMLNS) { + return false; + } + + var i = visibleNamespaces.length; + while (i--) { + var ns = visibleNamespaces[i]; + // get namespace prefix + if (ns.prefix === prefix) { + return ns.namespace !== uri; + } + } + return true; +} +/** + * Literal whitespace other than space that appear in attribute values are serialized as + * their entity references, so they will be preserved. + * (In contrast to whitespace literals in the input which are normalized to spaces). + * + * Well-formed constraint: No < in Attribute Values: + * > The replacement text of any entity referred to directly or indirectly + * > in an attribute value must not contain a <. + * + * @see https://www.w3.org/TR/xml11/#CleanAttrVals + * @see https://www.w3.org/TR/xml11/#NT-AttValue + * @see https://www.w3.org/TR/xml11/#AVNormalize + * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes + * @prettierignore + */ +function addSerializedAttribute(buf, qualifiedName, value) { + buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"'); +} + +function serializeToString(node, buf, visibleNamespaces, opts) { + if (!visibleNamespaces) { + visibleNamespaces = []; + } + var nodeFilter = opts.nodeFilter; + var requireWellFormed = opts.requireWellFormed; + var splitCDATASections = opts.splitCDATASections; + var doc = node.nodeType === DOCUMENT_NODE ? node : node.ownerDocument; + var isHTML = doc.type === 'html'; + + walkDOM( + node, + { ns: visibleNamespaces }, + { + enter: function (n, ctx) { + var namespaces = ctx.ns; + + if (nodeFilter) { + n = nodeFilter(n); + if (n) { + if (typeof n == 'string') { + buf.push(n); + return null; + } + } else { + return null; + } + } + + switch (n.nodeType) { + case ELEMENT_NODE: + var attrs = n.attributes; + var len = attrs.length; + var nodeName = n.tagName; + + var prefixedNodeName = nodeName; + if (!isHTML && !n.prefix && n.namespaceURI) { + var defaultNS; + // lookup current default ns from `xmlns` attribute + for (var ai = 0; ai < attrs.length; ai++) { + if (attrs.item(ai).name === 'xmlns') { + defaultNS = attrs.item(ai).value; + break; + } + } + if (!defaultNS) { + // lookup current default ns in visibleNamespaces + for (var nsi = namespaces.length - 1; nsi >= 0; nsi--) { + var nsEntry = namespaces[nsi]; + if (nsEntry.prefix === '' && nsEntry.namespace === n.namespaceURI) { + defaultNS = nsEntry.namespace; + break; + } + } + } + if (defaultNS !== n.namespaceURI) { + for (var nsi = namespaces.length - 1; nsi >= 0; nsi--) { + var nsEntry = namespaces[nsi]; + if (nsEntry.namespace === n.namespaceURI) { + if (nsEntry.prefix) { + prefixedNodeName = nsEntry.prefix + ':' + nodeName; + } + break; + } + } + } + } + + buf.push('<', prefixedNodeName); + + // Build a fresh namespace snapshot for this element's children. + // The slice prevents sibling elements from inheriting each other's declarations. + var childNamespaces = namespaces.slice(); + + for (var i = 0; i < len; i++) { + // add namespaces for attributes + var attr = attrs.item(i); + if (attr.prefix == 'xmlns') { + childNamespaces.push({ + prefix: attr.localName, + namespace: attr.value, + }); + } else if (attr.nodeName == 'xmlns') { + childNamespaces.push({ prefix: '', namespace: attr.value }); + } + } + + for (var i = 0; i < len; i++) { + var attr = attrs.item(i); + if (needNamespaceDefine(attr, isHTML, childNamespaces)) { + var attrPrefix = attr.prefix || ''; + var uri = attr.namespaceURI; + addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri); + childNamespaces.push({ prefix: attrPrefix, namespace: uri }); + } + // Apply nodeFilter and serialize the attribute. + var filteredAttr = nodeFilter ? nodeFilter(attr) : attr; + if (filteredAttr) { + if (typeof filteredAttr === 'string') { + buf.push(filteredAttr); + } else { + addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value); + } + } + } + + // add namespace for current node + if (nodeName === prefixedNodeName && needNamespaceDefine(n, isHTML, childNamespaces)) { + var nodePrefix = n.prefix || ''; + var uri = n.namespaceURI; + addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri); + childNamespaces.push({ prefix: nodePrefix, namespace: uri }); + } + + // in XML elements can be closed when they have no children + var canCloseTag = !n.firstChild; + if (canCloseTag && (isHTML || n.namespaceURI === NAMESPACE.HTML)) { + // in HTML (doc or ns) only void elements can be closed right away + canCloseTag = isHTMLVoidElement(nodeName); + } + if (canCloseTag) { + buf.push('/>'); + // Self-closing: no children and no closing tag needed from exit. + return null; + } + + buf.push('>'); + + // HTML raw text elements: serialize children as raw data without further descent. + if (isHTML && isHTMLRawTextElement(nodeName)) { + var child = n.firstChild; + while (child) { + if (child.data) { + buf.push(child.data); + } else { + serializeToString(child, buf, childNamespaces.slice(), opts); + } + child = child.nextSibling; + } + buf.push(''); + // Children handled manually above; prevent walkDOM from also traversing them. + return null; + } + + // Return child context so walkDOM descends; exit will emit the closing tag. + return { ns: childNamespaces, tag: prefixedNodeName }; + case DOCUMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + if (requireWellFormed && n.nodeType === DOCUMENT_NODE && n.documentElement == null) { + throw new DOMException('The Document has no documentElement', DOMExceptionName.InvalidStateError); + } + // Pass namespaces through; each child element will slice independently. + return { ns: namespaces }; + case ATTRIBUTE_NODE: + addSerializedAttribute(buf, n.name, n.value); + return null; + case TEXT_NODE: + /* + * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form, + * except when used as markup delimiters, or within a comment, a processing instruction, + * or a CDATA section. + * If they are needed elsewhere, they must be escaped using either numeric character + * references or the strings `&` and `<` respectively. + * The right angle bracket (>) may be represented using the string " > ", + * and must, for compatibility, be escaped using either `>`, + * or a character reference when it appears in the string `]]>` in content, + * when that string is not marking the end of a CDATA section. + * + * In the content of elements, character data is any string of characters which does not + * contain the start-delimiter of any markup and does not include the CDATA-section-close + * delimiter, `]]>`. + * + * @see https://www.w3.org/TR/xml/#NT-CharData + * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node + */ + if (requireWellFormed && g.InvalidChar.test(n.data)) { + throw new DOMException( + 'The Text node data contains characters outside the XML Char production', + DOMExceptionName.InvalidStateError + ); + } + buf.push(n.data.replace(/[<&>]/g, _xmlEncoder)); + return null; + case CDATA_SECTION_NODE: + if (requireWellFormed && n.data.indexOf(']]>') !== -1) { + throw new DOMException('The CDATASection data contains "]]>"', DOMExceptionName.InvalidStateError); + } + if (splitCDATASections) { + buf.push(g.CDATA_START, n.data.replace(/]]>/g, ']]]]>'), g.CDATA_END); + } else { + buf.push(g.CDATA_START, n.data, g.CDATA_END); + } + return null; + case COMMENT_NODE: + if (requireWellFormed) { + if (g.InvalidChar.test(n.data)) { + throw new DOMException( + 'The comment node data contains characters outside the XML Char production', + DOMExceptionName.InvalidStateError + ); + } + if (n.data.indexOf('--') !== -1 || n.data[n.data.length - 1] === '-') { + throw new DOMException( + 'The comment node data contains "--" or ends with "-"', + DOMExceptionName.InvalidStateError + ); + } + } + buf.push(g.COMMENT_START, n.data, g.COMMENT_END); + return null; + case DOCUMENT_TYPE_NODE: + var pubid = n.publicId; + var sysid = n.systemId; + if (requireWellFormed) { + if (pubid && !g.PubidLiteral_match.test(pubid)) { + throw new DOMException('DocumentType publicId is not a valid PubidLiteral', DOMExceptionName.InvalidStateError); + } + if (sysid && sysid !== '.' && !g.SystemLiteral_match.test(sysid)) { + throw new DOMException('DocumentType systemId is not a valid SystemLiteral', DOMExceptionName.InvalidStateError); + } + if (n.internalSubset && n.internalSubset.indexOf(']>') !== -1) { + throw new DOMException('DocumentType internalSubset contains "]>"', DOMExceptionName.InvalidStateError); + } + } + buf.push(g.DOCTYPE_DECL_START, ' ', n.name); + if (pubid) { + buf.push(' ', g.PUBLIC, ' ', pubid); + if (sysid && sysid !== '.') { + buf.push(' ', sysid); + } + } else if (sysid && sysid !== '.') { + buf.push(' ', g.SYSTEM, ' ', sysid); + } + if (n.internalSubset) { + buf.push(' [', n.internalSubset, ']'); + } + buf.push('>'); + return null; + case PROCESSING_INSTRUCTION_NODE: + if (requireWellFormed) { + if (n.target.indexOf(':') !== -1 || n.target.toLowerCase() === 'xml') { + throw new DOMException('The ProcessingInstruction target is not well-formed', DOMExceptionName.InvalidStateError); + } + if (g.InvalidChar.test(n.data)) { + throw new DOMException( + 'The ProcessingInstruction data contains characters outside the XML Char production', + DOMExceptionName.InvalidStateError + ); + } + if (n.data.indexOf('?>') !== -1) { + throw new DOMException('The ProcessingInstruction data contains "?>"', DOMExceptionName.InvalidStateError); + } + } + buf.push(''); + return null; + case ENTITY_REFERENCE_NODE: + buf.push('&', n.nodeName, ';'); + return null; + //case ENTITY_NODE: + //case NOTATION_NODE: + default: + buf.push('??', n.nodeName); + return null; + } + }, + exit: function (n, childCtx) { + // Emit the closing tag for elements that were opened (not self-closed, not raw text). + if (childCtx && childCtx.tag) { + buf.push(''); + } + }, + } + ); +} +/** + * Imports a node from a different document into `doc`, creating a new copy. + * Delegates to {@link walkDOM} for traversal. Each node in the subtree is shallow-cloned, + * stamped with `doc` as its `ownerDocument`, and detached (`parentNode` set to `null`). + * Children are imported recursively when `deep` is `true`; for {@link Attr} nodes `deep` is + * always forced to `true` + * because an attribute's value lives in a child text node. + * + * @param {Document} doc + * The document that will own the imported node. + * @param {Node} node + * The node to import. + * @param {boolean} deep + * If `true`, descendants are imported recursively. + * @returns {Node} + * The newly imported node, now owned by `doc`. + */ +function importNode(doc, node, deep) { + var destRoot; + walkDOM(node, null, { + enter: function (srcNode, destParent) { + // Shallow-clone the node and stamp it into the target document. + var destNode = srcNode.cloneNode(false); + destNode.ownerDocument = doc; + destNode.parentNode = null; + // capture as the root of the imported subtree or attach to parent. + if (destParent === null) { + destRoot = destNode; + } else { + destParent.appendChild(destNode); + } + // ATTRIBUTE_NODE must always be imported deeply: its value lives in a child text node. + var shouldDeep = srcNode.nodeType === ATTRIBUTE_NODE || deep; + return shouldDeep ? destNode : null; + }, + }); + return destRoot; +} + +/** + * Creates a copy of a node from an existing one. + * + * @param {Document} doc + * The Document object representing the document that the new node will belong to. + * @param {Node} node + * The node to clone. + * @param {boolean} deep + * If true, the contents of the node are recursively copied. + * If false, only the node itself (and its attributes, if it is an element) are copied. + * @returns {Node} + * Returns the newly created copy of the node. + * @throws {DOMException} + * May throw a DOMException if operations within setAttributeNode or appendChild (which are + * potentially invoked in this function) do not meet their specific constraints. + */ +function cloneNode(doc, node, deep) { + var destRoot; + walkDOM(node, null, { + enter: function (srcNode, destParent) { + // 1. Create a blank node of the same type and copy all scalar own properties. + var destNode = new srcNode.constructor(PDC); + for (var n in srcNode) { + if (hasOwn(srcNode, n)) { + var v = srcNode[n]; + if (typeof v != 'object') { + if (v != destNode[n]) { + destNode[n] = v; + } + } + } + } + if (srcNode.childNodes) { + destNode.childNodes = new NodeList(); + } + destNode.ownerDocument = doc; + // 2. Handle node-type-specific setup. + // Attributes are not DOM children, so they are cloned inline here + // rather than by walkDOM descent. + // ATTRIBUTE_NODE forces deep=true so its own children are walked. + var shouldDeep = deep; + switch (destNode.nodeType) { + case ELEMENT_NODE: + var attrs = srcNode.attributes; + var attrs2 = (destNode.attributes = new NamedNodeMap()); + var len = attrs.length; + attrs2._ownerElement = destNode; + for (var i = 0; i < len; i++) { + destNode.setAttributeNode(cloneNode(doc, attrs.item(i), true)); + } + break; + case ATTRIBUTE_NODE: + shouldDeep = true; + } + // 3. Attach to parent, or capture as the root of the cloned subtree. + if (destParent !== null) { + destParent.appendChild(destNode); + } else { + destRoot = destNode; + } + // 4. Return destNode as the context for children (causes walkDOM to descend), + // or null to skip children (shallow clone). + return shouldDeep ? destNode : null; + }, + }); + return destRoot; +} + +function __set__(object, key, value) { + object[key] = value; +} + +// Returns a new array of direct Element children. +// Passed to LiveNodeList to implement ParentNode.children. +// https://dom.spec.whatwg.org/#dom-parentnode-children +function childrenRefresh(node) { + var ls = []; + var child = node.firstChild; + while (child) { + if (child.nodeType === ELEMENT_NODE) { + ls.push(child); + } + child = child.nextSibling; + } + return ls; +} + +//do dynamic +try { + if (Object.defineProperty) { + Object.defineProperty(LiveNodeList.prototype, 'length', { + get: function () { + _updateLiveList(this); + return this.$$length; + }, + }); + + /** + * The text content of this node and its descendants. + * + * For {@link Element} and {@link DocumentFragment} nodes, returns the concatenation of the + * `nodeValue` of every descendant text node, excluding processing instruction and comment + * nodes. For all other node types, returns `nodeValue`. + * + * Setting `textContent` on an element or document fragment replaces all child nodes with a + * single text node; on other nodes it sets `data`, `value`, and `nodeValue` directly. + * + * @type {string | null} + * @see {@link https://dom.spec.whatwg.org/#dom-node-textcontent} + */ + Object.defineProperty(Node.prototype, 'textContent', { + get: function () { + if (this.nodeType === ELEMENT_NODE || this.nodeType === DOCUMENT_FRAGMENT_NODE) { + var buf = []; + walkDOM(this, null, { + enter: function (n) { + if (n.nodeType === ELEMENT_NODE || n.nodeType === DOCUMENT_FRAGMENT_NODE) { + return true; // enter children + } + if (n.nodeType === PROCESSING_INSTRUCTION_NODE || n.nodeType === COMMENT_NODE) { + return null; // excluded from text content + } + buf.push(n.nodeValue); + }, + }); + return buf.join(''); + } + return this.nodeValue; + }, + + set: function (data) { + switch (this.nodeType) { + case ELEMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + while (this.firstChild) { + this.removeChild(this.firstChild); + } + if (data || String(data)) { + this.appendChild(this.ownerDocument.createTextNode(data)); + } + break; + + default: + this.data = data; + this.value = data; + this.nodeValue = data; + } + }, + }); + + Object.defineProperty(Element.prototype, 'children', { + get: function () { + return new LiveNodeList(this, childrenRefresh); + }, + }); + Object.defineProperty(Document.prototype, 'children', { + get: function () { + return new LiveNodeList(this, childrenRefresh); + }, + }); + Object.defineProperty(DocumentFragment.prototype, 'children', { + get: function () { + return new LiveNodeList(this, childrenRefresh); + }, + }); + + __set__ = function (object, key, value) { + //console.log(value) + object['$$' + key] = value; + }; + } +} catch (e) { + //ie8 +} + +exports._updateLiveList = _updateLiveList; +exports.Attr = Attr; +exports.CDATASection = CDATASection; +exports.CharacterData = CharacterData; +exports.Comment = Comment; +exports.Document = Document; +exports.DocumentFragment = DocumentFragment; +exports.DocumentType = DocumentType; +exports.DOMImplementation = DOMImplementation; +exports.Element = Element; +exports.Entity = Entity; +exports.EntityReference = EntityReference; +exports.LiveNodeList = LiveNodeList; +exports.NamedNodeMap = NamedNodeMap; +exports.Node = Node; +exports.NodeList = NodeList; +exports.Notation = Notation; +exports.Text = Text; +exports.ProcessingInstruction = ProcessingInstruction; +exports.walkDOM = walkDOM; +exports.XMLSerializer = XMLSerializer; + +},{"./conventions":2,"./errors":6,"./grammar":7}],5:[function(require,module,exports){ +'use strict'; + +var freeze = require('./conventions').freeze; + +/** + * The entities that are predefined in every XML document. + * + * @see https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-predefined-ent W3C XML 1.1 + * @see https://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent W3C XML 1.0 + * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML + * Wikipedia + */ +exports.XML_ENTITIES = freeze({ + amp: '&', + apos: "'", + gt: '>', + lt: '<', + quot: '"', +}); + +/** + * A map of all entities that are detected in an HTML document. + * They contain all entries from `XML_ENTITIES`. + * + * @see {@link XML_ENTITIES} + * @see {@link DOMParser.parseFromString} + * @see {@link DOMImplementation.prototype.createHTMLDocument} + * @see https://html.spec.whatwg.org/#named-character-references WHATWG HTML(5) + * Spec + * @see https://html.spec.whatwg.org/entities.json JSON + * @see https://www.w3.org/TR/xml-entity-names/ W3C XML Entity Names + * @see https://www.w3.org/TR/html4/sgml/entities.html W3C HTML4/SGML + * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML + * Wikipedia (HTML) + * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML + * Wikpedia (XHTML) + */ +exports.HTML_ENTITIES = freeze({ + Aacute: '\u00C1', + aacute: '\u00E1', + Abreve: '\u0102', + abreve: '\u0103', + ac: '\u223E', + acd: '\u223F', + acE: '\u223E\u0333', + Acirc: '\u00C2', + acirc: '\u00E2', + acute: '\u00B4', + Acy: '\u0410', + acy: '\u0430', + AElig: '\u00C6', + aelig: '\u00E6', + af: '\u2061', + Afr: '\uD835\uDD04', + afr: '\uD835\uDD1E', + Agrave: '\u00C0', + agrave: '\u00E0', + alefsym: '\u2135', + aleph: '\u2135', + Alpha: '\u0391', + alpha: '\u03B1', + Amacr: '\u0100', + amacr: '\u0101', + amalg: '\u2A3F', + AMP: '\u0026', + amp: '\u0026', + And: '\u2A53', + and: '\u2227', + andand: '\u2A55', + andd: '\u2A5C', + andslope: '\u2A58', + andv: '\u2A5A', + ang: '\u2220', + ange: '\u29A4', + angle: '\u2220', + angmsd: '\u2221', + angmsdaa: '\u29A8', + angmsdab: '\u29A9', + angmsdac: '\u29AA', + angmsdad: '\u29AB', + angmsdae: '\u29AC', + angmsdaf: '\u29AD', + angmsdag: '\u29AE', + angmsdah: '\u29AF', + angrt: '\u221F', + angrtvb: '\u22BE', + angrtvbd: '\u299D', + angsph: '\u2222', + angst: '\u00C5', + angzarr: '\u237C', + Aogon: '\u0104', + aogon: '\u0105', + Aopf: '\uD835\uDD38', + aopf: '\uD835\uDD52', + ap: '\u2248', + apacir: '\u2A6F', + apE: '\u2A70', + ape: '\u224A', + apid: '\u224B', + apos: '\u0027', + ApplyFunction: '\u2061', + approx: '\u2248', + approxeq: '\u224A', + Aring: '\u00C5', + aring: '\u00E5', + Ascr: '\uD835\uDC9C', + ascr: '\uD835\uDCB6', + Assign: '\u2254', + ast: '\u002A', + asymp: '\u2248', + asympeq: '\u224D', + Atilde: '\u00C3', + atilde: '\u00E3', + Auml: '\u00C4', + auml: '\u00E4', + awconint: '\u2233', + awint: '\u2A11', + backcong: '\u224C', + backepsilon: '\u03F6', + backprime: '\u2035', + backsim: '\u223D', + backsimeq: '\u22CD', + Backslash: '\u2216', + Barv: '\u2AE7', + barvee: '\u22BD', + Barwed: '\u2306', + barwed: '\u2305', + barwedge: '\u2305', + bbrk: '\u23B5', + bbrktbrk: '\u23B6', + bcong: '\u224C', + Bcy: '\u0411', + bcy: '\u0431', + bdquo: '\u201E', + becaus: '\u2235', + Because: '\u2235', + because: '\u2235', + bemptyv: '\u29B0', + bepsi: '\u03F6', + bernou: '\u212C', + Bernoullis: '\u212C', + Beta: '\u0392', + beta: '\u03B2', + beth: '\u2136', + between: '\u226C', + Bfr: '\uD835\uDD05', + bfr: '\uD835\uDD1F', + bigcap: '\u22C2', + bigcirc: '\u25EF', + bigcup: '\u22C3', + bigodot: '\u2A00', + bigoplus: '\u2A01', + bigotimes: '\u2A02', + bigsqcup: '\u2A06', + bigstar: '\u2605', + bigtriangledown: '\u25BD', + bigtriangleup: '\u25B3', + biguplus: '\u2A04', + bigvee: '\u22C1', + bigwedge: '\u22C0', + bkarow: '\u290D', + blacklozenge: '\u29EB', + blacksquare: '\u25AA', + blacktriangle: '\u25B4', + blacktriangledown: '\u25BE', + blacktriangleleft: '\u25C2', + blacktriangleright: '\u25B8', + blank: '\u2423', + blk12: '\u2592', + blk14: '\u2591', + blk34: '\u2593', + block: '\u2588', + bne: '\u003D\u20E5', + bnequiv: '\u2261\u20E5', + bNot: '\u2AED', + bnot: '\u2310', + Bopf: '\uD835\uDD39', + bopf: '\uD835\uDD53', + bot: '\u22A5', + bottom: '\u22A5', + bowtie: '\u22C8', + boxbox: '\u29C9', + boxDL: '\u2557', + boxDl: '\u2556', + boxdL: '\u2555', + boxdl: '\u2510', + boxDR: '\u2554', + boxDr: '\u2553', + boxdR: '\u2552', + boxdr: '\u250C', + boxH: '\u2550', + boxh: '\u2500', + boxHD: '\u2566', + boxHd: '\u2564', + boxhD: '\u2565', + boxhd: '\u252C', + boxHU: '\u2569', + boxHu: '\u2567', + boxhU: '\u2568', + boxhu: '\u2534', + boxminus: '\u229F', + boxplus: '\u229E', + boxtimes: '\u22A0', + boxUL: '\u255D', + boxUl: '\u255C', + boxuL: '\u255B', + boxul: '\u2518', + boxUR: '\u255A', + boxUr: '\u2559', + boxuR: '\u2558', + boxur: '\u2514', + boxV: '\u2551', + boxv: '\u2502', + boxVH: '\u256C', + boxVh: '\u256B', + boxvH: '\u256A', + boxvh: '\u253C', + boxVL: '\u2563', + boxVl: '\u2562', + boxvL: '\u2561', + boxvl: '\u2524', + boxVR: '\u2560', + boxVr: '\u255F', + boxvR: '\u255E', + boxvr: '\u251C', + bprime: '\u2035', + Breve: '\u02D8', + breve: '\u02D8', + brvbar: '\u00A6', + Bscr: '\u212C', + bscr: '\uD835\uDCB7', + bsemi: '\u204F', + bsim: '\u223D', + bsime: '\u22CD', + bsol: '\u005C', + bsolb: '\u29C5', + bsolhsub: '\u27C8', + bull: '\u2022', + bullet: '\u2022', + bump: '\u224E', + bumpE: '\u2AAE', + bumpe: '\u224F', + Bumpeq: '\u224E', + bumpeq: '\u224F', + Cacute: '\u0106', + cacute: '\u0107', + Cap: '\u22D2', + cap: '\u2229', + capand: '\u2A44', + capbrcup: '\u2A49', + capcap: '\u2A4B', + capcup: '\u2A47', + capdot: '\u2A40', + CapitalDifferentialD: '\u2145', + caps: '\u2229\uFE00', + caret: '\u2041', + caron: '\u02C7', + Cayleys: '\u212D', + ccaps: '\u2A4D', + Ccaron: '\u010C', + ccaron: '\u010D', + Ccedil: '\u00C7', + ccedil: '\u00E7', + Ccirc: '\u0108', + ccirc: '\u0109', + Cconint: '\u2230', + ccups: '\u2A4C', + ccupssm: '\u2A50', + Cdot: '\u010A', + cdot: '\u010B', + cedil: '\u00B8', + Cedilla: '\u00B8', + cemptyv: '\u29B2', + cent: '\u00A2', + CenterDot: '\u00B7', + centerdot: '\u00B7', + Cfr: '\u212D', + cfr: '\uD835\uDD20', + CHcy: '\u0427', + chcy: '\u0447', + check: '\u2713', + checkmark: '\u2713', + Chi: '\u03A7', + chi: '\u03C7', + cir: '\u25CB', + circ: '\u02C6', + circeq: '\u2257', + circlearrowleft: '\u21BA', + circlearrowright: '\u21BB', + circledast: '\u229B', + circledcirc: '\u229A', + circleddash: '\u229D', + CircleDot: '\u2299', + circledR: '\u00AE', + circledS: '\u24C8', + CircleMinus: '\u2296', + CirclePlus: '\u2295', + CircleTimes: '\u2297', + cirE: '\u29C3', + cire: '\u2257', + cirfnint: '\u2A10', + cirmid: '\u2AEF', + cirscir: '\u29C2', + ClockwiseContourIntegral: '\u2232', + CloseCurlyDoubleQuote: '\u201D', + CloseCurlyQuote: '\u2019', + clubs: '\u2663', + clubsuit: '\u2663', + Colon: '\u2237', + colon: '\u003A', + Colone: '\u2A74', + colone: '\u2254', + coloneq: '\u2254', + comma: '\u002C', + commat: '\u0040', + comp: '\u2201', + compfn: '\u2218', + complement: '\u2201', + complexes: '\u2102', + cong: '\u2245', + congdot: '\u2A6D', + Congruent: '\u2261', + Conint: '\u222F', + conint: '\u222E', + ContourIntegral: '\u222E', + Copf: '\u2102', + copf: '\uD835\uDD54', + coprod: '\u2210', + Coproduct: '\u2210', + COPY: '\u00A9', + copy: '\u00A9', + copysr: '\u2117', + CounterClockwiseContourIntegral: '\u2233', + crarr: '\u21B5', + Cross: '\u2A2F', + cross: '\u2717', + Cscr: '\uD835\uDC9E', + cscr: '\uD835\uDCB8', + csub: '\u2ACF', + csube: '\u2AD1', + csup: '\u2AD0', + csupe: '\u2AD2', + ctdot: '\u22EF', + cudarrl: '\u2938', + cudarrr: '\u2935', + cuepr: '\u22DE', + cuesc: '\u22DF', + cularr: '\u21B6', + cularrp: '\u293D', + Cup: '\u22D3', + cup: '\u222A', + cupbrcap: '\u2A48', + CupCap: '\u224D', + cupcap: '\u2A46', + cupcup: '\u2A4A', + cupdot: '\u228D', + cupor: '\u2A45', + cups: '\u222A\uFE00', + curarr: '\u21B7', + curarrm: '\u293C', + curlyeqprec: '\u22DE', + curlyeqsucc: '\u22DF', + curlyvee: '\u22CE', + curlywedge: '\u22CF', + curren: '\u00A4', + curvearrowleft: '\u21B6', + curvearrowright: '\u21B7', + cuvee: '\u22CE', + cuwed: '\u22CF', + cwconint: '\u2232', + cwint: '\u2231', + cylcty: '\u232D', + Dagger: '\u2021', + dagger: '\u2020', + daleth: '\u2138', + Darr: '\u21A1', + dArr: '\u21D3', + darr: '\u2193', + dash: '\u2010', + Dashv: '\u2AE4', + dashv: '\u22A3', + dbkarow: '\u290F', + dblac: '\u02DD', + Dcaron: '\u010E', + dcaron: '\u010F', + Dcy: '\u0414', + dcy: '\u0434', + DD: '\u2145', + dd: '\u2146', + ddagger: '\u2021', + ddarr: '\u21CA', + DDotrahd: '\u2911', + ddotseq: '\u2A77', + deg: '\u00B0', + Del: '\u2207', + Delta: '\u0394', + delta: '\u03B4', + demptyv: '\u29B1', + dfisht: '\u297F', + Dfr: '\uD835\uDD07', + dfr: '\uD835\uDD21', + dHar: '\u2965', + dharl: '\u21C3', + dharr: '\u21C2', + DiacriticalAcute: '\u00B4', + DiacriticalDot: '\u02D9', + DiacriticalDoubleAcute: '\u02DD', + DiacriticalGrave: '\u0060', + DiacriticalTilde: '\u02DC', + diam: '\u22C4', + Diamond: '\u22C4', + diamond: '\u22C4', + diamondsuit: '\u2666', + diams: '\u2666', + die: '\u00A8', + DifferentialD: '\u2146', + digamma: '\u03DD', + disin: '\u22F2', + div: '\u00F7', + divide: '\u00F7', + divideontimes: '\u22C7', + divonx: '\u22C7', + DJcy: '\u0402', + djcy: '\u0452', + dlcorn: '\u231E', + dlcrop: '\u230D', + dollar: '\u0024', + Dopf: '\uD835\uDD3B', + dopf: '\uD835\uDD55', + Dot: '\u00A8', + dot: '\u02D9', + DotDot: '\u20DC', + doteq: '\u2250', + doteqdot: '\u2251', + DotEqual: '\u2250', + dotminus: '\u2238', + dotplus: '\u2214', + dotsquare: '\u22A1', + doublebarwedge: '\u2306', + DoubleContourIntegral: '\u222F', + DoubleDot: '\u00A8', + DoubleDownArrow: '\u21D3', + DoubleLeftArrow: '\u21D0', + DoubleLeftRightArrow: '\u21D4', + DoubleLeftTee: '\u2AE4', + DoubleLongLeftArrow: '\u27F8', + DoubleLongLeftRightArrow: '\u27FA', + DoubleLongRightArrow: '\u27F9', + DoubleRightArrow: '\u21D2', + DoubleRightTee: '\u22A8', + DoubleUpArrow: '\u21D1', + DoubleUpDownArrow: '\u21D5', + DoubleVerticalBar: '\u2225', + DownArrow: '\u2193', + Downarrow: '\u21D3', + downarrow: '\u2193', + DownArrowBar: '\u2913', + DownArrowUpArrow: '\u21F5', + DownBreve: '\u0311', + downdownarrows: '\u21CA', + downharpoonleft: '\u21C3', + downharpoonright: '\u21C2', + DownLeftRightVector: '\u2950', + DownLeftTeeVector: '\u295E', + DownLeftVector: '\u21BD', + DownLeftVectorBar: '\u2956', + DownRightTeeVector: '\u295F', + DownRightVector: '\u21C1', + DownRightVectorBar: '\u2957', + DownTee: '\u22A4', + DownTeeArrow: '\u21A7', + drbkarow: '\u2910', + drcorn: '\u231F', + drcrop: '\u230C', + Dscr: '\uD835\uDC9F', + dscr: '\uD835\uDCB9', + DScy: '\u0405', + dscy: '\u0455', + dsol: '\u29F6', + Dstrok: '\u0110', + dstrok: '\u0111', + dtdot: '\u22F1', + dtri: '\u25BF', + dtrif: '\u25BE', + duarr: '\u21F5', + duhar: '\u296F', + dwangle: '\u29A6', + DZcy: '\u040F', + dzcy: '\u045F', + dzigrarr: '\u27FF', + Eacute: '\u00C9', + eacute: '\u00E9', + easter: '\u2A6E', + Ecaron: '\u011A', + ecaron: '\u011B', + ecir: '\u2256', + Ecirc: '\u00CA', + ecirc: '\u00EA', + ecolon: '\u2255', + Ecy: '\u042D', + ecy: '\u044D', + eDDot: '\u2A77', + Edot: '\u0116', + eDot: '\u2251', + edot: '\u0117', + ee: '\u2147', + efDot: '\u2252', + Efr: '\uD835\uDD08', + efr: '\uD835\uDD22', + eg: '\u2A9A', + Egrave: '\u00C8', + egrave: '\u00E8', + egs: '\u2A96', + egsdot: '\u2A98', + el: '\u2A99', + Element: '\u2208', + elinters: '\u23E7', + ell: '\u2113', + els: '\u2A95', + elsdot: '\u2A97', + Emacr: '\u0112', + emacr: '\u0113', + empty: '\u2205', + emptyset: '\u2205', + EmptySmallSquare: '\u25FB', + emptyv: '\u2205', + EmptyVerySmallSquare: '\u25AB', + emsp: '\u2003', + emsp13: '\u2004', + emsp14: '\u2005', + ENG: '\u014A', + eng: '\u014B', + ensp: '\u2002', + Eogon: '\u0118', + eogon: '\u0119', + Eopf: '\uD835\uDD3C', + eopf: '\uD835\uDD56', + epar: '\u22D5', + eparsl: '\u29E3', + eplus: '\u2A71', + epsi: '\u03B5', + Epsilon: '\u0395', + epsilon: '\u03B5', + epsiv: '\u03F5', + eqcirc: '\u2256', + eqcolon: '\u2255', + eqsim: '\u2242', + eqslantgtr: '\u2A96', + eqslantless: '\u2A95', + Equal: '\u2A75', + equals: '\u003D', + EqualTilde: '\u2242', + equest: '\u225F', + Equilibrium: '\u21CC', + equiv: '\u2261', + equivDD: '\u2A78', + eqvparsl: '\u29E5', + erarr: '\u2971', + erDot: '\u2253', + Escr: '\u2130', + escr: '\u212F', + esdot: '\u2250', + Esim: '\u2A73', + esim: '\u2242', + Eta: '\u0397', + eta: '\u03B7', + ETH: '\u00D0', + eth: '\u00F0', + Euml: '\u00CB', + euml: '\u00EB', + euro: '\u20AC', + excl: '\u0021', + exist: '\u2203', + Exists: '\u2203', + expectation: '\u2130', + ExponentialE: '\u2147', + exponentiale: '\u2147', + fallingdotseq: '\u2252', + Fcy: '\u0424', + fcy: '\u0444', + female: '\u2640', + ffilig: '\uFB03', + fflig: '\uFB00', + ffllig: '\uFB04', + Ffr: '\uD835\uDD09', + ffr: '\uD835\uDD23', + filig: '\uFB01', + FilledSmallSquare: '\u25FC', + FilledVerySmallSquare: '\u25AA', + fjlig: '\u0066\u006A', + flat: '\u266D', + fllig: '\uFB02', + fltns: '\u25B1', + fnof: '\u0192', + Fopf: '\uD835\uDD3D', + fopf: '\uD835\uDD57', + ForAll: '\u2200', + forall: '\u2200', + fork: '\u22D4', + forkv: '\u2AD9', + Fouriertrf: '\u2131', + fpartint: '\u2A0D', + frac12: '\u00BD', + frac13: '\u2153', + frac14: '\u00BC', + frac15: '\u2155', + frac16: '\u2159', + frac18: '\u215B', + frac23: '\u2154', + frac25: '\u2156', + frac34: '\u00BE', + frac35: '\u2157', + frac38: '\u215C', + frac45: '\u2158', + frac56: '\u215A', + frac58: '\u215D', + frac78: '\u215E', + frasl: '\u2044', + frown: '\u2322', + Fscr: '\u2131', + fscr: '\uD835\uDCBB', + gacute: '\u01F5', + Gamma: '\u0393', + gamma: '\u03B3', + Gammad: '\u03DC', + gammad: '\u03DD', + gap: '\u2A86', + Gbreve: '\u011E', + gbreve: '\u011F', + Gcedil: '\u0122', + Gcirc: '\u011C', + gcirc: '\u011D', + Gcy: '\u0413', + gcy: '\u0433', + Gdot: '\u0120', + gdot: '\u0121', + gE: '\u2267', + ge: '\u2265', + gEl: '\u2A8C', + gel: '\u22DB', + geq: '\u2265', + geqq: '\u2267', + geqslant: '\u2A7E', + ges: '\u2A7E', + gescc: '\u2AA9', + gesdot: '\u2A80', + gesdoto: '\u2A82', + gesdotol: '\u2A84', + gesl: '\u22DB\uFE00', + gesles: '\u2A94', + Gfr: '\uD835\uDD0A', + gfr: '\uD835\uDD24', + Gg: '\u22D9', + gg: '\u226B', + ggg: '\u22D9', + gimel: '\u2137', + GJcy: '\u0403', + gjcy: '\u0453', + gl: '\u2277', + gla: '\u2AA5', + glE: '\u2A92', + glj: '\u2AA4', + gnap: '\u2A8A', + gnapprox: '\u2A8A', + gnE: '\u2269', + gne: '\u2A88', + gneq: '\u2A88', + gneqq: '\u2269', + gnsim: '\u22E7', + Gopf: '\uD835\uDD3E', + gopf: '\uD835\uDD58', + grave: '\u0060', + GreaterEqual: '\u2265', + GreaterEqualLess: '\u22DB', + GreaterFullEqual: '\u2267', + GreaterGreater: '\u2AA2', + GreaterLess: '\u2277', + GreaterSlantEqual: '\u2A7E', + GreaterTilde: '\u2273', + Gscr: '\uD835\uDCA2', + gscr: '\u210A', + gsim: '\u2273', + gsime: '\u2A8E', + gsiml: '\u2A90', + Gt: '\u226B', + GT: '\u003E', + gt: '\u003E', + gtcc: '\u2AA7', + gtcir: '\u2A7A', + gtdot: '\u22D7', + gtlPar: '\u2995', + gtquest: '\u2A7C', + gtrapprox: '\u2A86', + gtrarr: '\u2978', + gtrdot: '\u22D7', + gtreqless: '\u22DB', + gtreqqless: '\u2A8C', + gtrless: '\u2277', + gtrsim: '\u2273', + gvertneqq: '\u2269\uFE00', + gvnE: '\u2269\uFE00', + Hacek: '\u02C7', + hairsp: '\u200A', + half: '\u00BD', + hamilt: '\u210B', + HARDcy: '\u042A', + hardcy: '\u044A', + hArr: '\u21D4', + harr: '\u2194', + harrcir: '\u2948', + harrw: '\u21AD', + Hat: '\u005E', + hbar: '\u210F', + Hcirc: '\u0124', + hcirc: '\u0125', + hearts: '\u2665', + heartsuit: '\u2665', + hellip: '\u2026', + hercon: '\u22B9', + Hfr: '\u210C', + hfr: '\uD835\uDD25', + HilbertSpace: '\u210B', + hksearow: '\u2925', + hkswarow: '\u2926', + hoarr: '\u21FF', + homtht: '\u223B', + hookleftarrow: '\u21A9', + hookrightarrow: '\u21AA', + Hopf: '\u210D', + hopf: '\uD835\uDD59', + horbar: '\u2015', + HorizontalLine: '\u2500', + Hscr: '\u210B', + hscr: '\uD835\uDCBD', + hslash: '\u210F', + Hstrok: '\u0126', + hstrok: '\u0127', + HumpDownHump: '\u224E', + HumpEqual: '\u224F', + hybull: '\u2043', + hyphen: '\u2010', + Iacute: '\u00CD', + iacute: '\u00ED', + ic: '\u2063', + Icirc: '\u00CE', + icirc: '\u00EE', + Icy: '\u0418', + icy: '\u0438', + Idot: '\u0130', + IEcy: '\u0415', + iecy: '\u0435', + iexcl: '\u00A1', + iff: '\u21D4', + Ifr: '\u2111', + ifr: '\uD835\uDD26', + Igrave: '\u00CC', + igrave: '\u00EC', + ii: '\u2148', + iiiint: '\u2A0C', + iiint: '\u222D', + iinfin: '\u29DC', + iiota: '\u2129', + IJlig: '\u0132', + ijlig: '\u0133', + Im: '\u2111', + Imacr: '\u012A', + imacr: '\u012B', + image: '\u2111', + ImaginaryI: '\u2148', + imagline: '\u2110', + imagpart: '\u2111', + imath: '\u0131', + imof: '\u22B7', + imped: '\u01B5', + Implies: '\u21D2', + in: '\u2208', + incare: '\u2105', + infin: '\u221E', + infintie: '\u29DD', + inodot: '\u0131', + Int: '\u222C', + int: '\u222B', + intcal: '\u22BA', + integers: '\u2124', + Integral: '\u222B', + intercal: '\u22BA', + Intersection: '\u22C2', + intlarhk: '\u2A17', + intprod: '\u2A3C', + InvisibleComma: '\u2063', + InvisibleTimes: '\u2062', + IOcy: '\u0401', + iocy: '\u0451', + Iogon: '\u012E', + iogon: '\u012F', + Iopf: '\uD835\uDD40', + iopf: '\uD835\uDD5A', + Iota: '\u0399', + iota: '\u03B9', + iprod: '\u2A3C', + iquest: '\u00BF', + Iscr: '\u2110', + iscr: '\uD835\uDCBE', + isin: '\u2208', + isindot: '\u22F5', + isinE: '\u22F9', + isins: '\u22F4', + isinsv: '\u22F3', + isinv: '\u2208', + it: '\u2062', + Itilde: '\u0128', + itilde: '\u0129', + Iukcy: '\u0406', + iukcy: '\u0456', + Iuml: '\u00CF', + iuml: '\u00EF', + Jcirc: '\u0134', + jcirc: '\u0135', + Jcy: '\u0419', + jcy: '\u0439', + Jfr: '\uD835\uDD0D', + jfr: '\uD835\uDD27', + jmath: '\u0237', + Jopf: '\uD835\uDD41', + jopf: '\uD835\uDD5B', + Jscr: '\uD835\uDCA5', + jscr: '\uD835\uDCBF', + Jsercy: '\u0408', + jsercy: '\u0458', + Jukcy: '\u0404', + jukcy: '\u0454', + Kappa: '\u039A', + kappa: '\u03BA', + kappav: '\u03F0', + Kcedil: '\u0136', + kcedil: '\u0137', + Kcy: '\u041A', + kcy: '\u043A', + Kfr: '\uD835\uDD0E', + kfr: '\uD835\uDD28', + kgreen: '\u0138', + KHcy: '\u0425', + khcy: '\u0445', + KJcy: '\u040C', + kjcy: '\u045C', + Kopf: '\uD835\uDD42', + kopf: '\uD835\uDD5C', + Kscr: '\uD835\uDCA6', + kscr: '\uD835\uDCC0', + lAarr: '\u21DA', + Lacute: '\u0139', + lacute: '\u013A', + laemptyv: '\u29B4', + lagran: '\u2112', + Lambda: '\u039B', + lambda: '\u03BB', + Lang: '\u27EA', + lang: '\u27E8', + langd: '\u2991', + langle: '\u27E8', + lap: '\u2A85', + Laplacetrf: '\u2112', + laquo: '\u00AB', + Larr: '\u219E', + lArr: '\u21D0', + larr: '\u2190', + larrb: '\u21E4', + larrbfs: '\u291F', + larrfs: '\u291D', + larrhk: '\u21A9', + larrlp: '\u21AB', + larrpl: '\u2939', + larrsim: '\u2973', + larrtl: '\u21A2', + lat: '\u2AAB', + lAtail: '\u291B', + latail: '\u2919', + late: '\u2AAD', + lates: '\u2AAD\uFE00', + lBarr: '\u290E', + lbarr: '\u290C', + lbbrk: '\u2772', + lbrace: '\u007B', + lbrack: '\u005B', + lbrke: '\u298B', + lbrksld: '\u298F', + lbrkslu: '\u298D', + Lcaron: '\u013D', + lcaron: '\u013E', + Lcedil: '\u013B', + lcedil: '\u013C', + lceil: '\u2308', + lcub: '\u007B', + Lcy: '\u041B', + lcy: '\u043B', + ldca: '\u2936', + ldquo: '\u201C', + ldquor: '\u201E', + ldrdhar: '\u2967', + ldrushar: '\u294B', + ldsh: '\u21B2', + lE: '\u2266', + le: '\u2264', + LeftAngleBracket: '\u27E8', + LeftArrow: '\u2190', + Leftarrow: '\u21D0', + leftarrow: '\u2190', + LeftArrowBar: '\u21E4', + LeftArrowRightArrow: '\u21C6', + leftarrowtail: '\u21A2', + LeftCeiling: '\u2308', + LeftDoubleBracket: '\u27E6', + LeftDownTeeVector: '\u2961', + LeftDownVector: '\u21C3', + LeftDownVectorBar: '\u2959', + LeftFloor: '\u230A', + leftharpoondown: '\u21BD', + leftharpoonup: '\u21BC', + leftleftarrows: '\u21C7', + LeftRightArrow: '\u2194', + Leftrightarrow: '\u21D4', + leftrightarrow: '\u2194', + leftrightarrows: '\u21C6', + leftrightharpoons: '\u21CB', + leftrightsquigarrow: '\u21AD', + LeftRightVector: '\u294E', + LeftTee: '\u22A3', + LeftTeeArrow: '\u21A4', + LeftTeeVector: '\u295A', + leftthreetimes: '\u22CB', + LeftTriangle: '\u22B2', + LeftTriangleBar: '\u29CF', + LeftTriangleEqual: '\u22B4', + LeftUpDownVector: '\u2951', + LeftUpTeeVector: '\u2960', + LeftUpVector: '\u21BF', + LeftUpVectorBar: '\u2958', + LeftVector: '\u21BC', + LeftVectorBar: '\u2952', + lEg: '\u2A8B', + leg: '\u22DA', + leq: '\u2264', + leqq: '\u2266', + leqslant: '\u2A7D', + les: '\u2A7D', + lescc: '\u2AA8', + lesdot: '\u2A7F', + lesdoto: '\u2A81', + lesdotor: '\u2A83', + lesg: '\u22DA\uFE00', + lesges: '\u2A93', + lessapprox: '\u2A85', + lessdot: '\u22D6', + lesseqgtr: '\u22DA', + lesseqqgtr: '\u2A8B', + LessEqualGreater: '\u22DA', + LessFullEqual: '\u2266', + LessGreater: '\u2276', + lessgtr: '\u2276', + LessLess: '\u2AA1', + lesssim: '\u2272', + LessSlantEqual: '\u2A7D', + LessTilde: '\u2272', + lfisht: '\u297C', + lfloor: '\u230A', + Lfr: '\uD835\uDD0F', + lfr: '\uD835\uDD29', + lg: '\u2276', + lgE: '\u2A91', + lHar: '\u2962', + lhard: '\u21BD', + lharu: '\u21BC', + lharul: '\u296A', + lhblk: '\u2584', + LJcy: '\u0409', + ljcy: '\u0459', + Ll: '\u22D8', + ll: '\u226A', + llarr: '\u21C7', + llcorner: '\u231E', + Lleftarrow: '\u21DA', + llhard: '\u296B', + lltri: '\u25FA', + Lmidot: '\u013F', + lmidot: '\u0140', + lmoust: '\u23B0', + lmoustache: '\u23B0', + lnap: '\u2A89', + lnapprox: '\u2A89', + lnE: '\u2268', + lne: '\u2A87', + lneq: '\u2A87', + lneqq: '\u2268', + lnsim: '\u22E6', + loang: '\u27EC', + loarr: '\u21FD', + lobrk: '\u27E6', + LongLeftArrow: '\u27F5', + Longleftarrow: '\u27F8', + longleftarrow: '\u27F5', + LongLeftRightArrow: '\u27F7', + Longleftrightarrow: '\u27FA', + longleftrightarrow: '\u27F7', + longmapsto: '\u27FC', + LongRightArrow: '\u27F6', + Longrightarrow: '\u27F9', + longrightarrow: '\u27F6', + looparrowleft: '\u21AB', + looparrowright: '\u21AC', + lopar: '\u2985', + Lopf: '\uD835\uDD43', + lopf: '\uD835\uDD5D', + loplus: '\u2A2D', + lotimes: '\u2A34', + lowast: '\u2217', + lowbar: '\u005F', + LowerLeftArrow: '\u2199', + LowerRightArrow: '\u2198', + loz: '\u25CA', + lozenge: '\u25CA', + lozf: '\u29EB', + lpar: '\u0028', + lparlt: '\u2993', + lrarr: '\u21C6', + lrcorner: '\u231F', + lrhar: '\u21CB', + lrhard: '\u296D', + lrm: '\u200E', + lrtri: '\u22BF', + lsaquo: '\u2039', + Lscr: '\u2112', + lscr: '\uD835\uDCC1', + Lsh: '\u21B0', + lsh: '\u21B0', + lsim: '\u2272', + lsime: '\u2A8D', + lsimg: '\u2A8F', + lsqb: '\u005B', + lsquo: '\u2018', + lsquor: '\u201A', + Lstrok: '\u0141', + lstrok: '\u0142', + Lt: '\u226A', + LT: '\u003C', + lt: '\u003C', + ltcc: '\u2AA6', + ltcir: '\u2A79', + ltdot: '\u22D6', + lthree: '\u22CB', + ltimes: '\u22C9', + ltlarr: '\u2976', + ltquest: '\u2A7B', + ltri: '\u25C3', + ltrie: '\u22B4', + ltrif: '\u25C2', + ltrPar: '\u2996', + lurdshar: '\u294A', + luruhar: '\u2966', + lvertneqq: '\u2268\uFE00', + lvnE: '\u2268\uFE00', + macr: '\u00AF', + male: '\u2642', + malt: '\u2720', + maltese: '\u2720', + Map: '\u2905', + map: '\u21A6', + mapsto: '\u21A6', + mapstodown: '\u21A7', + mapstoleft: '\u21A4', + mapstoup: '\u21A5', + marker: '\u25AE', + mcomma: '\u2A29', + Mcy: '\u041C', + mcy: '\u043C', + mdash: '\u2014', + mDDot: '\u223A', + measuredangle: '\u2221', + MediumSpace: '\u205F', + Mellintrf: '\u2133', + Mfr: '\uD835\uDD10', + mfr: '\uD835\uDD2A', + mho: '\u2127', + micro: '\u00B5', + mid: '\u2223', + midast: '\u002A', + midcir: '\u2AF0', + middot: '\u00B7', + minus: '\u2212', + minusb: '\u229F', + minusd: '\u2238', + minusdu: '\u2A2A', + MinusPlus: '\u2213', + mlcp: '\u2ADB', + mldr: '\u2026', + mnplus: '\u2213', + models: '\u22A7', + Mopf: '\uD835\uDD44', + mopf: '\uD835\uDD5E', + mp: '\u2213', + Mscr: '\u2133', + mscr: '\uD835\uDCC2', + mstpos: '\u223E', + Mu: '\u039C', + mu: '\u03BC', + multimap: '\u22B8', + mumap: '\u22B8', + nabla: '\u2207', + Nacute: '\u0143', + nacute: '\u0144', + nang: '\u2220\u20D2', + nap: '\u2249', + napE: '\u2A70\u0338', + napid: '\u224B\u0338', + napos: '\u0149', + napprox: '\u2249', + natur: '\u266E', + natural: '\u266E', + naturals: '\u2115', + nbsp: '\u00A0', + nbump: '\u224E\u0338', + nbumpe: '\u224F\u0338', + ncap: '\u2A43', + Ncaron: '\u0147', + ncaron: '\u0148', + Ncedil: '\u0145', + ncedil: '\u0146', + ncong: '\u2247', + ncongdot: '\u2A6D\u0338', + ncup: '\u2A42', + Ncy: '\u041D', + ncy: '\u043D', + ndash: '\u2013', + ne: '\u2260', + nearhk: '\u2924', + neArr: '\u21D7', + nearr: '\u2197', + nearrow: '\u2197', + nedot: '\u2250\u0338', + NegativeMediumSpace: '\u200B', + NegativeThickSpace: '\u200B', + NegativeThinSpace: '\u200B', + NegativeVeryThinSpace: '\u200B', + nequiv: '\u2262', + nesear: '\u2928', + nesim: '\u2242\u0338', + NestedGreaterGreater: '\u226B', + NestedLessLess: '\u226A', + NewLine: '\u000A', + nexist: '\u2204', + nexists: '\u2204', + Nfr: '\uD835\uDD11', + nfr: '\uD835\uDD2B', + ngE: '\u2267\u0338', + nge: '\u2271', + ngeq: '\u2271', + ngeqq: '\u2267\u0338', + ngeqslant: '\u2A7E\u0338', + nges: '\u2A7E\u0338', + nGg: '\u22D9\u0338', + ngsim: '\u2275', + nGt: '\u226B\u20D2', + ngt: '\u226F', + ngtr: '\u226F', + nGtv: '\u226B\u0338', + nhArr: '\u21CE', + nharr: '\u21AE', + nhpar: '\u2AF2', + ni: '\u220B', + nis: '\u22FC', + nisd: '\u22FA', + niv: '\u220B', + NJcy: '\u040A', + njcy: '\u045A', + nlArr: '\u21CD', + nlarr: '\u219A', + nldr: '\u2025', + nlE: '\u2266\u0338', + nle: '\u2270', + nLeftarrow: '\u21CD', + nleftarrow: '\u219A', + nLeftrightarrow: '\u21CE', + nleftrightarrow: '\u21AE', + nleq: '\u2270', + nleqq: '\u2266\u0338', + nleqslant: '\u2A7D\u0338', + nles: '\u2A7D\u0338', + nless: '\u226E', + nLl: '\u22D8\u0338', + nlsim: '\u2274', + nLt: '\u226A\u20D2', + nlt: '\u226E', + nltri: '\u22EA', + nltrie: '\u22EC', + nLtv: '\u226A\u0338', + nmid: '\u2224', + NoBreak: '\u2060', + NonBreakingSpace: '\u00A0', + Nopf: '\u2115', + nopf: '\uD835\uDD5F', + Not: '\u2AEC', + not: '\u00AC', + NotCongruent: '\u2262', + NotCupCap: '\u226D', + NotDoubleVerticalBar: '\u2226', + NotElement: '\u2209', + NotEqual: '\u2260', + NotEqualTilde: '\u2242\u0338', + NotExists: '\u2204', + NotGreater: '\u226F', + NotGreaterEqual: '\u2271', + NotGreaterFullEqual: '\u2267\u0338', + NotGreaterGreater: '\u226B\u0338', + NotGreaterLess: '\u2279', + NotGreaterSlantEqual: '\u2A7E\u0338', + NotGreaterTilde: '\u2275', + NotHumpDownHump: '\u224E\u0338', + NotHumpEqual: '\u224F\u0338', + notin: '\u2209', + notindot: '\u22F5\u0338', + notinE: '\u22F9\u0338', + notinva: '\u2209', + notinvb: '\u22F7', + notinvc: '\u22F6', + NotLeftTriangle: '\u22EA', + NotLeftTriangleBar: '\u29CF\u0338', + NotLeftTriangleEqual: '\u22EC', + NotLess: '\u226E', + NotLessEqual: '\u2270', + NotLessGreater: '\u2278', + NotLessLess: '\u226A\u0338', + NotLessSlantEqual: '\u2A7D\u0338', + NotLessTilde: '\u2274', + NotNestedGreaterGreater: '\u2AA2\u0338', + NotNestedLessLess: '\u2AA1\u0338', + notni: '\u220C', + notniva: '\u220C', + notnivb: '\u22FE', + notnivc: '\u22FD', + NotPrecedes: '\u2280', + NotPrecedesEqual: '\u2AAF\u0338', + NotPrecedesSlantEqual: '\u22E0', + NotReverseElement: '\u220C', + NotRightTriangle: '\u22EB', + NotRightTriangleBar: '\u29D0\u0338', + NotRightTriangleEqual: '\u22ED', + NotSquareSubset: '\u228F\u0338', + NotSquareSubsetEqual: '\u22E2', + NotSquareSuperset: '\u2290\u0338', + NotSquareSupersetEqual: '\u22E3', + NotSubset: '\u2282\u20D2', + NotSubsetEqual: '\u2288', + NotSucceeds: '\u2281', + NotSucceedsEqual: '\u2AB0\u0338', + NotSucceedsSlantEqual: '\u22E1', + NotSucceedsTilde: '\u227F\u0338', + NotSuperset: '\u2283\u20D2', + NotSupersetEqual: '\u2289', + NotTilde: '\u2241', + NotTildeEqual: '\u2244', + NotTildeFullEqual: '\u2247', + NotTildeTilde: '\u2249', + NotVerticalBar: '\u2224', + npar: '\u2226', + nparallel: '\u2226', + nparsl: '\u2AFD\u20E5', + npart: '\u2202\u0338', + npolint: '\u2A14', + npr: '\u2280', + nprcue: '\u22E0', + npre: '\u2AAF\u0338', + nprec: '\u2280', + npreceq: '\u2AAF\u0338', + nrArr: '\u21CF', + nrarr: '\u219B', + nrarrc: '\u2933\u0338', + nrarrw: '\u219D\u0338', + nRightarrow: '\u21CF', + nrightarrow: '\u219B', + nrtri: '\u22EB', + nrtrie: '\u22ED', + nsc: '\u2281', + nsccue: '\u22E1', + nsce: '\u2AB0\u0338', + Nscr: '\uD835\uDCA9', + nscr: '\uD835\uDCC3', + nshortmid: '\u2224', + nshortparallel: '\u2226', + nsim: '\u2241', + nsime: '\u2244', + nsimeq: '\u2244', + nsmid: '\u2224', + nspar: '\u2226', + nsqsube: '\u22E2', + nsqsupe: '\u22E3', + nsub: '\u2284', + nsubE: '\u2AC5\u0338', + nsube: '\u2288', + nsubset: '\u2282\u20D2', + nsubseteq: '\u2288', + nsubseteqq: '\u2AC5\u0338', + nsucc: '\u2281', + nsucceq: '\u2AB0\u0338', + nsup: '\u2285', + nsupE: '\u2AC6\u0338', + nsupe: '\u2289', + nsupset: '\u2283\u20D2', + nsupseteq: '\u2289', + nsupseteqq: '\u2AC6\u0338', + ntgl: '\u2279', + Ntilde: '\u00D1', + ntilde: '\u00F1', + ntlg: '\u2278', + ntriangleleft: '\u22EA', + ntrianglelefteq: '\u22EC', + ntriangleright: '\u22EB', + ntrianglerighteq: '\u22ED', + Nu: '\u039D', + nu: '\u03BD', + num: '\u0023', + numero: '\u2116', + numsp: '\u2007', + nvap: '\u224D\u20D2', + nVDash: '\u22AF', + nVdash: '\u22AE', + nvDash: '\u22AD', + nvdash: '\u22AC', + nvge: '\u2265\u20D2', + nvgt: '\u003E\u20D2', + nvHarr: '\u2904', + nvinfin: '\u29DE', + nvlArr: '\u2902', + nvle: '\u2264\u20D2', + nvlt: '\u003C\u20D2', + nvltrie: '\u22B4\u20D2', + nvrArr: '\u2903', + nvrtrie: '\u22B5\u20D2', + nvsim: '\u223C\u20D2', + nwarhk: '\u2923', + nwArr: '\u21D6', + nwarr: '\u2196', + nwarrow: '\u2196', + nwnear: '\u2927', + Oacute: '\u00D3', + oacute: '\u00F3', + oast: '\u229B', + ocir: '\u229A', + Ocirc: '\u00D4', + ocirc: '\u00F4', + Ocy: '\u041E', + ocy: '\u043E', + odash: '\u229D', + Odblac: '\u0150', + odblac: '\u0151', + odiv: '\u2A38', + odot: '\u2299', + odsold: '\u29BC', + OElig: '\u0152', + oelig: '\u0153', + ofcir: '\u29BF', + Ofr: '\uD835\uDD12', + ofr: '\uD835\uDD2C', + ogon: '\u02DB', + Ograve: '\u00D2', + ograve: '\u00F2', + ogt: '\u29C1', + ohbar: '\u29B5', + ohm: '\u03A9', + oint: '\u222E', + olarr: '\u21BA', + olcir: '\u29BE', + olcross: '\u29BB', + oline: '\u203E', + olt: '\u29C0', + Omacr: '\u014C', + omacr: '\u014D', + Omega: '\u03A9', + omega: '\u03C9', + Omicron: '\u039F', + omicron: '\u03BF', + omid: '\u29B6', + ominus: '\u2296', + Oopf: '\uD835\uDD46', + oopf: '\uD835\uDD60', + opar: '\u29B7', + OpenCurlyDoubleQuote: '\u201C', + OpenCurlyQuote: '\u2018', + operp: '\u29B9', + oplus: '\u2295', + Or: '\u2A54', + or: '\u2228', + orarr: '\u21BB', + ord: '\u2A5D', + order: '\u2134', + orderof: '\u2134', + ordf: '\u00AA', + ordm: '\u00BA', + origof: '\u22B6', + oror: '\u2A56', + orslope: '\u2A57', + orv: '\u2A5B', + oS: '\u24C8', + Oscr: '\uD835\uDCAA', + oscr: '\u2134', + Oslash: '\u00D8', + oslash: '\u00F8', + osol: '\u2298', + Otilde: '\u00D5', + otilde: '\u00F5', + Otimes: '\u2A37', + otimes: '\u2297', + otimesas: '\u2A36', + Ouml: '\u00D6', + ouml: '\u00F6', + ovbar: '\u233D', + OverBar: '\u203E', + OverBrace: '\u23DE', + OverBracket: '\u23B4', + OverParenthesis: '\u23DC', + par: '\u2225', + para: '\u00B6', + parallel: '\u2225', + parsim: '\u2AF3', + parsl: '\u2AFD', + part: '\u2202', + PartialD: '\u2202', + Pcy: '\u041F', + pcy: '\u043F', + percnt: '\u0025', + period: '\u002E', + permil: '\u2030', + perp: '\u22A5', + pertenk: '\u2031', + Pfr: '\uD835\uDD13', + pfr: '\uD835\uDD2D', + Phi: '\u03A6', + phi: '\u03C6', + phiv: '\u03D5', + phmmat: '\u2133', + phone: '\u260E', + Pi: '\u03A0', + pi: '\u03C0', + pitchfork: '\u22D4', + piv: '\u03D6', + planck: '\u210F', + planckh: '\u210E', + plankv: '\u210F', + plus: '\u002B', + plusacir: '\u2A23', + plusb: '\u229E', + pluscir: '\u2A22', + plusdo: '\u2214', + plusdu: '\u2A25', + pluse: '\u2A72', + PlusMinus: '\u00B1', + plusmn: '\u00B1', + plussim: '\u2A26', + plustwo: '\u2A27', + pm: '\u00B1', + Poincareplane: '\u210C', + pointint: '\u2A15', + Popf: '\u2119', + popf: '\uD835\uDD61', + pound: '\u00A3', + Pr: '\u2ABB', + pr: '\u227A', + prap: '\u2AB7', + prcue: '\u227C', + prE: '\u2AB3', + pre: '\u2AAF', + prec: '\u227A', + precapprox: '\u2AB7', + preccurlyeq: '\u227C', + Precedes: '\u227A', + PrecedesEqual: '\u2AAF', + PrecedesSlantEqual: '\u227C', + PrecedesTilde: '\u227E', + preceq: '\u2AAF', + precnapprox: '\u2AB9', + precneqq: '\u2AB5', + precnsim: '\u22E8', + precsim: '\u227E', + Prime: '\u2033', + prime: '\u2032', + primes: '\u2119', + prnap: '\u2AB9', + prnE: '\u2AB5', + prnsim: '\u22E8', + prod: '\u220F', + Product: '\u220F', + profalar: '\u232E', + profline: '\u2312', + profsurf: '\u2313', + prop: '\u221D', + Proportion: '\u2237', + Proportional: '\u221D', + propto: '\u221D', + prsim: '\u227E', + prurel: '\u22B0', + Pscr: '\uD835\uDCAB', + pscr: '\uD835\uDCC5', + Psi: '\u03A8', + psi: '\u03C8', + puncsp: '\u2008', + Qfr: '\uD835\uDD14', + qfr: '\uD835\uDD2E', + qint: '\u2A0C', + Qopf: '\u211A', + qopf: '\uD835\uDD62', + qprime: '\u2057', + Qscr: '\uD835\uDCAC', + qscr: '\uD835\uDCC6', + quaternions: '\u210D', + quatint: '\u2A16', + quest: '\u003F', + questeq: '\u225F', + QUOT: '\u0022', + quot: '\u0022', + rAarr: '\u21DB', + race: '\u223D\u0331', + Racute: '\u0154', + racute: '\u0155', + radic: '\u221A', + raemptyv: '\u29B3', + Rang: '\u27EB', + rang: '\u27E9', + rangd: '\u2992', + range: '\u29A5', + rangle: '\u27E9', + raquo: '\u00BB', + Rarr: '\u21A0', + rArr: '\u21D2', + rarr: '\u2192', + rarrap: '\u2975', + rarrb: '\u21E5', + rarrbfs: '\u2920', + rarrc: '\u2933', + rarrfs: '\u291E', + rarrhk: '\u21AA', + rarrlp: '\u21AC', + rarrpl: '\u2945', + rarrsim: '\u2974', + Rarrtl: '\u2916', + rarrtl: '\u21A3', + rarrw: '\u219D', + rAtail: '\u291C', + ratail: '\u291A', + ratio: '\u2236', + rationals: '\u211A', + RBarr: '\u2910', + rBarr: '\u290F', + rbarr: '\u290D', + rbbrk: '\u2773', + rbrace: '\u007D', + rbrack: '\u005D', + rbrke: '\u298C', + rbrksld: '\u298E', + rbrkslu: '\u2990', + Rcaron: '\u0158', + rcaron: '\u0159', + Rcedil: '\u0156', + rcedil: '\u0157', + rceil: '\u2309', + rcub: '\u007D', + Rcy: '\u0420', + rcy: '\u0440', + rdca: '\u2937', + rdldhar: '\u2969', + rdquo: '\u201D', + rdquor: '\u201D', + rdsh: '\u21B3', + Re: '\u211C', + real: '\u211C', + realine: '\u211B', + realpart: '\u211C', + reals: '\u211D', + rect: '\u25AD', + REG: '\u00AE', + reg: '\u00AE', + ReverseElement: '\u220B', + ReverseEquilibrium: '\u21CB', + ReverseUpEquilibrium: '\u296F', + rfisht: '\u297D', + rfloor: '\u230B', + Rfr: '\u211C', + rfr: '\uD835\uDD2F', + rHar: '\u2964', + rhard: '\u21C1', + rharu: '\u21C0', + rharul: '\u296C', + Rho: '\u03A1', + rho: '\u03C1', + rhov: '\u03F1', + RightAngleBracket: '\u27E9', + RightArrow: '\u2192', + Rightarrow: '\u21D2', + rightarrow: '\u2192', + RightArrowBar: '\u21E5', + RightArrowLeftArrow: '\u21C4', + rightarrowtail: '\u21A3', + RightCeiling: '\u2309', + RightDoubleBracket: '\u27E7', + RightDownTeeVector: '\u295D', + RightDownVector: '\u21C2', + RightDownVectorBar: '\u2955', + RightFloor: '\u230B', + rightharpoondown: '\u21C1', + rightharpoonup: '\u21C0', + rightleftarrows: '\u21C4', + rightleftharpoons: '\u21CC', + rightrightarrows: '\u21C9', + rightsquigarrow: '\u219D', + RightTee: '\u22A2', + RightTeeArrow: '\u21A6', + RightTeeVector: '\u295B', + rightthreetimes: '\u22CC', + RightTriangle: '\u22B3', + RightTriangleBar: '\u29D0', + RightTriangleEqual: '\u22B5', + RightUpDownVector: '\u294F', + RightUpTeeVector: '\u295C', + RightUpVector: '\u21BE', + RightUpVectorBar: '\u2954', + RightVector: '\u21C0', + RightVectorBar: '\u2953', + ring: '\u02DA', + risingdotseq: '\u2253', + rlarr: '\u21C4', + rlhar: '\u21CC', + rlm: '\u200F', + rmoust: '\u23B1', + rmoustache: '\u23B1', + rnmid: '\u2AEE', + roang: '\u27ED', + roarr: '\u21FE', + robrk: '\u27E7', + ropar: '\u2986', + Ropf: '\u211D', + ropf: '\uD835\uDD63', + roplus: '\u2A2E', + rotimes: '\u2A35', + RoundImplies: '\u2970', + rpar: '\u0029', + rpargt: '\u2994', + rppolint: '\u2A12', + rrarr: '\u21C9', + Rrightarrow: '\u21DB', + rsaquo: '\u203A', + Rscr: '\u211B', + rscr: '\uD835\uDCC7', + Rsh: '\u21B1', + rsh: '\u21B1', + rsqb: '\u005D', + rsquo: '\u2019', + rsquor: '\u2019', + rthree: '\u22CC', + rtimes: '\u22CA', + rtri: '\u25B9', + rtrie: '\u22B5', + rtrif: '\u25B8', + rtriltri: '\u29CE', + RuleDelayed: '\u29F4', + ruluhar: '\u2968', + rx: '\u211E', + Sacute: '\u015A', + sacute: '\u015B', + sbquo: '\u201A', + Sc: '\u2ABC', + sc: '\u227B', + scap: '\u2AB8', + Scaron: '\u0160', + scaron: '\u0161', + sccue: '\u227D', + scE: '\u2AB4', + sce: '\u2AB0', + Scedil: '\u015E', + scedil: '\u015F', + Scirc: '\u015C', + scirc: '\u015D', + scnap: '\u2ABA', + scnE: '\u2AB6', + scnsim: '\u22E9', + scpolint: '\u2A13', + scsim: '\u227F', + Scy: '\u0421', + scy: '\u0441', + sdot: '\u22C5', + sdotb: '\u22A1', + sdote: '\u2A66', + searhk: '\u2925', + seArr: '\u21D8', + searr: '\u2198', + searrow: '\u2198', + sect: '\u00A7', + semi: '\u003B', + seswar: '\u2929', + setminus: '\u2216', + setmn: '\u2216', + sext: '\u2736', + Sfr: '\uD835\uDD16', + sfr: '\uD835\uDD30', + sfrown: '\u2322', + sharp: '\u266F', + SHCHcy: '\u0429', + shchcy: '\u0449', + SHcy: '\u0428', + shcy: '\u0448', + ShortDownArrow: '\u2193', + ShortLeftArrow: '\u2190', + shortmid: '\u2223', + shortparallel: '\u2225', + ShortRightArrow: '\u2192', + ShortUpArrow: '\u2191', + shy: '\u00AD', + Sigma: '\u03A3', + sigma: '\u03C3', + sigmaf: '\u03C2', + sigmav: '\u03C2', + sim: '\u223C', + simdot: '\u2A6A', + sime: '\u2243', + simeq: '\u2243', + simg: '\u2A9E', + simgE: '\u2AA0', + siml: '\u2A9D', + simlE: '\u2A9F', + simne: '\u2246', + simplus: '\u2A24', + simrarr: '\u2972', + slarr: '\u2190', + SmallCircle: '\u2218', + smallsetminus: '\u2216', + smashp: '\u2A33', + smeparsl: '\u29E4', + smid: '\u2223', + smile: '\u2323', + smt: '\u2AAA', + smte: '\u2AAC', + smtes: '\u2AAC\uFE00', + SOFTcy: '\u042C', + softcy: '\u044C', + sol: '\u002F', + solb: '\u29C4', + solbar: '\u233F', + Sopf: '\uD835\uDD4A', + sopf: '\uD835\uDD64', + spades: '\u2660', + spadesuit: '\u2660', + spar: '\u2225', + sqcap: '\u2293', + sqcaps: '\u2293\uFE00', + sqcup: '\u2294', + sqcups: '\u2294\uFE00', + Sqrt: '\u221A', + sqsub: '\u228F', + sqsube: '\u2291', + sqsubset: '\u228F', + sqsubseteq: '\u2291', + sqsup: '\u2290', + sqsupe: '\u2292', + sqsupset: '\u2290', + sqsupseteq: '\u2292', + squ: '\u25A1', + Square: '\u25A1', + square: '\u25A1', + SquareIntersection: '\u2293', + SquareSubset: '\u228F', + SquareSubsetEqual: '\u2291', + SquareSuperset: '\u2290', + SquareSupersetEqual: '\u2292', + SquareUnion: '\u2294', + squarf: '\u25AA', + squf: '\u25AA', + srarr: '\u2192', + Sscr: '\uD835\uDCAE', + sscr: '\uD835\uDCC8', + ssetmn: '\u2216', + ssmile: '\u2323', + sstarf: '\u22C6', + Star: '\u22C6', + star: '\u2606', + starf: '\u2605', + straightepsilon: '\u03F5', + straightphi: '\u03D5', + strns: '\u00AF', + Sub: '\u22D0', + sub: '\u2282', + subdot: '\u2ABD', + subE: '\u2AC5', + sube: '\u2286', + subedot: '\u2AC3', + submult: '\u2AC1', + subnE: '\u2ACB', + subne: '\u228A', + subplus: '\u2ABF', + subrarr: '\u2979', + Subset: '\u22D0', + subset: '\u2282', + subseteq: '\u2286', + subseteqq: '\u2AC5', + SubsetEqual: '\u2286', + subsetneq: '\u228A', + subsetneqq: '\u2ACB', + subsim: '\u2AC7', + subsub: '\u2AD5', + subsup: '\u2AD3', + succ: '\u227B', + succapprox: '\u2AB8', + succcurlyeq: '\u227D', + Succeeds: '\u227B', + SucceedsEqual: '\u2AB0', + SucceedsSlantEqual: '\u227D', + SucceedsTilde: '\u227F', + succeq: '\u2AB0', + succnapprox: '\u2ABA', + succneqq: '\u2AB6', + succnsim: '\u22E9', + succsim: '\u227F', + SuchThat: '\u220B', + Sum: '\u2211', + sum: '\u2211', + sung: '\u266A', + Sup: '\u22D1', + sup: '\u2283', + sup1: '\u00B9', + sup2: '\u00B2', + sup3: '\u00B3', + supdot: '\u2ABE', + supdsub: '\u2AD8', + supE: '\u2AC6', + supe: '\u2287', + supedot: '\u2AC4', + Superset: '\u2283', + SupersetEqual: '\u2287', + suphsol: '\u27C9', + suphsub: '\u2AD7', + suplarr: '\u297B', + supmult: '\u2AC2', + supnE: '\u2ACC', + supne: '\u228B', + supplus: '\u2AC0', + Supset: '\u22D1', + supset: '\u2283', + supseteq: '\u2287', + supseteqq: '\u2AC6', + supsetneq: '\u228B', + supsetneqq: '\u2ACC', + supsim: '\u2AC8', + supsub: '\u2AD4', + supsup: '\u2AD6', + swarhk: '\u2926', + swArr: '\u21D9', + swarr: '\u2199', + swarrow: '\u2199', + swnwar: '\u292A', + szlig: '\u00DF', + Tab: '\u0009', + target: '\u2316', + Tau: '\u03A4', + tau: '\u03C4', + tbrk: '\u23B4', + Tcaron: '\u0164', + tcaron: '\u0165', + Tcedil: '\u0162', + tcedil: '\u0163', + Tcy: '\u0422', + tcy: '\u0442', + tdot: '\u20DB', + telrec: '\u2315', + Tfr: '\uD835\uDD17', + tfr: '\uD835\uDD31', + there4: '\u2234', + Therefore: '\u2234', + therefore: '\u2234', + Theta: '\u0398', + theta: '\u03B8', + thetasym: '\u03D1', + thetav: '\u03D1', + thickapprox: '\u2248', + thicksim: '\u223C', + ThickSpace: '\u205F\u200A', + thinsp: '\u2009', + ThinSpace: '\u2009', + thkap: '\u2248', + thksim: '\u223C', + THORN: '\u00DE', + thorn: '\u00FE', + Tilde: '\u223C', + tilde: '\u02DC', + TildeEqual: '\u2243', + TildeFullEqual: '\u2245', + TildeTilde: '\u2248', + times: '\u00D7', + timesb: '\u22A0', + timesbar: '\u2A31', + timesd: '\u2A30', + tint: '\u222D', + toea: '\u2928', + top: '\u22A4', + topbot: '\u2336', + topcir: '\u2AF1', + Topf: '\uD835\uDD4B', + topf: '\uD835\uDD65', + topfork: '\u2ADA', + tosa: '\u2929', + tprime: '\u2034', + TRADE: '\u2122', + trade: '\u2122', + triangle: '\u25B5', + triangledown: '\u25BF', + triangleleft: '\u25C3', + trianglelefteq: '\u22B4', + triangleq: '\u225C', + triangleright: '\u25B9', + trianglerighteq: '\u22B5', + tridot: '\u25EC', + trie: '\u225C', + triminus: '\u2A3A', + TripleDot: '\u20DB', + triplus: '\u2A39', + trisb: '\u29CD', + tritime: '\u2A3B', + trpezium: '\u23E2', + Tscr: '\uD835\uDCAF', + tscr: '\uD835\uDCC9', + TScy: '\u0426', + tscy: '\u0446', + TSHcy: '\u040B', + tshcy: '\u045B', + Tstrok: '\u0166', + tstrok: '\u0167', + twixt: '\u226C', + twoheadleftarrow: '\u219E', + twoheadrightarrow: '\u21A0', + Uacute: '\u00DA', + uacute: '\u00FA', + Uarr: '\u219F', + uArr: '\u21D1', + uarr: '\u2191', + Uarrocir: '\u2949', + Ubrcy: '\u040E', + ubrcy: '\u045E', + Ubreve: '\u016C', + ubreve: '\u016D', + Ucirc: '\u00DB', + ucirc: '\u00FB', + Ucy: '\u0423', + ucy: '\u0443', + udarr: '\u21C5', + Udblac: '\u0170', + udblac: '\u0171', + udhar: '\u296E', + ufisht: '\u297E', + Ufr: '\uD835\uDD18', + ufr: '\uD835\uDD32', + Ugrave: '\u00D9', + ugrave: '\u00F9', + uHar: '\u2963', + uharl: '\u21BF', + uharr: '\u21BE', + uhblk: '\u2580', + ulcorn: '\u231C', + ulcorner: '\u231C', + ulcrop: '\u230F', + ultri: '\u25F8', + Umacr: '\u016A', + umacr: '\u016B', + uml: '\u00A8', + UnderBar: '\u005F', + UnderBrace: '\u23DF', + UnderBracket: '\u23B5', + UnderParenthesis: '\u23DD', + Union: '\u22C3', + UnionPlus: '\u228E', + Uogon: '\u0172', + uogon: '\u0173', + Uopf: '\uD835\uDD4C', + uopf: '\uD835\uDD66', + UpArrow: '\u2191', + Uparrow: '\u21D1', + uparrow: '\u2191', + UpArrowBar: '\u2912', + UpArrowDownArrow: '\u21C5', + UpDownArrow: '\u2195', + Updownarrow: '\u21D5', + updownarrow: '\u2195', + UpEquilibrium: '\u296E', + upharpoonleft: '\u21BF', + upharpoonright: '\u21BE', + uplus: '\u228E', + UpperLeftArrow: '\u2196', + UpperRightArrow: '\u2197', + Upsi: '\u03D2', + upsi: '\u03C5', + upsih: '\u03D2', + Upsilon: '\u03A5', + upsilon: '\u03C5', + UpTee: '\u22A5', + UpTeeArrow: '\u21A5', + upuparrows: '\u21C8', + urcorn: '\u231D', + urcorner: '\u231D', + urcrop: '\u230E', + Uring: '\u016E', + uring: '\u016F', + urtri: '\u25F9', + Uscr: '\uD835\uDCB0', + uscr: '\uD835\uDCCA', + utdot: '\u22F0', + Utilde: '\u0168', + utilde: '\u0169', + utri: '\u25B5', + utrif: '\u25B4', + uuarr: '\u21C8', + Uuml: '\u00DC', + uuml: '\u00FC', + uwangle: '\u29A7', + vangrt: '\u299C', + varepsilon: '\u03F5', + varkappa: '\u03F0', + varnothing: '\u2205', + varphi: '\u03D5', + varpi: '\u03D6', + varpropto: '\u221D', + vArr: '\u21D5', + varr: '\u2195', + varrho: '\u03F1', + varsigma: '\u03C2', + varsubsetneq: '\u228A\uFE00', + varsubsetneqq: '\u2ACB\uFE00', + varsupsetneq: '\u228B\uFE00', + varsupsetneqq: '\u2ACC\uFE00', + vartheta: '\u03D1', + vartriangleleft: '\u22B2', + vartriangleright: '\u22B3', + Vbar: '\u2AEB', + vBar: '\u2AE8', + vBarv: '\u2AE9', + Vcy: '\u0412', + vcy: '\u0432', + VDash: '\u22AB', + Vdash: '\u22A9', + vDash: '\u22A8', + vdash: '\u22A2', + Vdashl: '\u2AE6', + Vee: '\u22C1', + vee: '\u2228', + veebar: '\u22BB', + veeeq: '\u225A', + vellip: '\u22EE', + Verbar: '\u2016', + verbar: '\u007C', + Vert: '\u2016', + vert: '\u007C', + VerticalBar: '\u2223', + VerticalLine: '\u007C', + VerticalSeparator: '\u2758', + VerticalTilde: '\u2240', + VeryThinSpace: '\u200A', + Vfr: '\uD835\uDD19', + vfr: '\uD835\uDD33', + vltri: '\u22B2', + vnsub: '\u2282\u20D2', + vnsup: '\u2283\u20D2', + Vopf: '\uD835\uDD4D', + vopf: '\uD835\uDD67', + vprop: '\u221D', + vrtri: '\u22B3', + Vscr: '\uD835\uDCB1', + vscr: '\uD835\uDCCB', + vsubnE: '\u2ACB\uFE00', + vsubne: '\u228A\uFE00', + vsupnE: '\u2ACC\uFE00', + vsupne: '\u228B\uFE00', + Vvdash: '\u22AA', + vzigzag: '\u299A', + Wcirc: '\u0174', + wcirc: '\u0175', + wedbar: '\u2A5F', + Wedge: '\u22C0', + wedge: '\u2227', + wedgeq: '\u2259', + weierp: '\u2118', + Wfr: '\uD835\uDD1A', + wfr: '\uD835\uDD34', + Wopf: '\uD835\uDD4E', + wopf: '\uD835\uDD68', + wp: '\u2118', + wr: '\u2240', + wreath: '\u2240', + Wscr: '\uD835\uDCB2', + wscr: '\uD835\uDCCC', + xcap: '\u22C2', + xcirc: '\u25EF', + xcup: '\u22C3', + xdtri: '\u25BD', + Xfr: '\uD835\uDD1B', + xfr: '\uD835\uDD35', + xhArr: '\u27FA', + xharr: '\u27F7', + Xi: '\u039E', + xi: '\u03BE', + xlArr: '\u27F8', + xlarr: '\u27F5', + xmap: '\u27FC', + xnis: '\u22FB', + xodot: '\u2A00', + Xopf: '\uD835\uDD4F', + xopf: '\uD835\uDD69', + xoplus: '\u2A01', + xotime: '\u2A02', + xrArr: '\u27F9', + xrarr: '\u27F6', + Xscr: '\uD835\uDCB3', + xscr: '\uD835\uDCCD', + xsqcup: '\u2A06', + xuplus: '\u2A04', + xutri: '\u25B3', + xvee: '\u22C1', + xwedge: '\u22C0', + Yacute: '\u00DD', + yacute: '\u00FD', + YAcy: '\u042F', + yacy: '\u044F', + Ycirc: '\u0176', + ycirc: '\u0177', + Ycy: '\u042B', + ycy: '\u044B', + yen: '\u00A5', + Yfr: '\uD835\uDD1C', + yfr: '\uD835\uDD36', + YIcy: '\u0407', + yicy: '\u0457', + Yopf: '\uD835\uDD50', + yopf: '\uD835\uDD6A', + Yscr: '\uD835\uDCB4', + yscr: '\uD835\uDCCE', + YUcy: '\u042E', + yucy: '\u044E', + Yuml: '\u0178', + yuml: '\u00FF', + Zacute: '\u0179', + zacute: '\u017A', + Zcaron: '\u017D', + zcaron: '\u017E', + Zcy: '\u0417', + zcy: '\u0437', + Zdot: '\u017B', + zdot: '\u017C', + zeetrf: '\u2128', + ZeroWidthSpace: '\u200B', + Zeta: '\u0396', + zeta: '\u03B6', + Zfr: '\u2128', + zfr: '\uD835\uDD37', + ZHcy: '\u0416', + zhcy: '\u0436', + zigrarr: '\u21DD', + Zopf: '\u2124', + zopf: '\uD835\uDD6B', + Zscr: '\uD835\uDCB5', + zscr: '\uD835\uDCCF', + zwj: '\u200D', + zwnj: '\u200C', +}); + +/** + * @deprecated + * Use `HTML_ENTITIES` instead. + * @see {@link HTML_ENTITIES} + */ +exports.entityMap = exports.HTML_ENTITIES; + +},{"./conventions":2}],6:[function(require,module,exports){ +'use strict'; + +var conventions = require('./conventions'); + +function extendError(constructor, writableName) { + constructor.prototype = Object.create(Error.prototype, { + constructor: { value: constructor }, + name: { value: constructor.name, enumerable: true, writable: writableName }, + }); +} + +var DOMExceptionName = conventions.freeze({ + /** + * the default value as defined by the spec + */ + Error: 'Error', + /** + * @deprecated + * Use RangeError instead. + */ + IndexSizeError: 'IndexSizeError', + /** + * @deprecated + * Just to match the related static code, not part of the spec. + */ + DomstringSizeError: 'DomstringSizeError', + HierarchyRequestError: 'HierarchyRequestError', + WrongDocumentError: 'WrongDocumentError', + InvalidCharacterError: 'InvalidCharacterError', + /** + * @deprecated + * Just to match the related static code, not part of the spec. + */ + NoDataAllowedError: 'NoDataAllowedError', + NoModificationAllowedError: 'NoModificationAllowedError', + NotFoundError: 'NotFoundError', + NotSupportedError: 'NotSupportedError', + InUseAttributeError: 'InUseAttributeError', + InvalidStateError: 'InvalidStateError', + SyntaxError: 'SyntaxError', + InvalidModificationError: 'InvalidModificationError', + NamespaceError: 'NamespaceError', + /** + * @deprecated + * Use TypeError for invalid arguments, + * "NotSupportedError" DOMException for unsupported operations, + * and "NotAllowedError" DOMException for denied requests instead. + */ + InvalidAccessError: 'InvalidAccessError', + /** + * @deprecated + * Just to match the related static code, not part of the spec. + */ + ValidationError: 'ValidationError', + /** + * @deprecated + * Use TypeError instead. + */ + TypeMismatchError: 'TypeMismatchError', + SecurityError: 'SecurityError', + NetworkError: 'NetworkError', + AbortError: 'AbortError', + /** + * @deprecated + * Just to match the related static code, not part of the spec. + */ + URLMismatchError: 'URLMismatchError', + QuotaExceededError: 'QuotaExceededError', + TimeoutError: 'TimeoutError', + InvalidNodeTypeError: 'InvalidNodeTypeError', + DataCloneError: 'DataCloneError', + EncodingError: 'EncodingError', + NotReadableError: 'NotReadableError', + UnknownError: 'UnknownError', + ConstraintError: 'ConstraintError', + DataError: 'DataError', + TransactionInactiveError: 'TransactionInactiveError', + ReadOnlyError: 'ReadOnlyError', + VersionError: 'VersionError', + OperationError: 'OperationError', + NotAllowedError: 'NotAllowedError', + OptOutError: 'OptOutError', +}); +var DOMExceptionNames = Object.keys(DOMExceptionName); + +function isValidDomExceptionCode(value) { + return typeof value === 'number' && value >= 1 && value <= 25; +} +function endsWithError(value) { + return typeof value === 'string' && value.substring(value.length - DOMExceptionName.Error.length) === DOMExceptionName.Error; +} +/** + * DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation + * is impossible to perform (either for logical reasons, because data is lost, or because the + * implementation has become unstable). In general, DOM methods return specific error values in + * ordinary processing situations, such as out-of-bound errors when using NodeList. + * + * Implementations should raise other exceptions under other circumstances. For example, + * implementations should raise an implementation-dependent exception if a null argument is + * passed when null was not expected. + * + * This implementation supports the following usages: + * 1. according to the living standard (both arguments are optional): + * ``` + * new DOMException("message (can be empty)", DOMExceptionNames.HierarchyRequestError) + * ``` + * 2. according to previous xmldom implementation (only the first argument is required): + * ``` + * new DOMException(DOMException.HIERARCHY_REQUEST_ERR, "optional message") + * ``` + * both result in the proper name being set. + * + * @class DOMException + * @param {number | string} messageOrCode + * The reason why an operation is not acceptable. + * If it is a number, it is used to determine the `name`, see + * {@link https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-258A00AF ExceptionCode} + * @param {string | keyof typeof DOMExceptionName | Error} [nameOrMessage] + * The `name` to use for the error. + * If `messageOrCode` is a number, this arguments is used as the `message` instead. + * @augments Error + * @see https://webidl.spec.whatwg.org/#idl-DOMException + * @see https://webidl.spec.whatwg.org/#dfn-error-names-table + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-17189187 + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html + * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html + */ +function DOMException(messageOrCode, nameOrMessage) { + // support old way of passing arguments: first argument is a valid number + if (isValidDomExceptionCode(messageOrCode)) { + this.name = DOMExceptionNames[messageOrCode]; + this.message = nameOrMessage || ''; + } else { + this.message = messageOrCode; + this.name = endsWithError(nameOrMessage) ? nameOrMessage : DOMExceptionName.Error; + } + if (Error.captureStackTrace) Error.captureStackTrace(this, DOMException); +} +extendError(DOMException, true); +Object.defineProperties(DOMException.prototype, { + code: { + enumerable: true, + get: function () { + var code = DOMExceptionNames.indexOf(this.name); + if (isValidDomExceptionCode(code)) return code; + return 0; + }, + }, +}); + +var ExceptionCode = { + INDEX_SIZE_ERR: 1, + DOMSTRING_SIZE_ERR: 2, + HIERARCHY_REQUEST_ERR: 3, + WRONG_DOCUMENT_ERR: 4, + INVALID_CHARACTER_ERR: 5, + NO_DATA_ALLOWED_ERR: 6, + NO_MODIFICATION_ALLOWED_ERR: 7, + NOT_FOUND_ERR: 8, + NOT_SUPPORTED_ERR: 9, + INUSE_ATTRIBUTE_ERR: 10, + INVALID_STATE_ERR: 11, + SYNTAX_ERR: 12, + INVALID_MODIFICATION_ERR: 13, + NAMESPACE_ERR: 14, + INVALID_ACCESS_ERR: 15, + VALIDATION_ERR: 16, + TYPE_MISMATCH_ERR: 17, + SECURITY_ERR: 18, + NETWORK_ERR: 19, + ABORT_ERR: 20, + URL_MISMATCH_ERR: 21, + QUOTA_EXCEEDED_ERR: 22, + TIMEOUT_ERR: 23, + INVALID_NODE_TYPE_ERR: 24, + DATA_CLONE_ERR: 25, +}; + +var entries = Object.entries(ExceptionCode); +for (var i = 0; i < entries.length; i++) { + var key = entries[i][0]; + DOMException[key] = entries[i][1]; +} + +/** + * Creates an error that will not be caught by XMLReader aka the SAX parser. + * + * @class + * @param {string} message + * @param {any} [locator] + */ +function ParseError(message, locator) { + this.message = message; + this.locator = locator; + if (Error.captureStackTrace) Error.captureStackTrace(this, ParseError); +} +extendError(ParseError); + +exports.DOMException = DOMException; +exports.DOMExceptionName = DOMExceptionName; +exports.ExceptionCode = ExceptionCode; +exports.ParseError = ParseError; + +},{"./conventions":2}],7:[function(require,module,exports){ +'use strict'; + +/** + * Detects relevant unicode support for regular expressions in the runtime. + * Should the runtime not accepts the flag `u` or unicode ranges, + * character classes without unicode handling will be used. + * + * @param {typeof RegExp} [RegExpImpl=RegExp] + * For testing: the RegExp class. + * @returns {boolean} + * @see https://node.green/#ES2015-syntax-RegExp--y--and--u--flags + */ +function detectUnicodeSupport(RegExpImpl) { + try { + if (typeof RegExpImpl !== 'function') { + RegExpImpl = RegExp; + } + // eslint-disable-next-line es5/no-unicode-regex,es5/no-unicode-code-point-escape + var match = new RegExpImpl('\u{1d306}', 'u').exec('𝌆'); + return !!match && match[0].length === 2; + } catch (error) {} + return false; +} +var UNICODE_SUPPORT = detectUnicodeSupport(); + +/** + * Removes `[`, `]` and any trailing quantifiers from the source of a RegExp. + * + * @param {RegExp} regexp + */ +function chars(regexp) { + if (regexp.source[0] !== '[') { + throw new Error(regexp + ' can not be used with chars'); + } + return regexp.source.slice(1, regexp.source.lastIndexOf(']')); +} + +/** + * Creates a new character list regular expression, + * by removing `search` from the source of `regexp`. + * + * @param {RegExp} regexp + * @param {string} search + * The character(s) to remove. + * @returns {RegExp} + */ +function chars_without(regexp, search) { + if (regexp.source[0] !== '[') { + throw new Error('/' + regexp.source + '/ can not be used with chars_without'); + } + if (!search || typeof search !== 'string') { + throw new Error(JSON.stringify(search) + ' is not a valid search'); + } + if (regexp.source.indexOf(search) === -1) { + throw new Error('"' + search + '" is not is /' + regexp.source + '/'); + } + if (search === '-' && regexp.source.indexOf(search) !== 1) { + throw new Error('"' + search + '" is not at the first postion of /' + regexp.source + '/'); + } + return new RegExp(regexp.source.replace(search, ''), UNICODE_SUPPORT ? 'u' : ''); +} + +/** + * Combines and Regular expressions correctly by using `RegExp.source`. + * + * @param {...(RegExp | string)[]} args + * @returns {RegExp} + */ +function reg(args) { + var self = this; + return new RegExp( + Array.prototype.slice + .call(arguments) + .map(function (part) { + var isStr = typeof part === 'string'; + if (isStr && self === undefined && part === '|') { + throw new Error('use regg instead of reg to wrap expressions with `|`!'); + } + return isStr ? part : part.source; + }) + .join(''), + UNICODE_SUPPORT ? 'mu' : 'm' + ); +} + +/** + * Like `reg` but wraps the expression in `(?:`,`)` to create a non tracking group. + * + * @param {...(RegExp | string)[]} args + * @returns {RegExp} + */ +function regg(args) { + if (arguments.length === 0) { + throw new Error('no parameters provided'); + } + return reg.apply(regg, ['(?:'].concat(Array.prototype.slice.call(arguments), [')'])); +} + +// /** +// * Append ^ to the beginning of the expression. +// * @param {...(RegExp | string)[]} args +// * @returns {RegExp} +// */ +// function reg_start(args) { +// if (arguments.length === 0) { +// throw new Error('no parameters provided'); +// } +// return reg.apply(reg_start, ['^'].concat(Array.prototype.slice.call(arguments))); +// } + +// https://www.w3.org/TR/xml/#document +// `[1] document ::= prolog element Misc*` +// https://www.w3.org/TR/xml11/#NT-document +// `[1] document ::= ( prolog element Misc* ) - ( Char* RestrictedChar Char* )` + +/** + * A character usually appearing in wrongly converted strings. + * + * @type {string} + * @see https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character + * @see https://nodejs.dev/en/api/v18/buffer/#buffers-and-character-encodings + * @see https://www.unicode.org/faq/utf_bom.html#BOM + * @readonly + */ +var UNICODE_REPLACEMENT_CHARACTER = '\uFFFD'; +// https://www.w3.org/TR/xml/#NT-Char +// any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. +// `[2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]` +// https://www.w3.org/TR/xml11/#NT-Char +// `[2] Char ::= [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]` +// https://www.w3.org/TR/xml11/#NT-RestrictedChar +// `[2a] RestrictedChar ::= [#x1-#x8] | [#xB-#xC] | [#xE-#x1F] | [#x7F-#x84] | [#x86-#x9F]` +// https://www.w3.org/TR/xml11/#charsets +var Char = /[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/; // without \u10000-\uEFFFF +if (UNICODE_SUPPORT) { + // eslint-disable-next-line es5/no-unicode-code-point-escape + Char = reg('[', chars(Char), '\\u{10000}-\\u{10FFFF}', ']'); +} +// Negation of Char: matches any character that is NOT a valid XML 1.0 Char. +// Derived directly from the Char character class above (after the unicode-support extension). +// XML 1.0 Char production [2]: #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] +// @see https://www.w3.org/TR/xml/#NT-Char +var InvalidChar = new RegExp('[^' + chars(Char) + ']', UNICODE_SUPPORT ? 'u' : ''); + +var _SChar = /[\x20\x09\x0D\x0A]/; +var SChar_s = chars(_SChar); +// https://www.w3.org/TR/xml11/#NT-S +// `[3] S ::= (#x20 | #x9 | #xD | #xA)+` +var S = reg(_SChar, '+'); +// optional whitespace described as `S?` in the grammar, +// simplified to 0-n occurrences of the character class +// instead of 0-1 occurrences of a non-capturing group around S +var S_OPT = reg(_SChar, '*'); + +// https://www.w3.org/TR/xml11/#NT-NameStartChar +// `[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]` +var NameStartChar = + /[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; // without \u10000-\uEFFFF +if (UNICODE_SUPPORT) { + // eslint-disable-next-line es5/no-unicode-code-point-escape + NameStartChar = reg('[', chars(NameStartChar), '\\u{10000}-\\u{10FFFF}', ']'); +} +var NameStartChar_s = chars(NameStartChar); + +// https://www.w3.org/TR/xml11/#NT-NameChar +// `[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]` +var NameChar = reg('[', NameStartChar_s, chars(/[-.0-9\xB7]/), chars(/[\u0300-\u036F\u203F-\u2040]/), ']'); +// https://www.w3.org/TR/xml11/#NT-Name +// `[5] Name ::= NameStartChar (NameChar)*` +var Name = reg(NameStartChar, NameChar, '*'); +/* +https://www.w3.org/TR/xml11/#NT-Names +`[6] Names ::= Name (#x20 Name)*` +*/ + +// https://www.w3.org/TR/xml11/#NT-Nmtoken +// `[7] Nmtoken ::= (NameChar)+` +var Nmtoken = reg(NameChar, '+'); +/* +https://www.w3.org/TR/xml11/#NT-Nmtokens +`[8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*` +var Nmtokens = reg(Nmtoken, regg(/\x20/, Nmtoken), '*'); +*/ + +// https://www.w3.org/TR/xml11/#NT-EntityRef +// `[68] EntityRef ::= '&' Name ';'` [WFC: Entity Declared] [VC: Entity Declared] [WFC: Parsed Entity] [WFC: No Recursion] +var EntityRef = reg('&', Name, ';'); +// https://www.w3.org/TR/xml11/#NT-CharRef +// `[66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'` [WFC: Legal Character] +var CharRef = regg(/&#[0-9]+;|&#x[0-9a-fA-F]+;/); + +/* +https://www.w3.org/TR/xml11/#NT-Reference +- `[67] Reference ::= EntityRef | CharRef` +- `[66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'` [WFC: Legal Character] +- `[68] EntityRef ::= '&' Name ';'` [WFC: Entity Declared] [VC: Entity Declared] [WFC: Parsed Entity] [WFC: No Recursion] +*/ +var Reference = regg(EntityRef, '|', CharRef); + +// https://www.w3.org/TR/xml11/#NT-PEReference +// `[69] PEReference ::= '%' Name ';'` +// [VC: Entity Declared] [WFC: No Recursion] [WFC: In DTD] +var PEReference = reg('%', Name, ';'); + +// https://www.w3.org/TR/xml11/#NT-EntityValue +// `[9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' | "'" ([^%&'] | PEReference | Reference)* "'"` +var EntityValue = regg( + reg('"', regg(/[^%&"]/, '|', PEReference, '|', Reference), '*', '"'), + '|', + reg("'", regg(/[^%&']/, '|', PEReference, '|', Reference), '*', "'") +); + +// https://www.w3.org/TR/xml11/#NT-AttValue +// `[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"` +var AttValue = regg('"', regg(/[^<&"]/, '|', Reference), '*', '"', '|', "'", regg(/[^<&']/, '|', Reference), '*', "'"); + +// https://www.w3.org/TR/xml-names/#ns-decl +// https://www.w3.org/TR/xml-names/#ns-qualnames +// NameStartChar without ":" +var NCNameStartChar = chars_without(NameStartChar, ':'); +// https://www.w3.org/TR/xml-names/#orphans +// `[5] NCNameChar ::= NameChar - ':'` +// An XML NameChar, minus the ":" +var NCNameChar = chars_without(NameChar, ':'); +// https://www.w3.org/TR/xml-names/#NT-NCName +// `[4] NCName ::= Name - (Char* ':' Char*)` +// An XML Name, minus the ":" +var NCName = reg(NCNameStartChar, NCNameChar, '*'); + +/** +https://www.w3.org/TR/xml-names/#ns-qualnames + +``` +[7] QName ::= PrefixedName | UnprefixedName + === (NCName ':' NCName) | NCName + === NCName (':' NCName)? +[8] PrefixedName ::= Prefix ':' LocalPart + === NCName ':' NCName +[9] UnprefixedName ::= LocalPart + === NCName +[10] Prefix ::= NCName +[11] LocalPart ::= NCName +``` +*/ +var QName = reg(NCName, regg(':', NCName), '?'); +var QName_exact = reg('^', QName, '$'); +var QName_group = reg('(', QName, ')'); + +// https://www.w3.org/TR/xml11/#NT-SystemLiteral +// `[11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")` +var SystemLiteral = regg(/"[^"]*"|'[^']*'/); + +/* + https://www.w3.org/TR/xml11/#NT-PI + ``` + [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) + [16] PI ::= '' Char*)))? '?>' + ``` + target /xml/i is not excluded! +*/ +var PI = reg(/^<\?/, '(', Name, ')', regg(S, '(', Char, '*?)'), '?', /\?>/); + +// https://www.w3.org/TR/xml11/#NT-PubidChar +// `[13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]` +var PubidChar = /[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/; + +// https://www.w3.org/TR/xml11/#NT-PubidLiteral +// `[12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"` +var PubidLiteral = regg('"', PubidChar, '*"', '|', "'", chars_without(PubidChar, "'"), "*'"); + +// https://www.w3.org/TR/xml11/#NT-CharData +// `[14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)` + +var COMMENT_START = ''; +// https://www.w3.org/TR/xml11/#NT-Comment +// `[15] Comment ::= ''` +var Comment = reg(COMMENT_START, regg(chars_without(Char, '-'), '|', reg('-', chars_without(Char, '-'))), '*', COMMENT_END); + +var PCDATA = '#PCDATA'; +// https://www.w3.org/TR/xml11/#NT-Mixed +// `[51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' | '(' S? '#PCDATA' S? ')'` +// https://www.w3.org/TR/xml-names/#NT-Mixed +// `[51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? QName)* S? ')*' | '(' S? '#PCDATA' S? ')'` +// [VC: Proper Group/PE Nesting] [VC: No Duplicate Types] +var Mixed = regg( + reg(/\(/, S_OPT, PCDATA, regg(S_OPT, /\|/, S_OPT, QName), '*', S_OPT, /\)\*/), + '|', + reg(/\(/, S_OPT, PCDATA, S_OPT, /\)/) +); + +var _children_quantity = /[?*+]?/; +/* + `[49] choice ::= '(' S? cp ( S? '|' S? cp )+ S? ')'` [VC: Proper Group/PE Nesting] + `[50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'` [VC: Proper Group/PE Nesting] + simplification to solve circular referencing, but doesn't check validity constraint "Proper Group/PE Nesting" + var _choice_or_seq = reg('[', NameChar_s, SChar_s, chars(_children_quantity), '()|,]*'); + ``` + [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')? + === (Name | '(' S? cp ( S? '|' S? cp )+ S? ')' | '(' S? cp ( S? ',' S? cp )* S? ')') ('?' | '*' | '+')? + !== (Name | [_choice_or_seq]*) ('?' | '*' | '+')? + ``` + simplification to solve circular referencing, but doesn't check validity constraint "Proper Group/PE Nesting" + var cp = reg(regg(Name, '|', _choice_or_seq), _children_quantity); +*/ +/* +Inefficient regular expression (High) +This part of the regular expression may cause exponential backtracking on strings starting with '(|' and containing many repetitions of '|'. +https://github.com/xmldom/xmldom/security/code-scanning/91 +var choice = regg(/\(/, S_OPT, cp, regg(S_OPT, /\|/, S_OPT, cp), '+', S_OPT, /\)/); +*/ +/* +Inefficient regular expression (High) +This part of the regular expression may cause exponential backtracking on strings starting with '(,' and containing many repetitions of ','. +https://github.com/xmldom/xmldom/security/code-scanning/92 +var seq = regg(/\(/, S_OPT, cp, regg(S_OPT, /,/, S_OPT, cp), '*', S_OPT, /\)/); +*/ + +// `[47] children ::= (choice | seq) ('?' | '*' | '+')?` +// simplification to solve circular referencing, but doesn't check validity constraint "Proper Group/PE Nesting" +var children = reg(/\([^>]+\)/, _children_quantity /*regg(choice, '|', seq), _children_quantity*/); + +// https://www.w3.org/TR/xml11/#NT-contentspec +// `[46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children` +var contentspec = regg('EMPTY', '|', 'ANY', '|', Mixed, '|', children); + +var ELEMENTDECL_START = ''` +// https://www.w3.org/TR/xml-names/#NT-elementdecl +// `[17] elementdecl ::= ''` +// because of https://www.w3.org/TR/xml11/#NT-PEReference +// since xmldom is not supporting replacements of PEReferences in the DTD +// this also supports PEReference in the possible places +var elementdecl = reg(ELEMENTDECL_START, S, regg(QName, '|', PEReference), S, regg(contentspec, '|', PEReference), S_OPT, '>'); + +// https://www.w3.org/TR/xml11/#NT-NotationType +// `[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'` +// [VC: Notation Attributes] [VC: One Notation Per Element Type] [VC: No Notation on Empty Element] [VC: No Duplicate Tokens] +var NotationType = reg('NOTATION', S, /\(/, S_OPT, Name, regg(S_OPT, /\|/, S_OPT, Name), '*', S_OPT, /\)/); +// https://www.w3.org/TR/xml11/#NT-Enumeration +// `[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')'` +// [VC: Enumeration] [VC: No Duplicate Tokens] +var Enumeration = reg(/\(/, S_OPT, Nmtoken, regg(S_OPT, /\|/, S_OPT, Nmtoken), '*', S_OPT, /\)/); + +// https://www.w3.org/TR/xml11/#NT-EnumeratedType +// `[57] EnumeratedType ::= NotationType | Enumeration` +var EnumeratedType = regg(NotationType, '|', Enumeration); + +/* +``` +[55] StringType ::= 'CDATA' +[56] TokenizedType ::= 'ID' [VC: ID] [VC: One ID per Element Type] [VC: ID Attribute Default] + | 'IDREF' [VC: IDREF] + | 'IDREFS' [VC: IDREF] + | 'ENTITY' [VC: Entity Name] + | 'ENTITIES' [VC: Entity Name] + | 'NMTOKEN' [VC: Name Token] + | 'NMTOKENS' [VC: Name Token] + [54] AttType ::= StringType | TokenizedType | EnumeratedType +```*/ +var AttType = regg(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/, '|', EnumeratedType); + +// `[60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)` +// [WFC: No < in Attribute Values] [WFC: No External Entity References] +// [VC: Fixed Attribute Default] [VC: Required Attribute] [VC: Attribute Default Value Syntactically Correct] +var DefaultDecl = regg(/#REQUIRED|#IMPLIED/, '|', regg(regg('#FIXED', S), '?', AttValue)); + +// https://www.w3.org/TR/xml11/#NT-AttDef +// [53] AttDef ::= S Name S AttType S DefaultDecl +// https://www.w3.org/TR/xml-names/#NT-AttDef +// [1] NSAttName ::= PrefixedAttName | DefaultAttName +// [2] PrefixedAttName ::= 'xmlns:' NCName [NSC: Reserved Prefixes and Namespace Names] +// [3] DefaultAttName ::= 'xmlns' +// [21] AttDef ::= S (QName | NSAttName) S AttType S DefaultDecl +// === S Name S AttType S DefaultDecl +// xmldom is not distinguishing between QName and NSAttName on this level +// to support XML without namespaces in DTD we can not restrict it to QName +var AttDef = regg(S, Name, S, AttType, S, DefaultDecl); + +var ATTLIST_DECL_START = ''` +// https://www.w3.org/TR/xml-names/#NT-AttlistDecl +// `[20] AttlistDecl ::= ''` +// to support XML without namespaces in DTD we can not restrict it to QName +var AttlistDecl = reg(ATTLIST_DECL_START, S, Name, AttDef, '*', S_OPT, '>'); + +// https://html.spec.whatwg.org/multipage/urls-and-fetching.html#about:legacy-compat +var ABOUT_LEGACY_COMPAT = 'about:legacy-compat'; +var ABOUT_LEGACY_COMPAT_SystemLiteral = regg('"' + ABOUT_LEGACY_COMPAT + '"', '|', "'" + ABOUT_LEGACY_COMPAT + "'"); +var SYSTEM = 'SYSTEM'; +var PUBLIC = 'PUBLIC'; +// https://www.w3.org/TR/xml11/#NT-ExternalID +// `[75] ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral` +var ExternalID = regg(regg(SYSTEM, S, SystemLiteral), '|', regg(PUBLIC, S, PubidLiteral, S, SystemLiteral)); +var ExternalID_match = reg( + '^', + regg( + regg(SYSTEM, S, '(?', SystemLiteral, ')'), + '|', + regg(PUBLIC, S, '(?', PubidLiteral, ')', S, '(?', SystemLiteral, ')') + ) +); +// Full-string anchored matcher for requireWellFormed serializer checks +// https://w3c.github.io/DOM-Parsing/#xml-serializing-a-document-node +var PubidLiteral_match = reg('^', PubidLiteral, '$'); +// Full-string anchored matcher for requireWellFormed serializer checks +// https://w3c.github.io/DOM-Parsing/#xml-serializing-a-document-node +var SystemLiteral_match = reg('^', SystemLiteral, '$'); + +// https://www.w3.org/TR/xml11/#NT-NDataDecl +// `[76] NDataDecl ::= S 'NDATA' S Name` [VC: Notation Declared] +var NDataDecl = regg(S, 'NDATA', S, Name); + +// https://www.w3.org/TR/xml11/#NT-EntityDef +// `[73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)` +var EntityDef = regg(EntityValue, '|', regg(ExternalID, NDataDecl, '?')); + +var ENTITY_DECL_START = ''` +var GEDecl = reg(ENTITY_DECL_START, S, Name, S, EntityDef, S_OPT, '>'); +// https://www.w3.org/TR/xml11/#NT-PEDef +// `[74] PEDef ::= EntityValue | ExternalID` +var PEDef = regg(EntityValue, '|', ExternalID); +// https://www.w3.org/TR/xml11/#NT-PEDecl +// `[72] PEDecl ::= ''` +var PEDecl = reg(ENTITY_DECL_START, S, '%', S, Name, S, PEDef, S_OPT, '>'); +// https://www.w3.org/TR/xml11/#NT-EntityDecl +// `[70] EntityDecl ::= GEDecl | PEDecl` +var EntityDecl = regg(GEDecl, '|', PEDecl); + +// https://www.w3.org/TR/xml11/#NT-PublicID +// `[83] PublicID ::= 'PUBLIC' S PubidLiteral` +var PublicID = reg(PUBLIC, S, PubidLiteral); +// https://www.w3.org/TR/xml11/#NT-NotationDecl +// `[82] NotationDecl ::= ''` [VC: Unique Notation Name] +var NotationDecl = reg(''); + +// https://www.w3.org/TR/xml11/#NT-Eq +// `[25] Eq ::= S? '=' S?` +var Eq = reg(S_OPT, '=', S_OPT); +// https://www.w3.org/TR/xml/#NT-VersionNum +// `[26] VersionNum ::= '1.' [0-9]+` +// https://www.w3.org/TR/xml11/#NT-VersionNum +// `[26] VersionNum ::= '1.1'` +var VersionNum = /1[.]\d+/; +// https://www.w3.org/TR/xml11/#NT-VersionInfo +// `[24] VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"')` +var VersionInfo = reg(S, 'version', Eq, regg("'", VersionNum, "'", '|', '"', VersionNum, '"')); +// https://www.w3.org/TR/xml11/#NT-EncName +// `[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*` +var EncName = /[A-Za-z][-A-Za-z0-9._]*/; +// https://www.w3.org/TR/xml11/#NT-EncDecl +// `[80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" )` +var EncodingDecl = regg(S, 'encoding', Eq, regg('"', EncName, '"', '|', "'", EncName, "'")); +// https://www.w3.org/TR/xml11/#NT-SDDecl +// `[32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"'))` +var SDDecl = regg(S, 'standalone', Eq, regg("'", regg('yes', '|', 'no'), "'", '|', '"', regg('yes', '|', 'no'), '"')); +// https://www.w3.org/TR/xml11/#NT-XMLDecl +// [23] XMLDecl ::= '' +var XMLDecl = reg(/^<\?xml/, VersionInfo, EncodingDecl, '?', SDDecl, '?', S_OPT, /\?>/); + +/* + https://www.w3.org/TR/xml/#NT-markupdecl + https://www.w3.org/TR/xml11/#NT-markupdecl + `[29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment` + var markupdecl = regg(elementdecl, '|', AttlistDecl, '|', EntityDecl, '|', NotationDecl, '|', PI_unsafe, '|', Comment); +*/ +/* + https://www.w3.org/TR/xml-names/#NT-doctypedecl +`[28a] DeclSep ::= PEReference | S` + https://www.w3.org/TR/xml11/#NT-intSubset +``` + [28b] intSubset ::= (markupdecl | DeclSep)* + === (markupdecl | PEReference | S)* +``` + [WFC: PE Between Declarations] + var intSubset = reg(regg(markupdecl, '|', PEReference, '|', S), '*'); +*/ +var DOCTYPE_DECL_START = ''` + https://www.afterwardsw3.org/TR/xml-names/#NT-doctypedecl + `[16] doctypedecl ::= ''` + var doctypedecl = reg(''); +*/ + +var CDATA_START = ''; +var CDStart = //; +var CData = reg(Char, '*?', CDEnd); +/* + https://www.w3.org/TR/xml/#dt-cdsection + `[18] CDSect ::= CDStart CData CDEnd` + `[19] CDStart ::= '' Char*))` + `[21] CDEnd ::= ']]>'` +*/ +var CDSect = reg(CDStart, CData); + +// unit tested +exports.chars = chars; +exports.chars_without = chars_without; +exports.detectUnicodeSupport = detectUnicodeSupport; +exports.reg = reg; +exports.regg = regg; +exports.ABOUT_LEGACY_COMPAT = ABOUT_LEGACY_COMPAT; +exports.ABOUT_LEGACY_COMPAT_SystemLiteral = ABOUT_LEGACY_COMPAT_SystemLiteral; +exports.AttlistDecl = AttlistDecl; +exports.CDATA_START = CDATA_START; +exports.CDATA_END = CDATA_END; +exports.CDSect = CDSect; +exports.Char = Char; +exports.Comment = Comment; +exports.COMMENT_START = COMMENT_START; +exports.COMMENT_END = COMMENT_END; +exports.DOCTYPE_DECL_START = DOCTYPE_DECL_START; +exports.elementdecl = elementdecl; +exports.EntityDecl = EntityDecl; +exports.EntityValue = EntityValue; +exports.ExternalID = ExternalID; +exports.ExternalID_match = ExternalID_match; +exports.Name = Name; +exports.NotationDecl = NotationDecl; +exports.Reference = Reference; +exports.PEReference = PEReference; +exports.PI = PI; +exports.PUBLIC = PUBLIC; +exports.PubidLiteral = PubidLiteral; +exports.PubidLiteral_match = PubidLiteral_match; +exports.QName = QName; +exports.QName_exact = QName_exact; +exports.QName_group = QName_group; +exports.S = S; +exports.SChar_s = SChar_s; +exports.S_OPT = S_OPT; +exports.SYSTEM = SYSTEM; +exports.SystemLiteral = SystemLiteral; +exports.SystemLiteral_match = SystemLiteral_match; +exports.InvalidChar = InvalidChar; +exports.UNICODE_REPLACEMENT_CHARACTER = UNICODE_REPLACEMENT_CHARACTER; +exports.UNICODE_SUPPORT = UNICODE_SUPPORT; +exports.XMLDecl = XMLDecl; + +},{}],8:[function(require,module,exports){ +'use strict'; +var conventions = require('./conventions'); +exports.assign = conventions.assign; +exports.hasDefaultHTMLNamespace = conventions.hasDefaultHTMLNamespace; +exports.isHTMLMimeType = conventions.isHTMLMimeType; +exports.isValidMimeType = conventions.isValidMimeType; +exports.MIME_TYPE = conventions.MIME_TYPE; +exports.NAMESPACE = conventions.NAMESPACE; + +var errors = require('./errors'); +exports.DOMException = errors.DOMException; +exports.DOMExceptionName = errors.DOMExceptionName; +exports.ExceptionCode = errors.ExceptionCode; +exports.ParseError = errors.ParseError; + +var dom = require('./dom'); +exports.Attr = dom.Attr; +exports.CDATASection = dom.CDATASection; +exports.CharacterData = dom.CharacterData; +exports.Comment = dom.Comment; +exports.Document = dom.Document; +exports.DocumentFragment = dom.DocumentFragment; +exports.DocumentType = dom.DocumentType; +exports.DOMImplementation = dom.DOMImplementation; +exports.Element = dom.Element; +exports.Entity = dom.Entity; +exports.EntityReference = dom.EntityReference; +exports.LiveNodeList = dom.LiveNodeList; +exports.NamedNodeMap = dom.NamedNodeMap; +exports.Node = dom.Node; +exports.NodeList = dom.NodeList; +exports.Notation = dom.Notation; +exports.ProcessingInstruction = dom.ProcessingInstruction; +exports.Text = dom.Text; +exports.XMLSerializer = dom.XMLSerializer; + +var domParser = require('./dom-parser'); +exports.DOMParser = domParser.DOMParser; +exports.normalizeLineEndings = domParser.normalizeLineEndings; +exports.onErrorStopParsing = domParser.onErrorStopParsing; +exports.onWarningStopParsing = domParser.onWarningStopParsing; + +},{"./conventions":2,"./dom":4,"./dom-parser":3,"./errors":6}],9:[function(require,module,exports){ +'use strict'; + +var conventions = require('./conventions'); +var g = require('./grammar'); +var errors = require('./errors'); + +var isHTMLEscapableRawTextElement = conventions.isHTMLEscapableRawTextElement; +var isHTMLMimeType = conventions.isHTMLMimeType; +var isHTMLRawTextElement = conventions.isHTMLRawTextElement; +var hasOwn = conventions.hasOwn; +var NAMESPACE = conventions.NAMESPACE; +var ParseError = errors.ParseError; +var DOMException = errors.DOMException; + +//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',') + +//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE +//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE +var S_TAG = 0; //tag name offerring +var S_ATTR = 1; //attr name offerring +var S_ATTR_SPACE = 2; //attr name end and space offer +var S_EQ = 3; //=space? +var S_ATTR_NOQUOT_VALUE = 4; //attr value(no quot value only) +var S_ATTR_END = 5; //attr value end and no space(quot end) +var S_TAG_SPACE = 6; //(attr value end || tag end ) && (space offer) +var S_TAG_CLOSE = 7; //closed el + +function XMLReader() {} + +XMLReader.prototype = { + parse: function (source, defaultNSMap, entityMap) { + var domBuilder = this.domBuilder; + domBuilder.startDocument(); + _copy(defaultNSMap, (defaultNSMap = Object.create(null))); + parse(source, defaultNSMap, entityMap, domBuilder, this.errorHandler); + domBuilder.endDocument(); + }, +}; + +/** + * Detecting everything that might be a reference, + * including those without ending `;`, since those are allowed in HTML. + * The entityReplacer takes care of verifying and transforming each occurrence, + * and reports to the errorHandler on those that are not OK, + * depending on the context. + */ +var ENTITY_REG = /&#?\w+;?/g; + +function parse(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) { + var isHTML = isHTMLMimeType(domBuilder.mimeType); + if (source.indexOf(g.UNICODE_REPLACEMENT_CHARACTER) >= 0) { + errorHandler.warning('Unicode replacement character detected, source encoding issues?'); + } + + function fixedFromCharCode(code) { + // String.prototype.fromCharCode does not supports + // > 2 bytes unicode chars directly + if (code > 0xffff) { + code -= 0x10000; + var surrogate1 = 0xd800 + (code >> 10), + surrogate2 = 0xdc00 + (code & 0x3ff); + + return String.fromCharCode(surrogate1, surrogate2); + } else { + return String.fromCharCode(code); + } + } + + function entityReplacer(a) { + var complete = a[a.length - 1] === ';' ? a : a + ';'; + if (!isHTML && complete !== a) { + errorHandler.error('EntityRef: expecting ;'); + return a; + } + var match = g.Reference.exec(complete); + if (!match || match[0].length !== complete.length) { + errorHandler.error('entity not matching Reference production: ' + a); + return a; + } + var k = complete.slice(1, -1); + if (hasOwn(entityMap, k)) { + return entityMap[k]; + } else if (k.charAt(0) === '#') { + return fixedFromCharCode(parseInt(k.substring(1).replace('x', '0x'))); + } else { + errorHandler.error('entity not found:' + a); + return a; + } + } + + function appendText(end) { + //has some bugs + if (end > start) { + var xt = source.substring(start, end).replace(ENTITY_REG, entityReplacer); + locator && position(start); + domBuilder.characters(xt, 0, end - start); + start = end; + } + } + + var lineStart = 0; + var lineEnd = 0; + var linePattern = /\r\n?|\n|$/g; + var locator = domBuilder.locator; + + function position(p, m) { + while (p >= lineEnd && (m = linePattern.exec(source))) { + lineStart = lineEnd; + lineEnd = m.index + m[0].length; + locator.lineNumber++; + } + locator.columnNumber = p - lineStart + 1; + } + + var parseStack = [{ currentNSMap: defaultNSMapCopy }]; + var unclosedTags = []; + var start = 0; + while (true) { + try { + var tagStart = source.indexOf('<', start); + if (tagStart < 0) { + if (!isHTML && unclosedTags.length > 0) { + return errorHandler.fatalError('unclosed xml tag(s): ' + unclosedTags.join(', ')); + } + if (!source.substring(start).match(/^\s*$/)) { + var doc = domBuilder.doc; + var text = doc.createTextNode(source.substring(start)); + if (doc.documentElement) { + return errorHandler.error('Extra content at the end of the document'); + } + doc.appendChild(text); + domBuilder.currentElement = text; + } + return; + } + if (tagStart > start) { + var fromSource = source.substring(start, tagStart); + if (!isHTML && unclosedTags.length === 0) { + fromSource = fromSource.replace(new RegExp(g.S_OPT.source, 'g'), ''); + fromSource && errorHandler.error("Unexpected content outside root element: '" + fromSource + "'"); + } + appendText(tagStart); + } + switch (source.charAt(tagStart + 1)) { + case '/': + var end = source.indexOf('>', tagStart + 2); + var tagNameRaw = source.substring(tagStart + 2, end > 0 ? end : undefined); + if (!tagNameRaw) { + return errorHandler.fatalError('end tag name missing'); + } + var tagNameMatch = end > 0 && g.reg('^', g.QName_group, g.S_OPT, '$').exec(tagNameRaw); + if (!tagNameMatch) { + return errorHandler.fatalError('end tag name contains invalid characters: "' + tagNameRaw + '"'); + } + if (!domBuilder.currentElement && !domBuilder.doc.documentElement) { + // not enough information to provide a helpful error message, + // but parsing will throw since there is no root element + return; + } + var currentTagName = + unclosedTags[unclosedTags.length - 1] || + domBuilder.currentElement.tagName || + domBuilder.doc.documentElement.tagName || + ''; + if (currentTagName !== tagNameMatch[1]) { + var tagNameLower = tagNameMatch[1].toLowerCase(); + if (!isHTML || currentTagName.toLowerCase() !== tagNameLower) { + return errorHandler.fatalError('Opening and ending tag mismatch: "' + currentTagName + '" != "' + tagNameRaw + '"'); + } + } + var config = parseStack.pop(); + unclosedTags.pop(); + var localNSMap = config.localNSMap; + domBuilder.endElement(config.uri, config.localName, currentTagName); + if (localNSMap) { + for (var prefix in localNSMap) { + if (hasOwn(localNSMap, prefix)) { + domBuilder.endPrefixMapping(prefix); + } + } + } + + end++; + break; + // end element + case '?': // + locator && position(tagStart); + end = parseProcessingInstruction(source, tagStart, domBuilder, errorHandler); + break; + case '!': // start) { + start = end; + } else { + //Possible sax fallback here, risk of positional error + appendText(Math.max(tagStart, start) + 1); + } + } +} + +function copyLocator(f, t) { + t.lineNumber = f.lineNumber; + t.columnNumber = f.columnNumber; + return t; +} + +/** + * @returns + * end of the elementStartPart(end of elementEndPart for selfClosed el) + * @see {@link #appendElement} + */ +function parseElementStartPart(source, start, el, currentNSMap, entityReplacer, errorHandler, isHTML) { + /** + * @param {string} qname + * @param {string} value + * @param {number} startIndex + */ + function addAttribute(qname, value, startIndex) { + if (hasOwn(el.attributeNames, qname)) { + return errorHandler.fatalError('Attribute ' + qname + ' redefined'); + } + if (!isHTML && value.indexOf('<') >= 0) { + return errorHandler.fatalError("Unescaped '<' not allowed in attributes values"); + } + el.addValue( + qname, + // @see https://www.w3.org/TR/xml/#AVNormalize + // since the xmldom sax parser does not "interpret" DTD the following is not implemented: + // - recursive replacement of (DTD) entity references + // - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA + value.replace(/[\t\n\r]/g, ' ').replace(ENTITY_REG, entityReplacer), + startIndex + ); + } + + var attrName; + var value; + var p = ++start; + var s = S_TAG; //status + while (true) { + var c = source.charAt(p); + switch (c) { + case '=': + if (s === S_ATTR) { + //attrName + attrName = source.slice(start, p); + s = S_EQ; + } else if (s === S_ATTR_SPACE) { + s = S_EQ; + } else { + //fatalError: equal must after attrName or space after attrName + throw new Error('attribute equal must after attrName'); // No known test case + } + break; + case "'": + case '"': + if ( + s === S_EQ || + s === S_ATTR //|| s == S_ATTR_SPACE + ) { + //equal + if (s === S_ATTR) { + errorHandler.warning('attribute value must after "="'); + attrName = source.slice(start, p); + } + start = p + 1; + p = source.indexOf(c, start); + if (p > 0) { + value = source.slice(start, p); + addAttribute(attrName, value, start - 1); + s = S_ATTR_END; + } else { + //fatalError: no end quot match + throw new Error("attribute value no end '" + c + "' match"); + } + } else if (s == S_ATTR_NOQUOT_VALUE) { + value = source.slice(start, p); + addAttribute(attrName, value, start); + errorHandler.warning('attribute "' + attrName + '" missed start quot(' + c + ')!!'); + start = p + 1; + s = S_ATTR_END; + } else { + //fatalError: no equal before + throw new Error('attribute value must after "="'); // No known test case + } + break; + case '/': + switch (s) { + case S_TAG: + el.setTagName(source.slice(start, p)); + case S_ATTR_END: + case S_TAG_SPACE: + case S_TAG_CLOSE: + s = S_TAG_CLOSE; + el.closed = true; + case S_ATTR_NOQUOT_VALUE: + case S_ATTR: + break; + case S_ATTR_SPACE: + el.closed = true; + break; + //case S_EQ: + default: + throw new Error("attribute invalid close char('/')"); // No known test case + } + break; + case '': //end document + errorHandler.error('unexpected end of input'); + if (s == S_TAG) { + el.setTagName(source.slice(start, p)); + } + return p; + case '>': + switch (s) { + case S_TAG: + el.setTagName(source.slice(start, p)); + case S_ATTR_END: + case S_TAG_SPACE: + case S_TAG_CLOSE: + break; //normal + case S_ATTR_NOQUOT_VALUE: //Compatible state + case S_ATTR: + value = source.slice(start, p); + if (value.slice(-1) === '/') { + el.closed = true; + value = value.slice(0, -1); + } + case S_ATTR_SPACE: + if (s === S_ATTR_SPACE) { + value = attrName; + } + if (s == S_ATTR_NOQUOT_VALUE) { + errorHandler.warning('attribute "' + value + '" missed quot(")!'); + addAttribute(attrName, value, start); + } else { + if (!isHTML) { + errorHandler.warning('attribute "' + value + '" missed value!! "' + value + '" instead!!'); + } + addAttribute(value, value, start); + } + break; + case S_EQ: + if (!isHTML) { + return errorHandler.fatalError('AttValue: \' or " expected'); + } + } + return p; + /*xml space '\x20' | #x9 | #xD | #xA; */ + case '\u0080': + c = ' '; + default: + if (c <= ' ') { + //space + switch (s) { + case S_TAG: + el.setTagName(source.slice(start, p)); //tagName + s = S_TAG_SPACE; + break; + case S_ATTR: + attrName = source.slice(start, p); + s = S_ATTR_SPACE; + break; + case S_ATTR_NOQUOT_VALUE: + var value = source.slice(start, p); + errorHandler.warning('attribute "' + value + '" missed quot(")!!'); + addAttribute(attrName, value, start); + case S_ATTR_END: + s = S_TAG_SPACE; + break; + //case S_TAG_SPACE: + //case S_EQ: + //case S_ATTR_SPACE: + // void();break; + //case S_TAG_CLOSE: + //ignore warning + } + } else { + //not space + //S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE + //S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE + switch (s) { + //case S_TAG:void();break; + //case S_ATTR:void();break; + //case S_ATTR_NOQUOT_VALUE:void();break; + case S_ATTR_SPACE: + if (!isHTML) { + errorHandler.warning('attribute "' + attrName + '" missed value!! "' + attrName + '" instead2!!'); + } + addAttribute(attrName, attrName, start); + start = p; + s = S_ATTR; + break; + case S_ATTR_END: + errorHandler.warning('attribute space is required"' + attrName + '"!!'); + case S_TAG_SPACE: + s = S_ATTR; + start = p; + break; + case S_EQ: + s = S_ATTR_NOQUOT_VALUE; + start = p; + break; + case S_TAG_CLOSE: + throw new Error("elements closed character '/' and '>' must be connected to"); + } + } + } //end outer switch + p++; + } +} + +/** + * @returns + * `true` if a new namespace has been defined. + */ +function appendElement(el, domBuilder, currentNSMap) { + var tagName = el.tagName; + var localNSMap = null; + var i = el.length; + while (i--) { + var a = el[i]; + var qName = a.qName; + var value = a.value; + var nsp = qName.indexOf(':'); + if (nsp > 0) { + var prefix = (a.prefix = qName.slice(0, nsp)); + var localName = qName.slice(nsp + 1); + var nsPrefix = prefix === 'xmlns' && localName; + } else { + localName = qName; + prefix = null; + nsPrefix = qName === 'xmlns' && ''; + } + //can not set prefix,because prefix !== '' + a.localName = localName; + //prefix == null for no ns prefix attribute + if (nsPrefix !== false) { + //hack!! + if (localNSMap == null) { + localNSMap = Object.create(null); + _copy(currentNSMap, (currentNSMap = Object.create(null))); + } + currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; + a.uri = NAMESPACE.XMLNS; + domBuilder.startPrefixMapping(nsPrefix, value); + } + } + var i = el.length; + while (i--) { + a = el[i]; + if (a.prefix) { + //no prefix attribute has no namespace + if (a.prefix === 'xml') { + a.uri = NAMESPACE.XML; + } + if (a.prefix !== 'xmlns') { + a.uri = currentNSMap[a.prefix]; + } + } + } + var nsp = tagName.indexOf(':'); + if (nsp > 0) { + prefix = el.prefix = tagName.slice(0, nsp); + localName = el.localName = tagName.slice(nsp + 1); + } else { + prefix = null; //important!! + localName = el.localName = tagName; + } + //no prefix element has default namespace + var ns = (el.uri = currentNSMap[prefix || '']); + domBuilder.startElement(ns, localName, tagName, el); + //endPrefixMapping and startPrefixMapping have not any help for dom builder + //localNSMap = null + if (el.closed) { + domBuilder.endElement(ns, localName, tagName); + if (localNSMap) { + for (prefix in localNSMap) { + if (hasOwn(localNSMap, prefix)) { + domBuilder.endPrefixMapping(prefix); + } + } + } + } else { + el.currentNSMap = currentNSMap; + el.localNSMap = localNSMap; + //parseStack.push(el); + return true; + } +} + +function parseHtmlSpecialContent(source, elStartEnd, tagName, entityReplacer, domBuilder) { + // https://html.spec.whatwg.org/#raw-text-elements + // https://html.spec.whatwg.org/#escapable-raw-text-elements + // https://html.spec.whatwg.org/#cdata-rcdata-restrictions:raw-text-elements + // TODO: https://html.spec.whatwg.org/#cdata-rcdata-restrictions + var isEscapableRaw = isHTMLEscapableRawTextElement(tagName); + if (isEscapableRaw || isHTMLRawTextElement(tagName)) { + var elEndStart = source.indexOf('', elStartEnd); + var text = source.substring(elStartEnd + 1, elEndStart); + + if (isEscapableRaw) { + text = text.replace(ENTITY_REG, entityReplacer); + } + domBuilder.characters(text, 0, text.length); + return elEndStart; + } + return elStartEnd + 1; +} + +function _copy(source, target) { + for (var n in source) { + if (hasOwn(source, n)) { + target[n] = source[n]; + } + } +} + +/** + * @typedef ParseUtils + * @property {function(relativeIndex: number?): string | undefined} char + * Provides look ahead access to a singe character relative to the current index. + * @property {function(): number} getIndex + * Provides read-only access to the current index. + * @property {function(reg: RegExp): string | null} getMatch + * Applies the provided regular expression enforcing that it starts at the current index and + * returns the complete matching string, + * and moves the current index by the length of the matching string. + * @property {function(): string} getSource + * Provides read-only access to the complete source. + * @property {function(places: number?): void} skip + * moves the current index by places (defaults to 1) + * @property {function(): number} skipBlanks + * Moves the current index by the amount of white space that directly follows the current index + * and returns the amount of whitespace chars skipped (0..n), + * or -1 if the end of the source was reached. + * @property {function(): string} substringFromIndex + * creates a substring from the current index to the end of `source` + * @property {function(compareWith: string): boolean} substringStartsWith + * Checks if `source` contains `compareWith`, starting from the current index. + * @property {function(compareWith: string): boolean} substringStartsWithCaseInsensitive + * Checks if `source` contains `compareWith`, starting from the current index, + * comparing the upper case of both sides. + * @see {@link parseUtils} + */ + +/** + * A temporary scope for parsing and look ahead operations in `source`, + * starting from index `start`. + * + * Some operations move the current index by a number of positions, + * after which `getIndex` returns the new index. + * + * @param {string} source + * @param {number} start + * @returns {ParseUtils} + */ +function parseUtils(source, start) { + var index = start; + + function char(n) { + n = n || 0; + return source.charAt(index + n); + } + + function skip(n) { + n = n || 1; + index += n; + } + + function skipBlanks() { + var blanks = 0; + while (index < source.length) { + var c = char(); + if (c !== ' ' && c !== '\n' && c !== '\t' && c !== '\r') { + return blanks; + } + blanks++; + skip(); + } + return -1; + } + function substringFromIndex() { + return source.substring(index); + } + function substringStartsWith(text) { + return source.substring(index, index + text.length) === text; + } + function substringStartsWithCaseInsensitive(text) { + return source.substring(index, index + text.length).toUpperCase() === text.toUpperCase(); + } + + function getMatch(args) { + var expr = g.reg('^', args); + var match = expr.exec(substringFromIndex()); + if (match) { + skip(match[0].length); + return match[0]; + } + return null; + } + return { + char: char, + getIndex: function () { + return index; + }, + getMatch: getMatch, + getSource: function () { + return source; + }, + skip: skip, + skipBlanks: skipBlanks, + substringFromIndex: substringFromIndex, + substringStartsWith: substringStartsWith, + substringStartsWithCaseInsensitive: substringStartsWithCaseInsensitive, + }; +} + +/** + * @param {ParseUtils} p + * @param {DOMHandler} errorHandler + * @returns {string} + */ +function parseDoctypeInternalSubset(p, errorHandler) { + /** + * @param {ParseUtils} p + * @param {DOMHandler} errorHandler + * @returns {string} + */ + function parsePI(p, errorHandler) { + var match = g.PI.exec(p.substringFromIndex()); + if (!match) { + return errorHandler.fatalError('processing instruction is not well-formed at position ' + p.getIndex()); + } + if (match[1].toLowerCase() === 'xml') { + return errorHandler.fatalError( + 'xml declaration is only allowed at the start of the document, but found at position ' + p.getIndex() + ); + } + p.skip(match[0].length); + return match[0]; + } + // Parse internal subset + var source = p.getSource(); + if (p.char() === '[') { + p.skip(1); + var intSubsetStart = p.getIndex(); + while (p.getIndex() < source.length) { + p.skipBlanks(); + if (p.char() === ']') { + var internalSubset = source.substring(intSubsetStart, p.getIndex()); + p.skip(1); + return internalSubset; + } + var current = null; + // Only in external subset + // if (char() === '<' && char(1) === '!' && char(2) === '[') { + // parseConditionalSections(p, errorHandler); + // } else + if (p.char() === '<' && p.char(1) === '!') { + switch (p.char(2)) { + case 'E': // ELEMENT | ENTITY + if (p.char(3) === 'L') { + current = p.getMatch(g.elementdecl); + } else if (p.char(3) === 'N') { + current = p.getMatch(g.EntityDecl); + } + break; + case 'A': // ATTRIBUTE + current = p.getMatch(g.AttlistDecl); + break; + case 'N': // NOTATION + current = p.getMatch(g.NotationDecl); + break; + case '-': // COMMENT + current = p.getMatch(g.Comment); + break; + } + } else if (p.char() === '<' && p.char(1) === '?') { + current = parsePI(p, errorHandler); + } else if (p.char() === '%') { + current = p.getMatch(g.PEReference); + } else { + return errorHandler.fatalError('Error detected in Markup declaration'); + } + if (!current) { + return errorHandler.fatalError('Error in internal subset at position ' + p.getIndex()); + } + } + return errorHandler.fatalError('doctype internal subset is not well-formed, missing ]'); + } +} + +/** + * Called when the parser encounters an element starting with '') { + return errorHandler.fatalError('doctype not terminated with > at position ' + p.getIndex()); + } + p.skip(1); + domBuilder.startDTD(doctype.name, doctype.publicId, doctype.systemId, doctype.internalSubset); + domBuilder.endDTD(); + return p.getIndex(); + } + default: + return errorHandler.fatalError('Not well-formed XML starting with " 0) { + return errorHandler.fatalError( + 'processing instruction at position ' + start + ' is an xml declaration which is only at the start of the document' + ); + } + if (!g.XMLDecl.test(source.substring(start))) { + return errorHandler.fatalError('xml declaration is not well-formed'); + } + } + domBuilder.processingInstruction(match[1], match[2]); + return start + match[0].length; +} + +function ElementAttributes() { + this.attributeNames = Object.create(null); +} + +ElementAttributes.prototype = { + setTagName: function (tagName) { + if (!g.QName_exact.test(tagName)) { + throw new Error('invalid tagName:' + tagName); + } + this.tagName = tagName; + }, + addValue: function (qName, value, offset) { + if (!g.QName_exact.test(qName)) { + throw new Error('invalid attribute:' + qName); + } + this.attributeNames[qName] = this.length; + this[this.length++] = { qName: qName, value: value, offset: offset }; + }, + length: 0, + getLocalName: function (i) { + return this[i].localName; + }, + getLocator: function (i) { + return this[i].locator; + }, + getQName: function (i) { + return this[i].qName; + }, + getURI: function (i) { + return this[i].uri; + }, + getValue: function (i) { + return this[i].value; + }, + // ,getIndex:function(uri, localName)){ + // if(localName){ + // + // }else{ + // var qName = uri + // } + // }, + // getValue:function(){return this.getValue(this.getIndex.apply(this,arguments))}, + // getType:function(uri,localName){} + // getType:function(i){}, +}; + +exports.XMLReader = XMLReader; +exports.parseUtils = parseUtils; +exports.parseDoctypeCommentOrCData = parseDoctypeCommentOrCData; + +},{"./conventions":2,"./errors":6,"./grammar":7}],10:[function(require,module,exports){ +'use strict' + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function getLens (b64) { + var len = b64.length + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} + +},{}],11:[function(require,module,exports){ +(function (Buffer){(function (){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +'use strict' + +var base64 = require('base64-js') +var ieee754 = require('ieee754') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +var K_MAX_LENGTH = 0x7fffffff +exports.kMaxLength = K_MAX_LENGTH + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Print warning and recommend using `buffer` v4.x which has an Object + * implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * We report that the browser does not support typed arrays if the are not subclassable + * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support + * for __proto__ and has a buggy typed array implementation. + */ +Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() + +if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && + typeof console.error === 'function') { + console.error( + 'This browser lacks typed array (Uint8Array) support which is required by ' + + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' + ) +} + +function typedArraySupport () { + // Can typed array instances can be augmented? + try { + var arr = new Uint8Array(1) + arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } } + return arr.foo() === 42 + } catch (e) { + return false + } +} + +Object.defineProperty(Buffer.prototype, 'parent', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.buffer + } +}) + +Object.defineProperty(Buffer.prototype, 'offset', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.byteOffset + } +}) + +function createBuffer (length) { + if (length > K_MAX_LENGTH) { + throw new RangeError('The value "' + length + '" is invalid for option "size"') + } + // Return an augmented `Uint8Array` instance + var buf = new Uint8Array(length) + buf.__proto__ = Buffer.prototype + return buf +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new TypeError( + 'The "string" argument must be of type string. Received type number' + ) + } + return allocUnsafe(arg) + } + return from(arg, encodingOrOffset, length) +} + +// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 +if (typeof Symbol !== 'undefined' && Symbol.species != null && + Buffer[Symbol.species] === Buffer) { + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true, + enumerable: false, + writable: false + }) +} + +Buffer.poolSize = 8192 // not used by this implementation + +function from (value, encodingOrOffset, length) { + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + if (ArrayBuffer.isView(value)) { + return fromArrayLike(value) + } + + if (value == null) { + throw TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) + } + + if (isInstance(value, ArrayBuffer) || + (value && isInstance(value.buffer, ArrayBuffer))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'number') { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number' + ) + } + + var valueOf = value.valueOf && value.valueOf() + if (valueOf != null && valueOf !== value) { + return Buffer.from(valueOf, encodingOrOffset, length) + } + + var b = fromObject(value) + if (b) return b + + if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && + typeof value[Symbol.toPrimitive] === 'function') { + return Buffer.from( + value[Symbol.toPrimitive]('string'), encodingOrOffset, length + ) + } + + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length) +} + +// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: +// https://github.com/feross/buffer/pull/148 +Buffer.prototype.__proto__ = Uint8Array.prototype +Buffer.__proto__ = Uint8Array + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be of type number') + } else if (size < 0) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } +} + +function alloc (size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(size).fill(fill, encoding) + : createBuffer(size).fill(fill) + } + return createBuffer(size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding) +} + +function allocUnsafe (size) { + assertSize(size) + return createBuffer(size < 0 ? 0 : checked(size) | 0) +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(size) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + + var length = byteLength(string, encoding) | 0 + var buf = createBuffer(length) + + var actual = buf.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + buf = buf.slice(0, actual) + } + + return buf +} + +function fromArrayLike (array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + var buf = createBuffer(length) + for (var i = 0; i < length; i += 1) { + buf[i] = array[i] & 255 + } + return buf +} + +function fromArrayBuffer (array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds') + } + + var buf + if (byteOffset === undefined && length === undefined) { + buf = new Uint8Array(array) + } else if (length === undefined) { + buf = new Uint8Array(array, byteOffset) + } else { + buf = new Uint8Array(array, byteOffset, length) + } + + // Return an augmented `Uint8Array` instance + buf.__proto__ = Buffer.prototype + return buf +} + +function fromObject (obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + var buf = createBuffer(len) + + if (buf.length === 0) { + return buf + } + + obj.copy(buf, 0, 0, len) + return buf + } + + if (obj.length !== undefined) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + return createBuffer(0) + } + return fromArrayLike(obj) + } + + if (obj.type === 'Buffer' && Array.isArray(obj.data)) { + return fromArrayLike(obj.data) + } +} + +function checked (length) { + // Note: cannot use `length < K_MAX_LENGTH` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= K_MAX_LENGTH) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return b != null && b._isBuffer === true && + b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false +} + +Buffer.compare = function compare (a, b) { + if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) + if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' + ) + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (isInstance(buf, Uint8Array)) { + buf = Buffer.from(buf) + } + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + + 'Received type ' + typeof string + ) + } + + var len = string.length + var mustMatch = (arguments.length > 2 && arguments[2] === true) + if (!mustMatch && len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) { + return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 + } + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + var loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) +// to detect a Buffer instance. It's not possible to use `instanceof Buffer` +// reliably in a browserify context because there could be multiple different +// copies of the 'buffer' package in use. This method works even for Buffer +// instances that were created from another copy of the `buffer` package. +// See: https://github.com/feross/buffer/issues/154 +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.toLocaleString = Buffer.prototype.toString + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() + if (this.length > max) str += ' ... ' + return '' +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (isInstance(target, Uint8Array)) { + target = Buffer.from(target, target.offset, target.byteLength) + } + if (!Buffer.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. ' + + 'Received type ' + (typeof target) + ) + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (numberIsNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + var strLen = string.length + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (numberIsNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset >>> 0 + if (isFinite(length)) { + length = length >>> 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf = this.subarray(start, end) + // Return an augmented `Uint8Array` instance + newBuf.__proto__ = Buffer.prototype + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('Index out of range') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + + if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { + // Use built-in when available, missing from IE11 + this.copyWithin(targetStart, start, end) + } else if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (var i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if ((encoding === 'utf8' && code < 128) || + encoding === 'latin1') { + // Fast path: If `val` fits into a single byte, use that numeric value. + val = code + } + } + } else if (typeof val === 'number') { + val = val & 255 + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : Buffer.from(val, encoding) + var len = bytes.length + if (len === 0) { + throw new TypeError('The value "' + val + + '" is invalid for argument "value"') + } + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node takes equal signs as end of the Base64 encoding + str = str.split('=')[0] + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = str.trim().replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass +// the `instanceof` check but they should be treated as of that type. +// See: https://github.com/feross/buffer/issues/166 +function isInstance (obj, type) { + return obj instanceof type || + (obj != null && obj.constructor != null && obj.constructor.name != null && + obj.constructor.name === type.name) +} +function numberIsNaN (obj) { + // For IE11 support + return obj !== obj // eslint-disable-line no-self-compare +} + +}).call(this)}).call(this,require("buffer").Buffer) +},{"base64-js":10,"buffer":11,"ieee754":12}],12:[function(require,module,exports){ +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = ((value * c) - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}]},{},[1])(1) +}); diff --git a/node_modules/plist/dist/plist.js b/node_modules/plist/dist/plist.js new file mode 100644 index 0000000..1fd3d9e --- /dev/null +++ b/node_modules/plist/dist/plist.js @@ -0,0 +1,15918 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.plist = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i, + * and raw CDATA nodes. + * + * @param {Element} node + * @returns {Boolean} + * @api private + */ + +function shouldIgnoreNode(node) { + return ( + node.nodeType === TEXT_NODE || + node.nodeType === COMMENT_NODE || + node.nodeType === CDATA_NODE + ); +} + +/** + * Check if the node is empty. Some plist file has such node: + * + * this node shoud be ignored. + * + * @see https://github.com/TooTallNate/plist.js/issues/66 + * @param {Element} node + * @returns {Boolean} + * @api private + */ +function isEmptyNode(node) { + if (!node.childNodes || node.childNodes.length === 0) { + return true; + } else { + return false; + } +} + +function invariant(test, message) { + if (!test) { + throw new Error(message); + } +} + +/** + * Parses a Plist XML string. Returns an Object. + * + * @param {String} xml - the XML String to decode + * @returns {Mixed} the decoded value from the Plist XML + * @api public + */ + +function parse(xml) { + var doc = new DOMParser().parseFromString(xml, "text/xml"); + invariant( + doc.documentElement.nodeName === "plist", + "malformed document. First element should be ", + ); + var plist = parsePlistXML(doc.documentElement); + + // the root node gets interpreted as an Array, + // so pull out the inner data first + if (plist.length == 1) plist = plist[0]; + + return plist; +} + +/** + * Convert an XML based plist document into a JSON representation. + * + * @param {Object} xml_node - current XML node in the plist + * @returns {Mixed} built up JSON object + * @api private + */ + +function parsePlistXML(node) { + var i, new_obj, key, val, new_arr, res, counter, type; + + if (!node) return null; + + if (node.nodeName === "plist") { + new_arr = []; + if (isEmptyNode(node)) { + return new_arr; + } + for (i = 0; i < node.childNodes.length; i++) { + if (!shouldIgnoreNode(node.childNodes[i])) { + new_arr.push(parsePlistXML(node.childNodes[i])); + } + } + return new_arr; + } else if (node.nodeName === "dict") { + new_obj = {}; + key = null; + counter = 0; + if (isEmptyNode(node)) { + return new_obj; + } + for (i = 0; i < node.childNodes.length; i++) { + if (shouldIgnoreNode(node.childNodes[i])) continue; + if (counter % 2 === 0) { + invariant( + node.childNodes[i].nodeName === "key", + "Missing key while parsing .", + ); + key = parsePlistXML(node.childNodes[i]); + } else { + invariant( + node.childNodes[i].nodeName !== "key", + 'Unexpected key "' + + parsePlistXML(node.childNodes[i]) + + '" while parsing .', + ); + new_obj[key] = parsePlistXML(node.childNodes[i]); + } + counter += 1; + } + if (counter % 2 === 1) { + new_obj[key] = ""; + } + + return new_obj; + } else if (node.nodeName === "array") { + new_arr = []; + if (isEmptyNode(node)) { + return new_arr; + } + for (i = 0; i < node.childNodes.length; i++) { + if (!shouldIgnoreNode(node.childNodes[i])) { + res = parsePlistXML(node.childNodes[i]); + if (null != res) new_arr.push(res); + } + } + return new_arr; + } else if (node.nodeName === "#text") { + // TODO: what should we do with text types? (CDATA sections) + } else if (node.nodeName === "key") { + if (isEmptyNode(node)) { + return ""; + } + + invariant( + node.childNodes[0].nodeValue !== "__proto__", + "__proto__ keys can lead to prototype pollution. More details on CVE-2022-22912", + ); + + return node.childNodes[0].nodeValue; + } else if (node.nodeName === "string") { + res = ""; + if (isEmptyNode(node)) { + return res; + } + for (i = 0; i < node.childNodes.length; i++) { + var type = node.childNodes[i].nodeType; + if (type === TEXT_NODE || type === CDATA_NODE) { + res += node.childNodes[i].nodeValue; + } + } + return res; + } else if (node.nodeName === "integer") { + invariant(!isEmptyNode(node), 'Cannot parse "" as integer.'); + return parseInt(node.childNodes[0].nodeValue, 10); + } else if (node.nodeName === "real") { + invariant(!isEmptyNode(node), 'Cannot parse "" as real.'); + res = ""; + for (i = 0; i < node.childNodes.length; i++) { + if (node.childNodes[i].nodeType === TEXT_NODE) { + res += node.childNodes[i].nodeValue; + } + } + return parseFloat(res); + } else if (node.nodeName === "data") { + res = ""; + if (isEmptyNode(node)) { + return Buffer.from(res, "base64"); + } + for (i = 0; i < node.childNodes.length; i++) { + if (node.childNodes[i].nodeType === TEXT_NODE) { + res += node.childNodes[i].nodeValue.replace(/\s+/g, ""); + } + } + return Buffer.from(res, "base64"); + } else if (node.nodeName === "date") { + invariant(!isEmptyNode(node), 'Cannot parse "" as Date.'); + return new Date(node.childNodes[0].nodeValue); + } else if (node.nodeName === "null") { + return null; + } else if (node.nodeName === "true") { + return true; + } else if (node.nodeName === "false") { + return false; + } else { + throw new Error("Invalid PLIST tag " + node.nodeName); + } +} + +}).call(this)}).call(this,require("buffer").Buffer) +},{"@xmldom/xmldom":10,"buffer":13}],4:[function(require,module,exports){ +'use strict'; + +/** + * Ponyfill for `Array.prototype.find` which is only available in ES6 runtimes. + * + * Works with anything that has a `length` property and index access properties, + * including NodeList. + * + * @param {T[] | { length: number; [number]: T }} list + * @param {function (item: T, index: number, list:T[]):boolean} predicate + * @param {Partial>?} ac + * Allows injecting a custom implementation in tests (`Array.prototype` by default). + * @returns {T | undefined} + * @template {unknown} T + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find + * @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find + */ +function find(list, predicate, ac) { + if (ac === undefined) { + ac = Array.prototype; + } + if (list && typeof ac.find === 'function') { + return ac.find.call(list, predicate); + } + for (var i = 0; i < list.length; i++) { + if (hasOwn(list, i)) { + var item = list[i]; + if (predicate.call(undefined, item, i, list)) { + return item; + } + } + } +} + +/** + * "Shallow freezes" an object to render it immutable. + * Uses `Object.freeze` if available, + * otherwise the immutability is only in the type. + * + * Is used to create "enum like" objects. + * + * If `Object.getOwnPropertyDescriptors` is available, + * a new object with all properties of object but without any prototype is created and returned + * after freezing it. + * + * @param {T} object + * The object to freeze. + * @param {Pick} [oc=Object] + * `Object` by default, + * allows to inject custom object constructor for tests. + * @returns {Readonly} + * @template {Object} T + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze + * @prettierignore + */ +function freeze(object, oc) { + if (oc === undefined) { + oc = Object; + } + if (oc && typeof oc.getOwnPropertyDescriptors === 'function') { + object = oc.create(null, oc.getOwnPropertyDescriptors(object)); + } + return oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object; +} + +/** + * Implementation for `Object.hasOwn` but ES5 compatible. + * + * @param {any} object + * @param {string | number} key + * @returns {boolean} + */ +function hasOwn(object, key) { + return Object.prototype.hasOwnProperty.call(object, key); +} + +/** + * Since xmldom can not rely on `Object.assign`, + * it uses/provides a simplified version that is sufficient for its needs. + * + * @param {Object} target + * @param {Object | null | undefined} source + * @returns {Object} + * The target with the merged/overridden properties. + * @throws {TypeError} + * If target is not an object. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign + * @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign + */ +function assign(target, source) { + if (target === null || typeof target !== 'object') { + throw new TypeError('target is not an object'); + } + for (var key in source) { + if (hasOwn(source, key)) { + target[key] = source[key]; + } + } + return target; +} + +/** + * A number of attributes are boolean attributes. + * The presence of a boolean attribute on an element represents the `true` value, + * and the absence of the attribute represents the `false` value. + * + * If the attribute is present, its value must either be the empty string, or a value that is + * an ASCII case-insensitive match for the attribute's canonical name, + * with no leading or trailing whitespace. + * + * Note: The values `"true"` and `"false"` are not allowed on boolean attributes. + * To represent a `false` value, the attribute has to be omitted altogether. + * + * @see https://html.spec.whatwg.org/#boolean-attributes + * @see https://html.spec.whatwg.org/#attributes-3 + */ +var HTML_BOOLEAN_ATTRIBUTES = freeze({ + allowfullscreen: true, + async: true, + autofocus: true, + autoplay: true, + checked: true, + controls: true, + default: true, + defer: true, + disabled: true, + formnovalidate: true, + hidden: true, + ismap: true, + itemscope: true, + loop: true, + multiple: true, + muted: true, + nomodule: true, + novalidate: true, + open: true, + playsinline: true, + readonly: true, + required: true, + reversed: true, + selected: true, +}); + +/** + * Check if `name` is matching one of the HTML boolean attribute names. + * This method doesn't check if such attributes are allowed in the context of the current + * document/parsing. + * + * @param {string} name + * @returns {boolean} + * @see {@link HTML_BOOLEAN_ATTRIBUTES} + * @see https://html.spec.whatwg.org/#boolean-attributes + * @see https://html.spec.whatwg.org/#attributes-3 + */ +function isHTMLBooleanAttribute(name) { + return hasOwn(HTML_BOOLEAN_ATTRIBUTES, name.toLowerCase()); +} + +/** + * Void elements only have a start tag; end tags must not be specified for void elements. + * These elements should be written as self-closing like this: ``. + * This should not be confused with optional tags that HTML allows to omit the end tag for + * (like `li`, `tr` and others), which can have content after them, + * so they can not be written as self-closing. + * xmldom does not have any logic for optional end tags cases, + * and will report them as a warning. + * Content that would go into the unopened element, + * will instead be added as a sibling text node. + * + * @type {Readonly<{ + * area: boolean; + * col: boolean; + * img: boolean; + * wbr: boolean; + * link: boolean; + * hr: boolean; + * source: boolean; + * br: boolean; + * input: boolean; + * param: boolean; + * meta: boolean; + * embed: boolean; + * track: boolean; + * base: boolean; + * }>} + * @see https://html.spec.whatwg.org/#void-elements + * @see https://html.spec.whatwg.org/#optional-tags + */ +var HTML_VOID_ELEMENTS = freeze({ + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true, +}); + +/** + * Check if `tagName` is matching one of the HTML void element names. + * This method doesn't check if such tags are allowed in the context of the current + * document/parsing. + * + * @param {string} tagName + * @returns {boolean} + * @see {@link HTML_VOID_ELEMENTS} + * @see https://html.spec.whatwg.org/#void-elements + */ +function isHTMLVoidElement(tagName) { + return hasOwn(HTML_VOID_ELEMENTS, tagName.toLowerCase()); +} + +/** + * Tag names that are raw text elements according to HTML spec. + * The value denotes whether they are escapable or not. + * + * @see {@link isHTMLEscapableRawTextElement} + * @see {@link isHTMLRawTextElement} + * @see https://html.spec.whatwg.org/#raw-text-elements + * @see https://html.spec.whatwg.org/#escapable-raw-text-elements + */ +var HTML_RAW_TEXT_ELEMENTS = freeze({ + script: false, + style: false, + textarea: true, + title: true, +}); + +/** + * Check if `tagName` is matching one of the HTML raw text element names. + * This method doesn't check if such tags are allowed in the context of the current + * document/parsing. + * + * @param {string} tagName + * @returns {boolean} + * @see {@link isHTMLEscapableRawTextElement} + * @see {@link HTML_RAW_TEXT_ELEMENTS} + * @see https://html.spec.whatwg.org/#raw-text-elements + * @see https://html.spec.whatwg.org/#escapable-raw-text-elements + */ +function isHTMLRawTextElement(tagName) { + var key = tagName.toLowerCase(); + return hasOwn(HTML_RAW_TEXT_ELEMENTS, key) && !HTML_RAW_TEXT_ELEMENTS[key]; +} +/** + * Check if `tagName` is matching one of the HTML escapable raw text element names. + * This method doesn't check if such tags are allowed in the context of the current + * document/parsing. + * + * @param {string} tagName + * @returns {boolean} + * @see {@link isHTMLRawTextElement} + * @see {@link HTML_RAW_TEXT_ELEMENTS} + * @see https://html.spec.whatwg.org/#raw-text-elements + * @see https://html.spec.whatwg.org/#escapable-raw-text-elements + */ +function isHTMLEscapableRawTextElement(tagName) { + var key = tagName.toLowerCase(); + return hasOwn(HTML_RAW_TEXT_ELEMENTS, key) && HTML_RAW_TEXT_ELEMENTS[key]; +} +/** + * Only returns true if `value` matches MIME_TYPE.HTML, which indicates an HTML document. + * + * @param {string} mimeType + * @returns {mimeType is 'text/html'} + * @see https://www.iana.org/assignments/media-types/text/html + * @see https://en.wikipedia.org/wiki/HTML + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString + * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring + */ +function isHTMLMimeType(mimeType) { + return mimeType === MIME_TYPE.HTML; +} +/** + * For both the `text/html` and the `application/xhtml+xml` namespace the spec defines that the + * HTML namespace is provided as the default. + * + * @param {string} mimeType + * @returns {boolean} + * @see https://dom.spec.whatwg.org/#dom-document-createelement + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument + */ +function hasDefaultHTMLNamespace(mimeType) { + return isHTMLMimeType(mimeType) || mimeType === MIME_TYPE.XML_XHTML_APPLICATION; +} + +/** + * All mime types that are allowed as input to `DOMParser.parseFromString` + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#Argument02 + * MDN + * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparsersupportedtype + * WHATWG HTML Spec + * @see {@link DOMParser.prototype.parseFromString} + */ +var MIME_TYPE = freeze({ + /** + * `text/html`, the only mime type that triggers treating an XML document as HTML. + * + * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration + * @see https://en.wikipedia.org/wiki/HTML Wikipedia + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN + * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring + * WHATWG HTML Spec + */ + HTML: 'text/html', + + /** + * `application/xml`, the standard mime type for XML documents. + * + * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType + * registration + * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303 + * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia + */ + XML_APPLICATION: 'application/xml', + + /** + * `text/xml`, an alias for `application/xml`. + * + * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303 + * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration + * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia + */ + XML_TEXT: 'text/xml', + + /** + * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace, + * but is parsed as an XML document. + * + * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType + * registration + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec + * @see https://en.wikipedia.org/wiki/XHTML Wikipedia + */ + XML_XHTML_APPLICATION: 'application/xhtml+xml', + + /** + * `image/svg+xml`, + * + * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration + * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1 + * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia + */ + XML_SVG_IMAGE: 'image/svg+xml', +}); +/** + * @typedef {'application/xhtml+xml' | 'application/xml' | 'image/svg+xml' | 'text/html' | 'text/xml'} + * MimeType + */ +/** + * @type {MimeType[]} + * @private + * Basically `Object.values`, which is not available in ES5. + */ +var _MIME_TYPES = Object.keys(MIME_TYPE).map(function (key) { + return MIME_TYPE[key]; +}); + +/** + * Only returns true if `mimeType` is one of the allowed values for + * `DOMParser.parseFromString`. + * + * @param {string} mimeType + * @returns {mimeType is 'application/xhtml+xml' | 'application/xml' | 'image/svg+xml' | 'text/html' | 'text/xml'} + * + */ +function isValidMimeType(mimeType) { + return _MIME_TYPES.indexOf(mimeType) > -1; +} +/** + * Namespaces that are used in this code base. + * + * @see http://www.w3.org/TR/REC-xml-names + */ +var NAMESPACE = freeze({ + /** + * The XHTML namespace. + * + * @see http://www.w3.org/1999/xhtml + */ + HTML: 'http://www.w3.org/1999/xhtml', + + /** + * The SVG namespace. + * + * @see http://www.w3.org/2000/svg + */ + SVG: 'http://www.w3.org/2000/svg', + + /** + * The `xml:` namespace. + * + * @see http://www.w3.org/XML/1998/namespace + */ + XML: 'http://www.w3.org/XML/1998/namespace', + + /** + * The `xmlns:` namespace. + * + * @see https://www.w3.org/2000/xmlns/ + */ + XMLNS: 'http://www.w3.org/2000/xmlns/', +}); + +exports.assign = assign; +exports.find = find; +exports.freeze = freeze; +exports.HTML_BOOLEAN_ATTRIBUTES = HTML_BOOLEAN_ATTRIBUTES; +exports.HTML_RAW_TEXT_ELEMENTS = HTML_RAW_TEXT_ELEMENTS; +exports.HTML_VOID_ELEMENTS = HTML_VOID_ELEMENTS; +exports.hasDefaultHTMLNamespace = hasDefaultHTMLNamespace; +exports.hasOwn = hasOwn; +exports.isHTMLBooleanAttribute = isHTMLBooleanAttribute; +exports.isHTMLRawTextElement = isHTMLRawTextElement; +exports.isHTMLEscapableRawTextElement = isHTMLEscapableRawTextElement; +exports.isHTMLMimeType = isHTMLMimeType; +exports.isHTMLVoidElement = isHTMLVoidElement; +exports.isValidMimeType = isValidMimeType; +exports.MIME_TYPE = MIME_TYPE; +exports.NAMESPACE = NAMESPACE; + +},{}],5:[function(require,module,exports){ +'use strict'; + +var conventions = require('./conventions'); +var dom = require('./dom'); +var errors = require('./errors'); +var entities = require('./entities'); +var sax = require('./sax'); + +var DOMImplementation = dom.DOMImplementation; + +var hasDefaultHTMLNamespace = conventions.hasDefaultHTMLNamespace; +var isHTMLMimeType = conventions.isHTMLMimeType; +var isValidMimeType = conventions.isValidMimeType; +var MIME_TYPE = conventions.MIME_TYPE; +var NAMESPACE = conventions.NAMESPACE; +var ParseError = errors.ParseError; + +var XMLReader = sax.XMLReader; + +/** + * Normalizes line ending according to , + * including some Unicode "newline" characters: + * + * > XML parsed entities are often stored in computer files which, + * > for editing convenience, are organized into lines. + * > These lines are typically separated by some combination + * > of the characters CARRIAGE RETURN (#xD) and LINE FEED (#xA). + * > + * > To simplify the tasks of applications, the XML processor must behave + * > as if it normalized all line breaks in external parsed entities (including the document entity) + * > on input, before parsing, by translating the following to a single #xA character: + * > + * > 1. the two-character sequence #xD #xA, + * > 2. the two-character sequence #xD #x85, + * > 3. the single character #x85, + * > 4. the single character #x2028, + * > 5. the single character #x2029, + * > 6. any #xD character that is not immediately followed by #xA or #x85. + * + * @param {string} input + * @returns {string} + * @prettierignore + */ +function normalizeLineEndings(input) { + return input.replace(/\r[\n\u0085]/g, '\n').replace(/[\r\u0085\u2028\u2029]/g, '\n'); +} + +/** + * @typedef Locator + * @property {number} [columnNumber] + * @property {number} [lineNumber] + */ + +/** + * @typedef DOMParserOptions + * @property {typeof assign} [assign] + * The method to use instead of `conventions.assign`, which is used to copy values from + * `options` before they are used for parsing. + * @property {typeof DOMHandler} [domHandler] + * For internal testing: The class for creating an instance for handling events from the SAX + * parser. + * *****Warning: By configuring a faulty implementation, the specified behavior can completely + * be broken.*****. + * @property {Function} [errorHandler] + * DEPRECATED! use `onError` instead. + * @property {function(level:ErrorLevel, message:string, context: DOMHandler):void} + * [onError] + * A function invoked for every error that occurs during parsing. + * + * If it is not provided, all errors are reported to `console.error` + * and only `fatalError`s are thrown as a `ParseError`, + * which prevents any further processing. + * If the provided method throws, a `ParserError` is thrown, + * which prevents any further processing. + * + * Be aware that many `warning`s are considered an error that prevents further processing in + * most implementations. + * @property {boolean} [locator=true] + * Configures if the nodes created during parsing will have a `lineNumber` and a `columnNumber` + * attribute describing their location in the XML string. + * Default is true. + * @property {(string) => string} [normalizeLineEndings] + * used to replace line endings before parsing, defaults to exported `normalizeLineEndings`, + * which normalizes line endings according to , + * including some Unicode "newline" characters. + * @property {Object} [xmlns] + * The XML namespaces that should be assumed when parsing. + * The default namespace can be provided by the key that is the empty string. + * When the `mimeType` for HTML, XHTML or SVG are passed to `parseFromString`, + * the default namespace that will be used, + * will be overridden according to the specification. + * @see {@link normalizeLineEndings} + */ + +/** + * The DOMParser interface provides the ability to parse XML or HTML source code from a string + * into a DOM `Document`. + * + * ***xmldom is different from the spec in that it allows an `options` parameter, + * to control the behavior***. + * + * @class + * @param {DOMParserOptions} [options] + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser + * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization + */ +function DOMParser(options) { + options = options || {}; + if (options.locator === undefined) { + options.locator = true; + } + + /** + * The method to use instead of `conventions.assign`, which is used to copy values from + * `options` + * before they are used for parsing. + * + * @type {conventions.assign} + * @private + * @see {@link conventions.assign} + * @readonly + */ + this.assign = options.assign || conventions.assign; + + /** + * For internal testing: The class for creating an instance for handling events from the SAX + * parser. + * *****Warning: By configuring a faulty implementation, the specified behavior can completely + * be broken*****. + * + * @type {typeof DOMHandler} + * @private + * @readonly + */ + this.domHandler = options.domHandler || DOMHandler; + + /** + * A function that is invoked for every error that occurs during parsing. + * + * If it is not provided, all errors are reported to `console.error` + * and only `fatalError`s are thrown as a `ParseError`, + * which prevents any further processing. + * If the provided method throws, a `ParserError` is thrown, + * which prevents any further processing. + * + * Be aware that many `warning`s are considered an error that prevents further processing in + * most implementations. + * + * @type {function(level:ErrorLevel, message:string, context: DOMHandler):void} + * @see {@link onErrorStopParsing} + * @see {@link onWarningStopParsing} + */ + this.onError = options.onError || options.errorHandler; + if (options.errorHandler && typeof options.errorHandler !== 'function') { + throw new TypeError('errorHandler object is no longer supported, switch to onError!'); + } else if (options.errorHandler) { + options.errorHandler('warning', 'The `errorHandler` option has been deprecated, use `onError` instead!', this); + } + + /** + * used to replace line endings before parsing, defaults to `normalizeLineEndings` + * + * @type {(string) => string} + * @readonly + */ + this.normalizeLineEndings = options.normalizeLineEndings || normalizeLineEndings; + + /** + * Configures if the nodes created during parsing will have a `lineNumber` and a + * `columnNumber` + * attribute describing their location in the XML string. + * Default is true. + * + * @type {boolean} + * @readonly + */ + this.locator = !!options.locator; + + /** + * The default namespace can be provided by the key that is the empty string. + * When the `mimeType` for HTML, XHTML or SVG are passed to `parseFromString`, + * the default namespace that will be used, + * will be overridden according to the specification. + * + * @type {Readonly} + * @readonly + */ + this.xmlns = this.assign(Object.create(null), options.xmlns); +} + +/** + * Parses `source` using the options in the way configured by the `DOMParserOptions` of `this` + * `DOMParser`. If `mimeType` is `text/html` an HTML `Document` is created, + * otherwise an XML `Document` is created. + * + * __It behaves different from the description in the living standard__: + * - Uses the `options` passed to the `DOMParser` constructor to modify the behavior. + * - Any unexpected input is reported to `onError` with either a `warning`, + * `error` or `fatalError` level. + * - Any `fatalError` throws a `ParseError` which prevents further processing. + * - Any error thrown by `onError` is converted to a `ParseError` which prevents further + * processing - If no `Document` was created during parsing it is reported as a `fatalError`. + * *****Warning: By configuring a faulty DOMHandler implementation, + * the specified behavior can completely be broken*****. + * + * @param {string} source + * The XML mime type only allows string input! + * @param {string} [mimeType='application/xml'] + * the mimeType or contentType of the document to be created determines the `type` of document + * created (XML or HTML) + * @returns {Document} + * The `Document` node. + * @throws {ParseError} + * for any `fatalError` or anything that is thrown by `onError` + * @throws {TypeError} + * for any invalid `mimeType` + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString + * @see https://html.spec.whatwg.org/#dom-domparser-parsefromstring-dev + */ +DOMParser.prototype.parseFromString = function (source, mimeType) { + if (!isValidMimeType(mimeType)) { + throw new TypeError('DOMParser.parseFromString: the provided mimeType "' + mimeType + '" is not valid.'); + } + var defaultNSMap = this.assign(Object.create(null), this.xmlns); + var entityMap = entities.XML_ENTITIES; + var defaultNamespace = defaultNSMap[''] || null; + if (hasDefaultHTMLNamespace(mimeType)) { + entityMap = entities.HTML_ENTITIES; + defaultNamespace = NAMESPACE.HTML; + } else if (mimeType === MIME_TYPE.XML_SVG_IMAGE) { + defaultNamespace = NAMESPACE.SVG; + } + defaultNSMap[''] = defaultNamespace; + defaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML; + + var domBuilder = new this.domHandler({ + mimeType: mimeType, + defaultNamespace: defaultNamespace, + onError: this.onError, + }); + var locator = this.locator ? {} : undefined; + if (this.locator) { + domBuilder.setDocumentLocator(locator); + } + + var sax = new XMLReader(); + sax.errorHandler = domBuilder; + sax.domBuilder = domBuilder; + var isXml = !conventions.isHTMLMimeType(mimeType); + if (isXml && typeof source !== 'string') { + sax.errorHandler.fatalError('source is not a string'); + } + sax.parse(this.normalizeLineEndings(String(source)), defaultNSMap, entityMap); + if (!domBuilder.doc.documentElement) { + sax.errorHandler.fatalError('missing root element'); + } + return domBuilder.doc; +}; + +/** + * @typedef DOMHandlerOptions + * @property {string} [mimeType=MIME_TYPE.XML_APPLICATION] + * @property {string | null} [defaultNamespace=null] + */ +/** + * The class that is used to handle events from the SAX parser to create the related DOM + * elements. + * + * Some methods are only implemented as an empty function, + * since they are (at least currently) not relevant for xmldom. + * + * @class + * @param {DOMHandlerOptions} [options] + * @see http://www.saxproject.org/apidoc/org/xml/sax/ext/DefaultHandler2.html + */ +function DOMHandler(options) { + var opt = options || {}; + /** + * The mime type is used to determine if the DOM handler will create an XML or HTML document. + * Only if it is set to `text/html` it will create an HTML document. + * It defaults to MIME_TYPE.XML_APPLICATION. + * + * @type {string} + * @see {@link MIME_TYPE} + * @readonly + */ + this.mimeType = opt.mimeType || MIME_TYPE.XML_APPLICATION; + + /** + * The namespace to use to create an XML document. + * For the following reasons this is required: + * - The SAX API for `startDocument` doesn't offer any way to pass a namespace, + * since at that point there is no way for the parser to know what the default namespace from + * the document will be. + * - When creating using `DOMImplementation.createDocument` it is required to pass a + * namespace, + * to determine the correct `Document.contentType`, which should match `this.mimeType`. + * - When parsing an XML document with the `application/xhtml+xml` mimeType, + * the HTML namespace needs to be the default namespace. + * + * @type {string | null} + * @private + * @readonly + */ + this.defaultNamespace = opt.defaultNamespace || null; + + /** + * @type {boolean} + * @private + */ + this.cdata = false; + + /** + * The last `Element` that was created by `startElement`. + * `endElement` sets it to the `currentElement.parentNode`. + * + * Note: The sax parser currently sets it to white space text nodes between tags. + * + * @type {Element | Node | undefined} + * @private + */ + this.currentElement = undefined; + + /** + * The Document that is created as part of `startDocument`, + * and returned by `DOMParser.parseFromString`. + * + * @type {Document | undefined} + * @readonly + */ + this.doc = undefined; + + /** + * The locator is stored as part of setDocumentLocator. + * It is controlled and mutated by the SAX parser to store the current parsing position. + * It is used by DOMHandler to set `columnNumber` and `lineNumber` + * on the DOM nodes. + * + * @type {Readonly | undefined} + * @private + * @readonly (the + * sax parser currently sometimes set's it) + */ + this.locator = undefined; + /** + * @type {function (level:ErrorLevel ,message:string, context:DOMHandler):void} + * @readonly + */ + this.onError = opt.onError; +} + +function position(locator, node) { + node.lineNumber = locator.lineNumber; + node.columnNumber = locator.columnNumber; +} + +DOMHandler.prototype = { + /** + * Either creates an XML or an HTML document and stores it under `this.doc`. + * If it is an XML document, `this.defaultNamespace` is used to create it, + * and it will not contain any `childNodes`. + * If it is an HTML document, it will be created without any `childNodes`. + * + * @see http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html + */ + startDocument: function () { + var impl = new DOMImplementation(); + this.doc = isHTMLMimeType(this.mimeType) ? impl.createHTMLDocument(false) : impl.createDocument(this.defaultNamespace, ''); + }, + startElement: function (namespaceURI, localName, qName, attrs) { + var doc = this.doc; + var el = doc.createElementNS(namespaceURI, qName || localName); + var len = attrs.length; + appendElement(this, el); + this.currentElement = el; + + this.locator && position(this.locator, el); + for (var i = 0; i < len; i++) { + var namespaceURI = attrs.getURI(i); + var value = attrs.getValue(i); + var qName = attrs.getQName(i); + var attr = doc.createAttributeNS(namespaceURI, qName); + this.locator && position(attrs.getLocator(i), attr); + attr.value = attr.nodeValue = value; + el.setAttributeNode(attr); + } + }, + endElement: function (namespaceURI, localName, qName) { + this.currentElement = this.currentElement.parentNode; + }, + startPrefixMapping: function (prefix, uri) {}, + endPrefixMapping: function (prefix) {}, + processingInstruction: function (target, data) { + var ins = this.doc.createProcessingInstruction(target, data); + this.locator && position(this.locator, ins); + appendElement(this, ins); + }, + ignorableWhitespace: function (ch, start, length) {}, + characters: function (chars, start, length) { + chars = _toString.apply(this, arguments); + //console.log(chars) + if (chars) { + if (this.cdata) { + var charNode = this.doc.createCDATASection(chars); + } else { + var charNode = this.doc.createTextNode(chars); + } + if (this.currentElement) { + this.currentElement.appendChild(charNode); + } else if (/^\s*$/.test(chars)) { + this.doc.appendChild(charNode); + //process xml + } + this.locator && position(this.locator, charNode); + } + }, + skippedEntity: function (name) {}, + endDocument: function () { + this.doc.normalize(); + }, + /** + * Stores the locator to be able to set the `columnNumber` and `lineNumber` + * on the created DOM nodes. + * + * @param {Locator} locator + */ + setDocumentLocator: function (locator) { + if (locator) { + locator.lineNumber = 0; + } + this.locator = locator; + }, + //LexicalHandler + comment: function (chars, start, length) { + chars = _toString.apply(this, arguments); + var comm = this.doc.createComment(chars); + this.locator && position(this.locator, comm); + appendElement(this, comm); + }, + + startCDATA: function () { + //used in characters() methods + this.cdata = true; + }, + endCDATA: function () { + this.cdata = false; + }, + + startDTD: function (name, publicId, systemId, internalSubset) { + var impl = this.doc.implementation; + if (impl && impl.createDocumentType) { + var dt = impl.createDocumentType(name, publicId, systemId, internalSubset); + this.locator && position(this.locator, dt); + appendElement(this, dt); + this.doc.doctype = dt; + } + }, + reportError: function (level, message) { + if (typeof this.onError === 'function') { + try { + this.onError(level, message, this); + } catch (e) { + throw new ParseError('Reporting ' + level + ' "' + message + '" caused ' + e, this.locator); + } + } else { + console.error('[xmldom ' + level + ']\t' + message, _locator(this.locator)); + } + }, + /** + * @see http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html + */ + warning: function (message) { + this.reportError('warning', message); + }, + error: function (message) { + this.reportError('error', message); + }, + /** + * This function reports a fatal error and throws a ParseError. + * + * @param {string} message + * - The message to be used for reporting and throwing the error. + * @returns {never} + * This function always throws an error and never returns a value. + * @throws {ParseError} + * Always throws a ParseError with the provided message. + */ + fatalError: function (message) { + this.reportError('fatalError', message); + throw new ParseError(message, this.locator); + }, +}; + +function _locator(l) { + if (l) { + return '\n@#[line:' + l.lineNumber + ',col:' + l.columnNumber + ']'; + } +} + +function _toString(chars, start, length) { + if (typeof chars == 'string') { + return chars.substr(start, length); + } else { + //java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)") + if (chars.length >= start + length || start) { + return new java.lang.String(chars, start, length) + ''; + } + return chars; + } +} + +/* + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html + * used method of org.xml.sax.ext.LexicalHandler: + * #comment(chars, start, length) + * #startCDATA() + * #endCDATA() + * #startDTD(name, publicId, systemId) + * + * + * IGNORED method of org.xml.sax.ext.LexicalHandler: + * #endDTD() + * #startEntity(name) + * #endEntity(name) + * + * + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html + * IGNORED method of org.xml.sax.ext.DeclHandler + * #attributeDecl(eName, aName, type, mode, value) + * #elementDecl(name, model) + * #externalEntityDecl(name, publicId, systemId) + * #internalEntityDecl(name, value) + * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html + * IGNORED method of org.xml.sax.EntityResolver2 + * #resolveEntity(String name,String publicId,String baseURI,String systemId) + * #resolveEntity(publicId, systemId) + * #getExternalSubset(name, baseURI) + * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html + * IGNORED method of org.xml.sax.DTDHandler + * #notationDecl(name, publicId, systemId) {}; + * #unparsedEntityDecl(name, publicId, systemId, notationName) {}; + */ +'endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl'.replace( + /\w+/g, + function (key) { + DOMHandler.prototype[key] = function () { + return null; + }; + } +); + +/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */ +function appendElement(handler, node) { + if (!handler.currentElement) { + handler.doc.appendChild(node); + } else { + handler.currentElement.appendChild(node); + } +} + +/** + * A method that prevents any further parsing when an `error` + * with level `error` is reported during parsing. + * + * @see {@link DOMParserOptions.onError} + * @see {@link onWarningStopParsing} + */ +function onErrorStopParsing(level) { + if (level === 'error') throw 'onErrorStopParsing'; +} + +/** + * A method that prevents any further parsing when any `error` is reported during parsing. + * + * @see {@link DOMParserOptions.onError} + * @see {@link onErrorStopParsing} + */ +function onWarningStopParsing() { + throw 'onWarningStopParsing'; +} + +exports.__DOMHandler = DOMHandler; +exports.DOMParser = DOMParser; +exports.normalizeLineEndings = normalizeLineEndings; +exports.onErrorStopParsing = onErrorStopParsing; +exports.onWarningStopParsing = onWarningStopParsing; + +},{"./conventions":4,"./dom":6,"./entities":7,"./errors":8,"./sax":11}],6:[function(require,module,exports){ +'use strict'; + +var conventions = require('./conventions'); +var find = conventions.find; +var hasDefaultHTMLNamespace = conventions.hasDefaultHTMLNamespace; +var hasOwn = conventions.hasOwn; +var isHTMLMimeType = conventions.isHTMLMimeType; +var isHTMLRawTextElement = conventions.isHTMLRawTextElement; +var isHTMLVoidElement = conventions.isHTMLVoidElement; +var MIME_TYPE = conventions.MIME_TYPE; +var NAMESPACE = conventions.NAMESPACE; + +/** + * Private DOM Constructor symbol + * + * Internal symbol used for construction of all classes whose constructors should be private. + * Currently used for checks in `Node`, `Document`, `Element`, `Attr`, `CharacterData`, `Text`, `Comment`, + * `CDATASection`, `DocumentType`, `Notation`, `Entity`, `EntityReference`, `DocumentFragment`, `ProcessingInstruction` + * so the constructor can't be used from outside the module. + */ +var PDC = Symbol(); + +var errors = require('./errors'); +var DOMException = errors.DOMException; +var DOMExceptionName = errors.DOMExceptionName; + +var g = require('./grammar'); + +/** + * Checks if the given symbol equals the Private DOM Constructor symbol (PDC) + * and throws an Illegal constructor exception when the symbols don't match. + * This ensures that the constructor remains private and can't be used outside this module. + */ +function checkSymbol(symbol) { + if (symbol !== PDC) { + throw new TypeError('Illegal constructor'); + } +} + +/** + * A prerequisite for `[].filter`, to drop elements that are empty. + * + * @param {string} input + * The string to be checked. + * @returns {boolean} + * Returns `true` if the input string is not empty, `false` otherwise. + */ +function notEmptyString(input) { + return input !== ''; +} +/** + * Splits a string on ASCII whitespace characters (U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, + * U+0020 SPACE). + * It follows the definition from the infra specification from WHATWG. + * + * @param {string} input + * The string to be split. + * @returns {string[]} + * An array of the split strings. The array can be empty if the input string is empty or only + * contains whitespace characters. + * @see {@link https://infra.spec.whatwg.org/#split-on-ascii-whitespace} + * @see {@link https://infra.spec.whatwg.org/#ascii-whitespace} + */ +function splitOnASCIIWhitespace(input) { + // U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, U+0020 SPACE + return input ? input.split(/[\t\n\f\r ]+/).filter(notEmptyString) : []; +} + +/** + * Adds element as a key to current if it is not already present. + * + * @param {Record} current + * The current record object to which the element will be added as a key. + * The object's keys are string types and values are either boolean or undefined. + * @param {string} element + * The string to be added as a key to the current record. + * @returns {Record} + * The updated record object after the addition of the new element. + */ +function orderedSetReducer(current, element) { + if (!hasOwn(current, element)) { + current[element] = true; + } + return current; +} + +/** + * Converts a string into an ordered set by splitting the input on ASCII whitespace and + * ensuring uniqueness of elements. + * This follows the definition of an ordered set from the infra specification by WHATWG. + * + * @param {string} input + * The input string to be transformed into an ordered set. + * @returns {string[]} + * An array of unique strings obtained from the input, preserving the original order. + * The array can be empty if the input string is empty or only contains whitespace characters. + * @see {@link https://infra.spec.whatwg.org/#ordered-set} + */ +function toOrderedSet(input) { + if (!input) return []; + var list = splitOnASCIIWhitespace(input); + return Object.keys(list.reduce(orderedSetReducer, {})); +} + +/** + * Uses `list.indexOf` to implement a function that behaves like `Array.prototype.includes`. + * This function is used in environments where `Array.prototype.includes` may not be available. + * + * @param {any[]} list + * The array in which to search for the element. + * @returns {function(any): boolean} + * A function that accepts an element and returns a boolean indicating whether the element is + * included in the provided list. + */ +function arrayIncludes(list) { + return function (element) { + return list && list.indexOf(element) !== -1; + }; +} + +/** + * Validates a qualified name based on the criteria provided in the DOM specification by + * WHATWG. + * + * @param {string} qualifiedName + * The qualified name to be validated. + * @throws {DOMException} + * With code {@link DOMException.INVALID_CHARACTER_ERR} if the qualified name contains an + * invalid character. + * @see {@link https://dom.spec.whatwg.org/#validate} + */ +function validateQualifiedName(qualifiedName) { + if (!g.QName_exact.test(qualifiedName)) { + throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 'invalid character in qualified name "' + qualifiedName + '"'); + } +} + +/** + * Validates a qualified name and the namespace associated with it, + * based on the criteria provided in the DOM specification by WHATWG. + * + * @param {string | null} namespace + * The namespace to be validated. It can be a string or null. + * @param {string} qualifiedName + * The qualified name to be validated. + * @returns {[namespace: string | null, prefix: string | null, localName: string]} + * Returns a tuple with the namespace, + * prefix and local name of the qualified name. + * @throws {DOMException} + * Throws a DOMException if the qualified name or the namespace is not valid. + * @see {@link https://dom.spec.whatwg.org/#validate-and-extract} + */ +function validateAndExtract(namespace, qualifiedName) { + validateQualifiedName(qualifiedName); + namespace = namespace || null; + /** + * @type {string | null} + */ + var prefix = null; + var localName = qualifiedName; + if (qualifiedName.indexOf(':') >= 0) { + var splitResult = qualifiedName.split(':'); + prefix = splitResult[0]; + localName = splitResult[1]; + } + if (prefix !== null && namespace === null) { + throw new DOMException(DOMException.NAMESPACE_ERR, 'prefix is non-null and namespace is null'); + } + if (prefix === 'xml' && namespace !== conventions.NAMESPACE.XML) { + throw new DOMException(DOMException.NAMESPACE_ERR, 'prefix is "xml" and namespace is not the XML namespace'); + } + if ((prefix === 'xmlns' || qualifiedName === 'xmlns') && namespace !== conventions.NAMESPACE.XMLNS) { + throw new DOMException( + DOMException.NAMESPACE_ERR, + 'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace' + ); + } + if (namespace === conventions.NAMESPACE.XMLNS && prefix !== 'xmlns' && qualifiedName !== 'xmlns') { + throw new DOMException( + DOMException.NAMESPACE_ERR, + 'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"' + ); + } + return [namespace, prefix, localName]; +} + +/** + * Copies properties from one object to another. + * It only copies the object's own (not inherited) properties. + * + * @param {Object} src + * The source object from which properties are copied. + * @param {Object} dest + * The destination object to which properties are copied. + */ +function copy(src, dest) { + for (var p in src) { + if (hasOwn(src, p)) { + dest[p] = src[p]; + } + } +} + +/** + * Extends a class with the properties and methods of a super class. + * It uses a form of prototypal inheritance, and establishes the `constructor` property + * correctly(?). + * + * It is not clear to the current maintainers if this implementation is making sense, + * since it creates an intermediate prototype function, + * which all properties of `Super` are copied onto using `_copy`. + * + * @param {Object} Class + * The class that is to be extended. + * @param {Object} Super + * The super class from which properties and methods are inherited. + * @private + */ +function _extends(Class, Super) { + var pt = Class.prototype; + if (!(pt instanceof Super)) { + function t() {} + t.prototype = Super.prototype; + t = new t(); + copy(pt, t); + Class.prototype = pt = t; + } + if (pt.constructor != Class) { + if (typeof Class != 'function') { + console.error('unknown Class:' + Class); + } + pt.constructor = Class; + } +} + +var NodeType = {}; +var ELEMENT_NODE = (NodeType.ELEMENT_NODE = 1); +var ATTRIBUTE_NODE = (NodeType.ATTRIBUTE_NODE = 2); +var TEXT_NODE = (NodeType.TEXT_NODE = 3); +var CDATA_SECTION_NODE = (NodeType.CDATA_SECTION_NODE = 4); +var ENTITY_REFERENCE_NODE = (NodeType.ENTITY_REFERENCE_NODE = 5); +var ENTITY_NODE = (NodeType.ENTITY_NODE = 6); +var PROCESSING_INSTRUCTION_NODE = (NodeType.PROCESSING_INSTRUCTION_NODE = 7); +var COMMENT_NODE = (NodeType.COMMENT_NODE = 8); +var DOCUMENT_NODE = (NodeType.DOCUMENT_NODE = 9); +var DOCUMENT_TYPE_NODE = (NodeType.DOCUMENT_TYPE_NODE = 10); +var DOCUMENT_FRAGMENT_NODE = (NodeType.DOCUMENT_FRAGMENT_NODE = 11); +var NOTATION_NODE = (NodeType.NOTATION_NODE = 12); + +var DocumentPosition = conventions.freeze({ + DOCUMENT_POSITION_DISCONNECTED: 1, + DOCUMENT_POSITION_PRECEDING: 2, + DOCUMENT_POSITION_FOLLOWING: 4, + DOCUMENT_POSITION_CONTAINS: 8, + DOCUMENT_POSITION_CONTAINED_BY: 16, + DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32, +}); + +//helper functions for compareDocumentPosition +/** + * Finds the common ancestor in two parent chains. + * + * @param {Node[]} a + * The first parent chain. + * @param {Node[]} b + * The second parent chain. + * @returns {Node} + * The common ancestor node if it exists. If there is no common ancestor, the function will + * return `null`. + */ +function commonAncestor(a, b) { + if (b.length < a.length) return commonAncestor(b, a); + var c = null; + for (var n in a) { + if (a[n] !== b[n]) return c; + c = a[n]; + } + return c; +} + +/** + * Assigns a unique identifier to a document to ensure consistency while comparing unrelated + * nodes. + * + * @param {Document} doc + * The document to which a unique identifier is to be assigned. + * @returns {string} + * The unique identifier of the document. If the document already had a unique identifier, the + * function will return the existing one. + */ +function docGUID(doc) { + if (!doc.guid) doc.guid = Math.random(); + return doc.guid; +} +//-- end of helper functions + +/** + * The NodeList interface provides the abstraction of an ordered collection of nodes, + * without defining or constraining how this collection is implemented. + * NodeList objects in the DOM are live. + * The items in the NodeList are accessible via an integral index, starting from 0. + * You can also access the items of the NodeList with a `for...of` loop. + * + * @class NodeList + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177 + * @constructs NodeList + */ +function NodeList() {} +NodeList.prototype = { + /** + * The number of nodes in the list. The range of valid child node indices is 0 to length-1 + * inclusive. + * + * @type {number} + */ + length: 0, + /** + * Returns the item at `index`. If index is greater than or equal to the number of nodes in + * the list, this returns null. + * + * @param index + * Unsigned long Index into the collection. + * @returns {Node | null} + * The node at position `index` in the NodeList, + * or null if that is not a valid index. + */ + item: function (index) { + return index >= 0 && index < this.length ? this[index] : null; + }, + /** + * Returns a string representation of the NodeList. + * + * Accepts the same `options` object as `XMLSerializer.prototype.serializeToString` + * (`requireWellFormed`, `splitCDATASections`, `nodeFilter`). Passing a function is treated as + * a legacy `nodeFilter` for backward compatibility. + * + * @param {Object | function} [options] + * @param {boolean} [options.requireWellFormed=false] + * @param {boolean} [options.splitCDATASections=true] + * @param {function} [options.nodeFilter] + * @returns {string} + */ + toString: function (options) { + var opts; + if (typeof options === 'function') { + opts = { requireWellFormed: false, splitCDATASections: true, nodeFilter: options }; + } else if (!!options) { + opts = { + requireWellFormed: !!options.requireWellFormed, + splitCDATASections: options.splitCDATASections !== false, + nodeFilter: options.nodeFilter || null, + }; + } else { + opts = { requireWellFormed: false, splitCDATASections: true, nodeFilter: null }; + } + for (var buf = [], i = 0; i < this.length; i++) { + serializeToString(this[i], buf, null, opts); + } + return buf.join(''); + }, + /** + * Filters the NodeList based on a predicate. + * + * @param {function(Node): boolean} predicate + * - A predicate function to filter the NodeList. + * @returns {Node[]} + * An array of nodes that satisfy the predicate. + * @private + */ + filter: function (predicate) { + return Array.prototype.filter.call(this, predicate); + }, + /** + * Returns the first index at which a given node can be found in the NodeList, or -1 if it is + * not present. + * + * @param {Node} item + * - The Node item to locate in the NodeList. + * @returns {number} + * The first index of the node in the NodeList; -1 if not found. + * @private + */ + indexOf: function (item) { + return Array.prototype.indexOf.call(this, item); + }, +}; +NodeList.prototype[Symbol.iterator] = function () { + var me = this; + var index = 0; + + return { + next: function () { + if (index < me.length) { + return { + value: me[index++], + done: false, + }; + } else { + return { + done: true, + }; + } + }, + return: function () { + return { + done: true, + }; + }, + }; +}; + +/** + * Represents a live collection of nodes that is automatically updated when its associated + * document changes. + * + * @class LiveNodeList + * @param {Node} node + * The associated node. + * @param {function} refresh + * The function to refresh the live node list. + * @augments NodeList + * @constructs LiveNodeList + */ +function LiveNodeList(node, refresh) { + this._node = node; + this._refresh = refresh; + _updateLiveList(this); +} +/** + * Updates the live node list. + * + * @param {LiveNodeList} list + * The live node list to update. + * @private + */ +function _updateLiveList(list) { + var inc = list._node._inc || list._node.ownerDocument._inc; + if (list._inc !== inc) { + var ls = list._refresh(list._node); + __set__(list, 'length', ls.length); + if (!list.$$length || ls.length < list.$$length) { + for (var i = ls.length; i in list; i++) { + if (hasOwn(list, i)) { + delete list[i]; + } + } + } + copy(ls, list); + list._inc = inc; + } +} +/** + * Returns the node at position `index` in the LiveNodeList, or null if that is not a valid + * index. + * + * @param {number} i + * Index into the collection. + * @returns {Node | null} + * The node at position `index` in the LiveNodeList, or null if that is not a valid index. + */ +LiveNodeList.prototype.item = function (i) { + _updateLiveList(this); + return this[i] || null; +}; + +_extends(LiveNodeList, NodeList); + +/** + * Objects implementing the NamedNodeMap interface are used to represent collections of nodes + * that can be accessed by name. + * Note that NamedNodeMap does not inherit from NodeList; + * NamedNodeMaps are not maintained in any particular order. + * Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal + * index, + * but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, + * and does not imply that the DOM specifies an order to these Nodes. + * NamedNodeMap objects in the DOM are live. + * used for attributes or DocumentType entities + * + * This implementation only supports property indices, but does not support named properties, + * as specified in the living standard. + * + * @class NamedNodeMap + * @see https://dom.spec.whatwg.org/#interface-namednodemap + * @see https://webidl.spec.whatwg.org/#dfn-supported-property-names + * @constructs NamedNodeMap + */ +function NamedNodeMap() {} +/** + * Returns the index of a node within the list. + * + * @param {Array} list + * The list of nodes. + * @param {Node} node + * The node to find. + * @returns {number} + * The index of the node within the list, or -1 if not found. + * @private + */ +function _findNodeIndex(list, node) { + var i = 0; + while (i < list.length) { + if (list[i] === node) { + return i; + } + i++; + } +} +/** + * Adds a new attribute to the list and updates the owner element of the attribute. + * + * @param {Element} el + * The element which will become the owner of the new attribute. + * @param {NamedNodeMap} list + * The list to which the new attribute will be added. + * @param {Attr} newAttr + * The new attribute to be added. + * @param {Attr} oldAttr + * The old attribute to be replaced, or null if no attribute is to be replaced. + * @returns {void} + * @private + */ +function _addNamedNode(el, list, newAttr, oldAttr) { + if (oldAttr) { + list[_findNodeIndex(list, oldAttr)] = newAttr; + } else { + list[list.length] = newAttr; + list.length++; + } + if (el) { + newAttr.ownerElement = el; + var doc = el.ownerDocument; + if (doc) { + oldAttr && _onRemoveAttribute(doc, el, oldAttr); + _onAddAttribute(doc, el, newAttr); + } + } +} +/** + * Removes an attribute from the list and updates the owner element of the attribute. + * + * @param {Element} el + * The element which is the current owner of the attribute. + * @param {NamedNodeMap} list + * The list from which the attribute will be removed. + * @param {Attr} attr + * The attribute to be removed. + * @returns {void} + * @private + */ +function _removeNamedNode(el, list, attr) { + //console.log('remove attr:'+attr) + var i = _findNodeIndex(list, attr); + if (i >= 0) { + var lastIndex = list.length - 1; + while (i <= lastIndex) { + list[i] = list[++i]; + } + list.length = lastIndex; + if (el) { + var doc = el.ownerDocument; + if (doc) { + _onRemoveAttribute(doc, el, attr); + } + attr.ownerElement = null; + } + } +} +NamedNodeMap.prototype = { + length: 0, + item: NodeList.prototype.item, + + /** + * Get an attribute by name. Note: Name is in lower case in case of HTML namespace and + * document. + * + * @param {string} localName + * The local name of the attribute. + * @returns {Attr | null} + * The attribute with the given local name, or null if no such attribute exists. + * @see https://dom.spec.whatwg.org/#concept-element-attributes-get-by-name + */ + getNamedItem: function (localName) { + if (this._ownerElement && this._ownerElement._isInHTMLDocumentAndNamespace()) { + localName = localName.toLowerCase(); + } + var i = 0; + while (i < this.length) { + var attr = this[i]; + if (attr.nodeName === localName) { + return attr; + } + i++; + } + return null; + }, + + /** + * Set an attribute. + * + * @param {Attr} attr + * The attribute to set. + * @returns {Attr | null} + * The old attribute with the same local name and namespace URI as the new one, or null if no + * such attribute exists. + * @throws {DOMException} + * With code: + * - {@link INUSE_ATTRIBUTE_ERR} - If the attribute is already an attribute of another + * element. + * @see https://dom.spec.whatwg.org/#concept-element-attributes-set + */ + setNamedItem: function (attr) { + var el = attr.ownerElement; + if (el && el !== this._ownerElement) { + throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR); + } + var oldAttr = this.getNamedItemNS(attr.namespaceURI, attr.localName); + if (oldAttr === attr) { + return attr; + } + _addNamedNode(this._ownerElement, this, attr, oldAttr); + return oldAttr; + }, + + /** + * Set an attribute, replacing an existing attribute with the same local name and namespace + * URI if one exists. + * + * @param {Attr} attr + * The attribute to set. + * @returns {Attr | null} + * The old attribute with the same local name and namespace URI as the new one, or null if no + * such attribute exists. + * @throws {DOMException} + * Throws a DOMException with the name "InUseAttributeError" if the attribute is already an + * attribute of another element. + * @see https://dom.spec.whatwg.org/#concept-element-attributes-set + */ + setNamedItemNS: function (attr) { + return this.setNamedItem(attr); + }, + + /** + * Removes an attribute specified by the local name. + * + * @param {string} localName + * The local name of the attribute to be removed. + * @returns {Attr} + * The attribute node that was removed. + * @throws {DOMException} + * With code: + * - {@link DOMException.NOT_FOUND_ERR} if no attribute with the given name is found. + * @see https://dom.spec.whatwg.org/#dom-namednodemap-removenameditem + * @see https://dom.spec.whatwg.org/#concept-element-attributes-remove-by-name + */ + removeNamedItem: function (localName) { + var attr = this.getNamedItem(localName); + if (!attr) { + throw new DOMException(DOMException.NOT_FOUND_ERR, localName); + } + _removeNamedNode(this._ownerElement, this, attr); + return attr; + }, + + /** + * Removes an attribute specified by the namespace and local name. + * + * @param {string | null} namespaceURI + * The namespace URI of the attribute to be removed. + * @param {string} localName + * The local name of the attribute to be removed. + * @returns {Attr} + * The attribute node that was removed. + * @throws {DOMException} + * With code: + * - {@link DOMException.NOT_FOUND_ERR} if no attribute with the given namespace URI and local + * name is found. + * @see https://dom.spec.whatwg.org/#dom-namednodemap-removenameditemns + * @see https://dom.spec.whatwg.org/#concept-element-attributes-remove-by-namespace + */ + removeNamedItemNS: function (namespaceURI, localName) { + var attr = this.getNamedItemNS(namespaceURI, localName); + if (!attr) { + throw new DOMException(DOMException.NOT_FOUND_ERR, namespaceURI ? namespaceURI + ' : ' + localName : localName); + } + _removeNamedNode(this._ownerElement, this, attr); + return attr; + }, + + /** + * Get an attribute by namespace and local name. + * + * @param {string | null} namespaceURI + * The namespace URI of the attribute. + * @param {string} localName + * The local name of the attribute. + * @returns {Attr | null} + * The attribute with the given namespace URI and local name, or null if no such attribute + * exists. + * @see https://dom.spec.whatwg.org/#concept-element-attributes-get-by-namespace + */ + getNamedItemNS: function (namespaceURI, localName) { + if (!namespaceURI) { + namespaceURI = null; + } + var i = 0; + while (i < this.length) { + var node = this[i]; + if (node.localName === localName && node.namespaceURI === namespaceURI) { + return node; + } + i++; + } + return null; + }, +}; +NamedNodeMap.prototype[Symbol.iterator] = function () { + var me = this; + var index = 0; + + return { + next: function () { + if (index < me.length) { + return { + value: me[index++], + done: false, + }; + } else { + return { + done: true, + }; + } + }, + return: function () { + return { + done: true, + }; + }, + }; +}; + +/** + * The DOMImplementation interface provides a number of methods for performing operations that + * are independent of any particular instance of the document object model. + * + * The DOMImplementation interface represents an object providing methods which are not + * dependent on any particular document. + * Such an object is returned by the `Document.implementation` property. + * + * **The individual methods describe the differences compared to the specs**. + * + * @class DOMImplementation + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation MDN + * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 DOM Level 1 Core + * (Initial) + * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 DOM Level 2 Core + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490 DOM Level 3 Core + * @see https://dom.spec.whatwg.org/#domimplementation DOM Living Standard + * @constructs DOMImplementation + */ +function DOMImplementation() {} + +DOMImplementation.prototype = { + /** + * Test if the DOM implementation implements a specific feature and version, as specified in + * {@link https://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMFeatures DOM Features}. + * + * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given + * feature is supported. The different implementations fairly diverged in what kind of + * features were reported. The latest version of the spec settled to force this method to + * always return true, where the functionality was accurate and in use. + * + * @deprecated + * It is deprecated and modern browsers return true in all cases. + * @function DOMImplementation#hasFeature + * @param {string} feature + * The name of the feature to test. + * @param {string} [version] + * This is the version number of the feature to test. + * @returns {boolean} + * Always returns true. + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN + * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core + * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-5CED94D7 DOM Level 3 Core + */ + hasFeature: function (feature, version) { + return true; + }, + /** + * Creates a DOM Document object of the specified type with its document element. Note that + * based on the {@link DocumentType} + * given to create the document, the implementation may instantiate specialized + * {@link Document} objects that support additional features than the "Core", such as "HTML" + * {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#DOM2HTML DOM Level 2 HTML}. + * On the other hand, setting the {@link DocumentType} after the document was created makes + * this very unlikely to happen. Alternatively, specialized {@link Document} creation methods, + * such as createHTMLDocument + * {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#DOM2HTML DOM Level 2 HTML}, + * can be used to obtain specific types of {@link Document} objects. + * + * __It behaves slightly different from the description in the living standard__: + * - There is no interface/class `XMLDocument`, it returns a `Document` + * instance (with it's `type` set to `'xml'`). + * - `encoding`, `mode`, `origin`, `url` fields are currently not declared. + * + * @function DOMImplementation.createDocument + * @param {string | null} namespaceURI + * The + * {@link https://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-namespaceURI namespace URI} + * of the document element to create or null. + * @param {string | null} qualifiedName + * The + * {@link https://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-qualifiedname qualified name} + * of the document element to be created or null. + * @param {DocumentType | null} [doctype=null] + * The type of document to be created or null. When doctype is not null, its + * {@link Node#ownerDocument} attribute is set to the document being created. Default is + * `null` + * @returns {Document} + * A new {@link Document} object with its document element. If the NamespaceURI, + * qualifiedName, and doctype are null, the returned {@link Document} is empty with no + * document element. + * @throws {DOMException} + * With code: + * + * - `INVALID_CHARACTER_ERR`: Raised if the specified qualified name is not an XML name + * according to {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#XML XML 1.0}. + * - `NAMESPACE_ERR`: Raised if the qualifiedName is malformed, if the qualifiedName has a + * prefix and the namespaceURI is null, or if the qualifiedName is null and the namespaceURI + * is different from null, or if the qualifiedName has a prefix that is "xml" and the + * namespaceURI is different from "{@link http://www.w3.org/XML/1998/namespace}" + * {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#Namespaces XML Namespaces}, + * or if the DOM implementation does not support the "XML" feature but a non-null namespace + * URI was provided, since namespaces were defined by XML. + * - `WRONG_DOCUMENT_ERR`: Raised if doctype has already been used with a different document + * or was created from a different implementation. + * - `NOT_SUPPORTED_ERR`: May be raised if the implementation does not support the feature + * "XML" and the language exposed through the Document does not support XML Namespaces (such + * as {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#HTML40 HTML 4.01}). + * @since DOM Level 2. + * @see {@link #createHTMLDocument} + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument DOM Living Standard + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-2-Core-DOM-createDocument DOM + * Level 3 Core + * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM + * Level 2 Core (initial) + */ + createDocument: function (namespaceURI, qualifiedName, doctype) { + var contentType = MIME_TYPE.XML_APPLICATION; + if (namespaceURI === NAMESPACE.HTML) { + contentType = MIME_TYPE.XML_XHTML_APPLICATION; + } else if (namespaceURI === NAMESPACE.SVG) { + contentType = MIME_TYPE.XML_SVG_IMAGE; + } + var doc = new Document(PDC, { contentType: contentType }); + doc.implementation = this; + doc.childNodes = new NodeList(); + doc.doctype = doctype || null; + if (doctype) { + doc.appendChild(doctype); + } + if (qualifiedName) { + var root = doc.createElementNS(namespaceURI, qualifiedName); + doc.appendChild(root); + } + return doc; + }, + /** + * Creates an empty DocumentType node. Entity declarations and notations are not made + * available. Entity reference expansions and default attribute additions do not occur. + * + * **This behavior is slightly different from the one in the specs**: + * - `encoding`, `mode`, `origin`, `url` fields are currently not declared. + * - `publicId` and `systemId` contain the raw data including any possible quotes, + * so they can always be serialized back to the original value + * - `internalSubset` contains the raw string between `[` and `]` if present, + * but is not parsed or validated in any form. + * + * @function DOMImplementation#createDocumentType + * @param {string} qualifiedName + * The {@link https://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-qualifiedname qualified + * name} of the document type to be created. + * @param {string} [publicId] + * The external subset public identifier. Stored verbatim including surrounding quotes. + * When serialized with `requireWellFormed: true`, the serializer throws `InvalidStateError` + * if the value is non-empty and does not match the XML `PubidLiteral` production + * (W3C DOM Parsing §3.2.1.3; XML 1.0 production [12]). Creation-time validation is not + * enforced — deferred to a future breaking release. + * @param {string} [systemId] + * The external subset system identifier. Stored verbatim including surrounding quotes. + * When serialized with `requireWellFormed: true`, the serializer throws `InvalidStateError` + * if the value is non-empty and does not match the XML `SystemLiteral` production + * (W3C DOM Parsing §3.2.1.3; XML 1.0 production [11]). Creation-time validation is not + * enforced — deferred to a future breaking release. + * @param {string} [internalSubset] + * The internal subset or an empty string if it is not present. Stored verbatim. + * When serialized with `requireWellFormed: true`, the serializer throws `InvalidStateError` + * if the value contains `"]>"`. Creation-time validation is not enforced. + * @returns {DocumentType} + * A new {@link DocumentType} node with {@link Node#ownerDocument} set to null. + * @throws {DOMException} + * With code: + * + * - `INVALID_CHARACTER_ERR`: Raised if the specified qualified name is not an XML name + * according to {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#XML XML 1.0}. + * - `NAMESPACE_ERR`: Raised if the qualifiedName is malformed. + * - `NOT_SUPPORTED_ERR`: May be raised if the implementation does not support the feature + * "XML" and the language exposed through the Document does not support XML Namespaces (such + * as {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#HTML40 HTML 4.01}). + * @since DOM Level 2. + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType + * MDN + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living + * Standard + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-3-Core-DOM-createDocType DOM + * Level 3 Core + * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM + * Level 2 Core + * @see https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md#050 + * @see https://www.w3.org/TR/DOM-Level-2-Core/#core-ID-Core-DocType-internalSubset + * @prettierignore + */ + createDocumentType: function (qualifiedName, publicId, systemId, internalSubset) { + validateQualifiedName(qualifiedName); + var node = new DocumentType(PDC); + node.name = qualifiedName; + node.nodeName = qualifiedName; + node.publicId = publicId || ''; + node.systemId = systemId || ''; + node.internalSubset = internalSubset || ''; + node.childNodes = new NodeList(); + + return node; + }, + /** + * Returns an HTML document, that might already have a basic DOM structure. + * + * __It behaves slightly different from the description in the living standard__: + * - If the first argument is `false` no initial nodes are added (steps 3-7 in the specs are + * omitted) + * - `encoding`, `mode`, `origin`, `url` fields are currently not declared. + * + * @param {string | false} [title] + * A string containing the title to give the new HTML document. + * @returns {Document} + * The HTML document. + * @since WHATWG Living Standard. + * @see {@link #createDocument} + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument + * @see https://dom.spec.whatwg.org/#html-document + */ + createHTMLDocument: function (title) { + var doc = new Document(PDC, { contentType: MIME_TYPE.HTML }); + doc.implementation = this; + doc.childNodes = new NodeList(); + if (title !== false) { + doc.doctype = this.createDocumentType('html'); + doc.doctype.ownerDocument = doc; + doc.appendChild(doc.doctype); + var htmlNode = doc.createElement('html'); + doc.appendChild(htmlNode); + var headNode = doc.createElement('head'); + htmlNode.appendChild(headNode); + if (typeof title === 'string') { + var titleNode = doc.createElement('title'); + titleNode.appendChild(doc.createTextNode(title)); + headNode.appendChild(titleNode); + } + htmlNode.appendChild(doc.createElement('body')); + } + return doc; + }, +}; + +/** + * The DOM Node interface is an abstract base class upon which many other DOM API objects are + * based, thus letting those object types to be used similarly and often interchangeably. As an + * abstract class, there is no such thing as a plain Node object. All objects that implement + * Node functionality are based on one of its subclasses. Most notable are Document, Element, + * and DocumentFragment. + * + * In addition, every kind of DOM node is represented by an interface based on Node. These + * include Attr, CharacterData (which Text, Comment, CDATASection and ProcessingInstruction are + * all based on), and DocumentType. + * + * In some cases, a particular feature of the base Node interface may not apply to one of its + * child interfaces; in that case, the inheriting node may return null or throw an exception, + * depending on circumstances. For example, attempting to add children to a node type that + * cannot have children will throw an exception. + * + * **This behavior is slightly different from the in the specs**: + * - unimplemented interfaces: `EventTarget` + * + * @class + * @abstract + * @param {Symbol} symbol + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247 + * @see https://dom.spec.whatwg.org/#node + * @prettierignore + */ +function Node(symbol) { + checkSymbol(symbol); +} + +Node.prototype = { + /** + * The first child of this node. + * + * @type {Node | null} + */ + firstChild: null, + /** + * The last child of this node. + * + * @type {Node | null} + */ + lastChild: null, + /** + * The previous sibling of this node. + * + * @type {Node | null} + */ + previousSibling: null, + /** + * The next sibling of this node. + * + * @type {Node | null} + */ + nextSibling: null, + /** + * The parent node of this node. + * + * @type {Node | null} + */ + parentNode: null, + /** + * The parent element of this node. + * + * @type {Element | null} + */ + get parentElement() { + return this.parentNode && this.parentNode.nodeType === this.ELEMENT_NODE ? this.parentNode : null; + }, + /** + * The child nodes of this node. + * + * @type {NodeList} + */ + childNodes: null, + /** + * The document object associated with this node. + * + * @type {Document | null} + */ + ownerDocument: null, + /** + * The value of this node. + * + * @type {string | null} + */ + nodeValue: null, + /** + * The namespace URI of this node. + * + * @type {string | null} + */ + namespaceURI: null, + /** + * The prefix of the namespace for this node. + * + * @type {string | null} + */ + prefix: null, + /** + * The local part of the qualified name of this node. + * + * @type {string | null} + */ + localName: null, + /** + * The baseURI is currently always `about:blank`, + * since that's what happens when you create a document from scratch. + * + * @type {'about:blank'} + */ + baseURI: 'about:blank', + /** + * Is true if this node is part of a document. + * + * @type {boolean} + */ + get isConnected() { + var rootNode = this.getRootNode(); + return rootNode && rootNode.nodeType === rootNode.DOCUMENT_NODE; + }, + /** + * Checks whether `other` is an inclusive descendant of this node. + * + * @param {Node | null | undefined} other + * The node to check. + * @returns {boolean} + * True if `other` is an inclusive descendant of this node; false otherwise. + * @see https://dom.spec.whatwg.org/#dom-node-contains + */ + contains: function (other) { + if (!other) return false; + var parent = other; + do { + if (this === parent) return true; + parent = parent.parentNode; + } while (parent); + return false; + }, + /** + * @typedef GetRootNodeOptions + * @property {boolean} [composed=false] + */ + /** + * Searches for the root node of this node. + * + * **This behavior is slightly different from the in the specs**: + * - ignores `options.composed`, since `ShadowRoot`s are unsupported, always returns root. + * + * @param {GetRootNodeOptions} [options] + * @returns {Node} + * Root node. + * @see https://dom.spec.whatwg.org/#dom-node-getrootnode + * @see https://dom.spec.whatwg.org/#concept-shadow-including-root + */ + getRootNode: function (options) { + var parent = this; + do { + if (!parent.parentNode) { + return parent; + } + parent = parent.parentNode; + } while (parent); + }, + /** + * Checks whether the given node is equal to this node. + * + * Two nodes are equal when they have the same type, defining characteristics (for the type), + * and the same childNodes. The comparison is iterative to avoid stack overflows on + * deeply-nested trees. Attribute nodes of each Element pair are also pushed onto the stack + * and compared the same way. + * + * @param {Node} [otherNode] + * @returns {boolean} + * @see https://dom.spec.whatwg.org/#concept-node-equals + * @see ../docs/walk-dom.md. + */ + isEqualNode: function (otherNode) { + if (!otherNode) return false; + + // Use an explicit {node, other} pair stack to avoid call-stack overflow on deep trees. + // walkDOM cannot be used here — parallel two-tree traversal requires pairing + // corresponding nodes at each step across both trees simultaneously. + var stack = [{ node: this, other: otherNode }]; + while (stack.length > 0) { + var pair = stack.pop(); + var node = pair.node; + var other = pair.other; + + if (node.nodeType !== other.nodeType) return false; + + switch (node.nodeType) { + case node.DOCUMENT_TYPE_NODE: + if (node.name !== other.name) return false; + if (node.publicId !== other.publicId) return false; + if (node.systemId !== other.systemId) return false; + break; + case node.ELEMENT_NODE: + if (node.namespaceURI !== other.namespaceURI) return false; + if (node.prefix !== other.prefix) return false; + if (node.localName !== other.localName) return false; + if (node.attributes.length !== other.attributes.length) return false; + for (var i = 0; i < node.attributes.length; i++) { + var attr = node.attributes.item(i); + var otherAttr = other.getAttributeNodeNS(attr.namespaceURI, attr.localName); + if (!otherAttr) return false; + stack.push({ node: attr, other: otherAttr }); + } + break; + case node.ATTRIBUTE_NODE: + if (node.namespaceURI !== other.namespaceURI) return false; + if (node.localName !== other.localName) return false; + if (node.value !== other.value) return false; + break; + case node.PROCESSING_INSTRUCTION_NODE: + if (node.target !== other.target || node.data !== other.data) return false; + break; + case node.TEXT_NODE: + case node.CDATA_SECTION_NODE: + case node.COMMENT_NODE: + if (node.data !== other.data) return false; + break; + } + + if (node.childNodes.length !== other.childNodes.length) return false; + + // Push children in reverse order so index 0 is processed first (LIFO). + for (var i = node.childNodes.length - 1; i >= 0; i--) { + stack.push({ node: node.childNodes[i], other: other.childNodes[i] }); + } + } + + return true; + }, + /** + * Checks whether or not the given node is this node. + * + * @param {Node} [otherNode] + */ + isSameNode: function (otherNode) { + return this === otherNode; + }, + /** + * Inserts a node before a reference node as a child of this node. + * + * @param {Node} newChild + * The new child node to be inserted. + * @param {Node | null} refChild + * The reference node before which newChild will be inserted. + * @returns {Node} + * The new child node successfully inserted. + * @throws {DOMException} + * Throws a DOMException if inserting the node would result in a DOM tree that is not + * well-formed, or if `child` is provided but is not a child of `parent`. + * See {@link _insertBefore} for more details. + * @since Modified in DOM L2 + */ + insertBefore: function (newChild, refChild) { + return _insertBefore(this, newChild, refChild); + }, + /** + * Replaces an old child node with a new child node within this node. + * + * @param {Node} newChild + * The new node that is to replace the old node. + * If it already exists in the DOM, it is removed from its original position. + * @param {Node} oldChild + * The existing child node to be replaced. + * @returns {Node} + * Returns the replaced child node. + * @throws {DOMException} + * Throws a DOMException if replacing the node would result in a DOM tree that is not + * well-formed, or if `oldChild` is not a child of `this`. + * This can also occur if the pre-replacement validity assertion fails. + * See {@link _insertBefore}, {@link Node.removeChild}, and + * {@link assertPreReplacementValidityInDocument} for more details. + * @see https://dom.spec.whatwg.org/#concept-node-replace + */ + replaceChild: function (newChild, oldChild) { + _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument); + if (oldChild) { + this.removeChild(oldChild); + } + }, + /** + * Removes an existing child node from this node. + * + * @param {Node} oldChild + * The child node to be removed. + * @returns {Node} + * Returns the removed child node. + * @throws {DOMException} + * Throws a DOMException if `oldChild` is not a child of `this`. + * See {@link _removeChild} for more details. + */ + removeChild: function (oldChild) { + return _removeChild(this, oldChild); + }, + /** + * Appends a child node to this node. + * + * @param {Node} newChild + * The child node to be appended to this node. + * If it already exists in the DOM, it is removed from its original position. + * @returns {Node} + * Returns the appended child node. + * @throws {DOMException} + * Throws a DOMException if appending the node would result in a DOM tree that is not + * well-formed, or if `newChild` is not a valid Node. + * See {@link insertBefore} for more details. + */ + appendChild: function (newChild) { + return this.insertBefore(newChild, null); + }, + /** + * Determines whether this node has any child nodes. + * + * @returns {boolean} + * Returns true if this node has any child nodes, and false otherwise. + */ + hasChildNodes: function () { + return this.firstChild != null; + }, + /** + * Creates a copy of the calling node. + * + * @param {boolean} deep + * If true, the contents of the node are recursively copied. + * If false, only the node itself (and its attributes, if it is an element) are copied. + * @returns {Node} + * Returns the newly created copy of the node. + * @throws {DOMException} + * May throw a DOMException if operations within {@link Element#setAttributeNode} or + * {@link Node#appendChild} (which are potentially invoked in this method) do not meet their + * specific constraints. + * @see {@link cloneNode} + */ + cloneNode: function (deep) { + return cloneNode(this.ownerDocument || this, this, deep); + }, + /** + * Puts the specified node and all of its subtree into a "normalized" form. In a normalized + * subtree, no text nodes in the subtree are empty and there are no adjacent text nodes. + * + * Specifically, this method merges any adjacent text nodes (i.e., nodes for which `nodeType` + * is `TEXT_NODE`) into a single node with the combined data. It also removes any empty text + * nodes. + * + * This method iterativly traverses all child nodes to normalize all descendent nodes within + * the subtree. + * + * @throws {DOMException} + * May throw a DOMException if operations within removeChild or appendData (which are + * potentially invoked in this method) do not meet their specific constraints. + * @since Modified in DOM Level 2 + * @see {@link Node.removeChild} + * @see {@link CharacterData.appendData} + * @see ../docs/walk-dom.md. + */ + normalize: function () { + walkDOM(this, null, { + enter: function (node) { + // Merge adjacent text children of node before walkDOM schedules them. + // walkDOM reads lastChild/previousSibling after enter returns, so the + // surviving post-merge children are what it descends into. + var child = node.firstChild; + while (child) { + var next = child.nextSibling; + if (next !== null && next.nodeType === TEXT_NODE && child.nodeType === TEXT_NODE) { + node.removeChild(next); + child.appendData(next.data); + // Do not advance child: re-check new nextSibling for another text run + } else { + child = next; + } + } + return true; // descend into surviving children + }, + }); + }, + /** + * Checks whether the DOM implementation implements a specific feature and its version. + * + * @deprecated + * Since `DOMImplementation.hasFeature` is deprecated and always returns true. + * @param {string} feature + * The package name of the feature to test. This is the same name that can be passed to the + * method `hasFeature` on `DOMImplementation`. + * @param {string} version + * This is the version number of the package name to test. + * @returns {boolean} + * Returns true in all cases in the current implementation. + * @since Introduced in DOM Level 2 + * @see {@link DOMImplementation.hasFeature} + */ + isSupported: function (feature, version) { + return this.ownerDocument.implementation.hasFeature(feature, version); + }, + /** + * Look up the prefix associated to the given namespace URI, starting from this node. + * **The default namespace declarations are ignored by this method.** + * See Namespace Prefix Lookup for details on the algorithm used by this method. + * + * **This behavior is different from the in the specs**: + * - no node type specific handling + * - uses the internal attribute _nsMap for resolving namespaces that is updated when changing attributes + * + * @param {string | null} namespaceURI + * The namespace URI for which to find the associated prefix. + * @returns {string | null} + * The associated prefix, if found; otherwise, null. + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix + * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo + * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix + * @see https://github.com/xmldom/xmldom/issues/322 + * @prettierignore + */ + lookupPrefix: function (namespaceURI) { + var el = this; + while (el) { + var map = el._nsMap; + //console.dir(map) + if (map) { + for (var n in map) { + if (hasOwn(map, n) && map[n] === namespaceURI) { + return n; + } + } + } + el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode; + } + return null; + }, + /** + * This function is used to look up the namespace URI associated with the given prefix, + * starting from this node. + * + * **This behavior is different from the in the specs**: + * - no node type specific handling + * - uses the internal attribute _nsMap for resolving namespaces that is updated when changing attributes + * + * @param {string | null} prefix + * The prefix for which to find the associated namespace URI. + * @returns {string | null} + * The associated namespace URI, if found; otherwise, null. + * @since DOM Level 3 + * @see https://dom.spec.whatwg.org/#dom-node-lookupnamespaceuri + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespaceURI + * @prettierignore + */ + lookupNamespaceURI: function (prefix) { + var el = this; + while (el) { + var map = el._nsMap; + //console.dir(map) + if (map) { + if (hasOwn(map, prefix)) { + return map[prefix]; + } + } + el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode; + } + return null; + }, + /** + * Determines whether the given namespace URI is the default namespace. + * + * The function works by looking up the prefix associated with the given namespace URI. If no + * prefix is found (i.e., the namespace URI is not registered in the namespace map of this + * node or any of its ancestors), it returns `true`, implying the namespace URI is considered + * the default. + * + * **This behavior is different from the in the specs**: + * - no node type specific handling + * - uses the internal attribute _nsMap for resolving namespaces that is updated when changing attributes + * + * @param {string | null} namespaceURI + * The namespace URI to be checked. + * @returns {boolean} + * Returns true if the given namespace URI is the default namespace, false otherwise. + * @since DOM Level 3 + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isDefaultNamespace + * @see https://dom.spec.whatwg.org/#dom-node-isdefaultnamespace + * @prettierignore + */ + isDefaultNamespace: function (namespaceURI) { + var prefix = this.lookupPrefix(namespaceURI); + return prefix == null; + }, + /** + * Compares the reference node with a node with regard to their position in the document and + * according to the document order. + * + * @param {Node} other + * The node to compare the reference node to. + * @returns {number} + * Returns how the node is positioned relatively to the reference node according to the + * bitmask. 0 if reference node and given node are the same. + * @since DOM Level 3 + * @see https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#Node3-compare + * @see https://dom.spec.whatwg.org/#dom-node-comparedocumentposition + */ + compareDocumentPosition: function (other) { + if (this === other) return 0; + var node1 = other; + var node2 = this; + var attr1 = null; + var attr2 = null; + if (node1 instanceof Attr) { + attr1 = node1; + node1 = attr1.ownerElement; + } + if (node2 instanceof Attr) { + attr2 = node2; + node2 = attr2.ownerElement; + if (attr1 && node1 && node2 === node1) { + for (var i = 0, attr; (attr = node2.attributes[i]); i++) { + if (attr === attr1) + return DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC + DocumentPosition.DOCUMENT_POSITION_PRECEDING; + if (attr === attr2) + return DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC + DocumentPosition.DOCUMENT_POSITION_FOLLOWING; + } + } + } + if (!node1 || !node2 || node2.ownerDocument !== node1.ownerDocument) { + return ( + DocumentPosition.DOCUMENT_POSITION_DISCONNECTED + + DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC + + (docGUID(node2.ownerDocument) > docGUID(node1.ownerDocument) + ? DocumentPosition.DOCUMENT_POSITION_FOLLOWING + : DocumentPosition.DOCUMENT_POSITION_PRECEDING) + ); + } + if (attr2 && node1 === node2) { + return DocumentPosition.DOCUMENT_POSITION_CONTAINS + DocumentPosition.DOCUMENT_POSITION_PRECEDING; + } + if (attr1 && node1 === node2) { + return DocumentPosition.DOCUMENT_POSITION_CONTAINED_BY + DocumentPosition.DOCUMENT_POSITION_FOLLOWING; + } + + var chain1 = []; + var ancestor1 = node1.parentNode; + while (ancestor1) { + if (!attr2 && ancestor1 === node2) { + return DocumentPosition.DOCUMENT_POSITION_CONTAINED_BY + DocumentPosition.DOCUMENT_POSITION_FOLLOWING; + } + chain1.push(ancestor1); + ancestor1 = ancestor1.parentNode; + } + chain1.reverse(); + + var chain2 = []; + var ancestor2 = node2.parentNode; + while (ancestor2) { + if (!attr1 && ancestor2 === node1) { + return DocumentPosition.DOCUMENT_POSITION_CONTAINS + DocumentPosition.DOCUMENT_POSITION_PRECEDING; + } + chain2.push(ancestor2); + ancestor2 = ancestor2.parentNode; + } + chain2.reverse(); + + var ca = commonAncestor(chain1, chain2); + for (var n in ca.childNodes) { + var child = ca.childNodes[n]; + if (child === node2) return DocumentPosition.DOCUMENT_POSITION_FOLLOWING; + if (child === node1) return DocumentPosition.DOCUMENT_POSITION_PRECEDING; + if (chain2.indexOf(child) >= 0) return DocumentPosition.DOCUMENT_POSITION_FOLLOWING; + if (chain1.indexOf(child) >= 0) return DocumentPosition.DOCUMENT_POSITION_PRECEDING; + } + return 0; + }, +}; + +/** + * Encodes special XML characters to their corresponding entities. + * + * @param {string} c + * The character to be encoded. + * @returns {string} + * The encoded character. + * @private + */ +function _xmlEncoder(c) { + return ( + (c == '<' && '<') || (c == '>' && '>') || (c == '&' && '&') || (c == '"' && '"') || '&#' + c.charCodeAt() + ';' + ); +} + +copy(NodeType, Node); +copy(NodeType, Node.prototype); +copy(DocumentPosition, Node); +copy(DocumentPosition, Node.prototype); + +/** + * Visits every node in the subtree rooted at `node` in depth-first pre-order. + * + * Delegates to {@link walkDOM} for traversal. The `callback` is called on each node; + * if it returns a truthy value, traversal stops immediately. + * + * @param {Node} node + * Root of the subtree to visit. + * @param {function(Node): *} callback + * Called for each node. A truthy return value stops traversal early. + */ +function _visitNode(node, callback) { + walkDOM(node, null, { + enter: function (n) { + return callback(n) ? walkDOM.STOP : true; + }, + }); +} + +/** + * Depth-first pre/post-order DOM tree walker. + * + * Visits every node in the subtree rooted at `node`. For each node: + * + * 1. Calls `callbacks.enter(node, context)` before descending into the node's children. The + * return value becomes the `context` passed to each child's `enter` call and to the matching + * `exit` call. + * 2. If `enter` returns `null` or `undefined`, the node's children are skipped; + * sibling traversal continues normally. + * 3. If `enter` returns `walkDOM.STOP`, the entire traversal is aborted immediately — no + * further `enter` or `exit` calls are made. + * 4. `lastChild` and `previousSibling` are read **after** `enter` returns, so `enter` may + * safely modify the node's own child list before the walker descends. Modifying siblings of + * the current node or any other part of the tree produces unpredictable results: nodes already + * queued on the stack are visited regardless of DOM changes, and newly inserted nodes outside + * the current child list are never visited. + * 5. Calls `callbacks.exit(node, context)` (if provided) after all of a node's children have + * been visited, passing the same `context` that `enter` + * returned for that node. + * + * This implementation uses an explicit stack and does not recurse — it is safe on arbitrarily + * deep trees. + * + * @param {Node} node + * Root of the subtree to walk. + * @param {*} context + * Initial context value passed to the root node's `enter`. + * @param {{ enter: function(Node, *): *, exit?: function(Node, *): void }} callbacks + * @returns {void | walkDOM.STOP} + * @see ../docs/walk-dom.md. + */ +function walkDOM(node, context, callbacks) { + // Each stack frame is {node, context, phase}: + // walkDOM.ENTER — call enter, then push children + // walkDOM.EXIT — call exit + var stack = [{ node: node, context: context, phase: walkDOM.ENTER }]; + while (stack.length > 0) { + var frame = stack.pop(); + if (frame.phase === walkDOM.ENTER) { + var childContext = callbacks.enter(frame.node, frame.context); + if (childContext === walkDOM.STOP) { + return walkDOM.STOP; + } + // Push exit frame before children so it fires after all children are processed (Last In First Out) + stack.push({ node: frame.node, context: childContext, phase: walkDOM.EXIT }); + if (childContext === null || childContext === undefined) { + continue; // skip children + } + // lastChild is read after enter returns, so enter may modify the child list. + var child = frame.node.lastChild; + // Traverse from lastChild backwards so that pushing onto the stack + // naturally yields firstChild on top (processed first). + while (child) { + stack.push({ node: child, context: childContext, phase: walkDOM.ENTER }); + child = child.previousSibling; + } + } else { + // frame.phase === walkDOM.EXIT + if (callbacks.exit) { + callbacks.exit(frame.node, frame.context); + } + } + } +} + +/** + * Sentinel value returned from a `walkDOM` `enter` callback to abort the entire traversal + * immediately. + * + * @type {symbol} + */ +walkDOM.STOP = Symbol('walkDOM.STOP'); +/** + * Phase constant for a stack frame that has not yet been visited. + * The `enter` callback is called and children are scheduled. + * + * @type {number} + */ +walkDOM.ENTER = 0; +/** + * Phase constant for a stack frame whose subtree has been fully visited. + * The `exit` callback is called. + * + * @type {number} + */ +walkDOM.EXIT = 1; + +/** + * @typedef DocumentOptions + * @property {string} [contentType=MIME_TYPE.XML_APPLICATION] + */ +/** + * The Document interface describes the common properties and methods for any kind of document. + * + * It should usually be created using `new DOMImplementation().createDocument(...)` + * or `new DOMImplementation().createHTMLDocument(...)`. + * + * The constructor is considered a private API and offers to initially set the `contentType` + * property via it's options parameter. + * + * @class + * @param {Symbol} symbol + * @param {DocumentOptions} [options] + * @augments Node + * @private + * @see https://developer.mozilla.org/en-US/docs/Web/API/Document + * @see https://dom.spec.whatwg.org/#interface-document + */ +function Document(symbol, options) { + checkSymbol(symbol); + + var opt = options || {}; + this.ownerDocument = this; + /** + * The mime type of the document is determined at creation time and can not be modified. + * + * @type {string} + * @see https://dom.spec.whatwg.org/#concept-document-content-type + * @see {@link DOMImplementation} + * @see {@link MIME_TYPE} + * @readonly + */ + this.contentType = opt.contentType || MIME_TYPE.XML_APPLICATION; + /** + * @type {'html' | 'xml'} + * @see https://dom.spec.whatwg.org/#concept-document-type + * @see {@link DOMImplementation} + * @readonly + */ + this.type = isHTMLMimeType(this.contentType) ? 'html' : 'xml'; +} + +/** + * Updates the namespace mapping of an element when a new attribute is added. + * + * @param {Document} doc + * The document that the element belongs to. + * @param {Element} el + * The element to which the attribute is being added. + * @param {Attr} newAttr + * The new attribute being added. + * @private + */ +function _onAddAttribute(doc, el, newAttr) { + doc && doc._inc++; + var ns = newAttr.namespaceURI; + if (ns === NAMESPACE.XMLNS) { + //update namespace + el._nsMap[newAttr.prefix ? newAttr.localName : ''] = newAttr.value; + } +} + +/** + * Updates the namespace mapping of an element when an attribute is removed. + * + * @param {Document} doc + * The document that the element belongs to. + * @param {Element} el + * The element from which the attribute is being removed. + * @param {Attr} newAttr + * The attribute being removed. + * @param {boolean} remove + * Indicates whether the attribute is to be removed. + * @private + */ +function _onRemoveAttribute(doc, el, newAttr, remove) { + doc && doc._inc++; + var ns = newAttr.namespaceURI; + if (ns === NAMESPACE.XMLNS) { + //update namespace + delete el._nsMap[newAttr.prefix ? newAttr.localName : '']; + } +} + +/** + * Updates `parent.childNodes`, adjusting the indexed items and its `length`. + * If `newChild` is provided and has no nextSibling, it will be appended. + * Otherwise, it's assumed that an item has been removed or inserted, + * and `parent.firstNode` and its `.nextSibling` to re-indexing all child nodes of `parent`. + * + * @param {Document} doc + * The parent document of `el`. + * @param {Node} parent + * The parent node whose childNodes list needs to be updated. + * @param {Node} [newChild] + * The new child node to be appended. If not provided, the function assumes a node has been + * removed. + * @private + */ +function _onUpdateChild(doc, parent, newChild) { + if (doc && doc._inc) { + doc._inc++; + var childNodes = parent.childNodes; + // assumes nextSibling and previousSibling were already configured upfront + if (newChild && !newChild.nextSibling) { + // if an item has been appended, we only need to update the last index and the length + childNodes[childNodes.length++] = newChild; + } else { + // otherwise we need to reindex all items, + // which can take a while when processing nodes with a lot of children + var child = parent.firstChild; + var i = 0; + while (child) { + childNodes[i++] = child; + child = child.nextSibling; + } + childNodes.length = i; + delete childNodes[childNodes.length]; + } + } +} + +/** + * Removes the connections between `parentNode` and `child` + * and any existing `child.previousSibling` or `child.nextSibling`. + * + * @param {Node} parentNode + * The parent node from which the child node is to be removed. + * @param {Node} child + * The child node to be removed from the parentNode. + * @returns {Node} + * Returns the child node that was removed. + * @throws {DOMException} + * With code: + * - {@link DOMException.NOT_FOUND_ERR} If the parentNode is not the parent of the child node. + * @private + * @see https://github.com/xmldom/xmldom/issues/135 + * @see https://github.com/xmldom/xmldom/issues/145 + */ +function _removeChild(parentNode, child) { + if (parentNode !== child.parentNode) { + throw new DOMException(DOMException.NOT_FOUND_ERR, "child's parent is not parent"); + } + var oldPreviousSibling = child.previousSibling; + var oldNextSibling = child.nextSibling; + if (oldPreviousSibling) { + oldPreviousSibling.nextSibling = oldNextSibling; + } else { + parentNode.firstChild = oldNextSibling; + } + if (oldNextSibling) { + oldNextSibling.previousSibling = oldPreviousSibling; + } else { + parentNode.lastChild = oldPreviousSibling; + } + _onUpdateChild(parentNode.ownerDocument, parentNode); + child.parentNode = null; + child.previousSibling = null; + child.nextSibling = null; + return child; +} + +/** + * Returns `true` if `node` can be a parent for insertion. + * + * @param {Node} node + * @returns {boolean} + */ +function hasValidParentNodeType(node) { + return ( + node && + (node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE) + ); +} + +/** + * Returns `true` if `node` can be inserted according to it's `nodeType`. + * + * @param {Node} node + * @returns {boolean} + */ +function hasInsertableNodeType(node) { + return ( + node && + (node.nodeType === Node.CDATA_SECTION_NODE || + node.nodeType === Node.COMMENT_NODE || + node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || + node.nodeType === Node.DOCUMENT_TYPE_NODE || + node.nodeType === Node.ELEMENT_NODE || + node.nodeType === Node.PROCESSING_INSTRUCTION_NODE || + node.nodeType === Node.TEXT_NODE) + ); +} + +/** + * Returns true if `node` is a DOCTYPE node. + * + * @param {Node} node + * @returns {boolean} + */ +function isDocTypeNode(node) { + return node && node.nodeType === Node.DOCUMENT_TYPE_NODE; +} + +/** + * Returns true if the node is an element. + * + * @param {Node} node + * @returns {boolean} + */ +function isElementNode(node) { + return node && node.nodeType === Node.ELEMENT_NODE; +} +/** + * Returns true if `node` is a text node. + * + * @param {Node} node + * @returns {boolean} + */ +function isTextNode(node) { + return node && node.nodeType === Node.TEXT_NODE; +} + +/** + * Check if en element node can be inserted before `child`, or at the end if child is falsy, + * according to the presence and position of a doctype node on the same level. + * + * @param {Document} doc + * The document node. + * @param {Node} child + * The node that would become the nextSibling if the element would be inserted. + * @returns {boolean} + * `true` if an element can be inserted before child. + * @private + */ +function isElementInsertionPossible(doc, child) { + var parentChildNodes = doc.childNodes || []; + if (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) { + return false; + } + var docTypeNode = find(parentChildNodes, isDocTypeNode); + return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child)); +} + +/** + * Check if en element node can be inserted before `child`, or at the end if child is falsy, + * according to the presence and position of a doctype node on the same level. + * + * @param {Node} doc + * The document node. + * @param {Node} child + * The node that would become the nextSibling if the element would be inserted. + * @returns {boolean} + * `true` if an element can be inserted before child. + * @private + */ +function isElementReplacementPossible(doc, child) { + var parentChildNodes = doc.childNodes || []; + + function hasElementChildThatIsNotChild(node) { + return isElementNode(node) && node !== child; + } + + if (find(parentChildNodes, hasElementChildThatIsNotChild)) { + return false; + } + var docTypeNode = find(parentChildNodes, isDocTypeNode); + return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child)); +} + +/** + * Asserts pre-insertion validity of a node into a parent before a child. + * Throws errors for invalid node combinations that would result in an ill-formed DOM. + * + * @param {Node} parent + * The parent node to insert `node` into. + * @param {Node} node + * The node to insert. + * @param {Node | null} child + * The node that should become the `nextSibling` of `node`. If null, no sibling is considered. + * @throws {DOMException} + * With code: + * - {@link DOMException.HIERARCHY_REQUEST_ERR} If `parent` is not a Document, + * DocumentFragment, or Element node. + * - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is a host-including inclusive + * ancestor of `parent`. (Currently not implemented) + * - {@link DOMException.NOT_FOUND_ERR} If `child` is non-null and its `parent` is not + * `parent`. + * - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is not a DocumentFragment, + * DocumentType, Element, or CharacterData node. + * - {@link DOMException.HIERARCHY_REQUEST_ERR} If either `node` is a Text node and `parent` is + * a document, or if `node` is a doctype and `parent` is not a document. + * @private + * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity + * @see https://dom.spec.whatwg.org/#concept-node-replace + */ +function assertPreInsertionValidity1to5(parent, node, child) { + // 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a "HierarchyRequestError" DOMException. + if (!hasValidParentNodeType(parent)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType); + } + // 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a "HierarchyRequestError" DOMException. + // not implemented! + // 3. If `child` is non-null and its parent is not `parent`, then throw a "NotFoundError" DOMException. + if (child && child.parentNode !== parent) { + throw new DOMException(DOMException.NOT_FOUND_ERR, 'child not in parent'); + } + if ( + // 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a "HierarchyRequestError" DOMException. + !hasInsertableNodeType(node) || + // 5. If either `node` is a Text node and `parent` is a document, + // the sax parser currently adds top level text nodes, this will be fixed in 0.9.0 + // || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE) + // or `node` is a doctype and `parent` is not a document, then throw a "HierarchyRequestError" DOMException. + (isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE) + ) { + throw new DOMException( + DOMException.HIERARCHY_REQUEST_ERR, + 'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType + ); + } +} + +/** + * Asserts pre-insertion validity of a node into a document before a child. + * Throws errors for invalid node combinations that would result in an ill-formed DOM. + * + * @param {Document} parent + * The parent node to insert `node` into. + * @param {Node} node + * The node to insert. + * @param {Node | undefined} child + * The node that should become the `nextSibling` of `node`. If undefined, no sibling is + * considered. + * @returns {Node} + * @throws {DOMException} + * With code: + * - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is a DocumentFragment with more than + * one element child or has a Text node child. + * - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is a DocumentFragment with one + * element child and either `parent` has an element child, `child` is a doctype, or `child` is + * non-null and a doctype is following `child`. + * - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is an Element and `parent` has an + * element child, `child` is a doctype, or `child` is non-null and a doctype is following + * `child`. + * - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is a DocumentType and `parent` has a + * doctype child, `child` is non-null and an element is preceding `child`, or `child` is null + * and `parent` has an element child. + * @private + * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity + * @see https://dom.spec.whatwg.org/#concept-node-replace + */ +function assertPreInsertionValidityInDocument(parent, node, child) { + var parentChildNodes = parent.childNodes || []; + var nodeChildNodes = node.childNodes || []; + + // DocumentFragment + if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { + var nodeChildElements = nodeChildNodes.filter(isElementNode); + // If node has more than one element child or has a Text node child. + if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment'); + } + // Otherwise, if `node` has one element child and either `parent` has an element child, + // `child` is a doctype, or `child` is non-null and a doctype is following `child`. + if (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype'); + } + } + // Element + if (isElementNode(node)) { + // `parent` has an element child, `child` is a doctype, + // or `child` is non-null and a doctype is following `child`. + if (!isElementInsertionPossible(parent, child)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype'); + } + } + // DocumentType + if (isDocTypeNode(node)) { + // `parent` has a doctype child, + if (find(parentChildNodes, isDocTypeNode)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed'); + } + var parentElementChild = find(parentChildNodes, isElementNode); + // `child` is non-null and an element is preceding `child`, + if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element'); + } + // or `child` is null and `parent` has an element child. + if (!child && parentElementChild) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present'); + } + } +} + +/** + * @param {Document} parent + * The parent node to insert `node` into. + * @param {Node} node + * The node to insert. + * @param {Node | undefined} child + * the node that should become the `nextSibling` of `node` + * @returns {Node} + * @throws {DOMException} + * For several node combinations that would create a DOM that is not well-formed. + * @throws {DOMException} + * If `child` is provided but is not a child of `parent`. + * @private + * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity + * @see https://dom.spec.whatwg.org/#concept-node-replace + */ +function assertPreReplacementValidityInDocument(parent, node, child) { + var parentChildNodes = parent.childNodes || []; + var nodeChildNodes = node.childNodes || []; + + // DocumentFragment + if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { + var nodeChildElements = nodeChildNodes.filter(isElementNode); + // If `node` has more than one element child or has a Text node child. + if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment'); + } + // Otherwise, if `node` has one element child and either `parent` has an element child that is not `child` or a doctype is following `child`. + if (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype'); + } + } + // Element + if (isElementNode(node)) { + // `parent` has an element child that is not `child` or a doctype is following `child`. + if (!isElementReplacementPossible(parent, child)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype'); + } + } + // DocumentType + if (isDocTypeNode(node)) { + function hasDoctypeChildThatIsNotChild(node) { + return isDocTypeNode(node) && node !== child; + } + + // `parent` has a doctype child that is not `child`, + if (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed'); + } + var parentElementChild = find(parentChildNodes, isElementNode); + // or an element is preceding `child`. + if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) { + throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element'); + } + } +} + +/** + * Inserts a node into a parent node before a child node. + * + * @param {Node} parent + * The parent node to insert the node into. + * @param {Node} node + * The node to insert into the parent. + * @param {Node | null} child + * The node that should become the next sibling of the node. + * If null, the function inserts the node at the end of the children of the parent node. + * @param {Function} [_inDocumentAssertion] + * An optional function to check pre-insertion validity if parent is a document node. + * Defaults to {@link assertPreInsertionValidityInDocument} + * @returns {Node} + * Returns the inserted node. + * @throws {DOMException} + * Throws a DOMException if inserting the node would result in a DOM tree that is not + * well-formed. See {@link assertPreInsertionValidity1to5}, + * {@link assertPreInsertionValidityInDocument}. + * @throws {DOMException} + * Throws a DOMException if child is provided but is not a child of the parent. See + * {@link Node.removeChild} + * @private + * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity + */ +function _insertBefore(parent, node, child, _inDocumentAssertion) { + // To ensure pre-insertion validity of a node into a parent before a child, run these steps: + assertPreInsertionValidity1to5(parent, node, child); + + // If parent is a document, and any of the statements below, switched on the interface node implements, + // are true, then throw a "HierarchyRequestError" DOMException. + if (parent.nodeType === Node.DOCUMENT_NODE) { + (_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child); + } + + var cp = node.parentNode; + if (cp) { + cp.removeChild(node); //remove and update + } + if (node.nodeType === DOCUMENT_FRAGMENT_NODE) { + var newFirst = node.firstChild; + if (newFirst == null) { + return node; + } + var newLast = node.lastChild; + } else { + newFirst = newLast = node; + } + var pre = child ? child.previousSibling : parent.lastChild; + + newFirst.previousSibling = pre; + newLast.nextSibling = child; + + if (pre) { + pre.nextSibling = newFirst; + } else { + parent.firstChild = newFirst; + } + if (child == null) { + parent.lastChild = newLast; + } else { + child.previousSibling = newLast; + } + do { + newFirst.parentNode = parent; + } while (newFirst !== newLast && (newFirst = newFirst.nextSibling)); + _onUpdateChild(parent.ownerDocument || parent, parent, node); + if (node.nodeType == DOCUMENT_FRAGMENT_NODE) { + node.firstChild = node.lastChild = null; + } + + return node; +} + +Document.prototype = { + /** + * The implementation that created this document. + * + * @type DOMImplementation + * @readonly + */ + implementation: null, + nodeName: '#document', + nodeType: DOCUMENT_NODE, + /** + * The DocumentType node of the document. + * + * @type DocumentType + * @readonly + */ + doctype: null, + documentElement: null, + _inc: 1, + + insertBefore: function (newChild, refChild) { + //raises + if (newChild.nodeType === DOCUMENT_FRAGMENT_NODE) { + var child = newChild.firstChild; + while (child) { + var next = child.nextSibling; + this.insertBefore(child, refChild); + child = next; + } + return newChild; + } + _insertBefore(this, newChild, refChild); + newChild.ownerDocument = this; + if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) { + this.documentElement = newChild; + } + + return newChild; + }, + removeChild: function (oldChild) { + var removed = _removeChild(this, oldChild); + if (removed === this.documentElement) { + this.documentElement = null; + } + return removed; + }, + replaceChild: function (newChild, oldChild) { + //raises + _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument); + newChild.ownerDocument = this; + if (oldChild) { + this.removeChild(oldChild); + } + if (isElementNode(newChild)) { + this.documentElement = newChild; + } + }, + /** + * Imports a node from another document into this document, creating a new copy owned by this + * document. The source node and its subtree are not modified. + * + * @param {Node} importedNode + * The node to import. + * @param {boolean} deep + * If true, the contents of the node are recursively imported. + * If false, only the node itself (and its attributes, if it is an element) are imported. + * @returns {Node} + * Returns the newly created import of the node. + * @see {@link importNode} + * @see {@link https://dom.spec.whatwg.org/#dom-document-importnode} + */ + importNode: function (importedNode, deep) { + return importNode(this, importedNode, deep); + }, + // Introduced in DOM Level 2: + getElementById: function (id) { + var rtv = null; + _visitNode(this.documentElement, function (node) { + if (node.nodeType == ELEMENT_NODE) { + if (node.getAttribute('id') == id) { + rtv = node; + return true; + } + } + }); + return rtv; + }, + + /** + * Creates a new `Element` that is owned by this `Document`. + * In HTML Documents `localName` is the lower cased `tagName`, + * otherwise no transformation is being applied. + * When `contentType` implies the HTML namespace, it will be set as `namespaceURI`. + * + * __This implementation differs from the specification:__ - The provided name is not checked + * against the `Name` production, + * so no related error will be thrown. + * - There is no interface `HTMLElement`, it is always an `Element`. + * - There is no support for a second argument to indicate using custom elements. + * + * @param {string} tagName + * @returns {Element} + * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement + * @see https://dom.spec.whatwg.org/#dom-document-createelement + * @see https://dom.spec.whatwg.org/#concept-create-element + */ + createElement: function (tagName) { + var node = new Element(PDC); + node.ownerDocument = this; + if (this.type === 'html') { + tagName = tagName.toLowerCase(); + } + if (hasDefaultHTMLNamespace(this.contentType)) { + node.namespaceURI = NAMESPACE.HTML; + } + node.nodeName = tagName; + node.tagName = tagName; + node.localName = tagName; + node.childNodes = new NodeList(); + var attrs = (node.attributes = new NamedNodeMap()); + attrs._ownerElement = node; + return node; + }, + /** + * @returns {DocumentFragment} + */ + createDocumentFragment: function () { + var node = new DocumentFragment(PDC); + node.ownerDocument = this; + node.childNodes = new NodeList(); + return node; + }, + /** + * @param {string} data + * @returns {Text} + */ + createTextNode: function (data) { + var node = new Text(PDC); + node.ownerDocument = this; + node.childNodes = new NodeList(); + node.appendData(data); + return node; + }, + /** + * @param {string} data + * @returns {Comment} + * @see https://dom.spec.whatwg.org/#dom-document-createcomment + * @see https://www.w3.org/TR/xml/#NT-Comment XML 1.0 production [15] + * @see https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-xml §3.2.1.3 + * + * Note: no validation is performed at creation time. When the resulting document is + * serialized with `requireWellFormed: true`, the serializer throws `InvalidStateError` + * if the comment data contains `--` anywhere, ends with `-`, or contains characters + * outside the XML Char production (W3C DOM Parsing §3.2.1.3). Without that option the + * data is emitted verbatim. + */ + createComment: function (data) { + var node = new Comment(PDC); + node.ownerDocument = this; + node.childNodes = new NodeList(); + node.appendData(data); + return node; + }, + /** + * Returns a new CDATASection node whose data is `data`. + * + * __This implementation differs from the specification:__ - calling this method on an HTML + * document does not throw `NotSupportedError`. + * + * @param {string} data + * @returns {CDATASection} + * @throws {DOMException} + * With code `INVALID_CHARACTER_ERR` if `data` contains `"]]>"`. + * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createCDATASection + * @see https://dom.spec.whatwg.org/#dom-document-createcdatasection + */ + createCDATASection: function (data) { + if (data.indexOf(']]>') !== -1) { + throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 'data contains "]]>"'); + } + var node = new CDATASection(PDC); + node.ownerDocument = this; + node.childNodes = new NodeList(); + node.appendData(data); + return node; + }, + /** + * Returns a ProcessingInstruction node whose target is target and data is data. + * + * __This behavior is slightly different from the in the specs__: + * - it does not do any input validation on the arguments and doesn't throw + * "InvalidCharacterError". + * + * Note: When the resulting document is serialized with `requireWellFormed: true`, the + * serializer throws `InvalidStateError` if `.target` contains `:` or is an ASCII + * case-insensitive match for `"xml"`, or if `.data` contains `?>` or characters outside the + * XML Char production (W3C DOM Parsing §3.2.1.7). Without that option the data is emitted + * verbatim. + * + * @param {string} target + * @param {string} data + * @returns {ProcessingInstruction} + * @see https://developer.mozilla.org/docs/Web/API/Document/createProcessingInstruction + * @see https://dom.spec.whatwg.org/#dom-document-createprocessinginstruction + * @see https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-xml §3.2.1.7 + */ + createProcessingInstruction: function (target, data) { + var node = new ProcessingInstruction(PDC); + node.ownerDocument = this; + node.childNodes = new NodeList(); + node.nodeName = node.target = target; + node.nodeValue = node.data = data; + return node; + }, + /** + * Creates an `Attr` node that is owned by this document. + * In HTML Documents `localName` is the lower cased `name`, + * otherwise no transformation is being applied. + * + * __This implementation differs from the specification:__ - The provided name is not checked + * against the `Name` production, + * so no related error will be thrown. + * + * @param {string} name + * @returns {Attr} + * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createAttribute + * @see https://dom.spec.whatwg.org/#dom-document-createattribute + */ + createAttribute: function (name) { + if (!g.QName_exact.test(name)) { + throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 'invalid character in name "' + name + '"'); + } + if (this.type === 'html') { + name = name.toLowerCase(); + } + return this._createAttribute(name); + }, + _createAttribute: function (name) { + var node = new Attr(PDC); + node.ownerDocument = this; + node.childNodes = new NodeList(); + node.name = name; + node.nodeName = name; + node.localName = name; + node.specified = true; + return node; + }, + /** + * Creates an EntityReference object. + * The current implementation does not fill the `childNodes` with those of the corresponding + * `Entity` + * + * @deprecated + * In DOM Level 4. + * @param {string} name + * The name of the entity to reference. No namespace well-formedness checks are performed. + * @returns {EntityReference} + * @throws {DOMException} + * With code `INVALID_CHARACTER_ERR` when `name` is not valid. + * @throws {DOMException} + * with code `NOT_SUPPORTED_ERR` when the document is of type `html` + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-392B75AE + */ + createEntityReference: function (name) { + if (!g.Name.test(name)) { + throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 'not a valid xml name "' + name + '"'); + } + if (this.type === 'html') { + throw new DOMException('document is an html document', DOMExceptionName.NotSupportedError); + } + + var node = new EntityReference(PDC); + node.ownerDocument = this; + node.childNodes = new NodeList(); + node.nodeName = name; + return node; + }, + // Introduced in DOM Level 2: + /** + * @param {string} namespaceURI + * @param {string} qualifiedName + * @returns {Element} + */ + createElementNS: function (namespaceURI, qualifiedName) { + var validated = validateAndExtract(namespaceURI, qualifiedName); + var node = new Element(PDC); + var attrs = (node.attributes = new NamedNodeMap()); + node.childNodes = new NodeList(); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.tagName = qualifiedName; + node.namespaceURI = validated[0]; + node.prefix = validated[1]; + node.localName = validated[2]; + attrs._ownerElement = node; + return node; + }, + // Introduced in DOM Level 2: + /** + * @param {string} namespaceURI + * @param {string} qualifiedName + * @returns {Attr} + */ + createAttributeNS: function (namespaceURI, qualifiedName) { + var validated = validateAndExtract(namespaceURI, qualifiedName); + var node = new Attr(PDC); + node.ownerDocument = this; + node.childNodes = new NodeList(); + node.nodeName = qualifiedName; + node.name = qualifiedName; + node.specified = true; + node.namespaceURI = validated[0]; + node.prefix = validated[1]; + node.localName = validated[2]; + return node; + }, +}; +_extends(Document, Node); + +function Element(symbol) { + checkSymbol(symbol); + + this._nsMap = Object.create(null); +} +Element.prototype = { + nodeType: ELEMENT_NODE, + /** + * The attributes of this element. + * + * @type {NamedNodeMap | null} + */ + attributes: null, + getQualifiedName: function () { + return this.prefix ? this.prefix + ':' + this.localName : this.localName; + }, + _isInHTMLDocumentAndNamespace: function () { + return this.ownerDocument.type === 'html' && this.namespaceURI === NAMESPACE.HTML; + }, + /** + * Implementaton of Level2 Core function hasAttributes. + * + * @returns {boolean} + * True if attribute list is not empty. + * @see https://www.w3.org/TR/DOM-Level-2-Core/#core-ID-NodeHasAttrs + */ + hasAttributes: function () { + return !!(this.attributes && this.attributes.length); + }, + hasAttribute: function (name) { + return !!this.getAttributeNode(name); + }, + /** + * Returns element’s first attribute whose qualified name is `name`, and `null` + * if there is no such attribute. + * + * @param {string} name + * @returns {string | null} + */ + getAttribute: function (name) { + var attr = this.getAttributeNode(name); + return attr ? attr.value : null; + }, + getAttributeNode: function (name) { + if (this._isInHTMLDocumentAndNamespace()) { + name = name.toLowerCase(); + } + return this.attributes.getNamedItem(name); + }, + /** + * Sets the value of element’s first attribute whose qualified name is qualifiedName to value. + * + * @param {string} name + * @param {string} value + */ + setAttribute: function (name, value) { + if (this._isInHTMLDocumentAndNamespace()) { + name = name.toLowerCase(); + } + var attr = this.getAttributeNode(name); + if (attr) { + attr.value = attr.nodeValue = '' + value; + } else { + attr = this.ownerDocument._createAttribute(name); + attr.value = attr.nodeValue = '' + value; + this.setAttributeNode(attr); + } + }, + removeAttribute: function (name) { + var attr = this.getAttributeNode(name); + attr && this.removeAttributeNode(attr); + }, + setAttributeNode: function (newAttr) { + return this.attributes.setNamedItem(newAttr); + }, + setAttributeNodeNS: function (newAttr) { + return this.attributes.setNamedItemNS(newAttr); + }, + removeAttributeNode: function (oldAttr) { + //console.log(this == oldAttr.ownerElement) + return this.attributes.removeNamedItem(oldAttr.nodeName); + }, + //get real attribute name,and remove it by removeAttributeNode + removeAttributeNS: function (namespaceURI, localName) { + var old = this.getAttributeNodeNS(namespaceURI, localName); + old && this.removeAttributeNode(old); + }, + + hasAttributeNS: function (namespaceURI, localName) { + return this.getAttributeNodeNS(namespaceURI, localName) != null; + }, + /** + * Returns element’s attribute whose namespace is `namespaceURI` and local name is + * `localName`, + * or `null` if there is no such attribute. + * + * @param {string} namespaceURI + * @param {string} localName + * @returns {string | null} + */ + getAttributeNS: function (namespaceURI, localName) { + var attr = this.getAttributeNodeNS(namespaceURI, localName); + return attr ? attr.value : null; + }, + /** + * Sets the value of element’s attribute whose namespace is `namespaceURI` and local name is + * `localName` to value. + * + * @param {string} namespaceURI + * @param {string} qualifiedName + * @param {string} value + * @see https://dom.spec.whatwg.org/#dom-element-setattributens + */ + setAttributeNS: function (namespaceURI, qualifiedName, value) { + var validated = validateAndExtract(namespaceURI, qualifiedName); + var localName = validated[2]; + var attr = this.getAttributeNodeNS(namespaceURI, localName); + if (attr) { + attr.value = attr.nodeValue = '' + value; + } else { + attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); + attr.value = attr.nodeValue = '' + value; + this.setAttributeNode(attr); + } + }, + getAttributeNodeNS: function (namespaceURI, localName) { + return this.attributes.getNamedItemNS(namespaceURI, localName); + }, + + /** + * Returns a LiveNodeList of all child elements which have **all** of the given class name(s). + * + * Returns an empty list if `classNames` is an empty string or only contains HTML white space + * characters. + * + * Warning: This returns a live LiveNodeList. + * Changes in the DOM will reflect in the array as the changes occur. + * If an element selected by this array no longer qualifies for the selector, + * it will automatically be removed. Be aware of this for iteration purposes. + * + * @param {string} classNames + * Is a string representing the class name(s) to match; multiple class names are separated by + * (ASCII-)whitespace. + * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/getElementsByClassName + * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName + * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname + */ + getElementsByClassName: function (classNames) { + var classNamesSet = toOrderedSet(classNames); + return new LiveNodeList(this, function (base) { + var ls = []; + if (classNamesSet.length > 0) { + _visitNode(base, function (node) { + if (node !== base && node.nodeType === ELEMENT_NODE) { + var nodeClassNames = node.getAttribute('class'); + // can be null if the attribute does not exist + if (nodeClassNames) { + // before splitting and iterating just compare them for the most common case + var matches = classNames === nodeClassNames; + if (!matches) { + var nodeClassNamesSet = toOrderedSet(nodeClassNames); + matches = classNamesSet.every(arrayIncludes(nodeClassNamesSet)); + } + if (matches) { + ls.push(node); + } + } + } + }); + } + return ls; + }); + }, + + /** + * Returns a LiveNodeList of elements with the given qualifiedName. + * Searching for all descendants can be done by passing `*` as `qualifiedName`. + * + * All descendants of the specified element are searched, but not the element itself. + * The returned list is live, which means it updates itself with the DOM tree automatically. + * Therefore, there is no need to call `Element.getElementsByTagName()` + * with the same element and arguments repeatedly if the DOM changes in between calls. + * + * When called on an HTML element in an HTML document, + * `getElementsByTagName` lower-cases the argument before searching for it. + * This is undesirable when trying to match camel-cased SVG elements (such as + * ``) in an HTML document. + * Instead, use `Element.getElementsByTagNameNS()`, + * which preserves the capitalization of the tag name. + * + * `Element.getElementsByTagName` is similar to `Document.getElementsByTagName()`, + * except that it only searches for elements that are descendants of the specified element. + * + * @param {string} qualifiedName + * @returns {LiveNodeList} + * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/getElementsByTagName + * @see https://dom.spec.whatwg.org/#concept-getelementsbytagname + */ + getElementsByTagName: function (qualifiedName) { + var isHTMLDocument = (this.nodeType === DOCUMENT_NODE ? this : this.ownerDocument).type === 'html'; + var lowerQualifiedName = qualifiedName.toLowerCase(); + return new LiveNodeList(this, function (base) { + var ls = []; + _visitNode(base, function (node) { + if (node === base || node.nodeType !== ELEMENT_NODE) { + return; + } + if (qualifiedName === '*') { + ls.push(node); + } else { + var nodeQualifiedName = node.getQualifiedName(); + var matchingQName = isHTMLDocument && node.namespaceURI === NAMESPACE.HTML ? lowerQualifiedName : qualifiedName; + if (nodeQualifiedName === matchingQName) { + ls.push(node); + } + } + }); + return ls; + }); + }, + getElementsByTagNameNS: function (namespaceURI, localName) { + return new LiveNodeList(this, function (base) { + var ls = []; + _visitNode(base, function (node) { + if ( + node !== base && + node.nodeType === ELEMENT_NODE && + (namespaceURI === '*' || node.namespaceURI === namespaceURI) && + (localName === '*' || node.localName == localName) + ) { + ls.push(node); + } + }); + return ls; + }); + }, +}; +Document.prototype.getElementsByClassName = Element.prototype.getElementsByClassName; +Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; +Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; + +_extends(Element, Node); +function Attr(symbol) { + checkSymbol(symbol); + + this.namespaceURI = null; + this.prefix = null; + this.ownerElement = null; +} +Attr.prototype.nodeType = ATTRIBUTE_NODE; +_extends(Attr, Node); + +function CharacterData(symbol) { + checkSymbol(symbol); +} +CharacterData.prototype = { + data: '', + substringData: function (offset, count) { + return this.data.substring(offset, offset + count); + }, + appendData: function (text) { + text = this.data + text; + this.nodeValue = this.data = text; + this.length = text.length; + }, + insertData: function (offset, text) { + this.replaceData(offset, 0, text); + }, + deleteData: function (offset, count) { + this.replaceData(offset, count, ''); + }, + replaceData: function (offset, count, text) { + var start = this.data.substring(0, offset); + var end = this.data.substring(offset + count); + text = start + text + end; + this.nodeValue = this.data = text; + this.length = text.length; + }, +}; +_extends(CharacterData, Node); +function Text(symbol) { + checkSymbol(symbol); +} +Text.prototype = { + nodeName: '#text', + nodeType: TEXT_NODE, + splitText: function (offset) { + var text = this.data; + var newText = text.substring(offset); + text = text.substring(0, offset); + this.data = this.nodeValue = text; + this.length = text.length; + var newNode = this.ownerDocument.createTextNode(newText); + if (this.parentNode) { + this.parentNode.insertBefore(newNode, this.nextSibling); + } + return newNode; + }, +}; +_extends(Text, CharacterData); +function Comment(symbol) { + checkSymbol(symbol); +} +Comment.prototype = { + nodeName: '#comment', + nodeType: COMMENT_NODE, +}; +_extends(Comment, CharacterData); + +function CDATASection(symbol) { + checkSymbol(symbol); +} +CDATASection.prototype = { + nodeName: '#cdata-section', + nodeType: CDATA_SECTION_NODE, +}; +_extends(CDATASection, Text); + +/** + * @class DocumentType + * @augments Node + * @property {string} publicId + * The external subset public identifier, stored verbatim (including surrounding quotes). + * Declared `readonly` by the WHATWG DOM spec; xmldom does not enforce this constraint — + * direct property writes succeed and the written value is serialized verbatim. + * When serialized with `requireWellFormed: true`, the serializer validates the value against + * the XML `PubidLiteral` production and throws `InvalidStateError` if it does not match. + * @property {string} systemId + * The external subset system identifier, stored verbatim (including surrounding quotes). + * Declared `readonly` by the WHATWG DOM spec; xmldom does not enforce this constraint — + * direct property writes succeed and the written value is serialized verbatim. + * When serialized with `requireWellFormed: true`, the serializer validates the value against + * the XML `SystemLiteral` production and throws `InvalidStateError` if it does not match. + * @property {string} internalSubset + * The internal subset string (the raw content between `[` and `]`), or an empty string. + * Declared `readonly` by the WHATWG DOM spec; xmldom does not enforce this constraint — + * direct property writes succeed and the written value is serialized verbatim. + * When serialized with `requireWellFormed: true`, the serializer throws `InvalidStateError` + * if the value contains `"]>"`. + * @see https://developer.mozilla.org/en-US/docs/Web/API/DocumentType MDN + * @see https://dom.spec.whatwg.org/#interface-documenttype WHATWG DOM + * @prettierignore + */ +function DocumentType(symbol) { + checkSymbol(symbol); +} +DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; +_extends(DocumentType, Node); + +function Notation(symbol) { + checkSymbol(symbol); +} +Notation.prototype.nodeType = NOTATION_NODE; +_extends(Notation, Node); + +function Entity(symbol) { + checkSymbol(symbol); +} +Entity.prototype.nodeType = ENTITY_NODE; +_extends(Entity, Node); + +function EntityReference(symbol) { + checkSymbol(symbol); +} +EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; +_extends(EntityReference, Node); + +function DocumentFragment(symbol) { + checkSymbol(symbol); +} +DocumentFragment.prototype.nodeName = '#document-fragment'; +DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; +_extends(DocumentFragment, Node); + +function ProcessingInstruction(symbol) { + checkSymbol(symbol); +} +ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; +_extends(ProcessingInstruction, CharacterData); +function XMLSerializer() {} +/** + * Returns the result of serializing `node` to XML. + * + * When `options.requireWellFormed` is `true`, the serializer throws `InvalidStateError` for + * content that would produce ill-formed XML (e.g. CDATASection data containing `"]]>"`, Text + * data containing characters outside the XML Char production, or a Document with no + * `documentElement`). + * + * When `options.splitCDATASections` is `false`, CDATASection data is emitted verbatim even + * when it contains `"]]>"`. When `true` (the default), `"]]>"` sequences are split across + * concatenated CDATA sections — this behavior is **deprecated** and will be removed in the + * next breaking release. Callers should migrate to `{ requireWellFormed: true }`, which throws + * `InvalidStateError` instead of transforming. + * + * __This implementation differs from the specification:__ - CDATASection serialization is not + * specified by W3C DOM Parsing or WHATWG DOM Parsing (see + * {@link https://github.com/w3c/DOM-Parsing/issues/38 w3c/DOM-Parsing#38}). + * When `splitCDATASections` is `true` (the default), `"]]>"` sequences in CDATASection data + * are split across concatenated CDATA sections — this mechanism is derived from DOM Level 3 + * Core and is **deprecated**. The split mechanics will be removed in the next breaking + * release. Callers that rely on this behavior should migrate to `{ requireWellFormed: true }`. + * - W3C DOM Parsing §3.2.1.1 requires well-formedness checks on Element `localName`s, + * prefixes, + * and attribute serialization (duplicate attributes, namespace declarations, attribute value + * characters) when `requireWellFormed` is `true`. These checks are **not implemented** in this + * release — see the tracking issue filed against the next breaking milestone. + * + * @param {Node} node + * @param {Object | function} [options] + * Options object, or a legacy nodeFilter function (backward compatible). + * @param {boolean} [options.requireWellFormed=false] + * When `true`, throws `InvalidStateError` for content that would produce ill-formed XML. + * @param {boolean} [options.splitCDATASections=true] + * When `true` (default), splits `"]]>"` sequences in CDATASection data across concatenated + * CDATA sections. **Deprecated** — will be removed in the next breaking release. + * @param {function} [options.nodeFilter] + * A filter function applied to each node before serialization. + * @returns {string} + * @throws {DOMException} + * With name `InvalidStateError` when `requireWellFormed` is `true` and any of the following + * conditions hold: + * - CDATASection data contains `"]]>"` + * - Text data contains characters outside the XML Char production + * - a Comment node's data contains `--` anywhere or ends with `-` + * - a ProcessingInstruction's target contains `:` or is an ASCII case-insensitive match for + * `"xml"`, or its data contains `?>` or characters outside the XML Char production + * - a DocumentType's `publicId` is non-empty and does not match the XML `PubidLiteral` + * production (W3C DOM Parsing §3.2.1.3; XML 1.0 production [12]) + * - a DocumentType's `systemId` is non-empty and does not match the XML `SystemLiteral` + * production (W3C DOM Parsing §3.2.1.3; XML 1.0 production [11]) + * - a DocumentType's `internalSubset` contains `"]>"` + * - the Document has no `documentElement` + * @see https://developer.mozilla.org/docs/Web/API/XMLSerializer/serializeToString + * @see https://html.spec.whatwg.org/#dom-xmlserializer-serializetostring + * @see https://github.com/w3c/DOM-Parsing/issues/84 + * @prettierignore + */ +XMLSerializer.prototype.serializeToString = function (node, options) { + return nodeSerializeToString.call(node, options); +}; +Node.prototype.toString = nodeSerializeToString; +function nodeSerializeToString(options) { + // Normalize the user-supplied options into a single internal opts object so that the + // internal serializer always works with a consistent shape rather than positional flags. + var opts; + if (typeof options === 'function') { + opts = { requireWellFormed: false, splitCDATASections: true, nodeFilter: options }; + } else if (options != null) { + opts = { + requireWellFormed: !!options.requireWellFormed, + splitCDATASections: options.splitCDATASections !== false, + nodeFilter: options.nodeFilter || null, + }; + } else { + opts = { requireWellFormed: false, splitCDATASections: true, nodeFilter: null }; + } + var buf = []; + var refNode = (this.nodeType === DOCUMENT_NODE && this.documentElement) || this; + var prefix = refNode.prefix; + var uri = refNode.namespaceURI; + + if (uri && prefix == null) { + var prefix = refNode.lookupPrefix(uri); + if (prefix == null) { + var visibleNamespaces = [ + { namespace: uri, prefix: null }, + //{namespace:uri,prefix:''} + ]; + } + } + serializeToString(this, buf, visibleNamespaces, opts); + return buf.join(''); +} + +function needNamespaceDefine(node, isHTML, visibleNamespaces) { + var prefix = node.prefix || ''; + var uri = node.namespaceURI; + // According to [Namespaces in XML 1.0](https://www.w3.org/TR/REC-xml-names/#ns-using) , + // and more specifically https://www.w3.org/TR/REC-xml-names/#nsc-NoPrefixUndecl : + // > In a namespace declaration for a prefix [...], the attribute value MUST NOT be empty. + // in a similar manner [Namespaces in XML 1.1](https://www.w3.org/TR/xml-names11/#ns-using) + // and more specifically https://www.w3.org/TR/xml-names11/#nsc-NSDeclared : + // > [...] Furthermore, the attribute value [...] must not be an empty string. + // so serializing empty namespace value like xmlns:ds="" would produce an invalid XML document. + if (!uri) { + return false; + } + if ((prefix === 'xml' && uri === NAMESPACE.XML) || uri === NAMESPACE.XMLNS) { + return false; + } + + var i = visibleNamespaces.length; + while (i--) { + var ns = visibleNamespaces[i]; + // get namespace prefix + if (ns.prefix === prefix) { + return ns.namespace !== uri; + } + } + return true; +} +/** + * Literal whitespace other than space that appear in attribute values are serialized as + * their entity references, so they will be preserved. + * (In contrast to whitespace literals in the input which are normalized to spaces). + * + * Well-formed constraint: No < in Attribute Values: + * > The replacement text of any entity referred to directly or indirectly + * > in an attribute value must not contain a <. + * + * @see https://www.w3.org/TR/xml11/#CleanAttrVals + * @see https://www.w3.org/TR/xml11/#NT-AttValue + * @see https://www.w3.org/TR/xml11/#AVNormalize + * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes + * @prettierignore + */ +function addSerializedAttribute(buf, qualifiedName, value) { + buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"'); +} + +function serializeToString(node, buf, visibleNamespaces, opts) { + if (!visibleNamespaces) { + visibleNamespaces = []; + } + var nodeFilter = opts.nodeFilter; + var requireWellFormed = opts.requireWellFormed; + var splitCDATASections = opts.splitCDATASections; + var doc = node.nodeType === DOCUMENT_NODE ? node : node.ownerDocument; + var isHTML = doc.type === 'html'; + + walkDOM( + node, + { ns: visibleNamespaces }, + { + enter: function (n, ctx) { + var namespaces = ctx.ns; + + if (nodeFilter) { + n = nodeFilter(n); + if (n) { + if (typeof n == 'string') { + buf.push(n); + return null; + } + } else { + return null; + } + } + + switch (n.nodeType) { + case ELEMENT_NODE: + var attrs = n.attributes; + var len = attrs.length; + var nodeName = n.tagName; + + var prefixedNodeName = nodeName; + if (!isHTML && !n.prefix && n.namespaceURI) { + var defaultNS; + // lookup current default ns from `xmlns` attribute + for (var ai = 0; ai < attrs.length; ai++) { + if (attrs.item(ai).name === 'xmlns') { + defaultNS = attrs.item(ai).value; + break; + } + } + if (!defaultNS) { + // lookup current default ns in visibleNamespaces + for (var nsi = namespaces.length - 1; nsi >= 0; nsi--) { + var nsEntry = namespaces[nsi]; + if (nsEntry.prefix === '' && nsEntry.namespace === n.namespaceURI) { + defaultNS = nsEntry.namespace; + break; + } + } + } + if (defaultNS !== n.namespaceURI) { + for (var nsi = namespaces.length - 1; nsi >= 0; nsi--) { + var nsEntry = namespaces[nsi]; + if (nsEntry.namespace === n.namespaceURI) { + if (nsEntry.prefix) { + prefixedNodeName = nsEntry.prefix + ':' + nodeName; + } + break; + } + } + } + } + + buf.push('<', prefixedNodeName); + + // Build a fresh namespace snapshot for this element's children. + // The slice prevents sibling elements from inheriting each other's declarations. + var childNamespaces = namespaces.slice(); + + for (var i = 0; i < len; i++) { + // add namespaces for attributes + var attr = attrs.item(i); + if (attr.prefix == 'xmlns') { + childNamespaces.push({ + prefix: attr.localName, + namespace: attr.value, + }); + } else if (attr.nodeName == 'xmlns') { + childNamespaces.push({ prefix: '', namespace: attr.value }); + } + } + + for (var i = 0; i < len; i++) { + var attr = attrs.item(i); + if (needNamespaceDefine(attr, isHTML, childNamespaces)) { + var attrPrefix = attr.prefix || ''; + var uri = attr.namespaceURI; + addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri); + childNamespaces.push({ prefix: attrPrefix, namespace: uri }); + } + // Apply nodeFilter and serialize the attribute. + var filteredAttr = nodeFilter ? nodeFilter(attr) : attr; + if (filteredAttr) { + if (typeof filteredAttr === 'string') { + buf.push(filteredAttr); + } else { + addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value); + } + } + } + + // add namespace for current node + if (nodeName === prefixedNodeName && needNamespaceDefine(n, isHTML, childNamespaces)) { + var nodePrefix = n.prefix || ''; + var uri = n.namespaceURI; + addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri); + childNamespaces.push({ prefix: nodePrefix, namespace: uri }); + } + + // in XML elements can be closed when they have no children + var canCloseTag = !n.firstChild; + if (canCloseTag && (isHTML || n.namespaceURI === NAMESPACE.HTML)) { + // in HTML (doc or ns) only void elements can be closed right away + canCloseTag = isHTMLVoidElement(nodeName); + } + if (canCloseTag) { + buf.push('/>'); + // Self-closing: no children and no closing tag needed from exit. + return null; + } + + buf.push('>'); + + // HTML raw text elements: serialize children as raw data without further descent. + if (isHTML && isHTMLRawTextElement(nodeName)) { + var child = n.firstChild; + while (child) { + if (child.data) { + buf.push(child.data); + } else { + serializeToString(child, buf, childNamespaces.slice(), opts); + } + child = child.nextSibling; + } + buf.push(''); + // Children handled manually above; prevent walkDOM from also traversing them. + return null; + } + + // Return child context so walkDOM descends; exit will emit the closing tag. + return { ns: childNamespaces, tag: prefixedNodeName }; + case DOCUMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + if (requireWellFormed && n.nodeType === DOCUMENT_NODE && n.documentElement == null) { + throw new DOMException('The Document has no documentElement', DOMExceptionName.InvalidStateError); + } + // Pass namespaces through; each child element will slice independently. + return { ns: namespaces }; + case ATTRIBUTE_NODE: + addSerializedAttribute(buf, n.name, n.value); + return null; + case TEXT_NODE: + /* + * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form, + * except when used as markup delimiters, or within a comment, a processing instruction, + * or a CDATA section. + * If they are needed elsewhere, they must be escaped using either numeric character + * references or the strings `&` and `<` respectively. + * The right angle bracket (>) may be represented using the string " > ", + * and must, for compatibility, be escaped using either `>`, + * or a character reference when it appears in the string `]]>` in content, + * when that string is not marking the end of a CDATA section. + * + * In the content of elements, character data is any string of characters which does not + * contain the start-delimiter of any markup and does not include the CDATA-section-close + * delimiter, `]]>`. + * + * @see https://www.w3.org/TR/xml/#NT-CharData + * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node + */ + if (requireWellFormed && g.InvalidChar.test(n.data)) { + throw new DOMException( + 'The Text node data contains characters outside the XML Char production', + DOMExceptionName.InvalidStateError + ); + } + buf.push(n.data.replace(/[<&>]/g, _xmlEncoder)); + return null; + case CDATA_SECTION_NODE: + if (requireWellFormed && n.data.indexOf(']]>') !== -1) { + throw new DOMException('The CDATASection data contains "]]>"', DOMExceptionName.InvalidStateError); + } + if (splitCDATASections) { + buf.push(g.CDATA_START, n.data.replace(/]]>/g, ']]]]>'), g.CDATA_END); + } else { + buf.push(g.CDATA_START, n.data, g.CDATA_END); + } + return null; + case COMMENT_NODE: + if (requireWellFormed) { + if (g.InvalidChar.test(n.data)) { + throw new DOMException( + 'The comment node data contains characters outside the XML Char production', + DOMExceptionName.InvalidStateError + ); + } + if (n.data.indexOf('--') !== -1 || n.data[n.data.length - 1] === '-') { + throw new DOMException( + 'The comment node data contains "--" or ends with "-"', + DOMExceptionName.InvalidStateError + ); + } + } + buf.push(g.COMMENT_START, n.data, g.COMMENT_END); + return null; + case DOCUMENT_TYPE_NODE: + var pubid = n.publicId; + var sysid = n.systemId; + if (requireWellFormed) { + if (pubid && !g.PubidLiteral_match.test(pubid)) { + throw new DOMException('DocumentType publicId is not a valid PubidLiteral', DOMExceptionName.InvalidStateError); + } + if (sysid && sysid !== '.' && !g.SystemLiteral_match.test(sysid)) { + throw new DOMException('DocumentType systemId is not a valid SystemLiteral', DOMExceptionName.InvalidStateError); + } + if (n.internalSubset && n.internalSubset.indexOf(']>') !== -1) { + throw new DOMException('DocumentType internalSubset contains "]>"', DOMExceptionName.InvalidStateError); + } + } + buf.push(g.DOCTYPE_DECL_START, ' ', n.name); + if (pubid) { + buf.push(' ', g.PUBLIC, ' ', pubid); + if (sysid && sysid !== '.') { + buf.push(' ', sysid); + } + } else if (sysid && sysid !== '.') { + buf.push(' ', g.SYSTEM, ' ', sysid); + } + if (n.internalSubset) { + buf.push(' [', n.internalSubset, ']'); + } + buf.push('>'); + return null; + case PROCESSING_INSTRUCTION_NODE: + if (requireWellFormed) { + if (n.target.indexOf(':') !== -1 || n.target.toLowerCase() === 'xml') { + throw new DOMException('The ProcessingInstruction target is not well-formed', DOMExceptionName.InvalidStateError); + } + if (g.InvalidChar.test(n.data)) { + throw new DOMException( + 'The ProcessingInstruction data contains characters outside the XML Char production', + DOMExceptionName.InvalidStateError + ); + } + if (n.data.indexOf('?>') !== -1) { + throw new DOMException('The ProcessingInstruction data contains "?>"', DOMExceptionName.InvalidStateError); + } + } + buf.push(''); + return null; + case ENTITY_REFERENCE_NODE: + buf.push('&', n.nodeName, ';'); + return null; + //case ENTITY_NODE: + //case NOTATION_NODE: + default: + buf.push('??', n.nodeName); + return null; + } + }, + exit: function (n, childCtx) { + // Emit the closing tag for elements that were opened (not self-closed, not raw text). + if (childCtx && childCtx.tag) { + buf.push(''); + } + }, + } + ); +} +/** + * Imports a node from a different document into `doc`, creating a new copy. + * Delegates to {@link walkDOM} for traversal. Each node in the subtree is shallow-cloned, + * stamped with `doc` as its `ownerDocument`, and detached (`parentNode` set to `null`). + * Children are imported recursively when `deep` is `true`; for {@link Attr} nodes `deep` is + * always forced to `true` + * because an attribute's value lives in a child text node. + * + * @param {Document} doc + * The document that will own the imported node. + * @param {Node} node + * The node to import. + * @param {boolean} deep + * If `true`, descendants are imported recursively. + * @returns {Node} + * The newly imported node, now owned by `doc`. + */ +function importNode(doc, node, deep) { + var destRoot; + walkDOM(node, null, { + enter: function (srcNode, destParent) { + // Shallow-clone the node and stamp it into the target document. + var destNode = srcNode.cloneNode(false); + destNode.ownerDocument = doc; + destNode.parentNode = null; + // capture as the root of the imported subtree or attach to parent. + if (destParent === null) { + destRoot = destNode; + } else { + destParent.appendChild(destNode); + } + // ATTRIBUTE_NODE must always be imported deeply: its value lives in a child text node. + var shouldDeep = srcNode.nodeType === ATTRIBUTE_NODE || deep; + return shouldDeep ? destNode : null; + }, + }); + return destRoot; +} + +/** + * Creates a copy of a node from an existing one. + * + * @param {Document} doc + * The Document object representing the document that the new node will belong to. + * @param {Node} node + * The node to clone. + * @param {boolean} deep + * If true, the contents of the node are recursively copied. + * If false, only the node itself (and its attributes, if it is an element) are copied. + * @returns {Node} + * Returns the newly created copy of the node. + * @throws {DOMException} + * May throw a DOMException if operations within setAttributeNode or appendChild (which are + * potentially invoked in this function) do not meet their specific constraints. + */ +function cloneNode(doc, node, deep) { + var destRoot; + walkDOM(node, null, { + enter: function (srcNode, destParent) { + // 1. Create a blank node of the same type and copy all scalar own properties. + var destNode = new srcNode.constructor(PDC); + for (var n in srcNode) { + if (hasOwn(srcNode, n)) { + var v = srcNode[n]; + if (typeof v != 'object') { + if (v != destNode[n]) { + destNode[n] = v; + } + } + } + } + if (srcNode.childNodes) { + destNode.childNodes = new NodeList(); + } + destNode.ownerDocument = doc; + // 2. Handle node-type-specific setup. + // Attributes are not DOM children, so they are cloned inline here + // rather than by walkDOM descent. + // ATTRIBUTE_NODE forces deep=true so its own children are walked. + var shouldDeep = deep; + switch (destNode.nodeType) { + case ELEMENT_NODE: + var attrs = srcNode.attributes; + var attrs2 = (destNode.attributes = new NamedNodeMap()); + var len = attrs.length; + attrs2._ownerElement = destNode; + for (var i = 0; i < len; i++) { + destNode.setAttributeNode(cloneNode(doc, attrs.item(i), true)); + } + break; + case ATTRIBUTE_NODE: + shouldDeep = true; + } + // 3. Attach to parent, or capture as the root of the cloned subtree. + if (destParent !== null) { + destParent.appendChild(destNode); + } else { + destRoot = destNode; + } + // 4. Return destNode as the context for children (causes walkDOM to descend), + // or null to skip children (shallow clone). + return shouldDeep ? destNode : null; + }, + }); + return destRoot; +} + +function __set__(object, key, value) { + object[key] = value; +} + +// Returns a new array of direct Element children. +// Passed to LiveNodeList to implement ParentNode.children. +// https://dom.spec.whatwg.org/#dom-parentnode-children +function childrenRefresh(node) { + var ls = []; + var child = node.firstChild; + while (child) { + if (child.nodeType === ELEMENT_NODE) { + ls.push(child); + } + child = child.nextSibling; + } + return ls; +} + +//do dynamic +try { + if (Object.defineProperty) { + Object.defineProperty(LiveNodeList.prototype, 'length', { + get: function () { + _updateLiveList(this); + return this.$$length; + }, + }); + + /** + * The text content of this node and its descendants. + * + * For {@link Element} and {@link DocumentFragment} nodes, returns the concatenation of the + * `nodeValue` of every descendant text node, excluding processing instruction and comment + * nodes. For all other node types, returns `nodeValue`. + * + * Setting `textContent` on an element or document fragment replaces all child nodes with a + * single text node; on other nodes it sets `data`, `value`, and `nodeValue` directly. + * + * @type {string | null} + * @see {@link https://dom.spec.whatwg.org/#dom-node-textcontent} + */ + Object.defineProperty(Node.prototype, 'textContent', { + get: function () { + if (this.nodeType === ELEMENT_NODE || this.nodeType === DOCUMENT_FRAGMENT_NODE) { + var buf = []; + walkDOM(this, null, { + enter: function (n) { + if (n.nodeType === ELEMENT_NODE || n.nodeType === DOCUMENT_FRAGMENT_NODE) { + return true; // enter children + } + if (n.nodeType === PROCESSING_INSTRUCTION_NODE || n.nodeType === COMMENT_NODE) { + return null; // excluded from text content + } + buf.push(n.nodeValue); + }, + }); + return buf.join(''); + } + return this.nodeValue; + }, + + set: function (data) { + switch (this.nodeType) { + case ELEMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + while (this.firstChild) { + this.removeChild(this.firstChild); + } + if (data || String(data)) { + this.appendChild(this.ownerDocument.createTextNode(data)); + } + break; + + default: + this.data = data; + this.value = data; + this.nodeValue = data; + } + }, + }); + + Object.defineProperty(Element.prototype, 'children', { + get: function () { + return new LiveNodeList(this, childrenRefresh); + }, + }); + Object.defineProperty(Document.prototype, 'children', { + get: function () { + return new LiveNodeList(this, childrenRefresh); + }, + }); + Object.defineProperty(DocumentFragment.prototype, 'children', { + get: function () { + return new LiveNodeList(this, childrenRefresh); + }, + }); + + __set__ = function (object, key, value) { + //console.log(value) + object['$$' + key] = value; + }; + } +} catch (e) { + //ie8 +} + +exports._updateLiveList = _updateLiveList; +exports.Attr = Attr; +exports.CDATASection = CDATASection; +exports.CharacterData = CharacterData; +exports.Comment = Comment; +exports.Document = Document; +exports.DocumentFragment = DocumentFragment; +exports.DocumentType = DocumentType; +exports.DOMImplementation = DOMImplementation; +exports.Element = Element; +exports.Entity = Entity; +exports.EntityReference = EntityReference; +exports.LiveNodeList = LiveNodeList; +exports.NamedNodeMap = NamedNodeMap; +exports.Node = Node; +exports.NodeList = NodeList; +exports.Notation = Notation; +exports.Text = Text; +exports.ProcessingInstruction = ProcessingInstruction; +exports.walkDOM = walkDOM; +exports.XMLSerializer = XMLSerializer; + +},{"./conventions":4,"./errors":8,"./grammar":9}],7:[function(require,module,exports){ +'use strict'; + +var freeze = require('./conventions').freeze; + +/** + * The entities that are predefined in every XML document. + * + * @see https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-predefined-ent W3C XML 1.1 + * @see https://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent W3C XML 1.0 + * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML + * Wikipedia + */ +exports.XML_ENTITIES = freeze({ + amp: '&', + apos: "'", + gt: '>', + lt: '<', + quot: '"', +}); + +/** + * A map of all entities that are detected in an HTML document. + * They contain all entries from `XML_ENTITIES`. + * + * @see {@link XML_ENTITIES} + * @see {@link DOMParser.parseFromString} + * @see {@link DOMImplementation.prototype.createHTMLDocument} + * @see https://html.spec.whatwg.org/#named-character-references WHATWG HTML(5) + * Spec + * @see https://html.spec.whatwg.org/entities.json JSON + * @see https://www.w3.org/TR/xml-entity-names/ W3C XML Entity Names + * @see https://www.w3.org/TR/html4/sgml/entities.html W3C HTML4/SGML + * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML + * Wikipedia (HTML) + * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML + * Wikpedia (XHTML) + */ +exports.HTML_ENTITIES = freeze({ + Aacute: '\u00C1', + aacute: '\u00E1', + Abreve: '\u0102', + abreve: '\u0103', + ac: '\u223E', + acd: '\u223F', + acE: '\u223E\u0333', + Acirc: '\u00C2', + acirc: '\u00E2', + acute: '\u00B4', + Acy: '\u0410', + acy: '\u0430', + AElig: '\u00C6', + aelig: '\u00E6', + af: '\u2061', + Afr: '\uD835\uDD04', + afr: '\uD835\uDD1E', + Agrave: '\u00C0', + agrave: '\u00E0', + alefsym: '\u2135', + aleph: '\u2135', + Alpha: '\u0391', + alpha: '\u03B1', + Amacr: '\u0100', + amacr: '\u0101', + amalg: '\u2A3F', + AMP: '\u0026', + amp: '\u0026', + And: '\u2A53', + and: '\u2227', + andand: '\u2A55', + andd: '\u2A5C', + andslope: '\u2A58', + andv: '\u2A5A', + ang: '\u2220', + ange: '\u29A4', + angle: '\u2220', + angmsd: '\u2221', + angmsdaa: '\u29A8', + angmsdab: '\u29A9', + angmsdac: '\u29AA', + angmsdad: '\u29AB', + angmsdae: '\u29AC', + angmsdaf: '\u29AD', + angmsdag: '\u29AE', + angmsdah: '\u29AF', + angrt: '\u221F', + angrtvb: '\u22BE', + angrtvbd: '\u299D', + angsph: '\u2222', + angst: '\u00C5', + angzarr: '\u237C', + Aogon: '\u0104', + aogon: '\u0105', + Aopf: '\uD835\uDD38', + aopf: '\uD835\uDD52', + ap: '\u2248', + apacir: '\u2A6F', + apE: '\u2A70', + ape: '\u224A', + apid: '\u224B', + apos: '\u0027', + ApplyFunction: '\u2061', + approx: '\u2248', + approxeq: '\u224A', + Aring: '\u00C5', + aring: '\u00E5', + Ascr: '\uD835\uDC9C', + ascr: '\uD835\uDCB6', + Assign: '\u2254', + ast: '\u002A', + asymp: '\u2248', + asympeq: '\u224D', + Atilde: '\u00C3', + atilde: '\u00E3', + Auml: '\u00C4', + auml: '\u00E4', + awconint: '\u2233', + awint: '\u2A11', + backcong: '\u224C', + backepsilon: '\u03F6', + backprime: '\u2035', + backsim: '\u223D', + backsimeq: '\u22CD', + Backslash: '\u2216', + Barv: '\u2AE7', + barvee: '\u22BD', + Barwed: '\u2306', + barwed: '\u2305', + barwedge: '\u2305', + bbrk: '\u23B5', + bbrktbrk: '\u23B6', + bcong: '\u224C', + Bcy: '\u0411', + bcy: '\u0431', + bdquo: '\u201E', + becaus: '\u2235', + Because: '\u2235', + because: '\u2235', + bemptyv: '\u29B0', + bepsi: '\u03F6', + bernou: '\u212C', + Bernoullis: '\u212C', + Beta: '\u0392', + beta: '\u03B2', + beth: '\u2136', + between: '\u226C', + Bfr: '\uD835\uDD05', + bfr: '\uD835\uDD1F', + bigcap: '\u22C2', + bigcirc: '\u25EF', + bigcup: '\u22C3', + bigodot: '\u2A00', + bigoplus: '\u2A01', + bigotimes: '\u2A02', + bigsqcup: '\u2A06', + bigstar: '\u2605', + bigtriangledown: '\u25BD', + bigtriangleup: '\u25B3', + biguplus: '\u2A04', + bigvee: '\u22C1', + bigwedge: '\u22C0', + bkarow: '\u290D', + blacklozenge: '\u29EB', + blacksquare: '\u25AA', + blacktriangle: '\u25B4', + blacktriangledown: '\u25BE', + blacktriangleleft: '\u25C2', + blacktriangleright: '\u25B8', + blank: '\u2423', + blk12: '\u2592', + blk14: '\u2591', + blk34: '\u2593', + block: '\u2588', + bne: '\u003D\u20E5', + bnequiv: '\u2261\u20E5', + bNot: '\u2AED', + bnot: '\u2310', + Bopf: '\uD835\uDD39', + bopf: '\uD835\uDD53', + bot: '\u22A5', + bottom: '\u22A5', + bowtie: '\u22C8', + boxbox: '\u29C9', + boxDL: '\u2557', + boxDl: '\u2556', + boxdL: '\u2555', + boxdl: '\u2510', + boxDR: '\u2554', + boxDr: '\u2553', + boxdR: '\u2552', + boxdr: '\u250C', + boxH: '\u2550', + boxh: '\u2500', + boxHD: '\u2566', + boxHd: '\u2564', + boxhD: '\u2565', + boxhd: '\u252C', + boxHU: '\u2569', + boxHu: '\u2567', + boxhU: '\u2568', + boxhu: '\u2534', + boxminus: '\u229F', + boxplus: '\u229E', + boxtimes: '\u22A0', + boxUL: '\u255D', + boxUl: '\u255C', + boxuL: '\u255B', + boxul: '\u2518', + boxUR: '\u255A', + boxUr: '\u2559', + boxuR: '\u2558', + boxur: '\u2514', + boxV: '\u2551', + boxv: '\u2502', + boxVH: '\u256C', + boxVh: '\u256B', + boxvH: '\u256A', + boxvh: '\u253C', + boxVL: '\u2563', + boxVl: '\u2562', + boxvL: '\u2561', + boxvl: '\u2524', + boxVR: '\u2560', + boxVr: '\u255F', + boxvR: '\u255E', + boxvr: '\u251C', + bprime: '\u2035', + Breve: '\u02D8', + breve: '\u02D8', + brvbar: '\u00A6', + Bscr: '\u212C', + bscr: '\uD835\uDCB7', + bsemi: '\u204F', + bsim: '\u223D', + bsime: '\u22CD', + bsol: '\u005C', + bsolb: '\u29C5', + bsolhsub: '\u27C8', + bull: '\u2022', + bullet: '\u2022', + bump: '\u224E', + bumpE: '\u2AAE', + bumpe: '\u224F', + Bumpeq: '\u224E', + bumpeq: '\u224F', + Cacute: '\u0106', + cacute: '\u0107', + Cap: '\u22D2', + cap: '\u2229', + capand: '\u2A44', + capbrcup: '\u2A49', + capcap: '\u2A4B', + capcup: '\u2A47', + capdot: '\u2A40', + CapitalDifferentialD: '\u2145', + caps: '\u2229\uFE00', + caret: '\u2041', + caron: '\u02C7', + Cayleys: '\u212D', + ccaps: '\u2A4D', + Ccaron: '\u010C', + ccaron: '\u010D', + Ccedil: '\u00C7', + ccedil: '\u00E7', + Ccirc: '\u0108', + ccirc: '\u0109', + Cconint: '\u2230', + ccups: '\u2A4C', + ccupssm: '\u2A50', + Cdot: '\u010A', + cdot: '\u010B', + cedil: '\u00B8', + Cedilla: '\u00B8', + cemptyv: '\u29B2', + cent: '\u00A2', + CenterDot: '\u00B7', + centerdot: '\u00B7', + Cfr: '\u212D', + cfr: '\uD835\uDD20', + CHcy: '\u0427', + chcy: '\u0447', + check: '\u2713', + checkmark: '\u2713', + Chi: '\u03A7', + chi: '\u03C7', + cir: '\u25CB', + circ: '\u02C6', + circeq: '\u2257', + circlearrowleft: '\u21BA', + circlearrowright: '\u21BB', + circledast: '\u229B', + circledcirc: '\u229A', + circleddash: '\u229D', + CircleDot: '\u2299', + circledR: '\u00AE', + circledS: '\u24C8', + CircleMinus: '\u2296', + CirclePlus: '\u2295', + CircleTimes: '\u2297', + cirE: '\u29C3', + cire: '\u2257', + cirfnint: '\u2A10', + cirmid: '\u2AEF', + cirscir: '\u29C2', + ClockwiseContourIntegral: '\u2232', + CloseCurlyDoubleQuote: '\u201D', + CloseCurlyQuote: '\u2019', + clubs: '\u2663', + clubsuit: '\u2663', + Colon: '\u2237', + colon: '\u003A', + Colone: '\u2A74', + colone: '\u2254', + coloneq: '\u2254', + comma: '\u002C', + commat: '\u0040', + comp: '\u2201', + compfn: '\u2218', + complement: '\u2201', + complexes: '\u2102', + cong: '\u2245', + congdot: '\u2A6D', + Congruent: '\u2261', + Conint: '\u222F', + conint: '\u222E', + ContourIntegral: '\u222E', + Copf: '\u2102', + copf: '\uD835\uDD54', + coprod: '\u2210', + Coproduct: '\u2210', + COPY: '\u00A9', + copy: '\u00A9', + copysr: '\u2117', + CounterClockwiseContourIntegral: '\u2233', + crarr: '\u21B5', + Cross: '\u2A2F', + cross: '\u2717', + Cscr: '\uD835\uDC9E', + cscr: '\uD835\uDCB8', + csub: '\u2ACF', + csube: '\u2AD1', + csup: '\u2AD0', + csupe: '\u2AD2', + ctdot: '\u22EF', + cudarrl: '\u2938', + cudarrr: '\u2935', + cuepr: '\u22DE', + cuesc: '\u22DF', + cularr: '\u21B6', + cularrp: '\u293D', + Cup: '\u22D3', + cup: '\u222A', + cupbrcap: '\u2A48', + CupCap: '\u224D', + cupcap: '\u2A46', + cupcup: '\u2A4A', + cupdot: '\u228D', + cupor: '\u2A45', + cups: '\u222A\uFE00', + curarr: '\u21B7', + curarrm: '\u293C', + curlyeqprec: '\u22DE', + curlyeqsucc: '\u22DF', + curlyvee: '\u22CE', + curlywedge: '\u22CF', + curren: '\u00A4', + curvearrowleft: '\u21B6', + curvearrowright: '\u21B7', + cuvee: '\u22CE', + cuwed: '\u22CF', + cwconint: '\u2232', + cwint: '\u2231', + cylcty: '\u232D', + Dagger: '\u2021', + dagger: '\u2020', + daleth: '\u2138', + Darr: '\u21A1', + dArr: '\u21D3', + darr: '\u2193', + dash: '\u2010', + Dashv: '\u2AE4', + dashv: '\u22A3', + dbkarow: '\u290F', + dblac: '\u02DD', + Dcaron: '\u010E', + dcaron: '\u010F', + Dcy: '\u0414', + dcy: '\u0434', + DD: '\u2145', + dd: '\u2146', + ddagger: '\u2021', + ddarr: '\u21CA', + DDotrahd: '\u2911', + ddotseq: '\u2A77', + deg: '\u00B0', + Del: '\u2207', + Delta: '\u0394', + delta: '\u03B4', + demptyv: '\u29B1', + dfisht: '\u297F', + Dfr: '\uD835\uDD07', + dfr: '\uD835\uDD21', + dHar: '\u2965', + dharl: '\u21C3', + dharr: '\u21C2', + DiacriticalAcute: '\u00B4', + DiacriticalDot: '\u02D9', + DiacriticalDoubleAcute: '\u02DD', + DiacriticalGrave: '\u0060', + DiacriticalTilde: '\u02DC', + diam: '\u22C4', + Diamond: '\u22C4', + diamond: '\u22C4', + diamondsuit: '\u2666', + diams: '\u2666', + die: '\u00A8', + DifferentialD: '\u2146', + digamma: '\u03DD', + disin: '\u22F2', + div: '\u00F7', + divide: '\u00F7', + divideontimes: '\u22C7', + divonx: '\u22C7', + DJcy: '\u0402', + djcy: '\u0452', + dlcorn: '\u231E', + dlcrop: '\u230D', + dollar: '\u0024', + Dopf: '\uD835\uDD3B', + dopf: '\uD835\uDD55', + Dot: '\u00A8', + dot: '\u02D9', + DotDot: '\u20DC', + doteq: '\u2250', + doteqdot: '\u2251', + DotEqual: '\u2250', + dotminus: '\u2238', + dotplus: '\u2214', + dotsquare: '\u22A1', + doublebarwedge: '\u2306', + DoubleContourIntegral: '\u222F', + DoubleDot: '\u00A8', + DoubleDownArrow: '\u21D3', + DoubleLeftArrow: '\u21D0', + DoubleLeftRightArrow: '\u21D4', + DoubleLeftTee: '\u2AE4', + DoubleLongLeftArrow: '\u27F8', + DoubleLongLeftRightArrow: '\u27FA', + DoubleLongRightArrow: '\u27F9', + DoubleRightArrow: '\u21D2', + DoubleRightTee: '\u22A8', + DoubleUpArrow: '\u21D1', + DoubleUpDownArrow: '\u21D5', + DoubleVerticalBar: '\u2225', + DownArrow: '\u2193', + Downarrow: '\u21D3', + downarrow: '\u2193', + DownArrowBar: '\u2913', + DownArrowUpArrow: '\u21F5', + DownBreve: '\u0311', + downdownarrows: '\u21CA', + downharpoonleft: '\u21C3', + downharpoonright: '\u21C2', + DownLeftRightVector: '\u2950', + DownLeftTeeVector: '\u295E', + DownLeftVector: '\u21BD', + DownLeftVectorBar: '\u2956', + DownRightTeeVector: '\u295F', + DownRightVector: '\u21C1', + DownRightVectorBar: '\u2957', + DownTee: '\u22A4', + DownTeeArrow: '\u21A7', + drbkarow: '\u2910', + drcorn: '\u231F', + drcrop: '\u230C', + Dscr: '\uD835\uDC9F', + dscr: '\uD835\uDCB9', + DScy: '\u0405', + dscy: '\u0455', + dsol: '\u29F6', + Dstrok: '\u0110', + dstrok: '\u0111', + dtdot: '\u22F1', + dtri: '\u25BF', + dtrif: '\u25BE', + duarr: '\u21F5', + duhar: '\u296F', + dwangle: '\u29A6', + DZcy: '\u040F', + dzcy: '\u045F', + dzigrarr: '\u27FF', + Eacute: '\u00C9', + eacute: '\u00E9', + easter: '\u2A6E', + Ecaron: '\u011A', + ecaron: '\u011B', + ecir: '\u2256', + Ecirc: '\u00CA', + ecirc: '\u00EA', + ecolon: '\u2255', + Ecy: '\u042D', + ecy: '\u044D', + eDDot: '\u2A77', + Edot: '\u0116', + eDot: '\u2251', + edot: '\u0117', + ee: '\u2147', + efDot: '\u2252', + Efr: '\uD835\uDD08', + efr: '\uD835\uDD22', + eg: '\u2A9A', + Egrave: '\u00C8', + egrave: '\u00E8', + egs: '\u2A96', + egsdot: '\u2A98', + el: '\u2A99', + Element: '\u2208', + elinters: '\u23E7', + ell: '\u2113', + els: '\u2A95', + elsdot: '\u2A97', + Emacr: '\u0112', + emacr: '\u0113', + empty: '\u2205', + emptyset: '\u2205', + EmptySmallSquare: '\u25FB', + emptyv: '\u2205', + EmptyVerySmallSquare: '\u25AB', + emsp: '\u2003', + emsp13: '\u2004', + emsp14: '\u2005', + ENG: '\u014A', + eng: '\u014B', + ensp: '\u2002', + Eogon: '\u0118', + eogon: '\u0119', + Eopf: '\uD835\uDD3C', + eopf: '\uD835\uDD56', + epar: '\u22D5', + eparsl: '\u29E3', + eplus: '\u2A71', + epsi: '\u03B5', + Epsilon: '\u0395', + epsilon: '\u03B5', + epsiv: '\u03F5', + eqcirc: '\u2256', + eqcolon: '\u2255', + eqsim: '\u2242', + eqslantgtr: '\u2A96', + eqslantless: '\u2A95', + Equal: '\u2A75', + equals: '\u003D', + EqualTilde: '\u2242', + equest: '\u225F', + Equilibrium: '\u21CC', + equiv: '\u2261', + equivDD: '\u2A78', + eqvparsl: '\u29E5', + erarr: '\u2971', + erDot: '\u2253', + Escr: '\u2130', + escr: '\u212F', + esdot: '\u2250', + Esim: '\u2A73', + esim: '\u2242', + Eta: '\u0397', + eta: '\u03B7', + ETH: '\u00D0', + eth: '\u00F0', + Euml: '\u00CB', + euml: '\u00EB', + euro: '\u20AC', + excl: '\u0021', + exist: '\u2203', + Exists: '\u2203', + expectation: '\u2130', + ExponentialE: '\u2147', + exponentiale: '\u2147', + fallingdotseq: '\u2252', + Fcy: '\u0424', + fcy: '\u0444', + female: '\u2640', + ffilig: '\uFB03', + fflig: '\uFB00', + ffllig: '\uFB04', + Ffr: '\uD835\uDD09', + ffr: '\uD835\uDD23', + filig: '\uFB01', + FilledSmallSquare: '\u25FC', + FilledVerySmallSquare: '\u25AA', + fjlig: '\u0066\u006A', + flat: '\u266D', + fllig: '\uFB02', + fltns: '\u25B1', + fnof: '\u0192', + Fopf: '\uD835\uDD3D', + fopf: '\uD835\uDD57', + ForAll: '\u2200', + forall: '\u2200', + fork: '\u22D4', + forkv: '\u2AD9', + Fouriertrf: '\u2131', + fpartint: '\u2A0D', + frac12: '\u00BD', + frac13: '\u2153', + frac14: '\u00BC', + frac15: '\u2155', + frac16: '\u2159', + frac18: '\u215B', + frac23: '\u2154', + frac25: '\u2156', + frac34: '\u00BE', + frac35: '\u2157', + frac38: '\u215C', + frac45: '\u2158', + frac56: '\u215A', + frac58: '\u215D', + frac78: '\u215E', + frasl: '\u2044', + frown: '\u2322', + Fscr: '\u2131', + fscr: '\uD835\uDCBB', + gacute: '\u01F5', + Gamma: '\u0393', + gamma: '\u03B3', + Gammad: '\u03DC', + gammad: '\u03DD', + gap: '\u2A86', + Gbreve: '\u011E', + gbreve: '\u011F', + Gcedil: '\u0122', + Gcirc: '\u011C', + gcirc: '\u011D', + Gcy: '\u0413', + gcy: '\u0433', + Gdot: '\u0120', + gdot: '\u0121', + gE: '\u2267', + ge: '\u2265', + gEl: '\u2A8C', + gel: '\u22DB', + geq: '\u2265', + geqq: '\u2267', + geqslant: '\u2A7E', + ges: '\u2A7E', + gescc: '\u2AA9', + gesdot: '\u2A80', + gesdoto: '\u2A82', + gesdotol: '\u2A84', + gesl: '\u22DB\uFE00', + gesles: '\u2A94', + Gfr: '\uD835\uDD0A', + gfr: '\uD835\uDD24', + Gg: '\u22D9', + gg: '\u226B', + ggg: '\u22D9', + gimel: '\u2137', + GJcy: '\u0403', + gjcy: '\u0453', + gl: '\u2277', + gla: '\u2AA5', + glE: '\u2A92', + glj: '\u2AA4', + gnap: '\u2A8A', + gnapprox: '\u2A8A', + gnE: '\u2269', + gne: '\u2A88', + gneq: '\u2A88', + gneqq: '\u2269', + gnsim: '\u22E7', + Gopf: '\uD835\uDD3E', + gopf: '\uD835\uDD58', + grave: '\u0060', + GreaterEqual: '\u2265', + GreaterEqualLess: '\u22DB', + GreaterFullEqual: '\u2267', + GreaterGreater: '\u2AA2', + GreaterLess: '\u2277', + GreaterSlantEqual: '\u2A7E', + GreaterTilde: '\u2273', + Gscr: '\uD835\uDCA2', + gscr: '\u210A', + gsim: '\u2273', + gsime: '\u2A8E', + gsiml: '\u2A90', + Gt: '\u226B', + GT: '\u003E', + gt: '\u003E', + gtcc: '\u2AA7', + gtcir: '\u2A7A', + gtdot: '\u22D7', + gtlPar: '\u2995', + gtquest: '\u2A7C', + gtrapprox: '\u2A86', + gtrarr: '\u2978', + gtrdot: '\u22D7', + gtreqless: '\u22DB', + gtreqqless: '\u2A8C', + gtrless: '\u2277', + gtrsim: '\u2273', + gvertneqq: '\u2269\uFE00', + gvnE: '\u2269\uFE00', + Hacek: '\u02C7', + hairsp: '\u200A', + half: '\u00BD', + hamilt: '\u210B', + HARDcy: '\u042A', + hardcy: '\u044A', + hArr: '\u21D4', + harr: '\u2194', + harrcir: '\u2948', + harrw: '\u21AD', + Hat: '\u005E', + hbar: '\u210F', + Hcirc: '\u0124', + hcirc: '\u0125', + hearts: '\u2665', + heartsuit: '\u2665', + hellip: '\u2026', + hercon: '\u22B9', + Hfr: '\u210C', + hfr: '\uD835\uDD25', + HilbertSpace: '\u210B', + hksearow: '\u2925', + hkswarow: '\u2926', + hoarr: '\u21FF', + homtht: '\u223B', + hookleftarrow: '\u21A9', + hookrightarrow: '\u21AA', + Hopf: '\u210D', + hopf: '\uD835\uDD59', + horbar: '\u2015', + HorizontalLine: '\u2500', + Hscr: '\u210B', + hscr: '\uD835\uDCBD', + hslash: '\u210F', + Hstrok: '\u0126', + hstrok: '\u0127', + HumpDownHump: '\u224E', + HumpEqual: '\u224F', + hybull: '\u2043', + hyphen: '\u2010', + Iacute: '\u00CD', + iacute: '\u00ED', + ic: '\u2063', + Icirc: '\u00CE', + icirc: '\u00EE', + Icy: '\u0418', + icy: '\u0438', + Idot: '\u0130', + IEcy: '\u0415', + iecy: '\u0435', + iexcl: '\u00A1', + iff: '\u21D4', + Ifr: '\u2111', + ifr: '\uD835\uDD26', + Igrave: '\u00CC', + igrave: '\u00EC', + ii: '\u2148', + iiiint: '\u2A0C', + iiint: '\u222D', + iinfin: '\u29DC', + iiota: '\u2129', + IJlig: '\u0132', + ijlig: '\u0133', + Im: '\u2111', + Imacr: '\u012A', + imacr: '\u012B', + image: '\u2111', + ImaginaryI: '\u2148', + imagline: '\u2110', + imagpart: '\u2111', + imath: '\u0131', + imof: '\u22B7', + imped: '\u01B5', + Implies: '\u21D2', + in: '\u2208', + incare: '\u2105', + infin: '\u221E', + infintie: '\u29DD', + inodot: '\u0131', + Int: '\u222C', + int: '\u222B', + intcal: '\u22BA', + integers: '\u2124', + Integral: '\u222B', + intercal: '\u22BA', + Intersection: '\u22C2', + intlarhk: '\u2A17', + intprod: '\u2A3C', + InvisibleComma: '\u2063', + InvisibleTimes: '\u2062', + IOcy: '\u0401', + iocy: '\u0451', + Iogon: '\u012E', + iogon: '\u012F', + Iopf: '\uD835\uDD40', + iopf: '\uD835\uDD5A', + Iota: '\u0399', + iota: '\u03B9', + iprod: '\u2A3C', + iquest: '\u00BF', + Iscr: '\u2110', + iscr: '\uD835\uDCBE', + isin: '\u2208', + isindot: '\u22F5', + isinE: '\u22F9', + isins: '\u22F4', + isinsv: '\u22F3', + isinv: '\u2208', + it: '\u2062', + Itilde: '\u0128', + itilde: '\u0129', + Iukcy: '\u0406', + iukcy: '\u0456', + Iuml: '\u00CF', + iuml: '\u00EF', + Jcirc: '\u0134', + jcirc: '\u0135', + Jcy: '\u0419', + jcy: '\u0439', + Jfr: '\uD835\uDD0D', + jfr: '\uD835\uDD27', + jmath: '\u0237', + Jopf: '\uD835\uDD41', + jopf: '\uD835\uDD5B', + Jscr: '\uD835\uDCA5', + jscr: '\uD835\uDCBF', + Jsercy: '\u0408', + jsercy: '\u0458', + Jukcy: '\u0404', + jukcy: '\u0454', + Kappa: '\u039A', + kappa: '\u03BA', + kappav: '\u03F0', + Kcedil: '\u0136', + kcedil: '\u0137', + Kcy: '\u041A', + kcy: '\u043A', + Kfr: '\uD835\uDD0E', + kfr: '\uD835\uDD28', + kgreen: '\u0138', + KHcy: '\u0425', + khcy: '\u0445', + KJcy: '\u040C', + kjcy: '\u045C', + Kopf: '\uD835\uDD42', + kopf: '\uD835\uDD5C', + Kscr: '\uD835\uDCA6', + kscr: '\uD835\uDCC0', + lAarr: '\u21DA', + Lacute: '\u0139', + lacute: '\u013A', + laemptyv: '\u29B4', + lagran: '\u2112', + Lambda: '\u039B', + lambda: '\u03BB', + Lang: '\u27EA', + lang: '\u27E8', + langd: '\u2991', + langle: '\u27E8', + lap: '\u2A85', + Laplacetrf: '\u2112', + laquo: '\u00AB', + Larr: '\u219E', + lArr: '\u21D0', + larr: '\u2190', + larrb: '\u21E4', + larrbfs: '\u291F', + larrfs: '\u291D', + larrhk: '\u21A9', + larrlp: '\u21AB', + larrpl: '\u2939', + larrsim: '\u2973', + larrtl: '\u21A2', + lat: '\u2AAB', + lAtail: '\u291B', + latail: '\u2919', + late: '\u2AAD', + lates: '\u2AAD\uFE00', + lBarr: '\u290E', + lbarr: '\u290C', + lbbrk: '\u2772', + lbrace: '\u007B', + lbrack: '\u005B', + lbrke: '\u298B', + lbrksld: '\u298F', + lbrkslu: '\u298D', + Lcaron: '\u013D', + lcaron: '\u013E', + Lcedil: '\u013B', + lcedil: '\u013C', + lceil: '\u2308', + lcub: '\u007B', + Lcy: '\u041B', + lcy: '\u043B', + ldca: '\u2936', + ldquo: '\u201C', + ldquor: '\u201E', + ldrdhar: '\u2967', + ldrushar: '\u294B', + ldsh: '\u21B2', + lE: '\u2266', + le: '\u2264', + LeftAngleBracket: '\u27E8', + LeftArrow: '\u2190', + Leftarrow: '\u21D0', + leftarrow: '\u2190', + LeftArrowBar: '\u21E4', + LeftArrowRightArrow: '\u21C6', + leftarrowtail: '\u21A2', + LeftCeiling: '\u2308', + LeftDoubleBracket: '\u27E6', + LeftDownTeeVector: '\u2961', + LeftDownVector: '\u21C3', + LeftDownVectorBar: '\u2959', + LeftFloor: '\u230A', + leftharpoondown: '\u21BD', + leftharpoonup: '\u21BC', + leftleftarrows: '\u21C7', + LeftRightArrow: '\u2194', + Leftrightarrow: '\u21D4', + leftrightarrow: '\u2194', + leftrightarrows: '\u21C6', + leftrightharpoons: '\u21CB', + leftrightsquigarrow: '\u21AD', + LeftRightVector: '\u294E', + LeftTee: '\u22A3', + LeftTeeArrow: '\u21A4', + LeftTeeVector: '\u295A', + leftthreetimes: '\u22CB', + LeftTriangle: '\u22B2', + LeftTriangleBar: '\u29CF', + LeftTriangleEqual: '\u22B4', + LeftUpDownVector: '\u2951', + LeftUpTeeVector: '\u2960', + LeftUpVector: '\u21BF', + LeftUpVectorBar: '\u2958', + LeftVector: '\u21BC', + LeftVectorBar: '\u2952', + lEg: '\u2A8B', + leg: '\u22DA', + leq: '\u2264', + leqq: '\u2266', + leqslant: '\u2A7D', + les: '\u2A7D', + lescc: '\u2AA8', + lesdot: '\u2A7F', + lesdoto: '\u2A81', + lesdotor: '\u2A83', + lesg: '\u22DA\uFE00', + lesges: '\u2A93', + lessapprox: '\u2A85', + lessdot: '\u22D6', + lesseqgtr: '\u22DA', + lesseqqgtr: '\u2A8B', + LessEqualGreater: '\u22DA', + LessFullEqual: '\u2266', + LessGreater: '\u2276', + lessgtr: '\u2276', + LessLess: '\u2AA1', + lesssim: '\u2272', + LessSlantEqual: '\u2A7D', + LessTilde: '\u2272', + lfisht: '\u297C', + lfloor: '\u230A', + Lfr: '\uD835\uDD0F', + lfr: '\uD835\uDD29', + lg: '\u2276', + lgE: '\u2A91', + lHar: '\u2962', + lhard: '\u21BD', + lharu: '\u21BC', + lharul: '\u296A', + lhblk: '\u2584', + LJcy: '\u0409', + ljcy: '\u0459', + Ll: '\u22D8', + ll: '\u226A', + llarr: '\u21C7', + llcorner: '\u231E', + Lleftarrow: '\u21DA', + llhard: '\u296B', + lltri: '\u25FA', + Lmidot: '\u013F', + lmidot: '\u0140', + lmoust: '\u23B0', + lmoustache: '\u23B0', + lnap: '\u2A89', + lnapprox: '\u2A89', + lnE: '\u2268', + lne: '\u2A87', + lneq: '\u2A87', + lneqq: '\u2268', + lnsim: '\u22E6', + loang: '\u27EC', + loarr: '\u21FD', + lobrk: '\u27E6', + LongLeftArrow: '\u27F5', + Longleftarrow: '\u27F8', + longleftarrow: '\u27F5', + LongLeftRightArrow: '\u27F7', + Longleftrightarrow: '\u27FA', + longleftrightarrow: '\u27F7', + longmapsto: '\u27FC', + LongRightArrow: '\u27F6', + Longrightarrow: '\u27F9', + longrightarrow: '\u27F6', + looparrowleft: '\u21AB', + looparrowright: '\u21AC', + lopar: '\u2985', + Lopf: '\uD835\uDD43', + lopf: '\uD835\uDD5D', + loplus: '\u2A2D', + lotimes: '\u2A34', + lowast: '\u2217', + lowbar: '\u005F', + LowerLeftArrow: '\u2199', + LowerRightArrow: '\u2198', + loz: '\u25CA', + lozenge: '\u25CA', + lozf: '\u29EB', + lpar: '\u0028', + lparlt: '\u2993', + lrarr: '\u21C6', + lrcorner: '\u231F', + lrhar: '\u21CB', + lrhard: '\u296D', + lrm: '\u200E', + lrtri: '\u22BF', + lsaquo: '\u2039', + Lscr: '\u2112', + lscr: '\uD835\uDCC1', + Lsh: '\u21B0', + lsh: '\u21B0', + lsim: '\u2272', + lsime: '\u2A8D', + lsimg: '\u2A8F', + lsqb: '\u005B', + lsquo: '\u2018', + lsquor: '\u201A', + Lstrok: '\u0141', + lstrok: '\u0142', + Lt: '\u226A', + LT: '\u003C', + lt: '\u003C', + ltcc: '\u2AA6', + ltcir: '\u2A79', + ltdot: '\u22D6', + lthree: '\u22CB', + ltimes: '\u22C9', + ltlarr: '\u2976', + ltquest: '\u2A7B', + ltri: '\u25C3', + ltrie: '\u22B4', + ltrif: '\u25C2', + ltrPar: '\u2996', + lurdshar: '\u294A', + luruhar: '\u2966', + lvertneqq: '\u2268\uFE00', + lvnE: '\u2268\uFE00', + macr: '\u00AF', + male: '\u2642', + malt: '\u2720', + maltese: '\u2720', + Map: '\u2905', + map: '\u21A6', + mapsto: '\u21A6', + mapstodown: '\u21A7', + mapstoleft: '\u21A4', + mapstoup: '\u21A5', + marker: '\u25AE', + mcomma: '\u2A29', + Mcy: '\u041C', + mcy: '\u043C', + mdash: '\u2014', + mDDot: '\u223A', + measuredangle: '\u2221', + MediumSpace: '\u205F', + Mellintrf: '\u2133', + Mfr: '\uD835\uDD10', + mfr: '\uD835\uDD2A', + mho: '\u2127', + micro: '\u00B5', + mid: '\u2223', + midast: '\u002A', + midcir: '\u2AF0', + middot: '\u00B7', + minus: '\u2212', + minusb: '\u229F', + minusd: '\u2238', + minusdu: '\u2A2A', + MinusPlus: '\u2213', + mlcp: '\u2ADB', + mldr: '\u2026', + mnplus: '\u2213', + models: '\u22A7', + Mopf: '\uD835\uDD44', + mopf: '\uD835\uDD5E', + mp: '\u2213', + Mscr: '\u2133', + mscr: '\uD835\uDCC2', + mstpos: '\u223E', + Mu: '\u039C', + mu: '\u03BC', + multimap: '\u22B8', + mumap: '\u22B8', + nabla: '\u2207', + Nacute: '\u0143', + nacute: '\u0144', + nang: '\u2220\u20D2', + nap: '\u2249', + napE: '\u2A70\u0338', + napid: '\u224B\u0338', + napos: '\u0149', + napprox: '\u2249', + natur: '\u266E', + natural: '\u266E', + naturals: '\u2115', + nbsp: '\u00A0', + nbump: '\u224E\u0338', + nbumpe: '\u224F\u0338', + ncap: '\u2A43', + Ncaron: '\u0147', + ncaron: '\u0148', + Ncedil: '\u0145', + ncedil: '\u0146', + ncong: '\u2247', + ncongdot: '\u2A6D\u0338', + ncup: '\u2A42', + Ncy: '\u041D', + ncy: '\u043D', + ndash: '\u2013', + ne: '\u2260', + nearhk: '\u2924', + neArr: '\u21D7', + nearr: '\u2197', + nearrow: '\u2197', + nedot: '\u2250\u0338', + NegativeMediumSpace: '\u200B', + NegativeThickSpace: '\u200B', + NegativeThinSpace: '\u200B', + NegativeVeryThinSpace: '\u200B', + nequiv: '\u2262', + nesear: '\u2928', + nesim: '\u2242\u0338', + NestedGreaterGreater: '\u226B', + NestedLessLess: '\u226A', + NewLine: '\u000A', + nexist: '\u2204', + nexists: '\u2204', + Nfr: '\uD835\uDD11', + nfr: '\uD835\uDD2B', + ngE: '\u2267\u0338', + nge: '\u2271', + ngeq: '\u2271', + ngeqq: '\u2267\u0338', + ngeqslant: '\u2A7E\u0338', + nges: '\u2A7E\u0338', + nGg: '\u22D9\u0338', + ngsim: '\u2275', + nGt: '\u226B\u20D2', + ngt: '\u226F', + ngtr: '\u226F', + nGtv: '\u226B\u0338', + nhArr: '\u21CE', + nharr: '\u21AE', + nhpar: '\u2AF2', + ni: '\u220B', + nis: '\u22FC', + nisd: '\u22FA', + niv: '\u220B', + NJcy: '\u040A', + njcy: '\u045A', + nlArr: '\u21CD', + nlarr: '\u219A', + nldr: '\u2025', + nlE: '\u2266\u0338', + nle: '\u2270', + nLeftarrow: '\u21CD', + nleftarrow: '\u219A', + nLeftrightarrow: '\u21CE', + nleftrightarrow: '\u21AE', + nleq: '\u2270', + nleqq: '\u2266\u0338', + nleqslant: '\u2A7D\u0338', + nles: '\u2A7D\u0338', + nless: '\u226E', + nLl: '\u22D8\u0338', + nlsim: '\u2274', + nLt: '\u226A\u20D2', + nlt: '\u226E', + nltri: '\u22EA', + nltrie: '\u22EC', + nLtv: '\u226A\u0338', + nmid: '\u2224', + NoBreak: '\u2060', + NonBreakingSpace: '\u00A0', + Nopf: '\u2115', + nopf: '\uD835\uDD5F', + Not: '\u2AEC', + not: '\u00AC', + NotCongruent: '\u2262', + NotCupCap: '\u226D', + NotDoubleVerticalBar: '\u2226', + NotElement: '\u2209', + NotEqual: '\u2260', + NotEqualTilde: '\u2242\u0338', + NotExists: '\u2204', + NotGreater: '\u226F', + NotGreaterEqual: '\u2271', + NotGreaterFullEqual: '\u2267\u0338', + NotGreaterGreater: '\u226B\u0338', + NotGreaterLess: '\u2279', + NotGreaterSlantEqual: '\u2A7E\u0338', + NotGreaterTilde: '\u2275', + NotHumpDownHump: '\u224E\u0338', + NotHumpEqual: '\u224F\u0338', + notin: '\u2209', + notindot: '\u22F5\u0338', + notinE: '\u22F9\u0338', + notinva: '\u2209', + notinvb: '\u22F7', + notinvc: '\u22F6', + NotLeftTriangle: '\u22EA', + NotLeftTriangleBar: '\u29CF\u0338', + NotLeftTriangleEqual: '\u22EC', + NotLess: '\u226E', + NotLessEqual: '\u2270', + NotLessGreater: '\u2278', + NotLessLess: '\u226A\u0338', + NotLessSlantEqual: '\u2A7D\u0338', + NotLessTilde: '\u2274', + NotNestedGreaterGreater: '\u2AA2\u0338', + NotNestedLessLess: '\u2AA1\u0338', + notni: '\u220C', + notniva: '\u220C', + notnivb: '\u22FE', + notnivc: '\u22FD', + NotPrecedes: '\u2280', + NotPrecedesEqual: '\u2AAF\u0338', + NotPrecedesSlantEqual: '\u22E0', + NotReverseElement: '\u220C', + NotRightTriangle: '\u22EB', + NotRightTriangleBar: '\u29D0\u0338', + NotRightTriangleEqual: '\u22ED', + NotSquareSubset: '\u228F\u0338', + NotSquareSubsetEqual: '\u22E2', + NotSquareSuperset: '\u2290\u0338', + NotSquareSupersetEqual: '\u22E3', + NotSubset: '\u2282\u20D2', + NotSubsetEqual: '\u2288', + NotSucceeds: '\u2281', + NotSucceedsEqual: '\u2AB0\u0338', + NotSucceedsSlantEqual: '\u22E1', + NotSucceedsTilde: '\u227F\u0338', + NotSuperset: '\u2283\u20D2', + NotSupersetEqual: '\u2289', + NotTilde: '\u2241', + NotTildeEqual: '\u2244', + NotTildeFullEqual: '\u2247', + NotTildeTilde: '\u2249', + NotVerticalBar: '\u2224', + npar: '\u2226', + nparallel: '\u2226', + nparsl: '\u2AFD\u20E5', + npart: '\u2202\u0338', + npolint: '\u2A14', + npr: '\u2280', + nprcue: '\u22E0', + npre: '\u2AAF\u0338', + nprec: '\u2280', + npreceq: '\u2AAF\u0338', + nrArr: '\u21CF', + nrarr: '\u219B', + nrarrc: '\u2933\u0338', + nrarrw: '\u219D\u0338', + nRightarrow: '\u21CF', + nrightarrow: '\u219B', + nrtri: '\u22EB', + nrtrie: '\u22ED', + nsc: '\u2281', + nsccue: '\u22E1', + nsce: '\u2AB0\u0338', + Nscr: '\uD835\uDCA9', + nscr: '\uD835\uDCC3', + nshortmid: '\u2224', + nshortparallel: '\u2226', + nsim: '\u2241', + nsime: '\u2244', + nsimeq: '\u2244', + nsmid: '\u2224', + nspar: '\u2226', + nsqsube: '\u22E2', + nsqsupe: '\u22E3', + nsub: '\u2284', + nsubE: '\u2AC5\u0338', + nsube: '\u2288', + nsubset: '\u2282\u20D2', + nsubseteq: '\u2288', + nsubseteqq: '\u2AC5\u0338', + nsucc: '\u2281', + nsucceq: '\u2AB0\u0338', + nsup: '\u2285', + nsupE: '\u2AC6\u0338', + nsupe: '\u2289', + nsupset: '\u2283\u20D2', + nsupseteq: '\u2289', + nsupseteqq: '\u2AC6\u0338', + ntgl: '\u2279', + Ntilde: '\u00D1', + ntilde: '\u00F1', + ntlg: '\u2278', + ntriangleleft: '\u22EA', + ntrianglelefteq: '\u22EC', + ntriangleright: '\u22EB', + ntrianglerighteq: '\u22ED', + Nu: '\u039D', + nu: '\u03BD', + num: '\u0023', + numero: '\u2116', + numsp: '\u2007', + nvap: '\u224D\u20D2', + nVDash: '\u22AF', + nVdash: '\u22AE', + nvDash: '\u22AD', + nvdash: '\u22AC', + nvge: '\u2265\u20D2', + nvgt: '\u003E\u20D2', + nvHarr: '\u2904', + nvinfin: '\u29DE', + nvlArr: '\u2902', + nvle: '\u2264\u20D2', + nvlt: '\u003C\u20D2', + nvltrie: '\u22B4\u20D2', + nvrArr: '\u2903', + nvrtrie: '\u22B5\u20D2', + nvsim: '\u223C\u20D2', + nwarhk: '\u2923', + nwArr: '\u21D6', + nwarr: '\u2196', + nwarrow: '\u2196', + nwnear: '\u2927', + Oacute: '\u00D3', + oacute: '\u00F3', + oast: '\u229B', + ocir: '\u229A', + Ocirc: '\u00D4', + ocirc: '\u00F4', + Ocy: '\u041E', + ocy: '\u043E', + odash: '\u229D', + Odblac: '\u0150', + odblac: '\u0151', + odiv: '\u2A38', + odot: '\u2299', + odsold: '\u29BC', + OElig: '\u0152', + oelig: '\u0153', + ofcir: '\u29BF', + Ofr: '\uD835\uDD12', + ofr: '\uD835\uDD2C', + ogon: '\u02DB', + Ograve: '\u00D2', + ograve: '\u00F2', + ogt: '\u29C1', + ohbar: '\u29B5', + ohm: '\u03A9', + oint: '\u222E', + olarr: '\u21BA', + olcir: '\u29BE', + olcross: '\u29BB', + oline: '\u203E', + olt: '\u29C0', + Omacr: '\u014C', + omacr: '\u014D', + Omega: '\u03A9', + omega: '\u03C9', + Omicron: '\u039F', + omicron: '\u03BF', + omid: '\u29B6', + ominus: '\u2296', + Oopf: '\uD835\uDD46', + oopf: '\uD835\uDD60', + opar: '\u29B7', + OpenCurlyDoubleQuote: '\u201C', + OpenCurlyQuote: '\u2018', + operp: '\u29B9', + oplus: '\u2295', + Or: '\u2A54', + or: '\u2228', + orarr: '\u21BB', + ord: '\u2A5D', + order: '\u2134', + orderof: '\u2134', + ordf: '\u00AA', + ordm: '\u00BA', + origof: '\u22B6', + oror: '\u2A56', + orslope: '\u2A57', + orv: '\u2A5B', + oS: '\u24C8', + Oscr: '\uD835\uDCAA', + oscr: '\u2134', + Oslash: '\u00D8', + oslash: '\u00F8', + osol: '\u2298', + Otilde: '\u00D5', + otilde: '\u00F5', + Otimes: '\u2A37', + otimes: '\u2297', + otimesas: '\u2A36', + Ouml: '\u00D6', + ouml: '\u00F6', + ovbar: '\u233D', + OverBar: '\u203E', + OverBrace: '\u23DE', + OverBracket: '\u23B4', + OverParenthesis: '\u23DC', + par: '\u2225', + para: '\u00B6', + parallel: '\u2225', + parsim: '\u2AF3', + parsl: '\u2AFD', + part: '\u2202', + PartialD: '\u2202', + Pcy: '\u041F', + pcy: '\u043F', + percnt: '\u0025', + period: '\u002E', + permil: '\u2030', + perp: '\u22A5', + pertenk: '\u2031', + Pfr: '\uD835\uDD13', + pfr: '\uD835\uDD2D', + Phi: '\u03A6', + phi: '\u03C6', + phiv: '\u03D5', + phmmat: '\u2133', + phone: '\u260E', + Pi: '\u03A0', + pi: '\u03C0', + pitchfork: '\u22D4', + piv: '\u03D6', + planck: '\u210F', + planckh: '\u210E', + plankv: '\u210F', + plus: '\u002B', + plusacir: '\u2A23', + plusb: '\u229E', + pluscir: '\u2A22', + plusdo: '\u2214', + plusdu: '\u2A25', + pluse: '\u2A72', + PlusMinus: '\u00B1', + plusmn: '\u00B1', + plussim: '\u2A26', + plustwo: '\u2A27', + pm: '\u00B1', + Poincareplane: '\u210C', + pointint: '\u2A15', + Popf: '\u2119', + popf: '\uD835\uDD61', + pound: '\u00A3', + Pr: '\u2ABB', + pr: '\u227A', + prap: '\u2AB7', + prcue: '\u227C', + prE: '\u2AB3', + pre: '\u2AAF', + prec: '\u227A', + precapprox: '\u2AB7', + preccurlyeq: '\u227C', + Precedes: '\u227A', + PrecedesEqual: '\u2AAF', + PrecedesSlantEqual: '\u227C', + PrecedesTilde: '\u227E', + preceq: '\u2AAF', + precnapprox: '\u2AB9', + precneqq: '\u2AB5', + precnsim: '\u22E8', + precsim: '\u227E', + Prime: '\u2033', + prime: '\u2032', + primes: '\u2119', + prnap: '\u2AB9', + prnE: '\u2AB5', + prnsim: '\u22E8', + prod: '\u220F', + Product: '\u220F', + profalar: '\u232E', + profline: '\u2312', + profsurf: '\u2313', + prop: '\u221D', + Proportion: '\u2237', + Proportional: '\u221D', + propto: '\u221D', + prsim: '\u227E', + prurel: '\u22B0', + Pscr: '\uD835\uDCAB', + pscr: '\uD835\uDCC5', + Psi: '\u03A8', + psi: '\u03C8', + puncsp: '\u2008', + Qfr: '\uD835\uDD14', + qfr: '\uD835\uDD2E', + qint: '\u2A0C', + Qopf: '\u211A', + qopf: '\uD835\uDD62', + qprime: '\u2057', + Qscr: '\uD835\uDCAC', + qscr: '\uD835\uDCC6', + quaternions: '\u210D', + quatint: '\u2A16', + quest: '\u003F', + questeq: '\u225F', + QUOT: '\u0022', + quot: '\u0022', + rAarr: '\u21DB', + race: '\u223D\u0331', + Racute: '\u0154', + racute: '\u0155', + radic: '\u221A', + raemptyv: '\u29B3', + Rang: '\u27EB', + rang: '\u27E9', + rangd: '\u2992', + range: '\u29A5', + rangle: '\u27E9', + raquo: '\u00BB', + Rarr: '\u21A0', + rArr: '\u21D2', + rarr: '\u2192', + rarrap: '\u2975', + rarrb: '\u21E5', + rarrbfs: '\u2920', + rarrc: '\u2933', + rarrfs: '\u291E', + rarrhk: '\u21AA', + rarrlp: '\u21AC', + rarrpl: '\u2945', + rarrsim: '\u2974', + Rarrtl: '\u2916', + rarrtl: '\u21A3', + rarrw: '\u219D', + rAtail: '\u291C', + ratail: '\u291A', + ratio: '\u2236', + rationals: '\u211A', + RBarr: '\u2910', + rBarr: '\u290F', + rbarr: '\u290D', + rbbrk: '\u2773', + rbrace: '\u007D', + rbrack: '\u005D', + rbrke: '\u298C', + rbrksld: '\u298E', + rbrkslu: '\u2990', + Rcaron: '\u0158', + rcaron: '\u0159', + Rcedil: '\u0156', + rcedil: '\u0157', + rceil: '\u2309', + rcub: '\u007D', + Rcy: '\u0420', + rcy: '\u0440', + rdca: '\u2937', + rdldhar: '\u2969', + rdquo: '\u201D', + rdquor: '\u201D', + rdsh: '\u21B3', + Re: '\u211C', + real: '\u211C', + realine: '\u211B', + realpart: '\u211C', + reals: '\u211D', + rect: '\u25AD', + REG: '\u00AE', + reg: '\u00AE', + ReverseElement: '\u220B', + ReverseEquilibrium: '\u21CB', + ReverseUpEquilibrium: '\u296F', + rfisht: '\u297D', + rfloor: '\u230B', + Rfr: '\u211C', + rfr: '\uD835\uDD2F', + rHar: '\u2964', + rhard: '\u21C1', + rharu: '\u21C0', + rharul: '\u296C', + Rho: '\u03A1', + rho: '\u03C1', + rhov: '\u03F1', + RightAngleBracket: '\u27E9', + RightArrow: '\u2192', + Rightarrow: '\u21D2', + rightarrow: '\u2192', + RightArrowBar: '\u21E5', + RightArrowLeftArrow: '\u21C4', + rightarrowtail: '\u21A3', + RightCeiling: '\u2309', + RightDoubleBracket: '\u27E7', + RightDownTeeVector: '\u295D', + RightDownVector: '\u21C2', + RightDownVectorBar: '\u2955', + RightFloor: '\u230B', + rightharpoondown: '\u21C1', + rightharpoonup: '\u21C0', + rightleftarrows: '\u21C4', + rightleftharpoons: '\u21CC', + rightrightarrows: '\u21C9', + rightsquigarrow: '\u219D', + RightTee: '\u22A2', + RightTeeArrow: '\u21A6', + RightTeeVector: '\u295B', + rightthreetimes: '\u22CC', + RightTriangle: '\u22B3', + RightTriangleBar: '\u29D0', + RightTriangleEqual: '\u22B5', + RightUpDownVector: '\u294F', + RightUpTeeVector: '\u295C', + RightUpVector: '\u21BE', + RightUpVectorBar: '\u2954', + RightVector: '\u21C0', + RightVectorBar: '\u2953', + ring: '\u02DA', + risingdotseq: '\u2253', + rlarr: '\u21C4', + rlhar: '\u21CC', + rlm: '\u200F', + rmoust: '\u23B1', + rmoustache: '\u23B1', + rnmid: '\u2AEE', + roang: '\u27ED', + roarr: '\u21FE', + robrk: '\u27E7', + ropar: '\u2986', + Ropf: '\u211D', + ropf: '\uD835\uDD63', + roplus: '\u2A2E', + rotimes: '\u2A35', + RoundImplies: '\u2970', + rpar: '\u0029', + rpargt: '\u2994', + rppolint: '\u2A12', + rrarr: '\u21C9', + Rrightarrow: '\u21DB', + rsaquo: '\u203A', + Rscr: '\u211B', + rscr: '\uD835\uDCC7', + Rsh: '\u21B1', + rsh: '\u21B1', + rsqb: '\u005D', + rsquo: '\u2019', + rsquor: '\u2019', + rthree: '\u22CC', + rtimes: '\u22CA', + rtri: '\u25B9', + rtrie: '\u22B5', + rtrif: '\u25B8', + rtriltri: '\u29CE', + RuleDelayed: '\u29F4', + ruluhar: '\u2968', + rx: '\u211E', + Sacute: '\u015A', + sacute: '\u015B', + sbquo: '\u201A', + Sc: '\u2ABC', + sc: '\u227B', + scap: '\u2AB8', + Scaron: '\u0160', + scaron: '\u0161', + sccue: '\u227D', + scE: '\u2AB4', + sce: '\u2AB0', + Scedil: '\u015E', + scedil: '\u015F', + Scirc: '\u015C', + scirc: '\u015D', + scnap: '\u2ABA', + scnE: '\u2AB6', + scnsim: '\u22E9', + scpolint: '\u2A13', + scsim: '\u227F', + Scy: '\u0421', + scy: '\u0441', + sdot: '\u22C5', + sdotb: '\u22A1', + sdote: '\u2A66', + searhk: '\u2925', + seArr: '\u21D8', + searr: '\u2198', + searrow: '\u2198', + sect: '\u00A7', + semi: '\u003B', + seswar: '\u2929', + setminus: '\u2216', + setmn: '\u2216', + sext: '\u2736', + Sfr: '\uD835\uDD16', + sfr: '\uD835\uDD30', + sfrown: '\u2322', + sharp: '\u266F', + SHCHcy: '\u0429', + shchcy: '\u0449', + SHcy: '\u0428', + shcy: '\u0448', + ShortDownArrow: '\u2193', + ShortLeftArrow: '\u2190', + shortmid: '\u2223', + shortparallel: '\u2225', + ShortRightArrow: '\u2192', + ShortUpArrow: '\u2191', + shy: '\u00AD', + Sigma: '\u03A3', + sigma: '\u03C3', + sigmaf: '\u03C2', + sigmav: '\u03C2', + sim: '\u223C', + simdot: '\u2A6A', + sime: '\u2243', + simeq: '\u2243', + simg: '\u2A9E', + simgE: '\u2AA0', + siml: '\u2A9D', + simlE: '\u2A9F', + simne: '\u2246', + simplus: '\u2A24', + simrarr: '\u2972', + slarr: '\u2190', + SmallCircle: '\u2218', + smallsetminus: '\u2216', + smashp: '\u2A33', + smeparsl: '\u29E4', + smid: '\u2223', + smile: '\u2323', + smt: '\u2AAA', + smte: '\u2AAC', + smtes: '\u2AAC\uFE00', + SOFTcy: '\u042C', + softcy: '\u044C', + sol: '\u002F', + solb: '\u29C4', + solbar: '\u233F', + Sopf: '\uD835\uDD4A', + sopf: '\uD835\uDD64', + spades: '\u2660', + spadesuit: '\u2660', + spar: '\u2225', + sqcap: '\u2293', + sqcaps: '\u2293\uFE00', + sqcup: '\u2294', + sqcups: '\u2294\uFE00', + Sqrt: '\u221A', + sqsub: '\u228F', + sqsube: '\u2291', + sqsubset: '\u228F', + sqsubseteq: '\u2291', + sqsup: '\u2290', + sqsupe: '\u2292', + sqsupset: '\u2290', + sqsupseteq: '\u2292', + squ: '\u25A1', + Square: '\u25A1', + square: '\u25A1', + SquareIntersection: '\u2293', + SquareSubset: '\u228F', + SquareSubsetEqual: '\u2291', + SquareSuperset: '\u2290', + SquareSupersetEqual: '\u2292', + SquareUnion: '\u2294', + squarf: '\u25AA', + squf: '\u25AA', + srarr: '\u2192', + Sscr: '\uD835\uDCAE', + sscr: '\uD835\uDCC8', + ssetmn: '\u2216', + ssmile: '\u2323', + sstarf: '\u22C6', + Star: '\u22C6', + star: '\u2606', + starf: '\u2605', + straightepsilon: '\u03F5', + straightphi: '\u03D5', + strns: '\u00AF', + Sub: '\u22D0', + sub: '\u2282', + subdot: '\u2ABD', + subE: '\u2AC5', + sube: '\u2286', + subedot: '\u2AC3', + submult: '\u2AC1', + subnE: '\u2ACB', + subne: '\u228A', + subplus: '\u2ABF', + subrarr: '\u2979', + Subset: '\u22D0', + subset: '\u2282', + subseteq: '\u2286', + subseteqq: '\u2AC5', + SubsetEqual: '\u2286', + subsetneq: '\u228A', + subsetneqq: '\u2ACB', + subsim: '\u2AC7', + subsub: '\u2AD5', + subsup: '\u2AD3', + succ: '\u227B', + succapprox: '\u2AB8', + succcurlyeq: '\u227D', + Succeeds: '\u227B', + SucceedsEqual: '\u2AB0', + SucceedsSlantEqual: '\u227D', + SucceedsTilde: '\u227F', + succeq: '\u2AB0', + succnapprox: '\u2ABA', + succneqq: '\u2AB6', + succnsim: '\u22E9', + succsim: '\u227F', + SuchThat: '\u220B', + Sum: '\u2211', + sum: '\u2211', + sung: '\u266A', + Sup: '\u22D1', + sup: '\u2283', + sup1: '\u00B9', + sup2: '\u00B2', + sup3: '\u00B3', + supdot: '\u2ABE', + supdsub: '\u2AD8', + supE: '\u2AC6', + supe: '\u2287', + supedot: '\u2AC4', + Superset: '\u2283', + SupersetEqual: '\u2287', + suphsol: '\u27C9', + suphsub: '\u2AD7', + suplarr: '\u297B', + supmult: '\u2AC2', + supnE: '\u2ACC', + supne: '\u228B', + supplus: '\u2AC0', + Supset: '\u22D1', + supset: '\u2283', + supseteq: '\u2287', + supseteqq: '\u2AC6', + supsetneq: '\u228B', + supsetneqq: '\u2ACC', + supsim: '\u2AC8', + supsub: '\u2AD4', + supsup: '\u2AD6', + swarhk: '\u2926', + swArr: '\u21D9', + swarr: '\u2199', + swarrow: '\u2199', + swnwar: '\u292A', + szlig: '\u00DF', + Tab: '\u0009', + target: '\u2316', + Tau: '\u03A4', + tau: '\u03C4', + tbrk: '\u23B4', + Tcaron: '\u0164', + tcaron: '\u0165', + Tcedil: '\u0162', + tcedil: '\u0163', + Tcy: '\u0422', + tcy: '\u0442', + tdot: '\u20DB', + telrec: '\u2315', + Tfr: '\uD835\uDD17', + tfr: '\uD835\uDD31', + there4: '\u2234', + Therefore: '\u2234', + therefore: '\u2234', + Theta: '\u0398', + theta: '\u03B8', + thetasym: '\u03D1', + thetav: '\u03D1', + thickapprox: '\u2248', + thicksim: '\u223C', + ThickSpace: '\u205F\u200A', + thinsp: '\u2009', + ThinSpace: '\u2009', + thkap: '\u2248', + thksim: '\u223C', + THORN: '\u00DE', + thorn: '\u00FE', + Tilde: '\u223C', + tilde: '\u02DC', + TildeEqual: '\u2243', + TildeFullEqual: '\u2245', + TildeTilde: '\u2248', + times: '\u00D7', + timesb: '\u22A0', + timesbar: '\u2A31', + timesd: '\u2A30', + tint: '\u222D', + toea: '\u2928', + top: '\u22A4', + topbot: '\u2336', + topcir: '\u2AF1', + Topf: '\uD835\uDD4B', + topf: '\uD835\uDD65', + topfork: '\u2ADA', + tosa: '\u2929', + tprime: '\u2034', + TRADE: '\u2122', + trade: '\u2122', + triangle: '\u25B5', + triangledown: '\u25BF', + triangleleft: '\u25C3', + trianglelefteq: '\u22B4', + triangleq: '\u225C', + triangleright: '\u25B9', + trianglerighteq: '\u22B5', + tridot: '\u25EC', + trie: '\u225C', + triminus: '\u2A3A', + TripleDot: '\u20DB', + triplus: '\u2A39', + trisb: '\u29CD', + tritime: '\u2A3B', + trpezium: '\u23E2', + Tscr: '\uD835\uDCAF', + tscr: '\uD835\uDCC9', + TScy: '\u0426', + tscy: '\u0446', + TSHcy: '\u040B', + tshcy: '\u045B', + Tstrok: '\u0166', + tstrok: '\u0167', + twixt: '\u226C', + twoheadleftarrow: '\u219E', + twoheadrightarrow: '\u21A0', + Uacute: '\u00DA', + uacute: '\u00FA', + Uarr: '\u219F', + uArr: '\u21D1', + uarr: '\u2191', + Uarrocir: '\u2949', + Ubrcy: '\u040E', + ubrcy: '\u045E', + Ubreve: '\u016C', + ubreve: '\u016D', + Ucirc: '\u00DB', + ucirc: '\u00FB', + Ucy: '\u0423', + ucy: '\u0443', + udarr: '\u21C5', + Udblac: '\u0170', + udblac: '\u0171', + udhar: '\u296E', + ufisht: '\u297E', + Ufr: '\uD835\uDD18', + ufr: '\uD835\uDD32', + Ugrave: '\u00D9', + ugrave: '\u00F9', + uHar: '\u2963', + uharl: '\u21BF', + uharr: '\u21BE', + uhblk: '\u2580', + ulcorn: '\u231C', + ulcorner: '\u231C', + ulcrop: '\u230F', + ultri: '\u25F8', + Umacr: '\u016A', + umacr: '\u016B', + uml: '\u00A8', + UnderBar: '\u005F', + UnderBrace: '\u23DF', + UnderBracket: '\u23B5', + UnderParenthesis: '\u23DD', + Union: '\u22C3', + UnionPlus: '\u228E', + Uogon: '\u0172', + uogon: '\u0173', + Uopf: '\uD835\uDD4C', + uopf: '\uD835\uDD66', + UpArrow: '\u2191', + Uparrow: '\u21D1', + uparrow: '\u2191', + UpArrowBar: '\u2912', + UpArrowDownArrow: '\u21C5', + UpDownArrow: '\u2195', + Updownarrow: '\u21D5', + updownarrow: '\u2195', + UpEquilibrium: '\u296E', + upharpoonleft: '\u21BF', + upharpoonright: '\u21BE', + uplus: '\u228E', + UpperLeftArrow: '\u2196', + UpperRightArrow: '\u2197', + Upsi: '\u03D2', + upsi: '\u03C5', + upsih: '\u03D2', + Upsilon: '\u03A5', + upsilon: '\u03C5', + UpTee: '\u22A5', + UpTeeArrow: '\u21A5', + upuparrows: '\u21C8', + urcorn: '\u231D', + urcorner: '\u231D', + urcrop: '\u230E', + Uring: '\u016E', + uring: '\u016F', + urtri: '\u25F9', + Uscr: '\uD835\uDCB0', + uscr: '\uD835\uDCCA', + utdot: '\u22F0', + Utilde: '\u0168', + utilde: '\u0169', + utri: '\u25B5', + utrif: '\u25B4', + uuarr: '\u21C8', + Uuml: '\u00DC', + uuml: '\u00FC', + uwangle: '\u29A7', + vangrt: '\u299C', + varepsilon: '\u03F5', + varkappa: '\u03F0', + varnothing: '\u2205', + varphi: '\u03D5', + varpi: '\u03D6', + varpropto: '\u221D', + vArr: '\u21D5', + varr: '\u2195', + varrho: '\u03F1', + varsigma: '\u03C2', + varsubsetneq: '\u228A\uFE00', + varsubsetneqq: '\u2ACB\uFE00', + varsupsetneq: '\u228B\uFE00', + varsupsetneqq: '\u2ACC\uFE00', + vartheta: '\u03D1', + vartriangleleft: '\u22B2', + vartriangleright: '\u22B3', + Vbar: '\u2AEB', + vBar: '\u2AE8', + vBarv: '\u2AE9', + Vcy: '\u0412', + vcy: '\u0432', + VDash: '\u22AB', + Vdash: '\u22A9', + vDash: '\u22A8', + vdash: '\u22A2', + Vdashl: '\u2AE6', + Vee: '\u22C1', + vee: '\u2228', + veebar: '\u22BB', + veeeq: '\u225A', + vellip: '\u22EE', + Verbar: '\u2016', + verbar: '\u007C', + Vert: '\u2016', + vert: '\u007C', + VerticalBar: '\u2223', + VerticalLine: '\u007C', + VerticalSeparator: '\u2758', + VerticalTilde: '\u2240', + VeryThinSpace: '\u200A', + Vfr: '\uD835\uDD19', + vfr: '\uD835\uDD33', + vltri: '\u22B2', + vnsub: '\u2282\u20D2', + vnsup: '\u2283\u20D2', + Vopf: '\uD835\uDD4D', + vopf: '\uD835\uDD67', + vprop: '\u221D', + vrtri: '\u22B3', + Vscr: '\uD835\uDCB1', + vscr: '\uD835\uDCCB', + vsubnE: '\u2ACB\uFE00', + vsubne: '\u228A\uFE00', + vsupnE: '\u2ACC\uFE00', + vsupne: '\u228B\uFE00', + Vvdash: '\u22AA', + vzigzag: '\u299A', + Wcirc: '\u0174', + wcirc: '\u0175', + wedbar: '\u2A5F', + Wedge: '\u22C0', + wedge: '\u2227', + wedgeq: '\u2259', + weierp: '\u2118', + Wfr: '\uD835\uDD1A', + wfr: '\uD835\uDD34', + Wopf: '\uD835\uDD4E', + wopf: '\uD835\uDD68', + wp: '\u2118', + wr: '\u2240', + wreath: '\u2240', + Wscr: '\uD835\uDCB2', + wscr: '\uD835\uDCCC', + xcap: '\u22C2', + xcirc: '\u25EF', + xcup: '\u22C3', + xdtri: '\u25BD', + Xfr: '\uD835\uDD1B', + xfr: '\uD835\uDD35', + xhArr: '\u27FA', + xharr: '\u27F7', + Xi: '\u039E', + xi: '\u03BE', + xlArr: '\u27F8', + xlarr: '\u27F5', + xmap: '\u27FC', + xnis: '\u22FB', + xodot: '\u2A00', + Xopf: '\uD835\uDD4F', + xopf: '\uD835\uDD69', + xoplus: '\u2A01', + xotime: '\u2A02', + xrArr: '\u27F9', + xrarr: '\u27F6', + Xscr: '\uD835\uDCB3', + xscr: '\uD835\uDCCD', + xsqcup: '\u2A06', + xuplus: '\u2A04', + xutri: '\u25B3', + xvee: '\u22C1', + xwedge: '\u22C0', + Yacute: '\u00DD', + yacute: '\u00FD', + YAcy: '\u042F', + yacy: '\u044F', + Ycirc: '\u0176', + ycirc: '\u0177', + Ycy: '\u042B', + ycy: '\u044B', + yen: '\u00A5', + Yfr: '\uD835\uDD1C', + yfr: '\uD835\uDD36', + YIcy: '\u0407', + yicy: '\u0457', + Yopf: '\uD835\uDD50', + yopf: '\uD835\uDD6A', + Yscr: '\uD835\uDCB4', + yscr: '\uD835\uDCCE', + YUcy: '\u042E', + yucy: '\u044E', + Yuml: '\u0178', + yuml: '\u00FF', + Zacute: '\u0179', + zacute: '\u017A', + Zcaron: '\u017D', + zcaron: '\u017E', + Zcy: '\u0417', + zcy: '\u0437', + Zdot: '\u017B', + zdot: '\u017C', + zeetrf: '\u2128', + ZeroWidthSpace: '\u200B', + Zeta: '\u0396', + zeta: '\u03B6', + Zfr: '\u2128', + zfr: '\uD835\uDD37', + ZHcy: '\u0416', + zhcy: '\u0436', + zigrarr: '\u21DD', + Zopf: '\u2124', + zopf: '\uD835\uDD6B', + Zscr: '\uD835\uDCB5', + zscr: '\uD835\uDCCF', + zwj: '\u200D', + zwnj: '\u200C', +}); + +/** + * @deprecated + * Use `HTML_ENTITIES` instead. + * @see {@link HTML_ENTITIES} + */ +exports.entityMap = exports.HTML_ENTITIES; + +},{"./conventions":4}],8:[function(require,module,exports){ +'use strict'; + +var conventions = require('./conventions'); + +function extendError(constructor, writableName) { + constructor.prototype = Object.create(Error.prototype, { + constructor: { value: constructor }, + name: { value: constructor.name, enumerable: true, writable: writableName }, + }); +} + +var DOMExceptionName = conventions.freeze({ + /** + * the default value as defined by the spec + */ + Error: 'Error', + /** + * @deprecated + * Use RangeError instead. + */ + IndexSizeError: 'IndexSizeError', + /** + * @deprecated + * Just to match the related static code, not part of the spec. + */ + DomstringSizeError: 'DomstringSizeError', + HierarchyRequestError: 'HierarchyRequestError', + WrongDocumentError: 'WrongDocumentError', + InvalidCharacterError: 'InvalidCharacterError', + /** + * @deprecated + * Just to match the related static code, not part of the spec. + */ + NoDataAllowedError: 'NoDataAllowedError', + NoModificationAllowedError: 'NoModificationAllowedError', + NotFoundError: 'NotFoundError', + NotSupportedError: 'NotSupportedError', + InUseAttributeError: 'InUseAttributeError', + InvalidStateError: 'InvalidStateError', + SyntaxError: 'SyntaxError', + InvalidModificationError: 'InvalidModificationError', + NamespaceError: 'NamespaceError', + /** + * @deprecated + * Use TypeError for invalid arguments, + * "NotSupportedError" DOMException for unsupported operations, + * and "NotAllowedError" DOMException for denied requests instead. + */ + InvalidAccessError: 'InvalidAccessError', + /** + * @deprecated + * Just to match the related static code, not part of the spec. + */ + ValidationError: 'ValidationError', + /** + * @deprecated + * Use TypeError instead. + */ + TypeMismatchError: 'TypeMismatchError', + SecurityError: 'SecurityError', + NetworkError: 'NetworkError', + AbortError: 'AbortError', + /** + * @deprecated + * Just to match the related static code, not part of the spec. + */ + URLMismatchError: 'URLMismatchError', + QuotaExceededError: 'QuotaExceededError', + TimeoutError: 'TimeoutError', + InvalidNodeTypeError: 'InvalidNodeTypeError', + DataCloneError: 'DataCloneError', + EncodingError: 'EncodingError', + NotReadableError: 'NotReadableError', + UnknownError: 'UnknownError', + ConstraintError: 'ConstraintError', + DataError: 'DataError', + TransactionInactiveError: 'TransactionInactiveError', + ReadOnlyError: 'ReadOnlyError', + VersionError: 'VersionError', + OperationError: 'OperationError', + NotAllowedError: 'NotAllowedError', + OptOutError: 'OptOutError', +}); +var DOMExceptionNames = Object.keys(DOMExceptionName); + +function isValidDomExceptionCode(value) { + return typeof value === 'number' && value >= 1 && value <= 25; +} +function endsWithError(value) { + return typeof value === 'string' && value.substring(value.length - DOMExceptionName.Error.length) === DOMExceptionName.Error; +} +/** + * DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation + * is impossible to perform (either for logical reasons, because data is lost, or because the + * implementation has become unstable). In general, DOM methods return specific error values in + * ordinary processing situations, such as out-of-bound errors when using NodeList. + * + * Implementations should raise other exceptions under other circumstances. For example, + * implementations should raise an implementation-dependent exception if a null argument is + * passed when null was not expected. + * + * This implementation supports the following usages: + * 1. according to the living standard (both arguments are optional): + * ``` + * new DOMException("message (can be empty)", DOMExceptionNames.HierarchyRequestError) + * ``` + * 2. according to previous xmldom implementation (only the first argument is required): + * ``` + * new DOMException(DOMException.HIERARCHY_REQUEST_ERR, "optional message") + * ``` + * both result in the proper name being set. + * + * @class DOMException + * @param {number | string} messageOrCode + * The reason why an operation is not acceptable. + * If it is a number, it is used to determine the `name`, see + * {@link https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-258A00AF ExceptionCode} + * @param {string | keyof typeof DOMExceptionName | Error} [nameOrMessage] + * The `name` to use for the error. + * If `messageOrCode` is a number, this arguments is used as the `message` instead. + * @augments Error + * @see https://webidl.spec.whatwg.org/#idl-DOMException + * @see https://webidl.spec.whatwg.org/#dfn-error-names-table + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-17189187 + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html + * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html + */ +function DOMException(messageOrCode, nameOrMessage) { + // support old way of passing arguments: first argument is a valid number + if (isValidDomExceptionCode(messageOrCode)) { + this.name = DOMExceptionNames[messageOrCode]; + this.message = nameOrMessage || ''; + } else { + this.message = messageOrCode; + this.name = endsWithError(nameOrMessage) ? nameOrMessage : DOMExceptionName.Error; + } + if (Error.captureStackTrace) Error.captureStackTrace(this, DOMException); +} +extendError(DOMException, true); +Object.defineProperties(DOMException.prototype, { + code: { + enumerable: true, + get: function () { + var code = DOMExceptionNames.indexOf(this.name); + if (isValidDomExceptionCode(code)) return code; + return 0; + }, + }, +}); + +var ExceptionCode = { + INDEX_SIZE_ERR: 1, + DOMSTRING_SIZE_ERR: 2, + HIERARCHY_REQUEST_ERR: 3, + WRONG_DOCUMENT_ERR: 4, + INVALID_CHARACTER_ERR: 5, + NO_DATA_ALLOWED_ERR: 6, + NO_MODIFICATION_ALLOWED_ERR: 7, + NOT_FOUND_ERR: 8, + NOT_SUPPORTED_ERR: 9, + INUSE_ATTRIBUTE_ERR: 10, + INVALID_STATE_ERR: 11, + SYNTAX_ERR: 12, + INVALID_MODIFICATION_ERR: 13, + NAMESPACE_ERR: 14, + INVALID_ACCESS_ERR: 15, + VALIDATION_ERR: 16, + TYPE_MISMATCH_ERR: 17, + SECURITY_ERR: 18, + NETWORK_ERR: 19, + ABORT_ERR: 20, + URL_MISMATCH_ERR: 21, + QUOTA_EXCEEDED_ERR: 22, + TIMEOUT_ERR: 23, + INVALID_NODE_TYPE_ERR: 24, + DATA_CLONE_ERR: 25, +}; + +var entries = Object.entries(ExceptionCode); +for (var i = 0; i < entries.length; i++) { + var key = entries[i][0]; + DOMException[key] = entries[i][1]; +} + +/** + * Creates an error that will not be caught by XMLReader aka the SAX parser. + * + * @class + * @param {string} message + * @param {any} [locator] + */ +function ParseError(message, locator) { + this.message = message; + this.locator = locator; + if (Error.captureStackTrace) Error.captureStackTrace(this, ParseError); +} +extendError(ParseError); + +exports.DOMException = DOMException; +exports.DOMExceptionName = DOMExceptionName; +exports.ExceptionCode = ExceptionCode; +exports.ParseError = ParseError; + +},{"./conventions":4}],9:[function(require,module,exports){ +'use strict'; + +/** + * Detects relevant unicode support for regular expressions in the runtime. + * Should the runtime not accepts the flag `u` or unicode ranges, + * character classes without unicode handling will be used. + * + * @param {typeof RegExp} [RegExpImpl=RegExp] + * For testing: the RegExp class. + * @returns {boolean} + * @see https://node.green/#ES2015-syntax-RegExp--y--and--u--flags + */ +function detectUnicodeSupport(RegExpImpl) { + try { + if (typeof RegExpImpl !== 'function') { + RegExpImpl = RegExp; + } + // eslint-disable-next-line es5/no-unicode-regex,es5/no-unicode-code-point-escape + var match = new RegExpImpl('\u{1d306}', 'u').exec('𝌆'); + return !!match && match[0].length === 2; + } catch (error) {} + return false; +} +var UNICODE_SUPPORT = detectUnicodeSupport(); + +/** + * Removes `[`, `]` and any trailing quantifiers from the source of a RegExp. + * + * @param {RegExp} regexp + */ +function chars(regexp) { + if (regexp.source[0] !== '[') { + throw new Error(regexp + ' can not be used with chars'); + } + return regexp.source.slice(1, regexp.source.lastIndexOf(']')); +} + +/** + * Creates a new character list regular expression, + * by removing `search` from the source of `regexp`. + * + * @param {RegExp} regexp + * @param {string} search + * The character(s) to remove. + * @returns {RegExp} + */ +function chars_without(regexp, search) { + if (regexp.source[0] !== '[') { + throw new Error('/' + regexp.source + '/ can not be used with chars_without'); + } + if (!search || typeof search !== 'string') { + throw new Error(JSON.stringify(search) + ' is not a valid search'); + } + if (regexp.source.indexOf(search) === -1) { + throw new Error('"' + search + '" is not is /' + regexp.source + '/'); + } + if (search === '-' && regexp.source.indexOf(search) !== 1) { + throw new Error('"' + search + '" is not at the first postion of /' + regexp.source + '/'); + } + return new RegExp(regexp.source.replace(search, ''), UNICODE_SUPPORT ? 'u' : ''); +} + +/** + * Combines and Regular expressions correctly by using `RegExp.source`. + * + * @param {...(RegExp | string)[]} args + * @returns {RegExp} + */ +function reg(args) { + var self = this; + return new RegExp( + Array.prototype.slice + .call(arguments) + .map(function (part) { + var isStr = typeof part === 'string'; + if (isStr && self === undefined && part === '|') { + throw new Error('use regg instead of reg to wrap expressions with `|`!'); + } + return isStr ? part : part.source; + }) + .join(''), + UNICODE_SUPPORT ? 'mu' : 'm' + ); +} + +/** + * Like `reg` but wraps the expression in `(?:`,`)` to create a non tracking group. + * + * @param {...(RegExp | string)[]} args + * @returns {RegExp} + */ +function regg(args) { + if (arguments.length === 0) { + throw new Error('no parameters provided'); + } + return reg.apply(regg, ['(?:'].concat(Array.prototype.slice.call(arguments), [')'])); +} + +// /** +// * Append ^ to the beginning of the expression. +// * @param {...(RegExp | string)[]} args +// * @returns {RegExp} +// */ +// function reg_start(args) { +// if (arguments.length === 0) { +// throw new Error('no parameters provided'); +// } +// return reg.apply(reg_start, ['^'].concat(Array.prototype.slice.call(arguments))); +// } + +// https://www.w3.org/TR/xml/#document +// `[1] document ::= prolog element Misc*` +// https://www.w3.org/TR/xml11/#NT-document +// `[1] document ::= ( prolog element Misc* ) - ( Char* RestrictedChar Char* )` + +/** + * A character usually appearing in wrongly converted strings. + * + * @type {string} + * @see https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character + * @see https://nodejs.dev/en/api/v18/buffer/#buffers-and-character-encodings + * @see https://www.unicode.org/faq/utf_bom.html#BOM + * @readonly + */ +var UNICODE_REPLACEMENT_CHARACTER = '\uFFFD'; +// https://www.w3.org/TR/xml/#NT-Char +// any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. +// `[2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]` +// https://www.w3.org/TR/xml11/#NT-Char +// `[2] Char ::= [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]` +// https://www.w3.org/TR/xml11/#NT-RestrictedChar +// `[2a] RestrictedChar ::= [#x1-#x8] | [#xB-#xC] | [#xE-#x1F] | [#x7F-#x84] | [#x86-#x9F]` +// https://www.w3.org/TR/xml11/#charsets +var Char = /[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/; // without \u10000-\uEFFFF +if (UNICODE_SUPPORT) { + // eslint-disable-next-line es5/no-unicode-code-point-escape + Char = reg('[', chars(Char), '\\u{10000}-\\u{10FFFF}', ']'); +} +// Negation of Char: matches any character that is NOT a valid XML 1.0 Char. +// Derived directly from the Char character class above (after the unicode-support extension). +// XML 1.0 Char production [2]: #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] +// @see https://www.w3.org/TR/xml/#NT-Char +var InvalidChar = new RegExp('[^' + chars(Char) + ']', UNICODE_SUPPORT ? 'u' : ''); + +var _SChar = /[\x20\x09\x0D\x0A]/; +var SChar_s = chars(_SChar); +// https://www.w3.org/TR/xml11/#NT-S +// `[3] S ::= (#x20 | #x9 | #xD | #xA)+` +var S = reg(_SChar, '+'); +// optional whitespace described as `S?` in the grammar, +// simplified to 0-n occurrences of the character class +// instead of 0-1 occurrences of a non-capturing group around S +var S_OPT = reg(_SChar, '*'); + +// https://www.w3.org/TR/xml11/#NT-NameStartChar +// `[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]` +var NameStartChar = + /[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; // without \u10000-\uEFFFF +if (UNICODE_SUPPORT) { + // eslint-disable-next-line es5/no-unicode-code-point-escape + NameStartChar = reg('[', chars(NameStartChar), '\\u{10000}-\\u{10FFFF}', ']'); +} +var NameStartChar_s = chars(NameStartChar); + +// https://www.w3.org/TR/xml11/#NT-NameChar +// `[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]` +var NameChar = reg('[', NameStartChar_s, chars(/[-.0-9\xB7]/), chars(/[\u0300-\u036F\u203F-\u2040]/), ']'); +// https://www.w3.org/TR/xml11/#NT-Name +// `[5] Name ::= NameStartChar (NameChar)*` +var Name = reg(NameStartChar, NameChar, '*'); +/* +https://www.w3.org/TR/xml11/#NT-Names +`[6] Names ::= Name (#x20 Name)*` +*/ + +// https://www.w3.org/TR/xml11/#NT-Nmtoken +// `[7] Nmtoken ::= (NameChar)+` +var Nmtoken = reg(NameChar, '+'); +/* +https://www.w3.org/TR/xml11/#NT-Nmtokens +`[8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*` +var Nmtokens = reg(Nmtoken, regg(/\x20/, Nmtoken), '*'); +*/ + +// https://www.w3.org/TR/xml11/#NT-EntityRef +// `[68] EntityRef ::= '&' Name ';'` [WFC: Entity Declared] [VC: Entity Declared] [WFC: Parsed Entity] [WFC: No Recursion] +var EntityRef = reg('&', Name, ';'); +// https://www.w3.org/TR/xml11/#NT-CharRef +// `[66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'` [WFC: Legal Character] +var CharRef = regg(/&#[0-9]+;|&#x[0-9a-fA-F]+;/); + +/* +https://www.w3.org/TR/xml11/#NT-Reference +- `[67] Reference ::= EntityRef | CharRef` +- `[66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'` [WFC: Legal Character] +- `[68] EntityRef ::= '&' Name ';'` [WFC: Entity Declared] [VC: Entity Declared] [WFC: Parsed Entity] [WFC: No Recursion] +*/ +var Reference = regg(EntityRef, '|', CharRef); + +// https://www.w3.org/TR/xml11/#NT-PEReference +// `[69] PEReference ::= '%' Name ';'` +// [VC: Entity Declared] [WFC: No Recursion] [WFC: In DTD] +var PEReference = reg('%', Name, ';'); + +// https://www.w3.org/TR/xml11/#NT-EntityValue +// `[9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' | "'" ([^%&'] | PEReference | Reference)* "'"` +var EntityValue = regg( + reg('"', regg(/[^%&"]/, '|', PEReference, '|', Reference), '*', '"'), + '|', + reg("'", regg(/[^%&']/, '|', PEReference, '|', Reference), '*', "'") +); + +// https://www.w3.org/TR/xml11/#NT-AttValue +// `[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"` +var AttValue = regg('"', regg(/[^<&"]/, '|', Reference), '*', '"', '|', "'", regg(/[^<&']/, '|', Reference), '*', "'"); + +// https://www.w3.org/TR/xml-names/#ns-decl +// https://www.w3.org/TR/xml-names/#ns-qualnames +// NameStartChar without ":" +var NCNameStartChar = chars_without(NameStartChar, ':'); +// https://www.w3.org/TR/xml-names/#orphans +// `[5] NCNameChar ::= NameChar - ':'` +// An XML NameChar, minus the ":" +var NCNameChar = chars_without(NameChar, ':'); +// https://www.w3.org/TR/xml-names/#NT-NCName +// `[4] NCName ::= Name - (Char* ':' Char*)` +// An XML Name, minus the ":" +var NCName = reg(NCNameStartChar, NCNameChar, '*'); + +/** +https://www.w3.org/TR/xml-names/#ns-qualnames + +``` +[7] QName ::= PrefixedName | UnprefixedName + === (NCName ':' NCName) | NCName + === NCName (':' NCName)? +[8] PrefixedName ::= Prefix ':' LocalPart + === NCName ':' NCName +[9] UnprefixedName ::= LocalPart + === NCName +[10] Prefix ::= NCName +[11] LocalPart ::= NCName +``` +*/ +var QName = reg(NCName, regg(':', NCName), '?'); +var QName_exact = reg('^', QName, '$'); +var QName_group = reg('(', QName, ')'); + +// https://www.w3.org/TR/xml11/#NT-SystemLiteral +// `[11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")` +var SystemLiteral = regg(/"[^"]*"|'[^']*'/); + +/* + https://www.w3.org/TR/xml11/#NT-PI + ``` + [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) + [16] PI ::= '' Char*)))? '?>' + ``` + target /xml/i is not excluded! +*/ +var PI = reg(/^<\?/, '(', Name, ')', regg(S, '(', Char, '*?)'), '?', /\?>/); + +// https://www.w3.org/TR/xml11/#NT-PubidChar +// `[13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]` +var PubidChar = /[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/; + +// https://www.w3.org/TR/xml11/#NT-PubidLiteral +// `[12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"` +var PubidLiteral = regg('"', PubidChar, '*"', '|', "'", chars_without(PubidChar, "'"), "*'"); + +// https://www.w3.org/TR/xml11/#NT-CharData +// `[14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)` + +var COMMENT_START = ''; +// https://www.w3.org/TR/xml11/#NT-Comment +// `[15] Comment ::= ''` +var Comment = reg(COMMENT_START, regg(chars_without(Char, '-'), '|', reg('-', chars_without(Char, '-'))), '*', COMMENT_END); + +var PCDATA = '#PCDATA'; +// https://www.w3.org/TR/xml11/#NT-Mixed +// `[51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' | '(' S? '#PCDATA' S? ')'` +// https://www.w3.org/TR/xml-names/#NT-Mixed +// `[51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? QName)* S? ')*' | '(' S? '#PCDATA' S? ')'` +// [VC: Proper Group/PE Nesting] [VC: No Duplicate Types] +var Mixed = regg( + reg(/\(/, S_OPT, PCDATA, regg(S_OPT, /\|/, S_OPT, QName), '*', S_OPT, /\)\*/), + '|', + reg(/\(/, S_OPT, PCDATA, S_OPT, /\)/) +); + +var _children_quantity = /[?*+]?/; +/* + `[49] choice ::= '(' S? cp ( S? '|' S? cp )+ S? ')'` [VC: Proper Group/PE Nesting] + `[50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'` [VC: Proper Group/PE Nesting] + simplification to solve circular referencing, but doesn't check validity constraint "Proper Group/PE Nesting" + var _choice_or_seq = reg('[', NameChar_s, SChar_s, chars(_children_quantity), '()|,]*'); + ``` + [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')? + === (Name | '(' S? cp ( S? '|' S? cp )+ S? ')' | '(' S? cp ( S? ',' S? cp )* S? ')') ('?' | '*' | '+')? + !== (Name | [_choice_or_seq]*) ('?' | '*' | '+')? + ``` + simplification to solve circular referencing, but doesn't check validity constraint "Proper Group/PE Nesting" + var cp = reg(regg(Name, '|', _choice_or_seq), _children_quantity); +*/ +/* +Inefficient regular expression (High) +This part of the regular expression may cause exponential backtracking on strings starting with '(|' and containing many repetitions of '|'. +https://github.com/xmldom/xmldom/security/code-scanning/91 +var choice = regg(/\(/, S_OPT, cp, regg(S_OPT, /\|/, S_OPT, cp), '+', S_OPT, /\)/); +*/ +/* +Inefficient regular expression (High) +This part of the regular expression may cause exponential backtracking on strings starting with '(,' and containing many repetitions of ','. +https://github.com/xmldom/xmldom/security/code-scanning/92 +var seq = regg(/\(/, S_OPT, cp, regg(S_OPT, /,/, S_OPT, cp), '*', S_OPT, /\)/); +*/ + +// `[47] children ::= (choice | seq) ('?' | '*' | '+')?` +// simplification to solve circular referencing, but doesn't check validity constraint "Proper Group/PE Nesting" +var children = reg(/\([^>]+\)/, _children_quantity /*regg(choice, '|', seq), _children_quantity*/); + +// https://www.w3.org/TR/xml11/#NT-contentspec +// `[46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children` +var contentspec = regg('EMPTY', '|', 'ANY', '|', Mixed, '|', children); + +var ELEMENTDECL_START = ''` +// https://www.w3.org/TR/xml-names/#NT-elementdecl +// `[17] elementdecl ::= ''` +// because of https://www.w3.org/TR/xml11/#NT-PEReference +// since xmldom is not supporting replacements of PEReferences in the DTD +// this also supports PEReference in the possible places +var elementdecl = reg(ELEMENTDECL_START, S, regg(QName, '|', PEReference), S, regg(contentspec, '|', PEReference), S_OPT, '>'); + +// https://www.w3.org/TR/xml11/#NT-NotationType +// `[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'` +// [VC: Notation Attributes] [VC: One Notation Per Element Type] [VC: No Notation on Empty Element] [VC: No Duplicate Tokens] +var NotationType = reg('NOTATION', S, /\(/, S_OPT, Name, regg(S_OPT, /\|/, S_OPT, Name), '*', S_OPT, /\)/); +// https://www.w3.org/TR/xml11/#NT-Enumeration +// `[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')'` +// [VC: Enumeration] [VC: No Duplicate Tokens] +var Enumeration = reg(/\(/, S_OPT, Nmtoken, regg(S_OPT, /\|/, S_OPT, Nmtoken), '*', S_OPT, /\)/); + +// https://www.w3.org/TR/xml11/#NT-EnumeratedType +// `[57] EnumeratedType ::= NotationType | Enumeration` +var EnumeratedType = regg(NotationType, '|', Enumeration); + +/* +``` +[55] StringType ::= 'CDATA' +[56] TokenizedType ::= 'ID' [VC: ID] [VC: One ID per Element Type] [VC: ID Attribute Default] + | 'IDREF' [VC: IDREF] + | 'IDREFS' [VC: IDREF] + | 'ENTITY' [VC: Entity Name] + | 'ENTITIES' [VC: Entity Name] + | 'NMTOKEN' [VC: Name Token] + | 'NMTOKENS' [VC: Name Token] + [54] AttType ::= StringType | TokenizedType | EnumeratedType +```*/ +var AttType = regg(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/, '|', EnumeratedType); + +// `[60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)` +// [WFC: No < in Attribute Values] [WFC: No External Entity References] +// [VC: Fixed Attribute Default] [VC: Required Attribute] [VC: Attribute Default Value Syntactically Correct] +var DefaultDecl = regg(/#REQUIRED|#IMPLIED/, '|', regg(regg('#FIXED', S), '?', AttValue)); + +// https://www.w3.org/TR/xml11/#NT-AttDef +// [53] AttDef ::= S Name S AttType S DefaultDecl +// https://www.w3.org/TR/xml-names/#NT-AttDef +// [1] NSAttName ::= PrefixedAttName | DefaultAttName +// [2] PrefixedAttName ::= 'xmlns:' NCName [NSC: Reserved Prefixes and Namespace Names] +// [3] DefaultAttName ::= 'xmlns' +// [21] AttDef ::= S (QName | NSAttName) S AttType S DefaultDecl +// === S Name S AttType S DefaultDecl +// xmldom is not distinguishing between QName and NSAttName on this level +// to support XML without namespaces in DTD we can not restrict it to QName +var AttDef = regg(S, Name, S, AttType, S, DefaultDecl); + +var ATTLIST_DECL_START = ''` +// https://www.w3.org/TR/xml-names/#NT-AttlistDecl +// `[20] AttlistDecl ::= ''` +// to support XML without namespaces in DTD we can not restrict it to QName +var AttlistDecl = reg(ATTLIST_DECL_START, S, Name, AttDef, '*', S_OPT, '>'); + +// https://html.spec.whatwg.org/multipage/urls-and-fetching.html#about:legacy-compat +var ABOUT_LEGACY_COMPAT = 'about:legacy-compat'; +var ABOUT_LEGACY_COMPAT_SystemLiteral = regg('"' + ABOUT_LEGACY_COMPAT + '"', '|', "'" + ABOUT_LEGACY_COMPAT + "'"); +var SYSTEM = 'SYSTEM'; +var PUBLIC = 'PUBLIC'; +// https://www.w3.org/TR/xml11/#NT-ExternalID +// `[75] ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral` +var ExternalID = regg(regg(SYSTEM, S, SystemLiteral), '|', regg(PUBLIC, S, PubidLiteral, S, SystemLiteral)); +var ExternalID_match = reg( + '^', + regg( + regg(SYSTEM, S, '(?', SystemLiteral, ')'), + '|', + regg(PUBLIC, S, '(?', PubidLiteral, ')', S, '(?', SystemLiteral, ')') + ) +); +// Full-string anchored matcher for requireWellFormed serializer checks +// https://w3c.github.io/DOM-Parsing/#xml-serializing-a-document-node +var PubidLiteral_match = reg('^', PubidLiteral, '$'); +// Full-string anchored matcher for requireWellFormed serializer checks +// https://w3c.github.io/DOM-Parsing/#xml-serializing-a-document-node +var SystemLiteral_match = reg('^', SystemLiteral, '$'); + +// https://www.w3.org/TR/xml11/#NT-NDataDecl +// `[76] NDataDecl ::= S 'NDATA' S Name` [VC: Notation Declared] +var NDataDecl = regg(S, 'NDATA', S, Name); + +// https://www.w3.org/TR/xml11/#NT-EntityDef +// `[73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)` +var EntityDef = regg(EntityValue, '|', regg(ExternalID, NDataDecl, '?')); + +var ENTITY_DECL_START = ''` +var GEDecl = reg(ENTITY_DECL_START, S, Name, S, EntityDef, S_OPT, '>'); +// https://www.w3.org/TR/xml11/#NT-PEDef +// `[74] PEDef ::= EntityValue | ExternalID` +var PEDef = regg(EntityValue, '|', ExternalID); +// https://www.w3.org/TR/xml11/#NT-PEDecl +// `[72] PEDecl ::= ''` +var PEDecl = reg(ENTITY_DECL_START, S, '%', S, Name, S, PEDef, S_OPT, '>'); +// https://www.w3.org/TR/xml11/#NT-EntityDecl +// `[70] EntityDecl ::= GEDecl | PEDecl` +var EntityDecl = regg(GEDecl, '|', PEDecl); + +// https://www.w3.org/TR/xml11/#NT-PublicID +// `[83] PublicID ::= 'PUBLIC' S PubidLiteral` +var PublicID = reg(PUBLIC, S, PubidLiteral); +// https://www.w3.org/TR/xml11/#NT-NotationDecl +// `[82] NotationDecl ::= ''` [VC: Unique Notation Name] +var NotationDecl = reg(''); + +// https://www.w3.org/TR/xml11/#NT-Eq +// `[25] Eq ::= S? '=' S?` +var Eq = reg(S_OPT, '=', S_OPT); +// https://www.w3.org/TR/xml/#NT-VersionNum +// `[26] VersionNum ::= '1.' [0-9]+` +// https://www.w3.org/TR/xml11/#NT-VersionNum +// `[26] VersionNum ::= '1.1'` +var VersionNum = /1[.]\d+/; +// https://www.w3.org/TR/xml11/#NT-VersionInfo +// `[24] VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"')` +var VersionInfo = reg(S, 'version', Eq, regg("'", VersionNum, "'", '|', '"', VersionNum, '"')); +// https://www.w3.org/TR/xml11/#NT-EncName +// `[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*` +var EncName = /[A-Za-z][-A-Za-z0-9._]*/; +// https://www.w3.org/TR/xml11/#NT-EncDecl +// `[80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" )` +var EncodingDecl = regg(S, 'encoding', Eq, regg('"', EncName, '"', '|', "'", EncName, "'")); +// https://www.w3.org/TR/xml11/#NT-SDDecl +// `[32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"'))` +var SDDecl = regg(S, 'standalone', Eq, regg("'", regg('yes', '|', 'no'), "'", '|', '"', regg('yes', '|', 'no'), '"')); +// https://www.w3.org/TR/xml11/#NT-XMLDecl +// [23] XMLDecl ::= '' +var XMLDecl = reg(/^<\?xml/, VersionInfo, EncodingDecl, '?', SDDecl, '?', S_OPT, /\?>/); + +/* + https://www.w3.org/TR/xml/#NT-markupdecl + https://www.w3.org/TR/xml11/#NT-markupdecl + `[29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment` + var markupdecl = regg(elementdecl, '|', AttlistDecl, '|', EntityDecl, '|', NotationDecl, '|', PI_unsafe, '|', Comment); +*/ +/* + https://www.w3.org/TR/xml-names/#NT-doctypedecl +`[28a] DeclSep ::= PEReference | S` + https://www.w3.org/TR/xml11/#NT-intSubset +``` + [28b] intSubset ::= (markupdecl | DeclSep)* + === (markupdecl | PEReference | S)* +``` + [WFC: PE Between Declarations] + var intSubset = reg(regg(markupdecl, '|', PEReference, '|', S), '*'); +*/ +var DOCTYPE_DECL_START = ''` + https://www.afterwardsw3.org/TR/xml-names/#NT-doctypedecl + `[16] doctypedecl ::= ''` + var doctypedecl = reg(''); +*/ + +var CDATA_START = ''; +var CDStart = //; +var CData = reg(Char, '*?', CDEnd); +/* + https://www.w3.org/TR/xml/#dt-cdsection + `[18] CDSect ::= CDStart CData CDEnd` + `[19] CDStart ::= '' Char*))` + `[21] CDEnd ::= ']]>'` +*/ +var CDSect = reg(CDStart, CData); + +// unit tested +exports.chars = chars; +exports.chars_without = chars_without; +exports.detectUnicodeSupport = detectUnicodeSupport; +exports.reg = reg; +exports.regg = regg; +exports.ABOUT_LEGACY_COMPAT = ABOUT_LEGACY_COMPAT; +exports.ABOUT_LEGACY_COMPAT_SystemLiteral = ABOUT_LEGACY_COMPAT_SystemLiteral; +exports.AttlistDecl = AttlistDecl; +exports.CDATA_START = CDATA_START; +exports.CDATA_END = CDATA_END; +exports.CDSect = CDSect; +exports.Char = Char; +exports.Comment = Comment; +exports.COMMENT_START = COMMENT_START; +exports.COMMENT_END = COMMENT_END; +exports.DOCTYPE_DECL_START = DOCTYPE_DECL_START; +exports.elementdecl = elementdecl; +exports.EntityDecl = EntityDecl; +exports.EntityValue = EntityValue; +exports.ExternalID = ExternalID; +exports.ExternalID_match = ExternalID_match; +exports.Name = Name; +exports.NotationDecl = NotationDecl; +exports.Reference = Reference; +exports.PEReference = PEReference; +exports.PI = PI; +exports.PUBLIC = PUBLIC; +exports.PubidLiteral = PubidLiteral; +exports.PubidLiteral_match = PubidLiteral_match; +exports.QName = QName; +exports.QName_exact = QName_exact; +exports.QName_group = QName_group; +exports.S = S; +exports.SChar_s = SChar_s; +exports.S_OPT = S_OPT; +exports.SYSTEM = SYSTEM; +exports.SystemLiteral = SystemLiteral; +exports.SystemLiteral_match = SystemLiteral_match; +exports.InvalidChar = InvalidChar; +exports.UNICODE_REPLACEMENT_CHARACTER = UNICODE_REPLACEMENT_CHARACTER; +exports.UNICODE_SUPPORT = UNICODE_SUPPORT; +exports.XMLDecl = XMLDecl; + +},{}],10:[function(require,module,exports){ +'use strict'; +var conventions = require('./conventions'); +exports.assign = conventions.assign; +exports.hasDefaultHTMLNamespace = conventions.hasDefaultHTMLNamespace; +exports.isHTMLMimeType = conventions.isHTMLMimeType; +exports.isValidMimeType = conventions.isValidMimeType; +exports.MIME_TYPE = conventions.MIME_TYPE; +exports.NAMESPACE = conventions.NAMESPACE; + +var errors = require('./errors'); +exports.DOMException = errors.DOMException; +exports.DOMExceptionName = errors.DOMExceptionName; +exports.ExceptionCode = errors.ExceptionCode; +exports.ParseError = errors.ParseError; + +var dom = require('./dom'); +exports.Attr = dom.Attr; +exports.CDATASection = dom.CDATASection; +exports.CharacterData = dom.CharacterData; +exports.Comment = dom.Comment; +exports.Document = dom.Document; +exports.DocumentFragment = dom.DocumentFragment; +exports.DocumentType = dom.DocumentType; +exports.DOMImplementation = dom.DOMImplementation; +exports.Element = dom.Element; +exports.Entity = dom.Entity; +exports.EntityReference = dom.EntityReference; +exports.LiveNodeList = dom.LiveNodeList; +exports.NamedNodeMap = dom.NamedNodeMap; +exports.Node = dom.Node; +exports.NodeList = dom.NodeList; +exports.Notation = dom.Notation; +exports.ProcessingInstruction = dom.ProcessingInstruction; +exports.Text = dom.Text; +exports.XMLSerializer = dom.XMLSerializer; + +var domParser = require('./dom-parser'); +exports.DOMParser = domParser.DOMParser; +exports.normalizeLineEndings = domParser.normalizeLineEndings; +exports.onErrorStopParsing = domParser.onErrorStopParsing; +exports.onWarningStopParsing = domParser.onWarningStopParsing; + +},{"./conventions":4,"./dom":6,"./dom-parser":5,"./errors":8}],11:[function(require,module,exports){ +'use strict'; + +var conventions = require('./conventions'); +var g = require('./grammar'); +var errors = require('./errors'); + +var isHTMLEscapableRawTextElement = conventions.isHTMLEscapableRawTextElement; +var isHTMLMimeType = conventions.isHTMLMimeType; +var isHTMLRawTextElement = conventions.isHTMLRawTextElement; +var hasOwn = conventions.hasOwn; +var NAMESPACE = conventions.NAMESPACE; +var ParseError = errors.ParseError; +var DOMException = errors.DOMException; + +//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',') + +//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE +//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE +var S_TAG = 0; //tag name offerring +var S_ATTR = 1; //attr name offerring +var S_ATTR_SPACE = 2; //attr name end and space offer +var S_EQ = 3; //=space? +var S_ATTR_NOQUOT_VALUE = 4; //attr value(no quot value only) +var S_ATTR_END = 5; //attr value end and no space(quot end) +var S_TAG_SPACE = 6; //(attr value end || tag end ) && (space offer) +var S_TAG_CLOSE = 7; //closed el + +function XMLReader() {} + +XMLReader.prototype = { + parse: function (source, defaultNSMap, entityMap) { + var domBuilder = this.domBuilder; + domBuilder.startDocument(); + _copy(defaultNSMap, (defaultNSMap = Object.create(null))); + parse(source, defaultNSMap, entityMap, domBuilder, this.errorHandler); + domBuilder.endDocument(); + }, +}; + +/** + * Detecting everything that might be a reference, + * including those without ending `;`, since those are allowed in HTML. + * The entityReplacer takes care of verifying and transforming each occurrence, + * and reports to the errorHandler on those that are not OK, + * depending on the context. + */ +var ENTITY_REG = /&#?\w+;?/g; + +function parse(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) { + var isHTML = isHTMLMimeType(domBuilder.mimeType); + if (source.indexOf(g.UNICODE_REPLACEMENT_CHARACTER) >= 0) { + errorHandler.warning('Unicode replacement character detected, source encoding issues?'); + } + + function fixedFromCharCode(code) { + // String.prototype.fromCharCode does not supports + // > 2 bytes unicode chars directly + if (code > 0xffff) { + code -= 0x10000; + var surrogate1 = 0xd800 + (code >> 10), + surrogate2 = 0xdc00 + (code & 0x3ff); + + return String.fromCharCode(surrogate1, surrogate2); + } else { + return String.fromCharCode(code); + } + } + + function entityReplacer(a) { + var complete = a[a.length - 1] === ';' ? a : a + ';'; + if (!isHTML && complete !== a) { + errorHandler.error('EntityRef: expecting ;'); + return a; + } + var match = g.Reference.exec(complete); + if (!match || match[0].length !== complete.length) { + errorHandler.error('entity not matching Reference production: ' + a); + return a; + } + var k = complete.slice(1, -1); + if (hasOwn(entityMap, k)) { + return entityMap[k]; + } else if (k.charAt(0) === '#') { + return fixedFromCharCode(parseInt(k.substring(1).replace('x', '0x'))); + } else { + errorHandler.error('entity not found:' + a); + return a; + } + } + + function appendText(end) { + //has some bugs + if (end > start) { + var xt = source.substring(start, end).replace(ENTITY_REG, entityReplacer); + locator && position(start); + domBuilder.characters(xt, 0, end - start); + start = end; + } + } + + var lineStart = 0; + var lineEnd = 0; + var linePattern = /\r\n?|\n|$/g; + var locator = domBuilder.locator; + + function position(p, m) { + while (p >= lineEnd && (m = linePattern.exec(source))) { + lineStart = lineEnd; + lineEnd = m.index + m[0].length; + locator.lineNumber++; + } + locator.columnNumber = p - lineStart + 1; + } + + var parseStack = [{ currentNSMap: defaultNSMapCopy }]; + var unclosedTags = []; + var start = 0; + while (true) { + try { + var tagStart = source.indexOf('<', start); + if (tagStart < 0) { + if (!isHTML && unclosedTags.length > 0) { + return errorHandler.fatalError('unclosed xml tag(s): ' + unclosedTags.join(', ')); + } + if (!source.substring(start).match(/^\s*$/)) { + var doc = domBuilder.doc; + var text = doc.createTextNode(source.substring(start)); + if (doc.documentElement) { + return errorHandler.error('Extra content at the end of the document'); + } + doc.appendChild(text); + domBuilder.currentElement = text; + } + return; + } + if (tagStart > start) { + var fromSource = source.substring(start, tagStart); + if (!isHTML && unclosedTags.length === 0) { + fromSource = fromSource.replace(new RegExp(g.S_OPT.source, 'g'), ''); + fromSource && errorHandler.error("Unexpected content outside root element: '" + fromSource + "'"); + } + appendText(tagStart); + } + switch (source.charAt(tagStart + 1)) { + case '/': + var end = source.indexOf('>', tagStart + 2); + var tagNameRaw = source.substring(tagStart + 2, end > 0 ? end : undefined); + if (!tagNameRaw) { + return errorHandler.fatalError('end tag name missing'); + } + var tagNameMatch = end > 0 && g.reg('^', g.QName_group, g.S_OPT, '$').exec(tagNameRaw); + if (!tagNameMatch) { + return errorHandler.fatalError('end tag name contains invalid characters: "' + tagNameRaw + '"'); + } + if (!domBuilder.currentElement && !domBuilder.doc.documentElement) { + // not enough information to provide a helpful error message, + // but parsing will throw since there is no root element + return; + } + var currentTagName = + unclosedTags[unclosedTags.length - 1] || + domBuilder.currentElement.tagName || + domBuilder.doc.documentElement.tagName || + ''; + if (currentTagName !== tagNameMatch[1]) { + var tagNameLower = tagNameMatch[1].toLowerCase(); + if (!isHTML || currentTagName.toLowerCase() !== tagNameLower) { + return errorHandler.fatalError('Opening and ending tag mismatch: "' + currentTagName + '" != "' + tagNameRaw + '"'); + } + } + var config = parseStack.pop(); + unclosedTags.pop(); + var localNSMap = config.localNSMap; + domBuilder.endElement(config.uri, config.localName, currentTagName); + if (localNSMap) { + for (var prefix in localNSMap) { + if (hasOwn(localNSMap, prefix)) { + domBuilder.endPrefixMapping(prefix); + } + } + } + + end++; + break; + // end element + case '?': // + locator && position(tagStart); + end = parseProcessingInstruction(source, tagStart, domBuilder, errorHandler); + break; + case '!': // start) { + start = end; + } else { + //Possible sax fallback here, risk of positional error + appendText(Math.max(tagStart, start) + 1); + } + } +} + +function copyLocator(f, t) { + t.lineNumber = f.lineNumber; + t.columnNumber = f.columnNumber; + return t; +} + +/** + * @returns + * end of the elementStartPart(end of elementEndPart for selfClosed el) + * @see {@link #appendElement} + */ +function parseElementStartPart(source, start, el, currentNSMap, entityReplacer, errorHandler, isHTML) { + /** + * @param {string} qname + * @param {string} value + * @param {number} startIndex + */ + function addAttribute(qname, value, startIndex) { + if (hasOwn(el.attributeNames, qname)) { + return errorHandler.fatalError('Attribute ' + qname + ' redefined'); + } + if (!isHTML && value.indexOf('<') >= 0) { + return errorHandler.fatalError("Unescaped '<' not allowed in attributes values"); + } + el.addValue( + qname, + // @see https://www.w3.org/TR/xml/#AVNormalize + // since the xmldom sax parser does not "interpret" DTD the following is not implemented: + // - recursive replacement of (DTD) entity references + // - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA + value.replace(/[\t\n\r]/g, ' ').replace(ENTITY_REG, entityReplacer), + startIndex + ); + } + + var attrName; + var value; + var p = ++start; + var s = S_TAG; //status + while (true) { + var c = source.charAt(p); + switch (c) { + case '=': + if (s === S_ATTR) { + //attrName + attrName = source.slice(start, p); + s = S_EQ; + } else if (s === S_ATTR_SPACE) { + s = S_EQ; + } else { + //fatalError: equal must after attrName or space after attrName + throw new Error('attribute equal must after attrName'); // No known test case + } + break; + case "'": + case '"': + if ( + s === S_EQ || + s === S_ATTR //|| s == S_ATTR_SPACE + ) { + //equal + if (s === S_ATTR) { + errorHandler.warning('attribute value must after "="'); + attrName = source.slice(start, p); + } + start = p + 1; + p = source.indexOf(c, start); + if (p > 0) { + value = source.slice(start, p); + addAttribute(attrName, value, start - 1); + s = S_ATTR_END; + } else { + //fatalError: no end quot match + throw new Error("attribute value no end '" + c + "' match"); + } + } else if (s == S_ATTR_NOQUOT_VALUE) { + value = source.slice(start, p); + addAttribute(attrName, value, start); + errorHandler.warning('attribute "' + attrName + '" missed start quot(' + c + ')!!'); + start = p + 1; + s = S_ATTR_END; + } else { + //fatalError: no equal before + throw new Error('attribute value must after "="'); // No known test case + } + break; + case '/': + switch (s) { + case S_TAG: + el.setTagName(source.slice(start, p)); + case S_ATTR_END: + case S_TAG_SPACE: + case S_TAG_CLOSE: + s = S_TAG_CLOSE; + el.closed = true; + case S_ATTR_NOQUOT_VALUE: + case S_ATTR: + break; + case S_ATTR_SPACE: + el.closed = true; + break; + //case S_EQ: + default: + throw new Error("attribute invalid close char('/')"); // No known test case + } + break; + case '': //end document + errorHandler.error('unexpected end of input'); + if (s == S_TAG) { + el.setTagName(source.slice(start, p)); + } + return p; + case '>': + switch (s) { + case S_TAG: + el.setTagName(source.slice(start, p)); + case S_ATTR_END: + case S_TAG_SPACE: + case S_TAG_CLOSE: + break; //normal + case S_ATTR_NOQUOT_VALUE: //Compatible state + case S_ATTR: + value = source.slice(start, p); + if (value.slice(-1) === '/') { + el.closed = true; + value = value.slice(0, -1); + } + case S_ATTR_SPACE: + if (s === S_ATTR_SPACE) { + value = attrName; + } + if (s == S_ATTR_NOQUOT_VALUE) { + errorHandler.warning('attribute "' + value + '" missed quot(")!'); + addAttribute(attrName, value, start); + } else { + if (!isHTML) { + errorHandler.warning('attribute "' + value + '" missed value!! "' + value + '" instead!!'); + } + addAttribute(value, value, start); + } + break; + case S_EQ: + if (!isHTML) { + return errorHandler.fatalError('AttValue: \' or " expected'); + } + } + return p; + /*xml space '\x20' | #x9 | #xD | #xA; */ + case '\u0080': + c = ' '; + default: + if (c <= ' ') { + //space + switch (s) { + case S_TAG: + el.setTagName(source.slice(start, p)); //tagName + s = S_TAG_SPACE; + break; + case S_ATTR: + attrName = source.slice(start, p); + s = S_ATTR_SPACE; + break; + case S_ATTR_NOQUOT_VALUE: + var value = source.slice(start, p); + errorHandler.warning('attribute "' + value + '" missed quot(")!!'); + addAttribute(attrName, value, start); + case S_ATTR_END: + s = S_TAG_SPACE; + break; + //case S_TAG_SPACE: + //case S_EQ: + //case S_ATTR_SPACE: + // void();break; + //case S_TAG_CLOSE: + //ignore warning + } + } else { + //not space + //S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE + //S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE + switch (s) { + //case S_TAG:void();break; + //case S_ATTR:void();break; + //case S_ATTR_NOQUOT_VALUE:void();break; + case S_ATTR_SPACE: + if (!isHTML) { + errorHandler.warning('attribute "' + attrName + '" missed value!! "' + attrName + '" instead2!!'); + } + addAttribute(attrName, attrName, start); + start = p; + s = S_ATTR; + break; + case S_ATTR_END: + errorHandler.warning('attribute space is required"' + attrName + '"!!'); + case S_TAG_SPACE: + s = S_ATTR; + start = p; + break; + case S_EQ: + s = S_ATTR_NOQUOT_VALUE; + start = p; + break; + case S_TAG_CLOSE: + throw new Error("elements closed character '/' and '>' must be connected to"); + } + } + } //end outer switch + p++; + } +} + +/** + * @returns + * `true` if a new namespace has been defined. + */ +function appendElement(el, domBuilder, currentNSMap) { + var tagName = el.tagName; + var localNSMap = null; + var i = el.length; + while (i--) { + var a = el[i]; + var qName = a.qName; + var value = a.value; + var nsp = qName.indexOf(':'); + if (nsp > 0) { + var prefix = (a.prefix = qName.slice(0, nsp)); + var localName = qName.slice(nsp + 1); + var nsPrefix = prefix === 'xmlns' && localName; + } else { + localName = qName; + prefix = null; + nsPrefix = qName === 'xmlns' && ''; + } + //can not set prefix,because prefix !== '' + a.localName = localName; + //prefix == null for no ns prefix attribute + if (nsPrefix !== false) { + //hack!! + if (localNSMap == null) { + localNSMap = Object.create(null); + _copy(currentNSMap, (currentNSMap = Object.create(null))); + } + currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; + a.uri = NAMESPACE.XMLNS; + domBuilder.startPrefixMapping(nsPrefix, value); + } + } + var i = el.length; + while (i--) { + a = el[i]; + if (a.prefix) { + //no prefix attribute has no namespace + if (a.prefix === 'xml') { + a.uri = NAMESPACE.XML; + } + if (a.prefix !== 'xmlns') { + a.uri = currentNSMap[a.prefix]; + } + } + } + var nsp = tagName.indexOf(':'); + if (nsp > 0) { + prefix = el.prefix = tagName.slice(0, nsp); + localName = el.localName = tagName.slice(nsp + 1); + } else { + prefix = null; //important!! + localName = el.localName = tagName; + } + //no prefix element has default namespace + var ns = (el.uri = currentNSMap[prefix || '']); + domBuilder.startElement(ns, localName, tagName, el); + //endPrefixMapping and startPrefixMapping have not any help for dom builder + //localNSMap = null + if (el.closed) { + domBuilder.endElement(ns, localName, tagName); + if (localNSMap) { + for (prefix in localNSMap) { + if (hasOwn(localNSMap, prefix)) { + domBuilder.endPrefixMapping(prefix); + } + } + } + } else { + el.currentNSMap = currentNSMap; + el.localNSMap = localNSMap; + //parseStack.push(el); + return true; + } +} + +function parseHtmlSpecialContent(source, elStartEnd, tagName, entityReplacer, domBuilder) { + // https://html.spec.whatwg.org/#raw-text-elements + // https://html.spec.whatwg.org/#escapable-raw-text-elements + // https://html.spec.whatwg.org/#cdata-rcdata-restrictions:raw-text-elements + // TODO: https://html.spec.whatwg.org/#cdata-rcdata-restrictions + var isEscapableRaw = isHTMLEscapableRawTextElement(tagName); + if (isEscapableRaw || isHTMLRawTextElement(tagName)) { + var elEndStart = source.indexOf('', elStartEnd); + var text = source.substring(elStartEnd + 1, elEndStart); + + if (isEscapableRaw) { + text = text.replace(ENTITY_REG, entityReplacer); + } + domBuilder.characters(text, 0, text.length); + return elEndStart; + } + return elStartEnd + 1; +} + +function _copy(source, target) { + for (var n in source) { + if (hasOwn(source, n)) { + target[n] = source[n]; + } + } +} + +/** + * @typedef ParseUtils + * @property {function(relativeIndex: number?): string | undefined} char + * Provides look ahead access to a singe character relative to the current index. + * @property {function(): number} getIndex + * Provides read-only access to the current index. + * @property {function(reg: RegExp): string | null} getMatch + * Applies the provided regular expression enforcing that it starts at the current index and + * returns the complete matching string, + * and moves the current index by the length of the matching string. + * @property {function(): string} getSource + * Provides read-only access to the complete source. + * @property {function(places: number?): void} skip + * moves the current index by places (defaults to 1) + * @property {function(): number} skipBlanks + * Moves the current index by the amount of white space that directly follows the current index + * and returns the amount of whitespace chars skipped (0..n), + * or -1 if the end of the source was reached. + * @property {function(): string} substringFromIndex + * creates a substring from the current index to the end of `source` + * @property {function(compareWith: string): boolean} substringStartsWith + * Checks if `source` contains `compareWith`, starting from the current index. + * @property {function(compareWith: string): boolean} substringStartsWithCaseInsensitive + * Checks if `source` contains `compareWith`, starting from the current index, + * comparing the upper case of both sides. + * @see {@link parseUtils} + */ + +/** + * A temporary scope for parsing and look ahead operations in `source`, + * starting from index `start`. + * + * Some operations move the current index by a number of positions, + * after which `getIndex` returns the new index. + * + * @param {string} source + * @param {number} start + * @returns {ParseUtils} + */ +function parseUtils(source, start) { + var index = start; + + function char(n) { + n = n || 0; + return source.charAt(index + n); + } + + function skip(n) { + n = n || 1; + index += n; + } + + function skipBlanks() { + var blanks = 0; + while (index < source.length) { + var c = char(); + if (c !== ' ' && c !== '\n' && c !== '\t' && c !== '\r') { + return blanks; + } + blanks++; + skip(); + } + return -1; + } + function substringFromIndex() { + return source.substring(index); + } + function substringStartsWith(text) { + return source.substring(index, index + text.length) === text; + } + function substringStartsWithCaseInsensitive(text) { + return source.substring(index, index + text.length).toUpperCase() === text.toUpperCase(); + } + + function getMatch(args) { + var expr = g.reg('^', args); + var match = expr.exec(substringFromIndex()); + if (match) { + skip(match[0].length); + return match[0]; + } + return null; + } + return { + char: char, + getIndex: function () { + return index; + }, + getMatch: getMatch, + getSource: function () { + return source; + }, + skip: skip, + skipBlanks: skipBlanks, + substringFromIndex: substringFromIndex, + substringStartsWith: substringStartsWith, + substringStartsWithCaseInsensitive: substringStartsWithCaseInsensitive, + }; +} + +/** + * @param {ParseUtils} p + * @param {DOMHandler} errorHandler + * @returns {string} + */ +function parseDoctypeInternalSubset(p, errorHandler) { + /** + * @param {ParseUtils} p + * @param {DOMHandler} errorHandler + * @returns {string} + */ + function parsePI(p, errorHandler) { + var match = g.PI.exec(p.substringFromIndex()); + if (!match) { + return errorHandler.fatalError('processing instruction is not well-formed at position ' + p.getIndex()); + } + if (match[1].toLowerCase() === 'xml') { + return errorHandler.fatalError( + 'xml declaration is only allowed at the start of the document, but found at position ' + p.getIndex() + ); + } + p.skip(match[0].length); + return match[0]; + } + // Parse internal subset + var source = p.getSource(); + if (p.char() === '[') { + p.skip(1); + var intSubsetStart = p.getIndex(); + while (p.getIndex() < source.length) { + p.skipBlanks(); + if (p.char() === ']') { + var internalSubset = source.substring(intSubsetStart, p.getIndex()); + p.skip(1); + return internalSubset; + } + var current = null; + // Only in external subset + // if (char() === '<' && char(1) === '!' && char(2) === '[') { + // parseConditionalSections(p, errorHandler); + // } else + if (p.char() === '<' && p.char(1) === '!') { + switch (p.char(2)) { + case 'E': // ELEMENT | ENTITY + if (p.char(3) === 'L') { + current = p.getMatch(g.elementdecl); + } else if (p.char(3) === 'N') { + current = p.getMatch(g.EntityDecl); + } + break; + case 'A': // ATTRIBUTE + current = p.getMatch(g.AttlistDecl); + break; + case 'N': // NOTATION + current = p.getMatch(g.NotationDecl); + break; + case '-': // COMMENT + current = p.getMatch(g.Comment); + break; + } + } else if (p.char() === '<' && p.char(1) === '?') { + current = parsePI(p, errorHandler); + } else if (p.char() === '%') { + current = p.getMatch(g.PEReference); + } else { + return errorHandler.fatalError('Error detected in Markup declaration'); + } + if (!current) { + return errorHandler.fatalError('Error in internal subset at position ' + p.getIndex()); + } + } + return errorHandler.fatalError('doctype internal subset is not well-formed, missing ]'); + } +} + +/** + * Called when the parser encounters an element starting with '') { + return errorHandler.fatalError('doctype not terminated with > at position ' + p.getIndex()); + } + p.skip(1); + domBuilder.startDTD(doctype.name, doctype.publicId, doctype.systemId, doctype.internalSubset); + domBuilder.endDTD(); + return p.getIndex(); + } + default: + return errorHandler.fatalError('Not well-formed XML starting with " 0) { + return errorHandler.fatalError( + 'processing instruction at position ' + start + ' is an xml declaration which is only at the start of the document' + ); + } + if (!g.XMLDecl.test(source.substring(start))) { + return errorHandler.fatalError('xml declaration is not well-formed'); + } + } + domBuilder.processingInstruction(match[1], match[2]); + return start + match[0].length; +} + +function ElementAttributes() { + this.attributeNames = Object.create(null); +} + +ElementAttributes.prototype = { + setTagName: function (tagName) { + if (!g.QName_exact.test(tagName)) { + throw new Error('invalid tagName:' + tagName); + } + this.tagName = tagName; + }, + addValue: function (qName, value, offset) { + if (!g.QName_exact.test(qName)) { + throw new Error('invalid attribute:' + qName); + } + this.attributeNames[qName] = this.length; + this[this.length++] = { qName: qName, value: value, offset: offset }; + }, + length: 0, + getLocalName: function (i) { + return this[i].localName; + }, + getLocator: function (i) { + return this[i].locator; + }, + getQName: function (i) { + return this[i].qName; + }, + getURI: function (i) { + return this[i].uri; + }, + getValue: function (i) { + return this[i].value; + }, + // ,getIndex:function(uri, localName)){ + // if(localName){ + // + // }else{ + // var qName = uri + // } + // }, + // getValue:function(){return this.getValue(this.getIndex.apply(this,arguments))}, + // getType:function(uri,localName){} + // getType:function(i){}, +}; + +exports.XMLReader = XMLReader; +exports.parseUtils = parseUtils; +exports.parseDoctypeCommentOrCData = parseDoctypeCommentOrCData; + +},{"./conventions":4,"./errors":8,"./grammar":9}],12:[function(require,module,exports){ +'use strict' + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function getLens (b64) { + var len = b64.length + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} + +},{}],13:[function(require,module,exports){ +(function (Buffer){(function (){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +'use strict' + +var base64 = require('base64-js') +var ieee754 = require('ieee754') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +var K_MAX_LENGTH = 0x7fffffff +exports.kMaxLength = K_MAX_LENGTH + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Print warning and recommend using `buffer` v4.x which has an Object + * implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * We report that the browser does not support typed arrays if the are not subclassable + * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support + * for __proto__ and has a buggy typed array implementation. + */ +Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() + +if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && + typeof console.error === 'function') { + console.error( + 'This browser lacks typed array (Uint8Array) support which is required by ' + + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' + ) +} + +function typedArraySupport () { + // Can typed array instances can be augmented? + try { + var arr = new Uint8Array(1) + arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } } + return arr.foo() === 42 + } catch (e) { + return false + } +} + +Object.defineProperty(Buffer.prototype, 'parent', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.buffer + } +}) + +Object.defineProperty(Buffer.prototype, 'offset', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.byteOffset + } +}) + +function createBuffer (length) { + if (length > K_MAX_LENGTH) { + throw new RangeError('The value "' + length + '" is invalid for option "size"') + } + // Return an augmented `Uint8Array` instance + var buf = new Uint8Array(length) + buf.__proto__ = Buffer.prototype + return buf +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new TypeError( + 'The "string" argument must be of type string. Received type number' + ) + } + return allocUnsafe(arg) + } + return from(arg, encodingOrOffset, length) +} + +// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 +if (typeof Symbol !== 'undefined' && Symbol.species != null && + Buffer[Symbol.species] === Buffer) { + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true, + enumerable: false, + writable: false + }) +} + +Buffer.poolSize = 8192 // not used by this implementation + +function from (value, encodingOrOffset, length) { + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + if (ArrayBuffer.isView(value)) { + return fromArrayLike(value) + } + + if (value == null) { + throw TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) + } + + if (isInstance(value, ArrayBuffer) || + (value && isInstance(value.buffer, ArrayBuffer))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'number') { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number' + ) + } + + var valueOf = value.valueOf && value.valueOf() + if (valueOf != null && valueOf !== value) { + return Buffer.from(valueOf, encodingOrOffset, length) + } + + var b = fromObject(value) + if (b) return b + + if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && + typeof value[Symbol.toPrimitive] === 'function') { + return Buffer.from( + value[Symbol.toPrimitive]('string'), encodingOrOffset, length + ) + } + + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length) +} + +// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: +// https://github.com/feross/buffer/pull/148 +Buffer.prototype.__proto__ = Uint8Array.prototype +Buffer.__proto__ = Uint8Array + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be of type number') + } else if (size < 0) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } +} + +function alloc (size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(size).fill(fill, encoding) + : createBuffer(size).fill(fill) + } + return createBuffer(size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding) +} + +function allocUnsafe (size) { + assertSize(size) + return createBuffer(size < 0 ? 0 : checked(size) | 0) +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(size) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + + var length = byteLength(string, encoding) | 0 + var buf = createBuffer(length) + + var actual = buf.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + buf = buf.slice(0, actual) + } + + return buf +} + +function fromArrayLike (array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + var buf = createBuffer(length) + for (var i = 0; i < length; i += 1) { + buf[i] = array[i] & 255 + } + return buf +} + +function fromArrayBuffer (array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds') + } + + var buf + if (byteOffset === undefined && length === undefined) { + buf = new Uint8Array(array) + } else if (length === undefined) { + buf = new Uint8Array(array, byteOffset) + } else { + buf = new Uint8Array(array, byteOffset, length) + } + + // Return an augmented `Uint8Array` instance + buf.__proto__ = Buffer.prototype + return buf +} + +function fromObject (obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + var buf = createBuffer(len) + + if (buf.length === 0) { + return buf + } + + obj.copy(buf, 0, 0, len) + return buf + } + + if (obj.length !== undefined) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + return createBuffer(0) + } + return fromArrayLike(obj) + } + + if (obj.type === 'Buffer' && Array.isArray(obj.data)) { + return fromArrayLike(obj.data) + } +} + +function checked (length) { + // Note: cannot use `length < K_MAX_LENGTH` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= K_MAX_LENGTH) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return b != null && b._isBuffer === true && + b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false +} + +Buffer.compare = function compare (a, b) { + if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) + if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' + ) + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (isInstance(buf, Uint8Array)) { + buf = Buffer.from(buf) + } + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + + 'Received type ' + typeof string + ) + } + + var len = string.length + var mustMatch = (arguments.length > 2 && arguments[2] === true) + if (!mustMatch && len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) { + return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 + } + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + var loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) +// to detect a Buffer instance. It's not possible to use `instanceof Buffer` +// reliably in a browserify context because there could be multiple different +// copies of the 'buffer' package in use. This method works even for Buffer +// instances that were created from another copy of the `buffer` package. +// See: https://github.com/feross/buffer/issues/154 +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.toLocaleString = Buffer.prototype.toString + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() + if (this.length > max) str += ' ... ' + return '' +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (isInstance(target, Uint8Array)) { + target = Buffer.from(target, target.offset, target.byteLength) + } + if (!Buffer.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. ' + + 'Received type ' + (typeof target) + ) + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (numberIsNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + var strLen = string.length + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (numberIsNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset >>> 0 + if (isFinite(length)) { + length = length >>> 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf = this.subarray(start, end) + // Return an augmented `Uint8Array` instance + newBuf.__proto__ = Buffer.prototype + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('Index out of range') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + + if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { + // Use built-in when available, missing from IE11 + this.copyWithin(targetStart, start, end) + } else if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (var i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if ((encoding === 'utf8' && code < 128) || + encoding === 'latin1') { + // Fast path: If `val` fits into a single byte, use that numeric value. + val = code + } + } + } else if (typeof val === 'number') { + val = val & 255 + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : Buffer.from(val, encoding) + var len = bytes.length + if (len === 0) { + throw new TypeError('The value "' + val + + '" is invalid for argument "value"') + } + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node takes equal signs as end of the Base64 encoding + str = str.split('=')[0] + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = str.trim().replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass +// the `instanceof` check but they should be treated as of that type. +// See: https://github.com/feross/buffer/issues/166 +function isInstance (obj, type) { + return obj instanceof type || + (obj != null && obj.constructor != null && obj.constructor.name != null && + obj.constructor.name === type.name) +} +function numberIsNaN (obj) { + // For IE11 support + return obj !== obj // eslint-disable-line no-self-compare +} + +}).call(this)}).call(this,require("buffer").Buffer) +},{"base64-js":12,"buffer":13,"ieee754":14}],14:[function(require,module,exports){ +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = ((value * c) - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}],15:[function(require,module,exports){ +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +// The _isBuffer check is for Safari 5-7 support, because it's missing +// Object.prototype.constructor. Remove this eventually +module.exports = function (obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) +} + +function isBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +} + +// For Node v0.10 support. Remove this eventually. +function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) +} + +},{}],16:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + module.exports = { + Disconnected: 1, + Preceding: 2, + Following: 4, + Contains: 8, + ContainedBy: 16, + ImplementationSpecific: 32 + }; + +}).call(this); + +},{}],17:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + module.exports = { + Element: 1, + Attribute: 2, + Text: 3, + CData: 4, + EntityReference: 5, + EntityDeclaration: 6, + ProcessingInstruction: 7, + Comment: 8, + Document: 9, + DocType: 10, + DocumentFragment: 11, + NotationDeclaration: 12, + // Numeric codes up to 200 are reserved to W3C for possible future use. + // Following are types internal to this library: + Declaration: 201, + Raw: 202, + AttributeDeclaration: 203, + ElementDeclaration: 204, + Dummy: 205 + }; + +}).call(this); + +},{}],18:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + // Copies all enumerable own properties from `sources` to `target` + var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject, + hasProp = {}.hasOwnProperty; + + assign = function(target, ...sources) { + var i, key, len, source; + if (isFunction(Object.assign)) { + Object.assign.apply(null, arguments); + } else { + for (i = 0, len = sources.length; i < len; i++) { + source = sources[i]; + if (source != null) { + for (key in source) { + if (!hasProp.call(source, key)) continue; + target[key] = source[key]; + } + } + } + } + return target; + }; + + // Determines if `val` is a Function object + isFunction = function(val) { + return !!val && Object.prototype.toString.call(val) === '[object Function]'; + }; + + // Determines if `val` is an Object + isObject = function(val) { + var ref; + return !!val && ((ref = typeof val) === 'function' || ref === 'object'); + }; + + // Determines if `val` is an Array + isArray = function(val) { + if (isFunction(Array.isArray)) { + return Array.isArray(val); + } else { + return Object.prototype.toString.call(val) === '[object Array]'; + } + }; + + // Determines if `val` is an empty Array or an Object with no own properties + isEmpty = function(val) { + var key; + if (isArray(val)) { + return !val.length; + } else { + for (key in val) { + if (!hasProp.call(val, key)) continue; + return false; + } + return true; + } + }; + + // Determines if `val` is a plain Object + isPlainObject = function(val) { + var ctor, proto; + return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object)); + }; + + // Gets the primitive value of an object + getValue = function(obj) { + if (isFunction(obj.valueOf)) { + return obj.valueOf(); + } else { + return obj; + } + }; + + module.exports.assign = assign; + + module.exports.isFunction = isFunction; + + module.exports.isObject = isObject; + + module.exports.isArray = isArray; + + module.exports.isEmpty = isEmpty; + + module.exports.isPlainObject = isPlainObject; + + module.exports.getValue = getValue; + +}).call(this); + +},{}],19:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + module.exports = { + None: 0, + OpenTag: 1, + InsideTag: 2, + CloseTag: 3 + }; + +}).call(this); + +},{}],20:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLAttribute, XMLNode; + + NodeType = require('./NodeType'); + + XMLNode = require('./XMLNode'); + + // Represents an attribute + module.exports = XMLAttribute = (function() { + class XMLAttribute { + // Initializes a new instance of `XMLAttribute` + + // `parent` the parent node + // `name` attribute target + // `value` attribute value + constructor(parent, name, value) { + this.parent = parent; + if (this.parent) { + this.options = this.parent.options; + this.stringify = this.parent.stringify; + } + if (name == null) { + throw new Error("Missing attribute name. " + this.debugInfo(name)); + } + this.name = this.stringify.name(name); + this.value = this.stringify.attValue(value); + this.type = NodeType.Attribute; + // DOM level 3 + this.isId = false; + this.schemaTypeInfo = null; + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.attribute(this, this.options.writer.filterOptions(options)); + } + + + // Returns debug string for this node + debugInfo(name) { + name = name || this.name; + if (name == null) { + return "parent: <" + this.parent.name + ">"; + } else { + return "attribute: {" + name + "}, parent: <" + this.parent.name + ">"; + } + } + + isEqualNode(node) { + if (node.namespaceURI !== this.namespaceURI) { + return false; + } + if (node.prefix !== this.prefix) { + return false; + } + if (node.localName !== this.localName) { + return false; + } + if (node.value !== this.value) { + return false; + } + return true; + } + + }; + + // DOM level 1 + Object.defineProperty(XMLAttribute.prototype, 'nodeType', { + get: function() { + return this.type; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'ownerElement', { + get: function() { + return this.parent; + } + }); + + // DOM level 3 + Object.defineProperty(XMLAttribute.prototype, 'textContent', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + // DOM level 4 + Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'prefix', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'localName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'specified', { + get: function() { + return true; + } + }); + + return XMLAttribute; + + }).call(this); + +}).call(this); + +},{"./NodeType":17,"./XMLNode":39}],21:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLCData, XMLCharacterData; + + NodeType = require('./NodeType'); + + XMLCharacterData = require('./XMLCharacterData'); + + // Represents a CDATA node + module.exports = XMLCData = class XMLCData extends XMLCharacterData { + // Initializes a new instance of `XMLCData` + + // `text` CDATA text + constructor(parent, text) { + super(parent); + if (text == null) { + throw new Error("Missing CDATA text. " + this.debugInfo()); + } + this.name = "#cdata-section"; + this.type = NodeType.CData; + this.value = this.stringify.cdata(text); + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.cdata(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); + +},{"./NodeType":17,"./XMLCharacterData":22}],22:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var XMLCharacterData, XMLNode; + + XMLNode = require('./XMLNode'); + + // Represents a character data node + module.exports = XMLCharacterData = (function() { + class XMLCharacterData extends XMLNode { + // Initializes a new instance of `XMLCharacterData` + + constructor(parent) { + super(parent); + this.value = ''; + } + + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // DOM level 1 functions to be implemented later + substringData(offset, count) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + appendData(arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + insertData(offset, arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + deleteData(offset, count) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + replaceData(offset, count, arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + isEqualNode(node) { + if (!super.isEqualNode(node)) { + return false; + } + if (node.data !== this.data) { + return false; + } + return true; + } + + }; + + // DOM level 1 + Object.defineProperty(XMLCharacterData.prototype, 'data', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + Object.defineProperty(XMLCharacterData.prototype, 'length', { + get: function() { + return this.value.length; + } + }); + + // DOM level 3 + Object.defineProperty(XMLCharacterData.prototype, 'textContent', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + return XMLCharacterData; + + }).call(this); + +}).call(this); + +},{"./XMLNode":39}],23:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLCharacterData, XMLComment; + + NodeType = require('./NodeType'); + + XMLCharacterData = require('./XMLCharacterData'); + + // Represents a comment node + module.exports = XMLComment = class XMLComment extends XMLCharacterData { + // Initializes a new instance of `XMLComment` + + // `text` comment text + constructor(parent, text) { + super(parent); + if (text == null) { + throw new Error("Missing comment text. " + this.debugInfo()); + } + this.name = "#comment"; + this.type = NodeType.Comment; + this.value = this.stringify.comment(text); + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.comment(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); + +},{"./NodeType":17,"./XMLCharacterData":22}],24:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList; + + XMLDOMErrorHandler = require('./XMLDOMErrorHandler'); + + XMLDOMStringList = require('./XMLDOMStringList'); + + // Implements the DOMConfiguration interface + module.exports = XMLDOMConfiguration = (function() { + class XMLDOMConfiguration { + constructor() { + var clonedSelf; + this.defaultParams = { + "canonical-form": false, + "cdata-sections": false, + "comments": false, + "datatype-normalization": false, + "element-content-whitespace": true, + "entities": true, + "error-handler": new XMLDOMErrorHandler(), + "infoset": true, + "validate-if-schema": false, + "namespaces": true, + "namespace-declarations": true, + "normalize-characters": false, + "schema-location": '', + "schema-type": '', + "split-cdata-sections": true, + "validate": false, + "well-formed": true + }; + this.params = clonedSelf = Object.create(this.defaultParams); + } + + // Gets the value of a parameter. + + // `name` name of the parameter + getParameter(name) { + if (this.params.hasOwnProperty(name)) { + return this.params[name]; + } else { + return null; + } + } + + // Checks if setting a parameter to a specific value is supported. + + // `name` name of the parameter + // `value` parameter value + canSetParameter(name, value) { + return true; + } + + // Sets the value of a parameter. + + // `name` name of the parameter + // `value` new value or null if the user wishes to unset the parameter + setParameter(name, value) { + if (value != null) { + return this.params[name] = value; + } else { + return delete this.params[name]; + } + } + + }; + + // Returns the list of parameter names + Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', { + get: function() { + return new XMLDOMStringList(Object.keys(this.defaultParams)); + } + }); + + return XMLDOMConfiguration; + + }).call(this); + +}).call(this); + +},{"./XMLDOMErrorHandler":25,"./XMLDOMStringList":27}],25:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + // Represents the error handler for DOM operations + var XMLDOMErrorHandler; + + module.exports = XMLDOMErrorHandler = class XMLDOMErrorHandler { + // Initializes a new instance of `XMLDOMErrorHandler` + + constructor() {} + + // Called on the error handler when an error occurs. + + // `error` the error message as a string + handleError(error) { + throw new Error(error); + } + + }; + +}).call(this); + +},{}],26:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + // Implements the DOMImplementation interface + var XMLDOMImplementation; + + module.exports = XMLDOMImplementation = class XMLDOMImplementation { + // Tests if the DOM implementation implements a specific feature. + + // `feature` package name of the feature to test. In Level 1, the + // legal values are "HTML" and "XML" (case-insensitive). + // `version` version number of the package name to test. + // In Level 1, this is the string "1.0". If the version is + // not specified, supporting any version of the feature will + // cause the method to return true. + hasFeature(feature, version) { + return true; + } + + // Creates a new document type declaration. + + // `qualifiedName` qualified name of the document type to be created + // `publicId` public identifier of the external subset + // `systemId` system identifier of the external subset + createDocumentType(qualifiedName, publicId, systemId) { + throw new Error("This DOM method is not implemented."); + } + + // Creates a new document. + + // `namespaceURI` namespace URI of the document element to create + // `qualifiedName` the qualified name of the document to be created + // `doctype` the type of document to be created or null + createDocument(namespaceURI, qualifiedName, doctype) { + throw new Error("This DOM method is not implemented."); + } + + // Creates a new HTML document. + + // `title` document title + createHTMLDocument(title) { + throw new Error("This DOM method is not implemented."); + } + + // Returns a specialized object which implements the specialized APIs + // of the specified feature and version. + + // `feature` name of the feature requested. + // `version` version number of the feature to test + getFeature(feature, version) { + throw new Error("This DOM method is not implemented."); + } + + }; + +}).call(this); + +},{}],27:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + // Represents a list of string entries + var XMLDOMStringList; + + module.exports = XMLDOMStringList = (function() { + class XMLDOMStringList { + // Initializes a new instance of `XMLDOMStringList` + // This is just a wrapper around an ordinary + // JS array. + + // `arr` the array of string values + constructor(arr) { + this.arr = arr || []; + } + + // Returns the indexth item in the collection. + + // `index` index into the collection + item(index) { + return this.arr[index] || null; + } + + // Test if a string is part of this DOMStringList. + + // `str` the string to look for + contains(str) { + return this.arr.indexOf(str) !== -1; + } + + }; + + // Returns the number of strings in the list. + Object.defineProperty(XMLDOMStringList.prototype, 'length', { + get: function() { + return this.arr.length; + } + }); + + return XMLDOMStringList; + + }).call(this); + +}).call(this); + +},{}],28:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDTDAttList, XMLNode; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents an attribute list + module.exports = XMLDTDAttList = class XMLDTDAttList extends XMLNode { + // Initializes a new instance of `XMLDTDAttList` + + // `parent` the parent `XMLDocType` element + // `elementName` the name of the element containing this attribute + // `attributeName` attribute name + // `attributeType` type of the attribute + // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, + // #FIXED or #DEFAULT) + // `defaultValue` default value of the attribute + // (only used for #FIXED or #DEFAULT) + constructor(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { + super(parent); + if (elementName == null) { + throw new Error("Missing DTD element name. " + this.debugInfo()); + } + if (attributeName == null) { + throw new Error("Missing DTD attribute name. " + this.debugInfo(elementName)); + } + if (!attributeType) { + throw new Error("Missing DTD attribute type. " + this.debugInfo(elementName)); + } + if (!defaultValueType) { + throw new Error("Missing DTD attribute default. " + this.debugInfo(elementName)); + } + if (defaultValueType.indexOf('#') !== 0) { + defaultValueType = '#' + defaultValueType; + } + if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { + throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(elementName)); + } + if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { + throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(elementName)); + } + this.elementName = this.stringify.name(elementName); + this.type = NodeType.AttributeDeclaration; + this.attributeName = this.stringify.name(attributeName); + this.attributeType = this.stringify.dtdAttType(attributeType); + if (defaultValue) { + this.defaultValue = this.stringify.dtdAttDefault(defaultValue); + } + this.defaultValueType = defaultValueType; + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); + +},{"./NodeType":17,"./XMLNode":39}],29:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDTDElement, XMLNode; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents an attribute + module.exports = XMLDTDElement = class XMLDTDElement extends XMLNode { + // Initializes a new instance of `XMLDTDElement` + + // `parent` the parent `XMLDocType` element + // `name` element name + // `value` element content (defaults to #PCDATA) + constructor(parent, name, value) { + super(parent); + if (name == null) { + throw new Error("Missing DTD element name. " + this.debugInfo()); + } + if (!value) { + value = '(#PCDATA)'; + } + if (Array.isArray(value)) { + value = '(' + value.join(',') + ')'; + } + this.name = this.stringify.name(name); + this.type = NodeType.ElementDeclaration; + this.value = this.stringify.dtdElementValue(value); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); + +},{"./NodeType":17,"./XMLNode":39}],30:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDTDEntity, XMLNode, isObject; + + ({isObject} = require('./Utility')); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents an entity declaration in the DTD + module.exports = XMLDTDEntity = (function() { + class XMLDTDEntity extends XMLNode { + // Initializes a new instance of `XMLDTDEntity` + + // `parent` the parent `XMLDocType` element + // `pe` whether this is a parameter entity or a general entity + // defaults to `false` (general entity) + // `name` the name of the entity + // `value` internal entity value or an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + // `value.nData` notation declaration + constructor(parent, pe, name, value) { + super(parent); + if (name == null) { + throw new Error("Missing DTD entity name. " + this.debugInfo(name)); + } + if (value == null) { + throw new Error("Missing DTD entity value. " + this.debugInfo(name)); + } + this.pe = !!pe; + this.name = this.stringify.name(name); + this.type = NodeType.EntityDeclaration; + if (!isObject(value)) { + this.value = this.stringify.dtdEntityValue(value); + this.internal = true; + } else { + if (!value.pubID && !value.sysID) { + throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name)); + } + if (value.pubID && !value.sysID) { + throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name)); + } + this.internal = false; + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + if (value.nData != null) { + this.nData = this.stringify.dtdNData(value.nData); + } + if (this.pe && this.nData) { + throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name)); + } + } + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options)); + } + + }; + + // DOM level 1 + Object.defineProperty(XMLDTDEntity.prototype, 'publicId', { + get: function() { + return this.pubID; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'systemId', { + get: function() { + return this.sysID; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'notationName', { + get: function() { + return this.nData || null; + } + }); + + // DOM level 3 + Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', { + get: function() { + return null; + } + }); + + return XMLDTDEntity; + + }).call(this); + +}).call(this); + +},{"./NodeType":17,"./Utility":18,"./XMLNode":39}],31:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDTDNotation, XMLNode; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents a NOTATION entry in the DTD + module.exports = XMLDTDNotation = (function() { + class XMLDTDNotation extends XMLNode { + // Initializes a new instance of `XMLDTDNotation` + + // `parent` the parent `XMLDocType` element + // `name` the name of the notation + // `value` an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + constructor(parent, name, value) { + super(parent); + if (name == null) { + throw new Error("Missing DTD notation name. " + this.debugInfo(name)); + } + if (!value.pubID && !value.sysID) { + throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name)); + } + this.name = this.stringify.name(name); + this.type = NodeType.NotationDeclaration; + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options)); + } + + }; + + // DOM level 1 + Object.defineProperty(XMLDTDNotation.prototype, 'publicId', { + get: function() { + return this.pubID; + } + }); + + Object.defineProperty(XMLDTDNotation.prototype, 'systemId', { + get: function() { + return this.sysID; + } + }); + + return XMLDTDNotation; + + }).call(this); + +}).call(this); + +},{"./NodeType":17,"./XMLNode":39}],32:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDeclaration, XMLNode, isObject; + + ({isObject} = require('./Utility')); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents the XML declaration + module.exports = XMLDeclaration = class XMLDeclaration extends XMLNode { + // Initializes a new instance of `XMLDeclaration` + + // `parent` the document object + + // `version` A version number string, e.g. 1.0 + // `encoding` Encoding declaration, e.g. UTF-8 + // `standalone` standalone document declaration: true or false + constructor(parent, version, encoding, standalone) { + super(parent); + // arguments may also be passed as an object + if (isObject(version)) { + ({version, encoding, standalone} = version); + } + if (!version) { + version = '1.0'; + } + this.type = NodeType.Declaration; + this.version = this.stringify.xmlVersion(version); + if (encoding != null) { + this.encoding = this.stringify.xmlEncoding(encoding); + } + if (standalone != null) { + this.standalone = this.stringify.xmlStandalone(standalone); + } + } + + // Converts to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.declaration(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); + +},{"./NodeType":17,"./Utility":18,"./XMLNode":39}],33:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject; + + ({isObject} = require('./Utility')); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + XMLDTDAttList = require('./XMLDTDAttList'); + + XMLDTDEntity = require('./XMLDTDEntity'); + + XMLDTDElement = require('./XMLDTDElement'); + + XMLDTDNotation = require('./XMLDTDNotation'); + + XMLNamedNodeMap = require('./XMLNamedNodeMap'); + + // Represents doctype declaration + module.exports = XMLDocType = (function() { + class XMLDocType extends XMLNode { + // Initializes a new instance of `XMLDocType` + + // `parent` the document object + + // `pubID` public identifier of the external subset + // `sysID` system identifier of the external subset + constructor(parent, pubID, sysID) { + var child, i, len, ref; + super(parent); + this.type = NodeType.DocType; + // set DTD name to the name of the root node + if (parent.children) { + ref = parent.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.Element) { + this.name = child.name; + break; + } + } + } + this.documentObject = parent; + // arguments may also be passed as an object + if (isObject(pubID)) { + ({pubID, sysID} = pubID); + } + if (sysID == null) { + [sysID, pubID] = [pubID, sysID]; + } + if (pubID != null) { + this.pubID = this.stringify.dtdPubID(pubID); + } + if (sysID != null) { + this.sysID = this.stringify.dtdSysID(sysID); + } + } + + // Creates an element type declaration + + // `name` element name + // `value` element content (defaults to #PCDATA) + element(name, value) { + var child; + child = new XMLDTDElement(this, name, value); + this.children.push(child); + return this; + } + + // Creates an attribute declaration + + // `elementName` the name of the element containing this attribute + // `attributeName` attribute name + // `attributeType` type of the attribute (defaults to CDATA) + // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or + // #DEFAULT) (defaults to #IMPLIED) + // `defaultValue` default value of the attribute + // (only used for #FIXED or #DEFAULT) + attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var child; + child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.children.push(child); + return this; + } + + // Creates a general entity declaration + + // `name` the name of the entity + // `value` internal entity value or an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + // `value.nData` notation declaration + entity(name, value) { + var child; + child = new XMLDTDEntity(this, false, name, value); + this.children.push(child); + return this; + } + + // Creates a parameter entity declaration + + // `name` the name of the entity + // `value` internal entity value or an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + pEntity(name, value) { + var child; + child = new XMLDTDEntity(this, true, name, value); + this.children.push(child); + return this; + } + + // Creates a NOTATION declaration + + // `name` the name of the notation + // `value` an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + notation(name, value) { + var child; + child = new XMLDTDNotation(this, name, value); + this.children.push(child); + return this; + } + + // Converts to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.docType(this, this.options.writer.filterOptions(options)); + } + + // Aliases + ele(name, value) { + return this.element(name, value); + } + + att(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); + } + + ent(name, value) { + return this.entity(name, value); + } + + pent(name, value) { + return this.pEntity(name, value); + } + + not(name, value) { + return this.notation(name, value); + } + + up() { + return this.root() || this.documentObject; + } + + isEqualNode(node) { + if (!super.isEqualNode(node)) { + return false; + } + if (node.name !== this.name) { + return false; + } + if (node.publicId !== this.publicId) { + return false; + } + if (node.systemId !== this.systemId) { + return false; + } + return true; + } + + }; + + // DOM level 1 + Object.defineProperty(XMLDocType.prototype, 'entities', { + get: function() { + var child, i, len, nodes, ref; + nodes = {}; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if ((child.type === NodeType.EntityDeclaration) && !child.pe) { + nodes[child.name] = child; + } + } + return new XMLNamedNodeMap(nodes); + } + }); + + Object.defineProperty(XMLDocType.prototype, 'notations', { + get: function() { + var child, i, len, nodes, ref; + nodes = {}; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.NotationDeclaration) { + nodes[child.name] = child; + } + } + return new XMLNamedNodeMap(nodes); + } + }); + + // DOM level 2 + Object.defineProperty(XMLDocType.prototype, 'publicId', { + get: function() { + return this.pubID; + } + }); + + Object.defineProperty(XMLDocType.prototype, 'systemId', { + get: function() { + return this.sysID; + } + }); + + Object.defineProperty(XMLDocType.prototype, 'internalSubset', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + return XMLDocType; + + }).call(this); + +}).call(this); + +},{"./NodeType":17,"./Utility":18,"./XMLDTDAttList":28,"./XMLDTDElement":29,"./XMLDTDEntity":30,"./XMLDTDNotation":31,"./XMLNamedNodeMap":38,"./XMLNode":39}],34:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject; + + ({isPlainObject} = require('./Utility')); + + XMLDOMImplementation = require('./XMLDOMImplementation'); + + XMLDOMConfiguration = require('./XMLDOMConfiguration'); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + XMLStringifier = require('./XMLStringifier'); + + XMLStringWriter = require('./XMLStringWriter'); + + // Represents an XML builder + module.exports = XMLDocument = (function() { + class XMLDocument extends XMLNode { + // Initializes a new instance of `XMLDocument` + + // `options.keepNullNodes` whether nodes with null values will be kept + // or ignored: true or false + // `options.keepNullAttributes` whether attributes with null values will be + // kept or ignored: true or false + // `options.ignoreDecorators` whether decorator strings will be ignored when + // converting JS objects: true or false + // `options.separateArrayItems` whether array items are created as separate + // nodes when passed as an object value: true or false + // `options.noDoubleEncoding` whether existing html entities are encoded: + // true or false + // `options.stringify` a set of functions to use for converting values to + // strings + // `options.writer` the default XML writer to use for converting nodes to + // string. If the default writer is not set, the built-in XMLStringWriter + // will be used instead. + constructor(options) { + super(null); + this.name = "#document"; + this.type = NodeType.Document; + this.documentURI = null; + this.domConfig = new XMLDOMConfiguration(); + options || (options = {}); + if (!options.writer) { + options.writer = new XMLStringWriter(); + } + this.options = options; + this.stringify = new XMLStringifier(options); + } + + // Ends the document and passes it to the given XML writer + + // `writer` is either an XML writer or a plain object to pass to the + // constructor of the default XML writer. The default writer is assigned when + // creating the XML document. Following flags are recognized by the + // built-in XMLStringWriter: + // `writer.pretty` pretty prints the result + // `writer.indent` indentation for pretty print + // `writer.offset` how many indentations to add to every line for pretty print + // `writer.newline` newline sequence for pretty print + end(writer) { + var writerOptions; + writerOptions = {}; + if (!writer) { + writer = this.options.writer; + } else if (isPlainObject(writer)) { + writerOptions = writer; + writer = this.options.writer; + } + return writer.document(this, writer.filterOptions(writerOptions)); + } + + // Converts the XML document to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.document(this, this.options.writer.filterOptions(options)); + } + + // DOM level 1 functions to be implemented later + createElement(tagName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createDocumentFragment() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createTextNode(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createComment(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createCDATASection(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createProcessingInstruction(target, data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createAttribute(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createEntityReference(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByTagName(tagname) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM level 2 functions to be implemented later + importNode(importedNode, deep) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createElementNS(namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createAttributeNS(namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByTagNameNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementById(elementId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM level 3 functions to be implemented later + adoptNode(source) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + normalizeDocument() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + renameNode(node, namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM level 4 functions to be implemented later + getElementsByClassName(classNames) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createEvent(eventInterface) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createRange() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createNodeIterator(root, whatToShow, filter) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createTreeWalker(root, whatToShow, filter) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + }; + + // DOM level 1 + Object.defineProperty(XMLDocument.prototype, 'implementation', { + value: new XMLDOMImplementation() + }); + + Object.defineProperty(XMLDocument.prototype, 'doctype', { + get: function() { + var child, i, len, ref; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.DocType) { + return child; + } + } + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'documentElement', { + get: function() { + return this.rootObject || null; + } + }); + + // DOM level 3 + Object.defineProperty(XMLDocument.prototype, 'inputEncoding', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', { + get: function() { + return false; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].encoding; + } else { + return null; + } + } + }); + + Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].standalone === 'yes'; + } else { + return false; + } + } + }); + + Object.defineProperty(XMLDocument.prototype, 'xmlVersion', { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].version; + } else { + return "1.0"; + } + } + }); + + // DOM level 4 + Object.defineProperty(XMLDocument.prototype, 'URL', { + get: function() { + return this.documentURI; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'origin', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'compatMode', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'characterSet', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'contentType', { + get: function() { + return null; + } + }); + + return XMLDocument; + + }).call(this); + +}).call(this); + +},{"./NodeType":17,"./Utility":18,"./XMLDOMConfiguration":24,"./XMLDOMImplementation":26,"./XMLNode":39,"./XMLStringWriter":44,"./XMLStringifier":45}],35:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject, + hasProp = {}.hasOwnProperty; + + ({isObject, isFunction, isPlainObject, getValue} = require('./Utility')); + + NodeType = require('./NodeType'); + + XMLDocument = require('./XMLDocument'); + + XMLElement = require('./XMLElement'); + + XMLCData = require('./XMLCData'); + + XMLComment = require('./XMLComment'); + + XMLRaw = require('./XMLRaw'); + + XMLText = require('./XMLText'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + XMLDeclaration = require('./XMLDeclaration'); + + XMLDocType = require('./XMLDocType'); + + XMLDTDAttList = require('./XMLDTDAttList'); + + XMLDTDEntity = require('./XMLDTDEntity'); + + XMLDTDElement = require('./XMLDTDElement'); + + XMLDTDNotation = require('./XMLDTDNotation'); + + XMLAttribute = require('./XMLAttribute'); + + XMLStringifier = require('./XMLStringifier'); + + XMLStringWriter = require('./XMLStringWriter'); + + WriterState = require('./WriterState'); + + // Represents an XML builder + module.exports = XMLDocumentCB = class XMLDocumentCB { + // Initializes a new instance of `XMLDocumentCB` + + // `options.keepNullNodes` whether nodes with null values will be kept + // or ignored: true or false + // `options.keepNullAttributes` whether attributes with null values will be + // kept or ignored: true or false + // `options.ignoreDecorators` whether decorator strings will be ignored when + // converting JS objects: true or false + // `options.separateArrayItems` whether array items are created as separate + // nodes when passed as an object value: true or false + // `options.noDoubleEncoding` whether existing html entities are encoded: + // true or false + // `options.stringify` a set of functions to use for converting values to + // strings + // `options.writer` the default XML writer to use for converting nodes to + // string. If the default writer is not set, the built-in XMLStringWriter + // will be used instead. + + // `onData` the function to be called when a new chunk of XML is output. The + // string containing the XML chunk is passed to `onData` as its first + // argument, and the current indentation level as its second argument. + // `onEnd` the function to be called when the XML document is completed with + // `end`. `onEnd` does not receive any arguments. + constructor(options, onData, onEnd) { + var writerOptions; + this.name = "?xml"; + this.type = NodeType.Document; + options || (options = {}); + writerOptions = {}; + if (!options.writer) { + options.writer = new XMLStringWriter(); + } else if (isPlainObject(options.writer)) { + writerOptions = options.writer; + options.writer = new XMLStringWriter(); + } + this.options = options; + this.writer = options.writer; + this.writerOptions = this.writer.filterOptions(writerOptions); + this.stringify = new XMLStringifier(options); + this.onDataCallback = onData || function() {}; + this.onEndCallback = onEnd || function() {}; + this.currentNode = null; + this.currentLevel = -1; + this.openTags = {}; + this.documentStarted = false; + this.documentCompleted = false; + this.root = null; + } + + // Creates a child element node from the given XMLNode + + // `node` the child node + createChildNode(node) { + var att, attName, attributes, child, i, len, ref, ref1; + switch (node.type) { + case NodeType.CData: + this.cdata(node.value); + break; + case NodeType.Comment: + this.comment(node.value); + break; + case NodeType.Element: + attributes = {}; + ref = node.attribs; + for (attName in ref) { + if (!hasProp.call(ref, attName)) continue; + att = ref[attName]; + attributes[attName] = att.value; + } + this.node(node.name, attributes); + break; + case NodeType.Dummy: + this.dummy(); + break; + case NodeType.Raw: + this.raw(node.value); + break; + case NodeType.Text: + this.text(node.value); + break; + case NodeType.ProcessingInstruction: + this.instruction(node.target, node.value); + break; + default: + throw new Error("This XML node type is not supported in a JS object: " + node.constructor.name); + } + ref1 = node.children; + // write child nodes recursively + for (i = 0, len = ref1.length; i < len; i++) { + child = ref1[i]; + this.createChildNode(child); + if (child.type === NodeType.Element) { + this.up(); + } + } + return this; + } + + // Creates a dummy node + + dummy() { + // no-op, just return this + return this; + } + + // Creates a node + + // `name` name of the node + // `attributes` an object containing name/value pairs of attributes + // `text` element text + node(name, attributes, text) { + if (name == null) { + throw new Error("Missing node name."); + } + if (this.root && this.currentLevel === -1) { + throw new Error("Document can only have one root node. " + this.debugInfo(name)); + } + this.openCurrent(); + name = getValue(name); + if (attributes == null) { + attributes = {}; + } + attributes = getValue(attributes); + // swap argument order: text <-> attributes + if (!isObject(attributes)) { + [text, attributes] = [attributes, text]; + } + this.currentNode = new XMLElement(this, name, attributes); + this.currentNode.children = false; + this.currentLevel++; + this.openTags[this.currentLevel] = this.currentNode; + if (text != null) { + this.text(text); + } + return this; + } + + // Creates a child element node or an element type declaration when called + // inside the DTD + + // `name` name of the node + // `attributes` an object containing name/value pairs of attributes + // `text` element text + element(name, attributes, text) { + var child, i, len, oldValidationFlag, ref, root; + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + this.dtdElement(...arguments); + } else { + if (Array.isArray(name) || isObject(name) || isFunction(name)) { + oldValidationFlag = this.options.noValidation; + this.options.noValidation = true; + root = new XMLDocument(this.options).element('TEMP_ROOT'); + root.element(name); + this.options.noValidation = oldValidationFlag; + ref = root.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + this.createChildNode(child); + if (child.type === NodeType.Element) { + this.up(); + } + } + } else { + this.node(name, attributes, text); + } + } + return this; + } + + // Adds or modifies an attribute + + // `name` attribute name + // `value` attribute value + attribute(name, value) { + var attName, attValue; + if (!this.currentNode || this.currentNode.children) { + throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(name)); + } + if (name != null) { + name = getValue(name); + } + if (isObject(name)) { // expand if object + for (attName in name) { + if (!hasProp.call(name, attName)) continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (this.options.keepNullAttributes && (value == null)) { + this.currentNode.attribs[name] = new XMLAttribute(this, name, ""); + } else if (value != null) { + this.currentNode.attribs[name] = new XMLAttribute(this, name, value); + } + } + return this; + } + + // Creates a text node + + // `value` element text + text(value) { + var node; + this.openCurrent(); + node = new XMLText(this, value); + this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates a CDATA node + + // `value` element text without CDATA delimiters + cdata(value) { + var node; + this.openCurrent(); + node = new XMLCData(this, value); + this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates a comment node + + // `value` comment text + comment(value) { + var node; + this.openCurrent(); + node = new XMLComment(this, value); + this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Adds unescaped raw text + + // `value` text + raw(value) { + var node; + this.openCurrent(); + node = new XMLRaw(this, value); + this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Adds a processing instruction + + // `target` instruction target + // `value` instruction value + instruction(target, value) { + var i, insTarget, insValue, len, node; + this.openCurrent(); + if (target != null) { + target = getValue(target); + } + if (value != null) { + value = getValue(value); + } + if (Array.isArray(target)) { // expand if array + for (i = 0, len = target.length; i < len; i++) { + insTarget = target[i]; + this.instruction(insTarget); + } + } else if (isObject(target)) { // expand if object + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + node = new XMLProcessingInstruction(this, target, value); + this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + } + return this; + } + + // Creates the xml declaration + + // `version` A version number string, e.g. 1.0 + // `encoding` Encoding declaration, e.g. UTF-8 + // `standalone` standalone document declaration: true or false + declaration(version, encoding, standalone) { + var node; + this.openCurrent(); + if (this.documentStarted) { + throw new Error("declaration() must be the first node."); + } + node = new XMLDeclaration(this, version, encoding, standalone); + this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates the document type declaration + + // `root` the name of the root node + // `pubID` the public identifier of the external subset + // `sysID` the system identifier of the external subset + doctype(root, pubID, sysID) { + this.openCurrent(); + if (root == null) { + throw new Error("Missing root node name."); + } + if (this.root) { + throw new Error("dtd() must come before the root node."); + } + this.currentNode = new XMLDocType(this, pubID, sysID); + this.currentNode.rootNodeName = root; + this.currentNode.children = false; + this.currentLevel++; + this.openTags[this.currentLevel] = this.currentNode; + return this; + } + + // Creates an element type declaration + + // `name` element name + // `value` element content (defaults to #PCDATA) + dtdElement(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDElement(this, name, value); + this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates an attribute declaration + + // `elementName` the name of the element containing this attribute + // `attributeName` attribute name + // `attributeType` type of the attribute (defaults to CDATA) + // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or + // #DEFAULT) (defaults to #IMPLIED) + // `defaultValue` default value of the attribute + // (only used for #FIXED or #DEFAULT) + attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var node; + this.openCurrent(); + node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates a general entity declaration + + // `name` the name of the entity + // `value` internal entity value or an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + // `value.nData` notation declaration + entity(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDEntity(this, false, name, value); + this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates a parameter entity declaration + + // `name` the name of the entity + // `value` internal entity value or an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + pEntity(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDEntity(this, true, name, value); + this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates a NOTATION declaration + + // `name` the name of the notation + // `value` an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + notation(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDNotation(this, name, value); + this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Gets the parent node + up() { + if (this.currentLevel < 0) { + throw new Error("The document node has no parent."); + } + if (this.currentNode) { + if (this.currentNode.children) { + this.closeNode(this.currentNode); + } else { + this.openNode(this.currentNode); + } + this.currentNode = null; + } else { + this.closeNode(this.openTags[this.currentLevel]); + } + delete this.openTags[this.currentLevel]; + this.currentLevel--; + return this; + } + + // Ends the document + end() { + while (this.currentLevel >= 0) { + this.up(); + } + return this.onEnd(); + } + + // Opens the current parent node + openCurrent() { + if (this.currentNode) { + this.currentNode.children = true; + return this.openNode(this.currentNode); + } + } + + // Writes the opening tag of the current node or the entire node if it has + // no child nodes + openNode(node) { + var att, chunk, name, ref; + if (!node.isOpen) { + if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) { + this.root = node; + } + chunk = ''; + if (node.type === NodeType.Element) { + this.writerOptions.state = WriterState.OpenTag; + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name; + ref = node.attribs; + for (name in ref) { + if (!hasProp.call(ref, name)) continue; + att = ref[name]; + chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel); + } + chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel); + this.writerOptions.state = WriterState.InsideTag; // if node.type is NodeType.DocType + } else { + this.writerOptions.state = WriterState.OpenTag; + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ''; + } + chunk += this.writer.endline(node, this.writerOptions, this.currentLevel); + } + this.onData(chunk, this.currentLevel); + return node.isOpen = true; + } + } + + // Writes the closing tag of the current node + closeNode(node) { + var chunk; + if (!node.isClosed) { + chunk = ''; + this.writerOptions.state = WriterState.CloseTag; + if (node.type === NodeType.Element) { + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '' + this.writer.endline(node, this.writerOptions, this.currentLevel); // if node.type is NodeType.DocType + } else { + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel); + } + this.writerOptions.state = WriterState.None; + this.onData(chunk, this.currentLevel); + return node.isClosed = true; + } + } + + // Called when a new chunk of XML is output + + // `chunk` a string containing the XML chunk + // `level` current indentation level + onData(chunk, level) { + this.documentStarted = true; + return this.onDataCallback(chunk, level + 1); + } + + // Called when the XML document is completed + onEnd() { + this.documentCompleted = true; + return this.onEndCallback(); + } + + // Returns debug string + debugInfo(name) { + if (name == null) { + return ""; + } else { + return "node: <" + name + ">"; + } + } + + // Node aliases + ele() { + return this.element(...arguments); + } + + nod(name, attributes, text) { + return this.node(name, attributes, text); + } + + txt(value) { + return this.text(value); + } + + dat(value) { + return this.cdata(value); + } + + com(value) { + return this.comment(value); + } + + ins(target, value) { + return this.instruction(target, value); + } + + dec(version, encoding, standalone) { + return this.declaration(version, encoding, standalone); + } + + dtd(root, pubID, sysID) { + return this.doctype(root, pubID, sysID); + } + + e(name, attributes, text) { + return this.element(name, attributes, text); + } + + n(name, attributes, text) { + return this.node(name, attributes, text); + } + + t(value) { + return this.text(value); + } + + d(value) { + return this.cdata(value); + } + + c(value) { + return this.comment(value); + } + + r(value) { + return this.raw(value); + } + + i(target, value) { + return this.instruction(target, value); + } + + // Attribute aliases + att() { + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + return this.attList(...arguments); + } else { + return this.attribute(...arguments); + } + } + + a() { + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + return this.attList(...arguments); + } else { + return this.attribute(...arguments); + } + } + + // DTD aliases + // att() and ele() are defined above + ent(name, value) { + return this.entity(name, value); + } + + pent(name, value) { + return this.pEntity(name, value); + } + + not(name, value) { + return this.notation(name, value); + } + + }; + +}).call(this); + +},{"./NodeType":17,"./Utility":18,"./WriterState":19,"./XMLAttribute":20,"./XMLCData":21,"./XMLComment":23,"./XMLDTDAttList":28,"./XMLDTDElement":29,"./XMLDTDEntity":30,"./XMLDTDNotation":31,"./XMLDeclaration":32,"./XMLDocType":33,"./XMLDocument":34,"./XMLElement":37,"./XMLProcessingInstruction":41,"./XMLRaw":42,"./XMLStringWriter":44,"./XMLStringifier":45,"./XMLText":46}],36:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDummy, XMLNode; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents a raw node + module.exports = XMLDummy = class XMLDummy extends XMLNode { + // Initializes a new instance of `XMLDummy` + + // `XMLDummy` is a special node representing a node with + // a null value. Dummy nodes are created while recursively + // building the XML tree. Simply skipping null values doesn't + // work because that would break the recursive chain. + constructor(parent) { + super(parent); + this.type = NodeType.Dummy; + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return ''; + } + + }; + +}).call(this); + +},{"./NodeType":17,"./XMLNode":39}],37:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, + hasProp = {}.hasOwnProperty; + + ({isObject, isFunction, getValue} = require('./Utility')); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + XMLAttribute = require('./XMLAttribute'); + + XMLNamedNodeMap = require('./XMLNamedNodeMap'); + + // Represents an element of the XML document + module.exports = XMLElement = (function() { + class XMLElement extends XMLNode { + // Initializes a new instance of `XMLElement` + + // `parent` the parent node + // `name` element name + // `attributes` an object containing name/value pairs of attributes + constructor(parent, name, attributes) { + var child, j, len, ref; + super(parent); + if (name == null) { + throw new Error("Missing element name. " + this.debugInfo()); + } + this.name = this.stringify.name(name); + this.type = NodeType.Element; + this.attribs = {}; + this.schemaTypeInfo = null; + if (attributes != null) { + this.attribute(attributes); + } + // set properties if this is the root node + if (parent.type === NodeType.Document) { + this.isRoot = true; + this.documentObject = parent; + parent.rootObject = this; + // set dtd name + if (parent.children) { + ref = parent.children; + for (j = 0, len = ref.length; j < len; j++) { + child = ref[j]; + if (child.type === NodeType.DocType) { + child.name = this.name; + break; + } + } + } + } + } + + // Creates and returns a deep clone of `this` + + clone() { + var att, attName, clonedSelf, ref; + clonedSelf = Object.create(this); + // remove document element + if (clonedSelf.isRoot) { + clonedSelf.documentObject = null; + } + // clone attributes + clonedSelf.attribs = {}; + ref = this.attribs; + for (attName in ref) { + if (!hasProp.call(ref, attName)) continue; + att = ref[attName]; + clonedSelf.attribs[attName] = att.clone(); + } + // clone child nodes + clonedSelf.children = []; + this.children.forEach(function(child) { + var clonedChild; + clonedChild = child.clone(); + clonedChild.parent = clonedSelf; + return clonedSelf.children.push(clonedChild); + }); + return clonedSelf; + } + + // Adds or modifies an attribute + + // `name` attribute name + // `value` attribute value + attribute(name, value) { + var attName, attValue; + if (name != null) { + name = getValue(name); + } + if (isObject(name)) { // expand if object + for (attName in name) { + if (!hasProp.call(name, attName)) continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (this.options.keepNullAttributes && (value == null)) { + this.attribs[name] = new XMLAttribute(this, name, ""); + } else if (value != null) { + this.attribs[name] = new XMLAttribute(this, name, value); + } + } + return this; + } + + // Removes an attribute + + // `name` attribute name + removeAttribute(name) { + var attName, j, len; + // Also defined in DOM level 1 + // removeAttribute(name) removes an attribute by name. + if (name == null) { + throw new Error("Missing attribute name. " + this.debugInfo()); + } + name = getValue(name); + if (Array.isArray(name)) { // expand if array + for (j = 0, len = name.length; j < len; j++) { + attName = name[j]; + delete this.attribs[attName]; + } + } else { + delete this.attribs[name]; + } + return this; + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + // `options.allowEmpty` do not self close empty element tags + toString(options) { + return this.options.writer.element(this, this.options.writer.filterOptions(options)); + } + + // Aliases + att(name, value) { + return this.attribute(name, value); + } + + a(name, value) { + return this.attribute(name, value); + } + + // DOM Level 1 + getAttribute(name) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name].value; + } else { + return null; + } + } + + setAttribute(name, value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getAttributeNode(name) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name]; + } else { + return null; + } + } + + setAttributeNode(newAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + removeAttributeNode(oldAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByTagName(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM Level 2 + getAttributeNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + setAttributeNS(namespaceURI, qualifiedName, value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + removeAttributeNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getAttributeNodeNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + setAttributeNodeNS(newAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByTagNameNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + hasAttribute(name) { + return this.attribs.hasOwnProperty(name); + } + + hasAttributeNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM Level 3 + setIdAttribute(name, isId) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name].isId; + } else { + return isId; + } + } + + setIdAttributeNS(namespaceURI, localName, isId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + setIdAttributeNode(idAttr, isId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM Level 4 + getElementsByTagName(tagname) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByTagNameNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByClassName(classNames) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + isEqualNode(node) { + var i, j, ref; + if (!super.isEqualNode(node)) { + return false; + } + if (node.namespaceURI !== this.namespaceURI) { + return false; + } + if (node.prefix !== this.prefix) { + return false; + } + if (node.localName !== this.localName) { + return false; + } + if (node.attribs.length !== this.attribs.length) { + return false; + } + for (i = j = 0, ref = this.attribs.length - 1; (0 <= ref ? j <= ref : j >= ref); i = 0 <= ref ? ++j : --j) { + if (!this.attribs[i].isEqualNode(node.attribs[i])) { + return false; + } + } + return true; + } + + }; + + // DOM level 1 + Object.defineProperty(XMLElement.prototype, 'tagName', { + get: function() { + return this.name; + } + }); + + // DOM level 4 + Object.defineProperty(XMLElement.prototype, 'namespaceURI', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLElement.prototype, 'prefix', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLElement.prototype, 'localName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLElement.prototype, 'id', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + Object.defineProperty(XMLElement.prototype, 'className', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + Object.defineProperty(XMLElement.prototype, 'classList', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + Object.defineProperty(XMLElement.prototype, 'attributes', { + get: function() { + if (!this.attributeMap || !this.attributeMap.nodes) { + this.attributeMap = new XMLNamedNodeMap(this.attribs); + } + return this.attributeMap; + } + }); + + return XMLElement; + + }).call(this); + +}).call(this); + +},{"./NodeType":17,"./Utility":18,"./XMLAttribute":20,"./XMLNamedNodeMap":38,"./XMLNode":39}],38:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + // Represents a map of nodes accessed by a string key + var XMLNamedNodeMap; + + module.exports = XMLNamedNodeMap = (function() { + class XMLNamedNodeMap { + // Initializes a new instance of `XMLNamedNodeMap` + // This is just a wrapper around an ordinary + // JS object. + + // `nodes` the object containing nodes. + constructor(nodes) { + this.nodes = nodes; + } + + // Creates and returns a deep clone of `this` + + clone() { + // this class should not be cloned since it wraps + // around a given object. The calling function should check + // whether the wrapped object is null and supply a new object + // (from the clone). + return this.nodes = null; + } + + // DOM Level 1 + getNamedItem(name) { + return this.nodes[name]; + } + + setNamedItem(node) { + var oldNode; + oldNode = this.nodes[node.nodeName]; + this.nodes[node.nodeName] = node; + return oldNode || null; + } + + removeNamedItem(name) { + var oldNode; + oldNode = this.nodes[name]; + delete this.nodes[name]; + return oldNode || null; + } + + item(index) { + return this.nodes[Object.keys(this.nodes)[index]] || null; + } + + // DOM level 2 functions to be implemented later + getNamedItemNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented."); + } + + setNamedItemNS(node) { + throw new Error("This DOM method is not implemented."); + } + + removeNamedItemNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented."); + } + + }; + + + // DOM level 1 + Object.defineProperty(XMLNamedNodeMap.prototype, 'length', { + get: function() { + return Object.keys(this.nodes).length || 0; + } + }); + + return XMLNamedNodeMap; + + }).call(this); + +}).call(this); + +},{}],39:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, + hasProp = {}.hasOwnProperty, + splice = [].splice; + + ({isObject, isFunction, isEmpty, getValue} = require('./Utility')); + + XMLElement = null; + + XMLCData = null; + + XMLComment = null; + + XMLDeclaration = null; + + XMLDocType = null; + + XMLRaw = null; + + XMLText = null; + + XMLProcessingInstruction = null; + + XMLDummy = null; + + NodeType = null; + + XMLNodeList = null; + + XMLNamedNodeMap = null; + + DocumentPosition = null; + + // Represents a generic XMl element + module.exports = XMLNode = (function() { + class XMLNode { + // Initializes a new instance of `XMLNode` + + // `parent` the parent node + constructor(parent1) { + this.parent = parent1; + if (this.parent) { + this.options = this.parent.options; + this.stringify = this.parent.stringify; + } + this.value = null; + this.children = []; + this.baseURI = null; + // first execution, load dependencies that are otherwise + // circular (so we can't load them at the top) + if (!XMLElement) { + XMLElement = require('./XMLElement'); + XMLCData = require('./XMLCData'); + XMLComment = require('./XMLComment'); + XMLDeclaration = require('./XMLDeclaration'); + XMLDocType = require('./XMLDocType'); + XMLRaw = require('./XMLRaw'); + XMLText = require('./XMLText'); + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + XMLDummy = require('./XMLDummy'); + NodeType = require('./NodeType'); + XMLNodeList = require('./XMLNodeList'); + XMLNamedNodeMap = require('./XMLNamedNodeMap'); + DocumentPosition = require('./DocumentPosition'); + } + } + + + // Sets the parent node of this node and its children recursively + + // `parent` the parent node + setParent(parent) { + var child, j, len, ref1, results; + this.parent = parent; + if (parent) { + this.options = parent.options; + this.stringify = parent.stringify; + } + ref1 = this.children; + results = []; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + results.push(child.setParent(this)); + } + return results; + } + + // Creates a child element node + + // `name` node name or an object describing the XML tree + // `attributes` an object containing name/value pairs of attributes + // `text` element text + element(name, attributes, text) { + var childNode, item, j, k, key, lastChild, len, len1, val; + lastChild = null; + if (attributes === null && (text == null)) { + [attributes, text] = [{}, null]; + } + if (attributes == null) { + attributes = {}; + } + attributes = getValue(attributes); + // swap argument order: text <-> attributes + if (!isObject(attributes)) { + [text, attributes] = [attributes, text]; + } + if (name != null) { + name = getValue(name); + } + // expand if array + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + item = name[j]; + lastChild = this.element(item); + } + // evaluate if function + } else if (isFunction(name)) { + lastChild = this.element(name.apply()); + // expand if object + } else if (isObject(name)) { + for (key in name) { + if (!hasProp.call(name, key)) continue; + val = name[key]; + if (isFunction(val)) { + // evaluate if function + val = val.apply(); + } + // assign attributes + if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { + lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); + // skip empty arrays + } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) { + lastChild = this.dummy(); + // empty objects produce one node + } else if (isObject(val) && isEmpty(val)) { + lastChild = this.element(key); + // skip null and undefined nodes + } else if (!this.options.keepNullNodes && (val == null)) { + lastChild = this.dummy(); + + // expand list by creating child nodes + } else if (!this.options.separateArrayItems && Array.isArray(val)) { + for (k = 0, len1 = val.length; k < len1; k++) { + item = val[k]; + childNode = {}; + childNode[key] = item; + lastChild = this.element(childNode); + } + + // expand child nodes under parent + } else if (isObject(val)) { + // if the key is #text expand child nodes under this node to support mixed content + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.element(val); + } else { + lastChild = this.element(key); + lastChild.element(val); + } + } else { + + // text node + lastChild = this.element(key, val); + } + } + // skip null nodes + } else if (!this.options.keepNullNodes && text === null) { + lastChild = this.dummy(); + } else { + // text node + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.text(text); + // cdata node + } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { + lastChild = this.cdata(text); + // comment node + } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { + lastChild = this.comment(text); + // raw text node + } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { + lastChild = this.raw(text); + // processing instruction + } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) { + lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text); + } else { + // element node + lastChild = this.node(name, attributes, text); + } + } + if (lastChild == null) { + throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo()); + } + return lastChild; + } + + // Creates a child element node before the current node + + // `name` node name or an object describing the XML tree + // `attributes` an object containing name/value pairs of attributes + // `text` element text + insertBefore(name, attributes, text) { + var child, i, newChild, refChild, removed; + // DOM level 1 + // insertBefore(newChild, refChild) inserts the child node newChild before refChild + if (name != null ? name.type : void 0) { + newChild = name; + refChild = attributes; + newChild.setParent(this); + if (refChild) { + // temporarily remove children starting *with* refChild + i = children.indexOf(refChild); + removed = children.splice(i); + + // add the new child + children.push(newChild); + + // add back removed children after new child + Array.prototype.push.apply(children, removed); + } else { + children.push(newChild); + } + return newChild; + } else { + if (this.isRoot) { + throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); + } + + // temporarily remove children starting *with* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + + // add the new child + child = this.parent.element(name, attributes, text); + + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return child; + } + } + + // Creates a child element node after the current node + + // `name` node name or an object describing the XML tree + // `attributes` an object containing name/value pairs of attributes + // `text` element text + insertAfter(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); + } + + // temporarily remove children starting *after* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + + // add the new child + child = this.parent.element(name, attributes, text); + + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return child; + } + + // Deletes a child element node + + remove() { + var i, ref1; + if (this.isRoot) { + throw new Error("Cannot remove the root element. " + this.debugInfo()); + } + i = this.parent.children.indexOf(this); + splice.apply(this.parent.children, [i, i - i + 1].concat(ref1 = [])), ref1; + return this.parent; + } + + // Creates a node + + // `name` name of the node + // `attributes` an object containing name/value pairs of attributes + // `text` element text + node(name, attributes, text) { + var child; + if (name != null) { + name = getValue(name); + } + attributes || (attributes = {}); + attributes = getValue(attributes); + // swap argument order: text <-> attributes + if (!isObject(attributes)) { + [text, attributes] = [attributes, text]; + } + child = new XMLElement(this, name, attributes); + if (text != null) { + child.text(text); + } + this.children.push(child); + return child; + } + + // Creates a text node + + // `value` element text + text(value) { + var child; + if (isObject(value)) { + this.element(value); + } + child = new XMLText(this, value); + this.children.push(child); + return this; + } + + // Creates a CDATA node + + // `value` element text without CDATA delimiters + cdata(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + } + + // Creates a comment node + + // `value` comment text + comment(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + } + + // Creates a comment node before the current node + + // `value` comment text + commentBefore(value) { + var child, i, removed; + // temporarily remove children starting *with* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + // add the new child + child = this.parent.comment(value); + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return this; + } + + // Creates a comment node after the current node + + // `value` comment text + commentAfter(value) { + var child, i, removed; + // temporarily remove children starting *after* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + // add the new child + child = this.parent.comment(value); + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return this; + } + + // Adds unescaped raw text + + // `value` text + raw(value) { + var child; + child = new XMLRaw(this, value); + this.children.push(child); + return this; + } + + // Adds a dummy node + dummy() { + var child; + child = new XMLDummy(this); + // Normally when a new node is created it is added to the child node collection. + // However, dummy nodes are never added to the XML tree. They are created while + // converting JS objects to XML nodes in order not to break the recursive function + // chain. They can be thought of as invisible nodes. They can be traversed through + // by using prev(), next(), up(), etc. functions but they do not exists in the tree. + + // @children.push child + return child; + } + + // Adds a processing instruction + + // `target` instruction target + // `value` instruction value + instruction(target, value) { + var insTarget, insValue, instruction, j, len; + if (target != null) { + target = getValue(target); + } + if (value != null) { + value = getValue(value); + } + if (Array.isArray(target)) { // expand if array + for (j = 0, len = target.length; j < len; j++) { + insTarget = target[j]; + this.instruction(insTarget); + } + } else if (isObject(target)) { // expand if object + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + instruction = new XMLProcessingInstruction(this, target, value); + this.children.push(instruction); + } + return this; + } + + // Creates a processing instruction node before the current node + + // `target` instruction target + // `value` instruction value + instructionBefore(target, value) { + var child, i, removed; + // temporarily remove children starting *with* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + // add the new child + child = this.parent.instruction(target, value); + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return this; + } + + // Creates a processing instruction node after the current node + + // `target` instruction target + // `value` instruction value + instructionAfter(target, value) { + var child, i, removed; + // temporarily remove children starting *after* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + // add the new child + child = this.parent.instruction(target, value); + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return this; + } + + // Creates the xml declaration + + // `version` A version number string, e.g. 1.0 + // `encoding` Encoding declaration, e.g. UTF-8 + // `standalone` standalone document declaration: true or false + declaration(version, encoding, standalone) { + var doc, xmldec; + doc = this.document(); + xmldec = new XMLDeclaration(doc, version, encoding, standalone); + // Replace XML declaration if exists, otherwise insert at top + if (doc.children.length === 0) { + doc.children.unshift(xmldec); + } else if (doc.children[0].type === NodeType.Declaration) { + doc.children[0] = xmldec; + } else { + doc.children.unshift(xmldec); + } + return doc.root() || doc; + } + + // Creates the document type declaration + + // `pubID` the public identifier of the external subset + // `sysID` the system identifier of the external subset + dtd(pubID, sysID) { + var child, doc, doctype, i, j, k, len, len1, ref1, ref2; + doc = this.document(); + doctype = new XMLDocType(doc, pubID, sysID); + ref1 = doc.children; + // Replace DTD if exists + for (i = j = 0, len = ref1.length; j < len; i = ++j) { + child = ref1[i]; + if (child.type === NodeType.DocType) { + doc.children[i] = doctype; + return doctype; + } + } + ref2 = doc.children; + // insert before root node if the root node exists + for (i = k = 0, len1 = ref2.length; k < len1; i = ++k) { + child = ref2[i]; + if (child.isRoot) { + doc.children.splice(i, 0, doctype); + return doctype; + } + } + // otherwise append to end + doc.children.push(doctype); + return doctype; + } + + // Gets the parent node + up() { + if (this.isRoot) { + throw new Error("The root node has no parent. Use doc() if you need to get the document object."); + } + return this.parent; + } + + // Gets the root node + root() { + var node; + node = this; + while (node) { + if (node.type === NodeType.Document) { + return node.rootObject; + } else if (node.isRoot) { + return node; + } else { + node = node.parent; + } + } + } + + // Gets the node representing the XML document + document() { + var node; + node = this; + while (node) { + if (node.type === NodeType.Document) { + return node; + } else { + node = node.parent; + } + } + } + + // Ends the document and converts string + end(options) { + return this.document().end(options); + } + + // Gets the previous node + prev() { + var i; + i = this.parent.children.indexOf(this); + if (i < 1) { + throw new Error("Already at the first node. " + this.debugInfo()); + } + return this.parent.children[i - 1]; + } + + // Gets the next node + next() { + var i; + i = this.parent.children.indexOf(this); + if (i === -1 || i === this.parent.children.length - 1) { + throw new Error("Already at the last node. " + this.debugInfo()); + } + return this.parent.children[i + 1]; + } + + // Imports cloned root from another XML document + + // `doc` the XML document to insert nodes from + importDocument(doc) { + var child, clonedRoot, j, len, ref1; + clonedRoot = doc.root().clone(); + clonedRoot.parent = this; + clonedRoot.isRoot = false; + this.children.push(clonedRoot); + // set properties if imported element becomes the root node + if (this.type === NodeType.Document) { + clonedRoot.isRoot = true; + clonedRoot.documentObject = this; + this.rootObject = clonedRoot; + // set dtd name + if (this.children) { + ref1 = this.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + if (child.type === NodeType.DocType) { + child.name = clonedRoot.name; + break; + } + } + } + } + return this; + } + + + // Returns debug string for this node + debugInfo(name) { + var ref1, ref2; + name = name || this.name; + if ((name == null) && !((ref1 = this.parent) != null ? ref1.name : void 0)) { + return ""; + } else if (name == null) { + return "parent: <" + this.parent.name + ">"; + } else if (!((ref2 = this.parent) != null ? ref2.name : void 0)) { + return "node: <" + name + ">"; + } else { + return "node: <" + name + ">, parent: <" + this.parent.name + ">"; + } + } + + // Aliases + ele(name, attributes, text) { + return this.element(name, attributes, text); + } + + nod(name, attributes, text) { + return this.node(name, attributes, text); + } + + txt(value) { + return this.text(value); + } + + dat(value) { + return this.cdata(value); + } + + com(value) { + return this.comment(value); + } + + ins(target, value) { + return this.instruction(target, value); + } + + doc() { + return this.document(); + } + + dec(version, encoding, standalone) { + return this.declaration(version, encoding, standalone); + } + + e(name, attributes, text) { + return this.element(name, attributes, text); + } + + n(name, attributes, text) { + return this.node(name, attributes, text); + } + + t(value) { + return this.text(value); + } + + d(value) { + return this.cdata(value); + } + + c(value) { + return this.comment(value); + } + + r(value) { + return this.raw(value); + } + + i(target, value) { + return this.instruction(target, value); + } + + u() { + return this.up(); + } + + // can be deprecated in a future release + importXMLBuilder(doc) { + return this.importDocument(doc); + } + + // Adds or modifies an attribute. + + // `name` attribute name + // `value` attribute value + attribute(name, value) { + throw new Error("attribute() applies to element nodes only."); + } + + att(name, value) { + return this.attribute(name, value); + } + + a(name, value) { + return this.attribute(name, value); + } + + // Removes an attribute + + // `name` attribute name + removeAttribute(name) { + throw new Error("attribute() applies to element nodes only."); + } + + // DOM level 1 functions to be implemented later + replaceChild(newChild, oldChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + removeChild(oldChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + appendChild(newChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + hasChildNodes() { + return this.children.length !== 0; + } + + cloneNode(deep) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + normalize() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM level 2 + isSupported(feature, version) { + return true; + } + + hasAttributes() { + return this.attribs.length !== 0; + } + + // DOM level 3 functions to be implemented later + compareDocumentPosition(other) { + var ref, res; + ref = this; + if (ref === other) { + return 0; + } else if (this.document() !== other.document()) { + res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific; + if (Math.random() < 0.5) { + res |= DocumentPosition.Preceding; + } else { + res |= DocumentPosition.Following; + } + return res; + } else if (ref.isAncestor(other)) { + return DocumentPosition.Contains | DocumentPosition.Preceding; + } else if (ref.isDescendant(other)) { + return DocumentPosition.Contains | DocumentPosition.Following; + } else if (ref.isPreceding(other)) { + return DocumentPosition.Preceding; + } else { + return DocumentPosition.Following; + } + } + + isSameNode(other) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + lookupPrefix(namespaceURI) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + isDefaultNamespace(namespaceURI) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + lookupNamespaceURI(prefix) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + isEqualNode(node) { + var i, j, ref1; + if (node.nodeType !== this.nodeType) { + return false; + } + if (node.children.length !== this.children.length) { + return false; + } + for (i = j = 0, ref1 = this.children.length - 1; (0 <= ref1 ? j <= ref1 : j >= ref1); i = 0 <= ref1 ? ++j : --j) { + if (!this.children[i].isEqualNode(node.children[i])) { + return false; + } + } + return true; + } + + getFeature(feature, version) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + setUserData(key, data, handler) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getUserData(key) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // Returns true if other is an inclusive descendant of node, + // and false otherwise. + contains(other) { + if (!other) { + return false; + } + return other === this || this.isDescendant(other); + } + + // An object A is called a descendant of an object B, if either A is + // a child of B or A is a child of an object C that is a descendant of B. + isDescendant(node) { + var child, isDescendantChild, j, len, ref1; + ref1 = this.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + if (node === child) { + return true; + } + isDescendantChild = child.isDescendant(node); + if (isDescendantChild) { + return true; + } + } + return false; + } + + // An object A is called an ancestor of an object B if and only if + // B is a descendant of A. + isAncestor(node) { + return node.isDescendant(this); + } + + // An object A is preceding an object B if A and B are in the + // same tree and A comes before B in tree order. + isPreceding(node) { + var nodePos, thisPos; + nodePos = this.treePosition(node); + thisPos = this.treePosition(this); + if (nodePos === -1 || thisPos === -1) { + return false; + } else { + return nodePos < thisPos; + } + } + + // An object A is folllowing an object B if A and B are in the + // same tree and A comes after B in tree order. + isFollowing(node) { + var nodePos, thisPos; + nodePos = this.treePosition(node); + thisPos = this.treePosition(this); + if (nodePos === -1 || thisPos === -1) { + return false; + } else { + return nodePos > thisPos; + } + } + + // Returns the preorder position of the given node in the tree, or -1 + // if the node is not in the tree. + treePosition(node) { + var found, pos; + pos = 0; + found = false; + this.foreachTreeNode(this.document(), function(childNode) { + pos++; + if (!found && childNode === node) { + return found = true; + } + }); + if (found) { + return pos; + } else { + return -1; + } + } + + + // Depth-first preorder traversal through the XML tree + foreachTreeNode(node, func) { + var child, j, len, ref1, res; + node || (node = this.document()); + ref1 = node.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + if (res = func(child)) { + return res; + } else { + res = this.foreachTreeNode(child, func); + if (res) { + return res; + } + } + } + } + + }; + + // DOM level 1 + Object.defineProperty(XMLNode.prototype, 'nodeName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLNode.prototype, 'nodeType', { + get: function() { + return this.type; + } + }); + + Object.defineProperty(XMLNode.prototype, 'nodeValue', { + get: function() { + return this.value; + } + }); + + Object.defineProperty(XMLNode.prototype, 'parentNode', { + get: function() { + return this.parent; + } + }); + + Object.defineProperty(XMLNode.prototype, 'childNodes', { + get: function() { + if (!this.childNodeList || !this.childNodeList.nodes) { + this.childNodeList = new XMLNodeList(this.children); + } + return this.childNodeList; + } + }); + + Object.defineProperty(XMLNode.prototype, 'firstChild', { + get: function() { + return this.children[0] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'lastChild', { + get: function() { + return this.children[this.children.length - 1] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'previousSibling', { + get: function() { + var i; + i = this.parent.children.indexOf(this); + return this.parent.children[i - 1] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'nextSibling', { + get: function() { + var i; + i = this.parent.children.indexOf(this); + return this.parent.children[i + 1] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'ownerDocument', { + get: function() { + return this.document() || null; + } + }); + + // DOM level 3 + Object.defineProperty(XMLNode.prototype, 'textContent', { + get: function() { + var child, j, len, ref1, str; + if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) { + str = ''; + ref1 = this.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + if (child.textContent) { + str += child.textContent; + } + } + return str; + } else { + return null; + } + }, + set: function(value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + return XMLNode; + + }).call(this); + +}).call(this); + +},{"./DocumentPosition":16,"./NodeType":17,"./Utility":18,"./XMLCData":21,"./XMLComment":23,"./XMLDeclaration":32,"./XMLDocType":33,"./XMLDummy":36,"./XMLElement":37,"./XMLNamedNodeMap":38,"./XMLNodeList":40,"./XMLProcessingInstruction":41,"./XMLRaw":42,"./XMLText":46}],40:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + // Represents a list of nodes + var XMLNodeList; + + module.exports = XMLNodeList = (function() { + class XMLNodeList { + // Initializes a new instance of `XMLNodeList` + // This is just a wrapper around an ordinary + // JS array. + + // `nodes` the array containing nodes. + constructor(nodes) { + this.nodes = nodes; + } + + // Creates and returns a deep clone of `this` + + clone() { + // this class should not be cloned since it wraps + // around a given array. The calling function should check + // whether the wrapped array is null and supply a new array + // (from the clone). + return this.nodes = null; + } + + // DOM Level 1 + item(index) { + return this.nodes[index] || null; + } + + }; + + // DOM level 1 + Object.defineProperty(XMLNodeList.prototype, 'length', { + get: function() { + return this.nodes.length || 0; + } + }); + + return XMLNodeList; + + }).call(this); + +}).call(this); + +},{}],41:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLCharacterData, XMLProcessingInstruction; + + NodeType = require('./NodeType'); + + XMLCharacterData = require('./XMLCharacterData'); + + // Represents a processing instruction + module.exports = XMLProcessingInstruction = class XMLProcessingInstruction extends XMLCharacterData { + // Initializes a new instance of `XMLProcessingInstruction` + + // `parent` the parent node + // `target` instruction target + // `value` instruction value + constructor(parent, target, value) { + super(parent); + if (target == null) { + throw new Error("Missing instruction target. " + this.debugInfo()); + } + this.type = NodeType.ProcessingInstruction; + this.target = this.stringify.insTarget(target); + this.name = this.target; + if (value) { + this.value = this.stringify.insValue(value); + } + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options)); + } + + isEqualNode(node) { + if (!super.isEqualNode(node)) { + return false; + } + if (node.target !== this.target) { + return false; + } + return true; + } + + }; + +}).call(this); + +},{"./NodeType":17,"./XMLCharacterData":22}],42:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLNode, XMLRaw; + + NodeType = require('./NodeType'); + + XMLNode = require('./XMLNode'); + + // Represents a raw node + module.exports = XMLRaw = class XMLRaw extends XMLNode { + // Initializes a new instance of `XMLRaw` + + // `text` raw text + constructor(parent, text) { + super(parent); + if (text == null) { + throw new Error("Missing raw text. " + this.debugInfo()); + } + this.type = NodeType.Raw; + this.value = this.stringify.raw(text); + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.raw(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); + +},{"./NodeType":17,"./XMLNode":39}],43:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, WriterState, XMLStreamWriter, XMLWriterBase, + hasProp = {}.hasOwnProperty; + + NodeType = require('./NodeType'); + + XMLWriterBase = require('./XMLWriterBase'); + + WriterState = require('./WriterState'); + + // Prints XML nodes to a stream + module.exports = XMLStreamWriter = class XMLStreamWriter extends XMLWriterBase { + // Initializes a new instance of `XMLStreamWriter` + + // `stream` output stream + // `options.pretty` pretty prints the result + // `options.indent` indentation string + // `options.newline` newline sequence + // `options.offset` a fixed number of indentations to add to every line + // `options.allowEmpty` do not self close empty element tags + // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF + // `options.spaceBeforeSlash` add a space before the closing slash of empty elements + constructor(stream, options) { + super(options); + this.stream = stream; + } + + endline(node, options, level) { + if (node.isLastRootNode && options.state === WriterState.CloseTag) { + return ''; + } else { + return super.endline(node, options, level); + } + } + + document(doc, options) { + var child, i, j, k, len1, len2, ref, ref1, results; + ref = doc.children; + // set a flag so that we don't insert a newline after the last root level node + for (i = j = 0, len1 = ref.length; j < len1; i = ++j) { + child = ref[i]; + child.isLastRootNode = i === doc.children.length - 1; + } + options = this.filterOptions(options); + ref1 = doc.children; + results = []; + for (k = 0, len2 = ref1.length; k < len2; k++) { + child = ref1[k]; + results.push(this.writeChildNode(child, options, 0)); + } + return results; + } + + cdata(node, options, level) { + return this.stream.write(super.cdata(node, options, level)); + } + + comment(node, options, level) { + return this.stream.write(super.comment(node, options, level)); + } + + declaration(node, options, level) { + return this.stream.write(super.declaration(node, options, level)); + } + + docType(node, options, level) { + var child, j, len1, ref; + level || (level = 0); + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + this.stream.write(this.indent(node, options, level)); + this.stream.write(' 0) { + this.stream.write(' ['); + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.InsideTag; + ref = node.children; + for (j = 0, len1 = ref.length; j < len1; j++) { + child = ref[j]; + this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + this.stream.write(']'); + } + // close tag + options.state = WriterState.CloseTag; + this.stream.write(options.spaceBeforeSlash + '>'); + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.None; + return this.closeNode(node, options, level); + } + + element(node, options, level) { + var att, attLen, child, childNodeCount, firstChildNode, j, len, len1, name, prettySuppressed, r, ratt, ref, ref1, ref2, rline; + level || (level = 0); + // open tag + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '<' + node.name; + // attributes + if (options.pretty && options.width > 0) { + len = r.length; + ref = node.attribs; + for (name in ref) { + if (!hasProp.call(ref, name)) continue; + att = ref[name]; + ratt = this.attribute(att, options, level); + attLen = ratt.length; + if (len + attLen > options.width) { + rline = this.indent(node, options, level + 1) + ratt; + r += this.endline(node, options, level) + rline; + len = rline.length; + } else { + rline = ' ' + ratt; + r += rline; + len += rline.length; + } + } + } else { + ref1 = node.attribs; + for (name in ref1) { + if (!hasProp.call(ref1, name)) continue; + att = ref1[name]; + r += this.attribute(att, options, level); + } + } + this.stream.write(r); + childNodeCount = node.children.length; + firstChildNode = childNodeCount === 0 ? null : node.children[0]; + if (childNodeCount === 0 || node.children.every(function(e) { + return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === ''; + })) { + // empty element + if (options.allowEmpty) { + this.stream.write('>'); + options.state = WriterState.CloseTag; + this.stream.write(''); + } else { + options.state = WriterState.CloseTag; + this.stream.write(options.spaceBeforeSlash + '/>'); + } + } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) { + // do not indent text-only nodes + this.stream.write('>'); + options.state = WriterState.InsideTag; + options.suppressPrettyCount++; + prettySuppressed = true; + this.writeChildNode(firstChildNode, options, level + 1); + options.suppressPrettyCount--; + prettySuppressed = false; + options.state = WriterState.CloseTag; + this.stream.write(''); + } else { + this.stream.write('>' + this.endline(node, options, level)); + options.state = WriterState.InsideTag; + ref2 = node.children; + // inner tags + for (j = 0, len1 = ref2.length; j < len1; j++) { + child = ref2[j]; + this.writeChildNode(child, options, level + 1); + } + // close tag + options.state = WriterState.CloseTag; + this.stream.write(this.indent(node, options, level) + ''); + } + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.None; + return this.closeNode(node, options, level); + } + + processingInstruction(node, options, level) { + return this.stream.write(super.processingInstruction(node, options, level)); + } + + raw(node, options, level) { + return this.stream.write(super.raw(node, options, level)); + } + + text(node, options, level) { + return this.stream.write(super.text(node, options, level)); + } + + dtdAttList(node, options, level) { + return this.stream.write(super.dtdAttList(node, options, level)); + } + + dtdElement(node, options, level) { + return this.stream.write(super.dtdElement(node, options, level)); + } + + dtdEntity(node, options, level) { + return this.stream.write(super.dtdEntity(node, options, level)); + } + + dtdNotation(node, options, level) { + return this.stream.write(super.dtdNotation(node, options, level)); + } + + }; + +}).call(this); + +},{"./NodeType":17,"./WriterState":19,"./XMLWriterBase":47}],44:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var XMLStringWriter, XMLWriterBase; + + XMLWriterBase = require('./XMLWriterBase'); + + // Prints XML nodes as plain text + module.exports = XMLStringWriter = class XMLStringWriter extends XMLWriterBase { + // Initializes a new instance of `XMLStringWriter` + + // `options.pretty` pretty prints the result + // `options.indent` indentation string + // `options.newline` newline sequence + // `options.offset` a fixed number of indentations to add to every line + // `options.allowEmpty` do not self close empty element tags + // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF + // `options.spaceBeforeSlash` add a space before the closing slash of empty elements + constructor(options) { + super(options); + } + + document(doc, options) { + var child, i, len, r, ref; + options = this.filterOptions(options); + r = ''; + ref = doc.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + r += this.writeChildNode(child, options, 0); + } + // remove trailing newline + if (options.pretty && r.slice(-options.newline.length) === options.newline) { + r = r.slice(0, -options.newline.length); + } + return r; + } + + }; + +}).call(this); + +},{"./XMLWriterBase":47}],45:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + // Converts values to strings + var XMLStringifier, + hasProp = {}.hasOwnProperty; + + module.exports = XMLStringifier = (function() { + class XMLStringifier { + // Initializes a new instance of `XMLStringifier` + + // `options.version` The version number string of the XML spec to validate against, e.g. 1.0 + // `options.noDoubleEncoding` whether existing html entities are encoded: true or false + // `options.stringify` a set of functions to use for converting values to strings + // `options.noValidation` whether values will be validated and escaped or returned as is + // `options.invalidCharReplacement` a character to replace invalid characters and disable character validation + constructor(options) { + var key, ref, value; + // Checks whether the given string contains legal characters + // Fails with an exception on error + + // `str` the string to check + this.assertLegalChar = this.assertLegalChar.bind(this); + // Checks whether the given string contains legal characters for a name + // Fails with an exception on error + + // `str` the string to check + this.assertLegalName = this.assertLegalName.bind(this); + options || (options = {}); + this.options = options; + if (!this.options.version) { + this.options.version = '1.0'; + } + ref = options.stringify || {}; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + value = ref[key]; + this[key] = value; + } + } + + // Defaults + name(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalName('' + val || ''); + } + + text(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar(this.textEscape('' + val || '')); + } + + cdata(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + val = val.replace(']]>', ']]]]>'); + return this.assertLegalChar(val); + } + + comment(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (val.match(/--/)) { + throw new Error("Comment text cannot contain double-hypen: " + val); + } + return this.assertLegalChar(val); + } + + raw(val) { + if (this.options.noValidation) { + return val; + } + return '' + val || ''; + } + + attValue(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar(this.attEscape(val = '' + val || '')); + } + + insTarget(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + insValue(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (val.match(/\?>/)) { + throw new Error("Invalid processing instruction value: " + val); + } + return this.assertLegalChar(val); + } + + xmlVersion(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (!val.match(/1\.[0-9]+/)) { + throw new Error("Invalid version number: " + val); + } + return val; + } + + xmlEncoding(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) { + throw new Error("Invalid encoding: " + val); + } + return this.assertLegalChar(val); + } + + xmlStandalone(val) { + if (this.options.noValidation) { + return val; + } + if (val) { + return "yes"; + } else { + return "no"; + } + } + + dtdPubID(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdSysID(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdElementValue(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdAttType(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdAttDefault(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdEntityValue(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdNData(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + assertLegalChar(str) { + var regex, res; + if (this.options.noValidation) { + return str; + } + if (this.options.version === '1.0') { + // Valid characters from https://www.w3.org/TR/xml/#charsets + // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. + // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] + // This ES5 compatible Regexp has been generated using the "regenerate" NPM module: + // let xml_10_InvalidChars = regenerate() + // .addRange(0x0000, 0x0008) + // .add(0x000B, 0x000C) + // .addRange(0x000E, 0x001F) + // .addRange(0xD800, 0xDFFF) + // .addRange(0xFFFE, 0xFFFF) + regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g; + if (this.options.invalidCharReplacement !== void 0) { + str = str.replace(regex, this.options.invalidCharReplacement); + } else if (res = str.match(regex)) { + throw new Error(`Invalid character in string: ${str} at index ${res.index}`); + } + } else if (this.options.version === '1.1') { + // Valid characters from https://www.w3.org/TR/xml11/#charsets + // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. + // [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] + // This ES5 compatible Regexp has been generated using the "regenerate" NPM module: + // let xml_11_InvalidChars = regenerate() + // .add(0x0000) + // .addRange(0xD800, 0xDFFF) + // .addRange(0xFFFE, 0xFFFF) + regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g; + if (this.options.invalidCharReplacement !== void 0) { + str = str.replace(regex, this.options.invalidCharReplacement); + } else if (res = str.match(regex)) { + throw new Error(`Invalid character in string: ${str} at index ${res.index}`); + } + } + return str; + } + + assertLegalName(str) { + var regex; + if (this.options.noValidation) { + return str; + } + str = this.assertLegalChar(str); + regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/; + if (!str.match(regex)) { + throw new Error(`Invalid character in name: ${str}`); + } + return str; + } + + // Escapes special characters in text + + // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping + + // `str` the string to escape + textEscape(str) { + var ampregex; + if (this.options.noValidation) { + return str; + } + ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g; + return str.replace(ampregex, '&').replace(//g, '>').replace(/\r/g, ' '); + } + + // Escapes special characters in attribute values + + // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping + + // `str` the string to escape + attEscape(str) { + var ampregex; + if (this.options.noValidation) { + return str; + } + ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g; + return str.replace(ampregex, '&').replace(/ 0) { + return new Array(indentLevel).join(options.indent); + } + } + return ''; + } + + // Returns the newline string + + // `node` current node + // `options` writer options + // `level` current indentation level + endline(node, options, level) { + if (!options.pretty || options.suppressPrettyCount) { + return ''; + } else { + return options.newline; + } + } + + attribute(att, options, level) { + var r; + this.openAttribute(att, options, level); + if (options.pretty && options.width > 0) { + r = att.name + '="' + att.value + '"'; + } else { + r = ' ' + att.name + '="' + att.value + '"'; + } + this.closeAttribute(att, options, level); + return r; + } + + cdata(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + comment(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + declaration(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + ''; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + docType(node, options, level) { + var child, i, len1, r, ref; + level || (level = 0); + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + r += ' 0) { + r += ' ['; + r += this.endline(node, options, level); + options.state = WriterState.InsideTag; + ref = node.children; + for (i = 0, len1 = ref.length; i < len1; i++) { + child = ref[i]; + r += this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + r += ']'; + } + // close tag + options.state = WriterState.CloseTag; + r += options.spaceBeforeSlash + '>'; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + element(node, options, level) { + var att, attLen, child, childNodeCount, firstChildNode, i, j, len, len1, len2, name, prettySuppressed, r, ratt, ref, ref1, ref2, ref3, rline; + level || (level = 0); + prettySuppressed = false; + // open tag + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '<' + node.name; + // attributes + if (options.pretty && options.width > 0) { + len = r.length; + ref = node.attribs; + for (name in ref) { + if (!hasProp.call(ref, name)) continue; + att = ref[name]; + ratt = this.attribute(att, options, level); + attLen = ratt.length; + if (len + attLen > options.width) { + rline = this.indent(node, options, level + 1) + ratt; + r += this.endline(node, options, level) + rline; + len = rline.length; + } else { + rline = ' ' + ratt; + r += rline; + len += rline.length; + } + } + } else { + ref1 = node.attribs; + for (name in ref1) { + if (!hasProp.call(ref1, name)) continue; + att = ref1[name]; + r += this.attribute(att, options, level); + } + } + childNodeCount = node.children.length; + firstChildNode = childNodeCount === 0 ? null : node.children[0]; + if (childNodeCount === 0 || node.children.every(function(e) { + return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === ''; + })) { + // empty element + if (options.allowEmpty) { + r += '>'; + options.state = WriterState.CloseTag; + r += '' + this.endline(node, options, level); + } else { + options.state = WriterState.CloseTag; + r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level); + } + } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) { + // do not indent text-only nodes + r += '>'; + options.state = WriterState.InsideTag; + options.suppressPrettyCount++; + prettySuppressed = true; + r += this.writeChildNode(firstChildNode, options, level + 1); + options.suppressPrettyCount--; + prettySuppressed = false; + options.state = WriterState.CloseTag; + r += '' + this.endline(node, options, level); + } else { + // if ANY are a text node, then suppress pretty now + if (options.dontPrettyTextNodes) { + ref2 = node.children; + for (i = 0, len1 = ref2.length; i < len1; i++) { + child = ref2[i]; + if ((child.type === NodeType.Text || child.type === NodeType.Raw || child.type === NodeType.CData) && (child.value != null)) { + options.suppressPrettyCount++; + prettySuppressed = true; + break; + } + } + } + // close the opening tag, after dealing with newline + r += '>' + this.endline(node, options, level); + options.state = WriterState.InsideTag; + ref3 = node.children; + // inner tags + for (j = 0, len2 = ref3.length; j < len2; j++) { + child = ref3[j]; + r += this.writeChildNode(child, options, level + 1); + } + // close tag + options.state = WriterState.CloseTag; + r += this.indent(node, options, level) + ''; + if (prettySuppressed) { + options.suppressPrettyCount--; + } + r += this.endline(node, options, level); + options.state = WriterState.None; + } + this.closeNode(node, options, level); + return r; + } + + writeChildNode(node, options, level) { + switch (node.type) { + case NodeType.CData: + return this.cdata(node, options, level); + case NodeType.Comment: + return this.comment(node, options, level); + case NodeType.Element: + return this.element(node, options, level); + case NodeType.Raw: + return this.raw(node, options, level); + case NodeType.Text: + return this.text(node, options, level); + case NodeType.ProcessingInstruction: + return this.processingInstruction(node, options, level); + case NodeType.Dummy: + return ''; + case NodeType.Declaration: + return this.declaration(node, options, level); + case NodeType.DocType: + return this.docType(node, options, level); + case NodeType.AttributeDeclaration: + return this.dtdAttList(node, options, level); + case NodeType.ElementDeclaration: + return this.dtdElement(node, options, level); + case NodeType.EntityDeclaration: + return this.dtdEntity(node, options, level); + case NodeType.NotationDeclaration: + return this.dtdNotation(node, options, level); + default: + throw new Error("Unknown XML node type: " + node.constructor.name); + } + } + + processingInstruction(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + ''; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + raw(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + options.state = WriterState.InsideTag; + r += node.value; + options.state = WriterState.CloseTag; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + text(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + options.state = WriterState.InsideTag; + r += node.value; + options.state = WriterState.CloseTag; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + dtdAttList(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + dtdElement(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + dtdEntity(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + dtdNotation(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + openNode(node, options, level) {} + + closeNode(node, options, level) {} + + openAttribute(att, options, level) {} + + closeAttribute(att, options, level) {} + + }; + +}).call(this); + +},{"./NodeType":17,"./Utility":18,"./WriterState":19,"./XMLCData":21,"./XMLComment":23,"./XMLDTDAttList":28,"./XMLDTDElement":29,"./XMLDTDEntity":30,"./XMLDTDNotation":31,"./XMLDeclaration":32,"./XMLDocType":33,"./XMLDummy":36,"./XMLElement":37,"./XMLProcessingInstruction":41,"./XMLRaw":42,"./XMLText":46}],48:[function(require,module,exports){ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction; + + ({assign, isFunction} = require('./Utility')); + + XMLDOMImplementation = require('./XMLDOMImplementation'); + + XMLDocument = require('./XMLDocument'); + + XMLDocumentCB = require('./XMLDocumentCB'); + + XMLStringWriter = require('./XMLStringWriter'); + + XMLStreamWriter = require('./XMLStreamWriter'); + + NodeType = require('./NodeType'); + + WriterState = require('./WriterState'); + + // Creates a new document and returns the root node for + // chain-building the document tree + + // `name` name of the root element + + // `xmldec.version` A version number string, e.g. 1.0 + // `xmldec.encoding` Encoding declaration, e.g. UTF-8 + // `xmldec.standalone` standalone document declaration: true or false + + // `doctype.pubID` public identifier of the external subset + // `doctype.sysID` system identifier of the external subset + + // `options.headless` whether XML declaration and doctype will be included: + // true or false + // `options.keepNullNodes` whether nodes with null values will be kept + // or ignored: true or false + // `options.keepNullAttributes` whether attributes with null values will be + // kept or ignored: true or false + // `options.ignoreDecorators` whether decorator strings will be ignored when + // converting JS objects: true or false + // `options.separateArrayItems` whether array items are created as separate + // nodes when passed as an object value: true or false + // `options.noDoubleEncoding` whether existing html entities are encoded: + // true or false + // `options.stringify` a set of functions to use for converting values to + // strings + // `options.writer` the default XML writer to use for converting nodes to + // string. If the default writer is not set, the built-in XMLStringWriter + // will be used instead. + module.exports.create = function(name, xmldec, doctype, options) { + var doc, root; + if (name == null) { + throw new Error("Root element needs a name."); + } + options = assign({}, xmldec, doctype, options); + // create the document node + doc = new XMLDocument(options); + // add the root node + root = doc.element(name); + // prolog + if (!options.headless) { + doc.declaration(options); + if ((options.pubID != null) || (options.sysID != null)) { + doc.dtd(options); + } + } + return root; + }; + + // Creates a new document and returns the document node for + // chain-building the document tree + + // `options.keepNullNodes` whether nodes with null values will be kept + // or ignored: true or false + // `options.keepNullAttributes` whether attributes with null values will be + // kept or ignored: true or false + // `options.ignoreDecorators` whether decorator strings will be ignored when + // converting JS objects: true or false + // `options.separateArrayItems` whether array items are created as separate + // nodes when passed as an object value: true or false + // `options.noDoubleEncoding` whether existing html entities are encoded: + // true or false + // `options.stringify` a set of functions to use for converting values to + // strings + // `options.writer` the default XML writer to use for converting nodes to + // string. If the default writer is not set, the built-in XMLStringWriter + // will be used instead. + + // `onData` the function to be called when a new chunk of XML is output. The + // string containing the XML chunk is passed to `onData` as its single + // argument. + // `onEnd` the function to be called when the XML document is completed with + // `end`. `onEnd` does not receive any arguments. + module.exports.begin = function(options, onData, onEnd) { + if (isFunction(options)) { + [onData, onEnd] = [options, onData]; + options = {}; + } + if (onData) { + return new XMLDocumentCB(options, onData, onEnd); + } else { + return new XMLDocument(options); + } + }; + + module.exports.stringWriter = function(options) { + return new XMLStringWriter(options); + }; + + module.exports.streamWriter = function(stream, options) { + return new XMLStreamWriter(stream, options); + }; + + module.exports.implementation = new XMLDOMImplementation(); + + module.exports.nodeType = NodeType; + + module.exports.writerState = WriterState; + +}).call(this); + +},{"./NodeType":17,"./Utility":18,"./WriterState":19,"./XMLDOMImplementation":26,"./XMLDocument":34,"./XMLDocumentCB":35,"./XMLStreamWriter":43,"./XMLStringWriter":44}]},{},[1])(1) +}); diff --git a/node_modules/plist/examples/browser/index.html b/node_modules/plist/examples/browser/index.html new file mode 100644 index 0000000..8ce7d92 --- /dev/null +++ b/node_modules/plist/examples/browser/index.html @@ -0,0 +1,14 @@ + + + + plist.js browser example + + + + + + + diff --git a/node_modules/plist/index.js b/node_modules/plist/index.js new file mode 100644 index 0000000..d7385ae --- /dev/null +++ b/node_modules/plist/index.js @@ -0,0 +1,13 @@ +/** + * Parser functions. + */ + +var parserFunctions = require('./lib/parse'); +Object.keys(parserFunctions).forEach(function (k) { exports[k] = parserFunctions[k]; }); + +/** + * Builder functions. + */ + +var builderFunctions = require('./lib/build'); +Object.keys(builderFunctions).forEach(function (k) { exports[k] = builderFunctions[k]; }); diff --git a/node_modules/plist/lib/build.js b/node_modules/plist/lib/build.js new file mode 100644 index 0000000..c2a84b1 --- /dev/null +++ b/node_modules/plist/lib/build.js @@ -0,0 +1,143 @@ +/** + * Module dependencies. + */ + +var base64 = require('base64-js'); +var xmlbuilder = require('xmlbuilder'); + +/** + * Module exports. + */ + +exports.build = build; + +/** + * Accepts a `Date` instance and returns an ISO date string. + * + * @param {Date} d - Date instance to serialize + * @returns {String} ISO date string representation of `d` + * @api private + */ + +function ISODateString(d){ + function pad(n){ + return n < 10 ? '0' + n : n; + } + return d.getUTCFullYear()+'-' + + pad(d.getUTCMonth()+1)+'-' + + pad(d.getUTCDate())+'T' + + pad(d.getUTCHours())+':' + + pad(d.getUTCMinutes())+':' + + pad(d.getUTCSeconds())+'Z'; +} + +/** + * Returns the internal "type" of `obj` via the + * `Object.prototype.toString()` trick. + * + * @param {Mixed} obj - any value + * @returns {String} the internal "type" name + * @api private + */ + +var toString = Object.prototype.toString; +function type (obj) { + var m = toString.call(obj).match(/\[object (.*)\]/); + return m ? m[1] : m; +} + +/** + * Generate an XML plist string from the input object `obj`. + * + * @param {Object} obj - the object to convert + * @param {Object} [opts] - optional options object + * @returns {String} converted plist XML string + * @api public + */ + +function build (obj, opts) { + var XMLHDR = { + version: '1.0', + encoding: 'UTF-8' + }; + + var XMLDTD = { + pubid: '-//Apple//DTD PLIST 1.0//EN', + sysid: 'http://www.apple.com/DTDs/PropertyList-1.0.dtd' + }; + + var doc = xmlbuilder.create('plist'); + + doc.dec(XMLHDR.version, XMLHDR.encoding, XMLHDR.standalone); + doc.dtd(XMLDTD.pubid, XMLDTD.sysid); + doc.att('version', '1.0'); + + walk_obj(obj, doc); + + if (!opts) opts = {}; + // default `pretty` to `true` + opts.pretty = opts.pretty !== false; + return doc.end(opts); +} + +/** + * depth first, recursive traversal of a javascript object. when complete, + * next_child contains a reference to the build XML object. + * + * @api private + */ + +function walk_obj(next, next_child) { + var tag_type, i, prop; + var name = type(next); + + if ('Undefined' == name) { + return; + } else if (Array.isArray(next)) { + next_child = next_child.ele('array'); + for (i = 0; i < next.length; i++) { + walk_obj(next[i], next_child); + } + + } else if (Buffer.isBuffer(next)) { + next_child.ele('data').raw(next.toString('base64')); + + } else if ('Object' == name) { + next_child = next_child.ele('dict'); + for (prop in next) { + if (next.hasOwnProperty(prop)) { + next_child.ele('key').txt(prop); + walk_obj(next[prop], next_child); + } + } + + } else if ('Number' == name) { + // detect if this is an integer or real + // TODO: add an ability to force one way or another via a "cast" + tag_type = (next % 1 === 0) ? 'integer' : 'real'; + next_child.ele(tag_type).txt(next.toString()); + + } else if ('BigInt' == name) { + next_child.ele('integer').txt(next); + + } else if ('Date' == name) { + next_child.ele('date').txt(ISODateString(new Date(next))); + + } else if ('Boolean' == name) { + next_child.ele(next ? 'true' : 'false'); + + } else if ('String' == name) { + next_child.ele('string').txt(next); + + } else if ('ArrayBuffer' == name) { + next_child.ele('data').raw(base64.fromByteArray(next)); + + } else if (next && next.buffer && 'ArrayBuffer' == type(next.buffer)) { + // a typed array + next_child.ele('data').raw(base64.fromByteArray(new Uint8Array(next.buffer), next_child)); + + } else if ('Null' === name) { + next_child.ele('null').txt(''); + + } +} diff --git a/node_modules/plist/lib/parse.js b/node_modules/plist/lib/parse.js new file mode 100644 index 0000000..250f6ca --- /dev/null +++ b/node_modules/plist/lib/parse.js @@ -0,0 +1,208 @@ +/** + * Module dependencies. + */ + +const { DOMParser } = require("@xmldom/xmldom"); + +/** + * Module exports. + */ + +exports.parse = parse; + +var TEXT_NODE = 3; +var CDATA_NODE = 4; +var COMMENT_NODE = 8; + +/** + * We ignore raw text (usually whitespace), , + * and raw CDATA nodes. + * + * @param {Element} node + * @returns {Boolean} + * @api private + */ + +function shouldIgnoreNode(node) { + return ( + node.nodeType === TEXT_NODE || + node.nodeType === COMMENT_NODE || + node.nodeType === CDATA_NODE + ); +} + +/** + * Check if the node is empty. Some plist file has such node: + * + * this node shoud be ignored. + * + * @see https://github.com/TooTallNate/plist.js/issues/66 + * @param {Element} node + * @returns {Boolean} + * @api private + */ +function isEmptyNode(node) { + if (!node.childNodes || node.childNodes.length === 0) { + return true; + } else { + return false; + } +} + +function invariant(test, message) { + if (!test) { + throw new Error(message); + } +} + +/** + * Parses a Plist XML string. Returns an Object. + * + * @param {String} xml - the XML String to decode + * @returns {Mixed} the decoded value from the Plist XML + * @api public + */ + +function parse(xml) { + var doc = new DOMParser().parseFromString(xml, "text/xml"); + invariant( + doc.documentElement.nodeName === "plist", + "malformed document. First element should be ", + ); + var plist = parsePlistXML(doc.documentElement); + + // the root node gets interpreted as an Array, + // so pull out the inner data first + if (plist.length == 1) plist = plist[0]; + + return plist; +} + +/** + * Convert an XML based plist document into a JSON representation. + * + * @param {Object} xml_node - current XML node in the plist + * @returns {Mixed} built up JSON object + * @api private + */ + +function parsePlistXML(node) { + var i, new_obj, key, val, new_arr, res, counter, type; + + if (!node) return null; + + if (node.nodeName === "plist") { + new_arr = []; + if (isEmptyNode(node)) { + return new_arr; + } + for (i = 0; i < node.childNodes.length; i++) { + if (!shouldIgnoreNode(node.childNodes[i])) { + new_arr.push(parsePlistXML(node.childNodes[i])); + } + } + return new_arr; + } else if (node.nodeName === "dict") { + new_obj = {}; + key = null; + counter = 0; + if (isEmptyNode(node)) { + return new_obj; + } + for (i = 0; i < node.childNodes.length; i++) { + if (shouldIgnoreNode(node.childNodes[i])) continue; + if (counter % 2 === 0) { + invariant( + node.childNodes[i].nodeName === "key", + "Missing key while parsing .", + ); + key = parsePlistXML(node.childNodes[i]); + } else { + invariant( + node.childNodes[i].nodeName !== "key", + 'Unexpected key "' + + parsePlistXML(node.childNodes[i]) + + '" while parsing .', + ); + new_obj[key] = parsePlistXML(node.childNodes[i]); + } + counter += 1; + } + if (counter % 2 === 1) { + new_obj[key] = ""; + } + + return new_obj; + } else if (node.nodeName === "array") { + new_arr = []; + if (isEmptyNode(node)) { + return new_arr; + } + for (i = 0; i < node.childNodes.length; i++) { + if (!shouldIgnoreNode(node.childNodes[i])) { + res = parsePlistXML(node.childNodes[i]); + if (null != res) new_arr.push(res); + } + } + return new_arr; + } else if (node.nodeName === "#text") { + // TODO: what should we do with text types? (CDATA sections) + } else if (node.nodeName === "key") { + if (isEmptyNode(node)) { + return ""; + } + + invariant( + node.childNodes[0].nodeValue !== "__proto__", + "__proto__ keys can lead to prototype pollution. More details on CVE-2022-22912", + ); + + return node.childNodes[0].nodeValue; + } else if (node.nodeName === "string") { + res = ""; + if (isEmptyNode(node)) { + return res; + } + for (i = 0; i < node.childNodes.length; i++) { + var type = node.childNodes[i].nodeType; + if (type === TEXT_NODE || type === CDATA_NODE) { + res += node.childNodes[i].nodeValue; + } + } + return res; + } else if (node.nodeName === "integer") { + invariant(!isEmptyNode(node), 'Cannot parse "" as integer.'); + return parseInt(node.childNodes[0].nodeValue, 10); + } else if (node.nodeName === "real") { + invariant(!isEmptyNode(node), 'Cannot parse "" as real.'); + res = ""; + for (i = 0; i < node.childNodes.length; i++) { + if (node.childNodes[i].nodeType === TEXT_NODE) { + res += node.childNodes[i].nodeValue; + } + } + return parseFloat(res); + } else if (node.nodeName === "data") { + res = ""; + if (isEmptyNode(node)) { + return Buffer.from(res, "base64"); + } + for (i = 0; i < node.childNodes.length; i++) { + if (node.childNodes[i].nodeType === TEXT_NODE) { + res += node.childNodes[i].nodeValue.replace(/\s+/g, ""); + } + } + return Buffer.from(res, "base64"); + } else if (node.nodeName === "date") { + invariant(!isEmptyNode(node), 'Cannot parse "" as Date.'); + return new Date(node.childNodes[0].nodeValue); + } else if (node.nodeName === "null") { + return null; + } else if (node.nodeName === "true") { + return true; + } else if (node.nodeName === "false") { + return false; + } else { + throw new Error("Invalid PLIST tag " + node.nodeName); + } +} diff --git a/node_modules/plist/package.json b/node_modules/plist/package.json new file mode 100644 index 0000000..5c2f093 --- /dev/null +++ b/node_modules/plist/package.json @@ -0,0 +1,43 @@ +{ + "name": "plist", + "description": "Apple's property list parser/builder for Node.js and browsers", + "version": "3.1.1", + "author": "Nathan Rajlich ", + "contributors": [ + "Hans Huebner ", + "Pierre Metrailler", + "Mike Reinstein ", + "Vladimir Tsvang", + "Mathieu D'Amours" + ], + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/node-plist.git" + }, + "license": "MIT", + "keywords": [ + "apple", + "browser", + "mac", + "plist", + "parser", + "xml" + ], + "main": "index.js", + "dependencies": { + "@xmldom/xmldom": "^0.9.10", + "base64-js": "^1.5.1", + "xmlbuilder": "^15.1.1" + }, + "devDependencies": { + "browserify": "^17.0.0", + "mocha": "^10.2.0", + "zuul": "3.12.0" + }, + "scripts": { + "test": "make test" + }, + "engines": { + "node": ">=10.4.0" + } +} diff --git a/node_modules/prompts/dist/dateparts/datepart.js b/node_modules/prompts/dist/dateparts/datepart.js new file mode 100644 index 0000000..b954c5e --- /dev/null +++ b/node_modules/prompts/dist/dateparts/datepart.js @@ -0,0 +1,39 @@ +'use strict'; + +class DatePart { + constructor({ + token, + date, + parts, + locales + }) { + this.token = token; + this.date = date || new Date(); + this.parts = parts || [this]; + this.locales = locales || {}; + } + + up() {} + + down() {} + + next() { + const currentIdx = this.parts.indexOf(this); + return this.parts.find((part, idx) => idx > currentIdx && part instanceof DatePart); + } + + setTo(val) {} + + prev() { + let parts = [].concat(this.parts).reverse(); + const currentIdx = parts.indexOf(this); + return parts.find((part, idx) => idx > currentIdx && part instanceof DatePart); + } + + toString() { + return String(this.date); + } + +} + +module.exports = DatePart; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/day.js b/node_modules/prompts/dist/dateparts/day.js new file mode 100644 index 0000000..a525e92 --- /dev/null +++ b/node_modules/prompts/dist/dateparts/day.js @@ -0,0 +1,35 @@ +'use strict'; + +const DatePart = require('./datepart'); + +const pos = n => { + n = n % 10; + return n === 1 ? 'st' : n === 2 ? 'nd' : n === 3 ? 'rd' : 'th'; +}; + +class Day extends DatePart { + constructor(opts = {}) { + super(opts); + } + + up() { + this.date.setDate(this.date.getDate() + 1); + } + + down() { + this.date.setDate(this.date.getDate() - 1); + } + + setTo(val) { + this.date.setDate(parseInt(val.substr(-2))); + } + + toString() { + let date = this.date.getDate(); + let day = this.date.getDay(); + return this.token === 'DD' ? String(date).padStart(2, '0') : this.token === 'Do' ? date + pos(date) : this.token === 'd' ? day + 1 : this.token === 'ddd' ? this.locales.weekdaysShort[day] : this.token === 'dddd' ? this.locales.weekdays[day] : date; + } + +} + +module.exports = Day; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/hours.js b/node_modules/prompts/dist/dateparts/hours.js new file mode 100644 index 0000000..7743632 --- /dev/null +++ b/node_modules/prompts/dist/dateparts/hours.js @@ -0,0 +1,30 @@ +'use strict'; + +const DatePart = require('./datepart'); + +class Hours extends DatePart { + constructor(opts = {}) { + super(opts); + } + + up() { + this.date.setHours(this.date.getHours() + 1); + } + + down() { + this.date.setHours(this.date.getHours() - 1); + } + + setTo(val) { + this.date.setHours(parseInt(val.substr(-2))); + } + + toString() { + let hours = this.date.getHours(); + if (/h/.test(this.token)) hours = hours % 12 || 12; + return this.token.length > 1 ? String(hours).padStart(2, '0') : hours; + } + +} + +module.exports = Hours; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/index.js b/node_modules/prompts/dist/dateparts/index.js new file mode 100644 index 0000000..754516e --- /dev/null +++ b/node_modules/prompts/dist/dateparts/index.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = { + DatePart: require('./datepart'), + Meridiem: require('./meridiem'), + Day: require('./day'), + Hours: require('./hours'), + Milliseconds: require('./milliseconds'), + Minutes: require('./minutes'), + Month: require('./month'), + Seconds: require('./seconds'), + Year: require('./year') +}; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/meridiem.js b/node_modules/prompts/dist/dateparts/meridiem.js new file mode 100644 index 0000000..5bc8dd7 --- /dev/null +++ b/node_modules/prompts/dist/dateparts/meridiem.js @@ -0,0 +1,25 @@ +'use strict'; + +const DatePart = require('./datepart'); + +class Meridiem extends DatePart { + constructor(opts = {}) { + super(opts); + } + + up() { + this.date.setHours((this.date.getHours() + 12) % 24); + } + + down() { + this.up(); + } + + toString() { + let meridiem = this.date.getHours() > 12 ? 'pm' : 'am'; + return /\A/.test(this.token) ? meridiem.toUpperCase() : meridiem; + } + +} + +module.exports = Meridiem; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/milliseconds.js b/node_modules/prompts/dist/dateparts/milliseconds.js new file mode 100644 index 0000000..3440e3a --- /dev/null +++ b/node_modules/prompts/dist/dateparts/milliseconds.js @@ -0,0 +1,28 @@ +'use strict'; + +const DatePart = require('./datepart'); + +class Milliseconds extends DatePart { + constructor(opts = {}) { + super(opts); + } + + up() { + this.date.setMilliseconds(this.date.getMilliseconds() + 1); + } + + down() { + this.date.setMilliseconds(this.date.getMilliseconds() - 1); + } + + setTo(val) { + this.date.setMilliseconds(parseInt(val.substr(-this.token.length))); + } + + toString() { + return String(this.date.getMilliseconds()).padStart(4, '0').substr(0, this.token.length); + } + +} + +module.exports = Milliseconds; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/minutes.js b/node_modules/prompts/dist/dateparts/minutes.js new file mode 100644 index 0000000..2b8ef1f --- /dev/null +++ b/node_modules/prompts/dist/dateparts/minutes.js @@ -0,0 +1,29 @@ +'use strict'; + +const DatePart = require('./datepart'); + +class Minutes extends DatePart { + constructor(opts = {}) { + super(opts); + } + + up() { + this.date.setMinutes(this.date.getMinutes() + 1); + } + + down() { + this.date.setMinutes(this.date.getMinutes() - 1); + } + + setTo(val) { + this.date.setMinutes(parseInt(val.substr(-2))); + } + + toString() { + let m = this.date.getMinutes(); + return this.token.length > 1 ? String(m).padStart(2, '0') : m; + } + +} + +module.exports = Minutes; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/month.js b/node_modules/prompts/dist/dateparts/month.js new file mode 100644 index 0000000..f9d4e13 --- /dev/null +++ b/node_modules/prompts/dist/dateparts/month.js @@ -0,0 +1,31 @@ +'use strict'; + +const DatePart = require('./datepart'); + +class Month extends DatePart { + constructor(opts = {}) { + super(opts); + } + + up() { + this.date.setMonth(this.date.getMonth() + 1); + } + + down() { + this.date.setMonth(this.date.getMonth() - 1); + } + + setTo(val) { + val = parseInt(val.substr(-2)) - 1; + this.date.setMonth(val < 0 ? 0 : val); + } + + toString() { + let month = this.date.getMonth(); + let tl = this.token.length; + return tl === 2 ? String(month + 1).padStart(2, '0') : tl === 3 ? this.locales.monthsShort[month] : tl === 4 ? this.locales.months[month] : String(month + 1); + } + +} + +module.exports = Month; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/seconds.js b/node_modules/prompts/dist/dateparts/seconds.js new file mode 100644 index 0000000..e16f030 --- /dev/null +++ b/node_modules/prompts/dist/dateparts/seconds.js @@ -0,0 +1,29 @@ +'use strict'; + +const DatePart = require('./datepart'); + +class Seconds extends DatePart { + constructor(opts = {}) { + super(opts); + } + + up() { + this.date.setSeconds(this.date.getSeconds() + 1); + } + + down() { + this.date.setSeconds(this.date.getSeconds() - 1); + } + + setTo(val) { + this.date.setSeconds(parseInt(val.substr(-2))); + } + + toString() { + let s = this.date.getSeconds(); + return this.token.length > 1 ? String(s).padStart(2, '0') : s; + } + +} + +module.exports = Seconds; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/year.js b/node_modules/prompts/dist/dateparts/year.js new file mode 100644 index 0000000..cd62677 --- /dev/null +++ b/node_modules/prompts/dist/dateparts/year.js @@ -0,0 +1,29 @@ +'use strict'; + +const DatePart = require('./datepart'); + +class Year extends DatePart { + constructor(opts = {}) { + super(opts); + } + + up() { + this.date.setFullYear(this.date.getFullYear() + 1); + } + + down() { + this.date.setFullYear(this.date.getFullYear() - 1); + } + + setTo(val) { + this.date.setFullYear(val.substr(-4)); + } + + toString() { + let year = String(this.date.getFullYear()).padStart(4, '0'); + return this.token.length === 2 ? year.substr(-2) : year; + } + +} + +module.exports = Year; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/autocomplete.js b/node_modules/prompts/dist/elements/autocomplete.js new file mode 100644 index 0000000..60e41bc --- /dev/null +++ b/node_modules/prompts/dist/elements/autocomplete.js @@ -0,0 +1,285 @@ +'use strict'; + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +const color = require('kleur'); + +const Prompt = require('./prompt'); + +const _require = require('sisteransi'), + erase = _require.erase, + cursor = _require.cursor; + +const _require2 = require('../util'), + style = _require2.style, + clear = _require2.clear, + figures = _require2.figures, + wrap = _require2.wrap, + entriesToDisplay = _require2.entriesToDisplay; + +const getVal = (arr, i) => arr[i] && (arr[i].value || arr[i].title || arr[i]); + +const getTitle = (arr, i) => arr[i] && (arr[i].title || arr[i].value || arr[i]); + +const getIndex = (arr, valOrTitle) => { + const index = arr.findIndex(el => el.value === valOrTitle || el.title === valOrTitle); + return index > -1 ? index : undefined; +}; +/** + * TextPrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {Array} opts.choices Array of auto-complete choices objects + * @param {Function} [opts.suggest] Filter function. Defaults to sort by title + * @param {Number} [opts.limit=10] Max number of results to show + * @param {Number} [opts.cursor=0] Cursor start position + * @param {String} [opts.style='default'] Render style + * @param {String} [opts.fallback] Fallback message - initial to default value + * @param {String} [opts.initial] Index of the default value + * @param {Boolean} [opts.clearFirst] The first ESCAPE keypress will clear the input + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + * @param {String} [opts.noMatches] The no matches found label + */ + + +class AutocompletePrompt extends Prompt { + constructor(opts = {}) { + super(opts); + this.msg = opts.message; + this.suggest = opts.suggest; + this.choices = opts.choices; + this.initial = typeof opts.initial === 'number' ? opts.initial : getIndex(opts.choices, opts.initial); + this.select = this.initial || opts.cursor || 0; + this.i18n = { + noMatches: opts.noMatches || 'no matches found' + }; + this.fallback = opts.fallback || this.initial; + this.clearFirst = opts.clearFirst || false; + this.suggestions = []; + this.input = ''; + this.limit = opts.limit || 10; + this.cursor = 0; + this.transform = style.render(opts.style); + this.scale = this.transform.scale; + this.render = this.render.bind(this); + this.complete = this.complete.bind(this); + this.clear = clear('', this.out.columns); + this.complete(this.render); + this.render(); + } + + set fallback(fb) { + this._fb = Number.isSafeInteger(parseInt(fb)) ? parseInt(fb) : fb; + } + + get fallback() { + let choice; + if (typeof this._fb === 'number') choice = this.choices[this._fb];else if (typeof this._fb === 'string') choice = { + title: this._fb + }; + return choice || this._fb || { + title: this.i18n.noMatches + }; + } + + moveSelect(i) { + this.select = i; + if (this.suggestions.length > 0) this.value = getVal(this.suggestions, i);else this.value = this.fallback.value; + this.fire(); + } + + complete(cb) { + var _this = this; + + return _asyncToGenerator(function* () { + const p = _this.completing = _this.suggest(_this.input, _this.choices); + + const suggestions = yield p; + if (_this.completing !== p) return; + _this.suggestions = suggestions.map((s, i, arr) => ({ + title: getTitle(arr, i), + value: getVal(arr, i), + description: s.description + })); + _this.completing = false; + const l = Math.max(suggestions.length - 1, 0); + + _this.moveSelect(Math.min(l, _this.select)); + + cb && cb(); + })(); + } + + reset() { + this.input = ''; + this.complete(() => { + this.moveSelect(this.initial !== void 0 ? this.initial : 0); + this.render(); + }); + this.render(); + } + + exit() { + if (this.clearFirst && this.input.length > 0) { + this.reset(); + } else { + this.done = this.exited = true; + this.aborted = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + } + + abort() { + this.done = this.aborted = true; + this.exited = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + submit() { + this.done = true; + this.aborted = this.exited = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + _(c, key) { + let s1 = this.input.slice(0, this.cursor); + let s2 = this.input.slice(this.cursor); + this.input = `${s1}${c}${s2}`; + this.cursor = s1.length + 1; + this.complete(this.render); + this.render(); + } + + delete() { + if (this.cursor === 0) return this.bell(); + let s1 = this.input.slice(0, this.cursor - 1); + let s2 = this.input.slice(this.cursor); + this.input = `${s1}${s2}`; + this.complete(this.render); + this.cursor = this.cursor - 1; + this.render(); + } + + deleteForward() { + if (this.cursor * this.scale >= this.rendered.length) return this.bell(); + let s1 = this.input.slice(0, this.cursor); + let s2 = this.input.slice(this.cursor + 1); + this.input = `${s1}${s2}`; + this.complete(this.render); + this.render(); + } + + first() { + this.moveSelect(0); + this.render(); + } + + last() { + this.moveSelect(this.suggestions.length - 1); + this.render(); + } + + up() { + if (this.select === 0) { + this.moveSelect(this.suggestions.length - 1); + } else { + this.moveSelect(this.select - 1); + } + + this.render(); + } + + down() { + if (this.select === this.suggestions.length - 1) { + this.moveSelect(0); + } else { + this.moveSelect(this.select + 1); + } + + this.render(); + } + + next() { + if (this.select === this.suggestions.length - 1) { + this.moveSelect(0); + } else this.moveSelect(this.select + 1); + + this.render(); + } + + nextPage() { + this.moveSelect(Math.min(this.select + this.limit, this.suggestions.length - 1)); + this.render(); + } + + prevPage() { + this.moveSelect(Math.max(this.select - this.limit, 0)); + this.render(); + } + + left() { + if (this.cursor <= 0) return this.bell(); + this.cursor = this.cursor - 1; + this.render(); + } + + right() { + if (this.cursor * this.scale >= this.rendered.length) return this.bell(); + this.cursor = this.cursor + 1; + this.render(); + } + + renderOption(v, hovered, isStart, isEnd) { + let desc; + let prefix = isStart ? figures.arrowUp : isEnd ? figures.arrowDown : ' '; + let title = hovered ? color.cyan().underline(v.title) : v.title; + prefix = (hovered ? color.cyan(figures.pointer) + ' ' : ' ') + prefix; + + if (v.description) { + desc = ` - ${v.description}`; + + if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) { + desc = '\n' + wrap(v.description, { + margin: 3, + width: this.out.columns + }); + } + } + + return prefix + ' ' + title + color.gray(desc || ''); + } + + render() { + if (this.closed) return; + if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns)); + super.render(); + + let _entriesToDisplay = entriesToDisplay(this.select, this.choices.length, this.limit), + startIndex = _entriesToDisplay.startIndex, + endIndex = _entriesToDisplay.endIndex; + + this.outputText = [style.symbol(this.done, this.aborted, this.exited), color.bold(this.msg), style.delimiter(this.completing), this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)].join(' '); + + if (!this.done) { + const suggestions = this.suggestions.slice(startIndex, endIndex).map((item, i) => this.renderOption(item, this.select === i + startIndex, i === 0 && startIndex > 0, i + startIndex === endIndex - 1 && endIndex < this.choices.length)).join('\n'); + this.outputText += `\n` + (suggestions || color.gray(this.fallback.title)); + } + + this.out.write(erase.line + cursor.to(0) + this.outputText); + } + +} + +module.exports = AutocompletePrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/autocompleteMultiselect.js b/node_modules/prompts/dist/elements/autocompleteMultiselect.js new file mode 100644 index 0000000..ac4af0d --- /dev/null +++ b/node_modules/prompts/dist/elements/autocompleteMultiselect.js @@ -0,0 +1,201 @@ +'use strict'; + +const color = require('kleur'); + +const _require = require('sisteransi'), + cursor = _require.cursor; + +const MultiselectPrompt = require('./multiselect'); + +const _require2 = require('../util'), + clear = _require2.clear, + style = _require2.style, + figures = _require2.figures; +/** + * MultiselectPrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {Array} opts.choices Array of choice objects + * @param {String} [opts.hint] Hint to display + * @param {String} [opts.warn] Hint shown for disabled choices + * @param {Number} [opts.max] Max choices + * @param {Number} [opts.cursor=0] Cursor start position + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + */ + + +class AutocompleteMultiselectPrompt extends MultiselectPrompt { + constructor(opts = {}) { + opts.overrideRender = true; + super(opts); + this.inputValue = ''; + this.clear = clear('', this.out.columns); + this.filteredOptions = this.value; + this.render(); + } + + last() { + this.cursor = this.filteredOptions.length - 1; + this.render(); + } + + next() { + this.cursor = (this.cursor + 1) % this.filteredOptions.length; + this.render(); + } + + up() { + if (this.cursor === 0) { + this.cursor = this.filteredOptions.length - 1; + } else { + this.cursor--; + } + + this.render(); + } + + down() { + if (this.cursor === this.filteredOptions.length - 1) { + this.cursor = 0; + } else { + this.cursor++; + } + + this.render(); + } + + left() { + this.filteredOptions[this.cursor].selected = false; + this.render(); + } + + right() { + if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell(); + this.filteredOptions[this.cursor].selected = true; + this.render(); + } + + delete() { + if (this.inputValue.length) { + this.inputValue = this.inputValue.substr(0, this.inputValue.length - 1); + this.updateFilteredOptions(); + } + } + + updateFilteredOptions() { + const currentHighlight = this.filteredOptions[this.cursor]; + this.filteredOptions = this.value.filter(v => { + if (this.inputValue) { + if (typeof v.title === 'string') { + if (v.title.toLowerCase().includes(this.inputValue.toLowerCase())) { + return true; + } + } + + if (typeof v.value === 'string') { + if (v.value.toLowerCase().includes(this.inputValue.toLowerCase())) { + return true; + } + } + + return false; + } + + return true; + }); + const newHighlightIndex = this.filteredOptions.findIndex(v => v === currentHighlight); + this.cursor = newHighlightIndex < 0 ? 0 : newHighlightIndex; + this.render(); + } + + handleSpaceToggle() { + const v = this.filteredOptions[this.cursor]; + + if (v.selected) { + v.selected = false; + this.render(); + } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) { + return this.bell(); + } else { + v.selected = true; + this.render(); + } + } + + handleInputChange(c) { + this.inputValue = this.inputValue + c; + this.updateFilteredOptions(); + } + + _(c, key) { + if (c === ' ') { + this.handleSpaceToggle(); + } else { + this.handleInputChange(c); + } + } + + renderInstructions() { + if (this.instructions === undefined || this.instructions) { + if (typeof this.instructions === 'string') { + return this.instructions; + } + + return ` +Instructions: + ${figures.arrowUp}/${figures.arrowDown}: Highlight option + ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection + [a,b,c]/delete: Filter choices + enter/return: Complete answer +`; + } + + return ''; + } + + renderCurrentInput() { + return ` +Filtered results for: ${this.inputValue ? this.inputValue : color.gray('Enter something to filter')}\n`; + } + + renderOption(cursor, v, i) { + let title; + if (v.disabled) title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);else title = cursor === i ? color.cyan().underline(v.title) : v.title; + return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + title; + } + + renderDoneOrInstructions() { + if (this.done) { + return this.value.filter(e => e.selected).map(v => v.title).join(', '); + } + + const output = [color.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()]; + + if (this.filteredOptions.length && this.filteredOptions[this.cursor].disabled) { + output.push(color.yellow(this.warn)); + } + + return output.join(' '); + } + + render() { + if (this.closed) return; + if (this.firstRender) this.out.write(cursor.hide); + super.render(); // print prompt + + let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(' '); + + if (this.showMinError) { + prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`); + this.showMinError = false; + } + + prompt += this.renderOptions(this.filteredOptions); + this.out.write(this.clear + prompt); + this.clear = clear(prompt, this.out.columns); + } + +} + +module.exports = AutocompleteMultiselectPrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/confirm.js b/node_modules/prompts/dist/elements/confirm.js new file mode 100644 index 0000000..6c342d2 --- /dev/null +++ b/node_modules/prompts/dist/elements/confirm.js @@ -0,0 +1,93 @@ +"use strict"; + +const color = require('kleur'); + +const Prompt = require('./prompt'); + +const _require = require('../util'), + style = _require.style, + clear = _require.clear; + +const _require2 = require('sisteransi'), + erase = _require2.erase, + cursor = _require2.cursor; +/** + * ConfirmPrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {Boolean} [opts.initial] Default value (true/false) + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + * @param {String} [opts.yes] The "Yes" label + * @param {String} [opts.yesOption] The "Yes" option when choosing between yes/no + * @param {String} [opts.no] The "No" label + * @param {String} [opts.noOption] The "No" option when choosing between yes/no + */ + + +class ConfirmPrompt extends Prompt { + constructor(opts = {}) { + super(opts); + this.msg = opts.message; + this.value = opts.initial; + this.initialValue = !!opts.initial; + this.yesMsg = opts.yes || 'yes'; + this.yesOption = opts.yesOption || '(Y/n)'; + this.noMsg = opts.no || 'no'; + this.noOption = opts.noOption || '(y/N)'; + this.render(); + } + + reset() { + this.value = this.initialValue; + this.fire(); + this.render(); + } + + exit() { + this.abort(); + } + + abort() { + this.done = this.aborted = true; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + submit() { + this.value = this.value || false; + this.done = true; + this.aborted = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + _(c, key) { + if (c.toLowerCase() === 'y') { + this.value = true; + return this.submit(); + } + + if (c.toLowerCase() === 'n') { + this.value = false; + return this.submit(); + } + + return this.bell(); + } + + render() { + if (this.closed) return; + if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns)); + super.render(); + this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.done ? this.value ? this.yesMsg : this.noMsg : color.gray(this.initialValue ? this.yesOption : this.noOption)].join(' '); + this.out.write(erase.line + cursor.to(0) + this.outputText); + } + +} + +module.exports = ConfirmPrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/date.js b/node_modules/prompts/dist/elements/date.js new file mode 100644 index 0000000..0b254f8 --- /dev/null +++ b/node_modules/prompts/dist/elements/date.js @@ -0,0 +1,250 @@ +'use strict'; + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +const color = require('kleur'); + +const Prompt = require('./prompt'); + +const _require = require('../util'), + style = _require.style, + clear = _require.clear, + figures = _require.figures; + +const _require2 = require('sisteransi'), + erase = _require2.erase, + cursor = _require2.cursor; + +const _require3 = require('../dateparts'), + DatePart = _require3.DatePart, + Meridiem = _require3.Meridiem, + Day = _require3.Day, + Hours = _require3.Hours, + Milliseconds = _require3.Milliseconds, + Minutes = _require3.Minutes, + Month = _require3.Month, + Seconds = _require3.Seconds, + Year = _require3.Year; + +const regex = /\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g; +const regexGroups = { + 1: ({ + token + }) => token.replace(/\\(.)/g, '$1'), + 2: opts => new Day(opts), + // Day // TODO + 3: opts => new Month(opts), + // Month + 4: opts => new Year(opts), + // Year + 5: opts => new Meridiem(opts), + // AM/PM // TODO (special) + 6: opts => new Hours(opts), + // Hours + 7: opts => new Minutes(opts), + // Minutes + 8: opts => new Seconds(opts), + // Seconds + 9: opts => new Milliseconds(opts) // Fractional seconds + +}; +const dfltLocales = { + months: 'January,February,March,April,May,June,July,August,September,October,November,December'.split(','), + monthsShort: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','), + weekdays: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','), + weekdaysShort: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(',') +}; +/** + * DatePrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {Number} [opts.initial] Index of default value + * @param {String} [opts.mask] The format mask + * @param {object} [opts.locales] The date locales + * @param {String} [opts.error] The error message shown on invalid value + * @param {Function} [opts.validate] Function to validate the submitted value + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + */ + +class DatePrompt extends Prompt { + constructor(opts = {}) { + super(opts); + this.msg = opts.message; + this.cursor = 0; + this.typed = ''; + this.locales = Object.assign(dfltLocales, opts.locales); + this._date = opts.initial || new Date(); + this.errorMsg = opts.error || 'Please Enter A Valid Value'; + + this.validator = opts.validate || (() => true); + + this.mask = opts.mask || 'YYYY-MM-DD HH:mm:ss'; + this.clear = clear('', this.out.columns); + this.render(); + } + + get value() { + return this.date; + } + + get date() { + return this._date; + } + + set date(date) { + if (date) this._date.setTime(date.getTime()); + } + + set mask(mask) { + let result; + this.parts = []; + + while (result = regex.exec(mask)) { + let match = result.shift(); + let idx = result.findIndex(gr => gr != null); + this.parts.push(idx in regexGroups ? regexGroups[idx]({ + token: result[idx] || match, + date: this.date, + parts: this.parts, + locales: this.locales + }) : result[idx] || match); + } + + let parts = this.parts.reduce((arr, i) => { + if (typeof i === 'string' && typeof arr[arr.length - 1] === 'string') arr[arr.length - 1] += i;else arr.push(i); + return arr; + }, []); + this.parts.splice(0); + this.parts.push(...parts); + this.reset(); + } + + moveCursor(n) { + this.typed = ''; + this.cursor = n; + this.fire(); + } + + reset() { + this.moveCursor(this.parts.findIndex(p => p instanceof DatePart)); + this.fire(); + this.render(); + } + + exit() { + this.abort(); + } + + abort() { + this.done = this.aborted = true; + this.error = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + validate() { + var _this = this; + + return _asyncToGenerator(function* () { + let valid = yield _this.validator(_this.value); + + if (typeof valid === 'string') { + _this.errorMsg = valid; + valid = false; + } + + _this.error = !valid; + })(); + } + + submit() { + var _this2 = this; + + return _asyncToGenerator(function* () { + yield _this2.validate(); + + if (_this2.error) { + _this2.color = 'red'; + + _this2.fire(); + + _this2.render(); + + return; + } + + _this2.done = true; + _this2.aborted = false; + + _this2.fire(); + + _this2.render(); + + _this2.out.write('\n'); + + _this2.close(); + })(); + } + + up() { + this.typed = ''; + this.parts[this.cursor].up(); + this.render(); + } + + down() { + this.typed = ''; + this.parts[this.cursor].down(); + this.render(); + } + + left() { + let prev = this.parts[this.cursor].prev(); + if (prev == null) return this.bell(); + this.moveCursor(this.parts.indexOf(prev)); + this.render(); + } + + right() { + let next = this.parts[this.cursor].next(); + if (next == null) return this.bell(); + this.moveCursor(this.parts.indexOf(next)); + this.render(); + } + + next() { + let next = this.parts[this.cursor].next(); + this.moveCursor(next ? this.parts.indexOf(next) : this.parts.findIndex(part => part instanceof DatePart)); + this.render(); + } + + _(c) { + if (/\d/.test(c)) { + this.typed += c; + this.parts[this.cursor].setTo(this.typed); + this.render(); + } + } + + render() { + if (this.closed) return; + if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns)); + super.render(); // Print prompt + + this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), []).join('')].join(' '); // Print error + + if (this.error) { + this.outputText += this.errorMsg.split('\n').reduce((a, l, i) => a + `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``); + } + + this.out.write(erase.line + cursor.to(0) + this.outputText); + } + +} + +module.exports = DatePrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/index.js b/node_modules/prompts/dist/elements/index.js new file mode 100644 index 0000000..cf0ccc1 --- /dev/null +++ b/node_modules/prompts/dist/elements/index.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = { + TextPrompt: require('./text'), + SelectPrompt: require('./select'), + TogglePrompt: require('./toggle'), + DatePrompt: require('./date'), + NumberPrompt: require('./number'), + MultiselectPrompt: require('./multiselect'), + AutocompletePrompt: require('./autocomplete'), + AutocompleteMultiselectPrompt: require('./autocompleteMultiselect'), + ConfirmPrompt: require('./confirm') +}; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/multiselect.js b/node_modules/prompts/dist/elements/multiselect.js new file mode 100644 index 0000000..2d129ea --- /dev/null +++ b/node_modules/prompts/dist/elements/multiselect.js @@ -0,0 +1,289 @@ +'use strict'; + +const color = require('kleur'); + +const _require = require('sisteransi'), + cursor = _require.cursor; + +const Prompt = require('./prompt'); + +const _require2 = require('../util'), + clear = _require2.clear, + figures = _require2.figures, + style = _require2.style, + wrap = _require2.wrap, + entriesToDisplay = _require2.entriesToDisplay; +/** + * MultiselectPrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {Array} opts.choices Array of choice objects + * @param {String} [opts.hint] Hint to display + * @param {String} [opts.warn] Hint shown for disabled choices + * @param {Number} [opts.max] Max choices + * @param {Number} [opts.cursor=0] Cursor start position + * @param {Number} [opts.optionsPerPage=10] Max options to display at once + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + */ + + +class MultiselectPrompt extends Prompt { + constructor(opts = {}) { + super(opts); + this.msg = opts.message; + this.cursor = opts.cursor || 0; + this.scrollIndex = opts.cursor || 0; + this.hint = opts.hint || ''; + this.warn = opts.warn || '- This option is disabled -'; + this.minSelected = opts.min; + this.showMinError = false; + this.maxChoices = opts.max; + this.instructions = opts.instructions; + this.optionsPerPage = opts.optionsPerPage || 10; + this.value = opts.choices.map((ch, idx) => { + if (typeof ch === 'string') ch = { + title: ch, + value: idx + }; + return { + title: ch && (ch.title || ch.value || ch), + description: ch && ch.description, + value: ch && (ch.value === undefined ? idx : ch.value), + selected: ch && ch.selected, + disabled: ch && ch.disabled + }; + }); + this.clear = clear('', this.out.columns); + + if (!opts.overrideRender) { + this.render(); + } + } + + reset() { + this.value.map(v => !v.selected); + this.cursor = 0; + this.fire(); + this.render(); + } + + selected() { + return this.value.filter(v => v.selected); + } + + exit() { + this.abort(); + } + + abort() { + this.done = this.aborted = true; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + submit() { + const selected = this.value.filter(e => e.selected); + + if (this.minSelected && selected.length < this.minSelected) { + this.showMinError = true; + this.render(); + } else { + this.done = true; + this.aborted = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + } + + first() { + this.cursor = 0; + this.render(); + } + + last() { + this.cursor = this.value.length - 1; + this.render(); + } + + next() { + this.cursor = (this.cursor + 1) % this.value.length; + this.render(); + } + + up() { + if (this.cursor === 0) { + this.cursor = this.value.length - 1; + } else { + this.cursor--; + } + + this.render(); + } + + down() { + if (this.cursor === this.value.length - 1) { + this.cursor = 0; + } else { + this.cursor++; + } + + this.render(); + } + + left() { + this.value[this.cursor].selected = false; + this.render(); + } + + right() { + if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell(); + this.value[this.cursor].selected = true; + this.render(); + } + + handleSpaceToggle() { + const v = this.value[this.cursor]; + + if (v.selected) { + v.selected = false; + this.render(); + } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) { + return this.bell(); + } else { + v.selected = true; + this.render(); + } + } + + toggleAll() { + if (this.maxChoices !== undefined || this.value[this.cursor].disabled) { + return this.bell(); + } + + const newSelected = !this.value[this.cursor].selected; + this.value.filter(v => !v.disabled).forEach(v => v.selected = newSelected); + this.render(); + } + + _(c, key) { + if (c === ' ') { + this.handleSpaceToggle(); + } else if (c === 'a') { + this.toggleAll(); + } else { + return this.bell(); + } + } + + renderInstructions() { + if (this.instructions === undefined || this.instructions) { + if (typeof this.instructions === 'string') { + return this.instructions; + } + + return '\nInstructions:\n' + ` ${figures.arrowUp}/${figures.arrowDown}: Highlight option\n` + ` ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection\n` + (this.maxChoices === undefined ? ` a: Toggle all\n` : '') + ` enter/return: Complete answer`; + } + + return ''; + } + + renderOption(cursor, v, i, arrowIndicator) { + const prefix = (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + arrowIndicator + ' '; + let title, desc; + + if (v.disabled) { + title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title); + } else { + title = cursor === i ? color.cyan().underline(v.title) : v.title; + + if (cursor === i && v.description) { + desc = ` - ${v.description}`; + + if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) { + desc = '\n' + wrap(v.description, { + margin: prefix.length, + width: this.out.columns + }); + } + } + } + + return prefix + title + color.gray(desc || ''); + } // shared with autocompleteMultiselect + + + paginateOptions(options) { + if (options.length === 0) { + return color.red('No matches for this query.'); + } + + let _entriesToDisplay = entriesToDisplay(this.cursor, options.length, this.optionsPerPage), + startIndex = _entriesToDisplay.startIndex, + endIndex = _entriesToDisplay.endIndex; + + let prefix, + styledOptions = []; + + for (let i = startIndex; i < endIndex; i++) { + if (i === startIndex && startIndex > 0) { + prefix = figures.arrowUp; + } else if (i === endIndex - 1 && endIndex < options.length) { + prefix = figures.arrowDown; + } else { + prefix = ' '; + } + + styledOptions.push(this.renderOption(this.cursor, options[i], i, prefix)); + } + + return '\n' + styledOptions.join('\n'); + } // shared with autocomleteMultiselect + + + renderOptions(options) { + if (!this.done) { + return this.paginateOptions(options); + } + + return ''; + } + + renderDoneOrInstructions() { + if (this.done) { + return this.value.filter(e => e.selected).map(v => v.title).join(', '); + } + + const output = [color.gray(this.hint), this.renderInstructions()]; + + if (this.value[this.cursor].disabled) { + output.push(color.yellow(this.warn)); + } + + return output.join(' '); + } + + render() { + if (this.closed) return; + if (this.firstRender) this.out.write(cursor.hide); + super.render(); // print prompt + + let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(' '); + + if (this.showMinError) { + prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`); + this.showMinError = false; + } + + prompt += this.renderOptions(this.value); + this.out.write(this.clear + prompt); + this.clear = clear(prompt, this.out.columns); + } + +} + +module.exports = MultiselectPrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/number.js b/node_modules/prompts/dist/elements/number.js new file mode 100644 index 0000000..fd144af --- /dev/null +++ b/node_modules/prompts/dist/elements/number.js @@ -0,0 +1,250 @@ +"use strict"; + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +const color = require('kleur'); + +const Prompt = require('./prompt'); + +const _require = require('sisteransi'), + cursor = _require.cursor, + erase = _require.erase; + +const _require2 = require('../util'), + style = _require2.style, + figures = _require2.figures, + clear = _require2.clear, + lines = _require2.lines; + +const isNumber = /[0-9]/; + +const isDef = any => any !== undefined; + +const round = (number, precision) => { + let factor = Math.pow(10, precision); + return Math.round(number * factor) / factor; +}; +/** + * NumberPrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {String} [opts.style='default'] Render style + * @param {Number} [opts.initial] Default value + * @param {Number} [opts.max=+Infinity] Max value + * @param {Number} [opts.min=-Infinity] Min value + * @param {Boolean} [opts.float=false] Parse input as floats + * @param {Number} [opts.round=2] Round floats to x decimals + * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys + * @param {Function} [opts.validate] Validate function + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + * @param {String} [opts.error] The invalid error label + */ + + +class NumberPrompt extends Prompt { + constructor(opts = {}) { + super(opts); + this.transform = style.render(opts.style); + this.msg = opts.message; + this.initial = isDef(opts.initial) ? opts.initial : ''; + this.float = !!opts.float; + this.round = opts.round || 2; + this.inc = opts.increment || 1; + this.min = isDef(opts.min) ? opts.min : -Infinity; + this.max = isDef(opts.max) ? opts.max : Infinity; + this.errorMsg = opts.error || `Please Enter A Valid Value`; + + this.validator = opts.validate || (() => true); + + this.color = `cyan`; + this.value = ``; + this.typed = ``; + this.lastHit = 0; + this.render(); + } + + set value(v) { + if (!v && v !== 0) { + this.placeholder = true; + this.rendered = color.gray(this.transform.render(`${this.initial}`)); + this._value = ``; + } else { + this.placeholder = false; + this.rendered = this.transform.render(`${round(v, this.round)}`); + this._value = round(v, this.round); + } + + this.fire(); + } + + get value() { + return this._value; + } + + parse(x) { + return this.float ? parseFloat(x) : parseInt(x); + } + + valid(c) { + return c === `-` || c === `.` && this.float || isNumber.test(c); + } + + reset() { + this.typed = ``; + this.value = ``; + this.fire(); + this.render(); + } + + exit() { + this.abort(); + } + + abort() { + let x = this.value; + this.value = x !== `` ? x : this.initial; + this.done = this.aborted = true; + this.error = false; + this.fire(); + this.render(); + this.out.write(`\n`); + this.close(); + } + + validate() { + var _this = this; + + return _asyncToGenerator(function* () { + let valid = yield _this.validator(_this.value); + + if (typeof valid === `string`) { + _this.errorMsg = valid; + valid = false; + } + + _this.error = !valid; + })(); + } + + submit() { + var _this2 = this; + + return _asyncToGenerator(function* () { + yield _this2.validate(); + + if (_this2.error) { + _this2.color = `red`; + + _this2.fire(); + + _this2.render(); + + return; + } + + let x = _this2.value; + _this2.value = x !== `` ? x : _this2.initial; + _this2.done = true; + _this2.aborted = false; + _this2.error = false; + + _this2.fire(); + + _this2.render(); + + _this2.out.write(`\n`); + + _this2.close(); + })(); + } + + up() { + this.typed = ``; + + if (this.value === '') { + this.value = this.min - this.inc; + } + + if (this.value >= this.max) return this.bell(); + this.value += this.inc; + this.color = `cyan`; + this.fire(); + this.render(); + } + + down() { + this.typed = ``; + + if (this.value === '') { + this.value = this.min + this.inc; + } + + if (this.value <= this.min) return this.bell(); + this.value -= this.inc; + this.color = `cyan`; + this.fire(); + this.render(); + } + + delete() { + let val = this.value.toString(); + if (val.length === 0) return this.bell(); + this.value = this.parse(val = val.slice(0, -1)) || ``; + + if (this.value !== '' && this.value < this.min) { + this.value = this.min; + } + + this.color = `cyan`; + this.fire(); + this.render(); + } + + next() { + this.value = this.initial; + this.fire(); + this.render(); + } + + _(c, key) { + if (!this.valid(c)) return this.bell(); + const now = Date.now(); + if (now - this.lastHit > 1000) this.typed = ``; // 1s elapsed + + this.typed += c; + this.lastHit = now; + this.color = `cyan`; + if (c === `.`) return this.fire(); + this.value = Math.min(this.parse(this.typed), this.max); + if (this.value > this.max) this.value = this.max; + if (this.value < this.min) this.value = this.min; + this.fire(); + this.render(); + } + + render() { + if (this.closed) return; + + if (!this.firstRender) { + if (this.outputError) this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns)); + this.out.write(clear(this.outputText, this.out.columns)); + } + + super.render(); + this.outputError = ''; // Print prompt + + this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), !this.done || !this.done && !this.placeholder ? color[this.color]().underline(this.rendered) : this.rendered].join(` `); // Print error + + if (this.error) { + this.outputError += this.errorMsg.split(`\n`).reduce((a, l, i) => a + `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``); + } + + this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore); + } + +} + +module.exports = NumberPrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/prompt.js b/node_modules/prompts/dist/elements/prompt.js new file mode 100644 index 0000000..7deef04 --- /dev/null +++ b/node_modules/prompts/dist/elements/prompt.js @@ -0,0 +1,82 @@ +'use strict'; + +const readline = require('readline'); + +const _require = require('../util'), + action = _require.action; + +const EventEmitter = require('events'); + +const _require2 = require('sisteransi'), + beep = _require2.beep, + cursor = _require2.cursor; + +const color = require('kleur'); +/** + * Base prompt skeleton + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + */ + + +class Prompt extends EventEmitter { + constructor(opts = {}) { + super(); + this.firstRender = true; + this.in = opts.stdin || process.stdin; + this.out = opts.stdout || process.stdout; + + this.onRender = (opts.onRender || (() => void 0)).bind(this); + + const rl = readline.createInterface({ + input: this.in, + escapeCodeTimeout: 50 + }); + readline.emitKeypressEvents(this.in, rl); + if (this.in.isTTY) this.in.setRawMode(true); + const isSelect = ['SelectPrompt', 'MultiselectPrompt'].indexOf(this.constructor.name) > -1; + + const keypress = (str, key) => { + let a = action(key, isSelect); + + if (a === false) { + this._ && this._(str, key); + } else if (typeof this[a] === 'function') { + this[a](key); + } else { + this.bell(); + } + }; + + this.close = () => { + this.out.write(cursor.show); + this.in.removeListener('keypress', keypress); + if (this.in.isTTY) this.in.setRawMode(false); + rl.close(); + this.emit(this.aborted ? 'abort' : this.exited ? 'exit' : 'submit', this.value); + this.closed = true; + }; + + this.in.on('keypress', keypress); + } + + fire() { + this.emit('state', { + value: this.value, + aborted: !!this.aborted, + exited: !!this.exited + }); + } + + bell() { + this.out.write(beep); + } + + render() { + this.onRender(color); + if (this.firstRender) this.firstRender = false; + } + +} + +module.exports = Prompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/select.js b/node_modules/prompts/dist/elements/select.js new file mode 100644 index 0000000..5e27c69 --- /dev/null +++ b/node_modules/prompts/dist/elements/select.js @@ -0,0 +1,190 @@ +'use strict'; + +const color = require('kleur'); + +const Prompt = require('./prompt'); + +const _require = require('../util'), + style = _require.style, + clear = _require.clear, + figures = _require.figures, + wrap = _require.wrap, + entriesToDisplay = _require.entriesToDisplay; + +const _require2 = require('sisteransi'), + cursor = _require2.cursor; +/** + * SelectPrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {Array} opts.choices Array of choice objects + * @param {String} [opts.hint] Hint to display + * @param {Number} [opts.initial] Index of default value + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + * @param {Number} [opts.optionsPerPage=10] Max options to display at once + */ + + +class SelectPrompt extends Prompt { + constructor(opts = {}) { + super(opts); + this.msg = opts.message; + this.hint = opts.hint || '- Use arrow-keys. Return to submit.'; + this.warn = opts.warn || '- This option is disabled'; + this.cursor = opts.initial || 0; + this.choices = opts.choices.map((ch, idx) => { + if (typeof ch === 'string') ch = { + title: ch, + value: idx + }; + return { + title: ch && (ch.title || ch.value || ch), + value: ch && (ch.value === undefined ? idx : ch.value), + description: ch && ch.description, + selected: ch && ch.selected, + disabled: ch && ch.disabled + }; + }); + this.optionsPerPage = opts.optionsPerPage || 10; + this.value = (this.choices[this.cursor] || {}).value; + this.clear = clear('', this.out.columns); + this.render(); + } + + moveCursor(n) { + this.cursor = n; + this.value = this.choices[n].value; + this.fire(); + } + + reset() { + this.moveCursor(0); + this.fire(); + this.render(); + } + + exit() { + this.abort(); + } + + abort() { + this.done = this.aborted = true; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + submit() { + if (!this.selection.disabled) { + this.done = true; + this.aborted = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } else this.bell(); + } + + first() { + this.moveCursor(0); + this.render(); + } + + last() { + this.moveCursor(this.choices.length - 1); + this.render(); + } + + up() { + if (this.cursor === 0) { + this.moveCursor(this.choices.length - 1); + } else { + this.moveCursor(this.cursor - 1); + } + + this.render(); + } + + down() { + if (this.cursor === this.choices.length - 1) { + this.moveCursor(0); + } else { + this.moveCursor(this.cursor + 1); + } + + this.render(); + } + + next() { + this.moveCursor((this.cursor + 1) % this.choices.length); + this.render(); + } + + _(c, key) { + if (c === ' ') return this.submit(); + } + + get selection() { + return this.choices[this.cursor]; + } + + render() { + if (this.closed) return; + if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns)); + super.render(); + + let _entriesToDisplay = entriesToDisplay(this.cursor, this.choices.length, this.optionsPerPage), + startIndex = _entriesToDisplay.startIndex, + endIndex = _entriesToDisplay.endIndex; // Print prompt + + + this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.done ? this.selection.title : this.selection.disabled ? color.yellow(this.warn) : color.gray(this.hint)].join(' '); // Print choices + + if (!this.done) { + this.outputText += '\n'; + + for (let i = startIndex; i < endIndex; i++) { + let title, + prefix, + desc = '', + v = this.choices[i]; // Determine whether to display "more choices" indicators + + if (i === startIndex && startIndex > 0) { + prefix = figures.arrowUp; + } else if (i === endIndex - 1 && endIndex < this.choices.length) { + prefix = figures.arrowDown; + } else { + prefix = ' '; + } + + if (v.disabled) { + title = this.cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title); + prefix = (this.cursor === i ? color.bold().gray(figures.pointer) + ' ' : ' ') + prefix; + } else { + title = this.cursor === i ? color.cyan().underline(v.title) : v.title; + prefix = (this.cursor === i ? color.cyan(figures.pointer) + ' ' : ' ') + prefix; + + if (v.description && this.cursor === i) { + desc = ` - ${v.description}`; + + if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) { + desc = '\n' + wrap(v.description, { + margin: 3, + width: this.out.columns + }); + } + } + } + + this.outputText += `${prefix} ${title}${color.gray(desc)}\n`; + } + } + + this.out.write(this.outputText); + } + +} + +module.exports = SelectPrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/text.js b/node_modules/prompts/dist/elements/text.js new file mode 100644 index 0000000..c38a070 --- /dev/null +++ b/node_modules/prompts/dist/elements/text.js @@ -0,0 +1,245 @@ +"use strict"; + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +const color = require('kleur'); + +const Prompt = require('./prompt'); + +const _require = require('sisteransi'), + erase = _require.erase, + cursor = _require.cursor; + +const _require2 = require('../util'), + style = _require2.style, + clear = _require2.clear, + lines = _require2.lines, + figures = _require2.figures; +/** + * TextPrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {String} [opts.style='default'] Render style + * @param {String} [opts.initial] Default value + * @param {Function} [opts.validate] Validate function + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + * @param {String} [opts.error] The invalid error label + */ + + +class TextPrompt extends Prompt { + constructor(opts = {}) { + super(opts); + this.transform = style.render(opts.style); + this.scale = this.transform.scale; + this.msg = opts.message; + this.initial = opts.initial || ``; + + this.validator = opts.validate || (() => true); + + this.value = ``; + this.errorMsg = opts.error || `Please Enter A Valid Value`; + this.cursor = Number(!!this.initial); + this.cursorOffset = 0; + this.clear = clear(``, this.out.columns); + this.render(); + } + + set value(v) { + if (!v && this.initial) { + this.placeholder = true; + this.rendered = color.gray(this.transform.render(this.initial)); + } else { + this.placeholder = false; + this.rendered = this.transform.render(v); + } + + this._value = v; + this.fire(); + } + + get value() { + return this._value; + } + + reset() { + this.value = ``; + this.cursor = Number(!!this.initial); + this.cursorOffset = 0; + this.fire(); + this.render(); + } + + exit() { + this.abort(); + } + + abort() { + this.value = this.value || this.initial; + this.done = this.aborted = true; + this.error = false; + this.red = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + validate() { + var _this = this; + + return _asyncToGenerator(function* () { + let valid = yield _this.validator(_this.value); + + if (typeof valid === `string`) { + _this.errorMsg = valid; + valid = false; + } + + _this.error = !valid; + })(); + } + + submit() { + var _this2 = this; + + return _asyncToGenerator(function* () { + _this2.value = _this2.value || _this2.initial; + _this2.cursorOffset = 0; + _this2.cursor = _this2.rendered.length; + yield _this2.validate(); + + if (_this2.error) { + _this2.red = true; + + _this2.fire(); + + _this2.render(); + + return; + } + + _this2.done = true; + _this2.aborted = false; + + _this2.fire(); + + _this2.render(); + + _this2.out.write('\n'); + + _this2.close(); + })(); + } + + next() { + if (!this.placeholder) return this.bell(); + this.value = this.initial; + this.cursor = this.rendered.length; + this.fire(); + this.render(); + } + + moveCursor(n) { + if (this.placeholder) return; + this.cursor = this.cursor + n; + this.cursorOffset += n; + } + + _(c, key) { + let s1 = this.value.slice(0, this.cursor); + let s2 = this.value.slice(this.cursor); + this.value = `${s1}${c}${s2}`; + this.red = false; + this.cursor = this.placeholder ? 0 : s1.length + 1; + this.render(); + } + + delete() { + if (this.isCursorAtStart()) return this.bell(); + let s1 = this.value.slice(0, this.cursor - 1); + let s2 = this.value.slice(this.cursor); + this.value = `${s1}${s2}`; + this.red = false; + + if (this.isCursorAtStart()) { + this.cursorOffset = 0; + } else { + this.cursorOffset++; + this.moveCursor(-1); + } + + this.render(); + } + + deleteForward() { + if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell(); + let s1 = this.value.slice(0, this.cursor); + let s2 = this.value.slice(this.cursor + 1); + this.value = `${s1}${s2}`; + this.red = false; + + if (this.isCursorAtEnd()) { + this.cursorOffset = 0; + } else { + this.cursorOffset++; + } + + this.render(); + } + + first() { + this.cursor = 0; + this.render(); + } + + last() { + this.cursor = this.value.length; + this.render(); + } + + left() { + if (this.cursor <= 0 || this.placeholder) return this.bell(); + this.moveCursor(-1); + this.render(); + } + + right() { + if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell(); + this.moveCursor(1); + this.render(); + } + + isCursorAtStart() { + return this.cursor === 0 || this.placeholder && this.cursor === 1; + } + + isCursorAtEnd() { + return this.cursor === this.rendered.length || this.placeholder && this.cursor === this.rendered.length + 1; + } + + render() { + if (this.closed) return; + + if (!this.firstRender) { + if (this.outputError) this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns)); + this.out.write(clear(this.outputText, this.out.columns)); + } + + super.render(); + this.outputError = ''; + this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.red ? color.red(this.rendered) : this.rendered].join(` `); + + if (this.error) { + this.outputError += this.errorMsg.split(`\n`).reduce((a, l, i) => a + `\n${i ? ' ' : figures.pointerSmall} ${color.red().italic(l)}`, ``); + } + + this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore + cursor.move(this.cursorOffset, 0)); + } + +} + +module.exports = TextPrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/toggle.js b/node_modules/prompts/dist/elements/toggle.js new file mode 100644 index 0000000..d942f60 --- /dev/null +++ b/node_modules/prompts/dist/elements/toggle.js @@ -0,0 +1,124 @@ +"use strict"; + +const color = require('kleur'); + +const Prompt = require('./prompt'); + +const _require = require('../util'), + style = _require.style, + clear = _require.clear; + +const _require2 = require('sisteransi'), + cursor = _require2.cursor, + erase = _require2.erase; +/** + * TogglePrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {Boolean} [opts.initial=false] Default value + * @param {String} [opts.active='no'] Active label + * @param {String} [opts.inactive='off'] Inactive label + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + */ + + +class TogglePrompt extends Prompt { + constructor(opts = {}) { + super(opts); + this.msg = opts.message; + this.value = !!opts.initial; + this.active = opts.active || 'on'; + this.inactive = opts.inactive || 'off'; + this.initialValue = this.value; + this.render(); + } + + reset() { + this.value = this.initialValue; + this.fire(); + this.render(); + } + + exit() { + this.abort(); + } + + abort() { + this.done = this.aborted = true; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + submit() { + this.done = true; + this.aborted = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + deactivate() { + if (this.value === false) return this.bell(); + this.value = false; + this.render(); + } + + activate() { + if (this.value === true) return this.bell(); + this.value = true; + this.render(); + } + + delete() { + this.deactivate(); + } + + left() { + this.deactivate(); + } + + right() { + this.activate(); + } + + down() { + this.deactivate(); + } + + up() { + this.activate(); + } + + next() { + this.value = !this.value; + this.fire(); + this.render(); + } + + _(c, key) { + if (c === ' ') { + this.value = !this.value; + } else if (c === '1') { + this.value = true; + } else if (c === '0') { + this.value = false; + } else return this.bell(); + + this.render(); + } + + render() { + if (this.closed) return; + if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns)); + super.render(); + this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.value ? this.inactive : color.cyan().underline(this.inactive), color.gray('/'), this.value ? color.cyan().underline(this.active) : this.active].join(' '); + this.out.write(erase.line + cursor.to(0) + this.outputText); + } + +} + +module.exports = TogglePrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/index.js b/node_modules/prompts/dist/index.js new file mode 100644 index 0000000..f30e9e7 --- /dev/null +++ b/node_modules/prompts/dist/index.js @@ -0,0 +1,154 @@ +'use strict'; + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +const prompts = require('./prompts'); + +const passOn = ['suggest', 'format', 'onState', 'validate', 'onRender', 'type']; + +const noop = () => {}; +/** + * Prompt for a series of questions + * @param {Array|Object} questions Single question object or Array of question objects + * @param {Function} [onSubmit] Callback function called on prompt submit + * @param {Function} [onCancel] Callback function called on cancel/abort + * @returns {Object} Object with values from user input + */ + + +function prompt() { + return _prompt.apply(this, arguments); +} + +function _prompt() { + _prompt = _asyncToGenerator(function* (questions = [], { + onSubmit = noop, + onCancel = noop + } = {}) { + const answers = {}; + const override = prompt._override || {}; + questions = [].concat(questions); + let answer, question, quit, name, type, lastPrompt; + + const getFormattedAnswer = /*#__PURE__*/function () { + var _ref = _asyncToGenerator(function* (question, answer, skipValidation = false) { + if (!skipValidation && question.validate && question.validate(answer) !== true) { + return; + } + + return question.format ? yield question.format(answer, answers) : answer; + }); + + return function getFormattedAnswer(_x, _x2) { + return _ref.apply(this, arguments); + }; + }(); + + var _iterator = _createForOfIteratorHelper(questions), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + question = _step.value; + var _question = question; + name = _question.name; + type = _question.type; + + // evaluate type first and skip if type is a falsy value + if (typeof type === 'function') { + type = yield type(answer, _objectSpread({}, answers), question); + question['type'] = type; + } + + if (!type) continue; // if property is a function, invoke it unless it's a special function + + for (let key in question) { + if (passOn.includes(key)) continue; + let value = question[key]; + question[key] = typeof value === 'function' ? yield value(answer, _objectSpread({}, answers), lastPrompt) : value; + } + + lastPrompt = question; + + if (typeof question.message !== 'string') { + throw new Error('prompt message is required'); + } // update vars in case they changed + + + var _question2 = question; + name = _question2.name; + type = _question2.type; + + if (prompts[type] === void 0) { + throw new Error(`prompt type (${type}) is not defined`); + } + + if (override[question.name] !== undefined) { + answer = yield getFormattedAnswer(question, override[question.name]); + + if (answer !== undefined) { + answers[name] = answer; + continue; + } + } + + try { + // Get the injected answer if there is one or prompt the user + answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : yield prompts[type](question); + answers[name] = answer = yield getFormattedAnswer(question, answer, true); + quit = yield onSubmit(question, answer, answers); + } catch (err) { + quit = !(yield onCancel(question, answers)); + } + + if (quit) return answers; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + return answers; + }); + return _prompt.apply(this, arguments); +} + +function getInjectedAnswer(injected, deafultValue) { + const answer = injected.shift(); + + if (answer instanceof Error) { + throw answer; + } + + return answer === undefined ? deafultValue : answer; +} + +function inject(answers) { + prompt._injected = (prompt._injected || []).concat(answers); +} + +function override(answers) { + prompt._override = Object.assign({}, answers); +} + +module.exports = Object.assign(prompt, { + prompt, + prompts, + inject, + override +}); \ No newline at end of file diff --git a/node_modules/prompts/dist/prompts.js b/node_modules/prompts/dist/prompts.js new file mode 100644 index 0000000..31f2648 --- /dev/null +++ b/node_modules/prompts/dist/prompts.js @@ -0,0 +1,222 @@ +'use strict'; + +const $ = exports; + +const el = require('./elements'); + +const noop = v => v; + +function toPrompt(type, args, opts = {}) { + return new Promise((res, rej) => { + const p = new el[type](args); + const onAbort = opts.onAbort || noop; + const onSubmit = opts.onSubmit || noop; + const onExit = opts.onExit || noop; + p.on('state', args.onState || noop); + p.on('submit', x => res(onSubmit(x))); + p.on('exit', x => res(onExit(x))); + p.on('abort', x => rej(onAbort(x))); + }); +} +/** + * Text prompt + * @param {string} args.message Prompt message to display + * @param {string} [args.initial] Default string value + * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') + * @param {function} [args.onState] On state change callback + * @param {function} [args.validate] Function to validate user input + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ + + +$.text = args => toPrompt('TextPrompt', args); +/** + * Password prompt with masked input + * @param {string} args.message Prompt message to display + * @param {string} [args.initial] Default string value + * @param {function} [args.onState] On state change callback + * @param {function} [args.validate] Function to validate user input + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ + + +$.password = args => { + args.style = 'password'; + return $.text(args); +}; +/** + * Prompt where input is invisible, like sudo + * @param {string} args.message Prompt message to display + * @param {string} [args.initial] Default string value + * @param {function} [args.onState] On state change callback + * @param {function} [args.validate] Function to validate user input + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ + + +$.invisible = args => { + args.style = 'invisible'; + return $.text(args); +}; +/** + * Number prompt + * @param {string} args.message Prompt message to display + * @param {number} args.initial Default number value + * @param {function} [args.onState] On state change callback + * @param {number} [args.max] Max value + * @param {number} [args.min] Min value + * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') + * @param {Boolean} [opts.float=false] Parse input as floats + * @param {Number} [opts.round=2] Round floats to x decimals + * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys + * @param {function} [args.validate] Function to validate user input + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ + + +$.number = args => toPrompt('NumberPrompt', args); +/** + * Date prompt + * @param {string} args.message Prompt message to display + * @param {number} args.initial Default number value + * @param {function} [args.onState] On state change callback + * @param {number} [args.max] Max value + * @param {number} [args.min] Min value + * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') + * @param {Boolean} [opts.float=false] Parse input as floats + * @param {Number} [opts.round=2] Round floats to x decimals + * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys + * @param {function} [args.validate] Function to validate user input + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ + + +$.date = args => toPrompt('DatePrompt', args); +/** + * Classic yes/no prompt + * @param {string} args.message Prompt message to display + * @param {boolean} [args.initial=false] Default value + * @param {function} [args.onState] On state change callback + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ + + +$.confirm = args => toPrompt('ConfirmPrompt', args); +/** + * List prompt, split intput string by `seperator` + * @param {string} args.message Prompt message to display + * @param {string} [args.initial] Default string value + * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') + * @param {string} [args.separator] String separator + * @param {function} [args.onState] On state change callback + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input, in form of an `Array` + */ + + +$.list = args => { + const sep = args.separator || ','; + return toPrompt('TextPrompt', args, { + onSubmit: str => str.split(sep).map(s => s.trim()) + }); +}; +/** + * Toggle/switch prompt + * @param {string} args.message Prompt message to display + * @param {boolean} [args.initial=false] Default value + * @param {string} [args.active="on"] Text for `active` state + * @param {string} [args.inactive="off"] Text for `inactive` state + * @param {function} [args.onState] On state change callback + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ + + +$.toggle = args => toPrompt('TogglePrompt', args); +/** + * Interactive select prompt + * @param {string} args.message Prompt message to display + * @param {Array} args.choices Array of choices objects `[{ title, value }, ...]` + * @param {number} [args.initial] Index of default value + * @param {String} [args.hint] Hint to display + * @param {function} [args.onState] On state change callback + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ + + +$.select = args => toPrompt('SelectPrompt', args); +/** + * Interactive multi-select / autocompleteMultiselect prompt + * @param {string} args.message Prompt message to display + * @param {Array} args.choices Array of choices objects `[{ title, value, [selected] }, ...]` + * @param {number} [args.max] Max select + * @param {string} [args.hint] Hint to display user + * @param {Number} [args.cursor=0] Cursor start position + * @param {function} [args.onState] On state change callback + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ + + +$.multiselect = args => { + args.choices = [].concat(args.choices || []); + + const toSelected = items => items.filter(item => item.selected).map(item => item.value); + + return toPrompt('MultiselectPrompt', args, { + onAbort: toSelected, + onSubmit: toSelected + }); +}; + +$.autocompleteMultiselect = args => { + args.choices = [].concat(args.choices || []); + + const toSelected = items => items.filter(item => item.selected).map(item => item.value); + + return toPrompt('AutocompleteMultiselectPrompt', args, { + onAbort: toSelected, + onSubmit: toSelected + }); +}; + +const byTitle = (input, choices) => Promise.resolve(choices.filter(item => item.title.slice(0, input.length).toLowerCase() === input.toLowerCase())); +/** + * Interactive auto-complete prompt + * @param {string} args.message Prompt message to display + * @param {Array} args.choices Array of auto-complete choices objects `[{ title, value }, ...]` + * @param {Function} [args.suggest] Function to filter results based on user input. Defaults to sort by `title` + * @param {number} [args.limit=10] Max number of results to show + * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') + * @param {String} [args.initial] Index of the default value + * @param {boolean} [opts.clearFirst] The first ESCAPE keypress will clear the input + * @param {String} [args.fallback] Fallback message - defaults to initial value + * @param {function} [args.onState] On state change callback + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ + + +$.autocomplete = args => { + args.suggest = args.suggest || byTitle; + args.choices = [].concat(args.choices || []); + return toPrompt('AutocompletePrompt', args); +}; \ No newline at end of file diff --git a/node_modules/prompts/dist/util/action.js b/node_modules/prompts/dist/util/action.js new file mode 100644 index 0000000..c36b7db --- /dev/null +++ b/node_modules/prompts/dist/util/action.js @@ -0,0 +1,38 @@ +'use strict'; + +module.exports = (key, isSelect) => { + if (key.meta && key.name !== 'escape') return; + + if (key.ctrl) { + if (key.name === 'a') return 'first'; + if (key.name === 'c') return 'abort'; + if (key.name === 'd') return 'abort'; + if (key.name === 'e') return 'last'; + if (key.name === 'g') return 'reset'; + } + + if (isSelect) { + if (key.name === 'j') return 'down'; + if (key.name === 'k') return 'up'; + } + + if (key.name === 'return') return 'submit'; + if (key.name === 'enter') return 'submit'; // ctrl + J + + if (key.name === 'backspace') return 'delete'; + if (key.name === 'delete') return 'deleteForward'; + if (key.name === 'abort') return 'abort'; + if (key.name === 'escape') return 'exit'; + if (key.name === 'tab') return 'next'; + if (key.name === 'pagedown') return 'nextPage'; + if (key.name === 'pageup') return 'prevPage'; // TODO create home() in prompt types (e.g. TextPrompt) + + if (key.name === 'home') return 'home'; // TODO create end() in prompt types (e.g. TextPrompt) + + if (key.name === 'end') return 'end'; + if (key.name === 'up') return 'up'; + if (key.name === 'down') return 'down'; + if (key.name === 'right') return 'right'; + if (key.name === 'left') return 'left'; + return false; +}; \ No newline at end of file diff --git a/node_modules/prompts/dist/util/clear.js b/node_modules/prompts/dist/util/clear.js new file mode 100644 index 0000000..5a313be --- /dev/null +++ b/node_modules/prompts/dist/util/clear.js @@ -0,0 +1,42 @@ +'use strict'; + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } + +const strip = require('./strip'); + +const _require = require('sisteransi'), + erase = _require.erase, + cursor = _require.cursor; + +const width = str => [...strip(str)].length; +/** + * @param {string} prompt + * @param {number} perLine + */ + + +module.exports = function (prompt, perLine) { + if (!perLine) return erase.line + cursor.to(0); + let rows = 0; + const lines = prompt.split(/\r?\n/); + + var _iterator = _createForOfIteratorHelper(lines), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + let line = _step.value; + rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / perLine); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + return erase.lines(rows); +}; \ No newline at end of file diff --git a/node_modules/prompts/dist/util/entriesToDisplay.js b/node_modules/prompts/dist/util/entriesToDisplay.js new file mode 100644 index 0000000..fbb963a --- /dev/null +++ b/node_modules/prompts/dist/util/entriesToDisplay.js @@ -0,0 +1,21 @@ +'use strict'; +/** + * Determine what entries should be displayed on the screen, based on the + * currently selected index and the maximum visible. Used in list-based + * prompts like `select` and `multiselect`. + * + * @param {number} cursor the currently selected entry + * @param {number} total the total entries available to display + * @param {number} [maxVisible] the number of entries that can be displayed + */ + +module.exports = (cursor, total, maxVisible) => { + maxVisible = maxVisible || total; + let startIndex = Math.min(total - maxVisible, cursor - Math.floor(maxVisible / 2)); + if (startIndex < 0) startIndex = 0; + let endIndex = Math.min(startIndex + maxVisible, total); + return { + startIndex, + endIndex + }; +}; \ No newline at end of file diff --git a/node_modules/prompts/dist/util/figures.js b/node_modules/prompts/dist/util/figures.js new file mode 100644 index 0000000..036ec50 --- /dev/null +++ b/node_modules/prompts/dist/util/figures.js @@ -0,0 +1,32 @@ +'use strict'; + +const main = { + arrowUp: '↑', + arrowDown: '↓', + arrowLeft: '←', + arrowRight: '→', + radioOn: '◉', + radioOff: '◯', + tick: '✔', + cross: '✖', + ellipsis: '…', + pointerSmall: '›', + line: '─', + pointer: '❯' +}; +const win = { + arrowUp: main.arrowUp, + arrowDown: main.arrowDown, + arrowLeft: main.arrowLeft, + arrowRight: main.arrowRight, + radioOn: '(*)', + radioOff: '( )', + tick: '√', + cross: '×', + ellipsis: '...', + pointerSmall: '»', + line: '─', + pointer: '>' +}; +const figures = process.platform === 'win32' ? win : main; +module.exports = figures; \ No newline at end of file diff --git a/node_modules/prompts/dist/util/index.js b/node_modules/prompts/dist/util/index.js new file mode 100644 index 0000000..dbfe75e --- /dev/null +++ b/node_modules/prompts/dist/util/index.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = { + action: require('./action'), + clear: require('./clear'), + style: require('./style'), + strip: require('./strip'), + figures: require('./figures'), + lines: require('./lines'), + wrap: require('./wrap'), + entriesToDisplay: require('./entriesToDisplay') +}; \ No newline at end of file diff --git a/node_modules/prompts/dist/util/lines.js b/node_modules/prompts/dist/util/lines.js new file mode 100644 index 0000000..54a939a --- /dev/null +++ b/node_modules/prompts/dist/util/lines.js @@ -0,0 +1,14 @@ +'use strict'; + +const strip = require('./strip'); +/** + * @param {string} msg + * @param {number} perLine + */ + + +module.exports = function (msg, perLine) { + let lines = String(strip(msg) || '').split(/\r?\n/); + if (!perLine) return lines.length; + return lines.map(l => Math.ceil(l.length / perLine)).reduce((a, b) => a + b); +}; \ No newline at end of file diff --git a/node_modules/prompts/dist/util/strip.js b/node_modules/prompts/dist/util/strip.js new file mode 100644 index 0000000..dd289a0 --- /dev/null +++ b/node_modules/prompts/dist/util/strip.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = str => { + const pattern = ['[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'].join('|'); + const RGX = new RegExp(pattern, 'g'); + return typeof str === 'string' ? str.replace(RGX, '') : str; +}; \ No newline at end of file diff --git a/node_modules/prompts/dist/util/style.js b/node_modules/prompts/dist/util/style.js new file mode 100644 index 0000000..ed1a49b --- /dev/null +++ b/node_modules/prompts/dist/util/style.js @@ -0,0 +1,51 @@ +'use strict'; + +const c = require('kleur'); + +const figures = require('./figures'); // rendering user input. + + +const styles = Object.freeze({ + password: { + scale: 1, + render: input => '*'.repeat(input.length) + }, + emoji: { + scale: 2, + render: input => '😃'.repeat(input.length) + }, + invisible: { + scale: 0, + render: input => '' + }, + default: { + scale: 1, + render: input => `${input}` + } +}); + +const render = type => styles[type] || styles.default; // icon to signalize a prompt. + + +const symbols = Object.freeze({ + aborted: c.red(figures.cross), + done: c.green(figures.tick), + exited: c.yellow(figures.cross), + default: c.cyan('?') +}); + +const symbol = (done, aborted, exited) => aborted ? symbols.aborted : exited ? symbols.exited : done ? symbols.done : symbols.default; // between the question and the user's input. + + +const delimiter = completing => c.gray(completing ? figures.ellipsis : figures.pointerSmall); + +const item = (expandable, expanded) => c.gray(expandable ? expanded ? figures.pointerSmall : '+' : figures.line); + +module.exports = { + styles, + render, + symbols, + symbol, + delimiter, + item +}; \ No newline at end of file diff --git a/node_modules/prompts/dist/util/wrap.js b/node_modules/prompts/dist/util/wrap.js new file mode 100644 index 0000000..da5e67c --- /dev/null +++ b/node_modules/prompts/dist/util/wrap.js @@ -0,0 +1,16 @@ +'use strict'; +/** + * @param {string} msg The message to wrap + * @param {object} opts + * @param {number|string} [opts.margin] Left margin + * @param {number} opts.width Maximum characters per line including the margin + */ + +module.exports = (msg, opts = {}) => { + const tab = Number.isSafeInteger(parseInt(opts.margin)) ? new Array(parseInt(opts.margin)).fill(' ').join('') : opts.margin || ''; + const width = opts.width; + return (msg || '').split(/\r?\n/g).map(line => line.split(/\s+/g).reduce((arr, w) => { + if (w.length + tab.length >= width || arr[arr.length - 1].length + w.length + 1 < width) arr[arr.length - 1] += ` ${w}`;else arr.push(`${tab}${w}`); + return arr; + }, [tab]).join('\n')).join('\n'); +}; \ No newline at end of file diff --git a/node_modules/prompts/index.js b/node_modules/prompts/index.js new file mode 100644 index 0000000..3479956 --- /dev/null +++ b/node_modules/prompts/index.js @@ -0,0 +1,14 @@ +function isNodeLT(tar) { + tar = (Array.isArray(tar) ? tar : tar.split('.')).map(Number); + let i=0, src=process.versions.node.split('.').map(Number); + for (; i < tar.length; i++) { + if (src[i] > tar[i]) return false; + if (tar[i] > src[i]) return true; + } + return false; +} + +module.exports = + isNodeLT('8.6.0') + ? require('./dist/index.js') + : require('./lib/index.js'); diff --git a/node_modules/prompts/lib/dateparts/datepart.js b/node_modules/prompts/lib/dateparts/datepart.js new file mode 100644 index 0000000..62b893b --- /dev/null +++ b/node_modules/prompts/lib/dateparts/datepart.js @@ -0,0 +1,35 @@ +'use strict'; + +class DatePart { + constructor({token, date, parts, locales}) { + this.token = token; + this.date = date || new Date(); + this.parts = parts || [this]; + this.locales = locales || {}; + } + + up() {} + + down() {} + + next() { + const currentIdx = this.parts.indexOf(this); + return this.parts.find((part, idx) => idx > currentIdx && part instanceof DatePart); + } + + setTo(val) {} + + prev() { + let parts = [].concat(this.parts).reverse(); + const currentIdx = parts.indexOf(this); + return parts.find((part, idx) => idx > currentIdx && part instanceof DatePart); + } + + toString() { + return String(this.date); + } +} + +module.exports = DatePart; + + diff --git a/node_modules/prompts/lib/dateparts/day.js b/node_modules/prompts/lib/dateparts/day.js new file mode 100644 index 0000000..5db84fe --- /dev/null +++ b/node_modules/prompts/lib/dateparts/day.js @@ -0,0 +1,42 @@ +'use strict'; + +const DatePart = require('./datepart'); + +const pos = n => { + n = n % 10; + return n === 1 ? 'st' + : n === 2 ? 'nd' + : n === 3 ? 'rd' + : 'th'; +} + +class Day extends DatePart { + constructor(opts={}) { + super(opts); + } + + up() { + this.date.setDate(this.date.getDate() + 1); + } + + down() { + this.date.setDate(this.date.getDate() - 1); + } + + setTo(val) { + this.date.setDate(parseInt(val.substr(-2))); + } + + toString() { + let date = this.date.getDate(); + let day = this.date.getDay(); + return this.token === 'DD' ? String(date).padStart(2, '0') + : this.token === 'Do' ? date + pos(date) + : this.token === 'd' ? day + 1 + : this.token === 'ddd' ? this.locales.weekdaysShort[day] + : this.token === 'dddd' ? this.locales.weekdays[day] + : date; + } +} + +module.exports = Day; diff --git a/node_modules/prompts/lib/dateparts/hours.js b/node_modules/prompts/lib/dateparts/hours.js new file mode 100644 index 0000000..171b3d2 --- /dev/null +++ b/node_modules/prompts/lib/dateparts/hours.js @@ -0,0 +1,30 @@ +'use strict'; + +const DatePart = require('./datepart'); + +class Hours extends DatePart { + constructor(opts={}) { + super(opts); + } + + up() { + this.date.setHours(this.date.getHours() + 1); + } + + down() { + this.date.setHours(this.date.getHours() - 1); + } + + setTo(val) { + this.date.setHours(parseInt(val.substr(-2))); + } + + toString() { + let hours = this.date.getHours(); + if (/h/.test(this.token)) + hours = (hours % 12) || 12; + return this.token.length > 1 ? String(hours).padStart(2, '0') : hours; + } +} + +module.exports = Hours; diff --git a/node_modules/prompts/lib/dateparts/index.js b/node_modules/prompts/lib/dateparts/index.js new file mode 100644 index 0000000..dc0cc95 --- /dev/null +++ b/node_modules/prompts/lib/dateparts/index.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = { + DatePart: require('./datepart'), + Meridiem: require('./meridiem'), + Day: require('./day'), + Hours: require('./hours'), + Milliseconds: require('./milliseconds'), + Minutes: require('./minutes'), + Month: require('./month'), + Seconds: require('./seconds'), + Year: require('./year'), +} diff --git a/node_modules/prompts/lib/dateparts/meridiem.js b/node_modules/prompts/lib/dateparts/meridiem.js new file mode 100644 index 0000000..8488677 --- /dev/null +++ b/node_modules/prompts/lib/dateparts/meridiem.js @@ -0,0 +1,24 @@ +'use strict'; + +const DatePart = require('./datepart'); + +class Meridiem extends DatePart { + constructor(opts={}) { + super(opts); + } + + up() { + this.date.setHours((this.date.getHours() + 12) % 24); + } + + down() { + this.up(); + } + + toString() { + let meridiem = this.date.getHours() > 12 ? 'pm' : 'am'; + return /\A/.test(this.token) ? meridiem.toUpperCase() : meridiem; + } +} + +module.exports = Meridiem; diff --git a/node_modules/prompts/lib/dateparts/milliseconds.js b/node_modules/prompts/lib/dateparts/milliseconds.js new file mode 100644 index 0000000..8984270 --- /dev/null +++ b/node_modules/prompts/lib/dateparts/milliseconds.js @@ -0,0 +1,28 @@ +'use strict'; + +const DatePart = require('./datepart'); + +class Milliseconds extends DatePart { + constructor(opts={}) { + super(opts); + } + + up() { + this.date.setMilliseconds(this.date.getMilliseconds() + 1); + } + + down() { + this.date.setMilliseconds(this.date.getMilliseconds() - 1); + } + + setTo(val) { + this.date.setMilliseconds(parseInt(val.substr(-(this.token.length)))); + } + + toString() { + return String(this.date.getMilliseconds()).padStart(4, '0') + .substr(0, this.token.length); + } +} + +module.exports = Milliseconds; diff --git a/node_modules/prompts/lib/dateparts/minutes.js b/node_modules/prompts/lib/dateparts/minutes.js new file mode 100644 index 0000000..aa1d8f7 --- /dev/null +++ b/node_modules/prompts/lib/dateparts/minutes.js @@ -0,0 +1,28 @@ +'use strict'; + +const DatePart = require('./datepart'); + +class Minutes extends DatePart { + constructor(opts={}) { + super(opts); + } + + up() { + this.date.setMinutes(this.date.getMinutes() + 1); + } + + down() { + this.date.setMinutes(this.date.getMinutes() - 1); + } + + setTo(val) { + this.date.setMinutes(parseInt(val.substr(-2))); + } + + toString() { + let m = this.date.getMinutes(); + return this.token.length > 1 ? String(m).padStart(2, '0') : m; + } +} + +module.exports = Minutes; diff --git a/node_modules/prompts/lib/dateparts/month.js b/node_modules/prompts/lib/dateparts/month.js new file mode 100644 index 0000000..f656455 --- /dev/null +++ b/node_modules/prompts/lib/dateparts/month.js @@ -0,0 +1,33 @@ +'use strict'; + +const DatePart = require('./datepart'); + +class Month extends DatePart { + constructor(opts={}) { + super(opts); + } + + up() { + this.date.setMonth(this.date.getMonth() + 1); + } + + down() { + this.date.setMonth(this.date.getMonth() - 1); + } + + setTo(val) { + val = parseInt(val.substr(-2)) - 1; + this.date.setMonth(val < 0 ? 0 : val); + } + + toString() { + let month = this.date.getMonth(); + let tl = this.token.length; + return tl === 2 ? String(month + 1).padStart(2, '0') + : tl === 3 ? this.locales.monthsShort[month] + : tl === 4 ? this.locales.months[month] + : String(month + 1); + } +} + +module.exports = Month; diff --git a/node_modules/prompts/lib/dateparts/seconds.js b/node_modules/prompts/lib/dateparts/seconds.js new file mode 100644 index 0000000..0c1a1a4 --- /dev/null +++ b/node_modules/prompts/lib/dateparts/seconds.js @@ -0,0 +1,28 @@ +'use strict'; + +const DatePart = require('./datepart'); + +class Seconds extends DatePart { + constructor(opts={}) { + super(opts); + } + + up() { + this.date.setSeconds(this.date.getSeconds() + 1); + } + + down() { + this.date.setSeconds(this.date.getSeconds() - 1); + } + + setTo(val) { + this.date.setSeconds(parseInt(val.substr(-2))); + } + + toString() { + let s = this.date.getSeconds(); + return this.token.length > 1 ? String(s).padStart(2, '0') : s; + } +} + +module.exports = Seconds; diff --git a/node_modules/prompts/lib/dateparts/year.js b/node_modules/prompts/lib/dateparts/year.js new file mode 100644 index 0000000..f068e43 --- /dev/null +++ b/node_modules/prompts/lib/dateparts/year.js @@ -0,0 +1,28 @@ +'use strict'; + +const DatePart = require('./datepart'); + +class Year extends DatePart { + constructor(opts={}) { + super(opts); + } + + up() { + this.date.setFullYear(this.date.getFullYear() + 1); + } + + down() { + this.date.setFullYear(this.date.getFullYear() - 1); + } + + setTo(val) { + this.date.setFullYear(val.substr(-4)); + } + + toString() { + let year = String(this.date.getFullYear()).padStart(4, '0'); + return this.token.length === 2 ? year.substr(-2) : year; + } +} + +module.exports = Year; diff --git a/node_modules/prompts/lib/elements/autocomplete.js b/node_modules/prompts/lib/elements/autocomplete.js new file mode 100644 index 0000000..8e06da2 --- /dev/null +++ b/node_modules/prompts/lib/elements/autocomplete.js @@ -0,0 +1,264 @@ +'use strict'; + +const color = require('kleur'); +const Prompt = require('./prompt'); +const { erase, cursor } = require('sisteransi'); +const { style, clear, figures, wrap, entriesToDisplay } = require('../util'); + +const getVal = (arr, i) => arr[i] && (arr[i].value || arr[i].title || arr[i]); +const getTitle = (arr, i) => arr[i] && (arr[i].title || arr[i].value || arr[i]); +const getIndex = (arr, valOrTitle) => { + const index = arr.findIndex(el => el.value === valOrTitle || el.title === valOrTitle); + return index > -1 ? index : undefined; +}; + +/** + * TextPrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {Array} opts.choices Array of auto-complete choices objects + * @param {Function} [opts.suggest] Filter function. Defaults to sort by title + * @param {Number} [opts.limit=10] Max number of results to show + * @param {Number} [opts.cursor=0] Cursor start position + * @param {String} [opts.style='default'] Render style + * @param {String} [opts.fallback] Fallback message - initial to default value + * @param {String} [opts.initial] Index of the default value + * @param {Boolean} [opts.clearFirst] The first ESCAPE keypress will clear the input + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + * @param {String} [opts.noMatches] The no matches found label + */ +class AutocompletePrompt extends Prompt { + constructor(opts={}) { + super(opts); + this.msg = opts.message; + this.suggest = opts.suggest; + this.choices = opts.choices; + this.initial = typeof opts.initial === 'number' + ? opts.initial + : getIndex(opts.choices, opts.initial); + this.select = this.initial || opts.cursor || 0; + this.i18n = { noMatches: opts.noMatches || 'no matches found' }; + this.fallback = opts.fallback || this.initial; + this.clearFirst = opts.clearFirst || false; + this.suggestions = []; + this.input = ''; + this.limit = opts.limit || 10; + this.cursor = 0; + this.transform = style.render(opts.style); + this.scale = this.transform.scale; + this.render = this.render.bind(this); + this.complete = this.complete.bind(this); + this.clear = clear('', this.out.columns); + this.complete(this.render); + this.render(); + } + + set fallback(fb) { + this._fb = Number.isSafeInteger(parseInt(fb)) ? parseInt(fb) : fb; + } + + get fallback() { + let choice; + if (typeof this._fb === 'number') + choice = this.choices[this._fb]; + else if (typeof this._fb === 'string') + choice = { title: this._fb }; + return choice || this._fb || { title: this.i18n.noMatches }; + } + + moveSelect(i) { + this.select = i; + if (this.suggestions.length > 0) + this.value = getVal(this.suggestions, i); + else this.value = this.fallback.value; + this.fire(); + } + + async complete(cb) { + const p = (this.completing = this.suggest(this.input, this.choices)); + const suggestions = await p; + + if (this.completing !== p) return; + this.suggestions = suggestions + .map((s, i, arr) => ({ title: getTitle(arr, i), value: getVal(arr, i), description: s.description })); + this.completing = false; + const l = Math.max(suggestions.length - 1, 0); + this.moveSelect(Math.min(l, this.select)); + + cb && cb(); + } + + reset() { + this.input = ''; + this.complete(() => { + this.moveSelect(this.initial !== void 0 ? this.initial : 0); + this.render(); + }); + this.render(); + } + + exit() { + if (this.clearFirst && this.input.length > 0) { + this.reset(); + } else { + this.done = this.exited = true; + this.aborted = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + } + + abort() { + this.done = this.aborted = true; + this.exited = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + submit() { + this.done = true; + this.aborted = this.exited = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + _(c, key) { + let s1 = this.input.slice(0, this.cursor); + let s2 = this.input.slice(this.cursor); + this.input = `${s1}${c}${s2}`; + this.cursor = s1.length+1; + this.complete(this.render); + this.render(); + } + + delete() { + if (this.cursor === 0) return this.bell(); + let s1 = this.input.slice(0, this.cursor-1); + let s2 = this.input.slice(this.cursor); + this.input = `${s1}${s2}`; + this.complete(this.render); + this.cursor = this.cursor-1; + this.render(); + } + + deleteForward() { + if(this.cursor*this.scale >= this.rendered.length) return this.bell(); + let s1 = this.input.slice(0, this.cursor); + let s2 = this.input.slice(this.cursor+1); + this.input = `${s1}${s2}`; + this.complete(this.render); + this.render(); + } + + first() { + this.moveSelect(0); + this.render(); + } + + last() { + this.moveSelect(this.suggestions.length - 1); + this.render(); + } + + up() { + if (this.select === 0) { + this.moveSelect(this.suggestions.length - 1); + } else { + this.moveSelect(this.select - 1); + } + this.render(); + } + + down() { + if (this.select === this.suggestions.length - 1) { + this.moveSelect(0); + } else { + this.moveSelect(this.select + 1); + } + this.render(); + } + + next() { + if (this.select === this.suggestions.length - 1) { + this.moveSelect(0); + } else this.moveSelect(this.select + 1); + this.render(); + } + + nextPage() { + this.moveSelect(Math.min(this.select + this.limit, this.suggestions.length - 1)); + this.render(); + } + + prevPage() { + this.moveSelect(Math.max(this.select - this.limit, 0)); + this.render(); + } + + left() { + if (this.cursor <= 0) return this.bell(); + this.cursor = this.cursor-1; + this.render(); + } + + right() { + if (this.cursor*this.scale >= this.rendered.length) return this.bell(); + this.cursor = this.cursor+1; + this.render(); + } + + renderOption(v, hovered, isStart, isEnd) { + let desc; + let prefix = isStart ? figures.arrowUp : isEnd ? figures.arrowDown : ' '; + let title = hovered ? color.cyan().underline(v.title) : v.title; + prefix = (hovered ? color.cyan(figures.pointer) + ' ' : ' ') + prefix; + if (v.description) { + desc = ` - ${v.description}`; + if (prefix.length + title.length + desc.length >= this.out.columns + || v.description.split(/\r?\n/).length > 1) { + desc = '\n' + wrap(v.description, { margin: 3, width: this.out.columns }) + } + } + return prefix + ' ' + title + color.gray(desc || ''); + } + + render() { + if (this.closed) return; + if (this.firstRender) this.out.write(cursor.hide); + else this.out.write(clear(this.outputText, this.out.columns)); + super.render(); + + let { startIndex, endIndex } = entriesToDisplay(this.select, this.choices.length, this.limit); + + this.outputText = [ + style.symbol(this.done, this.aborted, this.exited), + color.bold(this.msg), + style.delimiter(this.completing), + this.done && this.suggestions[this.select] + ? this.suggestions[this.select].title + : this.rendered = this.transform.render(this.input) + ].join(' '); + + if (!this.done) { + const suggestions = this.suggestions + .slice(startIndex, endIndex) + .map((item, i) => this.renderOption(item, + this.select === i + startIndex, + i === 0 && startIndex > 0, + i + startIndex === endIndex - 1 && endIndex < this.choices.length)) + .join('\n'); + this.outputText += `\n` + (suggestions || color.gray(this.fallback.title)); + } + + this.out.write(erase.line + cursor.to(0) + this.outputText); + } +} + +module.exports = AutocompletePrompt; diff --git a/node_modules/prompts/lib/elements/autocompleteMultiselect.js b/node_modules/prompts/lib/elements/autocompleteMultiselect.js new file mode 100644 index 0000000..b64510f --- /dev/null +++ b/node_modules/prompts/lib/elements/autocompleteMultiselect.js @@ -0,0 +1,194 @@ +'use strict'; + +const color = require('kleur'); +const { cursor } = require('sisteransi'); +const MultiselectPrompt = require('./multiselect'); +const { clear, style, figures } = require('../util'); +/** + * MultiselectPrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {Array} opts.choices Array of choice objects + * @param {String} [opts.hint] Hint to display + * @param {String} [opts.warn] Hint shown for disabled choices + * @param {Number} [opts.max] Max choices + * @param {Number} [opts.cursor=0] Cursor start position + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + */ +class AutocompleteMultiselectPrompt extends MultiselectPrompt { + constructor(opts={}) { + opts.overrideRender = true; + super(opts); + this.inputValue = ''; + this.clear = clear('', this.out.columns); + this.filteredOptions = this.value; + this.render(); + } + + last() { + this.cursor = this.filteredOptions.length - 1; + this.render(); + } + next() { + this.cursor = (this.cursor + 1) % this.filteredOptions.length; + this.render(); + } + + up() { + if (this.cursor === 0) { + this.cursor = this.filteredOptions.length - 1; + } else { + this.cursor--; + } + this.render(); + } + + down() { + if (this.cursor === this.filteredOptions.length - 1) { + this.cursor = 0; + } else { + this.cursor++; + } + this.render(); + } + + left() { + this.filteredOptions[this.cursor].selected = false; + this.render(); + } + + right() { + if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell(); + this.filteredOptions[this.cursor].selected = true; + this.render(); + } + + delete() { + if (this.inputValue.length) { + this.inputValue = this.inputValue.substr(0, this.inputValue.length - 1); + this.updateFilteredOptions(); + } + } + + updateFilteredOptions() { + const currentHighlight = this.filteredOptions[this.cursor]; + this.filteredOptions = this.value + .filter(v => { + if (this.inputValue) { + if (typeof v.title === 'string') { + if (v.title.toLowerCase().includes(this.inputValue.toLowerCase())) { + return true; + } + } + if (typeof v.value === 'string') { + if (v.value.toLowerCase().includes(this.inputValue.toLowerCase())) { + return true; + } + } + return false; + } + return true; + }); + const newHighlightIndex = this.filteredOptions.findIndex(v => v === currentHighlight) + this.cursor = newHighlightIndex < 0 ? 0 : newHighlightIndex; + this.render(); + } + + handleSpaceToggle() { + const v = this.filteredOptions[this.cursor]; + + if (v.selected) { + v.selected = false; + this.render(); + } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) { + return this.bell(); + } else { + v.selected = true; + this.render(); + } + } + + handleInputChange(c) { + this.inputValue = this.inputValue + c; + this.updateFilteredOptions(); + } + + _(c, key) { + if (c === ' ') { + this.handleSpaceToggle(); + } else { + this.handleInputChange(c); + } + } + + renderInstructions() { + if (this.instructions === undefined || this.instructions) { + if (typeof this.instructions === 'string') { + return this.instructions; + } + return ` +Instructions: + ${figures.arrowUp}/${figures.arrowDown}: Highlight option + ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection + [a,b,c]/delete: Filter choices + enter/return: Complete answer +`; + } + return ''; + } + + renderCurrentInput() { + return ` +Filtered results for: ${this.inputValue ? this.inputValue : color.gray('Enter something to filter')}\n`; + } + + renderOption(cursor, v, i) { + let title; + if (v.disabled) title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title); + else title = cursor === i ? color.cyan().underline(v.title) : v.title; + return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + title + } + + renderDoneOrInstructions() { + if (this.done) { + return this.value + .filter(e => e.selected) + .map(v => v.title) + .join(', '); + } + + const output = [color.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()]; + + if (this.filteredOptions.length && this.filteredOptions[this.cursor].disabled) { + output.push(color.yellow(this.warn)); + } + return output.join(' '); + } + + render() { + if (this.closed) return; + if (this.firstRender) this.out.write(cursor.hide); + super.render(); + + // print prompt + + let prompt = [ + style.symbol(this.done, this.aborted), + color.bold(this.msg), + style.delimiter(false), + this.renderDoneOrInstructions() + ].join(' '); + + if (this.showMinError) { + prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`); + this.showMinError = false; + } + prompt += this.renderOptions(this.filteredOptions); + + this.out.write(this.clear + prompt); + this.clear = clear(prompt, this.out.columns); + } +} + +module.exports = AutocompleteMultiselectPrompt; diff --git a/node_modules/prompts/lib/elements/confirm.js b/node_modules/prompts/lib/elements/confirm.js new file mode 100644 index 0000000..7a9173f --- /dev/null +++ b/node_modules/prompts/lib/elements/confirm.js @@ -0,0 +1,89 @@ +const color = require('kleur'); +const Prompt = require('./prompt'); +const { style, clear } = require('../util'); +const { erase, cursor } = require('sisteransi'); + +/** + * ConfirmPrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {Boolean} [opts.initial] Default value (true/false) + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + * @param {String} [opts.yes] The "Yes" label + * @param {String} [opts.yesOption] The "Yes" option when choosing between yes/no + * @param {String} [opts.no] The "No" label + * @param {String} [opts.noOption] The "No" option when choosing between yes/no + */ +class ConfirmPrompt extends Prompt { + constructor(opts={}) { + super(opts); + this.msg = opts.message; + this.value = opts.initial; + this.initialValue = !!opts.initial; + this.yesMsg = opts.yes || 'yes'; + this.yesOption = opts.yesOption || '(Y/n)'; + this.noMsg = opts.no || 'no'; + this.noOption = opts.noOption || '(y/N)'; + this.render(); + } + + reset() { + this.value = this.initialValue; + this.fire(); + this.render(); + } + + exit() { + this.abort(); + } + + abort() { + this.done = this.aborted = true; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + submit() { + this.value = this.value || false; + this.done = true; + this.aborted = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + _(c, key) { + if (c.toLowerCase() === 'y') { + this.value = true; + return this.submit(); + } + if (c.toLowerCase() === 'n') { + this.value = false; + return this.submit(); + } + return this.bell(); + } + + render() { + if (this.closed) return; + if (this.firstRender) this.out.write(cursor.hide); + else this.out.write(clear(this.outputText, this.out.columns)); + super.render(); + + this.outputText = [ + style.symbol(this.done, this.aborted), + color.bold(this.msg), + style.delimiter(this.done), + this.done ? (this.value ? this.yesMsg : this.noMsg) + : color.gray(this.initialValue ? this.yesOption : this.noOption) + ].join(' '); + + this.out.write(erase.line + cursor.to(0) + this.outputText); + } +} + +module.exports = ConfirmPrompt; diff --git a/node_modules/prompts/lib/elements/date.js b/node_modules/prompts/lib/elements/date.js new file mode 100644 index 0000000..71ff608 --- /dev/null +++ b/node_modules/prompts/lib/elements/date.js @@ -0,0 +1,209 @@ +'use strict'; + +const color = require('kleur'); +const Prompt = require('./prompt'); +const { style, clear, figures } = require('../util'); +const { erase, cursor } = require('sisteransi'); +const { DatePart, Meridiem, Day, Hours, Milliseconds, Minutes, Month, Seconds, Year } = require('../dateparts'); + +const regex = /\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g; +const regexGroups = { + 1: ({token}) => token.replace(/\\(.)/g, '$1'), + 2: (opts) => new Day(opts), // Day // TODO + 3: (opts) => new Month(opts), // Month + 4: (opts) => new Year(opts), // Year + 5: (opts) => new Meridiem(opts), // AM/PM // TODO (special) + 6: (opts) => new Hours(opts), // Hours + 7: (opts) => new Minutes(opts), // Minutes + 8: (opts) => new Seconds(opts), // Seconds + 9: (opts) => new Milliseconds(opts), // Fractional seconds +} + +const dfltLocales = { + months: 'January,February,March,April,May,June,July,August,September,October,November,December'.split(','), + monthsShort: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','), + weekdays: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','), + weekdaysShort: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(',') +} + + +/** + * DatePrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {Number} [opts.initial] Index of default value + * @param {String} [opts.mask] The format mask + * @param {object} [opts.locales] The date locales + * @param {String} [opts.error] The error message shown on invalid value + * @param {Function} [opts.validate] Function to validate the submitted value + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + */ +class DatePrompt extends Prompt { + constructor(opts={}) { + super(opts); + this.msg = opts.message; + this.cursor = 0; + this.typed = ''; + this.locales = Object.assign(dfltLocales, opts.locales); + this._date = opts.initial || new Date(); + this.errorMsg = opts.error || 'Please Enter A Valid Value'; + this.validator = opts.validate || (() => true); + this.mask = opts.mask || 'YYYY-MM-DD HH:mm:ss'; + this.clear = clear('', this.out.columns); + this.render(); + } + + get value() { + return this.date + } + + get date() { + return this._date; + } + + set date(date) { + if (date) this._date.setTime(date.getTime()); + } + + set mask(mask) { + let result; + this.parts = []; + while(result = regex.exec(mask)) { + let match = result.shift(); + let idx = result.findIndex(gr => gr != null); + this.parts.push(idx in regexGroups + ? regexGroups[idx]({ token: result[idx] || match, date: this.date, parts: this.parts, locales: this.locales }) + : result[idx] || match); + } + + let parts = this.parts.reduce((arr, i) => { + if (typeof i === 'string' && typeof arr[arr.length - 1] === 'string') + arr[arr.length - 1] += i; + else arr.push(i); + return arr; + }, []); + + this.parts.splice(0); + this.parts.push(...parts); + this.reset(); + } + + moveCursor(n) { + this.typed = ''; + this.cursor = n; + this.fire(); + } + + reset() { + this.moveCursor(this.parts.findIndex(p => p instanceof DatePart)); + this.fire(); + this.render(); + } + + exit() { + this.abort(); + } + + abort() { + this.done = this.aborted = true; + this.error = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + async validate() { + let valid = await this.validator(this.value); + if (typeof valid === 'string') { + this.errorMsg = valid; + valid = false; + } + this.error = !valid; + } + + async submit() { + await this.validate(); + if (this.error) { + this.color = 'red'; + this.fire(); + this.render(); + return; + } + this.done = true; + this.aborted = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + up() { + this.typed = ''; + this.parts[this.cursor].up(); + this.render(); + } + + down() { + this.typed = ''; + this.parts[this.cursor].down(); + this.render(); + } + + left() { + let prev = this.parts[this.cursor].prev(); + if (prev == null) return this.bell(); + this.moveCursor(this.parts.indexOf(prev)); + this.render(); + } + + right() { + let next = this.parts[this.cursor].next(); + if (next == null) return this.bell(); + this.moveCursor(this.parts.indexOf(next)); + this.render(); + } + + next() { + let next = this.parts[this.cursor].next(); + this.moveCursor(next + ? this.parts.indexOf(next) + : this.parts.findIndex((part) => part instanceof DatePart)); + this.render(); + } + + _(c) { + if (/\d/.test(c)) { + this.typed += c; + this.parts[this.cursor].setTo(this.typed); + this.render(); + } + } + + render() { + if (this.closed) return; + if (this.firstRender) this.out.write(cursor.hide); + else this.out.write(clear(this.outputText, this.out.columns)); + super.render(); + + // Print prompt + this.outputText = [ + style.symbol(this.done, this.aborted), + color.bold(this.msg), + style.delimiter(false), + this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), []) + .join('') + ].join(' '); + + // Print error + if (this.error) { + this.outputText += this.errorMsg.split('\n').reduce( + (a, l, i) => a + `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``); + } + + this.out.write(erase.line + cursor.to(0) + this.outputText); + } +} + +module.exports = DatePrompt; diff --git a/node_modules/prompts/lib/elements/index.js b/node_modules/prompts/lib/elements/index.js new file mode 100644 index 0000000..2556dd0 --- /dev/null +++ b/node_modules/prompts/lib/elements/index.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = { + TextPrompt: require('./text'), + SelectPrompt: require('./select'), + TogglePrompt: require('./toggle'), + DatePrompt: require('./date'), + NumberPrompt: require('./number'), + MultiselectPrompt: require('./multiselect'), + AutocompletePrompt: require('./autocomplete'), + AutocompleteMultiselectPrompt: require('./autocompleteMultiselect'), + ConfirmPrompt: require('./confirm') +}; diff --git a/node_modules/prompts/lib/elements/multiselect.js b/node_modules/prompts/lib/elements/multiselect.js new file mode 100644 index 0000000..99b393f --- /dev/null +++ b/node_modules/prompts/lib/elements/multiselect.js @@ -0,0 +1,271 @@ +'use strict'; + +const color = require('kleur'); +const { cursor } = require('sisteransi'); +const Prompt = require('./prompt'); +const { clear, figures, style, wrap, entriesToDisplay } = require('../util'); + +/** + * MultiselectPrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {Array} opts.choices Array of choice objects + * @param {String} [opts.hint] Hint to display + * @param {String} [opts.warn] Hint shown for disabled choices + * @param {Number} [opts.max] Max choices + * @param {Number} [opts.cursor=0] Cursor start position + * @param {Number} [opts.optionsPerPage=10] Max options to display at once + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + */ +class MultiselectPrompt extends Prompt { + constructor(opts={}) { + super(opts); + this.msg = opts.message; + this.cursor = opts.cursor || 0; + this.scrollIndex = opts.cursor || 0; + this.hint = opts.hint || ''; + this.warn = opts.warn || '- This option is disabled -'; + this.minSelected = opts.min; + this.showMinError = false; + this.maxChoices = opts.max; + this.instructions = opts.instructions; + this.optionsPerPage = opts.optionsPerPage || 10; + this.value = opts.choices.map((ch, idx) => { + if (typeof ch === 'string') + ch = {title: ch, value: idx}; + return { + title: ch && (ch.title || ch.value || ch), + description: ch && ch.description, + value: ch && (ch.value === undefined ? idx : ch.value), + selected: ch && ch.selected, + disabled: ch && ch.disabled + }; + }); + this.clear = clear('', this.out.columns); + if (!opts.overrideRender) { + this.render(); + } + } + + reset() { + this.value.map(v => !v.selected); + this.cursor = 0; + this.fire(); + this.render(); + } + + selected() { + return this.value.filter(v => v.selected); + } + + exit() { + this.abort(); + } + + abort() { + this.done = this.aborted = true; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + submit() { + const selected = this.value + .filter(e => e.selected); + if (this.minSelected && selected.length < this.minSelected) { + this.showMinError = true; + this.render(); + } else { + this.done = true; + this.aborted = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + } + + first() { + this.cursor = 0; + this.render(); + } + + last() { + this.cursor = this.value.length - 1; + this.render(); + } + next() { + this.cursor = (this.cursor + 1) % this.value.length; + this.render(); + } + + up() { + if (this.cursor === 0) { + this.cursor = this.value.length - 1; + } else { + this.cursor--; + } + this.render(); + } + + down() { + if (this.cursor === this.value.length - 1) { + this.cursor = 0; + } else { + this.cursor++; + } + this.render(); + } + + left() { + this.value[this.cursor].selected = false; + this.render(); + } + + right() { + if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell(); + this.value[this.cursor].selected = true; + this.render(); + } + + handleSpaceToggle() { + const v = this.value[this.cursor]; + + if (v.selected) { + v.selected = false; + this.render(); + } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) { + return this.bell(); + } else { + v.selected = true; + this.render(); + } + } + + toggleAll() { + if (this.maxChoices !== undefined || this.value[this.cursor].disabled) { + return this.bell(); + } + + const newSelected = !this.value[this.cursor].selected; + this.value.filter(v => !v.disabled).forEach(v => v.selected = newSelected); + this.render(); + } + + _(c, key) { + if (c === ' ') { + this.handleSpaceToggle(); + } else if (c === 'a') { + this.toggleAll(); + } else { + return this.bell(); + } + } + + renderInstructions() { + if (this.instructions === undefined || this.instructions) { + if (typeof this.instructions === 'string') { + return this.instructions; + } + return '\nInstructions:\n' + + ` ${figures.arrowUp}/${figures.arrowDown}: Highlight option\n` + + ` ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection\n` + + (this.maxChoices === undefined ? ` a: Toggle all\n` : '') + + ` enter/return: Complete answer`; + } + return ''; + } + + renderOption(cursor, v, i, arrowIndicator) { + const prefix = (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + arrowIndicator + ' '; + let title, desc; + + if (v.disabled) { + title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title); + } else { + title = cursor === i ? color.cyan().underline(v.title) : v.title; + if (cursor === i && v.description) { + desc = ` - ${v.description}`; + if (prefix.length + title.length + desc.length >= this.out.columns + || v.description.split(/\r?\n/).length > 1) { + desc = '\n' + wrap(v.description, { margin: prefix.length, width: this.out.columns }); + } + } + } + + return prefix + title + color.gray(desc || ''); + } + + // shared with autocompleteMultiselect + paginateOptions(options) { + if (options.length === 0) { + return color.red('No matches for this query.'); + } + + let { startIndex, endIndex } = entriesToDisplay(this.cursor, options.length, this.optionsPerPage); + let prefix, styledOptions = []; + + for (let i = startIndex; i < endIndex; i++) { + if (i === startIndex && startIndex > 0) { + prefix = figures.arrowUp; + } else if (i === endIndex - 1 && endIndex < options.length) { + prefix = figures.arrowDown; + } else { + prefix = ' '; + } + styledOptions.push(this.renderOption(this.cursor, options[i], i, prefix)); + } + + return '\n' + styledOptions.join('\n'); + } + + // shared with autocomleteMultiselect + renderOptions(options) { + if (!this.done) { + return this.paginateOptions(options); + } + return ''; + } + + renderDoneOrInstructions() { + if (this.done) { + return this.value + .filter(e => e.selected) + .map(v => v.title) + .join(', '); + } + + const output = [color.gray(this.hint), this.renderInstructions()]; + + if (this.value[this.cursor].disabled) { + output.push(color.yellow(this.warn)); + } + return output.join(' '); + } + + render() { + if (this.closed) return; + if (this.firstRender) this.out.write(cursor.hide); + super.render(); + + // print prompt + let prompt = [ + style.symbol(this.done, this.aborted), + color.bold(this.msg), + style.delimiter(false), + this.renderDoneOrInstructions() + ].join(' '); + if (this.showMinError) { + prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`); + this.showMinError = false; + } + prompt += this.renderOptions(this.value); + + this.out.write(this.clear + prompt); + this.clear = clear(prompt, this.out.columns); + } +} + +module.exports = MultiselectPrompt; diff --git a/node_modules/prompts/lib/elements/number.js b/node_modules/prompts/lib/elements/number.js new file mode 100644 index 0000000..dc3efe9 --- /dev/null +++ b/node_modules/prompts/lib/elements/number.js @@ -0,0 +1,213 @@ +const color = require('kleur'); +const Prompt = require('./prompt'); +const { cursor, erase } = require('sisteransi'); +const { style, figures, clear, lines } = require('../util'); + +const isNumber = /[0-9]/; +const isDef = any => any !== undefined; +const round = (number, precision) => { + let factor = Math.pow(10, precision); + return Math.round(number * factor) / factor; +} + +/** + * NumberPrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {String} [opts.style='default'] Render style + * @param {Number} [opts.initial] Default value + * @param {Number} [opts.max=+Infinity] Max value + * @param {Number} [opts.min=-Infinity] Min value + * @param {Boolean} [opts.float=false] Parse input as floats + * @param {Number} [opts.round=2] Round floats to x decimals + * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys + * @param {Function} [opts.validate] Validate function + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + * @param {String} [opts.error] The invalid error label + */ +class NumberPrompt extends Prompt { + constructor(opts={}) { + super(opts); + this.transform = style.render(opts.style); + this.msg = opts.message; + this.initial = isDef(opts.initial) ? opts.initial : ''; + this.float = !!opts.float; + this.round = opts.round || 2; + this.inc = opts.increment || 1; + this.min = isDef(opts.min) ? opts.min : -Infinity; + this.max = isDef(opts.max) ? opts.max : Infinity; + this.errorMsg = opts.error || `Please Enter A Valid Value`; + this.validator = opts.validate || (() => true); + this.color = `cyan`; + this.value = ``; + this.typed = ``; + this.lastHit = 0; + this.render(); + } + + set value(v) { + if (!v && v !== 0) { + this.placeholder = true; + this.rendered = color.gray(this.transform.render(`${this.initial}`)); + this._value = ``; + } else { + this.placeholder = false; + this.rendered = this.transform.render(`${round(v, this.round)}`); + this._value = round(v, this.round); + } + this.fire(); + } + + get value() { + return this._value; + } + + parse(x) { + return this.float ? parseFloat(x) : parseInt(x); + } + + valid(c) { + return c === `-` || c === `.` && this.float || isNumber.test(c) + } + + reset() { + this.typed = ``; + this.value = ``; + this.fire(); + this.render(); + } + + exit() { + this.abort(); + } + + abort() { + let x = this.value; + this.value = x !== `` ? x : this.initial; + this.done = this.aborted = true; + this.error = false; + this.fire(); + this.render(); + this.out.write(`\n`); + this.close(); + } + + async validate() { + let valid = await this.validator(this.value); + if (typeof valid === `string`) { + this.errorMsg = valid; + valid = false; + } + this.error = !valid; + } + + async submit() { + await this.validate(); + if (this.error) { + this.color = `red`; + this.fire(); + this.render(); + return; + } + let x = this.value; + this.value = x !== `` ? x : this.initial; + this.done = true; + this.aborted = false; + this.error = false; + this.fire(); + this.render(); + this.out.write(`\n`); + this.close(); + } + + up() { + this.typed = ``; + if(this.value === '') { + this.value = this.min - this.inc; + } + if (this.value >= this.max) return this.bell(); + this.value += this.inc; + this.color = `cyan`; + this.fire(); + this.render(); + } + + down() { + this.typed = ``; + if(this.value === '') { + this.value = this.min + this.inc; + } + if (this.value <= this.min) return this.bell(); + this.value -= this.inc; + this.color = `cyan`; + this.fire(); + this.render(); + } + + delete() { + let val = this.value.toString(); + if (val.length === 0) return this.bell(); + this.value = this.parse((val = val.slice(0, -1))) || ``; + if (this.value !== '' && this.value < this.min) { + this.value = this.min; + } + this.color = `cyan`; + this.fire(); + this.render(); + } + + next() { + this.value = this.initial; + this.fire(); + this.render(); + } + + _(c, key) { + if (!this.valid(c)) return this.bell(); + + const now = Date.now(); + if (now - this.lastHit > 1000) this.typed = ``; // 1s elapsed + this.typed += c; + this.lastHit = now; + this.color = `cyan`; + + if (c === `.`) return this.fire(); + + this.value = Math.min(this.parse(this.typed), this.max); + if (this.value > this.max) this.value = this.max; + if (this.value < this.min) this.value = this.min; + this.fire(); + this.render(); + } + + render() { + if (this.closed) return; + if (!this.firstRender) { + if (this.outputError) + this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns)); + this.out.write(clear(this.outputText, this.out.columns)); + } + super.render(); + this.outputError = ''; + + // Print prompt + this.outputText = [ + style.symbol(this.done, this.aborted), + color.bold(this.msg), + style.delimiter(this.done), + !this.done || (!this.done && !this.placeholder) + ? color[this.color]().underline(this.rendered) : this.rendered + ].join(` `); + + // Print error + if (this.error) { + this.outputError += this.errorMsg.split(`\n`) + .reduce((a, l, i) => a + `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``); + } + + this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore); + } +} + +module.exports = NumberPrompt; diff --git a/node_modules/prompts/lib/elements/prompt.js b/node_modules/prompts/lib/elements/prompt.js new file mode 100644 index 0000000..b793330 --- /dev/null +++ b/node_modules/prompts/lib/elements/prompt.js @@ -0,0 +1,68 @@ +'use strict'; + +const readline = require('readline'); +const { action } = require('../util'); +const EventEmitter = require('events'); +const { beep, cursor } = require('sisteransi'); +const color = require('kleur'); + +/** + * Base prompt skeleton + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + */ +class Prompt extends EventEmitter { + constructor(opts={}) { + super(); + + this.firstRender = true; + this.in = opts.stdin || process.stdin; + this.out = opts.stdout || process.stdout; + this.onRender = (opts.onRender || (() => void 0)).bind(this); + const rl = readline.createInterface({ input:this.in, escapeCodeTimeout:50 }); + readline.emitKeypressEvents(this.in, rl); + + if (this.in.isTTY) this.in.setRawMode(true); + const isSelect = [ 'SelectPrompt', 'MultiselectPrompt' ].indexOf(this.constructor.name) > -1; + const keypress = (str, key) => { + let a = action(key, isSelect); + if (a === false) { + this._ && this._(str, key); + } else if (typeof this[a] === 'function') { + this[a](key); + } else { + this.bell(); + } + }; + + this.close = () => { + this.out.write(cursor.show); + this.in.removeListener('keypress', keypress); + if (this.in.isTTY) this.in.setRawMode(false); + rl.close(); + this.emit(this.aborted ? 'abort' : this.exited ? 'exit' : 'submit', this.value); + this.closed = true; + }; + + this.in.on('keypress', keypress); + } + + fire() { + this.emit('state', { + value: this.value, + aborted: !!this.aborted, + exited: !!this.exited + }); + } + + bell() { + this.out.write(beep); + } + + render() { + this.onRender(color); + if (this.firstRender) this.firstRender = false; + } +} + +module.exports = Prompt; diff --git a/node_modules/prompts/lib/elements/select.js b/node_modules/prompts/lib/elements/select.js new file mode 100644 index 0000000..6d6727f --- /dev/null +++ b/node_modules/prompts/lib/elements/select.js @@ -0,0 +1,175 @@ +'use strict'; + +const color = require('kleur'); +const Prompt = require('./prompt'); +const { style, clear, figures, wrap, entriesToDisplay } = require('../util'); +const { cursor } = require('sisteransi'); + +/** + * SelectPrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {Array} opts.choices Array of choice objects + * @param {String} [opts.hint] Hint to display + * @param {Number} [opts.initial] Index of default value + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + * @param {Number} [opts.optionsPerPage=10] Max options to display at once + */ +class SelectPrompt extends Prompt { + constructor(opts={}) { + super(opts); + this.msg = opts.message; + this.hint = opts.hint || '- Use arrow-keys. Return to submit.'; + this.warn = opts.warn || '- This option is disabled'; + this.cursor = opts.initial || 0; + this.choices = opts.choices.map((ch, idx) => { + if (typeof ch === 'string') + ch = {title: ch, value: idx}; + return { + title: ch && (ch.title || ch.value || ch), + value: ch && (ch.value === undefined ? idx : ch.value), + description: ch && ch.description, + selected: ch && ch.selected, + disabled: ch && ch.disabled + }; + }); + this.optionsPerPage = opts.optionsPerPage || 10; + this.value = (this.choices[this.cursor] || {}).value; + this.clear = clear('', this.out.columns); + this.render(); + } + + moveCursor(n) { + this.cursor = n; + this.value = this.choices[n].value; + this.fire(); + } + + reset() { + this.moveCursor(0); + this.fire(); + this.render(); + } + + exit() { + this.abort(); + } + + abort() { + this.done = this.aborted = true; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + submit() { + if (!this.selection.disabled) { + this.done = true; + this.aborted = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } else + this.bell(); + } + + first() { + this.moveCursor(0); + this.render(); + } + + last() { + this.moveCursor(this.choices.length - 1); + this.render(); + } + + up() { + if (this.cursor === 0) { + this.moveCursor(this.choices.length - 1); + } else { + this.moveCursor(this.cursor - 1); + } + this.render(); + } + + down() { + if (this.cursor === this.choices.length - 1) { + this.moveCursor(0); + } else { + this.moveCursor(this.cursor + 1); + } + this.render(); + } + + next() { + this.moveCursor((this.cursor + 1) % this.choices.length); + this.render(); + } + + _(c, key) { + if (c === ' ') return this.submit(); + } + + get selection() { + return this.choices[this.cursor]; + } + + render() { + if (this.closed) return; + if (this.firstRender) this.out.write(cursor.hide); + else this.out.write(clear(this.outputText, this.out.columns)); + super.render(); + + let { startIndex, endIndex } = entriesToDisplay(this.cursor, this.choices.length, this.optionsPerPage); + + // Print prompt + this.outputText = [ + style.symbol(this.done, this.aborted), + color.bold(this.msg), + style.delimiter(false), + this.done ? this.selection.title : this.selection.disabled + ? color.yellow(this.warn) : color.gray(this.hint) + ].join(' '); + + // Print choices + if (!this.done) { + this.outputText += '\n'; + for (let i = startIndex; i < endIndex; i++) { + let title, prefix, desc = '', v = this.choices[i]; + + // Determine whether to display "more choices" indicators + if (i === startIndex && startIndex > 0) { + prefix = figures.arrowUp; + } else if (i === endIndex - 1 && endIndex < this.choices.length) { + prefix = figures.arrowDown; + } else { + prefix = ' '; + } + + if (v.disabled) { + title = this.cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title); + prefix = (this.cursor === i ? color.bold().gray(figures.pointer) + ' ' : ' ') + prefix; + } else { + title = this.cursor === i ? color.cyan().underline(v.title) : v.title; + prefix = (this.cursor === i ? color.cyan(figures.pointer) + ' ' : ' ') + prefix; + if (v.description && this.cursor === i) { + desc = ` - ${v.description}`; + if (prefix.length + title.length + desc.length >= this.out.columns + || v.description.split(/\r?\n/).length > 1) { + desc = '\n' + wrap(v.description, { margin: 3, width: this.out.columns }); + } + } + } + + this.outputText += `${prefix} ${title}${color.gray(desc)}\n`; + } + } + + this.out.write(this.outputText); + } +} + +module.exports = SelectPrompt; diff --git a/node_modules/prompts/lib/elements/text.js b/node_modules/prompts/lib/elements/text.js new file mode 100644 index 0000000..ee78181 --- /dev/null +++ b/node_modules/prompts/lib/elements/text.js @@ -0,0 +1,208 @@ +const color = require('kleur'); +const Prompt = require('./prompt'); +const { erase, cursor } = require('sisteransi'); +const { style, clear, lines, figures } = require('../util'); + +/** + * TextPrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {String} [opts.style='default'] Render style + * @param {String} [opts.initial] Default value + * @param {Function} [opts.validate] Validate function + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + * @param {String} [opts.error] The invalid error label + */ +class TextPrompt extends Prompt { + constructor(opts={}) { + super(opts); + this.transform = style.render(opts.style); + this.scale = this.transform.scale; + this.msg = opts.message; + this.initial = opts.initial || ``; + this.validator = opts.validate || (() => true); + this.value = ``; + this.errorMsg = opts.error || `Please Enter A Valid Value`; + this.cursor = Number(!!this.initial); + this.cursorOffset = 0; + this.clear = clear(``, this.out.columns); + this.render(); + } + + set value(v) { + if (!v && this.initial) { + this.placeholder = true; + this.rendered = color.gray(this.transform.render(this.initial)); + } else { + this.placeholder = false; + this.rendered = this.transform.render(v); + } + this._value = v; + this.fire(); + } + + get value() { + return this._value; + } + + reset() { + this.value = ``; + this.cursor = Number(!!this.initial); + this.cursorOffset = 0; + this.fire(); + this.render(); + } + + exit() { + this.abort(); + } + + abort() { + this.value = this.value || this.initial; + this.done = this.aborted = true; + this.error = false; + this.red = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + async validate() { + let valid = await this.validator(this.value); + if (typeof valid === `string`) { + this.errorMsg = valid; + valid = false; + } + this.error = !valid; + } + + async submit() { + this.value = this.value || this.initial; + this.cursorOffset = 0; + this.cursor = this.rendered.length; + await this.validate(); + if (this.error) { + this.red = true; + this.fire(); + this.render(); + return; + } + this.done = true; + this.aborted = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + next() { + if (!this.placeholder) return this.bell(); + this.value = this.initial; + this.cursor = this.rendered.length; + this.fire(); + this.render(); + } + + moveCursor(n) { + if (this.placeholder) return; + this.cursor = this.cursor+n; + this.cursorOffset += n; + } + + _(c, key) { + let s1 = this.value.slice(0, this.cursor); + let s2 = this.value.slice(this.cursor); + this.value = `${s1}${c}${s2}`; + this.red = false; + this.cursor = this.placeholder ? 0 : s1.length+1; + this.render(); + } + + delete() { + if (this.isCursorAtStart()) return this.bell(); + let s1 = this.value.slice(0, this.cursor-1); + let s2 = this.value.slice(this.cursor); + this.value = `${s1}${s2}`; + this.red = false; + if (this.isCursorAtStart()) { + this.cursorOffset = 0 + } else { + this.cursorOffset++; + this.moveCursor(-1); + } + this.render(); + } + + deleteForward() { + if(this.cursor*this.scale >= this.rendered.length || this.placeholder) return this.bell(); + let s1 = this.value.slice(0, this.cursor); + let s2 = this.value.slice(this.cursor+1); + this.value = `${s1}${s2}`; + this.red = false; + if (this.isCursorAtEnd()) { + this.cursorOffset = 0; + } else { + this.cursorOffset++; + } + this.render(); + } + + first() { + this.cursor = 0; + this.render(); + } + + last() { + this.cursor = this.value.length; + this.render(); + } + + left() { + if (this.cursor <= 0 || this.placeholder) return this.bell(); + this.moveCursor(-1); + this.render(); + } + + right() { + if (this.cursor*this.scale >= this.rendered.length || this.placeholder) return this.bell(); + this.moveCursor(1); + this.render(); + } + + isCursorAtStart() { + return this.cursor === 0 || (this.placeholder && this.cursor === 1); + } + + isCursorAtEnd() { + return this.cursor === this.rendered.length || (this.placeholder && this.cursor === this.rendered.length + 1) + } + + render() { + if (this.closed) return; + if (!this.firstRender) { + if (this.outputError) + this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns)); + this.out.write(clear(this.outputText, this.out.columns)); + } + super.render(); + this.outputError = ''; + + this.outputText = [ + style.symbol(this.done, this.aborted), + color.bold(this.msg), + style.delimiter(this.done), + this.red ? color.red(this.rendered) : this.rendered + ].join(` `); + + if (this.error) { + this.outputError += this.errorMsg.split(`\n`) + .reduce((a, l, i) => a + `\n${i ? ' ' : figures.pointerSmall} ${color.red().italic(l)}`, ``); + } + + this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore + cursor.move(this.cursorOffset, 0)); + } +} + +module.exports = TextPrompt; \ No newline at end of file diff --git a/node_modules/prompts/lib/elements/toggle.js b/node_modules/prompts/lib/elements/toggle.js new file mode 100644 index 0000000..bad612c --- /dev/null +++ b/node_modules/prompts/lib/elements/toggle.js @@ -0,0 +1,118 @@ +const color = require('kleur'); +const Prompt = require('./prompt'); +const { style, clear } = require('../util'); +const { cursor, erase } = require('sisteransi'); + +/** + * TogglePrompt Base Element + * @param {Object} opts Options + * @param {String} opts.message Message + * @param {Boolean} [opts.initial=false] Default value + * @param {String} [opts.active='no'] Active label + * @param {String} [opts.inactive='off'] Inactive label + * @param {Stream} [opts.stdin] The Readable stream to listen to + * @param {Stream} [opts.stdout] The Writable stream to write readline data to + */ +class TogglePrompt extends Prompt { + constructor(opts={}) { + super(opts); + this.msg = opts.message; + this.value = !!opts.initial; + this.active = opts.active || 'on'; + this.inactive = opts.inactive || 'off'; + this.initialValue = this.value; + this.render(); + } + + reset() { + this.value = this.initialValue; + this.fire(); + this.render(); + } + + exit() { + this.abort(); + } + + abort() { + this.done = this.aborted = true; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + submit() { + this.done = true; + this.aborted = false; + this.fire(); + this.render(); + this.out.write('\n'); + this.close(); + } + + deactivate() { + if (this.value === false) return this.bell(); + this.value = false; + this.render(); + } + + activate() { + if (this.value === true) return this.bell(); + this.value = true; + this.render(); + } + + delete() { + this.deactivate(); + } + left() { + this.deactivate(); + } + right() { + this.activate(); + } + down() { + this.deactivate(); + } + up() { + this.activate(); + } + + next() { + this.value = !this.value; + this.fire(); + this.render(); + } + + _(c, key) { + if (c === ' ') { + this.value = !this.value; + } else if (c === '1') { + this.value = true; + } else if (c === '0') { + this.value = false; + } else return this.bell(); + this.render(); + } + + render() { + if (this.closed) return; + if (this.firstRender) this.out.write(cursor.hide); + else this.out.write(clear(this.outputText, this.out.columns)); + super.render(); + + this.outputText = [ + style.symbol(this.done, this.aborted), + color.bold(this.msg), + style.delimiter(this.done), + this.value ? this.inactive : color.cyan().underline(this.inactive), + color.gray('/'), + this.value ? color.cyan().underline(this.active) : this.active + ].join(' '); + + this.out.write(erase.line + cursor.to(0) + this.outputText); + } +} + +module.exports = TogglePrompt; diff --git a/node_modules/prompts/lib/index.js b/node_modules/prompts/lib/index.js new file mode 100644 index 0000000..a5374d5 --- /dev/null +++ b/node_modules/prompts/lib/index.js @@ -0,0 +1,98 @@ +'use strict'; + +const prompts = require('./prompts'); + +const passOn = ['suggest', 'format', 'onState', 'validate', 'onRender', 'type']; +const noop = () => {}; + +/** + * Prompt for a series of questions + * @param {Array|Object} questions Single question object or Array of question objects + * @param {Function} [onSubmit] Callback function called on prompt submit + * @param {Function} [onCancel] Callback function called on cancel/abort + * @returns {Object} Object with values from user input + */ +async function prompt(questions=[], { onSubmit=noop, onCancel=noop }={}) { + const answers = {}; + const override = prompt._override || {}; + questions = [].concat(questions); + let answer, question, quit, name, type, lastPrompt; + + const getFormattedAnswer = async (question, answer, skipValidation = false) => { + if (!skipValidation && question.validate && question.validate(answer) !== true) { + return; + } + return question.format ? await question.format(answer, answers) : answer + }; + + for (question of questions) { + ({ name, type } = question); + + // evaluate type first and skip if type is a falsy value + if (typeof type === 'function') { + type = await type(answer, { ...answers }, question) + question['type'] = type + } + if (!type) continue; + + // if property is a function, invoke it unless it's a special function + for (let key in question) { + if (passOn.includes(key)) continue; + let value = question[key]; + question[key] = typeof value === 'function' ? await value(answer, { ...answers }, lastPrompt) : value; + } + + lastPrompt = question; + + if (typeof question.message !== 'string') { + throw new Error('prompt message is required'); + } + + // update vars in case they changed + ({ name, type } = question); + + if (prompts[type] === void 0) { + throw new Error(`prompt type (${type}) is not defined`); + } + + if (override[question.name] !== undefined) { + answer = await getFormattedAnswer(question, override[question.name]); + if (answer !== undefined) { + answers[name] = answer; + continue; + } + } + + try { + // Get the injected answer if there is one or prompt the user + answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts[type](question); + answers[name] = answer = await getFormattedAnswer(question, answer, true); + quit = await onSubmit(question, answer, answers); + } catch (err) { + quit = !(await onCancel(question, answers)); + } + + if (quit) return answers; + } + + return answers; +} + +function getInjectedAnswer(injected, deafultValue) { + const answer = injected.shift(); + if (answer instanceof Error) { + throw answer; + } + + return (answer === undefined) ? deafultValue : answer; +} + +function inject(answers) { + prompt._injected = (prompt._injected || []).concat(answers); +} + +function override(answers) { + prompt._override = Object.assign({}, answers); +} + +module.exports = Object.assign(prompt, { prompt, prompts, inject, override }); diff --git a/node_modules/prompts/lib/prompts.js b/node_modules/prompts/lib/prompts.js new file mode 100644 index 0000000..9f62556 --- /dev/null +++ b/node_modules/prompts/lib/prompts.js @@ -0,0 +1,206 @@ +'use strict'; +const $ = exports; +const el = require('./elements'); +const noop = v => v; + +function toPrompt(type, args, opts={}) { + return new Promise((res, rej) => { + const p = new el[type](args); + const onAbort = opts.onAbort || noop; + const onSubmit = opts.onSubmit || noop; + const onExit = opts.onExit || noop; + p.on('state', args.onState || noop); + p.on('submit', x => res(onSubmit(x))); + p.on('exit', x => res(onExit(x))); + p.on('abort', x => rej(onAbort(x))); + }); +} + +/** + * Text prompt + * @param {string} args.message Prompt message to display + * @param {string} [args.initial] Default string value + * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') + * @param {function} [args.onState] On state change callback + * @param {function} [args.validate] Function to validate user input + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ +$.text = args => toPrompt('TextPrompt', args); + +/** + * Password prompt with masked input + * @param {string} args.message Prompt message to display + * @param {string} [args.initial] Default string value + * @param {function} [args.onState] On state change callback + * @param {function} [args.validate] Function to validate user input + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ +$.password = args => { + args.style = 'password'; + return $.text(args); +}; + +/** + * Prompt where input is invisible, like sudo + * @param {string} args.message Prompt message to display + * @param {string} [args.initial] Default string value + * @param {function} [args.onState] On state change callback + * @param {function} [args.validate] Function to validate user input + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ +$.invisible = args => { + args.style = 'invisible'; + return $.text(args); +}; + +/** + * Number prompt + * @param {string} args.message Prompt message to display + * @param {number} args.initial Default number value + * @param {function} [args.onState] On state change callback + * @param {number} [args.max] Max value + * @param {number} [args.min] Min value + * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') + * @param {Boolean} [opts.float=false] Parse input as floats + * @param {Number} [opts.round=2] Round floats to x decimals + * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys + * @param {function} [args.validate] Function to validate user input + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ +$.number = args => toPrompt('NumberPrompt', args); + +/** + * Date prompt + * @param {string} args.message Prompt message to display + * @param {number} args.initial Default number value + * @param {function} [args.onState] On state change callback + * @param {number} [args.max] Max value + * @param {number} [args.min] Min value + * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') + * @param {Boolean} [opts.float=false] Parse input as floats + * @param {Number} [opts.round=2] Round floats to x decimals + * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys + * @param {function} [args.validate] Function to validate user input + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ +$.date = args => toPrompt('DatePrompt', args); + +/** + * Classic yes/no prompt + * @param {string} args.message Prompt message to display + * @param {boolean} [args.initial=false] Default value + * @param {function} [args.onState] On state change callback + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ +$.confirm = args => toPrompt('ConfirmPrompt', args); + +/** + * List prompt, split intput string by `seperator` + * @param {string} args.message Prompt message to display + * @param {string} [args.initial] Default string value + * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') + * @param {string} [args.separator] String separator + * @param {function} [args.onState] On state change callback + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input, in form of an `Array` + */ +$.list = args => { + const sep = args.separator || ','; + return toPrompt('TextPrompt', args, { + onSubmit: str => str.split(sep).map(s => s.trim()) + }); +}; + +/** + * Toggle/switch prompt + * @param {string} args.message Prompt message to display + * @param {boolean} [args.initial=false] Default value + * @param {string} [args.active="on"] Text for `active` state + * @param {string} [args.inactive="off"] Text for `inactive` state + * @param {function} [args.onState] On state change callback + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ +$.toggle = args => toPrompt('TogglePrompt', args); + +/** + * Interactive select prompt + * @param {string} args.message Prompt message to display + * @param {Array} args.choices Array of choices objects `[{ title, value }, ...]` + * @param {number} [args.initial] Index of default value + * @param {String} [args.hint] Hint to display + * @param {function} [args.onState] On state change callback + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ +$.select = args => toPrompt('SelectPrompt', args); + +/** + * Interactive multi-select / autocompleteMultiselect prompt + * @param {string} args.message Prompt message to display + * @param {Array} args.choices Array of choices objects `[{ title, value, [selected] }, ...]` + * @param {number} [args.max] Max select + * @param {string} [args.hint] Hint to display user + * @param {Number} [args.cursor=0] Cursor start position + * @param {function} [args.onState] On state change callback + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ +$.multiselect = args => { + args.choices = [].concat(args.choices || []); + const toSelected = items => items.filter(item => item.selected).map(item => item.value); + return toPrompt('MultiselectPrompt', args, { + onAbort: toSelected, + onSubmit: toSelected + }); +}; + +$.autocompleteMultiselect = args => { + args.choices = [].concat(args.choices || []); + const toSelected = items => items.filter(item => item.selected).map(item => item.value); + return toPrompt('AutocompleteMultiselectPrompt', args, { + onAbort: toSelected, + onSubmit: toSelected + }); +}; + +const byTitle = (input, choices) => Promise.resolve( + choices.filter(item => item.title.slice(0, input.length).toLowerCase() === input.toLowerCase()) +); + +/** + * Interactive auto-complete prompt + * @param {string} args.message Prompt message to display + * @param {Array} args.choices Array of auto-complete choices objects `[{ title, value }, ...]` + * @param {Function} [args.suggest] Function to filter results based on user input. Defaults to sort by `title` + * @param {number} [args.limit=10] Max number of results to show + * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') + * @param {String} [args.initial] Index of the default value + * @param {boolean} [opts.clearFirst] The first ESCAPE keypress will clear the input + * @param {String} [args.fallback] Fallback message - defaults to initial value + * @param {function} [args.onState] On state change callback + * @param {Stream} [args.stdin] The Readable stream to listen to + * @param {Stream} [args.stdout] The Writable stream to write readline data to + * @returns {Promise} Promise with user input + */ +$.autocomplete = args => { + args.suggest = args.suggest || byTitle; + args.choices = [].concat(args.choices || []); + return toPrompt('AutocompletePrompt', args); +}; diff --git a/node_modules/prompts/lib/util/action.js b/node_modules/prompts/lib/util/action.js new file mode 100644 index 0000000..fefbd94 --- /dev/null +++ b/node_modules/prompts/lib/util/action.js @@ -0,0 +1,39 @@ +'use strict'; + +module.exports = (key, isSelect) => { + if (key.meta && key.name !== 'escape') return; + + if (key.ctrl) { + if (key.name === 'a') return 'first'; + if (key.name === 'c') return 'abort'; + if (key.name === 'd') return 'abort'; + if (key.name === 'e') return 'last'; + if (key.name === 'g') return 'reset'; + } + + if (isSelect) { + if (key.name === 'j') return 'down'; + if (key.name === 'k') return 'up'; + } + + if (key.name === 'return') return 'submit'; + if (key.name === 'enter') return 'submit'; // ctrl + J + if (key.name === 'backspace') return 'delete'; + if (key.name === 'delete') return 'deleteForward'; + if (key.name === 'abort') return 'abort'; + if (key.name === 'escape') return 'exit'; + if (key.name === 'tab') return 'next'; + if (key.name === 'pagedown') return 'nextPage'; + if (key.name === 'pageup') return 'prevPage'; + // TODO create home() in prompt types (e.g. TextPrompt) + if (key.name === 'home') return 'home'; + // TODO create end() in prompt types (e.g. TextPrompt) + if (key.name === 'end') return 'end'; + + if (key.name === 'up') return 'up'; + if (key.name === 'down') return 'down'; + if (key.name === 'right') return 'right'; + if (key.name === 'left') return 'left'; + + return false; +}; diff --git a/node_modules/prompts/lib/util/clear.js b/node_modules/prompts/lib/util/clear.js new file mode 100644 index 0000000..e4772d5 --- /dev/null +++ b/node_modules/prompts/lib/util/clear.js @@ -0,0 +1,22 @@ +'use strict'; + +const strip = require('./strip'); +const { erase, cursor } = require('sisteransi'); + +const width = str => [...strip(str)].length; + +/** + * @param {string} prompt + * @param {number} perLine + */ +module.exports = function(prompt, perLine) { + if (!perLine) return erase.line + cursor.to(0); + + let rows = 0; + const lines = prompt.split(/\r?\n/); + for (let line of lines) { + rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / perLine); + } + + return erase.lines(rows); +}; diff --git a/node_modules/prompts/lib/util/entriesToDisplay.js b/node_modules/prompts/lib/util/entriesToDisplay.js new file mode 100644 index 0000000..5f6efbb --- /dev/null +++ b/node_modules/prompts/lib/util/entriesToDisplay.js @@ -0,0 +1,21 @@ +'use strict'; + +/** + * Determine what entries should be displayed on the screen, based on the + * currently selected index and the maximum visible. Used in list-based + * prompts like `select` and `multiselect`. + * + * @param {number} cursor the currently selected entry + * @param {number} total the total entries available to display + * @param {number} [maxVisible] the number of entries that can be displayed + */ +module.exports = (cursor, total, maxVisible) => { + maxVisible = maxVisible || total; + + let startIndex = Math.min(total- maxVisible, cursor - Math.floor(maxVisible / 2)); + if (startIndex < 0) startIndex = 0; + + let endIndex = Math.min(startIndex + maxVisible, total); + + return { startIndex, endIndex }; +}; diff --git a/node_modules/prompts/lib/util/figures.js b/node_modules/prompts/lib/util/figures.js new file mode 100644 index 0000000..cd31b88 --- /dev/null +++ b/node_modules/prompts/lib/util/figures.js @@ -0,0 +1,33 @@ +'use strict'; + + const main = { + arrowUp: '↑', + arrowDown: '↓', + arrowLeft: '←', + arrowRight: '→', + radioOn: '◉', + radioOff: '◯', + tick: '✔', + cross: '✖', + ellipsis: '…', + pointerSmall: '›', + line: '─', + pointer: '❯' +}; +const win = { + arrowUp: main.arrowUp, + arrowDown: main.arrowDown, + arrowLeft: main.arrowLeft, + arrowRight: main.arrowRight, + radioOn: '(*)', + radioOff: '( )', + tick: '√', + cross: '×', + ellipsis: '...', + pointerSmall: '»', + line: '─', + pointer: '>' +}; +const figures = process.platform === 'win32' ? win : main; + + module.exports = figures; diff --git a/node_modules/prompts/lib/util/index.js b/node_modules/prompts/lib/util/index.js new file mode 100644 index 0000000..f815986 --- /dev/null +++ b/node_modules/prompts/lib/util/index.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = { + action: require('./action'), + clear: require('./clear'), + style: require('./style'), + strip: require('./strip'), + figures: require('./figures'), + lines: require('./lines'), + wrap: require('./wrap'), + entriesToDisplay: require('./entriesToDisplay') +}; diff --git a/node_modules/prompts/lib/util/lines.js b/node_modules/prompts/lib/util/lines.js new file mode 100644 index 0000000..de30419 --- /dev/null +++ b/node_modules/prompts/lib/util/lines.js @@ -0,0 +1,15 @@ +'use strict'; + +const strip = require('./strip'); + +/** + * @param {string} msg + * @param {number} perLine + */ +module.exports = function (msg, perLine) { + let lines = String(strip(msg) || '').split(/\r?\n/); + + if (!perLine) return lines.length; + return lines.map(l => Math.ceil(l.length / perLine)) + .reduce((a, b) => a + b); +}; diff --git a/node_modules/prompts/lib/util/strip.js b/node_modules/prompts/lib/util/strip.js new file mode 100644 index 0000000..8ebf4cb --- /dev/null +++ b/node_modules/prompts/lib/util/strip.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = str => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))' + ].join('|'); + + const RGX = new RegExp(pattern, 'g'); + return typeof str === 'string' ? str.replace(RGX, '') : str; +}; diff --git a/node_modules/prompts/lib/util/style.js b/node_modules/prompts/lib/util/style.js new file mode 100644 index 0000000..1851cc7 --- /dev/null +++ b/node_modules/prompts/lib/util/style.js @@ -0,0 +1,40 @@ +'use strict'; + +const c = require('kleur'); +const figures = require('./figures'); + +// rendering user input. +const styles = Object.freeze({ + password: { scale: 1, render: input => '*'.repeat(input.length) }, + emoji: { scale: 2, render: input => '😃'.repeat(input.length) }, + invisible: { scale: 0, render: input => '' }, + default: { scale: 1, render: input => `${input}` } +}); +const render = type => styles[type] || styles.default; + +// icon to signalize a prompt. +const symbols = Object.freeze({ + aborted: c.red(figures.cross), + done: c.green(figures.tick), + exited: c.yellow(figures.cross), + default: c.cyan('?') +}); + +const symbol = (done, aborted, exited) => + aborted ? symbols.aborted : exited ? symbols.exited : done ? symbols.done : symbols.default; + +// between the question and the user's input. +const delimiter = completing => + c.gray(completing ? figures.ellipsis : figures.pointerSmall); + +const item = (expandable, expanded) => + c.gray(expandable ? (expanded ? figures.pointerSmall : '+') : figures.line); + +module.exports = { + styles, + render, + symbols, + symbol, + delimiter, + item +}; diff --git a/node_modules/prompts/lib/util/wrap.js b/node_modules/prompts/lib/util/wrap.js new file mode 100644 index 0000000..43b5399 --- /dev/null +++ b/node_modules/prompts/lib/util/wrap.js @@ -0,0 +1,27 @@ +'use strict'; + +/** + * @param {string} msg The message to wrap + * @param {object} opts + * @param {number|string} [opts.margin] Left margin + * @param {number} opts.width Maximum characters per line including the margin + */ +module.exports = (msg, opts = {}) => { + const tab = Number.isSafeInteger(parseInt(opts.margin)) + ? new Array(parseInt(opts.margin)).fill(' ').join('') + : (opts.margin || ''); + + const width = opts.width; + + return (msg || '').split(/\r?\n/g) + .map(line => line + .split(/\s+/g) + .reduce((arr, w) => { + if (w.length + tab.length >= width || arr[arr.length - 1].length + w.length + 1 < width) + arr[arr.length - 1] += ` ${w}`; + else arr.push(`${tab}${w}`); + return arr; + }, [ tab ]) + .join('\n')) + .join('\n'); +}; diff --git a/node_modules/prompts/license b/node_modules/prompts/license new file mode 100644 index 0000000..13dc83c --- /dev/null +++ b/node_modules/prompts/license @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Terkel Gjervig Nielsen + +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/prompts/node_modules/kleur/index.js b/node_modules/prompts/node_modules/kleur/index.js new file mode 100644 index 0000000..0bc6ec9 --- /dev/null +++ b/node_modules/prompts/node_modules/kleur/index.js @@ -0,0 +1,104 @@ +'use strict'; + +const { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env; + +const $ = { + enabled: !NODE_DISABLE_COLORS && TERM !== 'dumb' && FORCE_COLOR !== '0', + + // modifiers + reset: init(0, 0), + bold: init(1, 22), + dim: init(2, 22), + italic: init(3, 23), + underline: init(4, 24), + inverse: init(7, 27), + hidden: init(8, 28), + strikethrough: init(9, 29), + + // colors + black: init(30, 39), + red: init(31, 39), + green: init(32, 39), + yellow: init(33, 39), + blue: init(34, 39), + magenta: init(35, 39), + cyan: init(36, 39), + white: init(37, 39), + gray: init(90, 39), + grey: init(90, 39), + + // background colors + bgBlack: init(40, 49), + bgRed: init(41, 49), + bgGreen: init(42, 49), + bgYellow: init(43, 49), + bgBlue: init(44, 49), + bgMagenta: init(45, 49), + bgCyan: init(46, 49), + bgWhite: init(47, 49) +}; + +function run(arr, str) { + let i=0, tmp, beg='', end=''; + for (; i < arr.length; i++) { + tmp = arr[i]; + beg += tmp.open; + end += tmp.close; + if (str.includes(tmp.close)) { + str = str.replace(tmp.rgx, tmp.close + tmp.open); + } + } + return beg + str + end; +} + +function chain(has, keys) { + let ctx = { has, keys }; + + ctx.reset = $.reset.bind(ctx); + ctx.bold = $.bold.bind(ctx); + ctx.dim = $.dim.bind(ctx); + ctx.italic = $.italic.bind(ctx); + ctx.underline = $.underline.bind(ctx); + ctx.inverse = $.inverse.bind(ctx); + ctx.hidden = $.hidden.bind(ctx); + ctx.strikethrough = $.strikethrough.bind(ctx); + + ctx.black = $.black.bind(ctx); + ctx.red = $.red.bind(ctx); + ctx.green = $.green.bind(ctx); + ctx.yellow = $.yellow.bind(ctx); + ctx.blue = $.blue.bind(ctx); + ctx.magenta = $.magenta.bind(ctx); + ctx.cyan = $.cyan.bind(ctx); + ctx.white = $.white.bind(ctx); + ctx.gray = $.gray.bind(ctx); + ctx.grey = $.grey.bind(ctx); + + ctx.bgBlack = $.bgBlack.bind(ctx); + ctx.bgRed = $.bgRed.bind(ctx); + ctx.bgGreen = $.bgGreen.bind(ctx); + ctx.bgYellow = $.bgYellow.bind(ctx); + ctx.bgBlue = $.bgBlue.bind(ctx); + ctx.bgMagenta = $.bgMagenta.bind(ctx); + ctx.bgCyan = $.bgCyan.bind(ctx); + ctx.bgWhite = $.bgWhite.bind(ctx); + + return ctx; +} + +function init(open, close) { + let blk = { + open: `\x1b[${open}m`, + close: `\x1b[${close}m`, + rgx: new RegExp(`\\x1b\\[${close}m`, 'g') + }; + return function (txt) { + if (this !== void 0 && this.has !== void 0) { + this.has.includes(open) || (this.has.push(open),this.keys.push(blk)); + return txt === void 0 ? this : $.enabled ? run(this.keys, txt+'') : txt+''; + } + return txt === void 0 ? chain([open], [blk]) : $.enabled ? run([blk], txt+'') : txt+''; + }; +} + +module.exports = $; diff --git a/node_modules/prompts/node_modules/kleur/kleur.d.ts b/node_modules/prompts/node_modules/kleur/kleur.d.ts new file mode 100644 index 0000000..fdc26ca --- /dev/null +++ b/node_modules/prompts/node_modules/kleur/kleur.d.ts @@ -0,0 +1,45 @@ +// Originally by: Rogier Schouten +// Adapted by: Madhav Varshney +declare namespace kleur { + interface Color { + (x: string | number): string; + (): Kleur; + } + + interface Kleur { + // Colors + black: Color; + red: Color; + green: Color; + yellow: Color; + blue: Color; + magenta: Color; + cyan: Color; + white: Color; + gray: Color; + grey: Color; + + // Backgrounds + bgBlack: Color; + bgRed: Color; + bgGreen: Color; + bgYellow: Color; + bgBlue: Color; + bgMagenta: Color; + bgCyan: Color; + bgWhite: Color; + + // Modifiers + reset: Color; + bold: Color; + dim: Color; + italic: Color; + underline: Color; + inverse: Color; + hidden: Color; + strikethrough: Color; + } +} + +declare let kleur: kleur.Kleur & { enabled: boolean }; +export = kleur; diff --git a/node_modules/prompts/node_modules/kleur/license b/node_modules/prompts/node_modules/kleur/license new file mode 100644 index 0000000..a3f96f8 --- /dev/null +++ b/node_modules/prompts/node_modules/kleur/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Luke Edwards (lukeed.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/prompts/node_modules/kleur/package.json b/node_modules/prompts/node_modules/kleur/package.json new file mode 100644 index 0000000..a81931e --- /dev/null +++ b/node_modules/prompts/node_modules/kleur/package.json @@ -0,0 +1,35 @@ +{ + "name": "kleur", + "version": "3.0.3", + "repository": "lukeed/kleur", + "description": "The fastest Node.js library for formatting terminal text with ANSI colors~!", + "license": "MIT", + "files": [ + "*.js", + "*.d.ts" + ], + "author": { + "name": "Luke Edwards", + "email": "luke.edwards05@gmail.com", + "url": "lukeed.com" + }, + "scripts": { + "test": "tape test/*.js | tap-spec" + }, + "engines": { + "node": ">=6" + }, + "keywords": [ + "ansi", + "cli", + "color", + "colors", + "console", + "terminal" + ], + "types": "kleur.d.ts", + "devDependencies": { + "tap-spec": "^5.0.0", + "tape": "^4.9.1" + } +} diff --git a/node_modules/prompts/node_modules/kleur/readme.md b/node_modules/prompts/node_modules/kleur/readme.md new file mode 100644 index 0000000..6926f1e --- /dev/null +++ b/node_modules/prompts/node_modules/kleur/readme.md @@ -0,0 +1,172 @@ +
+ kleur +
+ + + +
The fastest Node.js library for formatting terminal text with ANSI colors~!
+ +## Features + +* No dependencies +* Super [lightweight](#load-time) & [performant](#performance) +* Supports [nested](#nested-methods) & [chained](#chained-methods) colors +* No `String.prototype` modifications +* Conditional [color support](#conditional-support) +* Familiar [API](#api) + +--- + +As of `v3.0` the Chalk-style syntax (magical getter) is no longer used.
If you need or require that syntax, consider using [`ansi-colors`](https://github.com/doowb/ansi-colors), which maintains `chalk` parity. + +--- + + +## Install + +``` +$ npm install --save kleur +``` + + +## Usage + +```js +const { red, white, blue, bold } = require('kleur'); + +// basic usage +red('red text'); + +// chained methods +blue().bold().underline('howdy partner'); + +// nested methods +bold(`${ white().bgRed('[ERROR]') } ${ red().italic('Something happened')}`); +``` + +### Chained Methods + +```js +console.log(bold().red('this is a bold red message')); +console.log(bold().italic('this is a bold italicized message')); +console.log(bold().yellow().bgRed().italic('this is a bold yellow italicized message')); +console.log(green().bold().underline('this is a bold green underlined message')); +``` + + + +### Nested Methods + +```js +const { yellow, red, cyan } = require('kleur'); + +console.log(yellow(`foo ${red().bold('red')} bar ${cyan('cyan')} baz`)); +console.log(yellow('foo ' + red().bold('red') + ' bar ' + cyan('cyan') + ' baz')); +``` + + + + +### Conditional Support + +Toggle color support as needed; `kleur` includes simple auto-detection which may not cover all cases. + +```js +const kleur = require('kleur'); + +// manually disable +kleur.enabled = false; + +// or use another library to detect support +kleur.enabled = require('color-support').level; + +console.log(kleur.red('I will only be colored red if the terminal supports colors')); +``` + + +## API + +Any `kleur` method returns a `String` when invoked with input; otherwise chaining is expected. + +> It's up to the developer to pass the output to destinations like `console.log`, `process.stdout.write`, etc. + +The methods below are grouped by type for legibility purposes only. They each can be [chained](#chained-methods) or [nested](#nested-methods) with one another. + +***Colors:*** +> black — red — green — yellow — blue — magenta — cyan — white — gray — grey + +***Backgrounds:*** +> bgBlack — bgRed — bgGreen — bgYellow — bgBlue — bgMagenta — bgCyan — bgWhite + +***Modifiers:*** +> reset — bold — dim — italic* — underline — inverse — hidden — strikethrough* + +* Not widely supported + + +## Benchmarks + +> Using Node v10.13.0 + +### Load time + +``` +chalk :: 14.543ms +kleur :: 0.474ms +ansi-colors :: 1.923ms +``` + +### Performance + +``` +# All Colors + ansi-colors x 199,381 ops/sec ±1.04% (96 runs sampled) + chalk x 12,107 ops/sec ±2.07% (87 runs sampled) + kleur x 715,334 ops/sec ±0.30% (93 runs sampled) + +# Stacked colors + ansi-colors x 24,494 ops/sec ±1.03% (93 runs sampled) + chalk x 2,650 ops/sec ±2.06% (85 runs sampled) + kleur x 75,798 ops/sec ±0.19% (97 runs sampled) + +# Nested colors + ansi-colors x 77,766 ops/sec ±0.32% (94 runs sampled) + chalk x 5,596 ops/sec ±1.85% (86 runs sampled) + kleur x 137,660 ops/sec ±0.31% (93 runs sampled) +``` + + +## Credits + +This project originally forked [Brian Woodward](https://github.com/doowb)'s awesome [`ansi-colors`](https://github.com/doowb/ansi-colors) library. + +Beginning with `kleur@3.0`, the Chalk-style syntax (magical getter) has been replaced with function calls per key: + +```js +// Old: +c.red.bold.underline('old'); + +// New: +c.red().bold().underline('new'); +``` +> As I work more with Rust, the newer syntax feels so much better & more natural! + +If you prefer the old syntax, you may migrate to `ansi-colors`. Versions below `kleur@3.0` have been deprecated. + + +## License + +MIT © [Luke Edwards](https://lukeed.com) diff --git a/node_modules/prompts/package.json b/node_modules/prompts/package.json new file mode 100644 index 0000000..f7ba84b --- /dev/null +++ b/node_modules/prompts/package.json @@ -0,0 +1,53 @@ +{ + "name": "prompts", + "version": "2.4.2", + "description": "Lightweight, beautiful and user-friendly prompts", + "license": "MIT", + "repository": "terkelg/prompts", + "main": "index.js", + "author": { + "name": "Terkel Gjervig", + "email": "terkel@terkel.com", + "url": "https://terkel.com" + }, + "files": [ + "lib", + "dist", + "index.js" + ], + "scripts": { + "start": "node lib/index.js", + "build": "babel lib -d dist", + "prepublishOnly": "npm run build", + "test": "tape test/*.js | tap-spec" + }, + "keywords": [ + "ui", + "prompts", + "cli", + "prompt", + "interface", + "command-line", + "input", + "command", + "stdin", + "menu", + "ask", + "interact" + ], + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "devDependencies": { + "@babel/cli": "^7.12.1", + "@babel/core": "^7.12.3", + "@babel/plugin-proposal-object-rest-spread": "^7.12.1", + "@babel/preset-env": "^7.12.1", + "tap-spec": "^2.2.2", + "tape": "^4.13.3" + }, + "engines": { + "node": ">= 6" + } +} diff --git a/node_modules/prompts/readme.md b/node_modules/prompts/readme.md new file mode 100755 index 0000000..4a8b065 --- /dev/null +++ b/node_modules/prompts/readme.md @@ -0,0 +1,882 @@ +

+ Prompts +

+ +

❯ Prompts

+ +

+ + version + + + travis + + + downloads + + +

+ +

+ Lightweight, beautiful and user-friendly interactive prompts
+ >_ Easy to use CLI prompts to enquire users for information▌ +

+ +
+ +* **Simple**: prompts has [no big dependencies](http://npm.anvaka.com/#/view/2d/prompts) nor is it broken into a [dozen](http://npm.anvaka.com/#/view/2d/inquirer) tiny modules that only work well together. +* **User friendly**: prompt uses layout and colors to create beautiful cli interfaces. +* **Promised**: uses promises and `async`/`await`. No callback hell. +* **Flexible**: all prompts are independent and can be used on their own. +* **Testable**: provides a way to submit answers programmatically. +* **Unified**: consistent experience across all [prompts](#-types). + + +![split](https://github.com/terkelg/prompts/raw/master/media/split.png) + + +## ❯ Install + +``` +$ npm install --save prompts +``` + +> This package supports Node 6 and above + +![split](https://github.com/terkelg/prompts/raw/master/media/split.png) + +## ❯ Usage + +example prompt + +```js +const prompts = require('prompts'); + +(async () => { + const response = await prompts({ + type: 'number', + name: 'value', + message: 'How old are you?', + validate: value => value < 18 ? `Nightclub is 18+ only` : true + }); + + console.log(response); // => { value: 24 } +})(); +``` + +> See [`example.js`](https://github.com/terkelg/prompts/blob/master/example.js) for more options. + + +![split](https://github.com/terkelg/prompts/raw/master/media/split.png) + + +## ❯ Examples + +### Single Prompt + +Prompt with a single prompt object. Returns an object with the response. + +```js +const prompts = require('prompts'); + +(async () => { + const response = await prompts({ + type: 'text', + name: 'meaning', + message: 'What is the meaning of life?' + }); + + console.log(response.meaning); +})(); +``` + +### Prompt Chain + +Prompt with a list of prompt objects. Returns an object with the responses. +Make sure to give each prompt a unique `name` property to prevent overwriting values. + +```js +const prompts = require('prompts'); + +const questions = [ + { + type: 'text', + name: 'username', + message: 'What is your GitHub username?' + }, + { + type: 'number', + name: 'age', + message: 'How old are you?' + }, + { + type: 'text', + name: 'about', + message: 'Tell something about yourself', + initial: 'Why should I?' + } +]; + +(async () => { + const response = await prompts(questions); + + // => response => { username, age, about } +})(); +``` + +### Dynamic Prompts + +Prompt properties can be functions too. +Prompt Objects with `type` set to `falsy` values are skipped. + +```js +const prompts = require('prompts'); + +const questions = [ + { + type: 'text', + name: 'dish', + message: 'Do you like pizza?' + }, + { + type: prev => prev == 'pizza' ? 'text' : null, + name: 'topping', + message: 'Name a topping' + } +]; + +(async () => { + const response = await prompts(questions); +})(); +``` + + +![split](https://github.com/terkelg/prompts/raw/master/media/split.png) + + +## ❯ API + +### prompts(prompts, options) + +Type: `Function`
+Returns: `Object` + +Prompter function which takes your [prompt objects](#-prompt-objects) and returns an object with responses. + + +#### prompts + +Type: `Array|Object`
+ +Array of [prompt objects](#-prompt-objects). + These are the questions the user will be prompted. You can see the list of supported [prompt types here](#-types). + +Prompts can be submitted (return, enter) or canceled (esc, abort, ctrl+c, ctrl+d). No property is being defined on the returned response object when a prompt is canceled. + +#### options.onSubmit + +Type: `Function`
+Default: `() => {}` + +Callback that's invoked after each prompt submission. +Its signature is `(prompt, answer, answers)` where `prompt` is the current prompt object, `answer` the user answer to the current question and `answers` the user answers so far. Async functions are supported. + +Return `true` to quit the prompt chain and return all collected responses so far, otherwise continue to iterate prompt objects. + +**Example:** +```js +(async () => { + const questions = [{ ... }]; + const onSubmit = (prompt, answer) => console.log(`Thanks I got ${answer} from ${prompt.name}`); + const response = await prompts(questions, { onSubmit }); +})(); +``` + +#### options.onCancel + +Type: `Function`
+Default: `() => {}` + +Callback that's invoked when the user cancels/exits the prompt. +Its signature is `(prompt, answers)` where `prompt` is the current prompt object and `answers` the user answers so far. Async functions are supported. + +Return `true` to continue and prevent the prompt loop from aborting. +On cancel responses collected so far are returned. + +**Example:** +```js +(async () => { + const questions = [{ ... }]; + const onCancel = prompt => { + console.log('Never stop prompting!'); + return true; + } + const response = await prompts(questions, { onCancel }); +})(); +``` + +### override + +Type: `Function` + +Preanswer questions by passing an object with answers to `prompts.override`. +Powerful when combined with arguments of process. + +**Example** +```js +const prompts = require('prompts'); +prompts.override(require('yargs').argv); + +(async () => { + const response = await prompts([ + { + type: 'text', + name: 'twitter', + message: `What's your twitter handle?` + }, + { + type: 'multiselect', + name: 'color', + message: 'Pick colors', + choices: [ + { title: 'Red', value: '#ff0000' }, + { title: 'Green', value: '#00ff00' }, + { title: 'Blue', value: '#0000ff' } + ], + } + ]); + + console.log(response); +})(); +``` + +### inject(values) + +Type: `Function`
+ +Programmatically inject responses. This enables you to prepare the responses ahead of time. +If any injected value is found the prompt is immediately resolved with the injected value. +This feature is intended for testing only. + +#### values + +Type: `Array` + +Array with values to inject. Resolved values are removed from the internal inject array. +Each value can be an array of values in order to provide answers for a question asked multiple times. +If a value is an instance of `Error` it will simulate the user cancelling/exiting the prompt. + +**Example:** +```js +const prompts = require('prompts'); + +prompts.inject([ '@terkelg', ['#ff0000', '#0000ff'] ]); + +(async () => { + const response = await prompts([ + { + type: 'text', + name: 'twitter', + message: `What's your twitter handle?` + }, + { + type: 'multiselect', + name: 'color', + message: 'Pick colors', + choices: [ + { title: 'Red', value: '#ff0000' }, + { title: 'Green', value: '#00ff00' }, + { title: 'Blue', value: '#0000ff' } + ], + } + ]); + + // => { twitter: 'terkelg', color: [ '#ff0000', '#0000ff' ] } +})(); +``` + +![split](https://github.com/terkelg/prompts/raw/master/media/split.png) + + +## ❯ Prompt Objects + +Prompts Objects are JavaScript objects that define the "questions" and the [type of prompt](#-types). +Almost all prompt objects have the following properties: + +```js +{ + type: String | Function, + name: String | Function, + message: String | Function, + initial: String | Function | Async Function + format: Function | Async Function, + onRender: Function + onState: Function + stdin: Readable + stdout: Writeable +} +``` + +Each property be of type `function` and will be invoked right before prompting the user. + +The function signature is `(prev, values, prompt)`, where `prev` is the value from the previous prompt, +`values` is the response object with all values collected so far and `prompt` is the previous prompt object. + +**Function example:** +```js +{ + type: prev => prev > 3 ? 'confirm' : null, + name: 'confirm', + message: (prev, values) => `Please confirm that you eat ${values.dish} times ${prev} a day?` +} +``` + +The above prompt will be skipped if the value of the previous prompt is less than 3. + +### type + +Type: `String|Function` + +Defines the type of prompt to display. See the list of [prompt types](#-types) for valid values. + +If `type` is a falsy value the prompter will skip that question. +```js +{ + type: null, + name: 'forgetme', + message: `I'll never be shown anyway`, +} +``` + +### name + +Type: `String|Function` + +The response will be saved under this key/property in the returned response object. +In case you have multiple prompts with the same name only the latest response will be stored. + +> Make sure to give prompts unique names if you don't want to overwrite previous values. + +### message + +Type: `String|Function` + +The message to be displayed to the user. + +### initial + +Type: `String|Function` + +Optional default prompt value. Async functions are supported too. + +### format + +Type: `Function` + +Receive the user input and return the formatted value to be used inside the program. +The value returned will be added to the response object. + +The function signature is `(val, values)`, where `val` is the value from the current prompt and +`values` is the current response object in case you need to format based on previous responses. + +**Example:** +```js +{ + type: 'number', + name: 'price', + message: 'Enter price', + format: val => Intl.NumberFormat(undefined, { style: 'currency', currency: 'USD' }).format(val); +} +``` + +### onRender + +Type: `Function` + +Callback for when the prompt is rendered. +The function receives [kleur](https://github.com/lukeed/kleur) as its first argument and `this` refers to the current prompt. + +**Example:** +```js +{ + type: 'number', + message: 'This message will be overridden', + onRender(kleur) { + this.msg = kleur.cyan('Enter a number'); + } +} +``` + +### onState + +Type: `Function` + +Callback for when the state of the current prompt changes. +The function signature is `(state)` where `state` is an object with a snapshot of the current state. +The state object has two properties `value` and `aborted`. E.g `{ value: 'This is ', aborted: false }` + +### stdin and stdout + +Type: `Stream` + +By default, prompts uses `process.stdin` for receiving input and `process.stdout` for writing output. +If you need to use different streams, for instance `process.stderr`, you can set these with the `stdin` and `stdout` properties. + + +![split](https://github.com/terkelg/prompts/raw/master/media/split.png) + + +## ❯ Types + +* [text](#textmessage-initial-style) +* [password](#passwordmessage-initial) +* [invisible](#invisiblemessage-initial) +* [number](#numbermessage-initial-max-min-style) +* [confirm](#confirmmessage-initial) +* [list](#listmessage-initial) +* [toggle](#togglemessage-initial-active-inactive) +* [select](#selectmessage-choices-initial-hint-warn) +* [multiselect](#multiselectmessage-choices-initial-max-hint-warn) +* [autocompleteMultiselect](#multiselectmessage-choices-initial-max-hint-warn) +* [autocomplete](#autocompletemessage-choices-initial-suggest-limit-style) +* [date](#datemessage-initial-warn) + +*** + +### text(message, [initial], [style]) +> Text prompt for free text input. + +Hit tab to autocomplete to `initial` value when provided. + +#### Example +text prompt + +```js +{ + type: 'text', + name: 'value', + message: `What's your twitter handle?` +} +``` + +#### Options +| Param | Type | Description | +| ----- | :--: | ----------- | +| message | `string` | Prompt message to display | +| initial | `string` | Default string value | +| style | `string` | Render style (`default`, `password`, `invisible`, `emoji`). Defaults to `default` | +| format | `function` | Receive user input. The returned value will be added to the response object | +| validate | `function` | Receive user input. Should return `true` if the value is valid, and an error message `String` otherwise. If `false` is returned, a default error message is shown | +| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | +| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` | + +**↑ back to:** [Prompt types](#-types) + +*** + +### password(message, [initial]) +> Password prompt with masked input. + +This prompt is a similar to a prompt of type `'text'` with `style` set to `'password'`. + +#### Example +password prompt + +```js +{ + type: 'password', + name: 'value', + message: 'Tell me a secret' +} +``` + +#### Options +| Param | Type | Description | +| ----- | :--: | ----------- | +| message | `string` | Prompt message to display | +| initial | `string` | Default string value | +| format | `function` | Receive user input. The returned value will be added to the response object | +| validate | `function` | Receive user input. Should return `true` if the value is valid, and an error message `String` otherwise. If `false` is returned, a default error message is shown | +| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | +| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` | + +**↑ back to:** [Prompt types](#-types) + +*** + +### invisible(message, [initial]) +> Prompts user for invisible text input. + +This prompt is working like `sudo` where the input is invisible. +This prompt is a similar to a prompt of type `'text'` with style set to `'invisible'`. + +#### Example +invisible prompt + +```js +{ + type: 'invisible', + name: 'value', + message: 'Enter password' +} +``` + +#### Options +| Param | Type | Description | +| ----- | :--: | ----------- | +| message | `string` | Prompt message to display | +| initial | `string` | Default string value | +| format | `function` | Receive user input. The returned value will be added to the response object | +| validate | `function` | Receive user input. Should return `true` if the value is valid, and an error message `String` otherwise. If `false` is returned, a default error message is shown | +| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | +| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` | + +**↑ back to:** [Prompt types](#-types) + +*** + +### number(message, initial, [max], [min], [style]) +> Prompts user for number input. + +You can type in numbers and use up/down to increase/decrease the value. Only numbers are allowed as input. Hit tab to autocomplete to `initial` value when provided. + +#### Example +number prompt + +```js +{ + type: 'number', + name: 'value', + message: 'How old are you?', + initial: 0, + style: 'default', + min: 2, + max: 10 +} +``` + +#### Options +| Param | Type | Description | +| ----- | :--: | ----------- | +| message | `string` | Prompt message to display | +| initial | `number` | Default number value | +| format | `function` | Receive user input. The returned value will be added to the response object | +| validate | `function` | Receive user input. Should return `true` if the value is valid, and an error message `String` otherwise. If `false` is returned, a default error message is shown | +| max | `number` | Max value. Defaults to `Infinity` | +| min | `number` | Min value. Defaults to `-infinity` | +| float | `boolean` | Allow floating point inputs. Defaults to `false` | +| round | `number` | Round `float` values to x decimals. Defaults to `2` | +| increment | `number` | Increment step when using arrow keys. Defaults to `1` | +| style | `string` | Render style (`default`, `password`, `invisible`, `emoji`). Defaults to `default` | +| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | +| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` | + +**↑ back to:** [Prompt types](#-types) + +*** + +### confirm(message, [initial]) +> Classic yes/no prompt. + +Hit y or n to confirm/reject. + +#### Example +confirm prompt + +```js +{ + type: 'confirm', + name: 'value', + message: 'Can you confirm?', + initial: true +} +``` + + +#### Options +| Param | Type | Description | +| ----- | :--: | ----------- | +| message | `string` | Prompt message to display | +| initial | `boolean` | Default value. Default is `false` | +| format | `function` | Receive user input. The returned value will be added to the response object | +| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | +| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` | + +**↑ back to:** [Prompt types](#-types) + +*** + +### list(message, [initial]) +> List prompt that return an array. + +Similar to the `text` prompt, but the output is an `Array` containing the +string separated by `separator`. + +```js +{ + type: 'list', + name: 'value', + message: 'Enter keywords', + initial: '', + separator: ',' +} +``` + +list prompt + + +| Param | Type | Description | +| ----- | :--: | ----------- | +| message | `string` | Prompt message to display | +| initial | `boolean` | Default value | +| format | `function` | Receive user input. The returned value will be added to the response object | +| separator | `string` | String separator. Will trim all white-spaces from start and end of string. Defaults to `','` | +| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | +| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` | + +**↑ back to:** [Prompt types](#-types) + +*** + +### toggle(message, [initial], [active], [inactive]) +> Interactive toggle/switch prompt. + +Use tab or arrow keys/tab/space to switch between options. + +#### Example +toggle prompt + +```js +{ + type: 'toggle', + name: 'value', + message: 'Can you confirm?', + initial: true, + active: 'yes', + inactive: 'no' +} +``` + +#### Options +| Param | Type | Description | +| ----- | :--: | ----------- | +| message | `string` | Prompt message to display | +| initial | `boolean` | Default value. Defaults to `false` | +| format | `function` | Receive user input. The returned value will be added to the response object | +| active | `string` | Text for `active` state. Defaults to `'on'` | +| inactive | `string` | Text for `inactive` state. Defaults to `'off'` | +| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | +| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` | + +**↑ back to:** [Prompt types](#-types) + +*** + +### select(message, choices, [initial], [hint], [warn]) +> Interactive select prompt. + +Use up/down to navigate. Use tab to cycle the list. + +#### Example +select prompt + +```js +{ + type: 'select', + name: 'value', + message: 'Pick a color', + choices: [ + { title: 'Red', description: 'This option has a description', value: '#ff0000' }, + { title: 'Green', value: '#00ff00', disabled: true }, + { title: 'Blue', value: '#0000ff' } + ], + initial: 1 +} +``` + +#### Options +| Param | Type | Description | +| ----- | :--: | ----------- | +| message | `string` | Prompt message to display | +| initial | `number` | Index of default value | +| format | `function` | Receive user input. The returned value will be added to the response object | +| hint | `string` | Hint to display to the user | +| warn | `string` | Message to display when selecting a disabled option | +| choices | `Array` | Array of strings or choices objects `[{ title, description, value, disabled }, ...]`. The choice's index in the array will be used as its value if it is not specified. | +| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | +| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` | + +**↑ back to:** [Prompt types](#-types) + +*** + +### multiselect(message, choices, [initial], [max], [hint], [warn]) +### autocompleteMultiselect(same) +> Interactive multi-select prompt. +> Autocomplete is a searchable multiselect prompt with the same options. Useful for long lists. + +Use space to toggle select/unselect and up/down to navigate. Use tab to cycle the list. You can also use right to select and left to deselect. +By default this prompt returns an `array` containing the **values** of the selected items - not their display title. + +#### Example +multiselect prompt + +```js +{ + type: 'multiselect', + name: 'value', + message: 'Pick colors', + choices: [ + { title: 'Red', value: '#ff0000' }, + { title: 'Green', value: '#00ff00', disabled: true }, + { title: 'Blue', value: '#0000ff', selected: true } + ], + max: 2, + hint: '- Space to select. Return to submit' +} +``` + +#### Options +| Param | Type | Description | +| ----- | :--: | ----------- | +| message | `string` | Prompt message to display | +| format | `function` | Receive user input. The returned value will be added to the response object | +| instructions | `string` or `boolean` | Prompt instructions to display | +| choices | `Array` | Array of strings or choices objects `[{ title, value, disabled }, ...]`. The choice's index in the array will be used as its value if it is not specified. | +| optionsPerPage | `number` | Number of options displayed per page (default: 10) | +| min | `number` | Min select - will display error | +| max | `number` | Max select | +| hint | `string` | Hint to display to the user | +| warn | `string` | Message to display when selecting a disabled option | +| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | +| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` | + +This is one of the few prompts that don't take a initial value. +If you want to predefine selected values, give the choice object an `selected` property of `true`. + +**↑ back to:** [Prompt types](#-types) + +*** + +### autocomplete(message, choices, [initial], [suggest], [limit], [style]) +> Interactive auto complete prompt. + +The prompt will list options based on user input. Type to filter the list. +Use ⇧/⇩ to navigate. Use tab to cycle the result. Use Page Up/Page Down (on Mac: fn + ⇧ / ⇩) to change page. Hit enter to select the highlighted item below the prompt. + +The default suggests function is sorting based on the `title` property of the choices. +You can overwrite how choices are being filtered by passing your own suggest function. + +#### Example +auto complete prompt + +```js +{ + type: 'autocomplete', + name: 'value', + message: 'Pick your favorite actor', + choices: [ + { title: 'Cage' }, + { title: 'Clooney', value: 'silver-fox' }, + { title: 'Gyllenhaal' }, + { title: 'Gibson' }, + { title: 'Grant' } + ] +} +``` + +#### Options +| Param | Type | Description | +| ----- | :--: | ----------- | +| message | `string` | Prompt message to display | +| format | `function` | Receive user input. The returned value will be added to the response object | +| choices | `Array` | Array of auto-complete choices objects `[{ title, value }, ...]` | +| suggest | `function` | Filter function. Defaults to sort by `title` property. `suggest` should always return a promise. Filters using `title` by default | +| limit | `number` | Max number of results to show. Defaults to `10` | +| style | `string` | Render style (`default`, `password`, `invisible`, `emoji`). Defaults to `'default'` | +| initial | `string \| number` | Default initial value | +| clearFirst | `boolean` | The first ESCAPE keypress will clear the input | +| fallback | `string` | Fallback message when no match is found. Defaults to `initial` value if provided | +| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | +| onState | `function` | On state change callback. Function signature is an `object` with three properties: `value`, `aborted` and `exited` | + +Example on what a `suggest` function might look like: +```js +const suggestByTitle = (input, choices) => + Promise.resolve(choices.filter(i => i.title.slice(0, input.length) === input)) +``` + +**↑ back to:** [Prompt types](#-types) + +*** + +### date(message, [initial], [warn]) +> Interactive date prompt. + +Use left/right/tab to navigate. Use up/down to change date. + +#### Example +date prompt + +```js +{ + type: 'date', + name: 'value', + message: 'Pick a date', + initial: new Date(1997, 09, 12), + validate: date => date > Date.now() ? 'Not in the future' : true +} +``` + +#### Options +| Param | Type | Description | +| ----- | :--: | ----------- | +| message | `string` | Prompt message to display | +| initial | `date` | Default date | +| locales | `object` | Use to define custom locales. See below for an example. | +| mask | `string` | The format mask of the date. See below for more information.
Default: `YYYY-MM-DD HH:mm:ss` | +| validate | `function` | Receive user input. Should return `true` if the value is valid, and an error message `String` otherwise. If `false` is returned, a default error message is shown | +| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | +| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` | + +Default locales: + +```javascript +{ + months: [ + 'January', 'February', 'March', 'April', + 'May', 'June', 'July', 'August', + 'September', 'October', 'November', 'December' + ], + monthsShort: [ + 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' + ], + weekdays: [ + 'Sunday', 'Monday', 'Tuesday', 'Wednesday', + 'Thursday', 'Friday', 'Saturday' + ], + weekdaysShort: [ + 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' + ] +} +``` +>**Formatting**: See full list of formatting options in the [wiki](https://github.com/terkelg/prompts/wiki/Date-Time-Formatting) + +![split](https://github.com/terkelg/prompts/raw/master/media/split.png) + +**↑ back to:** [Prompt types](#-types) + +*** + +## ❯ Credit +Many of the prompts are based on the work of [derhuerst](https://github.com/derhuerst). + + +## ❯ License + +MIT © [Terkel Gjervig](https://terkel.com) diff --git a/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/readable-stream/CONTRIBUTING.md new file mode 100644 index 0000000..f478d58 --- /dev/null +++ b/node_modules/readable-stream/CONTRIBUTING.md @@ -0,0 +1,38 @@ +# Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +* (a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +* (b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +* (c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +* (d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + +## Moderation Policy + +The [Node.js Moderation Policy] applies to this WG. + +## Code of Conduct + +The [Node.js Code of Conduct][] applies to this WG. + +[Node.js Code of Conduct]: +https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md +[Node.js Moderation Policy]: +https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/readable-stream/GOVERNANCE.md b/node_modules/readable-stream/GOVERNANCE.md new file mode 100644 index 0000000..16ffb93 --- /dev/null +++ b/node_modules/readable-stream/GOVERNANCE.md @@ -0,0 +1,136 @@ +### Streams Working Group + +The Node.js Streams is jointly governed by a Working Group +(WG) +that is responsible for high-level guidance of the project. + +The WG has final authority over this project including: + +* Technical direction +* Project governance and process (including this policy) +* Contribution policy +* GitHub repository hosting +* Conduct guidelines +* Maintaining the list of additional Collaborators + +For the current list of WG members, see the project +[README.md](./README.md#current-project-team-members). + +### Collaborators + +The readable-stream GitHub repository is +maintained by the WG and additional Collaborators who are added by the +WG on an ongoing basis. + +Individuals making significant and valuable contributions are made +Collaborators and given commit-access to the project. These +individuals are identified by the WG and their addition as +Collaborators is discussed during the WG meeting. + +_Note:_ If you make a significant contribution and are not considered +for commit-access log an issue or contact a WG member directly and it +will be brought up in the next WG meeting. + +Modifications of the contents of the readable-stream repository are +made on +a collaborative basis. Anybody with a GitHub account may propose a +modification via pull request and it will be considered by the project +Collaborators. All pull requests must be reviewed and accepted by a +Collaborator with sufficient expertise who is able to take full +responsibility for the change. In the case of pull requests proposed +by an existing Collaborator, an additional Collaborator is required +for sign-off. Consensus should be sought if additional Collaborators +participate and there is disagreement around a particular +modification. See _Consensus Seeking Process_ below for further detail +on the consensus model used for governance. + +Collaborators may opt to elevate significant or controversial +modifications, or modifications that have not found consensus to the +WG for discussion by assigning the ***WG-agenda*** tag to a pull +request or issue. The WG should serve as the final arbiter where +required. + +For the current list of Collaborators, see the project +[README.md](./README.md#members). + +### WG Membership + +WG seats are not time-limited. There is no fixed size of the WG. +However, the expected target is between 6 and 12, to ensure adequate +coverage of important areas of expertise, balanced with the ability to +make decisions efficiently. + +There is no specific set of requirements or qualifications for WG +membership beyond these rules. + +The WG may add additional members to the WG by unanimous consensus. + +A WG member may be removed from the WG by voluntary resignation, or by +unanimous consensus of all other WG members. + +Changes to WG membership should be posted in the agenda, and may be +suggested as any other agenda item (see "WG Meetings" below). + +If an addition or removal is proposed during a meeting, and the full +WG is not in attendance to participate, then the addition or removal +is added to the agenda for the subsequent meeting. This is to ensure +that all members are given the opportunity to participate in all +membership decisions. If a WG member is unable to attend a meeting +where a planned membership decision is being made, then their consent +is assumed. + +No more than 1/3 of the WG members may be affiliated with the same +employer. If removal or resignation of a WG member, or a change of +employment by a WG member, creates a situation where more than 1/3 of +the WG membership shares an employer, then the situation must be +immediately remedied by the resignation or removal of one or more WG +members affiliated with the over-represented employer(s). + +### WG Meetings + +The WG meets occasionally on a Google Hangout On Air. A designated moderator +approved by the WG runs the meeting. Each meeting should be +published to YouTube. + +Items are added to the WG agenda that are considered contentious or +are modifications of governance, contribution policy, WG membership, +or release process. + +The intention of the agenda is not to approve or review all patches; +that should happen continuously on GitHub and be handled by the larger +group of Collaborators. + +Any community member or contributor can ask that something be added to +the next meeting's agenda by logging a GitHub Issue. Any Collaborator, +WG member or the moderator can add the item to the agenda by adding +the ***WG-agenda*** tag to the issue. + +Prior to each WG meeting the moderator will share the Agenda with +members of the WG. WG members can add any items they like to the +agenda at the beginning of each meeting. The moderator and the WG +cannot veto or remove items. + +The WG may invite persons or representatives from certain projects to +participate in a non-voting capacity. + +The moderator is responsible for summarizing the discussion of each +agenda item and sends it as a pull request after the meeting. + +### Consensus Seeking Process + +The WG follows a +[Consensus +Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) +decision-making model. + +When an agenda item has appeared to reach a consensus the moderator +will ask "Does anyone object?" as a final call for dissent from the +consensus. + +If an agenda item cannot reach a consensus a WG member can call for +either a closing vote or a vote to table the issue to the next +meeting. The call for a vote must be seconded by a majority of the WG +or else the discussion will continue. Simple majority wins. + +Note that changes to WG membership require a majority consensus. See +"WG Membership" above. diff --git a/node_modules/readable-stream/LICENSE b/node_modules/readable-stream/LICENSE new file mode 100644 index 0000000..2873b3b --- /dev/null +++ b/node_modules/readable-stream/LICENSE @@ -0,0 +1,47 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +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. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +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/readable-stream/README.md b/node_modules/readable-stream/README.md new file mode 100644 index 0000000..19117c1 --- /dev/null +++ b/node_modules/readable-stream/README.md @@ -0,0 +1,106 @@ +# readable-stream + +***Node.js core streams for userland*** [![Build Status](https://travis-ci.com/nodejs/readable-stream.svg?branch=master)](https://travis-ci.com/nodejs/readable-stream) + + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) + + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/readabe-stream.svg)](https://saucelabs.com/u/readabe-stream) + +```bash +npm install --save readable-stream +``` + +This package is a mirror of the streams implementations in Node.js. + +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.18.1/docs/api/stream.html). + +If you want to guarantee a stable streams base, regardless of what version of +Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). + +As of version 2.0.0 **readable-stream** uses semantic versioning. + +## Version 3.x.x + +v3.x.x of `readable-stream` is a cut from Node 10. This version supports Node 6, 8, and 10, as well as evergreen browsers, IE 11 and latest Safari. The breaking changes introduced by v3 are composed by the combined breaking changes in [Node v9](https://nodejs.org/en/blog/release/v9.0.0/) and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows: + +1. Error codes: https://github.com/nodejs/node/pull/13310, + https://github.com/nodejs/node/pull/13291, + https://github.com/nodejs/node/pull/16589, + https://github.com/nodejs/node/pull/15042, + https://github.com/nodejs/node/pull/15665, + https://github.com/nodejs/readable-stream/pull/344 +2. 'readable' have precedence over flowing + https://github.com/nodejs/node/pull/18994 +3. make virtual methods errors consistent + https://github.com/nodejs/node/pull/18813 +4. updated streams error handling + https://github.com/nodejs/node/pull/18438 +5. writable.end should return this. + https://github.com/nodejs/node/pull/18780 +6. readable continues to read when push('') + https://github.com/nodejs/node/pull/18211 +7. add custom inspect to BufferList + https://github.com/nodejs/node/pull/17907 +8. always defer 'readable' with nextTick + https://github.com/nodejs/node/pull/17979 + +## Version 2.x.x +v2.x.x of `readable-stream` is a cut of the stream module from Node 8 (there have been no semver-major changes from Node 4 to 8). This version supports all Node.js versions from 0.8, as well as evergreen browsers and IE 10 & 11. + +### Big Thanks + +Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs][sauce] + +# Usage + +You can swap your `require('stream')` with `require('readable-stream')` +without any changes, if you are just using one of the main classes and +functions. + +```js +const { + Readable, + Writable, + Transform, + Duplex, + pipeline, + finished +} = require('readable-stream') +```` + +Note that `require('stream')` will return `Stream`, while +`require('readable-stream')` will return `Readable`. We discourage using +whatever is exported directly, but rather use one of the properties as +shown in the example above. + +# Streams Working Group + +`readable-stream` is maintained by the Streams Working Group, which +oversees the development and maintenance of the Streams API within +Node.js. The responsibilities of the Streams Working Group include: + +* Addressing stream issues on the Node.js issue tracker. +* Authoring and editing stream documentation within the Node.js project. +* Reviewing changes to stream subclasses within the Node.js project. +* Redirecting changes to streams from the Node.js project to this + project. +* Assisting in the implementation of stream providers within Node.js. +* Recommending versions of `readable-stream` to be included in Node.js. +* Messaging about the future of streams to give the community advance + notice of changes. + + +## Team Members + +* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> + - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 +* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> +* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> + - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E +* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> +* **Yoshua Wyuts** ([@yoshuawuyts](https://github.com/yoshuawuyts)) <yoshuawuyts@gmail.com> + +[sauce]: https://saucelabs.com diff --git a/node_modules/readable-stream/errors-browser.js b/node_modules/readable-stream/errors-browser.js new file mode 100644 index 0000000..fb8e73e --- /dev/null +++ b/node_modules/readable-stream/errors-browser.js @@ -0,0 +1,127 @@ +'use strict'; + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +var codes = {}; + +function createErrorType(code, message, Base) { + if (!Base) { + Base = Error; + } + + function getMessage(arg1, arg2, arg3) { + if (typeof message === 'string') { + return message; + } else { + return message(arg1, arg2, arg3); + } + } + + var NodeError = + /*#__PURE__*/ + function (_Base) { + _inheritsLoose(NodeError, _Base); + + function NodeError(arg1, arg2, arg3) { + return _Base.call(this, getMessage(arg1, arg2, arg3)) || this; + } + + return NodeError; + }(Base); + + NodeError.prototype.name = Base.name; + NodeError.prototype.code = code; + codes[code] = NodeError; +} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js + + +function oneOf(expected, thing) { + if (Array.isArray(expected)) { + var len = expected.length; + expected = expected.map(function (i) { + return String(i); + }); + + if (len > 2) { + return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len - 1]; + } else if (len === 2) { + return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]); + } else { + return "of ".concat(thing, " ").concat(expected[0]); + } + } else { + return "of ".concat(thing, " ").concat(String(expected)); + } +} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith + + +function startsWith(str, search, pos) { + return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; +} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith + + +function endsWith(str, search, this_len) { + if (this_len === undefined || this_len > str.length) { + this_len = str.length; + } + + return str.substring(this_len - search.length, this_len) === search; +} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes + + +function includes(str, search, start) { + if (typeof start !== 'number') { + start = 0; + } + + if (start + search.length > str.length) { + return false; + } else { + return str.indexOf(search, start) !== -1; + } +} + +createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { + return 'The value "' + value + '" is invalid for option "' + name + '"'; +}, TypeError); +createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { + // determiner: 'must be' or 'must not be' + var determiner; + + if (typeof expected === 'string' && startsWith(expected, 'not ')) { + determiner = 'must not be'; + expected = expected.replace(/^not /, ''); + } else { + determiner = 'must be'; + } + + var msg; + + if (endsWith(name, ' argument')) { + // For cases like 'first argument' + msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, 'type')); + } else { + var type = includes(name, '.') ? 'property' : 'argument'; + msg = "The \"".concat(name, "\" ").concat(type, " ").concat(determiner, " ").concat(oneOf(expected, 'type')); + } + + msg += ". Received type ".concat(typeof actual); + return msg; +}, TypeError); +createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); +createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { + return 'The ' + name + ' method is not implemented'; +}); +createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); +createErrorType('ERR_STREAM_DESTROYED', function (name) { + return 'Cannot call ' + name + ' after a stream was destroyed'; +}); +createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); +createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); +createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); +createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); +createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { + return 'Unknown encoding: ' + arg; +}, TypeError); +createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); +module.exports.codes = codes; diff --git a/node_modules/readable-stream/errors.js b/node_modules/readable-stream/errors.js new file mode 100644 index 0000000..8471526 --- /dev/null +++ b/node_modules/readable-stream/errors.js @@ -0,0 +1,116 @@ +'use strict'; + +const codes = {}; + +function createErrorType(code, message, Base) { + if (!Base) { + Base = Error + } + + function getMessage (arg1, arg2, arg3) { + if (typeof message === 'string') { + return message + } else { + return message(arg1, arg2, arg3) + } + } + + class NodeError extends Base { + constructor (arg1, arg2, arg3) { + super(getMessage(arg1, arg2, arg3)); + } + } + + NodeError.prototype.name = Base.name; + NodeError.prototype.code = code; + + codes[code] = NodeError; +} + +// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js +function oneOf(expected, thing) { + if (Array.isArray(expected)) { + const len = expected.length; + expected = expected.map((i) => String(i)); + if (len > 2) { + return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` + + expected[len - 1]; + } else if (len === 2) { + return `one of ${thing} ${expected[0]} or ${expected[1]}`; + } else { + return `of ${thing} ${expected[0]}`; + } + } else { + return `of ${thing} ${String(expected)}`; + } +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith +function startsWith(str, search, pos) { + return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith +function endsWith(str, search, this_len) { + if (this_len === undefined || this_len > str.length) { + this_len = str.length; + } + return str.substring(this_len - search.length, this_len) === search; +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes +function includes(str, search, start) { + if (typeof start !== 'number') { + start = 0; + } + + if (start + search.length > str.length) { + return false; + } else { + return str.indexOf(search, start) !== -1; + } +} + +createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { + return 'The value "' + value + '" is invalid for option "' + name + '"' +}, TypeError); +createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { + // determiner: 'must be' or 'must not be' + let determiner; + if (typeof expected === 'string' && startsWith(expected, 'not ')) { + determiner = 'must not be'; + expected = expected.replace(/^not /, ''); + } else { + determiner = 'must be'; + } + + let msg; + if (endsWith(name, ' argument')) { + // For cases like 'first argument' + msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`; + } else { + const type = includes(name, '.') ? 'property' : 'argument'; + msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`; + } + + msg += `. Received type ${typeof actual}`; + return msg; +}, TypeError); +createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); +createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { + return 'The ' + name + ' method is not implemented' +}); +createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); +createErrorType('ERR_STREAM_DESTROYED', function (name) { + return 'Cannot call ' + name + ' after a stream was destroyed'; +}); +createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); +createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); +createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); +createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); +createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { + return 'Unknown encoding: ' + arg +}, TypeError); +createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); + +module.exports.codes = codes; diff --git a/node_modules/readable-stream/experimentalWarning.js b/node_modules/readable-stream/experimentalWarning.js new file mode 100644 index 0000000..78e8414 --- /dev/null +++ b/node_modules/readable-stream/experimentalWarning.js @@ -0,0 +1,17 @@ +'use strict' + +var experimentalWarnings = new Set(); + +function emitExperimentalWarning(feature) { + if (experimentalWarnings.has(feature)) return; + var msg = feature + ' is an experimental feature. This feature could ' + + 'change at any time'; + experimentalWarnings.add(feature); + process.emitWarning(msg, 'ExperimentalWarning'); +} + +function noop() {} + +module.exports.emitExperimentalWarning = process.emitWarning + ? emitExperimentalWarning + : noop; diff --git a/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 0000000..19abfa6 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,126 @@ +// Copyright Joyent, Inc. and other Node 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. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +'use strict'; + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; +}; +/**/ + +module.exports = Duplex; +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); +require('inherits')(Duplex, Readable); +{ + // Allow the keys array to be GC'ed. + var keys = objectKeys(Writable.prototype); + for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } +} +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + Readable.call(this, options); + Writable.call(this, options); + this.allowHalfOpen = true; + if (options) { + if (options.readable === false) this.readable = false; + if (options.writable === false) this.writable = false; + if (options.allowHalfOpen === false) { + this.allowHalfOpen = false; + this.once('end', onend); + } + } +} +Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } +}); +Object.defineProperty(Duplex.prototype, 'writableBuffer', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } +}); +Object.defineProperty(Duplex.prototype, 'writableLength', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.length; + } +}); + +// the no-half-open enforcer +function onend() { + // If the writable side ended, then we're ok. + if (this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + process.nextTick(onEndNT, this); +} +function onEndNT(self) { + self.end(); +} +Object.defineProperty(Duplex.prototype, 'destroyed', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._readableState === undefined || this._writableState === undefined) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function set(value) { + // we ignore the value if the stream + // has not been initialized yet + if (this._readableState === undefined || this._writableState === undefined) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } +}); \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 0000000..24a6bdd --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,37 @@ +// Copyright Joyent, Inc. and other Node 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. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +'use strict'; + +module.exports = PassThrough; +var Transform = require('./_stream_transform'); +require('inherits')(PassThrough, Transform); +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + Transform.call(this, options); +} +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 0000000..df1f608 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,1027 @@ +// Copyright Joyent, Inc. and other Node 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. + +'use strict'; + +module.exports = Readable; + +/**/ +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = require('events').EventEmitter; +var EElistenerCount = function EElistenerCount(emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +var Buffer = require('buffer').Buffer; +var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ +var debugUtil = require('util'); +var debug; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function debug() {}; +} +/**/ + +var BufferList = require('./internal/streams/buffer_list'); +var destroyImpl = require('./internal/streams/destroy'); +var _require = require('./internal/streams/state'), + getHighWaterMark = _require.getHighWaterMark; +var _require$codes = require('../errors').codes, + ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, + ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; + +// Lazy loaded to improve the startup performance. +var StringDecoder; +var createReadableStreamAsyncIterator; +var from; +require('inherits')(Readable, Stream); +var errorOrDestroy = destroyImpl.errorOrDestroy; +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); + + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} +function ReadableState(options, stream, isDuplex) { + Duplex = Duplex || require('./_stream_duplex'); + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); + + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + this.paused = true; + + // Should close be emitted on destroy. Defaults to true. + this.emitClose = options.emitClose !== false; + + // Should .destroy() be called after 'end' (and potentially 'finish') + this.autoDestroy = !!options.autoDestroy; + + // has it been destroyed + this.destroyed = false; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} +function Readable(options) { + Duplex = Duplex || require('./_stream_duplex'); + if (!(this instanceof Readable)) return new Readable(options); + + // Checking for a Stream.Duplex instance is faster here instead of inside + // the ReadableState constructor, at least with V8 6.5 + var isDuplex = this instanceof Duplex; + this._readableState = new ReadableState(options, this, isDuplex); + + // legacy + this.readable = true; + if (options) { + if (typeof options.read === 'function') this._read = options.read; + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } + Stream.call(this); +} +Object.defineProperty(Readable.prototype, 'destroyed', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._readableState === undefined) { + return false; + } + return this._readableState.destroyed; + }, + set: function set(value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + } +}); +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; +Readable.prototype._destroy = function (err, cb) { + cb(err); +}; + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer.from(chunk, encoding); + encoding = ''; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + return readableAddChunk(this, chunk, null, true, false); +}; +function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + debug('readableAddChunk', chunk); + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + errorOrDestroy(stream, er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (addToFront) { + if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); + } else if (state.ended) { + errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); + } else if (state.destroyed) { + return false; + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + maybeReadMore(stream, state); + } + } + + // We can push more data if we are below the highWaterMark. + // Also, if we have no data yet, we can stand some more bytes. + // This is to work around cases where hwm=0, such as the repl. + return !state.ended && (state.length < state.highWaterMark || state.length === 0); +} +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + state.awaitDrain = 0; + stream.emit('data', chunk); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); +} +function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk); + } + return er; +} +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + var decoder = new StringDecoder(enc); + this._readableState.decoder = decoder; + // If setEncoding(null), decoder.encoding equals utf8 + this._readableState.encoding = this._readableState.decoder.encoding; + + // Iterate over current buffer to convert already stored Buffers: + var p = this._readableState.buffer.head; + var content = ''; + while (p !== null) { + content += decoder.write(p.data); + p = p.next; + } + this._readableState.buffer.clear(); + if (content !== '') this._readableState.buffer.push(content); + this._readableState.length = content.length; + return this; +}; + +// Don't raise the hwm > 1GB +var MAX_HWM = 0x40000000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE. + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + if (n !== 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + if (ret === null) { + state.needReadable = state.length <= state.highWaterMark; + n = 0; + } else { + state.length -= n; + state.awaitDrain = 0; + } + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } + if (ret !== null) this.emit('data', ret); + return ret; +}; +function onEofChunk(stream, state) { + debug('onEofChunk'); + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + if (state.sync) { + // if we are sync, wait until next tick to emit the data. + // Otherwise we risk emitting data in the flow() + // the readable code triggers during a read() call + emitReadable(stream); + } else { + // emit 'readable' now to make sure it gets picked up. + state.needReadable = false; + if (!state.emittedReadable) { + state.emittedReadable = true; + emitReadable_(stream); + } + } +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + debug('emitReadable', state.needReadable, state.emittedReadable); + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + process.nextTick(emitReadable_, stream); + } +} +function emitReadable_(stream) { + var state = stream._readableState; + debug('emitReadable_', state.destroyed, state.length, state.ended); + if (!state.destroyed && (state.length || state.ended)) { + stream.emit('readable'); + state.emittedReadable = false; + } + + // The stream needs another readable event if + // 1. It is not flowing, as the flow mechanism will take + // care of it. + // 2. It is not ended. + // 3. It is below the highWaterMark, so we can schedule + // another readable later. + state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(maybeReadMore_, stream, state); + } +} +function maybeReadMore_(stream, state) { + // Attempt to read more data if we should. + // + // The conditions for reading more data are (one of): + // - Not enough data buffered (state.length < state.highWaterMark). The loop + // is responsible for filling the buffer with enough data if such data + // is available. If highWaterMark is 0 and we are not in the flowing mode + // we should _not_ attempt to buffer any extra data. We'll get more data + // when the stream consumer calls read() instead. + // - No data in the buffer, and the stream is in flowing mode. In this mode + // the loop below is responsible for ensuring read() is called. Failing to + // call read here would abort the flow and there's no other mechanism for + // continuing the flow if the stream consumer has just subscribed to the + // 'data' event. + // + // In addition to the above conditions to keep reading data, the following + // conditions prevent the data from being read: + // - The stream has ended (state.ended). + // - There is already a pending 'read' operation (state.reading). This is a + // case where the the stream has called the implementation defined _read() + // method, but they are processing the call asynchronously and have _not_ + // called push() with new data. In this case we skip performing more + // read()s. The execution ends in this method again after the _read() ends + // up calling push() with more data. + while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { + var len = state.length; + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()')); +}; +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn); + dest.on('unpipe', onunpipe); + function onunpipe(readable, unpipeInfo) { + debug('onunpipe'); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', unpipe); + src.removeListener('data', ondata); + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + var ret = dest.write(chunk); + debug('dest.write', ret); + if (ret === false) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', state.awaitDrain); + state.awaitDrain++; + } + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + return dest; +}; +function pipeOnDrain(src) { + return function pipeOnDrainFunctionResult() { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + var unpipeInfo = { + hasUnpiped: false + }; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this, unpipeInfo); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, { + hasUnpiped: false + }); + return this; + } + + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + dest.emit('unpipe', this, unpipeInfo); + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + var state = this._readableState; + if (ev === 'data') { + // update readableListening so that resume() may be a no-op + // a few lines down. This is needed to support once('readable'). + state.readableListening = this.listenerCount('readable') > 0; + + // Try start flowing on next tick if stream isn't explicitly paused + if (state.flowing !== false) this.resume(); + } else if (ev === 'readable') { + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.flowing = false; + state.emittedReadable = false; + debug('on readable', state.length, state.reading); + if (state.length) { + emitReadable(this); + } else if (!state.reading) { + process.nextTick(nReadingNextTick, this); + } + } + } + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; +Readable.prototype.removeListener = function (ev, fn) { + var res = Stream.prototype.removeListener.call(this, ev, fn); + if (ev === 'readable') { + // We need to check if there is someone still listening to + // readable and reset the state. However this needs to happen + // after readable has been emitted but before I/O (nextTick) to + // support once('readable', fn) cycles. This means that calling + // resume within the same tick will have no + // effect. + process.nextTick(updateReadableListening, this); + } + return res; +}; +Readable.prototype.removeAllListeners = function (ev) { + var res = Stream.prototype.removeAllListeners.apply(this, arguments); + if (ev === 'readable' || ev === undefined) { + // We need to check if there is someone still listening to + // readable and reset the state. However this needs to happen + // after readable has been emitted but before I/O (nextTick) to + // support once('readable', fn) cycles. This means that calling + // resume within the same tick will have no + // effect. + process.nextTick(updateReadableListening, this); + } + return res; +}; +function updateReadableListening(self) { + var state = self._readableState; + state.readableListening = self.listenerCount('readable') > 0; + if (state.resumeScheduled && !state.paused) { + // flowing needs to be set to true now, otherwise + // the upcoming resume will not flow. + state.flowing = true; + + // crude way to check if we should resume + } else if (self.listenerCount('data') > 0) { + self.resume(); + } +} +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + // we flow only if there is no one listening + // for readable, but we still have to call + // resume() + state.flowing = !state.readableListening; + resume(this, state); + } + state.paused = false; + return this; +}; +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + process.nextTick(resume_, stream, state); + } +} +function resume_(stream, state) { + debug('resume', state.reading); + if (!state.reading) { + stream.read(0); + } + state.resumeScheduled = false; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (this._readableState.flowing !== false) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + this._readableState.paused = true; + return this; +}; +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null); +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var _this = this; + var state = this._readableState; + var paused = false; + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + _this.push(null); + }); + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function methodWrap(method) { + return function methodWrapReturnFunction() { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + this._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + return this; +}; +if (typeof Symbol === 'function') { + Readable.prototype[Symbol.asyncIterator] = function () { + if (createReadableStreamAsyncIterator === undefined) { + createReadableStreamAsyncIterator = require('./internal/streams/async_iterator'); + } + return createReadableStreamAsyncIterator(this); + }; +} +Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.highWaterMark; + } +}); +Object.defineProperty(Readable.prototype, 'readableBuffer', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState && this._readableState.buffer; + } +}); +Object.defineProperty(Readable.prototype, 'readableFlowing', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.flowing; + }, + set: function set(state) { + if (this._readableState) { + this._readableState.flowing = state; + } + } +}); + +// exposed for testing purposes only. +Readable._fromList = fromList; +Object.defineProperty(Readable.prototype, 'readableLength', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.length; + } +}); + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = state.buffer.consume(n, state.decoder); + } + return ret; +} +function endReadable(stream) { + var state = stream._readableState; + debug('endReadable', state.endEmitted); + if (!state.endEmitted) { + state.ended = true; + process.nextTick(endReadableNT, state, stream); + } +} +function endReadableNT(state, stream) { + debug('endReadableNT', state.endEmitted, state.length); + + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + if (state.autoDestroy) { + // In case of duplex streams we need a way to detect + // if the writable side is ready for autoDestroy as well + var wState = stream._writableState; + if (!wState || wState.autoDestroy && wState.finished) { + stream.destroy(); + } + } + } +} +if (typeof Symbol === 'function') { + Readable.from = function (iterable, opts) { + if (from === undefined) { + from = require('./internal/streams/from'); + } + return from(Readable, iterable, opts); + }; +} +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 0000000..1ccb715 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,190 @@ +// Copyright Joyent, Inc. and other Node 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. + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +'use strict'; + +module.exports = Transform; +var _require$codes = require('../errors').codes, + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, + ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, + ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; +var Duplex = require('./_stream_duplex'); +require('inherits')(Transform, Duplex); +function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + var cb = ts.writecb; + if (cb === null) { + return this.emit('error', new ERR_MULTIPLE_CALLBACK()); + } + ts.writechunk = null; + ts.writecb = null; + if (data != null) + // single equals check for both `null` and `undefined` + this.push(data); + cb(er); + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } +} +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + Duplex.call(this, options); + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + if (typeof options.flush === 'function') this._flush = options.flush; + } + + // When the writable side finishes, then flush out anything remaining. + this.on('prefinish', prefinish); +} +function prefinish() { + var _this = this; + if (typeof this._flush === 'function' && !this._readableState.destroyed) { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } +} +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()')); +}; +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + if (ts.writechunk !== null && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; +Transform.prototype._destroy = function (err, cb) { + Duplex.prototype._destroy.call(this, err, function (err2) { + cb(err2); + }); +}; +function done(stream, er, data) { + if (er) return stream.emit('error', er); + if (data != null) + // single equals check for both `null` and `undefined` + stream.push(data); + + // TODO(BridgeAR): Write a test for these two error cases + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); + if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); + return stream.push(null); +} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 0000000..292415e --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,641 @@ +// Copyright Joyent, Inc. and other Node 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. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + +'use strict'; + +module.exports = Writable; + +/* */ +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + this.next = null; + this.entry = null; + this.finish = function () { + onCorkedFinish(_this, state); + }; +} +/* */ + +/**/ +var Duplex; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var internalUtil = { + deprecate: require('util-deprecate') +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +var Buffer = require('buffer').Buffer; +var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} +var destroyImpl = require('./internal/streams/destroy'); +var _require = require('./internal/streams/state'), + getHighWaterMark = _require.getHighWaterMark; +var _require$codes = require('../errors').codes, + ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, + ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, + ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, + ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, + ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, + ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; +var errorOrDestroy = destroyImpl.errorOrDestroy; +require('inherits')(Writable, Stream); +function nop() {} +function WritableState(options, stream, isDuplex) { + Duplex = Duplex || require('./_stream_duplex'); + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream, + // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. + if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); + + // if _final has been called + this.finalCalled = false; + + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // has it been destroyed + this.destroyed = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // Should close be emitted on destroy. Defaults to true. + this.emitClose = options.emitClose !== false; + + // Should .destroy() be called after 'finish' (and potentially 'end') + this.autoDestroy = !!options.autoDestroy; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function writableStateBufferGetter() { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') + }); + } catch (_) {} +})(); + +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function value(object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function realHasInstance(object) { + return object instanceof this; + }; +} +function Writable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + + // Checking for a Stream.Duplex instance is faster here instead of inside + // the WritableState constructor, at least with V8 6.5 + var isDuplex = this instanceof Duplex; + if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); + this._writableState = new WritableState(options, this, isDuplex); + + // legacy. + this.writable = true; + if (options) { + if (typeof options.write === 'function') this._write = options.write; + if (typeof options.writev === 'function') this._writev = options.writev; + if (typeof options.destroy === 'function') this._destroy = options.destroy; + if (typeof options.final === 'function') this._final = options.final; + } + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); +}; +function writeAfterEnd(stream, cb) { + var er = new ERR_STREAM_WRITE_AFTER_END(); + // TODO: defer error events consistently everywhere, not just the cb + errorOrDestroy(stream, er); + process.nextTick(cb, er); +} + +// Checks that a user-supplied chunk is valid, especially for the particular +// mode the stream is in. Currently this means that `null` is never accepted +// and undefined/non-string values are only allowed in object mode. +function validChunk(stream, state, chunk, cb) { + var er; + if (chunk === null) { + er = new ERR_STREAM_NULL_VALUES(); + } else if (typeof chunk !== 'string' && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk); + } + if (er) { + errorOrDestroy(stream, er); + process.nextTick(cb, er); + return false; + } + return true; +} +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + if (typeof cb !== 'function') cb = nop; + if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + return ret; +}; +Writable.prototype.cork = function () { + this._writableState.corked++; +}; +Writable.prototype.uncork = function () { + var state = this._writableState; + if (state.corked) { + state.corked--; + if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; +Object.defineProperty(Writable.prototype, 'writableBuffer', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } +}); +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + return chunk; +} +Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } +}); + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = 'buffer'; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + state.length += len; + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk: chunk, + encoding: encoding, + isBuf: isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + return ret; +} +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) { + // defer the callback if we are being called synchronously + // to avoid piling up things on the stack + process.nextTick(cb, er); + // this can emit finish, and it will always happen + // after error + process.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + } else { + // the caller expect this to happen before if + // it is async + cb(er); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + // this can emit finish, but finish must + // always follow error + finishMaybe(stream, state); + } +} +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK(); + onwriteStateUpdate(state); + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state) || stream.destroyed; + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + if (sync) { + process.nextTick(afterWrite, stream, state, finished, cb); + } else { + afterWrite(stream, state, finished, cb); + } + } +} +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + if (entry === null) state.lastBufferedRequest = null; + } + state.bufferedRequest = entry; + state.bufferProcessing = false; +} +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()')); +}; +Writable.prototype._writev = null; +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending) endWritable(this, state, cb); + return this; +}; +Object.defineProperty(Writable.prototype, 'writableLength', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.length; + } +}); +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} +function callFinal(stream, state) { + stream._final(function (err) { + state.pendingcb--; + if (err) { + errorOrDestroy(stream, err); + } + state.prefinished = true; + stream.emit('prefinish'); + finishMaybe(stream, state); + }); +} +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function' && !state.destroyed) { + state.pendingcb++; + state.finalCalled = true; + process.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit('prefinish'); + } + } +} +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit('finish'); + if (state.autoDestroy) { + // In case of duplex streams we need a way to detect + // if the readable side is ready for autoDestroy as well + var rState = stream._readableState; + if (!rState || rState.autoDestroy && rState.endEmitted) { + stream.destroy(); + } + } + } + } + return need; +} +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) process.nextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} +function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + + // reuse the free corkReq. + state.corkedRequestsFree.next = corkReq; +} +Object.defineProperty(Writable.prototype, 'destroyed', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._writableState === undefined) { + return false; + } + return this._writableState.destroyed; + }, + set: function set(value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._writableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._writableState.destroyed = value; + } +}); +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; +Writable.prototype._destroy = function (err, cb) { + cb(err); +}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/async_iterator.js b/node_modules/readable-stream/lib/internal/streams/async_iterator.js new file mode 100644 index 0000000..742c5a4 --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/async_iterator.js @@ -0,0 +1,180 @@ +'use strict'; + +var _Object$setPrototypeO; +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +var finished = require('./end-of-stream'); +var kLastResolve = Symbol('lastResolve'); +var kLastReject = Symbol('lastReject'); +var kError = Symbol('error'); +var kEnded = Symbol('ended'); +var kLastPromise = Symbol('lastPromise'); +var kHandlePromise = Symbol('handlePromise'); +var kStream = Symbol('stream'); +function createIterResult(value, done) { + return { + value: value, + done: done + }; +} +function readAndResolve(iter) { + var resolve = iter[kLastResolve]; + if (resolve !== null) { + var data = iter[kStream].read(); + // we defer if data is null + // we can be expecting either 'end' or + // 'error' + if (data !== null) { + iter[kLastPromise] = null; + iter[kLastResolve] = null; + iter[kLastReject] = null; + resolve(createIterResult(data, false)); + } + } +} +function onReadable(iter) { + // we wait for the next tick, because it might + // emit an error with process.nextTick + process.nextTick(readAndResolve, iter); +} +function wrapForNext(lastPromise, iter) { + return function (resolve, reject) { + lastPromise.then(function () { + if (iter[kEnded]) { + resolve(createIterResult(undefined, true)); + return; + } + iter[kHandlePromise](resolve, reject); + }, reject); + }; +} +var AsyncIteratorPrototype = Object.getPrototypeOf(function () {}); +var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { + get stream() { + return this[kStream]; + }, + next: function next() { + var _this = this; + // if we have detected an error in the meanwhile + // reject straight away + var error = this[kError]; + if (error !== null) { + return Promise.reject(error); + } + if (this[kEnded]) { + return Promise.resolve(createIterResult(undefined, true)); + } + if (this[kStream].destroyed) { + // We need to defer via nextTick because if .destroy(err) is + // called, the error will be emitted via nextTick, and + // we cannot guarantee that there is no error lingering around + // waiting to be emitted. + return new Promise(function (resolve, reject) { + process.nextTick(function () { + if (_this[kError]) { + reject(_this[kError]); + } else { + resolve(createIterResult(undefined, true)); + } + }); + }); + } + + // if we have multiple next() calls + // we will wait for the previous Promise to finish + // this logic is optimized to support for await loops, + // where next() is only called once at a time + var lastPromise = this[kLastPromise]; + var promise; + if (lastPromise) { + promise = new Promise(wrapForNext(lastPromise, this)); + } else { + // fast path needed to support multiple this.push() + // without triggering the next() queue + var data = this[kStream].read(); + if (data !== null) { + return Promise.resolve(createIterResult(data, false)); + } + promise = new Promise(this[kHandlePromise]); + } + this[kLastPromise] = promise; + return promise; + } +}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () { + return this; +}), _defineProperty(_Object$setPrototypeO, "return", function _return() { + var _this2 = this; + // destroy(err, cb) is a private API + // we can guarantee we have that here, because we control the + // Readable class this is attached to + return new Promise(function (resolve, reject) { + _this2[kStream].destroy(null, function (err) { + if (err) { + reject(err); + return; + } + resolve(createIterResult(undefined, true)); + }); + }); +}), _Object$setPrototypeO), AsyncIteratorPrototype); +var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) { + var _Object$create; + var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { + value: stream, + writable: true + }), _defineProperty(_Object$create, kLastResolve, { + value: null, + writable: true + }), _defineProperty(_Object$create, kLastReject, { + value: null, + writable: true + }), _defineProperty(_Object$create, kError, { + value: null, + writable: true + }), _defineProperty(_Object$create, kEnded, { + value: stream._readableState.endEmitted, + writable: true + }), _defineProperty(_Object$create, kHandlePromise, { + value: function value(resolve, reject) { + var data = iterator[kStream].read(); + if (data) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + resolve(createIterResult(data, false)); + } else { + iterator[kLastResolve] = resolve; + iterator[kLastReject] = reject; + } + }, + writable: true + }), _Object$create)); + iterator[kLastPromise] = null; + finished(stream, function (err) { + if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { + var reject = iterator[kLastReject]; + // reject if we are waiting for data in the Promise + // returned by next() and store the error + if (reject !== null) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + reject(err); + } + iterator[kError] = err; + return; + } + var resolve = iterator[kLastResolve]; + if (resolve !== null) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + resolve(createIterResult(undefined, true)); + } + iterator[kEnded] = true; + }); + stream.on('readable', onReadable.bind(null, iterator)); + return iterator; +}; +module.exports = createReadableStreamAsyncIterator; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/buffer_list.js b/node_modules/readable-stream/lib/internal/streams/buffer_list.js new file mode 100644 index 0000000..69bda49 --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/buffer_list.js @@ -0,0 +1,183 @@ +'use strict'; + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +var _require = require('buffer'), + Buffer = _require.Buffer; +var _require2 = require('util'), + inspect = _require2.inspect; +var custom = inspect && inspect.custom || 'inspect'; +function copyBuffer(src, target, offset) { + Buffer.prototype.copy.call(src, target, offset); +} +module.exports = /*#__PURE__*/function () { + function BufferList() { + _classCallCheck(this, BufferList); + this.head = null; + this.tail = null; + this.length = 0; + } + _createClass(BufferList, [{ + key: "push", + value: function push(v) { + var entry = { + data: v, + next: null + }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; + } + }, { + key: "unshift", + value: function unshift(v) { + var entry = { + data: v, + next: this.head + }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + } + }, { + key: "shift", + value: function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; + } + }, { + key: "clear", + value: function clear() { + this.head = this.tail = null; + this.length = 0; + } + }, { + key: "join", + value: function join(s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) ret += s + p.data; + return ret; + } + }, { + key: "concat", + value: function concat(n) { + if (this.length === 0) return Buffer.alloc(0); + var ret = Buffer.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + } + + // Consumes a specified amount of bytes or characters from the buffered data. + }, { + key: "consume", + value: function consume(n, hasStrings) { + var ret; + if (n < this.head.data.length) { + // `slice` is the same for buffers and strings. + ret = this.head.data.slice(0, n); + this.head.data = this.head.data.slice(n); + } else if (n === this.head.data.length) { + // First chunk is a perfect match. + ret = this.shift(); + } else { + // Result spans more than one buffer. + ret = hasStrings ? this._getString(n) : this._getBuffer(n); + } + return ret; + } + }, { + key: "first", + value: function first() { + return this.head.data; + } + + // Consumes a specified amount of characters from the buffered data. + }, { + key: "_getString", + value: function _getString(n) { + var p = this.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) this.head = p.next;else this.head = this.tail = null; + } else { + this.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + this.length -= c; + return ret; + } + + // Consumes a specified amount of bytes from the buffered data. + }, { + key: "_getBuffer", + value: function _getBuffer(n) { + var ret = Buffer.allocUnsafe(n); + var p = this.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) this.head = p.next;else this.head = this.tail = null; + } else { + this.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + this.length -= c; + return ret; + } + + // Make sure the linked list only shows the minimal necessary information. + }, { + key: custom, + value: function value(_, options) { + return inspect(this, _objectSpread(_objectSpread({}, options), {}, { + // Only inspect one level. + depth: 0, + // It should not recurse. + customInspect: false + })); + } + }]); + return BufferList; +}(); \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/readable-stream/lib/internal/streams/destroy.js new file mode 100644 index 0000000..31a17c4 --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/destroy.js @@ -0,0 +1,96 @@ +'use strict'; + +// undocumented cb() API, needed for core, not for public API +function destroy(err, cb) { + var _this = this; + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err) { + if (!this._writableState) { + process.nextTick(emitErrorNT, this, err); + } else if (!this._writableState.errorEmitted) { + this._writableState.errorEmitted = true; + process.nextTick(emitErrorNT, this, err); + } + } + return this; + } + + // we set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks + + if (this._readableState) { + this._readableState.destroyed = true; + } + + // if this is a duplex stream mark the writable part as destroyed as well + if (this._writableState) { + this._writableState.destroyed = true; + } + this._destroy(err || null, function (err) { + if (!cb && err) { + if (!_this._writableState) { + process.nextTick(emitErrorAndCloseNT, _this, err); + } else if (!_this._writableState.errorEmitted) { + _this._writableState.errorEmitted = true; + process.nextTick(emitErrorAndCloseNT, _this, err); + } else { + process.nextTick(emitCloseNT, _this); + } + } else if (cb) { + process.nextTick(emitCloseNT, _this); + cb(err); + } else { + process.nextTick(emitCloseNT, _this); + } + }); + return this; +} +function emitErrorAndCloseNT(self, err) { + emitErrorNT(self, err); + emitCloseNT(self); +} +function emitCloseNT(self) { + if (self._writableState && !self._writableState.emitClose) return; + if (self._readableState && !self._readableState.emitClose) return; + self.emit('close'); +} +function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finalCalled = false; + this._writableState.prefinished = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } +} +function emitErrorNT(self, err) { + self.emit('error', err); +} +function errorOrDestroy(stream, err) { + // We have tests that rely on errors being emitted + // in the same tick, so changing this is semver major. + // For now when you opt-in to autoDestroy we allow + // the error to be emitted nextTick. In a future + // semver major update we should change the default to this. + + var rState = stream._readableState; + var wState = stream._writableState; + if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err); +} +module.exports = { + destroy: destroy, + undestroy: undestroy, + errorOrDestroy: errorOrDestroy +}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/end-of-stream.js b/node_modules/readable-stream/lib/internal/streams/end-of-stream.js new file mode 100644 index 0000000..59c671b --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/end-of-stream.js @@ -0,0 +1,86 @@ +// Ported from https://github.com/mafintosh/end-of-stream with +// permission from the author, Mathias Buus (@mafintosh). + +'use strict'; + +var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE; +function once(callback) { + var called = false; + return function () { + if (called) return; + called = true; + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + callback.apply(this, args); + }; +} +function noop() {} +function isRequest(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +} +function eos(stream, opts, callback) { + if (typeof opts === 'function') return eos(stream, null, opts); + if (!opts) opts = {}; + callback = once(callback || noop); + var readable = opts.readable || opts.readable !== false && stream.readable; + var writable = opts.writable || opts.writable !== false && stream.writable; + var onlegacyfinish = function onlegacyfinish() { + if (!stream.writable) onfinish(); + }; + var writableEnded = stream._writableState && stream._writableState.finished; + var onfinish = function onfinish() { + writable = false; + writableEnded = true; + if (!readable) callback.call(stream); + }; + var readableEnded = stream._readableState && stream._readableState.endEmitted; + var onend = function onend() { + readable = false; + readableEnded = true; + if (!writable) callback.call(stream); + }; + var onerror = function onerror(err) { + callback.call(stream, err); + }; + var onclose = function onclose() { + var err; + if (readable && !readableEnded) { + if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + if (writable && !writableEnded) { + if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + }; + var onrequest = function onrequest() { + stream.req.on('finish', onfinish); + }; + if (isRequest(stream)) { + stream.on('complete', onfinish); + stream.on('abort', onclose); + if (stream.req) onrequest();else stream.on('request', onrequest); + } else if (writable && !stream._writableState) { + // legacy streams + stream.on('end', onlegacyfinish); + stream.on('close', onlegacyfinish); + } + stream.on('end', onend); + stream.on('finish', onfinish); + if (opts.error !== false) stream.on('error', onerror); + stream.on('close', onclose); + return function () { + stream.removeListener('complete', onfinish); + stream.removeListener('abort', onclose); + stream.removeListener('request', onrequest); + if (stream.req) stream.req.removeListener('finish', onfinish); + stream.removeListener('end', onlegacyfinish); + stream.removeListener('close', onlegacyfinish); + stream.removeListener('finish', onfinish); + stream.removeListener('end', onend); + stream.removeListener('error', onerror); + stream.removeListener('close', onclose); + }; +} +module.exports = eos; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/from-browser.js b/node_modules/readable-stream/lib/internal/streams/from-browser.js new file mode 100644 index 0000000..a4ce56f --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/from-browser.js @@ -0,0 +1,3 @@ +module.exports = function () { + throw new Error('Readable.from is not available in the browser') +}; diff --git a/node_modules/readable-stream/lib/internal/streams/from.js b/node_modules/readable-stream/lib/internal/streams/from.js new file mode 100644 index 0000000..0a34ee9 --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/from.js @@ -0,0 +1,52 @@ +'use strict'; + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +var ERR_INVALID_ARG_TYPE = require('../../../errors').codes.ERR_INVALID_ARG_TYPE; +function from(Readable, iterable, opts) { + var iterator; + if (iterable && typeof iterable.next === 'function') { + iterator = iterable; + } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable); + var readable = new Readable(_objectSpread({ + objectMode: true + }, opts)); + // Reading boolean to protect against _read + // being called before last iteration completion. + var reading = false; + readable._read = function () { + if (!reading) { + reading = true; + next(); + } + }; + function next() { + return _next2.apply(this, arguments); + } + function _next2() { + _next2 = _asyncToGenerator(function* () { + try { + var _yield$iterator$next = yield iterator.next(), + value = _yield$iterator$next.value, + done = _yield$iterator$next.done; + if (done) { + readable.push(null); + } else if (readable.push(yield value)) { + next(); + } else { + reading = false; + } + } catch (err) { + readable.destroy(err); + } + }); + return _next2.apply(this, arguments); + } + return readable; +} +module.exports = from; diff --git a/node_modules/readable-stream/lib/internal/streams/pipeline.js b/node_modules/readable-stream/lib/internal/streams/pipeline.js new file mode 100644 index 0000000..e6f3924 --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/pipeline.js @@ -0,0 +1,86 @@ +// Ported from https://github.com/mafintosh/pump with +// permission from the author, Mathias Buus (@mafintosh). + +'use strict'; + +var eos; +function once(callback) { + var called = false; + return function () { + if (called) return; + called = true; + callback.apply(void 0, arguments); + }; +} +var _require$codes = require('../../../errors').codes, + ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, + ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; +function noop(err) { + // Rethrow the error if it exists to avoid swallowing it + if (err) throw err; +} +function isRequest(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +} +function destroyer(stream, reading, writing, callback) { + callback = once(callback); + var closed = false; + stream.on('close', function () { + closed = true; + }); + if (eos === undefined) eos = require('./end-of-stream'); + eos(stream, { + readable: reading, + writable: writing + }, function (err) { + if (err) return callback(err); + closed = true; + callback(); + }); + var destroyed = false; + return function (err) { + if (closed) return; + if (destroyed) return; + destroyed = true; + + // request.destroy just do .end - .abort is what we want + if (isRequest(stream)) return stream.abort(); + if (typeof stream.destroy === 'function') return stream.destroy(); + callback(err || new ERR_STREAM_DESTROYED('pipe')); + }; +} +function call(fn) { + fn(); +} +function pipe(from, to) { + return from.pipe(to); +} +function popCallback(streams) { + if (!streams.length) return noop; + if (typeof streams[streams.length - 1] !== 'function') return noop; + return streams.pop(); +} +function pipeline() { + for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { + streams[_key] = arguments[_key]; + } + var callback = popCallback(streams); + if (Array.isArray(streams[0])) streams = streams[0]; + if (streams.length < 2) { + throw new ERR_MISSING_ARGS('streams'); + } + var error; + var destroys = streams.map(function (stream, i) { + var reading = i < streams.length - 1; + var writing = i > 0; + return destroyer(stream, reading, writing, function (err) { + if (!error) error = err; + if (err) destroys.forEach(call); + if (reading) return; + destroys.forEach(call); + callback(error); + }); + }); + return streams.reduce(pipe); +} +module.exports = pipeline; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/state.js b/node_modules/readable-stream/lib/internal/streams/state.js new file mode 100644 index 0000000..3fbf892 --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/state.js @@ -0,0 +1,22 @@ +'use strict'; + +var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE; +function highWaterMarkFrom(options, isDuplex, duplexKey) { + return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; +} +function getHighWaterMark(state, options, duplexKey, isDuplex) { + var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); + if (hwm != null) { + if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { + var name = isDuplex ? duplexKey : 'highWaterMark'; + throw new ERR_INVALID_OPT_VALUE(name, hwm); + } + return Math.floor(hwm); + } + + // Default value + return state.objectMode ? 16 : 16 * 1024; +} +module.exports = { + getHighWaterMark: getHighWaterMark +}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/readable-stream/lib/internal/streams/stream-browser.js new file mode 100644 index 0000000..9332a3f --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/stream-browser.js @@ -0,0 +1 @@ +module.exports = require('events').EventEmitter; diff --git a/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/readable-stream/lib/internal/streams/stream.js new file mode 100644 index 0000000..ce2ad5b --- /dev/null +++ b/node_modules/readable-stream/lib/internal/streams/stream.js @@ -0,0 +1 @@ +module.exports = require('stream'); diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json new file mode 100644 index 0000000..ade59e7 --- /dev/null +++ b/node_modules/readable-stream/package.json @@ -0,0 +1,68 @@ +{ + "name": "readable-stream", + "version": "3.6.2", + "description": "Streams3, a user-land copy of the stream library from Node.js", + "main": "readable.js", + "engines": { + "node": ">= 6" + }, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "devDependencies": { + "@babel/cli": "^7.2.0", + "@babel/core": "^7.2.0", + "@babel/polyfill": "^7.0.0", + "@babel/preset-env": "^7.2.0", + "airtap": "0.0.9", + "assert": "^1.4.0", + "bl": "^2.0.0", + "deep-strict-equal": "^0.2.0", + "events.once": "^2.0.2", + "glob": "^7.1.2", + "gunzip-maybe": "^1.4.1", + "hyperquest": "^2.1.3", + "lolex": "^2.6.0", + "nyc": "^11.0.0", + "pump": "^3.0.0", + "rimraf": "^2.6.2", + "tap": "^12.0.0", + "tape": "^4.9.0", + "tar-fs": "^1.16.2", + "util-promisify": "^2.1.0" + }, + "scripts": { + "test": "tap -J --no-esm test/parallel/*.js test/ours/*.js", + "ci": "TAP=1 tap --no-esm test/parallel/*.js test/ours/*.js | tee test.tap", + "test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js", + "test-browser-local": "airtap --open --local -- test/browser.js", + "cover": "nyc npm test", + "report": "nyc report --reporter=lcov", + "update-browser-errors": "babel -o errors-browser.js errors.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/nodejs/readable-stream" + }, + "keywords": [ + "readable", + "stream", + "pipe" + ], + "browser": { + "util": false, + "worker_threads": false, + "./errors": "./errors-browser.js", + "./readable.js": "./readable-browser.js", + "./lib/internal/streams/from.js": "./lib/internal/streams/from-browser.js", + "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" + }, + "nyc": { + "include": [ + "lib/**.js" + ] + }, + "license": "MIT" +} diff --git a/node_modules/readable-stream/readable-browser.js b/node_modules/readable-stream/readable-browser.js new file mode 100644 index 0000000..adbf60d --- /dev/null +++ b/node_modules/readable-stream/readable-browser.js @@ -0,0 +1,9 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = exports; +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); +exports.finished = require('./lib/internal/streams/end-of-stream.js'); +exports.pipeline = require('./lib/internal/streams/pipeline.js'); diff --git a/node_modules/readable-stream/readable.js b/node_modules/readable-stream/readable.js new file mode 100644 index 0000000..9e0ca12 --- /dev/null +++ b/node_modules/readable-stream/readable.js @@ -0,0 +1,16 @@ +var Stream = require('stream'); +if (process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream.Readable; + Object.assign(module.exports, Stream); + module.exports.Stream = Stream; +} else { + exports = module.exports = require('./lib/_stream_readable.js'); + exports.Stream = Stream || exports; + exports.Readable = exports; + exports.Writable = require('./lib/_stream_writable.js'); + exports.Duplex = require('./lib/_stream_duplex.js'); + exports.Transform = require('./lib/_stream_transform.js'); + exports.PassThrough = require('./lib/_stream_passthrough.js'); + exports.finished = require('./lib/internal/streams/end-of-stream.js'); + exports.pipeline = require('./lib/internal/streams/pipeline.js'); +} diff --git a/node_modules/rimraf/LICENSE b/node_modules/rimraf/LICENSE new file mode 100644 index 0000000..1493534 --- /dev/null +++ b/node_modules/rimraf/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2011-2023 Isaac Z. Schlueter and 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/rimraf/README.md b/node_modules/rimraf/README.md new file mode 100644 index 0000000..0f57b05 --- /dev/null +++ b/node_modules/rimraf/README.md @@ -0,0 +1,214 @@ +The [UNIX command]() `rm -rf` for node. + +Install with `npm install rimraf`. + +## Major Changes from v3 to v4 + +- The function returns a `Promise` instead of taking a callback. +- Globbing requires the `--glob` option to be set. (Removed in + 4.0 and 4.1, opt-in support added in 4.2.) +- Functions take arrays of paths, as well as a single path. +- Native implementation used by default when available, except on + Windows, where this implementation is faster and more reliable. +- New implementation on Windows, falling back to "move then + remove" strategy when exponential backoff for `EBUSY` fails to + resolve the situation. +- Simplified implementation on Posix, since the Windows + affordances are not necessary there. +- As of 4.3, return/resolve value is boolean instead of undefined + +## API + +Hybrid module, load either with `import` or `require()`. + +```js +// default export is the main rimraf function, or use named imports +import rimraf from 'rimraf' +// or +const rimraf = require('rimraf') + +// other strategies exported as well +import { rimraf, rimrafSync, native, nativeSync } from 'rimraf' +// or +const { rimraf, rimrafSync, native, nativeSync } = require('rimraf') +``` + +All removal functions return a boolean indicating that all +entries were successfully removed. + +The only case in which this will not return `true` is if +something was omitted from the removal via a `filter` option. + +### `rimraf(f, [opts]) -> Promise` + +This first parameter is a path or array of paths. The second +argument is an options object. + +Options: + +- `preserveRoot`: If set to boolean `false`, then allow the + recursive removal of the root directory. Otherwise, this is + not allowed. +- `tmp`: Windows only. Temp folder to use to place files and + folders for the "move then remove" fallback. Must be on the + same physical device as the path being deleted. Defaults to + `os.tmpdir()` when that is on the same drive letter as the path + being deleted, or `${drive}:\temp` if present, or `${drive}:\` + if not. +- `maxRetries`: Windows and Native only. Maximum number of + retry attempts in case of `EBUSY`, `EMFILE`, and `ENFILE` + errors. Default `10` for Windows implementation, `0` for Native + implementation. +- `backoff`: Windows only. Rate of exponential backoff for async + removal in case of `EBUSY`, `EMFILE`, and `ENFILE` errors. + Should be a number greater than 1. Default `1.2` +- `maxBackoff`: Windows only. Maximum total backoff time in ms to + attempt asynchronous retries in case of `EBUSY`, `EMFILE`, and + `ENFILE` errors. Default `200`. With the default `1.2` backoff + rate, this results in 14 retries, with the final retry being + delayed 33ms. +- `retryDelay`: Native only. Time to wait between retries, using + linear backoff. Default `100`. +- `signal` Pass in an AbortSignal to cancel the directory + removal. This is useful when removing large folder structures, + if you'd like to limit the amount of time spent. + + Using a `signal` option prevents the use of Node's built-in + `fs.rm` because that implementation does not support abort + signals. + +- `filter` Method that returns a boolean indicating whether that + path should be deleted. With async rimraf methods, this may + return a Promise that resolves to a boolean. (Since Promises + are truthy, returning a Promise from a sync filter is the same + as just not filtering anything.) + + The first argument to the filter is the path string. The + second argument is either a `Dirent` or `Stats` object for that + path. (The first path explored will be a `Stats`, the rest + will be `Dirent`.) + + If a filter method is provided, it will _only_ remove entries + if the filter returns (or resolves to) a truthy value. Omitting + a directory will still allow its children to be removed, unless + they are also filtered out, but any parents of a filtered entry + will not be removed, since the directory would not be empty in + that case. + + Using a filter method prevents the use of Node's built-in + `fs.rm` because that implementation does not support filtering. + +Any other options are provided to the native Node.js `fs.rm` implementation +when that is used. + +This will attempt to choose the best implementation, based on Node.js +version and `process.platform`. To force a specific implementation, use +one of the other functions provided. + +### `rimraf.sync(f, [opts])` `rimraf.rimrafSync(f, [opts])` + +Synchronous form of `rimraf()` + +Note that, unlike many file system operations, the synchronous form will +typically be significantly _slower_ than the async form, because recursive +deletion is extremely parallelizable. + +### `rimraf.native(f, [opts])` + +Uses the built-in `fs.rm` implementation that Node.js provides. This is +used by default on Node.js versions greater than or equal to `14.14.0`. + +### `rimraf.nativeSync(f, [opts])` `rimraf.native.sync(f, [opts])` + +Synchronous form of `rimraf.native` + +### `rimraf.manual(f, [opts])` + +Use the JavaScript implementation appropriate for your operating system. + +### `rimraf.manualSync(f, [opts])` `rimraf.manualSync(f, opts)` + +Synchronous form of `rimraf.manual()` + +### `rimraf.windows(f, [opts])` + +JavaScript implementation of file removal appropriate for Windows +platforms. Works around `unlink` and `rmdir` not being atomic +operations, and `EPERM` when deleting files with certain +permission modes. + +First deletes all non-directory files within the tree, and then +removes all directories, which should ideally be empty by that +time. When an `ENOTEMPTY` is raised in the second pass, falls +back to the `rimraf.moveRemove` strategy as needed. + +### `rimraf.windows.sync(path, [opts])` `rimraf.windowsSync(path, [opts])` + +Synchronous form of `rimraf.windows()` + +### `rimraf.moveRemove(path, [opts])` + +Moves all files and folders to the parent directory of `path` +with a temporary filename prior to attempting to remove them. + +Note that, in cases where the operation fails, this _may_ leave +files lying around in the parent directory with names like +`.file-basename.txt.0.123412341`. Until the Windows kernel +provides a way to perform atomic `unlink` and `rmdir` operations, +this is unfortunately unavoidable. + +To move files to a different temporary directory other than the +parent, provide `opts.tmp`. Note that this _must_ be on the same +physical device as the folder being deleted, or else the +operation will fail. + +This is the slowest strategy, but most reliable on Windows +platforms. Used as a last-ditch fallback by `rimraf.windows()`. + +### `rimraf.moveRemove.sync(path, [opts])` `rimraf.moveRemoveSync(path, [opts])` + +Synchronous form of `rimraf.moveRemove()` + +### Command Line Interface + +``` +rimraf version 4.3.0 + +Usage: rimraf [ ...] +Deletes all files and folders at "path", recursively. + +Options: + -- Treat all subsequent arguments as paths + -h --help Display this usage info + --preserve-root Do not remove '/' recursively (default) + --no-preserve-root Do not treat '/' specially + -G --no-glob Treat arguments as literal paths, not globs (default) + -g --glob Treat arguments as glob patterns + -v --verbose Be verbose when deleting files, showing them as + they are removed. Not compatible with --impl=native + -V --no-verbose Be silent when deleting files, showing nothing as + they are removed (default) + -i --interactive Ask for confirmation before deleting anything + Not compatible with --impl=native + -I --no-interactive Do not ask for confirmation before deleting + + --impl= Specify the implementation to use: + rimraf: choose the best option (default) + native: the built-in implementation in Node.js + manual: the platform-specific JS implementation + posix: the Posix JS implementation + windows: the Windows JS implementation (falls back to + move-remove on ENOTEMPTY) + move-remove: a slow reliable Windows fallback + +Implementation-specific options: + --tmp= Temp file folder for 'move-remove' implementation + --max-retries= maxRetries for 'native' and 'windows' implementations + --retry-delay= retryDelay for 'native' implementation, default 100 + --backoff= Exponential backoff factor for retries (default: 1.2) +``` + +## mkdirp + +If you need to _create_ a directory recursively, check out +[mkdirp](https://github.com/isaacs/node-mkdirp). diff --git a/node_modules/rimraf/dist/cjs/package.json b/node_modules/rimraf/dist/cjs/package.json new file mode 100644 index 0000000..ea8c28b --- /dev/null +++ b/node_modules/rimraf/dist/cjs/package.json @@ -0,0 +1,84 @@ +{ + "name": "rimraf", + "version": "4.4.1", + "main": "./dist/cjs/src/index-cjs.js", + "module": "./dist/mjs/index.js", + "types": "./dist/mjs/index.d.ts", + "bin": "./dist/cjs/src/bin.js", + "exports": { + ".": { + "import": { + "types": "./dist/mjs/index.d.ts", + "default": "./dist/mjs/index.js" + }, + "require": { + "types": "./dist/cjs/src/index.d.ts", + "default": "./dist/cjs/src/index-cjs.js" + } + } + }, + "files": [ + "dist" + ], + "description": "A deep deletion module for node (like `rm -rf`)", + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "repository": "git://github.com/isaacs/rimraf.git", + "scripts": { + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "preprepare": "rm -rf dist", + "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json", + "postprepare": "bash fixup.sh", + "pretest": "npm run prepare", + "presnap": "npm run prepare", + "test": "c8 tap", + "snap": "c8 tap", + "format": "prettier --write . --loglevel warn", + "benchmark": "node benchmark/index.js", + "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts" + }, + "prettier": { + "semi": false, + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "jsxSingleQuote": false, + "bracketSameLine": true, + "arrowParens": "avoid", + "endOfLine": "lf" + }, + "devDependencies": { + "@types/node": "^18.11.9", + "@types/tap": "^15.0.7", + "c8": "^7.12.0", + "eslint-config-prettier": "^8.6.0", + "mkdirp": "1", + "prettier": "^2.8.2", + "tap": "^16.3.4", + "ts-node": "^10.9.1", + "typedoc": "^0.23.21", + "typescript": "^4.9.3" + }, + "tap": { + "coverage": false, + "libtap-settings": "libtap-settings.js", + "node-arg": [ + "--no-warnings", + "--loader", + "ts-node/esm" + ], + "ts": false + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "engines": { + "node": ">=14" + }, + "dependencies": { + "glob": "^9.2.0" + } +} diff --git a/node_modules/rimraf/dist/cjs/src/bin.d.ts b/node_modules/rimraf/dist/cjs/src/bin.d.ts new file mode 100644 index 0000000..ecc2fcb --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/bin.d.ts @@ -0,0 +1,8 @@ +#!/usr/bin/env node +export declare const help: string; +declare const main: { + (...args: string[]): Promise<1 | 0>; + help: string; +}; +export default main; +//# sourceMappingURL=bin.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/bin.d.ts.map b/node_modules/rimraf/dist/cjs/src/bin.d.ts.map new file mode 100644 index 0000000..7f1fee6 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/bin.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../../src/bin.ts"],"names":[],"mappings":";AAQA,eAAO,MAAM,IAAI,QAkChB,CAAA;AA6ED,QAAA,MAAM,IAAI;cAAmB,MAAM,EAAE;;CAoIpC,CAAA;AAGD,eAAe,IAAI,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/bin.js b/node_modules/rimraf/dist/cjs/src/bin.js new file mode 100755 index 0000000..bbff722 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/bin.js @@ -0,0 +1,260 @@ +#!/usr/bin/env node +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.help = void 0; +const package_json_1 = require("../package.json"); +const index_cjs_js_1 = __importDefault(require("./index-cjs.js")); +const runHelpForUsage = () => console.error('run `rimraf --help` for usage information'); +exports.help = `rimraf version ${package_json_1.version} + +Usage: rimraf [ ...] +Deletes all files and folders at "path", recursively. + +Options: + -- Treat all subsequent arguments as paths + -h --help Display this usage info + --preserve-root Do not remove '/' recursively (default) + --no-preserve-root Do not treat '/' specially + -G --no-glob Treat arguments as literal paths, not globs (default) + -g --glob Treat arguments as glob patterns + -v --verbose Be verbose when deleting files, showing them as + they are removed. Not compatible with --impl=native + -V --no-verbose Be silent when deleting files, showing nothing as + they are removed (default) + -i --interactive Ask for confirmation before deleting anything + Not compatible with --impl=native + -I --no-interactive Do not ask for confirmation before deleting + + --impl= Specify the implementation to use: + rimraf: choose the best option (default) + native: the built-in implementation in Node.js + manual: the platform-specific JS implementation + posix: the Posix JS implementation + windows: the Windows JS implementation (falls back to + move-remove on ENOTEMPTY) + move-remove: a slow reliable Windows fallback + +Implementation-specific options: + --tmp= Temp file folder for 'move-remove' implementation + --max-retries= maxRetries for 'native' and 'windows' implementations + --retry-delay= retryDelay for 'native' implementation, default 100 + --backoff= Exponential backoff factor for retries (default: 1.2) +`; +const path_1 = require("path"); +const cwd = process.cwd(); +const readline_1 = require("readline"); +const prompt = async (rl, q) => new Promise(res => rl.question(q, res)); +const interactiveRimraf = async (impl, paths, opt) => { + const existingFilter = opt.filter || (() => true); + let allRemaining = false; + let noneRemaining = false; + const queue = []; + let processing = false; + const processQueue = async () => { + if (processing) + return; + processing = true; + let next; + while ((next = queue.shift())) { + await next(); + } + processing = false; + }; + const oneAtATime = (fn) => async (s, e) => { + const p = new Promise(res => { + queue.push(async () => { + const result = await fn(s, e); + res(result); + return result; + }); + }); + processQueue(); + return p; + }; + const rl = (0, readline_1.createInterface)({ + input: process.stdin, + output: process.stdout, + }); + opt.filter = oneAtATime(async (path, ent) => { + if (noneRemaining) { + return false; + } + while (!allRemaining) { + const a = (await prompt(rl, `rm? ${(0, path_1.relative)(cwd, path)}\n[(Yes)/No/All/Quit] > `)).trim(); + if (/^n/i.test(a)) { + return false; + } + else if (/^a/i.test(a)) { + allRemaining = true; + break; + } + else if (/^q/i.test(a)) { + noneRemaining = true; + return false; + } + else if (a === '' || /^y/i.test(a)) { + break; + } + else { + continue; + } + } + return existingFilter(path, ent); + }); + await impl(paths, opt); + rl.close(); +}; +const main = async (...args) => { + const verboseFilter = (s) => { + console.log((0, path_1.relative)(cwd, s)); + return true; + }; + if (process.env.__RIMRAF_TESTING_BIN_FAIL__ === '1') { + throw new Error('simulated rimraf failure'); + } + const opt = {}; + const paths = []; + let dashdash = false; + let impl = index_cjs_js_1.default; + let interactive = false; + for (const arg of args) { + if (dashdash) { + paths.push(arg); + continue; + } + if (arg === '--') { + dashdash = true; + continue; + } + else if (arg === '-rf' || arg === '-fr') { + // this never did anything, but people put it there I guess + continue; + } + else if (arg === '-h' || arg === '--help') { + console.log(exports.help); + return 0; + } + else if (arg === '--interactive' || arg === '-i') { + interactive = true; + continue; + } + else if (arg === '--no-interactive' || arg === '-I') { + interactive = false; + continue; + } + else if (arg === '--verbose' || arg === '-v') { + opt.filter = verboseFilter; + continue; + } + else if (arg === '--no-verbose' || arg === '-V') { + opt.filter = undefined; + continue; + } + else if (arg === '-g' || arg === '--glob') { + opt.glob = true; + continue; + } + else if (arg === '-G' || arg === '--no-glob') { + opt.glob = false; + continue; + } + else if (arg === '--preserve-root') { + opt.preserveRoot = true; + continue; + } + else if (arg === '--no-preserve-root') { + opt.preserveRoot = false; + continue; + } + else if (/^--tmp=/.test(arg)) { + const val = arg.substring('--tmp='.length); + opt.tmp = val; + continue; + } + else if (/^--max-retries=/.test(arg)) { + const val = +arg.substring('--max-retries='.length); + opt.maxRetries = val; + continue; + } + else if (/^--retry-delay=/.test(arg)) { + const val = +arg.substring('--retry-delay='.length); + opt.retryDelay = val; + continue; + } + else if (/^--backoff=/.test(arg)) { + const val = +arg.substring('--backoff='.length); + opt.backoff = val; + continue; + } + else if (/^--impl=/.test(arg)) { + const val = arg.substring('--impl='.length); + switch (val) { + case 'rimraf': + impl = index_cjs_js_1.default; + continue; + case 'native': + case 'manual': + case 'posix': + case 'windows': + impl = index_cjs_js_1.default[val]; + continue; + case 'move-remove': + impl = index_cjs_js_1.default.moveRemove; + continue; + default: + console.error(`unknown implementation: ${val}`); + runHelpForUsage(); + return 1; + } + } + else if (/^-/.test(arg)) { + console.error(`unknown option: ${arg}`); + runHelpForUsage(); + return 1; + } + else { + paths.push(arg); + } + } + if (opt.preserveRoot !== false) { + for (const path of paths.map(p => (0, path_1.resolve)(p))) { + if (path === (0, path_1.parse)(path).root) { + console.error(`rimraf: it is dangerous to operate recursively on '/'`); + console.error('use --no-preserve-root to override this failsafe'); + return 1; + } + } + } + if (!paths.length) { + console.error('rimraf: must provide a path to remove'); + runHelpForUsage(); + return 1; + } + if (impl === index_cjs_js_1.default.native && (interactive || opt.filter)) { + console.error('native implementation does not support -v or -i'); + runHelpForUsage(); + return 1; + } + if (interactive) { + await interactiveRimraf(impl, paths, opt); + } + else { + await impl(paths, opt); + } + return 0; +}; +main.help = exports.help; +exports.default = main; +if (typeof require === 'function' && + typeof module === 'object' && + require.main === module) { + const args = process.argv.slice(2); + main(...args).then(code => process.exit(code), er => { + console.error(er); + process.exit(1); + }); +} +//# sourceMappingURL=bin.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/bin.js.map b/node_modules/rimraf/dist/cjs/src/bin.js.map new file mode 100644 index 0000000..cef95f1 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/bin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bin.js","sourceRoot":"","sources":["../../../src/bin.ts"],"names":[],"mappings":";;;;;;;AACA,kDAAyC;AACzC,kEAAmC;AAGnC,MAAM,eAAe,GAAG,GAAG,EAAE,CAC3B,OAAO,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAA;AAE/C,QAAA,IAAI,GAAG,kBAAkB,sBAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC5C,CAAA;AAED,+BAA+C;AAC/C,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;AAEzB,uCAAqD;AAGrD,MAAM,MAAM,GAAG,KAAK,EAAE,EAAa,EAAE,CAAS,EAAE,EAAE,CAChD,IAAI,OAAO,CAAS,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;AAEjD,MAAM,iBAAiB,GAAG,KAAK,EAC7B,IAA6E,EAC7E,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CAAC,WAAW,IAAI,GAAG,CAAC,MAAM,CAAC,EAAE;QACzD,OAAO,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAA;QAChE,eAAe,EAAE,CAAA;QACjB,OAAO,CAAC,CAAA;KACT;IAED,IAAI,WAAW,EAAE;QACf,MAAM,iBAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAA;KAC1C;SAAM;QACL,MAAM,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;KACvB;IAED,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AACD,IAAI,CAAC,IAAI,GAAG,YAAI,CAAA;AAEhB,kBAAe,IAAI,CAAA;AAEnB,IACE,OAAO,OAAO,KAAK,UAAU;IAC7B,OAAO,MAAM,KAAK,QAAQ;IAC1B,OAAO,CAAC,IAAI,KAAK,MAAM,EACvB;IACA,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IAClC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAChB,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAC1B,EAAE,CAAC,EAAE;QACH,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC,CACF,CAAA;CACF","sourcesContent":["#!/usr/bin/env node\nimport { version } from '../package.json'\nimport rimraf from './index-cjs.js'\nimport type { RimrafAsyncOptions } from './index.js'\n\nconst runHelpForUsage = () =>\n console.error('run `rimraf --help` for usage information')\n\nexport const help = `rimraf version ${version}\n\nUsage: rimraf [ ...]\nDeletes all files and folders at \"path\", recursively.\n\nOptions:\n -- Treat all subsequent arguments as paths\n -h --help Display this usage info\n --preserve-root Do not remove '/' recursively (default)\n --no-preserve-root Do not treat '/' specially\n -G --no-glob Treat arguments as literal paths, not globs (default)\n -g --glob Treat arguments as glob patterns\n -v --verbose Be verbose when deleting files, showing them as\n they are removed. Not compatible with --impl=native\n -V --no-verbose Be silent when deleting files, showing nothing as\n they are removed (default)\n -i --interactive Ask for confirmation before deleting anything\n Not compatible with --impl=native\n -I --no-interactive Do not ask for confirmation before deleting\n\n --impl= Specify the implementation to use:\n rimraf: choose the best option (default)\n native: the built-in implementation in Node.js\n manual: the platform-specific JS implementation\n posix: the Posix JS implementation\n windows: the Windows JS implementation (falls back to\n move-remove on ENOTEMPTY)\n move-remove: a slow reliable Windows fallback\n\nImplementation-specific options:\n --tmp= Temp file folder for 'move-remove' implementation\n --max-retries= maxRetries for 'native' and 'windows' implementations\n --retry-delay= retryDelay for 'native' implementation, default 100\n --backoff= Exponential backoff factor for retries (default: 1.2)\n`\n\nimport { parse, relative, resolve } from 'path'\nconst cwd = process.cwd()\n\nimport { createInterface, Interface } from 'readline'\nimport { Dirent, Stats } from 'fs'\n\nconst prompt = async (rl: Interface, q: string) =>\n new Promise(res => rl.question(q, res))\n\nconst interactiveRimraf = async (\n impl: (path: string | string[], opt?: RimrafAsyncOptions) => Promise,\n paths: string[],\n opt: RimrafAsyncOptions\n) => {\n const existingFilter = opt.filter || (() => true)\n let allRemaining = false\n let noneRemaining = false\n const queue: (() => Promise)[] = []\n let processing = false\n const processQueue = async () => {\n if (processing) return\n processing = true\n let next: (() => Promise) | undefined\n while ((next = queue.shift())) {\n await next()\n }\n processing = false\n }\n const oneAtATime =\n (fn: (s: string, e: Dirent | Stats) => Promise) =>\n async (s: string, e: Dirent | Stats): Promise => {\n const p = new Promise(res => {\n queue.push(async () => {\n const result = await fn(s, e)\n res(result)\n return result\n })\n })\n processQueue()\n return p\n }\n const rl = createInterface({\n input: process.stdin,\n output: process.stdout,\n })\n opt.filter = oneAtATime(\n async (path: string, ent: Dirent | Stats): Promise => {\n if (noneRemaining) {\n return false\n }\n while (!allRemaining) {\n const a = (\n await prompt(rl, `rm? ${relative(cwd, path)}\\n[(Yes)/No/All/Quit] > `)\n ).trim()\n if (/^n/i.test(a)) {\n return false\n } else if (/^a/i.test(a)) {\n allRemaining = true\n break\n } else if (/^q/i.test(a)) {\n noneRemaining = true\n return false\n } else if (a === '' || /^y/i.test(a)) {\n break\n } else {\n continue\n }\n }\n return existingFilter(path, ent)\n }\n )\n await impl(paths, opt)\n rl.close()\n}\n\nconst main = async (...args: string[]) => {\n const verboseFilter = (s: string) => {\n console.log(relative(cwd, s))\n return true\n }\n\n if (process.env.__RIMRAF_TESTING_BIN_FAIL__ === '1') {\n throw new Error('simulated rimraf failure')\n }\n\n const opt: RimrafAsyncOptions = {}\n const paths: string[] = []\n let dashdash = false\n let impl: (\n path: string | string[],\n opt?: RimrafAsyncOptions\n ) => Promise = rimraf\n\n let interactive = false\n\n for (const arg of args) {\n if (dashdash) {\n paths.push(arg)\n continue\n }\n if (arg === '--') {\n dashdash = true\n continue\n } else if (arg === '-rf' || arg === '-fr') {\n // this never did anything, but people put it there I guess\n continue\n } else if (arg === '-h' || arg === '--help') {\n console.log(help)\n return 0\n } else if (arg === '--interactive' || arg === '-i') {\n interactive = true\n continue\n } else if (arg === '--no-interactive' || arg === '-I') {\n interactive = false\n continue\n } else if (arg === '--verbose' || arg === '-v') {\n opt.filter = verboseFilter\n continue\n } else if (arg === '--no-verbose' || arg === '-V') {\n opt.filter = undefined\n continue\n } else if (arg === '-g' || arg === '--glob') {\n opt.glob = true\n continue\n } else if (arg === '-G' || arg === '--no-glob') {\n opt.glob = false\n continue\n } else if (arg === '--preserve-root') {\n opt.preserveRoot = true\n continue\n } else if (arg === '--no-preserve-root') {\n opt.preserveRoot = false\n continue\n } else if (/^--tmp=/.test(arg)) {\n const val = arg.substring('--tmp='.length)\n opt.tmp = val\n continue\n } else if (/^--max-retries=/.test(arg)) {\n const val = +arg.substring('--max-retries='.length)\n opt.maxRetries = val\n continue\n } else if (/^--retry-delay=/.test(arg)) {\n const val = +arg.substring('--retry-delay='.length)\n opt.retryDelay = val\n continue\n } else if (/^--backoff=/.test(arg)) {\n const val = +arg.substring('--backoff='.length)\n opt.backoff = val\n continue\n } else if (/^--impl=/.test(arg)) {\n const val = arg.substring('--impl='.length)\n switch (val) {\n case 'rimraf':\n impl = rimraf\n continue\n case 'native':\n case 'manual':\n case 'posix':\n case 'windows':\n impl = rimraf[val]\n continue\n case 'move-remove':\n impl = rimraf.moveRemove\n continue\n default:\n console.error(`unknown implementation: ${val}`)\n runHelpForUsage()\n return 1\n }\n } else if (/^-/.test(arg)) {\n console.error(`unknown option: ${arg}`)\n runHelpForUsage()\n return 1\n } else {\n paths.push(arg)\n }\n }\n\n if (opt.preserveRoot !== false) {\n for (const path of paths.map(p => resolve(p))) {\n if (path === parse(path).root) {\n console.error(`rimraf: it is dangerous to operate recursively on '/'`)\n console.error('use --no-preserve-root to override this failsafe')\n return 1\n }\n }\n }\n\n if (!paths.length) {\n console.error('rimraf: must provide a path to remove')\n runHelpForUsage()\n return 1\n }\n\n if (impl === rimraf.native && (interactive || opt.filter)) {\n console.error('native implementation does not support -v or -i')\n runHelpForUsage()\n return 1\n }\n\n if (interactive) {\n await interactiveRimraf(impl, paths, opt)\n } else {\n await impl(paths, opt)\n }\n\n return 0\n}\nmain.help = help\n\nexport default main\n\nif (\n typeof require === 'function' &&\n typeof module === 'object' &&\n require.main === module\n) {\n const args = process.argv.slice(2)\n main(...args).then(\n code => process.exit(code),\n er => {\n console.error(er)\n process.exit(1)\n }\n )\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/default-tmp.d.ts b/node_modules/rimraf/dist/cjs/src/default-tmp.d.ts new file mode 100644 index 0000000..a68e925 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/default-tmp.d.ts @@ -0,0 +1,3 @@ +export declare const defaultTmp: (path: string) => Promise; +export declare const defaultTmpSync: (path: string) => string; +//# sourceMappingURL=default-tmp.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/default-tmp.d.ts.map b/node_modules/rimraf/dist/cjs/src/default-tmp.d.ts.map new file mode 100644 index 0000000..91a1672 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/default-tmp.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"default-tmp.d.ts","sourceRoot":"","sources":["../../../src/default-tmp.ts"],"names":[],"mappings":"AAiEA,eAAO,MAAM,UAAU,SAnCc,MAAM,oBAoCe,CAAA;AAC1D,eAAO,MAAM,cAAc,SArBQ,MAAM,WAsByB,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/default-tmp.js b/node_modules/rimraf/dist/cjs/src/default-tmp.js new file mode 100644 index 0000000..ae90878 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/default-tmp.js @@ -0,0 +1,61 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultTmpSync = exports.defaultTmp = void 0; +// The default temporary folder location for use in the windows algorithm. +// It's TEMPting to use dirname(path), since that's guaranteed to be on the +// same device. However, this means that: +// rimraf(path).then(() => rimraf(dirname(path))) +// will often fail with EBUSY, because the parent dir contains +// marked-for-deletion directory entries (which do not show up in readdir). +// The approach here is to use os.tmpdir() if it's on the same drive letter, +// or resolve(path, '\\temp') if it exists, or the root of the drive if not. +// On Posix (not that you'd be likely to use the windows algorithm there), +// it uses os.tmpdir() always. +const os_1 = require("os"); +const path_1 = require("path"); +const fs_js_1 = require("./fs.js"); +const platform_js_1 = __importDefault(require("./platform.js")); +const { stat } = fs_js_1.promises; +const isDirSync = (path) => { + try { + return (0, fs_js_1.statSync)(path).isDirectory(); + } + catch (er) { + return false; + } +}; +const isDir = (path) => stat(path).then(st => st.isDirectory(), () => false); +const win32DefaultTmp = async (path) => { + const { root } = (0, path_1.parse)(path); + const tmp = (0, os_1.tmpdir)(); + const { root: tmpRoot } = (0, path_1.parse)(tmp); + if (root.toLowerCase() === tmpRoot.toLowerCase()) { + return tmp; + } + const driveTmp = (0, path_1.resolve)(root, '/temp'); + if (await isDir(driveTmp)) { + return driveTmp; + } + return root; +}; +const win32DefaultTmpSync = (path) => { + const { root } = (0, path_1.parse)(path); + const tmp = (0, os_1.tmpdir)(); + const { root: tmpRoot } = (0, path_1.parse)(tmp); + if (root.toLowerCase() === tmpRoot.toLowerCase()) { + return tmp; + } + const driveTmp = (0, path_1.resolve)(root, '/temp'); + if (isDirSync(driveTmp)) { + return driveTmp; + } + return root; +}; +const posixDefaultTmp = async () => (0, os_1.tmpdir)(); +const posixDefaultTmpSync = () => (0, os_1.tmpdir)(); +exports.defaultTmp = platform_js_1.default === 'win32' ? win32DefaultTmp : posixDefaultTmp; +exports.defaultTmpSync = platform_js_1.default === 'win32' ? win32DefaultTmpSync : posixDefaultTmpSync; +//# sourceMappingURL=default-tmp.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/default-tmp.js.map b/node_modules/rimraf/dist/cjs/src/default-tmp.js.map new file mode 100644 index 0000000..e16a510 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/default-tmp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"default-tmp.js","sourceRoot":"","sources":["../../../src/default-tmp.ts"],"names":[],"mappings":";;;;;;AAAA,0EAA0E;AAC1E,2EAA2E;AAC3E,0CAA0C;AAC1C,iDAAiD;AACjD,8DAA8D;AAC9D,2EAA2E;AAC3E,4EAA4E;AAC5E,4EAA4E;AAC5E,0EAA0E;AAC1E,8BAA8B;AAC9B,2BAA2B;AAC3B,+BAAqC;AACrC,mCAA4C;AAC5C,gEAAoC;AACpC,MAAM,EAAE,IAAI,EAAE,GAAG,gBAAQ,CAAA;AAEzB,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,EAAE;IACjC,IAAI;QACF,OAAO,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAA;KACpC;IAAC,OAAO,EAAE,EAAE;QACX,OAAO,KAAK,CAAA;KACb;AACH,CAAC,CAAA;AAED,MA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AChB;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,eAAe,GAAG,KAAK,IAAI,EAAE,CAAC,IAAA,WAAM,GAAE,CAAA;AAC5C,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,IAAA,WAAM,GAAE,CAAA;AAE7B,QAAA,UAAU,GACrB,qBAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,CAAA;AAC7C,QAAA,cAAc,GACzB,qBAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,CAAA","sourcesContent":["// The default temporary folder location for use in the windows algorithm.\n// It's TEMPting to use dirname(path), since that's guaranteed to be on the\n// same device. However, this means that:\n// rimraf(path).then(() => rimraf(dirname(path)))\n// will often fail with EBUSY, because the parent dir contains\n// marked-for-deletion directory entries (which do not show up in readdir).\n// The approach here is to use os.tmpdir() if it's on the same drive letter,\n// or resolve(path, '\\\\temp') if it exists, or the root of the drive if not.\n// On Posix (not that you'd be likely to use the windows algorithm there),\n// it uses os.tmpdir() always.\nimport { tmpdir } from 'os'\nimport { parse, resolve } from 'path'\nimport { promises, statSync } from './fs.js'\nimport platform from './platform.js'\nconst { stat } = promises\n\nconst isDirSync = (path: string) => {\n try {\n return statSync(path).isDirectory()\n } catch (er) {\n return false\n }\n}\n\nconst isDir = (path: string) =>\n stat(path).then(\n st => st.isDirectory(),\n () => false\n )\n\nconst win32DefaultTmp = async (path: string) => {\n const { root } = parse(path)\n const tmp = tmpdir()\n const { root: tmpRoot } = parse(tmp)\n if (root.toLowerCase() === tmpRoot.toLowerCase()) {\n return tmp\n }\n\n const driveTmp = resolve(root, '/temp')\n if (await isDir(driveTmp)) {\n return driveTmp\n }\n\n return root\n}\n\nconst win32DefaultTmpSync = (path: string) => {\n const { root } = parse(path)\n const tmp = tmpdir()\n const { root: tmpRoot } = parse(tmp)\n if (root.toLowerCase() === tmpRoot.toLowerCase()) {\n return tmp\n }\n\n const driveTmp = resolve(root, '/temp')\n if (isDirSync(driveTmp)) {\n return driveTmp\n }\n\n return root\n}\n\nconst posixDefaultTmp = async () => tmpdir()\nconst posixDefaultTmpSync = () => tmpdir()\n\nexport const defaultTmp =\n platform === 'win32' ? win32DefaultTmp : posixDefaultTmp\nexport const defaultTmpSync =\n platform === 'win32' ? win32DefaultTmpSync : posixDefaultTmpSync\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/fix-eperm.d.ts b/node_modules/rimraf/dist/cjs/src/fix-eperm.d.ts new file mode 100644 index 0000000..20e76a8 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/fix-eperm.d.ts @@ -0,0 +1,3 @@ +export declare const fixEPERM: (fn: (path: string) => Promise) => (path: string) => Promise; +export declare const fixEPERMSync: (fn: (path: string) => any) => (path: string) => any; +//# sourceMappingURL=fix-eperm.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/fix-eperm.d.ts.map b/node_modules/rimraf/dist/cjs/src/fix-eperm.d.ts.map new file mode 100644 index 0000000..5b26530 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/fix-eperm.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fix-eperm.d.ts","sourceRoot":"","sources":["../../../src/fix-eperm.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,cACP,MAAM,KAAK,QAAQ,GAAG,CAAC,YAAkB,MAAM,iBAsB1D,CAAA;AAEH,eAAO,MAAM,YAAY,cAAe,MAAM,KAAK,GAAG,YAAY,MAAM,QAsBvE,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/fix-eperm.js b/node_modules/rimraf/dist/cjs/src/fix-eperm.js new file mode 100644 index 0000000..7baecb7 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/fix-eperm.js @@ -0,0 +1,58 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fixEPERMSync = exports.fixEPERM = void 0; +const fs_js_1 = require("./fs.js"); +const { chmod } = fs_js_1.promises; +const fixEPERM = (fn) => async (path) => { + try { + return await fn(path); + } + catch (er) { + const fer = er; + if (fer?.code === 'ENOENT') { + return; + } + if (fer?.code === 'EPERM') { + try { + await chmod(path, 0o666); + } + catch (er2) { + const fer2 = er2; + if (fer2?.code === 'ENOENT') { + return; + } + throw er; + } + return await fn(path); + } + throw er; + } +}; +exports.fixEPERM = fixEPERM; +const fixEPERMSync = (fn) => (path) => { + try { + return fn(path); + } + catch (er) { + const fer = er; + if (fer?.code === 'ENOENT') { + return; + } + if (fer?.code === 'EPERM') { + try { + (0, fs_js_1.chmodSync)(path, 0o666); + } + catch (er2) { + const fer2 = er2; + if (fer2?.code === 'ENOENT') { + return; + } + throw er; + } + return fn(path); + } + throw er; + } +}; +exports.fixEPERMSync = fixEPERMSync; +//# sourceMappingURL=fix-eperm.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/fix-eperm.js.map b/node_modules/rimraf/dist/cjs/src/fix-eperm.js.map new file mode 100644 index 0000000..c5eb902 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/fix-eperm.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fix-eperm.js","sourceRoot":"","sources":["../../../src/fix-eperm.ts"],"names":[],"mappings":";;;AAAA,mCAA6C;AAC7C,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAQ,CAAA;AAEnB,MAAM,QAAQ,GACnB,CAAC,EAAkC,EAAE,EAAE,CAAC,KAAK,EAAE,IAAY,EAAE,EAAE;IAC7D,IAAI;QACF,OAAO,MAAM,EAAE,CAAC,IAAI,CAAC,CAAA;KACtB;IAAC,OAAO,EAAE,EAAE;QACX,MAAM,GAAG,GAAG,EAA2B,CAAA;QACvC,IAAI,GAAG,EAAE,IAAI,KAAK,QAAQ,EAAE;YAC1B,OAAM;SACP;QACD,IAAI,GAAG,EAAE,IAAI,KAAK,OAAO,EAAE;YACzB,IAAI;gBACF,MAAM,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;aACzB;YAAC,OAAO,GAAG,EAAE;gBACZ,MAAM,IAAI,GAAG,GAA4B,CAAA;gBACzC,IAAI,IAAI,EAAE,IAAI,KAAK,QAAQ,EAAE;oBAC3B,OAAM;iBACP;gBACD,MAAM,EAAE,CAAA;aACT;YACD,OAAO,MAAM,EAAE,CAAC,IAAI,CAAC,CAAA;SACtB;QACD,MAAM,EAAE,CAAA;KACT;AACH,CAAC,CAAA;AAvBU,QAAA,QAAQ,YAuBlB;AAEI,MAAM,YAAY,GAAG,CAAC,EAAyB,EAAE,EAAE,CAAC,CAAC,IAAY,EAAE,EAAE;IAC1E,IAAI;QACF,OAAO,EAAE,CAAC,IAAI,CAAC,CAAA;KAChB;IAAC,OAAO,EAAE,EAAE;QACX,MAAM,GAAG,GAAG,EAA2B,CAAA;QACvC,IAAI,GAAG,EAAE,IAAI,KAAK,QAAQ,EAAE;YAC1B,OAAM;SACP;QACD,IAAI,GAAG,EAAE,IAAI,KAAK,OAAO,EAAE;YACzB,IAAI;gBACF,IAAA,iBAAS,EAAC,IAAI,EAAE,KAAK,CAAC,CAAA;aACvB;YAAC,OAAO,GAAG,EAAE;gBACZ,MAAM,IAAI,GAAG,GAA4B,CAAA;gBACzC,IAAI,IAAI,EAAE,IAAI,KAAK,QAAQ,EAAE;oBAC3B,OAAM;iBACP;gBACD,MAAM,EAAE,CAAA;aACT;YACD,OAAO,EAAE,CAAC,IAAI,CAAC,CAAA;SAChB;QACD,MAAM,EAAE,CAAA;KACT;AACH,CAAC,CAAA;AAtBY,QAAA,YAAY,gBAsBxB","sourcesContent":["import { chmodSync, promises } from './fs.js'\nconst { chmod } = promises\n\nexport const fixEPERM =\n (fn: (path: string) => Promise) => async (path: string) => {\n try {\n return await fn(path)\n } catch (er) {\n const fer = er as NodeJS.ErrnoException\n if (fer?.code === 'ENOENT') {\n return\n }\n if (fer?.code === 'EPERM') {\n try {\n await chmod(path, 0o666)\n } catch (er2) {\n const fer2 = er2 as NodeJS.ErrnoException\n if (fer2?.code === 'ENOENT') {\n return\n }\n throw er\n }\n return await fn(path)\n }\n throw er\n }\n }\n\nexport const fixEPERMSync = (fn: (path: string) => any) => (path: string) => {\n try {\n return fn(path)\n } catch (er) {\n const fer = er as NodeJS.ErrnoException\n if (fer?.code === 'ENOENT') {\n return\n }\n if (fer?.code === 'EPERM') {\n try {\n chmodSync(path, 0o666)\n } catch (er2) {\n const fer2 = er2 as NodeJS.ErrnoException\n if (fer2?.code === 'ENOENT') {\n return\n }\n throw er\n }\n return fn(path)\n }\n throw er\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/fs.d.ts b/node_modules/rimraf/dist/cjs/src/fs.d.ts new file mode 100644 index 0000000..9e4e95b --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/fs.d.ts @@ -0,0 +1,17 @@ +import fs, { Dirent } from 'fs'; +export { chmodSync, mkdirSync, renameSync, rmdirSync, rmSync, statSync, lstatSync, unlinkSync, } from 'fs'; +export declare const readdirSync: (path: fs.PathLike) => Dirent[]; +export declare const promises: { + chmod: (path: fs.PathLike, mode: fs.Mode) => Promise; + mkdir: (path: fs.PathLike, options?: fs.Mode | (fs.MakeDirectoryOptions & { + recursive?: boolean | null; + }) | undefined | null) => Promise; + readdir: (path: fs.PathLike) => Promise; + rename: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; + rm: (path: fs.PathLike, options: fs.RmOptions) => Promise; + rmdir: (path: fs.PathLike) => Promise; + stat: (path: fs.PathLike) => Promise; + lstat: (path: fs.PathLike) => Promise; + unlink: (path: fs.PathLike) => Promise; +}; +//# sourceMappingURL=fs.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/fs.d.ts.map b/node_modules/rimraf/dist/cjs/src/fs.d.ts.map new file mode 100644 index 0000000..cfa05e2 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/fs.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../../src/fs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,IAAI,CAAA;AAG/B,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,GACX,MAAM,IAAI,CAAA;AAGX,eAAO,MAAM,WAAW,SAAU,GAAG,QAAQ,KAAG,MAAM,EACf,CAAA;AA6DvC,eAAO,MAAM,QAAQ;kBAtDA,GAAG,QAAQ,QAAQ,GAAG,IAAI,KAAG,QAAQ,IAAI,CAAC;kBAMvD,GAAG,QAAQ,YAEb,GAAG,IAAI,GACP,CAAC,GAAG,oBAAoB,GAAG;QAAE,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;KAAE,CAAC,GAC1D,SAAS,GACT,IAAI,KACP,QAAQ,MAAM,GAAG,SAAS,CAAC;oBAKP,GAAG,QAAQ,KAAG,QAAQ,MAAM,EAAE,CAAC;sBAO7B,GAAG,QAAQ,WAAW,GAAG,QAAQ,KAAG,QAAQ,IAAI,CAAC;eAKxD,GAAG,QAAQ,WAAW,GAAG,SAAS,KAAG,QAAQ,IAAI,CAAC;kBAK/C,GAAG,QAAQ,KAAG,QAAQ,IAAI,CAAC;iBAK5B,GAAG,QAAQ,KAAG,QAAQ,GAAG,KAAK,CAAC;kBAK9B,GAAG,QAAQ,KAAG,QAAQ,GAAG,KAAK,CAAC;mBAK9B,GAAG,QAAQ,KAAG,QAAQ,IAAI,CAAC;CAehD,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/fs.js b/node_modules/rimraf/dist/cjs/src/fs.js new file mode 100644 index 0000000..df79f9b --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/fs.js @@ -0,0 +1,46 @@ +"use strict"; +// promisify ourselves, because older nodes don't have fs.promises +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.promises = exports.readdirSync = exports.unlinkSync = exports.lstatSync = exports.statSync = exports.rmSync = exports.rmdirSync = exports.renameSync = exports.mkdirSync = exports.chmodSync = void 0; +const fs_1 = __importDefault(require("fs")); +// sync ones just take the sync version from node +var fs_2 = require("fs"); +Object.defineProperty(exports, "chmodSync", { enumerable: true, get: function () { return fs_2.chmodSync; } }); +Object.defineProperty(exports, "mkdirSync", { enumerable: true, get: function () { return fs_2.mkdirSync; } }); +Object.defineProperty(exports, "renameSync", { enumerable: true, get: function () { return fs_2.renameSync; } }); +Object.defineProperty(exports, "rmdirSync", { enumerable: true, get: function () { return fs_2.rmdirSync; } }); +Object.defineProperty(exports, "rmSync", { enumerable: true, get: function () { return fs_2.rmSync; } }); +Object.defineProperty(exports, "statSync", { enumerable: true, get: function () { return fs_2.statSync; } }); +Object.defineProperty(exports, "lstatSync", { enumerable: true, get: function () { return fs_2.lstatSync; } }); +Object.defineProperty(exports, "unlinkSync", { enumerable: true, get: function () { return fs_2.unlinkSync; } }); +const fs_3 = require("fs"); +const readdirSync = (path) => (0, fs_3.readdirSync)(path, { withFileTypes: true }); +exports.readdirSync = readdirSync; +// unrolled for better inlining, this seems to get better performance +// than something like: +// const makeCb = (res, rej) => (er, ...d) => er ? rej(er) : res(...d) +// which would be a bit cleaner. +const chmod = (path, mode) => new Promise((res, rej) => fs_1.default.chmod(path, mode, (er, ...d) => (er ? rej(er) : res(...d)))); +const mkdir = (path, options) => new Promise((res, rej) => fs_1.default.mkdir(path, options, (er, made) => (er ? rej(er) : res(made)))); +const readdir = (path) => new Promise((res, rej) => fs_1.default.readdir(path, { withFileTypes: true }, (er, data) => er ? rej(er) : res(data))); +const rename = (oldPath, newPath) => new Promise((res, rej) => fs_1.default.rename(oldPath, newPath, (er, ...d) => (er ? rej(er) : res(...d)))); +const rm = (path, options) => new Promise((res, rej) => fs_1.default.rm(path, options, (er, ...d) => (er ? rej(er) : res(...d)))); +const rmdir = (path) => new Promise((res, rej) => fs_1.default.rmdir(path, (er, ...d) => (er ? rej(er) : res(...d)))); +const stat = (path) => new Promise((res, rej) => fs_1.default.stat(path, (er, data) => (er ? rej(er) : res(data)))); +const lstat = (path) => new Promise((res, rej) => fs_1.default.lstat(path, (er, data) => (er ? rej(er) : res(data)))); +const unlink = (path) => new Promise((res, rej) => fs_1.default.unlink(path, (er, ...d) => (er ? rej(er) : res(...d)))); +exports.promises = { + chmod, + mkdir, + readdir, + rename, + rm, + rmdir, + stat, + lstat, + unlink, +}; +//# sourceMappingURL=fs.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/fs.js.map b/node_modules/rimraf/dist/cjs/src/fs.js.map new file mode 100644 index 0000000..96dacf6 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/fs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fs.js","sourceRoot":"","sources":["../../../src/fs.ts"],"names":[],"mappings":";AAAA,kEAAkE;;;;;;AAElE,4CAA+B;AAE/B,iDAAiD;AACjD,yBASW;AART,+FAAA,SAAS,OAAA;AACT,+FAAA,SAAS,OAAA;AACT,gGAAA,UAAU,OAAA;AACV,+FAAA,SAAS,OAAA;AACT,4FAAA,MAAM,OAAA;AACN,8FAAA,QAAQ,OAAA;AACR,+FAAA,SAAS,OAAA;AACT,gGAAA,UAAU,OAAA;AAGZ,2BAA0C;AACnC,MAAM,WAAW,GAAG,CAAC,IAAiB,EAAY,EAAE,CACzD,IAAA,gBAAM,EAAC,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;AAD1B,QAAA,WAAW,eACe;AAEvC,qEAAqE;AACrE,uBAAuB;AACvB,sEAAsE;AACtE,gCAAgC;AAEhC,MAAM,KAAK,GAAG,CAAC,IAAiB,EAAE,IAAa,EAAiB,EAAE,CAChE,IAAI,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CACvB,YAAE,CAAC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CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CACzD,CAAA;AAEH,MAAM,MAAM,GAAG,CAAC,IAAiB,EAAiB,EAAE,CAClD,IAAI,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CACvB,YAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,GAAG,CAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACjE,CAAA;AAEU,QAAA,QAAQ,GAAG;IACtB,KAAK;IACL,KAAK;IACL,OAAO;IACP,MAAM;IACN,EAAE;IACF,KAAK;IACL,IAAI;IACJ,KAAK;IACL,MAAM;CACP,CAAA","sourcesContent":["// promisify ourselves, because older nodes don't have fs.promises\n\nimport fs, { Dirent } from 'fs'\n\n// sync ones just take the sync version from node\nexport {\n chmodSync,\n mkdirSync,\n renameSync,\n rmdirSync,\n rmSync,\n statSync,\n lstatSync,\n unlinkSync,\n} from 'fs'\n\nimport { readdirSync as rdSync } from 'fs'\nexport const readdirSync = (path: fs.PathLike): Dirent[] =>\n rdSync(path, { withFileTypes: true })\n\n// unrolled for better inlining, this seems to get better performance\n// than something like:\n// const makeCb = (res, rej) => (er, ...d) => er ? rej(er) : res(...d)\n// which would be a bit cleaner.\n\nconst chmod = (path: fs.PathLike, mode: fs.Mode): Promise =>\n new Promise((res, rej) =>\n fs.chmod(path, mode, (er, ...d: any[]) => (er ? rej(er) : res(...d)))\n )\n\nconst mkdir = (\n path: fs.PathLike,\n options?:\n | fs.Mode\n | (fs.MakeDirectoryOptions & { recursive?: boolean | null })\n | undefined\n | null\n): Promise =>\n new Promise((res, rej) =>\n fs.mkdir(path, options, (er, made) => (er ? rej(er) : res(made)))\n )\n\nconst readdir = (path: fs.PathLike): Promise =>\n new Promise((res, rej) =>\n fs.readdir(path, { withFileTypes: true }, (er, data) =>\n er ? rej(er) : res(data)\n )\n )\n\nconst rename = (oldPath: fs.PathLike, newPath: fs.PathLike): Promise =>\n new Promise((res, rej) =>\n fs.rename(oldPath, newPath, (er, ...d: any[]) => (er ? rej(er) : res(...d)))\n )\n\nconst rm = (path: fs.PathLike, options: fs.RmOptions): Promise =>\n new Promise((res, rej) =>\n fs.rm(path, options, (er, ...d: any[]) => (er ? rej(er) : res(...d)))\n )\n\nconst rmdir = (path: fs.PathLike): Promise =>\n new Promise((res, rej) =>\n fs.rmdir(path, (er, ...d: any[]) => (er ? rej(er) : res(...d)))\n )\n\nconst stat = (path: fs.PathLike): Promise =>\n new Promise((res, rej) =>\n fs.stat(path, (er, data) => (er ? rej(er) : res(data)))\n )\n\nconst lstat = (path: fs.PathLike): Promise =>\n new Promise((res, rej) =>\n fs.lstat(path, (er, data) => (er ? rej(er) : res(data)))\n )\n\nconst unlink = (path: fs.PathLike): Promise =>\n new Promise((res, rej) =>\n fs.unlink(path, (er, ...d: any[]) => (er ? rej(er) : res(...d)))\n )\n\nexport const promises = {\n chmod,\n mkdir,\n readdir,\n rename,\n rm,\n rmdir,\n stat,\n lstat,\n unlink,\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/ignore-enoent.d.ts b/node_modules/rimraf/dist/cjs/src/ignore-enoent.d.ts new file mode 100644 index 0000000..f158cc2 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/ignore-enoent.d.ts @@ -0,0 +1,3 @@ +export declare const ignoreENOENT: (p: Promise) => Promise; +export declare const ignoreENOENTSync: (fn: () => any) => any; +//# sourceMappingURL=ignore-enoent.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/ignore-enoent.d.ts.map b/node_modules/rimraf/dist/cjs/src/ignore-enoent.d.ts.map new file mode 100644 index 0000000..f184512 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/ignore-enoent.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ignore-enoent.d.ts","sourceRoot":"","sources":["../../../src/ignore-enoent.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,MAAa,QAAQ,GAAG,CAAC,iBAK9C,CAAA;AAEJ,eAAO,MAAM,gBAAgB,OAAQ,MAAM,GAAG,QAQ7C,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/ignore-enoent.js b/node_modules/rimraf/dist/cjs/src/ignore-enoent.js new file mode 100644 index 0000000..0259534 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/ignore-enoent.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ignoreENOENTSync = exports.ignoreENOENT = void 0; +const ignoreENOENT = async (p) => p.catch(er => { + if (er.code !== 'ENOENT') { + throw er; + } +}); +exports.ignoreENOENT = ignoreENOENT; +const ignoreENOENTSync = (fn) => { + try { + return fn(); + } + catch (er) { + if (er?.code !== 'ENOENT') { + throw er; + } + } +}; +exports.ignoreENOENTSync = ignoreENOENTSync; +//# sourceMappingURL=ignore-enoent.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/ignore-enoent.js.map b/node_modules/rimraf/dist/cjs/src/ignore-enoent.js.map new file mode 100644 index 0000000..1850326 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/ignore-enoent.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ignore-enoent.js","sourceRoot":"","sources":["../../../src/ignore-enoent.ts"],"names":[],"mappings":";;;AAAO,MAAM,YAAY,GAAG,KAAK,EAAE,CAAe,EAAE,EAAE,CACpD,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE;IACX,IAAI,EAAE,CAAC,IAAI,KAAK,QAAQ,EAAE;QACxB,MAAM,EAAE,CAAA;KACT;AACH,CAAC,CAAC,CAAA;AALS,QAAA,YAAY,gBAKrB;AAEG,MAAM,gBAAgB,GAAG,CAAC,EAAa,EAAE,EAAE;IAChD,IAAI;QACF,OAAO,EAAE,EAAE,CAAA;KACZ;IAAC,OAAO,EAAE,EAAE;QACX,IAAK,EAA4B,EAAE,IAAI,KAAK,QAAQ,EAAE;YACpD,MAAM,EAAE,CAAA;SACT;KACF;AACH,CAAC,CAAA;AARY,QAAA,gBAAgB,oBAQ5B","sourcesContent":["export const ignoreENOENT = async (p: Promise) =>\n p.catch(er => {\n if (er.code !== 'ENOENT') {\n throw er\n }\n })\n\nexport const ignoreENOENTSync = (fn: () => any) => {\n try {\n return fn()\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code !== 'ENOENT') {\n throw er\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/index-cjs.d.ts b/node_modules/rimraf/dist/cjs/src/index-cjs.d.ts new file mode 100644 index 0000000..82e25cd --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/index-cjs.d.ts @@ -0,0 +1,57 @@ +declare const _default: ((path: string | string[], opt?: import("./index.js").RimrafAsyncOptions | undefined) => Promise) & { + rimraf: ((path: string | string[], opt?: import("./index.js").RimrafAsyncOptions | undefined) => Promise) & { + sync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + }; + sync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + rimrafSync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + manual: ((path: string | string[], opt?: import("./index.js").RimrafAsyncOptions | undefined) => Promise) & { + sync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + }; + manualSync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + native: ((path: string | string[], opt?: import("./index.js").RimrafAsyncOptions | undefined) => Promise) & { + sync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + }; + nativeSync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + posix: ((path: string | string[], opt?: import("./index.js").RimrafAsyncOptions | undefined) => Promise) & { + sync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + }; + posixSync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + windows: ((path: string | string[], opt?: import("./index.js").RimrafAsyncOptions | undefined) => Promise) & { + sync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + }; + windowsSync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + moveRemove: ((path: string | string[], opt?: import("./index.js").RimrafAsyncOptions | undefined) => Promise) & { + sync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + }; + moveRemoveSync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; +} & { + default: ((path: string | string[], opt?: import("./index.js").RimrafAsyncOptions | undefined) => Promise) & { + rimraf: ((path: string | string[], opt?: import("./index.js").RimrafAsyncOptions | undefined) => Promise) & { + sync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + }; + sync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + rimrafSync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + manual: ((path: string | string[], opt?: import("./index.js").RimrafAsyncOptions | undefined) => Promise) & { + sync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + }; + manualSync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + native: ((path: string | string[], opt?: import("./index.js").RimrafAsyncOptions | undefined) => Promise) & { + sync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + }; + nativeSync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + posix: ((path: string | string[], opt?: import("./index.js").RimrafAsyncOptions | undefined) => Promise) & { + sync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + }; + posixSync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + windows: ((path: string | string[], opt?: import("./index.js").RimrafAsyncOptions | undefined) => Promise) & { + sync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + }; + windowsSync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + moveRemove: ((path: string | string[], opt?: import("./index.js").RimrafAsyncOptions | undefined) => Promise) & { + sync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + }; + moveRemoveSync: (path: string | string[], opt?: import("./index.js").RimrafSyncOptions | undefined) => boolean; + }; +}; +export = _default; +//# sourceMappingURL=index-cjs.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/index-cjs.d.ts.map b/node_modules/rimraf/dist/cjs/src/index-cjs.d.ts.map new file mode 100644 index 0000000..f9581c8 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/index-cjs.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index-cjs.d.ts","sourceRoot":"","sources":["../../../src/index-cjs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,kBAAmD"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/index-cjs.js b/node_modules/rimraf/dist/cjs/src/index-cjs.js new file mode 100644 index 0000000..e96e51a --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/index-cjs.js @@ -0,0 +1,7 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const index_js_1 = __importDefault(require("./index.js")); +module.exports = Object.assign(index_js_1.default, { default: index_js_1.default }); +//# sourceMappingURL=index-cjs.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/index-cjs.js.map b/node_modules/rimraf/dist/cjs/src/index-cjs.js.map new file mode 100644 index 0000000..c0feb8b --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/index-cjs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index-cjs.js","sourceRoot":"","sources":["../../../src/index-cjs.ts"],"names":[],"mappings":";;;;AAAA,0DAA+B;AAE/B,iBAAS,MAAM,CAAC,MAAM,CAAC,kBAAM,EAAE,EAAE,OAAO,EAAE,kBAAM,EAAE,CAAC,CAAA","sourcesContent":["import rimraf from './index.js'\n\nexport = Object.assign(rimraf, { default: rimraf })\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/index.d.ts b/node_modules/rimraf/dist/cjs/src/index.d.ts new file mode 100644 index 0000000..2b659f2 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/index.d.ts @@ -0,0 +1,71 @@ +/// +import { GlobOptions } from 'glob'; +export interface RimrafAsyncOptions { + preserveRoot?: boolean; + tmp?: string; + maxRetries?: number; + retryDelay?: number; + backoff?: number; + maxBackoff?: number; + signal?: AbortSignal; + glob?: boolean | GlobOptions; + filter?: ((path: string, ent: Dirent | Stats) => boolean) | ((path: string, ent: Dirent | Stats) => Promise); +} +export interface RimrafSyncOptions extends RimrafAsyncOptions { + filter?: (path: string, ent: Dirent | Stats) => boolean; +} +export type RimrafOptions = RimrafSyncOptions | RimrafAsyncOptions; +export declare const isRimrafOptions: (o: any) => o is RimrafOptions; +export declare const assertRimrafOptions: (o: any) => void; +import { Dirent, Stats } from 'fs'; +export declare const nativeSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +export declare const native: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +}; +export declare const manualSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +export declare const manual: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +}; +export declare const windowsSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +export declare const windows: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +}; +export declare const posixSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +export declare const posix: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +}; +export declare const moveRemoveSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +export declare const moveRemove: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +}; +export declare const rimrafSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +export declare const sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +export declare const rimraf: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + rimraf: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + }; + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + rimrafSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + manual: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + }; + manualSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + native: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + }; + nativeSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + posix: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + }; + posixSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + windows: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + }; + windowsSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + moveRemove: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + }; + moveRemoveSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +}; +export default rimraf; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/index.d.ts.map b/node_modules/rimraf/dist/cjs/src/index.d.ts.map new file mode 100644 index 0000000..bd2c8a2 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";AAGA,OAAO,EAAQ,WAAW,EAAY,MAAM,MAAM,CAAA;AAElD,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAA;IAC5B,MAAM,CAAC,EACH,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,KAAK,OAAO,CAAC,GAChD,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;CAC9D;AAED,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,KAAK,OAAO,CAAA;CACxD;AAED,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,kBAAkB,CAAA;AAKlE,eAAO,MAAM,eAAe,MAAO,GAAG,uBAUH,CAAA;AAEnC,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC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MAAM,GAAG,MAAM,EAAE,QAAQ,iBAAiB,KAAG,OAAO;qBAlBnD,MAAM,GAAG,MAAM,EAAE,QACjB,kBAAkB,KACvB,QAAQ,OAAO,CAAC;qBAgBZ,MAAM,GAAG,MAAM,EAAE,QAAQ,iBAAiB,KAAG,OAAO;;wBAApD,MAAM,GAAG,MAAM,EAAE,QAAQ,iBAAiB,KAAG,OAAO;wBAlBnD,MAAM,GAAG,MAAM,EAAE,QACjB,kBAAkB,KACvB,QAAQ,OAAO,CAAC;qBAgBZ,MAAM,GAAG,MAAM,EAAE,QAAQ,iBAAiB,KAAG,OAAO;;2BAApD,MAAM,GAAG,MAAM,EAAE,QAAQ,iBAAiB,KAAG,OAAO;CAwD5D,CAAA;AAGD,eAAe,MAAM,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/index.js b/node_modules/rimraf/dist/cjs/src/index.js new file mode 100644 index 0000000..da9f4a3 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/index.js @@ -0,0 +1,92 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.rimraf = exports.sync = exports.rimrafSync = exports.moveRemove = exports.moveRemoveSync = exports.posix = exports.posixSync = exports.windows = exports.windowsSync = exports.manual = exports.manualSync = exports.native = exports.nativeSync = exports.assertRimrafOptions = exports.isRimrafOptions = void 0; +const opt_arg_js_1 = require("./opt-arg.js"); +const path_arg_js_1 = __importDefault(require("./path-arg.js")); +const glob_1 = require("glob"); +const typeOrUndef = (val, t) => typeof val === 'undefined' || typeof val === t; +const isRimrafOptions = (o) => !!o && + typeof o === 'object' && + typeOrUndef(o.preserveRoot, 'boolean') && + typeOrUndef(o.tmp, 'string') && + typeOrUndef(o.maxRetries, 'number') && + typeOrUndef(o.retryDelay, 'number') && + typeOrUndef(o.backoff, 'number') && + typeOrUndef(o.maxBackoff, 'number') && + (typeOrUndef(o.glob, 'boolean') || (o.glob && typeof o.glob === 'object')) && + typeOrUndef(o.filter, 'function'); +exports.isRimrafOptions = isRimrafOptions; +const assertRimrafOptions = (o) => { + if (!(0, exports.isRimrafOptions)(o)) { + throw new Error('invalid rimraf options'); + } +}; +exports.assertRimrafOptions = assertRimrafOptions; +const rimraf_manual_js_1 = require("./rimraf-manual.js"); +const rimraf_move_remove_js_1 = require("./rimraf-move-remove.js"); +const rimraf_native_js_1 = require("./rimraf-native.js"); +const rimraf_posix_js_1 = require("./rimraf-posix.js"); +const rimraf_windows_js_1 = require("./rimraf-windows.js"); +const use_native_js_1 = require("./use-native.js"); +const wrap = (fn) => async (path, opt) => { + const options = (0, opt_arg_js_1.optArg)(opt); + if (options.glob) { + path = await (0, glob_1.glob)(path, options.glob); + } + if (Array.isArray(path)) { + return !!(await Promise.all(path.map(p => fn((0, path_arg_js_1.default)(p, options), options)))).reduce((a, b) => a && b, true); + } + else { + return !!(await fn((0, path_arg_js_1.default)(path, options), options)); + } +}; +const wrapSync = (fn) => (path, opt) => { + const options = (0, opt_arg_js_1.optArgSync)(opt); + if (options.glob) { + path = (0, glob_1.globSync)(path, options.glob); + } + if (Array.isArray(path)) { + return !!path + .map(p => fn((0, path_arg_js_1.default)(p, options), options)) + .reduce((a, b) => a && b, true); + } + else { + return !!fn((0, path_arg_js_1.default)(path, options), options); + } +}; +exports.nativeSync = wrapSync(rimraf_native_js_1.rimrafNativeSync); +exports.native = Object.assign(wrap(rimraf_native_js_1.rimrafNative), { sync: exports.nativeSync }); +exports.manualSync = wrapSync(rimraf_manual_js_1.rimrafManualSync); +exports.manual = Object.assign(wrap(rimraf_manual_js_1.rimrafManual), { sync: exports.manualSync }); +exports.windowsSync = wrapSync(rimraf_windows_js_1.rimrafWindowsSync); +exports.windows = Object.assign(wrap(rimraf_windows_js_1.rimrafWindows), { sync: exports.windowsSync }); +exports.posixSync = wrapSync(rimraf_posix_js_1.rimrafPosixSync); +exports.posix = Object.assign(wrap(rimraf_posix_js_1.rimrafPosix), { sync: exports.posixSync }); +exports.moveRemoveSync = wrapSync(rimraf_move_remove_js_1.rimrafMoveRemoveSync); +exports.moveRemove = Object.assign(wrap(rimraf_move_remove_js_1.rimrafMoveRemove), { + sync: exports.moveRemoveSync, +}); +exports.rimrafSync = wrapSync((path, opt) => (0, use_native_js_1.useNativeSync)(opt) ? (0, rimraf_native_js_1.rimrafNativeSync)(path, opt) : (0, rimraf_manual_js_1.rimrafManualSync)(path, opt)); +exports.sync = exports.rimrafSync; +exports.rimraf = Object.assign(wrap((path, opt) => (0, use_native_js_1.useNative)(opt) ? (0, rimraf_native_js_1.rimrafNative)(path, opt) : (0, rimraf_manual_js_1.rimrafManual)(path, opt)), { + // this weirdness because it's easier than explicitly declaring + rimraf: exports.manual, + sync: exports.rimrafSync, + rimrafSync: exports.rimrafSync, + manual: exports.manual, + manualSync: exports.manualSync, + native: exports.native, + nativeSync: exports.nativeSync, + posix: exports.posix, + posixSync: exports.posixSync, + windows: exports.windows, + windowsSync: exports.windowsSync, + moveRemove: exports.moveRemove, + moveRemoveSync: exports.moveRemoveSync, +}); +exports.rimraf.rimraf = exports.rimraf; +exports.default = exports.rimraf; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/index.js.map b/node_modules/rimraf/dist/cjs/src/index.js.map new file mode 100644 index 0000000..fedfb49 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,6CAAiD;AACjD,gEAAmC;AAEnC,+BAAkD;AAsBlD,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,CAAS,EAAE,EAAE,CAC1C,OAAO,GAAG,KAAK,WAAW,IAAI,OAAO,GAAG,KAAK,CAAC,CAAA;AAEzC,MAAM,eAAe,GAAG,CAAC,CAAM,EAAsB,EAAE,CAC5D,CAAC,CAAC,CA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AAG,EAAE,EAAE,CACjB,IAAA,yBAAS,EAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAA,+BAAY,EAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAA,+BAAY,EAAC,IAAI,EAAE,GAAG,CAAC,CACnE,EACD;IACE,+DAA+D;IAC/D,MAAM,EAAE,cAAM;IACd,IAAI,EAAE,kBAAU;IAChB,UAAU,EAAE,kBAAU;IACtB,MAAM,EAAN,cAAM;IACN,UAAU,EAAV,kBAAU;IACV,MAAM,EAAN,cAAM;IACN,UAAU,EAAV,kBAAU;IACV,KAAK,EAAL,aAAK;IACL,SAAS,EAAT,iBAAS;IACT,OAAO,EAAP,eAAO;IACP,WAAW,EAAX,mBAAW;IACX,UAAU,EAAV,kBAAU;IACV,cAAc,EAAd,sBAAc;CACf,CACF,CAAA;AACD,cAAM,CAAC,MAAM,GAAG,cAAM,CAAA;AAEtB,kBAAe,cAAM,CAAA","sourcesContent":["import { optArg, optArgSync } from './opt-arg.js'\nimport pathArg from './path-arg.js'\n\nimport { glob, GlobOptions, globSync } from 'glob'\n\nexport interface RimrafAsyncOptions {\n preserveRoot?: boolean\n tmp?: string\n maxRetries?: number\n retryDelay?: number\n backoff?: number\n maxBackoff?: number\n signal?: AbortSignal\n glob?: boolean | GlobOptions\n filter?:\n | ((path: string, ent: Dirent | Stats) => boolean)\n | ((path: string, ent: Dirent | Stats) => Promise)\n}\n\nexport interface RimrafSyncOptions extends RimrafAsyncOptions {\n filter?: (path: string, ent: Dirent | Stats) => boolean\n}\n\nexport type RimrafOptions = RimrafSyncOptions | RimrafAsyncOptions\n\nconst typeOrUndef = (val: any, t: string) =>\n typeof val === 'undefined' || typeof val === t\n\nexport const isRimrafOptions = (o: any): o is RimrafOptions =>\n !!o &&\n typeof o === 'object' &&\n typeOrUndef(o.preserveRoot, 'boolean') &&\n typeOrUndef(o.tmp, 'string') &&\n typeOrUndef(o.maxRetries, 'number') &&\n typeOrUndef(o.retryDelay, 'number') &&\n typeOrUndef(o.backoff, 'number') &&\n typeOrUndef(o.maxBackoff, 'number') &&\n (typeOrUndef(o.glob, 'boolean') || (o.glob && typeof o.glob === 'object')) &&\n typeOrUndef(o.filter, 'function')\n\nexport const assertRimrafOptions: (o: any) => void = (\n o: any\n): asserts o is RimrafOptions => {\n if (!isRimrafOptions(o)) {\n throw new Error('invalid rimraf options')\n }\n}\n\nimport { Dirent, Stats } from 'fs'\nimport { rimrafManual, rimrafManualSync } from './rimraf-manual.js'\nimport { rimrafMoveRemove, rimrafMoveRemoveSync } from './rimraf-move-remove.js'\nimport { rimrafNative, rimrafNativeSync } from './rimraf-native.js'\nimport { rimrafPosix, rimrafPosixSync } from './rimraf-posix.js'\nimport { rimrafWindows, rimrafWindowsSync } from './rimraf-windows.js'\nimport { useNative, useNativeSync } from './use-native.js'\n\nconst wrap =\n (fn: (p: string, o: RimrafAsyncOptions) => Promise) =>\n async (\n path: string | string[],\n opt?: RimrafAsyncOptions\n ): Promise => {\n const options = optArg(opt)\n if (options.glob) {\n path = await glob(path, options.glob)\n }\n if (Array.isArray(path)) {\n return !!(\n await Promise.all(path.map(p => fn(pathArg(p, options), options)))\n ).reduce((a, b) => a && b, true)\n } else {\n return !!(await fn(pathArg(path, options), options))\n }\n }\n\nconst wrapSync =\n (fn: (p: string, o: RimrafSyncOptions) => boolean) =>\n (path: string | string[], opt?: RimrafSyncOptions): boolean => {\n const options = optArgSync(opt)\n if (options.glob) {\n path = globSync(path, options.glob)\n }\n if (Array.isArray(path)) {\n return !!path\n .map(p => fn(pathArg(p, options), options))\n .reduce((a, b) => a && b, true)\n } else {\n return !!fn(pathArg(path, options), options)\n }\n }\n\nexport const nativeSync = wrapSync(rimrafNativeSync)\nexport const native = Object.assign(wrap(rimrafNative), { sync: nativeSync })\n\nexport const manualSync = wrapSync(rimrafManualSync)\nexport const manual = Object.assign(wrap(rimrafManual), { sync: manualSync })\n\nexport const windowsSync = wrapSync(rimrafWindowsSync)\nexport const windows = Object.assign(wrap(rimrafWindows), { sync: windowsSync })\n\nexport const posixSync = wrapSync(rimrafPosixSync)\nexport const posix = Object.assign(wrap(rimrafPosix), { sync: posixSync })\n\nexport const moveRemoveSync = wrapSync(rimrafMoveRemoveSync)\nexport const moveRemove = Object.assign(wrap(rimrafMoveRemove), {\n sync: moveRemoveSync,\n})\n\nexport const rimrafSync = wrapSync((path, opt) =>\n useNativeSync(opt) ? rimrafNativeSync(path, opt) : rimrafManualSync(path, opt)\n)\nexport const sync = rimrafSync\n\nexport const rimraf = Object.assign(\n wrap((path, opt) =>\n useNative(opt) ? rimrafNative(path, opt) : rimrafManual(path, opt)\n ),\n {\n // this weirdness because it's easier than explicitly declaring\n rimraf: manual,\n sync: rimrafSync,\n rimrafSync: rimrafSync,\n manual,\n manualSync,\n native,\n nativeSync,\n posix,\n posixSync,\n windows,\n windowsSync,\n moveRemove,\n moveRemoveSync,\n }\n)\nrimraf.rimraf = rimraf\n\nexport default rimraf\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/opt-arg.d.ts b/node_modules/rimraf/dist/cjs/src/opt-arg.d.ts new file mode 100644 index 0000000..220b641 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/opt-arg.d.ts @@ -0,0 +1,17 @@ +import { GlobOptions } from 'glob'; +import { RimrafAsyncOptions, RimrafSyncOptions } from './index.js'; +export declare const optArg: (opt?: RimrafAsyncOptions) => (RimrafAsyncOptions & { + glob: GlobOptions & { + withFileTypes: false; + }; +}) | (RimrafAsyncOptions & { + glob: undefined; +}); +export declare const optArgSync: (opt?: RimrafSyncOptions) => (RimrafSyncOptions & { + glob: GlobOptions & { + withFileTypes: false; + }; +}) | (RimrafSyncOptions & { + glob: undefined; +}); +//# sourceMappingURL=opt-arg.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/opt-arg.d.ts.map b/node_modules/rimraf/dist/cjs/src/opt-arg.d.ts.map new file mode 100644 index 0000000..2e6adf1 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/opt-arg.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"opt-arg.d.ts","sourceRoot":"","sources":["../../../src/opt-arg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,EAEL,kBAAkB,EAElB,iBAAiB,EAClB,MAAM,YAAY,CAAA;AAqCnB,eAAO,MAAM,MAAM,SAAS,kBAAkB;UA/BlC,WAAW,GAAG;QAAE,aAAa,EAAE,KAAK,CAAA;KAAE;;UAEjC,SAAS;EA6B0C,CAAA;AACpE,eAAO,MAAM,UAAU,SAAS,iBAAiB;UAhCrC,WAAW,GAAG;QAAE,aAAa,EAAE,KAAK,CAAA;KAAE;;UAEjC,SAAS;EA8B6C,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/opt-arg.js b/node_modules/rimraf/dist/cjs/src/opt-arg.js new file mode 100644 index 0000000..e7d84e7 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/opt-arg.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.optArgSync = exports.optArg = void 0; +const index_js_1 = require("./index.js"); +const optArgT = (opt) => { + (0, index_js_1.assertRimrafOptions)(opt); + const { glob, ...options } = opt; + if (!glob) { + return options; + } + const globOpt = glob === true + ? opt.signal + ? { signal: opt.signal } + : {} + : opt.signal + ? { + signal: opt.signal, + ...glob, + } + : glob; + return { + ...options, + glob: { + ...globOpt, + // always get absolute paths from glob, to ensure + // that we are referencing the correct thing. + absolute: true, + withFileTypes: false, + }, + }; +}; +const optArg = (opt = {}) => optArgT(opt); +exports.optArg = optArg; +const optArgSync = (opt = {}) => optArgT(opt); +exports.optArgSync = optArgSync; +//# sourceMappingURL=opt-arg.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/opt-arg.js.map b/node_modules/rimraf/dist/cjs/src/opt-arg.js.map new file mode 100644 index 0000000..b2dda3d --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/opt-arg.js.map @@ -0,0 +1 @@ +{"version":3,"file":"opt-arg.js","sourceRoot":"","sources":["../../../src/opt-arg.ts"],"names":[],"mappings":";;;AACA,yCAKmB;AAEnB,MAAM,OAAO,GAAG,CACd,GAAM,EAKsB,EAAE;IAC9B,IAAA,8BAAmB,EAAC,GAAG,CAAC,CAAA;IACxB,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,GAAG,GAAG,CAAA;IAChC,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,OAAkC,CAAA;KAC1C;IACD,MAAM,OAAO,GACX,IAAI,KAAK,IAAI;QACX,CAAC,CAAC,GAAG,CAAC,MAAM;YACV,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE;YACxB,CAAC,CAAC,EAAE;QACN,CAAC,CAAC,GAAG,CAAC,MAAM;YACZ,CAAC,CAAC;gBACE,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,GAAG,IAAI;aACR;YACH,CAAC,CAAC,IAAI,CAAA;IACV,OAAO;QACL,GAAG,OAAO;QACV,IAAI,EAAE;YACJ,GAAG,OAAO;YACV,iDAAiD;YACjD,6CAA6C;YAC7C,QAAQ,EAAE,IAAI;YACd,aAAa,EAAE,KAAK;SACrB;KACsD,CAAA;AAC3D,CAAC,CAAA;AAEM,MAAM,MAAM,GAAG,CAAC,MAA0B,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;AAAvD,QAAA,MAAM,UAAiD;AAC7D,MAAM,UAAU,GAAG,CAAC,MAAyB,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;AAA1D,QAAA,UAAU,cAAgD","sourcesContent":["import { GlobOptions } from 'glob'\nimport {\n assertRimrafOptions,\n RimrafAsyncOptions,\n RimrafOptions,\n RimrafSyncOptions,\n} from './index.js'\n\nconst optArgT = (\n opt: T\n):\n | (T & {\n glob: GlobOptions & { withFileTypes: false }\n })\n | (T & { glob: undefined }) => {\n assertRimrafOptions(opt)\n const { glob, ...options } = opt\n if (!glob) {\n return options as T & { glob: undefined }\n }\n const globOpt =\n glob === true\n ? opt.signal\n ? { signal: opt.signal }\n : {}\n : opt.signal\n ? {\n signal: opt.signal,\n ...glob,\n }\n : glob\n return {\n ...options,\n glob: {\n ...globOpt,\n // always get absolute paths from glob, to ensure\n // that we are referencing the correct thing.\n absolute: true,\n withFileTypes: false,\n },\n } as T & { glob: GlobOptions & { withFileTypes: false } }\n}\n\nexport const optArg = (opt: RimrafAsyncOptions = {}) => optArgT(opt)\nexport const optArgSync = (opt: RimrafSyncOptions = {}) => optArgT(opt)\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/path-arg.d.ts b/node_modules/rimraf/dist/cjs/src/path-arg.d.ts new file mode 100644 index 0000000..c0b7e7c --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/path-arg.d.ts @@ -0,0 +1,4 @@ +import { RimrafAsyncOptions } from './index.js'; +declare const pathArg: (path: string, opt?: RimrafAsyncOptions) => string; +export default pathArg; +//# sourceMappingURL=path-arg.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/path-arg.d.ts.map b/node_modules/rimraf/dist/cjs/src/path-arg.d.ts.map new file mode 100644 index 0000000..08a2461 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/path-arg.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"path-arg.d.ts","sourceRoot":"","sources":["../../../src/path-arg.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAG/C,QAAA,MAAM,OAAO,SAAU,MAAM,QAAO,kBAAkB,WAkDrD,CAAA;AAED,eAAe,OAAO,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/path-arg.js b/node_modules/rimraf/dist/cjs/src/path-arg.js new file mode 100644 index 0000000..1d8487c --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/path-arg.js @@ -0,0 +1,54 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const path_1 = require("path"); +const util_1 = require("util"); +const platform_js_1 = __importDefault(require("./platform.js")); +const pathArg = (path, opt = {}) => { + const type = typeof path; + if (type !== 'string') { + const ctor = path && type === 'object' && path.constructor; + const received = ctor && ctor.name + ? `an instance of ${ctor.name}` + : type === 'object' + ? (0, util_1.inspect)(path) + : `type ${type} ${path}`; + const msg = 'The "path" argument must be of type string. ' + `Received ${received}`; + throw Object.assign(new TypeError(msg), { + path, + code: 'ERR_INVALID_ARG_TYPE', + }); + } + if (/\0/.test(path)) { + // simulate same failure that node raises + const msg = 'path must be a string without null bytes'; + throw Object.assign(new TypeError(msg), { + path, + code: 'ERR_INVALID_ARG_VALUE', + }); + } + path = (0, path_1.resolve)(path); + const { root } = (0, path_1.parse)(path); + if (path === root && opt.preserveRoot !== false) { + const msg = 'refusing to remove root directory without preserveRoot:false'; + throw Object.assign(new Error(msg), { + path, + code: 'ERR_PRESERVE_ROOT', + }); + } + if (platform_js_1.default === 'win32') { + const badWinChars = /[*|"<>?:]/; + const { root } = (0, path_1.parse)(path); + if (badWinChars.test(path.substring(root.length))) { + throw Object.assign(new Error('Illegal characters in path.'), { + path, + code: 'EINVAL', + }); + } + } + return path; +}; +exports.default = pathArg; +//# sourceMappingURL=path-arg.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/path-arg.js.map b/node_modules/rimraf/dist/cjs/src/path-arg.js.map new file mode 100644 index 0000000..67e1e7c --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/path-arg.js.map @@ -0,0 +1 @@ +{"version":3,"file":"path-arg.js","sourceRoot":"","sources":["../../../src/path-arg.ts"],"names":[],"mappings":";;;;;AAAA,+BAAqC;AACrC,+BAA8B;AAE9B,gEAAoC;A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;YAClC,IAAI;YACJ,IAAI,EAAE,mBAAmB;SAC1B,CAAC,CAAA;KACH;IAED,IAAI,qBAAQ,KAAK,OAAO,EAAE;QACxB,MAAM,WAAW,GAAG,WAAW,CAAA;QAC/B,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,YAAK,EAAC,IAAI,CAAC,CAAA;QAC5B,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE;YACjD,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,6BAA6B,CAAC,EAAE;gBAC5D,IAAI;gBACJ,IAAI,EAAE,QAAQ;aACf,CAAC,CAAA;SACH;KACF;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,kBAAe,OAAO,CAAA","sourcesContent":["import { parse, resolve } from 'path'\nimport { inspect } from 'util'\nimport { RimrafAsyncOptions } from './index.js'\nimport platform from './platform.js'\n\nconst pathArg = (path: string, opt: RimrafAsyncOptions = {}) => {\n const type = typeof path\n if (type !== 'string') {\n const ctor = path && type === 'object' && path.constructor\n const received =\n ctor && ctor.name\n ? `an instance of ${ctor.name}`\n : type === 'object'\n ? inspect(path)\n : `type ${type} ${path}`\n const msg =\n 'The \"path\" argument must be of type string. ' + `Received ${received}`\n throw Object.assign(new TypeError(msg), {\n path,\n code: 'ERR_INVALID_ARG_TYPE',\n })\n }\n\n if (/\\0/.test(path)) {\n // simulate same failure that node raises\n const msg = 'path must be a string without null bytes'\n throw Object.assign(new TypeError(msg), {\n path,\n code: 'ERR_INVALID_ARG_VALUE',\n })\n }\n\n path = resolve(path)\n const { root } = parse(path)\n\n if (path === root && opt.preserveRoot !== false) {\n const msg = 'refusing to remove root directory without preserveRoot:false'\n throw Object.assign(new Error(msg), {\n path,\n code: 'ERR_PRESERVE_ROOT',\n })\n }\n\n if (platform === 'win32') {\n const badWinChars = /[*|\"<>?:]/\n const { root } = parse(path)\n if (badWinChars.test(path.substring(root.length))) {\n throw Object.assign(new Error('Illegal characters in path.'), {\n path,\n code: 'EINVAL',\n })\n }\n }\n\n return path\n}\n\nexport default pathArg\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/platform.d.ts b/node_modules/rimraf/dist/cjs/src/platform.d.ts new file mode 100644 index 0000000..e127a8e --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/platform.d.ts @@ -0,0 +1,3 @@ +declare const _default: string; +export default _default; +//# sourceMappingURL=platform.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/platform.d.ts.map b/node_modules/rimraf/dist/cjs/src/platform.d.ts.map new file mode 100644 index 0000000..557e92f --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/platform.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../src/platform.ts"],"names":[],"mappings":";AAAA,wBAA0E"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/platform.js b/node_modules/rimraf/dist/cjs/src/platform.js new file mode 100644 index 0000000..58f197f --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/platform.js @@ -0,0 +1,4 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = process.env.__TESTING_RIMRAF_PLATFORM__ || process.platform; +//# sourceMappingURL=platform.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/platform.js.map b/node_modules/rimraf/dist/cjs/src/platform.js.map new file mode 100644 index 0000000..f85afd7 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/platform.js.map @@ -0,0 +1 @@ +{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../../src/platform.ts"],"names":[],"mappings":";;AAAA,kBAAe,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,OAAO,CAAC,QAAQ,CAAA","sourcesContent":["export default process.env.__TESTING_RIMRAF_PLATFORM__ || process.platform\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/readdir-or-error.d.ts b/node_modules/rimraf/dist/cjs/src/readdir-or-error.d.ts new file mode 100644 index 0000000..8b7d6c9 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/readdir-or-error.d.ts @@ -0,0 +1,5 @@ +/// +/// +export declare const readdirOrError: (path: string) => Promise; +export declare const readdirOrErrorSync: (path: string) => import("fs").Dirent[] | NodeJS.ErrnoException; +//# sourceMappingURL=readdir-or-error.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/readdir-or-error.d.ts.map b/node_modules/rimraf/dist/cjs/src/readdir-or-error.d.ts.map new file mode 100644 index 0000000..6d1b997 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/readdir-or-error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"readdir-or-error.d.ts","sourceRoot":"","sources":["../../../src/readdir-or-error.ts"],"names":[],"mappings":";;AAIA,eAAO,MAAM,cAAc,SAAU,MAAM,2DACa,CAAA;AACxD,eAAO,MAAM,kBAAkB,SAAU,MAAM,kDAM9C,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/readdir-or-error.js b/node_modules/rimraf/dist/cjs/src/readdir-or-error.js new file mode 100644 index 0000000..75330cb --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/readdir-or-error.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readdirOrErrorSync = exports.readdirOrError = void 0; +// returns an array of entries if readdir() works, +// or the error that readdir() raised if not. +const fs_js_1 = require("./fs.js"); +const { readdir } = fs_js_1.promises; +const readdirOrError = (path) => readdir(path).catch(er => er); +exports.readdirOrError = readdirOrError; +const readdirOrErrorSync = (path) => { + try { + return (0, fs_js_1.readdirSync)(path); + } + catch (er) { + return er; + } +}; +exports.readdirOrErrorSync = readdirOrErrorSync; +//# sourceMappingURL=readdir-or-error.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/readdir-or-error.js.map b/node_modules/rimraf/dist/cjs/src/readdir-or-error.js.map new file mode 100644 index 0000000..e205085 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/readdir-or-error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"readdir-or-error.js","sourceRoot":"","sources":["../../../src/readdir-or-error.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AAClD,6CAA6C;AAC7C,mCAA+C;AAC/C,MAAM,EAAE,OAAO,EAAE,GAAG,gBAAQ,CAAA;AACrB,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE,CAC7C,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAA2B,CAAC,CAAA;AAD3C,QAAA,cAAc,kBAC6B;AACjD,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAE,EAAE;IACjD,IAAI;QACF,OAAO,IAAA,mBAAW,EAAC,IAAI,CAAC,CAAA;KACzB;IAAC,OAAO,EAAE,EAAE;QACX,OAAO,EAA2B,CAAA;KACnC;AACH,CAAC,CAAA;AANY,QAAA,kBAAkB,sBAM9B","sourcesContent":["// returns an array of entries if readdir() works,\n// or the error that readdir() raised if not.\nimport { promises, readdirSync } from './fs.js'\nconst { readdir } = promises\nexport const readdirOrError = (path: string) =>\n readdir(path).catch(er => er as NodeJS.ErrnoException)\nexport const readdirOrErrorSync = (path: string) => {\n try {\n return readdirSync(path)\n } catch (er) {\n return er as NodeJS.ErrnoException\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/retry-busy.d.ts b/node_modules/rimraf/dist/cjs/src/retry-busy.d.ts new file mode 100644 index 0000000..8df88e9 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/retry-busy.d.ts @@ -0,0 +1,8 @@ +import { RimrafAsyncOptions, RimrafOptions } from '.'; +export declare const MAXBACKOFF = 200; +export declare const RATE = 1.2; +export declare const MAXRETRIES = 10; +export declare const codes: Set; +export declare const retryBusy: (fn: (path: string) => Promise) => (path: string, opt: RimrafAsyncOptions, backoff?: number, total?: number) => Promise; +export declare const retryBusySync: (fn: (path: string) => any) => (path: string, opt: RimrafOptions) => any; +//# sourceMappingURL=retry-busy.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/retry-busy.d.ts.map b/node_modules/rimraf/dist/cjs/src/retry-busy.d.ts.map new file mode 100644 index 0000000..f89bb0a --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/retry-busy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"retry-busy.d.ts","sourceRoot":"","sources":["../../../src/retry-busy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,GAAG,CAAA;AAErD,eAAO,MAAM,UAAU,MAAM,CAAA;AAC7B,eAAO,MAAM,IAAI,MAAM,CAAA;AACvB,eAAO,MAAM,UAAU,KAAK,CAAA;AAC5B,eAAO,MAAM,KAAK,aAAyC,CAAA;AAE3D,eAAO,MAAM,SAAS,cAAe,MAAM,KAAK,QAAQ,GAAG,CAAC,YAElD,MAAM,OACP,kBAAkB,mDAkC1B,CAAA;AAGD,eAAO,MAAM,aAAa,cAAe,MAAM,KAAK,GAAG,YAC/B,MAAM,OAAO,aAAa,QAsBjD,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/retry-busy.js b/node_modules/rimraf/dist/cjs/src/retry-busy.js new file mode 100644 index 0000000..5f9d152 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/retry-busy.js @@ -0,0 +1,68 @@ +"use strict"; +// note: max backoff is the maximum that any *single* backoff will do +Object.defineProperty(exports, "__esModule", { value: true }); +exports.retryBusySync = exports.retryBusy = exports.codes = exports.MAXRETRIES = exports.RATE = exports.MAXBACKOFF = void 0; +exports.MAXBACKOFF = 200; +exports.RATE = 1.2; +exports.MAXRETRIES = 10; +exports.codes = new Set(['EMFILE', 'ENFILE', 'EBUSY']); +const retryBusy = (fn) => { + const method = async (path, opt, backoff = 1, total = 0) => { + const mbo = opt.maxBackoff || exports.MAXBACKOFF; + const rate = opt.backoff || exports.RATE; + const max = opt.maxRetries || exports.MAXRETRIES; + let retries = 0; + while (true) { + try { + return await fn(path); + } + catch (er) { + const fer = er; + if (fer?.path === path && fer?.code && exports.codes.has(fer.code)) { + backoff = Math.ceil(backoff * rate); + total = backoff + total; + if (total < mbo) { + return new Promise((res, rej) => { + setTimeout(() => { + method(path, opt, backoff, total).then(res, rej); + }, backoff); + }); + } + if (retries < max) { + retries++; + continue; + } + } + throw er; + } + } + }; + return method; +}; +exports.retryBusy = retryBusy; +// just retries, no async so no backoff +const retryBusySync = (fn) => { + const method = (path, opt) => { + const max = opt.maxRetries || exports.MAXRETRIES; + let retries = 0; + while (true) { + try { + return fn(path); + } + catch (er) { + const fer = er; + if (fer?.path === path && + fer?.code && + exports.codes.has(fer.code) && + retries < max) { + retries++; + continue; + } + throw er; + } + } + }; + return method; +}; +exports.retryBusySync = retryBusySync; +//# sourceMappingURL=retry-busy.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/retry-busy.js.map b/node_modules/rimraf/dist/cjs/src/retry-busy.js.map new file mode 100644 index 0000000..80638ff --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/retry-busy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"retry-busy.js","sourceRoot":"","sources":["../../../src/retry-busy.ts"],"names":[],"mappings":";AAAA,qEAAqE;;;AAIxD,QAAA,UAAU,GAAG,GAAG,CAAA;AAChB,QAAA,IAAI,GAAG,GAAG,CAAA;AACV,QAAA,UAAU,GAAG,EAAE,CAAA;AACf,QAAA,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAA;AAEpD,MAAM,SAAS,GAAG,CAAC,EAAkC,EAAE,EAAE;IAC9D,MAAM,MAAM,GAAG,KAAK,EAClB,IAAY,EACZ,GAAuB,EACvB,OAAO,GAAG,CAAC,EAC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,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,GAAkB,EAAE,EAAE;QAClD,MAAM,GAAG,GAAG,GAAG,CAAC,UAAU,IAAI,kBAAU,CAAA;QACxC,IAAI,OAAO,GAAG,CAAC,CAAA;QACf,OAAO,IAAI,EAAE;YACX,IAAI;gBACF,OAAO,EAAE,CAAC,IAAI,CAAC,CAAA;aAChB;YAAC,OAAO,EAAE,EAAE;gBACX,MAAM,GAAG,GAAG,EAA2B,CAAA;gBACvC,IACE,GAAG,EAAE,IAAI,KAAK,IAAI;oBAClB,GAAG,EAAE,IAAI;oBACT,aAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;oBACnB,OAAO,GAAG,GAAG,EACb;oBACA,OAAO,EAAE,CAAA;oBACT,SAAQ;iBACT;gBACD,MAAM,EAAE,CAAA;aACT;SACF;IACH,CAAC,CAAA;IACD,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAvBY,QAAA,aAAa,iBAuBzB","sourcesContent":["// note: max backoff is the maximum that any *single* backoff will do\n\nimport { RimrafAsyncOptions, RimrafOptions } from '.'\n\nexport const MAXBACKOFF = 200\nexport const RATE = 1.2\nexport const MAXRETRIES = 10\nexport const codes = new Set(['EMFILE', 'ENFILE', 'EBUSY'])\n\nexport const retryBusy = (fn: (path: string) => Promise) => {\n const method = async (\n path: string,\n opt: RimrafAsyncOptions,\n backoff = 1,\n total = 0\n ) => {\n const mbo = opt.maxBackoff || MAXBACKOFF\n const rate = opt.backoff || RATE\n const max = opt.maxRetries || MAXRETRIES\n let retries = 0\n while (true) {\n try {\n return await fn(path)\n } catch (er) {\n const fer = er as NodeJS.ErrnoException\n if (fer?.path === path && fer?.code && codes.has(fer.code)) {\n backoff = Math.ceil(backoff * rate)\n total = backoff + total\n if (total < mbo) {\n return new Promise((res, rej) => {\n setTimeout(() => {\n method(path, opt, backoff, total).then(res, rej)\n }, backoff)\n })\n }\n if (retries < max) {\n retries++\n continue\n }\n }\n throw er\n }\n }\n }\n\n return method\n}\n\n// just retries, no async so no backoff\nexport const retryBusySync = (fn: (path: string) => any) => {\n const method = (path: string, opt: RimrafOptions) => {\n const max = opt.maxRetries || MAXRETRIES\n let retries = 0\n while (true) {\n try {\n return fn(path)\n } catch (er) {\n const fer = er as NodeJS.ErrnoException\n if (\n fer?.path === path &&\n fer?.code &&\n codes.has(fer.code) &&\n retries < max\n ) {\n retries++\n continue\n }\n throw er\n }\n }\n }\n return method\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-manual.d.ts b/node_modules/rimraf/dist/cjs/src/rimraf-manual.d.ts new file mode 100644 index 0000000..5b14343 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-manual.d.ts @@ -0,0 +1,3 @@ +export declare const rimrafManual: (path: string, opt: import("./index.js").RimrafAsyncOptions) => Promise; +export declare const rimrafManualSync: (path: string, opt: import("./index.js").RimrafSyncOptions) => boolean; +//# sourceMappingURL=rimraf-manual.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-manual.d.ts.map b/node_modules/rimraf/dist/cjs/src/rimraf-manual.d.ts.map new file mode 100644 index 0000000..c737d44 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-manual.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-manual.d.ts","sourceRoot":"","sources":["../../../src/rimraf-manual.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,kFAAqD,CAAA;AAC9E,eAAO,MAAM,gBAAgB,wEAC+B,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-manual.js b/node_modules/rimraf/dist/cjs/src/rimraf-manual.js new file mode 100644 index 0000000..1c95ae2 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-manual.js @@ -0,0 +1,12 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.rimrafManualSync = exports.rimrafManual = void 0; +const platform_js_1 = __importDefault(require("./platform.js")); +const rimraf_posix_js_1 = require("./rimraf-posix.js"); +const rimraf_windows_js_1 = require("./rimraf-windows.js"); +exports.rimrafManual = platform_js_1.default === 'win32' ? rimraf_windows_js_1.rimrafWindows : rimraf_posix_js_1.rimrafPosix; +exports.rimrafManualSync = platform_js_1.default === 'win32' ? rimraf_windows_js_1.rimrafWindowsSync : rimraf_posix_js_1.rimrafPosixSync; +//# sourceMappingURL=rimraf-manual.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-manual.js.map b/node_modules/rimraf/dist/cjs/src/rimraf-manual.js.map new file mode 100644 index 0000000..ff26aee --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-manual.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-manual.js","sourceRoot":"","sources":["../../../src/rimraf-manual.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAoC;AAEpC,uDAAgE;AAChE,2DAAsE;AAEzD,QAAA,YAAY,GAAG,qBAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,iCAAa,CAAC,CAAC,CAAC,6BAAW,CAAA;AACjE,QAAA,gBAAgB,GAC3B,qBAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,qCAAiB,CAAC,CAAC,CAAC,iCAAe,CAAA","sourcesContent":["import platform from './platform.js'\n\nimport { rimrafPosix, rimrafPosixSync } from './rimraf-posix.js'\nimport { rimrafWindows, rimrafWindowsSync } from './rimraf-windows.js'\n\nexport const rimrafManual = platform === 'win32' ? rimrafWindows : rimrafPosix\nexport const rimrafManualSync =\n platform === 'win32' ? rimrafWindowsSync : rimrafPosixSync\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-move-remove.d.ts b/node_modules/rimraf/dist/cjs/src/rimraf-move-remove.d.ts new file mode 100644 index 0000000..da5b6b6 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-move-remove.d.ts @@ -0,0 +1,4 @@ +import { RimrafAsyncOptions, RimrafSyncOptions } from '.'; +export declare const rimrafMoveRemove: (path: string, opt: RimrafAsyncOptions) => Promise; +export declare const rimrafMoveRemoveSync: (path: string, opt: RimrafSyncOptions) => boolean; +//# sourceMappingURL=rimraf-move-remove.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-move-remove.d.ts.map b/node_modules/rimraf/dist/cjs/src/rimraf-move-remove.d.ts.map new file mode 100644 index 0000000..9bf1d75 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-move-remove.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-move-remove.d.ts","sourceRoot":"","sources":["../../../src/rimraf-move-remove.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAA;AA4CzD,eAAO,MAAM,gBAAgB,SACrB,MAAM,OACP,kBAAkB,qBAWxB,CAAA;AA0ED,eAAO,MAAM,oBAAoB,SAAU,MAAM,OAAO,iBAAiB,YAUxE,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-move-remove.js b/node_modules/rimraf/dist/cjs/src/rimraf-move-remove.js new file mode 100644 index 0000000..ac668d1 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-move-remove.js @@ -0,0 +1,192 @@ +"use strict"; +// https://youtu.be/uhRWMGBjlO8?t=537 +// +// 1. readdir +// 2. for each entry +// a. if a non-empty directory, recurse +// b. if an empty directory, move to random hidden file name in $TEMP +// c. unlink/rmdir $TEMP +// +// This works around the fact that unlink/rmdir is non-atomic and takes +// a non-deterministic amount of time to complete. +// +// However, it is HELLA SLOW, like 2-10x slower than a naive recursive rm. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.rimrafMoveRemoveSync = exports.rimrafMoveRemove = void 0; +const path_1 = require("path"); +const default_tmp_js_1 = require("./default-tmp.js"); +const ignore_enoent_js_1 = require("./ignore-enoent.js"); +const fs_js_1 = require("./fs.js"); +const { lstat, rename, unlink, rmdir, chmod } = fs_js_1.promises; +const readdir_or_error_js_1 = require("./readdir-or-error.js"); +// crypto.randomBytes is much slower, and Math.random() is enough here +const uniqueFilename = (path) => `.${(0, path_1.basename)(path)}.${Math.random()}`; +const unlinkFixEPERM = async (path) => unlink(path).catch((er) => { + if (er.code === 'EPERM') { + return chmod(path, 0o666).then(() => unlink(path), er2 => { + if (er2.code === 'ENOENT') { + return; + } + throw er; + }); + } + else if (er.code === 'ENOENT') { + return; + } + throw er; +}); +const unlinkFixEPERMSync = (path) => { + try { + (0, fs_js_1.unlinkSync)(path); + } + catch (er) { + if (er?.code === 'EPERM') { + try { + return (0, fs_js_1.chmodSync)(path, 0o666); + } + catch (er2) { + if (er2?.code === 'ENOENT') { + return; + } + throw er; + } + } + else if (er?.code === 'ENOENT') { + return; + } + throw er; + } +}; +const rimrafMoveRemove = async (path, opt) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + try { + return await rimrafMoveRemoveDir(path, opt, await lstat(path)); + } + catch (er) { + if (er?.code === 'ENOENT') + return true; + throw er; + } +}; +exports.rimrafMoveRemove = rimrafMoveRemove; +const rimrafMoveRemoveDir = async (path, opt, ent) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + if (!opt.tmp) { + return rimrafMoveRemoveDir(path, { ...opt, tmp: await (0, default_tmp_js_1.defaultTmp)(path) }, ent); + } + if (path === opt.tmp && (0, path_1.parse)(path).root !== path) { + throw new Error('cannot delete temp directory used for deletion'); + } + const entries = ent.isDirectory() ? await (0, readdir_or_error_js_1.readdirOrError)(path) : null; + if (!Array.isArray(entries)) { + // this can only happen if lstat/readdir lied, or if the dir was + // swapped out with a file at just the right moment. + /* c8 ignore start */ + if (entries) { + if (entries.code === 'ENOENT') { + return true; + } + if (entries.code !== 'ENOTDIR') { + throw entries; + } + } + /* c8 ignore stop */ + if (opt.filter && !(await opt.filter(path, ent))) { + return false; + } + await (0, ignore_enoent_js_1.ignoreENOENT)(tmpUnlink(path, opt.tmp, unlinkFixEPERM)); + return true; + } + const removedAll = (await Promise.all(entries.map(ent => rimrafMoveRemoveDir((0, path_1.resolve)(path, ent.name), opt, ent)))).reduce((a, b) => a && b, true); + if (!removedAll) { + return false; + } + // we don't ever ACTUALLY try to unlink /, because that can never work + // but when preserveRoot is false, we could be operating on it. + // No need to check if preserveRoot is not false. + if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) { + return false; + } + if (opt.filter && !(await opt.filter(path, ent))) { + return false; + } + await (0, ignore_enoent_js_1.ignoreENOENT)(tmpUnlink(path, opt.tmp, rmdir)); + return true; +}; +const tmpUnlink = async (path, tmp, rm) => { + const tmpFile = (0, path_1.resolve)(tmp, uniqueFilename(path)); + await rename(path, tmpFile); + return await rm(tmpFile); +}; +const rimrafMoveRemoveSync = (path, opt) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + try { + return rimrafMoveRemoveDirSync(path, opt, (0, fs_js_1.lstatSync)(path)); + } + catch (er) { + if (er?.code === 'ENOENT') + return true; + throw er; + } +}; +exports.rimrafMoveRemoveSync = rimrafMoveRemoveSync; +const rimrafMoveRemoveDirSync = (path, opt, ent) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + if (!opt.tmp) { + return rimrafMoveRemoveDirSync(path, { ...opt, tmp: (0, default_tmp_js_1.defaultTmpSync)(path) }, ent); + } + const tmp = opt.tmp; + if (path === opt.tmp && (0, path_1.parse)(path).root !== path) { + throw new Error('cannot delete temp directory used for deletion'); + } + const entries = ent.isDirectory() ? (0, readdir_or_error_js_1.readdirOrErrorSync)(path) : null; + if (!Array.isArray(entries)) { + // this can only happen if lstat/readdir lied, or if the dir was + // swapped out with a file at just the right moment. + /* c8 ignore start */ + if (entries) { + if (entries.code === 'ENOENT') { + return true; + } + if (entries.code !== 'ENOTDIR') { + throw entries; + } + } + /* c8 ignore stop */ + if (opt.filter && !opt.filter(path, ent)) { + return false; + } + (0, ignore_enoent_js_1.ignoreENOENTSync)(() => tmpUnlinkSync(path, tmp, unlinkFixEPERMSync)); + return true; + } + let removedAll = true; + for (const ent of entries) { + const p = (0, path_1.resolve)(path, ent.name); + removedAll = rimrafMoveRemoveDirSync(p, opt, ent) && removedAll; + } + if (!removedAll) { + return false; + } + if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) { + return false; + } + if (opt.filter && !opt.filter(path, ent)) { + return false; + } + (0, ignore_enoent_js_1.ignoreENOENTSync)(() => tmpUnlinkSync(path, tmp, fs_js_1.rmdirSync)); + return true; +}; +const tmpUnlinkSync = (path, tmp, rmSync) => { + const tmpFile = (0, path_1.resolve)(tmp, uniqueFilename(path)); + (0, fs_js_1.renameSync)(path, tmpFile); + return rmSync(tmpFile); +}; +//# sourceMappingURL=rimraf-move-remove.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-move-remove.js.map b/node_modules/rimraf/dist/cjs/src/rimraf-move-remove.js.map new file mode 100644 index 0000000..7aef8e6 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-move-remove.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-move-remove.js","sourceRoot":"","sources":["../../../src/rimraf-move-remove.ts"],"names":[],"mappings":";AAAA,qCAAqC;AACrC,EAAE;AACF,aAAa;AACb,oBAAoB;AACpB,yCAAyC;AACzC,uEAAuE;AACvE,0BAA0B;AAC1B,EAAE;AACF,uEAAuE;AACvE,kDAAkD;AAClD,EAAE;AACF,0EAA0E;;;AAE1E,+BAA+C;AAC/C,qDAA6D;AAE7D,yDAAmE;AAEnE,mCAOgB;AAChB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,gBAAU,CAAA;AAI1D,+DAA0E;AAE1E,sEAAsE;AACtE,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,I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I,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;QACxC,OAAO,KAAK,CAAA;KACb;IACD,IAAA,mCAAgB,EAAC,GAAG,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,iBAAS,CAAC,CAAC,CAAA;IAC3D,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,aAAa,GAAG,CACpB,IAAY,EACZ,GAAW,EACX,MAA2B,EAC3B,EAAE;IACF,MAAM,OAAO,GAAG,IAAA,cAAO,EAAC,GAAG,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC,CAAA;IAClD,IAAA,kBAAU,EAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACzB,OAAO,MAAM,CAAC,OAAO,CAAC,CAAA;AACxB,CAAC,CAAA","sourcesContent":["// https://youtu.be/uhRWMGBjlO8?t=537\n//\n// 1. readdir\n// 2. for each entry\n// a. if a non-empty directory, recurse\n// b. if an empty directory, move to random hidden file name in $TEMP\n// c. unlink/rmdir $TEMP\n//\n// This works around the fact that unlink/rmdir is non-atomic and takes\n// a non-deterministic amount of time to complete.\n//\n// However, it is HELLA SLOW, like 2-10x slower than a naive recursive rm.\n\nimport { basename, parse, resolve } from 'path'\nimport { defaultTmp, defaultTmpSync } from './default-tmp.js'\n\nimport { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js'\n\nimport {\n chmodSync,\n lstatSync,\n promises as fsPromises,\n renameSync,\n rmdirSync,\n unlinkSync,\n} from './fs.js'\nconst { lstat, rename, unlink, rmdir, chmod } = fsPromises\n\nimport { Dirent, Stats } from 'fs'\nimport { RimrafAsyncOptions, RimrafSyncOptions } from '.'\nimport { readdirOrError, readdirOrErrorSync } from './readdir-or-error.js'\n\n// crypto.randomBytes is much slower, and Math.random() is enough here\nconst uniqueFilename = (path: string) => `.${basename(path)}.${Math.random()}`\n\nconst unlinkFixEPERM = async (path: string) =>\n unlink(path).catch((er: Error & { code?: string }) => {\n if (er.code === 'EPERM') {\n return chmod(path, 0o666).then(\n () => unlink(path),\n er2 => {\n if (er2.code === 'ENOENT') {\n return\n }\n throw er\n }\n )\n } else if (er.code === 'ENOENT') {\n return\n }\n throw er\n })\n\nconst unlinkFixEPERMSync = (path: string) => {\n try {\n unlinkSync(path)\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'EPERM') {\n try {\n return chmodSync(path, 0o666)\n } catch (er2) {\n if ((er2 as NodeJS.ErrnoException)?.code === 'ENOENT') {\n return\n }\n throw er\n }\n } else if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') {\n return\n }\n throw er\n }\n}\n\nexport const rimrafMoveRemove = async (\n path: string,\n opt: RimrafAsyncOptions\n) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return await rimrafMoveRemoveDir(path, opt, await lstat(path))\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nconst rimrafMoveRemoveDir = async (\n path: string,\n opt: RimrafAsyncOptions,\n ent: Dirent | Stats\n): Promise => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n if (!opt.tmp) {\n return rimrafMoveRemoveDir(\n path,\n { ...opt, tmp: await defaultTmp(path) },\n ent\n )\n }\n if (path === opt.tmp && parse(path).root !== path) {\n throw new Error('cannot delete temp directory used for deletion')\n }\n\n const entries = ent.isDirectory() ? await readdirOrError(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n await ignoreENOENT(tmpUnlink(path, opt.tmp, unlinkFixEPERM))\n return true\n }\n\n const removedAll = (\n await Promise.all(\n entries.map(ent => rimrafMoveRemoveDir(resolve(path, ent.name), opt, ent))\n )\n ).reduce((a, b) => a && b, true)\n if (!removedAll) {\n return false\n }\n\n // we don't ever ACTUALLY try to unlink /, because that can never work\n // but when preserveRoot is false, we could be operating on it.\n // No need to check if preserveRoot is not false.\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n await ignoreENOENT(tmpUnlink(path, opt.tmp, rmdir))\n return true\n}\n\nconst tmpUnlink = async (\n path: string,\n tmp: string,\n rm: (p: string) => Promise\n) => {\n const tmpFile = resolve(tmp, uniqueFilename(path))\n await rename(path, tmpFile)\n return await rm(tmpFile)\n}\n\nexport const rimrafMoveRemoveSync = (path: string, opt: RimrafSyncOptions) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return rimrafMoveRemoveDirSync(path, opt, lstatSync(path))\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nconst rimrafMoveRemoveDirSync = (\n path: string,\n opt: RimrafSyncOptions,\n ent: Dirent | Stats\n): boolean => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n if (!opt.tmp) {\n return rimrafMoveRemoveDirSync(\n path,\n { ...opt, tmp: defaultTmpSync(path) },\n ent\n )\n }\n const tmp: string = opt.tmp\n\n if (path === opt.tmp && parse(path).root !== path) {\n throw new Error('cannot delete temp directory used for deletion')\n }\n\n const entries = ent.isDirectory() ? readdirOrErrorSync(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n ignoreENOENTSync(() => tmpUnlinkSync(path, tmp, unlinkFixEPERMSync))\n return true\n }\n\n let removedAll = true\n for (const ent of entries) {\n const p = resolve(path, ent.name)\n removedAll = rimrafMoveRemoveDirSync(p, opt, ent) && removedAll\n }\n if (!removedAll) {\n return false\n }\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n ignoreENOENTSync(() => tmpUnlinkSync(path, tmp, rmdirSync))\n return true\n}\n\nconst tmpUnlinkSync = (\n path: string,\n tmp: string,\n rmSync: (p: string) => void\n) => {\n const tmpFile = resolve(tmp, uniqueFilename(path))\n renameSync(path, tmpFile)\n return rmSync(tmpFile)\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-native.d.ts b/node_modules/rimraf/dist/cjs/src/rimraf-native.d.ts new file mode 100644 index 0000000..9c08af0 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-native.d.ts @@ -0,0 +1,4 @@ +import { RimrafAsyncOptions, RimrafSyncOptions } from '.'; +export declare const rimrafNative: (path: string, opt: RimrafAsyncOptions) => Promise; +export declare const rimrafNativeSync: (path: string, opt: RimrafSyncOptions) => boolean; +//# sourceMappingURL=rimraf-native.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-native.d.ts.map b/node_modules/rimraf/dist/cjs/src/rimraf-native.d.ts.map new file mode 100644 index 0000000..b470dc9 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-native.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-native.d.ts","sourceRoot":"","sources":["../../../src/rimraf-native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAA;AAIzD,eAAO,MAAM,YAAY,SACjB,MAAM,OACP,kBAAkB,KACtB,QAAQ,OAAO,CAOjB,CAAA;AAED,eAAO,MAAM,gBAAgB,SACrB,MAAM,OACP,iBAAiB,KACrB,OAOF,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-native.js b/node_modules/rimraf/dist/cjs/src/rimraf-native.js new file mode 100644 index 0000000..ab9f633 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-native.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.rimrafNativeSync = exports.rimrafNative = void 0; +const fs_js_1 = require("./fs.js"); +const { rm } = fs_js_1.promises; +const rimrafNative = async (path, opt) => { + await rm(path, { + ...opt, + force: true, + recursive: true, + }); + return true; +}; +exports.rimrafNative = rimrafNative; +const rimrafNativeSync = (path, opt) => { + (0, fs_js_1.rmSync)(path, { + ...opt, + force: true, + recursive: true, + }); + return true; +}; +exports.rimrafNativeSync = rimrafNativeSync; +//# sourceMappingURL=rimraf-native.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-native.js.map b/node_modules/rimraf/dist/cjs/src/rimraf-native.js.map new file mode 100644 index 0000000..6a6bded --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-native.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-native.js","sourceRoot":"","sources":["../../../src/rimraf-native.ts"],"names":[],"mappings":";;;AACA,mCAA0C;AAC1C,MAAM,EAAE,EAAE,EAAE,GAAG,gBAAQ,CAAA;AAEhB,MAAM,YAAY,GAAG,KAAK,EAC/B,IAAY,EACZ,GAAuB,EACL,EAAE;IACpB,MAAM,EAAE,CAAC,IAAI,EAAE;QACb,GAAG,GAAG;QACN,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;KAChB,CAAC,CAAA;IACF,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAVY,QAAA,YAAY,gBAUxB;AAEM,MAAM,gBAAgB,GAAG,CAC9B,IAAY,EACZ,GAAsB,EACb,EAAE;IACX,IAAA,cAAM,EAAC,IAAI,EAAE;QACX,GAAG,GAAG;QACN,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;KAChB,CAAC,CAAA;IACF,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAVY,QAAA,gBAAgB,oBAU5B","sourcesContent":["import { RimrafAsyncOptions, RimrafSyncOptions } from '.'\nimport { promises, rmSync } from './fs.js'\nconst { rm } = promises\n\nexport const rimrafNative = async (\n path: string,\n opt: RimrafAsyncOptions\n): Promise => {\n await rm(path, {\n ...opt,\n force: true,\n recursive: true,\n })\n return true\n}\n\nexport const rimrafNativeSync = (\n path: string,\n opt: RimrafSyncOptions\n): boolean => {\n rmSync(path, {\n ...opt,\n force: true,\n recursive: true,\n })\n return true\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-posix.d.ts b/node_modules/rimraf/dist/cjs/src/rimraf-posix.d.ts new file mode 100644 index 0000000..fd4c83c --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-posix.d.ts @@ -0,0 +1,4 @@ +import { RimrafAsyncOptions, RimrafSyncOptions } from '.'; +export declare const rimrafPosix: (path: string, opt: RimrafAsyncOptions) => Promise; +export declare const rimrafPosixSync: (path: string, opt: RimrafSyncOptions) => boolean; +//# sourceMappingURL=rimraf-posix.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-posix.d.ts.map b/node_modules/rimraf/dist/cjs/src/rimraf-posix.d.ts.map new file mode 100644 index 0000000..3112847 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-posix.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-posix.d.ts","sourceRoot":"","sources":["../../../src/rimraf-posix.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAA;AAGzD,eAAO,MAAM,WAAW,SAAgB,MAAM,OAAO,kBAAkB,qBAUtE,CAAA;AAED,eAAO,MAAM,eAAe,SAAU,MAAM,OAAO,iBAAiB,YAUnE,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-posix.js b/node_modules/rimraf/dist/cjs/src/rimraf-posix.js new file mode 100644 index 0000000..eb0e7f1 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-posix.js @@ -0,0 +1,123 @@ +"use strict"; +// the simple recursive removal, where unlink and rmdir are atomic +// Note that this approach does NOT work on Windows! +// We stat first and only unlink if the Dirent isn't a directory, +// because sunos will let root unlink a directory, and some +// SUPER weird breakage happens as a result. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.rimrafPosixSync = exports.rimrafPosix = void 0; +const fs_js_1 = require("./fs.js"); +const { lstat, rmdir, unlink } = fs_js_1.promises; +const path_1 = require("path"); +const readdir_or_error_js_1 = require("./readdir-or-error.js"); +const ignore_enoent_js_1 = require("./ignore-enoent.js"); +const rimrafPosix = async (path, opt) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + try { + return await rimrafPosixDir(path, opt, await lstat(path)); + } + catch (er) { + if (er?.code === 'ENOENT') + return true; + throw er; + } +}; +exports.rimrafPosix = rimrafPosix; +const rimrafPosixSync = (path, opt) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + try { + return rimrafPosixDirSync(path, opt, (0, fs_js_1.lstatSync)(path)); + } + catch (er) { + if (er?.code === 'ENOENT') + return true; + throw er; + } +}; +exports.rimrafPosixSync = rimrafPosixSync; +const rimrafPosixDir = async (path, opt, ent) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + const entries = ent.isDirectory() ? await (0, readdir_or_error_js_1.readdirOrError)(path) : null; + if (!Array.isArray(entries)) { + // this can only happen if lstat/readdir lied, or if the dir was + // swapped out with a file at just the right moment. + /* c8 ignore start */ + if (entries) { + if (entries.code === 'ENOENT') { + return true; + } + if (entries.code !== 'ENOTDIR') { + throw entries; + } + } + /* c8 ignore stop */ + if (opt.filter && !(await opt.filter(path, ent))) { + return false; + } + await (0, ignore_enoent_js_1.ignoreENOENT)(unlink(path)); + return true; + } + const removedAll = (await Promise.all(entries.map(ent => rimrafPosixDir((0, path_1.resolve)(path, ent.name), opt, ent)))).reduce((a, b) => a && b, true); + if (!removedAll) { + return false; + } + // we don't ever ACTUALLY try to unlink /, because that can never work + // but when preserveRoot is false, we could be operating on it. + // No need to check if preserveRoot is not false. + if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) { + return false; + } + if (opt.filter && !(await opt.filter(path, ent))) { + return false; + } + await (0, ignore_enoent_js_1.ignoreENOENT)(rmdir(path)); + return true; +}; +const rimrafPosixDirSync = (path, opt, ent) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + const entries = ent.isDirectory() ? (0, readdir_or_error_js_1.readdirOrErrorSync)(path) : null; + if (!Array.isArray(entries)) { + // this can only happen if lstat/readdir lied, or if the dir was + // swapped out with a file at just the right moment. + /* c8 ignore start */ + if (entries) { + if (entries.code === 'ENOENT') { + return true; + } + if (entries.code !== 'ENOTDIR') { + throw entries; + } + } + /* c8 ignore stop */ + if (opt.filter && !opt.filter(path, ent)) { + return false; + } + (0, ignore_enoent_js_1.ignoreENOENTSync)(() => (0, fs_js_1.unlinkSync)(path)); + return true; + } + let removedAll = true; + for (const ent of entries) { + const p = (0, path_1.resolve)(path, ent.name); + removedAll = rimrafPosixDirSync(p, opt, ent) && removedAll; + } + if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) { + return false; + } + if (!removedAll) { + return false; + } + if (opt.filter && !opt.filter(path, ent)) { + return false; + } + (0, ignore_enoent_js_1.ignoreENOENTSync)(() => (0, fs_js_1.rmdirSync)(path)); + return true; +}; +//# sourceMappingURL=rimraf-posix.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-posix.js.map b/node_modules/rimraf/dist/cjs/src/rimraf-posix.js.map new file mode 100644 index 0000000..b470ce4 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-posix.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-posix.js","sourceRoot":"","sources":["../../../src/rimraf-posix.ts"],"names":[],"mappings":";AAAA,kEAAkE;AACl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AAG,IAAA,cAAO,EAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;QACjC,UAAU,GAAG,kBAAkB,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,UAAU,CAAA;KAC3D;IACD,IAAI,GAAG,CAAC,YAAY,KAAK,KAAK,IAAI,IAAI,KAAK,IAAA,YAAK,EAAC,IAAI,CAAC,CAAC,IAAI,EAAE;QAC3D,OAAO,KAAK,CAAA;KACb;IAED,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,KAAK,CAAA;KACb;IAED,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;QACxC,OAAO,KAAK,CAAA;KACb;IAED,IAAA,mCAAgB,EAAC,GAAG,EAAE,CAAC,IAAA,iBAAS,EAAC,IAAI,CAAC,CAAC,CAAA;IACvC,OAAO,IAAI,CAAA;AACb,CAAC,CAAA","sourcesContent":["// the simple recursive removal, where unlink and rmdir are atomic\n// Note that this approach does NOT work on Windows!\n// We stat first and only unlink if the Dirent isn't a directory,\n// because sunos will let root unlink a directory, and some\n// SUPER weird breakage happens as a result.\n\nimport { lstatSync, promises, rmdirSync, unlinkSync } from './fs.js'\nconst { lstat, rmdir, unlink } = promises\n\nimport { parse, resolve } from 'path'\n\nimport { readdirOrError, readdirOrErrorSync } from './readdir-or-error.js'\n\nimport { Dirent, Stats } from 'fs'\nimport { RimrafAsyncOptions, RimrafSyncOptions } from '.'\nimport { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js'\n\nexport const rimrafPosix = async (path: string, opt: RimrafAsyncOptions) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return await rimrafPosixDir(path, opt, await lstat(path))\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nexport const rimrafPosixSync = (path: string, opt: RimrafSyncOptions) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return rimrafPosixDirSync(path, opt, lstatSync(path))\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nconst rimrafPosixDir = async (\n path: string,\n opt: RimrafAsyncOptions,\n ent: Dirent | Stats\n): Promise => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n const entries = ent.isDirectory() ? await readdirOrError(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n await ignoreENOENT(unlink(path))\n return true\n }\n\n const removedAll = (\n await Promise.all(\n entries.map(ent => rimrafPosixDir(resolve(path, ent.name), opt, ent))\n )\n ).reduce((a, b) => a && b, true)\n\n if (!removedAll) {\n return false\n }\n\n // we don't ever ACTUALLY try to unlink /, because that can never work\n // but when preserveRoot is false, we could be operating on it.\n // No need to check if preserveRoot is not false.\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n\n await ignoreENOENT(rmdir(path))\n return true\n}\n\nconst rimrafPosixDirSync = (\n path: string,\n opt: RimrafSyncOptions,\n ent: Dirent | Stats\n): boolean => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n const entries = ent.isDirectory() ? readdirOrErrorSync(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n ignoreENOENTSync(() => unlinkSync(path))\n return true\n }\n let removedAll: boolean = true\n for (const ent of entries) {\n const p = resolve(path, ent.name)\n removedAll = rimrafPosixDirSync(p, opt, ent) && removedAll\n }\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n\n if (!removedAll) {\n return false\n }\n\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n\n ignoreENOENTSync(() => rmdirSync(path))\n return true\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-windows.d.ts b/node_modules/rimraf/dist/cjs/src/rimraf-windows.d.ts new file mode 100644 index 0000000..9412987 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-windows.d.ts @@ -0,0 +1,4 @@ +import { RimrafAsyncOptions, RimrafSyncOptions } from '.'; +export declare const rimrafWindows: (path: string, opt: RimrafAsyncOptions) => Promise; +export declare const rimrafWindowsSync: (path: string, opt: RimrafSyncOptions) => boolean; +//# sourceMappingURL=rimraf-windows.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-windows.d.ts.map b/node_modules/rimraf/dist/cjs/src/rimraf-windows.d.ts.map new file mode 100644 index 0000000..c94ed66 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-windows.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-windows.d.ts","sourceRoot":"","sources":["../../../src/rimraf-windows.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAA;AA2DzD,eAAO,MAAM,aAAa,SAAgB,MAAM,OAAO,kBAAkB,qBAUxE,CAAA;AAED,eAAO,MAAM,iBAAiB,SAAU,MAAM,OAAO,iBAAiB,YAUrE,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-windows.js b/node_modules/rimraf/dist/cjs/src/rimraf-windows.js new file mode 100644 index 0000000..8d19f98 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-windows.js @@ -0,0 +1,182 @@ +"use strict"; +// This is the same as rimrafPosix, with the following changes: +// +// 1. EBUSY, ENFILE, EMFILE trigger retries and/or exponential backoff +// 2. All non-directories are removed first and then all directories are +// removed in a second sweep. +// 3. If we hit ENOTEMPTY in the second sweep, fall back to move-remove on +// the that folder. +// +// Note: "move then remove" is 2-10 times slower, and just as unreliable. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.rimrafWindowsSync = exports.rimrafWindows = void 0; +const path_1 = require("path"); +const fix_eperm_js_1 = require("./fix-eperm.js"); +const fs_js_1 = require("./fs.js"); +const ignore_enoent_js_1 = require("./ignore-enoent.js"); +const readdir_or_error_js_1 = require("./readdir-or-error.js"); +const retry_busy_js_1 = require("./retry-busy.js"); +const rimraf_move_remove_js_1 = require("./rimraf-move-remove.js"); +const { unlink, rmdir, lstat } = fs_js_1.promises; +const rimrafWindowsFile = (0, retry_busy_js_1.retryBusy)((0, fix_eperm_js_1.fixEPERM)(unlink)); +const rimrafWindowsFileSync = (0, retry_busy_js_1.retryBusySync)((0, fix_eperm_js_1.fixEPERMSync)(fs_js_1.unlinkSync)); +const rimrafWindowsDirRetry = (0, retry_busy_js_1.retryBusy)((0, fix_eperm_js_1.fixEPERM)(rmdir)); +const rimrafWindowsDirRetrySync = (0, retry_busy_js_1.retryBusySync)((0, fix_eperm_js_1.fixEPERMSync)(fs_js_1.rmdirSync)); +const rimrafWindowsDirMoveRemoveFallback = async (path, opt) => { + /* c8 ignore start */ + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + /* c8 ignore stop */ + // already filtered, remove from options so we don't call unnecessarily + const { filter, ...options } = opt; + try { + return await rimrafWindowsDirRetry(path, options); + } + catch (er) { + if (er?.code === 'ENOTEMPTY') { + return await (0, rimraf_move_remove_js_1.rimrafMoveRemove)(path, options); + } + throw er; + } +}; +const rimrafWindowsDirMoveRemoveFallbackSync = (path, opt) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + // already filtered, remove from options so we don't call unnecessarily + const { filter, ...options } = opt; + try { + return rimrafWindowsDirRetrySync(path, options); + } + catch (er) { + const fer = er; + if (fer?.code === 'ENOTEMPTY') { + return (0, rimraf_move_remove_js_1.rimrafMoveRemoveSync)(path, options); + } + throw er; + } +}; +const START = Symbol('start'); +const CHILD = Symbol('child'); +const FINISH = Symbol('finish'); +const rimrafWindows = async (path, opt) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + try { + return await rimrafWindowsDir(path, opt, await lstat(path), START); + } + catch (er) { + if (er?.code === 'ENOENT') + return true; + throw er; + } +}; +exports.rimrafWindows = rimrafWindows; +const rimrafWindowsSync = (path, opt) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + try { + return rimrafWindowsDirSync(path, opt, (0, fs_js_1.lstatSync)(path), START); + } + catch (er) { + if (er?.code === 'ENOENT') + return true; + throw er; + } +}; +exports.rimrafWindowsSync = rimrafWindowsSync; +const rimrafWindowsDir = async (path, opt, ent, state = START) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + const entries = ent.isDirectory() ? await (0, readdir_or_error_js_1.readdirOrError)(path) : null; + if (!Array.isArray(entries)) { + // this can only happen if lstat/readdir lied, or if the dir was + // swapped out with a file at just the right moment. + /* c8 ignore start */ + if (entries) { + if (entries.code === 'ENOENT') { + return true; + } + if (entries.code !== 'ENOTDIR') { + throw entries; + } + } + /* c8 ignore stop */ + if (opt.filter && !(await opt.filter(path, ent))) { + return false; + } + // is a file + await (0, ignore_enoent_js_1.ignoreENOENT)(rimrafWindowsFile(path, opt)); + return true; + } + const s = state === START ? CHILD : state; + const removedAll = (await Promise.all(entries.map(ent => rimrafWindowsDir((0, path_1.resolve)(path, ent.name), opt, ent, s)))).reduce((a, b) => a && b, true); + if (state === START) { + return rimrafWindowsDir(path, opt, ent, FINISH); + } + else if (state === FINISH) { + if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) { + return false; + } + if (!removedAll) { + return false; + } + if (opt.filter && !(await opt.filter(path, ent))) { + return false; + } + await (0, ignore_enoent_js_1.ignoreENOENT)(rimrafWindowsDirMoveRemoveFallback(path, opt)); + } + return true; +}; +const rimrafWindowsDirSync = (path, opt, ent, state = START) => { + const entries = ent.isDirectory() ? (0, readdir_or_error_js_1.readdirOrErrorSync)(path) : null; + if (!Array.isArray(entries)) { + // this can only happen if lstat/readdir lied, or if the dir was + // swapped out with a file at just the right moment. + /* c8 ignore start */ + if (entries) { + if (entries.code === 'ENOENT') { + return true; + } + if (entries.code !== 'ENOTDIR') { + throw entries; + } + } + /* c8 ignore stop */ + if (opt.filter && !opt.filter(path, ent)) { + return false; + } + // is a file + (0, ignore_enoent_js_1.ignoreENOENTSync)(() => rimrafWindowsFileSync(path, opt)); + return true; + } + let removedAll = true; + for (const ent of entries) { + const s = state === START ? CHILD : state; + const p = (0, path_1.resolve)(path, ent.name); + removedAll = rimrafWindowsDirSync(p, opt, ent, s) && removedAll; + } + if (state === START) { + return rimrafWindowsDirSync(path, opt, ent, FINISH); + } + else if (state === FINISH) { + if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) { + return false; + } + if (!removedAll) { + return false; + } + if (opt.filter && !opt.filter(path, ent)) { + return false; + } + (0, ignore_enoent_js_1.ignoreENOENTSync)(() => { + rimrafWindowsDirMoveRemoveFallbackSync(path, opt); + }); + } + return true; +}; +//# sourceMappingURL=rimraf-windows.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/rimraf-windows.js.map b/node_modules/rimraf/dist/cjs/src/rimraf-windows.js.map new file mode 100644 index 0000000..31b1894 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/rimraf-windows.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-windows.js","sourceRoot":"","sources":["../../../src/rimraf-windows.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,wEAAwE;AACxE,gCAAgC;AAChC,0EAA0E;AAC1E,sBAAsB;AACtB,EAAE;AACF,yEAAy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UAAU,EAAE;YACf,OAAO,KAAK,CAAA;SACb;QACD,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;YACxC,OAAO,KAAK,CAAA;SACb;QACD,IAAA,mCAAgB,EAAC,GAAG,EAAE;YACpB,sCAAsC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QACnD,CAAC,CAAC,CAAA;KACH;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA","sourcesContent":["// This is the same as rimrafPosix, with the following changes:\n//\n// 1. EBUSY, ENFILE, EMFILE trigger retries and/or exponential backoff\n// 2. All non-directories are removed first and then all directories are\n// removed in a second sweep.\n// 3. If we hit ENOTEMPTY in the second sweep, fall back to move-remove on\n// the that folder.\n//\n// Note: \"move then remove\" is 2-10 times slower, and just as unreliable.\n\nimport { Dirent, Stats } from 'fs'\nimport { parse, resolve } from 'path'\nimport { RimrafAsyncOptions, RimrafSyncOptions } from '.'\nimport { fixEPERM, fixEPERMSync } from './fix-eperm.js'\nimport { lstatSync, promises, rmdirSync, unlinkSync } from './fs.js'\nimport { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js'\nimport { readdirOrError, readdirOrErrorSync } from './readdir-or-error.js'\nimport { retryBusy, retryBusySync } from './retry-busy.js'\nimport { rimrafMoveRemove, rimrafMoveRemoveSync } from './rimraf-move-remove.js'\nconst { unlink, rmdir, lstat } = promises\n\nconst rimrafWindowsFile = retryBusy(fixEPERM(unlink))\nconst rimrafWindowsFileSync = retryBusySync(fixEPERMSync(unlinkSync))\nconst rimrafWindowsDirRetry = retryBusy(fixEPERM(rmdir))\nconst rimrafWindowsDirRetrySync = retryBusySync(fixEPERMSync(rmdirSync))\n\nconst rimrafWindowsDirMoveRemoveFallback = async (\n path: string,\n opt: RimrafAsyncOptions\n): Promise => {\n /* c8 ignore start */\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n /* c8 ignore stop */\n // already filtered, remove from options so we don't call unnecessarily\n const { filter, ...options } = opt\n try {\n return await rimrafWindowsDirRetry(path, options)\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOTEMPTY') {\n return await rimrafMoveRemove(path, options)\n }\n throw er\n }\n}\n\nconst rimrafWindowsDirMoveRemoveFallbackSync = (\n path: string,\n opt: RimrafSyncOptions\n): boolean => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n // already filtered, remove from options so we don't call unnecessarily\n const { filter, ...options } = opt\n try {\n return rimrafWindowsDirRetrySync(path, options)\n } catch (er) {\n const fer = er as NodeJS.ErrnoException\n if (fer?.code === 'ENOTEMPTY') {\n return rimrafMoveRemoveSync(path, options)\n }\n throw er\n }\n}\n\nconst START = Symbol('start')\nconst CHILD = Symbol('child')\nconst FINISH = Symbol('finish')\n\nexport const rimrafWindows = async (path: string, opt: RimrafAsyncOptions) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return await rimrafWindowsDir(path, opt, await lstat(path), START)\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nexport const rimrafWindowsSync = (path: string, opt: RimrafSyncOptions) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return rimrafWindowsDirSync(path, opt, lstatSync(path), START)\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nconst rimrafWindowsDir = async (\n path: string,\n opt: RimrafAsyncOptions,\n ent: Dirent | Stats,\n state = START\n): Promise => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n\n const entries = ent.isDirectory() ? await readdirOrError(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n // is a file\n await ignoreENOENT(rimrafWindowsFile(path, opt))\n return true\n }\n\n const s = state === START ? CHILD : state\n const removedAll = (\n await Promise.all(\n entries.map(ent => rimrafWindowsDir(resolve(path, ent.name), opt, ent, s))\n )\n ).reduce((a, b) => a && b, true)\n\n if (state === START) {\n return rimrafWindowsDir(path, opt, ent, FINISH)\n } else if (state === FINISH) {\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n if (!removedAll) {\n return false\n }\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n await ignoreENOENT(rimrafWindowsDirMoveRemoveFallback(path, opt))\n }\n return true\n}\n\nconst rimrafWindowsDirSync = (\n path: string,\n opt: RimrafSyncOptions,\n ent: Dirent | Stats,\n state = START\n): boolean => {\n const entries = ent.isDirectory() ? readdirOrErrorSync(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n // is a file\n ignoreENOENTSync(() => rimrafWindowsFileSync(path, opt))\n return true\n }\n\n let removedAll = true\n for (const ent of entries) {\n const s = state === START ? CHILD : state\n const p = resolve(path, ent.name)\n removedAll = rimrafWindowsDirSync(p, opt, ent, s) && removedAll\n }\n\n if (state === START) {\n return rimrafWindowsDirSync(path, opt, ent, FINISH)\n } else if (state === FINISH) {\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n if (!removedAll) {\n return false\n }\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n ignoreENOENTSync(() => {\n rimrafWindowsDirMoveRemoveFallbackSync(path, opt)\n })\n }\n return true\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/use-native.d.ts b/node_modules/rimraf/dist/cjs/src/use-native.d.ts new file mode 100644 index 0000000..e191fd9 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/use-native.d.ts @@ -0,0 +1,4 @@ +import { RimrafAsyncOptions, RimrafOptions } from './index.js'; +export declare const useNative: (opt?: RimrafAsyncOptions) => boolean; +export declare const useNativeSync: (opt?: RimrafOptions) => boolean; +//# sourceMappingURL=use-native.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/use-native.d.ts.map b/node_modules/rimraf/dist/cjs/src/use-native.d.ts.map new file mode 100644 index 0000000..2ae57a4 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/use-native.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"use-native.d.ts","sourceRoot":"","sources":["../../../src/use-native.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAI9D,eAAO,MAAM,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,kBAAkB,KAAK,OAGb,CAAA;AACzC,eAAO,MAAM,aAAa,EAAE,CAAC,GAAG,CAAC,EAAE,aAAa,KAAK,OAGZ,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/use-native.js b/node_modules/rimraf/dist/cjs/src/use-native.js new file mode 100644 index 0000000..3d83c59 --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/use-native.js @@ -0,0 +1,19 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.useNativeSync = exports.useNative = void 0; +const version = process.env.__TESTING_RIMRAF_NODE_VERSION__ || process.version; +const versArr = version.replace(/^v/, '').split('.'); +const hasNative = +versArr[0] > 14 || (+versArr[0] === 14 && +versArr[1] >= 14); +// we do NOT use native by default on Windows, because Node's native +// rm implementation is less advanced. Change this code if that changes. +const platform_js_1 = __importDefault(require("./platform.js")); +exports.useNative = !hasNative || platform_js_1.default === 'win32' + ? () => false + : opt => !opt?.signal && !opt?.filter; +exports.useNativeSync = !hasNative || platform_js_1.default === 'win32' + ? () => false + : opt => !opt?.signal && !opt?.filter; +//# sourceMappingURL=use-native.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/cjs/src/use-native.js.map b/node_modules/rimraf/dist/cjs/src/use-native.js.map new file mode 100644 index 0000000..3e872bd --- /dev/null +++ b/node_modules/rimraf/dist/cjs/src/use-native.js.map @@ -0,0 +1 @@ +{"version":3,"file":"use-native.js","sourceRoot":"","sources":["../../../src/use-native.ts"],"names":[],"mappings":";;;;;;AAAA,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,+BAA+B,IAAI,OAAO,CAAC,OAAO,CAAA;AAC9E,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AACpD,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;AAE/E,oEAAoE;AACpE,yEAAyE;AACzE,gEAAoC;AACvB,QAAA,SAAS,GACpB,CAAC,SAAS,IAAI,qBAAQ,KAAK,OAAO;IAChC,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK;IACb,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,IAAI,CAAC,GAAG,EAAE,MAAM,CAAA;AAC5B,QAAA,aAAa,GACxB,CAAC,SAAS,IAAI,qBAAQ,KAAK,OAAO;IAChC,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK;IACb,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,IAAI,CAAC,GAAG,EAAE,MAAM,CAAA","sourcesContent":["const version = process.env.__TESTING_RIMRAF_NODE_VERSION__ || process.version\nconst versArr = version.replace(/^v/, '').split('.')\nconst hasNative = +versArr[0] > 14 || (+versArr[0] === 14 && +versArr[1] >= 14)\nimport { RimrafAsyncOptions, RimrafOptions } from './index.js'\n// we do NOT use native by default on Windows, because Node's native\n// rm implementation is less advanced. Change this code if that changes.\nimport platform from './platform.js'\nexport const useNative: (opt?: RimrafAsyncOptions) => boolean =\n !hasNative || platform === 'win32'\n ? () => false\n : opt => !opt?.signal && !opt?.filter\nexport const useNativeSync: (opt?: RimrafOptions) => boolean =\n !hasNative || platform === 'win32'\n ? () => false\n : opt => !opt?.signal && !opt?.filter\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/default-tmp.d.ts b/node_modules/rimraf/dist/mjs/default-tmp.d.ts new file mode 100644 index 0000000..a68e925 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/default-tmp.d.ts @@ -0,0 +1,3 @@ +export declare const defaultTmp: (path: string) => Promise; +export declare const defaultTmpSync: (path: string) => string; +//# sourceMappingURL=default-tmp.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/default-tmp.d.ts.map b/node_modules/rimraf/dist/mjs/default-tmp.d.ts.map new file mode 100644 index 0000000..d0b35f2 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/default-tmp.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"default-tmp.d.ts","sourceRoot":"","sources":["../../src/default-tmp.ts"],"names":[],"mappings":"AAiEA,eAAO,MAAM,UAAU,SAnCc,MAAM,oBAoCe,CAAA;AAC1D,eAAO,MAAM,cAAc,SArBQ,MAAM,WAsByB,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/default-tmp.js b/node_modules/rimraf/dist/mjs/default-tmp.js new file mode 100644 index 0000000..fb0846a --- /dev/null +++ b/node_modules/rimraf/dist/mjs/default-tmp.js @@ -0,0 +1,55 @@ +// The default temporary folder location for use in the windows algorithm. +// It's TEMPting to use dirname(path), since that's guaranteed to be on the +// same device. However, this means that: +// rimraf(path).then(() => rimraf(dirname(path))) +// will often fail with EBUSY, because the parent dir contains +// marked-for-deletion directory entries (which do not show up in readdir). +// The approach here is to use os.tmpdir() if it's on the same drive letter, +// or resolve(path, '\\temp') if it exists, or the root of the drive if not. +// On Posix (not that you'd be likely to use the windows algorithm there), +// it uses os.tmpdir() always. +import { tmpdir } from 'os'; +import { parse, resolve } from 'path'; +import { promises, statSync } from './fs.js'; +import platform from './platform.js'; +const { stat } = promises; +const isDirSync = (path) => { + try { + return statSync(path).isDirectory(); + } + catch (er) { + return false; + } +}; +const isDir = (path) => stat(path).then(st => st.isDirectory(), () => false); +const win32DefaultTmp = async (path) => { + const { root } = parse(path); + const tmp = tmpdir(); + const { root: tmpRoot } = parse(tmp); + if (root.toLowerCase() === tmpRoot.toLowerCase()) { + return tmp; + } + const driveTmp = resolve(root, '/temp'); + if (await isDir(driveTmp)) { + return driveTmp; + } + return root; +}; +const win32DefaultTmpSync = (path) => { + const { root } = parse(path); + const tmp = tmpdir(); + const { root: tmpRoot } = parse(tmp); + if (root.toLowerCase() === tmpRoot.toLowerCase()) { + return tmp; + } + const driveTmp = resolve(root, '/temp'); + if (isDirSync(driveTmp)) { + return driveTmp; + } + return root; +}; +const posixDefaultTmp = async () => tmpdir(); +const posixDefaultTmpSync = () => tmpdir(); +export const defaultTmp = platform === 'win32' ? win32DefaultTmp : posixDefaultTmp; +export const defaultTmpSync = platform === 'win32' ? win32DefaultTmpSync : posixDefaultTmpSync; +//# sourceMappingURL=default-tmp.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/default-tmp.js.map b/node_modules/rimraf/dist/mjs/default-tmp.js.map new file mode 100644 index 0000000..50bf5fc --- /dev/null +++ b/node_modules/rimraf/dist/mjs/default-tmp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"default-tmp.js","sourceRoot":"","sources":["../../src/default-tmp.ts"],"names":[],"mappings":"AAA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,QAAQ,CAAC,EAAE;QACzB,OAAO,QAAQ,CAAA;KAChB;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAE,EAAE;IAC3C,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA;IAC5B,MAAM,GAAG,GAAG,MAAM,EAAE,CAAA;IACpB,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA;IACpC,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,WAAW,EAAE,EAAE;QAChD,OAAO,GAAG,CAAA;KACX;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACvC,IAAI,SAAS,CAAC,QAAQ,CAAC,EAAE;QACvB,OAAO,QAAQ,CAAA;KAChB;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,eAAe,GAAG,KAAK,IAAI,EAAE,CAAC,MAAM,EAAE,CAAA;AAC5C,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,MAAM,EAAE,CAAA;AAE1C,MAAM,CAAC,MAAM,UAAU,GACrB,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,CAAA;AAC1D,MAAM,CAAC,MAAM,cAAc,GACzB,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,CAAA","sourcesContent":["// The default temporary folder location for use in the windows algorithm.\n// It's TEMPting to use dirname(path), since that's guaranteed to be on the\n// same device. However, this means that:\n// rimraf(path).then(() => rimraf(dirname(path)))\n// will often fail with EBUSY, because the parent dir contains\n// marked-for-deletion directory entries (which do not show up in readdir).\n// The approach here is to use os.tmpdir() if it's on the same drive letter,\n// or resolve(path, '\\\\temp') if it exists, or the root of the drive if not.\n// On Posix (not that you'd be likely to use the windows algorithm there),\n// it uses os.tmpdir() always.\nimport { tmpdir } from 'os'\nimport { parse, resolve } from 'path'\nimport { promises, statSync } from './fs.js'\nimport platform from './platform.js'\nconst { stat } = promises\n\nconst isDirSync = (path: string) => {\n try {\n return statSync(path).isDirectory()\n } catch (er) {\n return false\n }\n}\n\nconst isDir = (path: string) =>\n stat(path).then(\n st => st.isDirectory(),\n () => false\n )\n\nconst win32DefaultTmp = async (path: string) => {\n const { root } = parse(path)\n const tmp = tmpdir()\n const { root: tmpRoot } = parse(tmp)\n if (root.toLowerCase() === tmpRoot.toLowerCase()) {\n return tmp\n }\n\n const driveTmp = resolve(root, '/temp')\n if (await isDir(driveTmp)) {\n return driveTmp\n }\n\n return root\n}\n\nconst win32DefaultTmpSync = (path: string) => {\n const { root } = parse(path)\n const tmp = tmpdir()\n const { root: tmpRoot } = parse(tmp)\n if (root.toLowerCase() === tmpRoot.toLowerCase()) {\n return tmp\n }\n\n const driveTmp = resolve(root, '/temp')\n if (isDirSync(driveTmp)) {\n return driveTmp\n }\n\n return root\n}\n\nconst posixDefaultTmp = async () => tmpdir()\nconst posixDefaultTmpSync = () => tmpdir()\n\nexport const defaultTmp =\n platform === 'win32' ? win32DefaultTmp : posixDefaultTmp\nexport const defaultTmpSync =\n platform === 'win32' ? win32DefaultTmpSync : posixDefaultTmpSync\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/fix-eperm.d.ts b/node_modules/rimraf/dist/mjs/fix-eperm.d.ts new file mode 100644 index 0000000..20e76a8 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/fix-eperm.d.ts @@ -0,0 +1,3 @@ +export declare const fixEPERM: (fn: (path: string) => Promise) => (path: string) => Promise; +export declare const fixEPERMSync: (fn: (path: string) => any) => (path: string) => any; +//# sourceMappingURL=fix-eperm.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/fix-eperm.d.ts.map b/node_modules/rimraf/dist/mjs/fix-eperm.d.ts.map new file mode 100644 index 0000000..d402973 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/fix-eperm.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fix-eperm.d.ts","sourceRoot":"","sources":["../../src/fix-eperm.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,cACP,MAAM,KAAK,QAAQ,GAAG,CAAC,YAAkB,MAAM,iBAsB1D,CAAA;AAEH,eAAO,MAAM,YAAY,cAAe,MAAM,KAAK,GAAG,YAAY,MAAM,QAsBvE,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/fix-eperm.js b/node_modules/rimraf/dist/mjs/fix-eperm.js new file mode 100644 index 0000000..633c0e1 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/fix-eperm.js @@ -0,0 +1,53 @@ +import { chmodSync, promises } from './fs.js'; +const { chmod } = promises; +export const fixEPERM = (fn) => async (path) => { + try { + return await fn(path); + } + catch (er) { + const fer = er; + if (fer?.code === 'ENOENT') { + return; + } + if (fer?.code === 'EPERM') { + try { + await chmod(path, 0o666); + } + catch (er2) { + const fer2 = er2; + if (fer2?.code === 'ENOENT') { + return; + } + throw er; + } + return await fn(path); + } + throw er; + } +}; +export const fixEPERMSync = (fn) => (path) => { + try { + return fn(path); + } + catch (er) { + const fer = er; + if (fer?.code === 'ENOENT') { + return; + } + if (fer?.code === 'EPERM') { + try { + chmodSync(path, 0o666); + } + catch (er2) { + const fer2 = er2; + if (fer2?.code === 'ENOENT') { + return; + } + throw er; + } + return fn(path); + } + throw er; + } +}; +//# sourceMappingURL=fix-eperm.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/fix-eperm.js.map b/node_modules/rimraf/dist/mjs/fix-eperm.js.map new file mode 100644 index 0000000..75d838d --- /dev/null +++ b/node_modules/rimraf/dist/mjs/fix-eperm.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fix-eperm.js","sourceRoot":"","sources":["../../src/fix-eperm.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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AAI,IAAI,EAAE,IAAI,KAAK,QAAQ,EAAE;oBAC3B,OAAM;iBACP;gBACD,MAAM,EAAE,CAAA;aACT;YACD,OAAO,EAAE,CAAC,IAAI,CAAC,CAAA;SAChB;QACD,MAAM,EAAE,CAAA;KACT;AACH,CAAC,CAAA","sourcesContent":["import { chmodSync, promises } from './fs.js'\nconst { chmod } = promises\n\nexport const fixEPERM =\n (fn: (path: string) => Promise) => async (path: string) => {\n try {\n return await fn(path)\n } catch (er) {\n const fer = er as NodeJS.ErrnoException\n if (fer?.code === 'ENOENT') {\n return\n }\n if (fer?.code === 'EPERM') {\n try {\n await chmod(path, 0o666)\n } catch (er2) {\n const fer2 = er2 as NodeJS.ErrnoException\n if (fer2?.code === 'ENOENT') {\n return\n }\n throw er\n }\n return await fn(path)\n }\n throw er\n }\n }\n\nexport const fixEPERMSync = (fn: (path: string) => any) => (path: string) => {\n try {\n return fn(path)\n } catch (er) {\n const fer = er as NodeJS.ErrnoException\n if (fer?.code === 'ENOENT') {\n return\n }\n if (fer?.code === 'EPERM') {\n try {\n chmodSync(path, 0o666)\n } catch (er2) {\n const fer2 = er2 as NodeJS.ErrnoException\n if (fer2?.code === 'ENOENT') {\n return\n }\n throw er\n }\n return fn(path)\n }\n throw er\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/fs.d.ts b/node_modules/rimraf/dist/mjs/fs.d.ts new file mode 100644 index 0000000..9e4e95b --- /dev/null +++ b/node_modules/rimraf/dist/mjs/fs.d.ts @@ -0,0 +1,17 @@ +import fs, { Dirent } from 'fs'; +export { chmodSync, mkdirSync, renameSync, rmdirSync, rmSync, statSync, lstatSync, unlinkSync, } from 'fs'; +export declare const readdirSync: (path: fs.PathLike) => Dirent[]; +export declare const promises: { + chmod: (path: fs.PathLike, mode: fs.Mode) => Promise; + mkdir: (path: fs.PathLike, options?: fs.Mode | (fs.MakeDirectoryOptions & { + recursive?: boolean | null; + }) | undefined | null) => Promise; + readdir: (path: fs.PathLike) => Promise; + rename: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; + rm: (path: fs.PathLike, options: fs.RmOptions) => Promise; + rmdir: (path: fs.PathLike) => Promise; + stat: (path: fs.PathLike) => Promise; + lstat: (path: fs.PathLike) => Promise; + unlink: (path: fs.PathLike) => Promise; +}; +//# sourceMappingURL=fs.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/fs.d.ts.map b/node_modules/rimraf/dist/mjs/fs.d.ts.map new file mode 100644 index 0000000..da72b88 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/fs.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/fs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,IAAI,CAAA;AAG/B,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,GACX,MAAM,IAAI,CAAA;AAGX,eAAO,MAAM,WAAW,SAAU,GAAG,QAAQ,KAAG,MAAM,EACf,CAAA;AA6DvC,eAAO,MAAM,QAAQ;kBAtDA,GAAG,QAAQ,QAAQ,GAAG,IAAI,KAAG,QAAQ,IAAI,CAAC;kBAMvD,GAAG,QAAQ,YAEb,GAAG,IAAI,GACP,CAAC,GAAG,oBAAoB,GAAG;QAAE,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;KAAE,CAAC,GAC1D,SAAS,GACT,IAAI,KACP,QAAQ,MAAM,GAAG,SAAS,CAAC;oBAKP,GAAG,QAAQ,KAAG,QAAQ,MAAM,EAAE,CAAC;sBAO7B,GAAG,QAAQ,WAAW,GAAG,QAAQ,KAAG,QAAQ,IAAI,CAAC;eAKxD,GAAG,QAAQ,WAAW,GAAG,SAAS,KAAG,QAAQ,IAAI,CAAC;kBAK/C,GAAG,QAAQ,KAAG,QAAQ,IAAI,CAAC;iBAK5B,GAAG,QAAQ,KAAG,QAAQ,GAAG,KAAK,CAAC;kBAK9B,GAAG,QAAQ,KAAG,QAAQ,GAAG,KAAK,CAAC;mBAK9B,GAAG,QAAQ,KAAG,QAAQ,IAAI,CAAC;CAehD,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/fs.js b/node_modules/rimraf/dist/mjs/fs.js new file mode 100644 index 0000000..7df28cd --- /dev/null +++ b/node_modules/rimraf/dist/mjs/fs.js @@ -0,0 +1,31 @@ +// promisify ourselves, because older nodes don't have fs.promises +import fs from 'fs'; +// sync ones just take the sync version from node +export { chmodSync, mkdirSync, renameSync, rmdirSync, rmSync, statSync, lstatSync, unlinkSync, } from 'fs'; +import { readdirSync as rdSync } from 'fs'; +export const readdirSync = (path) => rdSync(path, { withFileTypes: true }); +// unrolled for better inlining, this seems to get better performance +// than something like: +// const makeCb = (res, rej) => (er, ...d) => er ? rej(er) : res(...d) +// which would be a bit cleaner. +const chmod = (path, mode) => new Promise((res, rej) => fs.chmod(path, mode, (er, ...d) => (er ? rej(er) : res(...d)))); +const mkdir = (path, options) => new Promise((res, rej) => fs.mkdir(path, options, (er, made) => (er ? rej(er) : res(made)))); +const readdir = (path) => new Promise((res, rej) => fs.readdir(path, { withFileTypes: true }, (er, data) => er ? rej(er) : res(data))); +const rename = (oldPath, newPath) => new Promise((res, rej) => fs.rename(oldPath, newPath, (er, ...d) => (er ? rej(er) : res(...d)))); +const rm = (path, options) => new Promise((res, rej) => fs.rm(path, options, (er, ...d) => (er ? rej(er) : res(...d)))); +const rmdir = (path) => new Promise((res, rej) => fs.rmdir(path, (er, ...d) => (er ? rej(er) : res(...d)))); +const stat = (path) => new Promise((res, rej) => fs.stat(path, (er, data) => (er ? rej(er) : res(data)))); +const lstat = (path) => new Promise((res, rej) => fs.lstat(path, (er, data) => (er ? rej(er) : res(data)))); +const unlink = (path) => new Promise((res, rej) => fs.unlink(path, (er, ...d) => (er ? rej(er) : res(...d)))); +export const promises = { + chmod, + mkdir, + readdir, + rename, + rm, + rmdir, + stat, + lstat, + unlink, +}; +//# sourceMappingURL=fs.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/fs.js.map b/node_modules/rimraf/dist/mjs/fs.js.map new file mode 100644 index 0000000..89504b4 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/fs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fs.js","sourceRoot":"","sources":["../../src/fs.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAElE,OAAO,EAAc,MAAM,IAAI,CAAA;AAE/B,iDAAiD;AACjD,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,GACX,MAAM,IAAI,CAAA;AAEX,OAAO,EAAE,WAAW,IAAI,MAAM,EAAE,MAAM,IAAI,CAAA;AAC1C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAiB,EAAY,EAAE,CACzD,MAAM,CAAC,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;AAEvC,qEAAqE;AACrE,uBAAuB;AACvB,sEAAsE;AACtE,gCAAgC;AAEhC,MAAM,KAAK,GAAG,CAAC,IAAiB,EAAE,IAAa,EAAiB,EAAE,CAChE,IAAI,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CACvB,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,GAAG,CAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACtE,CAAA;AAEH,MAAM,KAAK,GAAG,CACZ,IAAiB,EACjB,OAIQ,EACqB,EAAE,CAC/B,IAAI,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CACvB,EAAE,CAAC,KAAK,CAAC,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AC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACjE,CAAA;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,KAAK;IACL,KAAK;IACL,OAAO;IACP,MAAM;IACN,EAAE;IACF,KAAK;IACL,IAAI;IACJ,KAAK;IACL,MAAM;CACP,CAAA","sourcesContent":["// promisify ourselves, because older nodes don't have fs.promises\n\nimport fs, { Dirent } from 'fs'\n\n// sync ones just take the sync version from node\nexport {\n chmodSync,\n mkdirSync,\n renameSync,\n rmdirSync,\n rmSync,\n statSync,\n lstatSync,\n unlinkSync,\n} from 'fs'\n\nimport { readdirSync as rdSync } from 'fs'\nexport const readdirSync = (path: fs.PathLike): Dirent[] =>\n rdSync(path, { withFileTypes: true })\n\n// unrolled for better inlining, this seems to get better performance\n// than something like:\n// const makeCb = (res, rej) => (er, ...d) => er ? rej(er) : res(...d)\n// which would be a bit cleaner.\n\nconst chmod = (path: fs.PathLike, mode: fs.Mode): Promise =>\n new Promise((res, rej) =>\n fs.chmod(path, mode, (er, ...d: any[]) => (er ? rej(er) : res(...d)))\n )\n\nconst mkdir = (\n path: fs.PathLike,\n options?:\n | fs.Mode\n | (fs.MakeDirectoryOptions & { recursive?: boolean | null })\n | undefined\n | null\n): Promise =>\n new Promise((res, rej) =>\n fs.mkdir(path, options, (er, made) => (er ? rej(er) : res(made)))\n )\n\nconst readdir = (path: fs.PathLike): Promise =>\n new Promise((res, rej) =>\n fs.readdir(path, { withFileTypes: true }, (er, data) =>\n er ? rej(er) : res(data)\n )\n )\n\nconst rename = (oldPath: fs.PathLike, newPath: fs.PathLike): Promise =>\n new Promise((res, rej) =>\n fs.rename(oldPath, newPath, (er, ...d: any[]) => (er ? rej(er) : res(...d)))\n )\n\nconst rm = (path: fs.PathLike, options: fs.RmOptions): Promise =>\n new Promise((res, rej) =>\n fs.rm(path, options, (er, ...d: any[]) => (er ? rej(er) : res(...d)))\n )\n\nconst rmdir = (path: fs.PathLike): Promise =>\n new Promise((res, rej) =>\n fs.rmdir(path, (er, ...d: any[]) => (er ? rej(er) : res(...d)))\n )\n\nconst stat = (path: fs.PathLike): Promise =>\n new Promise((res, rej) =>\n fs.stat(path, (er, data) => (er ? rej(er) : res(data)))\n )\n\nconst lstat = (path: fs.PathLike): Promise =>\n new Promise((res, rej) =>\n fs.lstat(path, (er, data) => (er ? rej(er) : res(data)))\n )\n\nconst unlink = (path: fs.PathLike): Promise =>\n new Promise((res, rej) =>\n fs.unlink(path, (er, ...d: any[]) => (er ? rej(er) : res(...d)))\n )\n\nexport const promises = {\n chmod,\n mkdir,\n readdir,\n rename,\n rm,\n rmdir,\n stat,\n lstat,\n unlink,\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/ignore-enoent.d.ts b/node_modules/rimraf/dist/mjs/ignore-enoent.d.ts new file mode 100644 index 0000000..f158cc2 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/ignore-enoent.d.ts @@ -0,0 +1,3 @@ +export declare const ignoreENOENT: (p: Promise) => Promise; +export declare const ignoreENOENTSync: (fn: () => any) => any; +//# sourceMappingURL=ignore-enoent.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/ignore-enoent.d.ts.map b/node_modules/rimraf/dist/mjs/ignore-enoent.d.ts.map new file mode 100644 index 0000000..e3f6d4e --- /dev/null +++ b/node_modules/rimraf/dist/mjs/ignore-enoent.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ignore-enoent.d.ts","sourceRoot":"","sources":["../../src/ignore-enoent.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,MAAa,QAAQ,GAAG,CAAC,iBAK9C,CAAA;AAEJ,eAAO,MAAM,gBAAgB,OAAQ,MAAM,GAAG,QAQ7C,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/ignore-enoent.js b/node_modules/rimraf/dist/mjs/ignore-enoent.js new file mode 100644 index 0000000..753f481 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/ignore-enoent.js @@ -0,0 +1,16 @@ +export const ignoreENOENT = async (p) => p.catch(er => { + if (er.code !== 'ENOENT') { + throw er; + } +}); +export const ignoreENOENTSync = (fn) => { + try { + return fn(); + } + catch (er) { + if (er?.code !== 'ENOENT') { + throw er; + } + } +}; +//# sourceMappingURL=ignore-enoent.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/ignore-enoent.js.map b/node_modules/rimraf/dist/mjs/ignore-enoent.js.map new file mode 100644 index 0000000..469ccaf --- /dev/null +++ b/node_modules/rimraf/dist/mjs/ignore-enoent.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ignore-enoent.js","sourceRoot":"","sources":["../../src/ignore-enoent.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAAE,CAAe,EAAE,EAAE,CACpD,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE;IACX,IAAI,EAAE,CAAC,IAAI,KAAK,QAAQ,EAAE;QACxB,MAAM,EAAE,CAAA;KACT;AACH,CAAC,CAAC,CAAA;AAEJ,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAa,EAAE,EAAE;IAChD,IAAI;QACF,OAAO,EAAE,EAAE,CAAA;KACZ;IAAC,OAAO,EAAE,EAAE;QACX,IAAK,EAA4B,EAAE,IAAI,KAAK,QAAQ,EAAE;YACpD,MAAM,EAAE,CAAA;SACT;KACF;AACH,CAAC,CAAA","sourcesContent":["export const ignoreENOENT = async (p: Promise) =>\n p.catch(er => {\n if (er.code !== 'ENOENT') {\n throw er\n }\n })\n\nexport const ignoreENOENTSync = (fn: () => any) => {\n try {\n return fn()\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code !== 'ENOENT') {\n throw er\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/index.d.ts b/node_modules/rimraf/dist/mjs/index.d.ts new file mode 100644 index 0000000..2b659f2 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/index.d.ts @@ -0,0 +1,71 @@ +/// +import { GlobOptions } from 'glob'; +export interface RimrafAsyncOptions { + preserveRoot?: boolean; + tmp?: string; + maxRetries?: number; + retryDelay?: number; + backoff?: number; + maxBackoff?: number; + signal?: AbortSignal; + glob?: boolean | GlobOptions; + filter?: ((path: string, ent: Dirent | Stats) => boolean) | ((path: string, ent: Dirent | Stats) => Promise); +} +export interface RimrafSyncOptions extends RimrafAsyncOptions { + filter?: (path: string, ent: Dirent | Stats) => boolean; +} +export type RimrafOptions = RimrafSyncOptions | RimrafAsyncOptions; +export declare const isRimrafOptions: (o: any) => o is RimrafOptions; +export declare const assertRimrafOptions: (o: any) => void; +import { Dirent, Stats } from 'fs'; +export declare const nativeSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +export declare const native: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +}; +export declare const manualSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +export declare const manual: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +}; +export declare const windowsSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +export declare const windows: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +}; +export declare const posixSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +export declare const posix: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +}; +export declare const moveRemoveSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +export declare const moveRemove: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +}; +export declare const rimrafSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +export declare const sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +export declare const rimraf: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + rimraf: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + }; + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + rimrafSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + manual: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + }; + manualSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + native: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + }; + nativeSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + posix: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + }; + posixSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + windows: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + }; + windowsSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + moveRemove: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise) & { + sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; + }; + moveRemoveSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean; +}; +export default rimraf; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/index.d.ts.map b/node_modules/rimraf/dist/mjs/index.d.ts.map new file mode 100644 index 0000000..2463e9b --- /dev/null +++ b/node_modules/rimraf/dist/mjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAGA,OAAO,EAAQ,WAAW,EAAY,MAAM,MAAM,CAAA;AAElD,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,OAAO,CAAA;IAC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AAO;CAwD5D,CAAA;AAGD,eAAe,MAAM,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/index.js b/node_modules/rimraf/dist/mjs/index.js new file mode 100644 index 0000000..339b912 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/index.js @@ -0,0 +1,84 @@ +import { optArg, optArgSync } from './opt-arg.js'; +import pathArg from './path-arg.js'; +import { glob, globSync } from 'glob'; +const typeOrUndef = (val, t) => typeof val === 'undefined' || typeof val === t; +export const isRimrafOptions = (o) => !!o && + typeof o === 'object' && + typeOrUndef(o.preserveRoot, 'boolean') && + typeOrUndef(o.tmp, 'string') && + typeOrUndef(o.maxRetries, 'number') && + typeOrUndef(o.retryDelay, 'number') && + typeOrUndef(o.backoff, 'number') && + typeOrUndef(o.maxBackoff, 'number') && + (typeOrUndef(o.glob, 'boolean') || (o.glob && typeof o.glob === 'object')) && + typeOrUndef(o.filter, 'function'); +export const assertRimrafOptions = (o) => { + if (!isRimrafOptions(o)) { + throw new Error('invalid rimraf options'); + } +}; +import { rimrafManual, rimrafManualSync } from './rimraf-manual.js'; +import { rimrafMoveRemove, rimrafMoveRemoveSync } from './rimraf-move-remove.js'; +import { rimrafNative, rimrafNativeSync } from './rimraf-native.js'; +import { rimrafPosix, rimrafPosixSync } from './rimraf-posix.js'; +import { rimrafWindows, rimrafWindowsSync } from './rimraf-windows.js'; +import { useNative, useNativeSync } from './use-native.js'; +const wrap = (fn) => async (path, opt) => { + const options = optArg(opt); + if (options.glob) { + path = await glob(path, options.glob); + } + if (Array.isArray(path)) { + return !!(await Promise.all(path.map(p => fn(pathArg(p, options), options)))).reduce((a, b) => a && b, true); + } + else { + return !!(await fn(pathArg(path, options), options)); + } +}; +const wrapSync = (fn) => (path, opt) => { + const options = optArgSync(opt); + if (options.glob) { + path = globSync(path, options.glob); + } + if (Array.isArray(path)) { + return !!path + .map(p => fn(pathArg(p, options), options)) + .reduce((a, b) => a && b, true); + } + else { + return !!fn(pathArg(path, options), options); + } +}; +export const nativeSync = wrapSync(rimrafNativeSync); +export const native = Object.assign(wrap(rimrafNative), { sync: nativeSync }); +export const manualSync = wrapSync(rimrafManualSync); +export const manual = Object.assign(wrap(rimrafManual), { sync: manualSync }); +export const windowsSync = wrapSync(rimrafWindowsSync); +export const windows = Object.assign(wrap(rimrafWindows), { sync: windowsSync }); +export const posixSync = wrapSync(rimrafPosixSync); +export const posix = Object.assign(wrap(rimrafPosix), { sync: posixSync }); +export const moveRemoveSync = wrapSync(rimrafMoveRemoveSync); +export const moveRemove = Object.assign(wrap(rimrafMoveRemove), { + sync: moveRemoveSync, +}); +export const rimrafSync = wrapSync((path, opt) => useNativeSync(opt) ? rimrafNativeSync(path, opt) : rimrafManualSync(path, opt)); +export const sync = rimrafSync; +export const rimraf = Object.assign(wrap((path, opt) => useNative(opt) ? rimrafNative(path, opt) : rimrafManual(path, opt)), { + // this weirdness because it's easier than explicitly declaring + rimraf: manual, + sync: rimrafSync, + rimrafSync: rimrafSync, + manual, + manualSync, + native, + nativeSync, + posix, + posixSync, + windows, + windowsSync, + moveRemove, + moveRemoveSync, +}); +rimraf.rimraf = rimraf; +export default rimraf; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/index.js.map b/node_modules/rimraf/dist/mjs/index.js.map new file mode 100644 index 0000000..e5b6a8e --- /dev/null +++ b/node_modules/rimraf/dist/mjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,OAAO,MAAM,eAAe,CAAA;AAEnC,OAAO,EAAE,IAAI,EAAe,QAAQ,EAAE,MAAM,MAAM,CAAA;AAsBlD,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,CAAS,EAAE,EAAE,CAC1C,OAAO,GAAG,KAAK,WAAW,IAAI,OAAO,GAAG,KAAK,CAAC,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AE,cAAc;CACrB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAC/C,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,EAAE,GAAG,CAAC,CAC/E,CAAA;AACD,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAA;AAE9B,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CACjC,IAAI,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CACjB,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,CACnE,EACD;IACE,+DAA+D;IAC/D,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,UAAU;IAChB,UAAU,EAAE,UAAU;IACtB,MAAM;IACN,UAAU;IACV,MAAM;IACN,UAAU;IACV,KAAK;IACL,SAAS;IACT,OAAO;IACP,WAAW;IACX,UAAU;IACV,cAAc;CACf,CACF,CAAA;AACD,MAAM,CAAC,MAAM,GAAG,MAAM,CAAA;AAEtB,eAAe,MAAM,CAAA","sourcesContent":["import { optArg, optArgSync } from './opt-arg.js'\nimport pathArg from './path-arg.js'\n\nimport { glob, GlobOptions, globSync } from 'glob'\n\nexport interface RimrafAsyncOptions {\n preserveRoot?: boolean\n tmp?: string\n maxRetries?: number\n retryDelay?: number\n backoff?: number\n maxBackoff?: number\n signal?: AbortSignal\n glob?: boolean | GlobOptions\n filter?:\n | ((path: string, ent: Dirent | Stats) => boolean)\n | ((path: string, ent: Dirent | Stats) => Promise)\n}\n\nexport interface RimrafSyncOptions extends RimrafAsyncOptions {\n filter?: (path: string, ent: Dirent | Stats) => boolean\n}\n\nexport type RimrafOptions = RimrafSyncOptions | RimrafAsyncOptions\n\nconst typeOrUndef = (val: any, t: string) =>\n typeof val === 'undefined' || typeof val === t\n\nexport const isRimrafOptions = (o: any): o is RimrafOptions =>\n !!o &&\n typeof o === 'object' &&\n typeOrUndef(o.preserveRoot, 'boolean') &&\n typeOrUndef(o.tmp, 'string') &&\n typeOrUndef(o.maxRetries, 'number') &&\n typeOrUndef(o.retryDelay, 'number') &&\n typeOrUndef(o.backoff, 'number') &&\n typeOrUndef(o.maxBackoff, 'number') &&\n (typeOrUndef(o.glob, 'boolean') || (o.glob && typeof o.glob === 'object')) &&\n typeOrUndef(o.filter, 'function')\n\nexport const assertRimrafOptions: (o: any) => void = (\n o: any\n): asserts o is RimrafOptions => {\n if (!isRimrafOptions(o)) {\n throw new Error('invalid rimraf options')\n }\n}\n\nimport { Dirent, Stats } from 'fs'\nimport { rimrafManual, rimrafManualSync } from './rimraf-manual.js'\nimport { rimrafMoveRemove, rimrafMoveRemoveSync } from './rimraf-move-remove.js'\nimport { rimrafNative, rimrafNativeSync } from './rimraf-native.js'\nimport { rimrafPosix, rimrafPosixSync } from './rimraf-posix.js'\nimport { rimrafWindows, rimrafWindowsSync } from './rimraf-windows.js'\nimport { useNative, useNativeSync } from './use-native.js'\n\nconst wrap =\n (fn: (p: string, o: RimrafAsyncOptions) => Promise) =>\n async (\n path: string | string[],\n opt?: RimrafAsyncOptions\n ): Promise => {\n const options = optArg(opt)\n if (options.glob) {\n path = await glob(path, options.glob)\n }\n if (Array.isArray(path)) {\n return !!(\n await Promise.all(path.map(p => fn(pathArg(p, options), options)))\n ).reduce((a, b) => a && b, true)\n } else {\n return !!(await fn(pathArg(path, options), options))\n }\n }\n\nconst wrapSync =\n (fn: (p: string, o: RimrafSyncOptions) => boolean) =>\n (path: string | string[], opt?: RimrafSyncOptions): boolean => {\n const options = optArgSync(opt)\n if (options.glob) {\n path = globSync(path, options.glob)\n }\n if (Array.isArray(path)) {\n return !!path\n .map(p => fn(pathArg(p, options), options))\n .reduce((a, b) => a && b, true)\n } else {\n return !!fn(pathArg(path, options), options)\n }\n }\n\nexport const nativeSync = wrapSync(rimrafNativeSync)\nexport const native = Object.assign(wrap(rimrafNative), { sync: nativeSync })\n\nexport const manualSync = wrapSync(rimrafManualSync)\nexport const manual = Object.assign(wrap(rimrafManual), { sync: manualSync })\n\nexport const windowsSync = wrapSync(rimrafWindowsSync)\nexport const windows = Object.assign(wrap(rimrafWindows), { sync: windowsSync })\n\nexport const posixSync = wrapSync(rimrafPosixSync)\nexport const posix = Object.assign(wrap(rimrafPosix), { sync: posixSync })\n\nexport const moveRemoveSync = wrapSync(rimrafMoveRemoveSync)\nexport const moveRemove = Object.assign(wrap(rimrafMoveRemove), {\n sync: moveRemoveSync,\n})\n\nexport const rimrafSync = wrapSync((path, opt) =>\n useNativeSync(opt) ? rimrafNativeSync(path, opt) : rimrafManualSync(path, opt)\n)\nexport const sync = rimrafSync\n\nexport const rimraf = Object.assign(\n wrap((path, opt) =>\n useNative(opt) ? rimrafNative(path, opt) : rimrafManual(path, opt)\n ),\n {\n // this weirdness because it's easier than explicitly declaring\n rimraf: manual,\n sync: rimrafSync,\n rimrafSync: rimrafSync,\n manual,\n manualSync,\n native,\n nativeSync,\n posix,\n posixSync,\n windows,\n windowsSync,\n moveRemove,\n moveRemoveSync,\n }\n)\nrimraf.rimraf = rimraf\n\nexport default rimraf\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/opt-arg.d.ts b/node_modules/rimraf/dist/mjs/opt-arg.d.ts new file mode 100644 index 0000000..220b641 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/opt-arg.d.ts @@ -0,0 +1,17 @@ +import { GlobOptions } from 'glob'; +import { RimrafAsyncOptions, RimrafSyncOptions } from './index.js'; +export declare const optArg: (opt?: RimrafAsyncOptions) => (RimrafAsyncOptions & { + glob: GlobOptions & { + withFileTypes: false; + }; +}) | (RimrafAsyncOptions & { + glob: undefined; +}); +export declare const optArgSync: (opt?: RimrafSyncOptions) => (RimrafSyncOptions & { + glob: GlobOptions & { + withFileTypes: false; + }; +}) | (RimrafSyncOptions & { + glob: undefined; +}); +//# sourceMappingURL=opt-arg.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/opt-arg.d.ts.map b/node_modules/rimraf/dist/mjs/opt-arg.d.ts.map new file mode 100644 index 0000000..da4c98b --- /dev/null +++ b/node_modules/rimraf/dist/mjs/opt-arg.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"opt-arg.d.ts","sourceRoot":"","sources":["../../src/opt-arg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,EAEL,kBAAkB,EAElB,iBAAiB,EAClB,MAAM,YAAY,CAAA;AAqCnB,eAAO,MAAM,MAAM,SAAS,kBAAkB;UA/BlC,WAAW,GAAG;QAAE,aAAa,EAAE,KAAK,CAAA;KAAE;;UAEjC,SAAS;EA6B0C,CAAA;AACpE,eAAO,MAAM,UAAU,SAAS,iBAAiB;UAhCrC,WAAW,GAAG;QAAE,aAAa,EAAE,KAAK,CAAA;KAAE;;UAEjC,SAAS;EA8B6C,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/opt-arg.js b/node_modules/rimraf/dist/mjs/opt-arg.js new file mode 100644 index 0000000..1eb6312 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/opt-arg.js @@ -0,0 +1,31 @@ +import { assertRimrafOptions, } from './index.js'; +const optArgT = (opt) => { + assertRimrafOptions(opt); + const { glob, ...options } = opt; + if (!glob) { + return options; + } + const globOpt = glob === true + ? opt.signal + ? { signal: opt.signal } + : {} + : opt.signal + ? { + signal: opt.signal, + ...glob, + } + : glob; + return { + ...options, + glob: { + ...globOpt, + // always get absolute paths from glob, to ensure + // that we are referencing the correct thing. + absolute: true, + withFileTypes: false, + }, + }; +}; +export const optArg = (opt = {}) => optArgT(opt); +export const optArgSync = (opt = {}) => optArgT(opt); +//# sourceMappingURL=opt-arg.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/opt-arg.js.map b/node_modules/rimraf/dist/mjs/opt-arg.js.map new file mode 100644 index 0000000..910c201 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/opt-arg.js.map @@ -0,0 +1 @@ +{"version":3,"file":"opt-arg.js","sourceRoot":"","sources":["../../src/opt-arg.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,GAIpB,MAAM,YAAY,CAAA;AAEnB,MAAM,OAAO,GAAG,CACd,GAAM,EAKsB,EAAE;IAC9B,mBAAmB,CAAC,GAAG,CAAC,CAAA;IACxB,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,GAAG,GAAG,CAAA;IAChC,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,OAAkC,CAAA;KAC1C;IACD,MAAM,OAAO,GACX,IAAI,KAAK,IAAI;QACX,CAAC,CAAC,GAAG,CAAC,MAAM;YACV,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE;YACxB,CAAC,CAAC,EAAE;QACN,CAAC,CAAC,GAAG,CAAC,MAAM;YACZ,CAAC,CAAC;gBACE,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,GAAG,IAAI;aACR;YACH,CAAC,CAAC,IAAI,CAAA;IACV,OAAO;QACL,GAAG,OAAO;QACV,IAAI,EAAE;YACJ,GAAG,OAAO;YACV,iDAAiD;YACjD,6CAA6C;YAC7C,QAAQ,EAAE,IAAI;YACd,aAAa,EAAE,KAAK;SACrB;KACsD,CAAA;AAC3D,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,MAA0B,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;AACpE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAyB,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA","sourcesContent":["import { GlobOptions } from 'glob'\nimport {\n assertRimrafOptions,\n RimrafAsyncOptions,\n RimrafOptions,\n RimrafSyncOptions,\n} from './index.js'\n\nconst optArgT = (\n opt: T\n):\n | (T & {\n glob: GlobOptions & { withFileTypes: false }\n })\n | (T & { glob: undefined }) => {\n assertRimrafOptions(opt)\n const { glob, ...options } = opt\n if (!glob) {\n return options as T & { glob: undefined }\n }\n const globOpt =\n glob === true\n ? opt.signal\n ? { signal: opt.signal }\n : {}\n : opt.signal\n ? {\n signal: opt.signal,\n ...glob,\n }\n : glob\n return {\n ...options,\n glob: {\n ...globOpt,\n // always get absolute paths from glob, to ensure\n // that we are referencing the correct thing.\n absolute: true,\n withFileTypes: false,\n },\n } as T & { glob: GlobOptions & { withFileTypes: false } }\n}\n\nexport const optArg = (opt: RimrafAsyncOptions = {}) => optArgT(opt)\nexport const optArgSync = (opt: RimrafSyncOptions = {}) => optArgT(opt)\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/package.json b/node_modules/rimraf/dist/mjs/package.json new file mode 100644 index 0000000..106cd7f --- /dev/null +++ b/node_modules/rimraf/dist/mjs/package.json @@ -0,0 +1,4 @@ +{ + "version": "4.4.0", + "type": "module" +} diff --git a/node_modules/rimraf/dist/mjs/path-arg.d.ts b/node_modules/rimraf/dist/mjs/path-arg.d.ts new file mode 100644 index 0000000..c0b7e7c --- /dev/null +++ b/node_modules/rimraf/dist/mjs/path-arg.d.ts @@ -0,0 +1,4 @@ +import { RimrafAsyncOptions } from './index.js'; +declare const pathArg: (path: string, opt?: RimrafAsyncOptions) => string; +export default pathArg; +//# sourceMappingURL=path-arg.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/path-arg.d.ts.map b/node_modules/rimraf/dist/mjs/path-arg.d.ts.map new file mode 100644 index 0000000..86aaf3d --- /dev/null +++ b/node_modules/rimraf/dist/mjs/path-arg.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"path-arg.d.ts","sourceRoot":"","sources":["../../src/path-arg.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAG/C,QAAA,MAAM,OAAO,SAAU,MAAM,QAAO,kBAAkB,WAkDrD,CAAA;AAED,eAAe,OAAO,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/path-arg.js b/node_modules/rimraf/dist/mjs/path-arg.js new file mode 100644 index 0000000..a8da885 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/path-arg.js @@ -0,0 +1,49 @@ +import { parse, resolve } from 'path'; +import { inspect } from 'util'; +import platform from './platform.js'; +const pathArg = (path, opt = {}) => { + const type = typeof path; + if (type !== 'string') { + const ctor = path && type === 'object' && path.constructor; + const received = ctor && ctor.name + ? `an instance of ${ctor.name}` + : type === 'object' + ? inspect(path) + : `type ${type} ${path}`; + const msg = 'The "path" argument must be of type string. ' + `Received ${received}`; + throw Object.assign(new TypeError(msg), { + path, + code: 'ERR_INVALID_ARG_TYPE', + }); + } + if (/\0/.test(path)) { + // simulate same failure that node raises + const msg = 'path must be a string without null bytes'; + throw Object.assign(new TypeError(msg), { + path, + code: 'ERR_INVALID_ARG_VALUE', + }); + } + path = resolve(path); + const { root } = parse(path); + if (path === root && opt.preserveRoot !== false) { + const msg = 'refusing to remove root directory without preserveRoot:false'; + throw Object.assign(new Error(msg), { + path, + code: 'ERR_PRESERVE_ROOT', + }); + } + if (platform === 'win32') { + const badWinChars = /[*|"<>?:]/; + const { root } = parse(path); + if (badWinChars.test(path.substring(root.length))) { + throw Object.assign(new Error('Illegal characters in path.'), { + path, + code: 'EINVAL', + }); + } + } + return path; +}; +export default pathArg; +//# sourceMappingURL=path-arg.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/path-arg.js.map b/node_modules/rimraf/dist/mjs/path-arg.js.map new file mode 100644 index 0000000..3b0f3e6 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/path-arg.js.map @@ -0,0 +1 @@ +{"version":3,"file":"path-arg.js","sourceRoot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,KAAK,IAAI,IAAI,GAAG,CAAC,YAAY,KAAK,KAAK,EAAE;QAC/C,MAAM,GAAG,GAAG,8DAA8D,CAAA;QAC1E,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,EAAE;YAClC,IAAI;YACJ,IAAI,EAAE,mBAAmB;SAC1B,CAAC,CAAA;KACH;IAED,IAAI,QAAQ,KAAK,OAAO,EAAE;QACxB,MAAM,WAAW,GAAG,WAAW,CAAA;QAC/B,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA;QAC5B,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE;YACjD,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,6BAA6B,CAAC,EAAE;gBAC5D,IAAI;gBACJ,IAAI,EAAE,QAAQ;aACf,CAAC,CAAA;SACH;KACF;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,eAAe,OAAO,CAAA","sourcesContent":["import { parse, resolve } from 'path'\nimport { inspect } from 'util'\nimport { RimrafAsyncOptions } from './index.js'\nimport platform from './platform.js'\n\nconst pathArg = (path: string, opt: RimrafAsyncOptions = {}) => {\n const type = typeof path\n if (type !== 'string') {\n const ctor = path && type === 'object' && path.constructor\n const received =\n ctor && ctor.name\n ? `an instance of ${ctor.name}`\n : type === 'object'\n ? inspect(path)\n : `type ${type} ${path}`\n const msg =\n 'The \"path\" argument must be of type string. ' + `Received ${received}`\n throw Object.assign(new TypeError(msg), {\n path,\n code: 'ERR_INVALID_ARG_TYPE',\n })\n }\n\n if (/\\0/.test(path)) {\n // simulate same failure that node raises\n const msg = 'path must be a string without null bytes'\n throw Object.assign(new TypeError(msg), {\n path,\n code: 'ERR_INVALID_ARG_VALUE',\n })\n }\n\n path = resolve(path)\n const { root } = parse(path)\n\n if (path === root && opt.preserveRoot !== false) {\n const msg = 'refusing to remove root directory without preserveRoot:false'\n throw Object.assign(new Error(msg), {\n path,\n code: 'ERR_PRESERVE_ROOT',\n })\n }\n\n if (platform === 'win32') {\n const badWinChars = /[*|\"<>?:]/\n const { root } = parse(path)\n if (badWinChars.test(path.substring(root.length))) {\n throw Object.assign(new Error('Illegal characters in path.'), {\n path,\n code: 'EINVAL',\n })\n }\n }\n\n return path\n}\n\nexport default pathArg\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/platform.d.ts b/node_modules/rimraf/dist/mjs/platform.d.ts new file mode 100644 index 0000000..e127a8e --- /dev/null +++ b/node_modules/rimraf/dist/mjs/platform.d.ts @@ -0,0 +1,3 @@ +declare const _default: string; +export default _default; +//# sourceMappingURL=platform.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/platform.d.ts.map b/node_modules/rimraf/dist/mjs/platform.d.ts.map new file mode 100644 index 0000000..ef2e673 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/platform.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/platform.ts"],"names":[],"mappings":";AAAA,wBAA0E"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/platform.js b/node_modules/rimraf/dist/mjs/platform.js new file mode 100644 index 0000000..a264172 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/platform.js @@ -0,0 +1,2 @@ +export default process.env.__TESTING_RIMRAF_PLATFORM__ || process.platform; +//# sourceMappingURL=platform.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/platform.js.map b/node_modules/rimraf/dist/mjs/platform.js.map new file mode 100644 index 0000000..c5fdaf9 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/platform.js.map @@ -0,0 +1 @@ +{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/platform.ts"],"names":[],"mappings":"AAAA,eAAe,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,OAAO,CAAC,QAAQ,CAAA","sourcesContent":["export default process.env.__TESTING_RIMRAF_PLATFORM__ || process.platform\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/readdir-or-error.d.ts b/node_modules/rimraf/dist/mjs/readdir-or-error.d.ts new file mode 100644 index 0000000..8b7d6c9 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/readdir-or-error.d.ts @@ -0,0 +1,5 @@ +/// +/// +export declare const readdirOrError: (path: string) => Promise; +export declare const readdirOrErrorSync: (path: string) => import("fs").Dirent[] | NodeJS.ErrnoException; +//# sourceMappingURL=readdir-or-error.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/readdir-or-error.d.ts.map b/node_modules/rimraf/dist/mjs/readdir-or-error.d.ts.map new file mode 100644 index 0000000..d239053 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/readdir-or-error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"readdir-or-error.d.ts","sourceRoot":"","sources":["../../src/readdir-or-error.ts"],"names":[],"mappings":";;AAIA,eAAO,MAAM,cAAc,SAAU,MAAM,2DACa,CAAA;AACxD,eAAO,MAAM,kBAAkB,SAAU,MAAM,kDAM9C,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/readdir-or-error.js b/node_modules/rimraf/dist/mjs/readdir-or-error.js new file mode 100644 index 0000000..7123513 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/readdir-or-error.js @@ -0,0 +1,14 @@ +// returns an array of entries if readdir() works, +// or the error that readdir() raised if not. +import { promises, readdirSync } from './fs.js'; +const { readdir } = promises; +export const readdirOrError = (path) => readdir(path).catch(er => er); +export const readdirOrErrorSync = (path) => { + try { + return readdirSync(path); + } + catch (er) { + return er; + } +}; +//# sourceMappingURL=readdir-or-error.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/readdir-or-error.js.map b/node_modules/rimraf/dist/mjs/readdir-or-error.js.map new file mode 100644 index 0000000..9523487 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/readdir-or-error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"readdir-or-error.js","sourceRoot":"","sources":["../../src/readdir-or-error.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,6CAA6C;AAC7C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC/C,MAAM,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAA;AAC5B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE,CAC7C,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAA2B,CAAC,CAAA;AACxD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAE,EAAE;IACjD,IAAI;QACF,OAAO,WAAW,CAAC,IAAI,CAAC,CAAA;KACzB;IAAC,OAAO,EAAE,EAAE;QACX,OAAO,EAA2B,CAAA;KACnC;AACH,CAAC,CAAA","sourcesContent":["// returns an array of entries if readdir() works,\n// or the error that readdir() raised if not.\nimport { promises, readdirSync } from './fs.js'\nconst { readdir } = promises\nexport const readdirOrError = (path: string) =>\n readdir(path).catch(er => er as NodeJS.ErrnoException)\nexport const readdirOrErrorSync = (path: string) => {\n try {\n return readdirSync(path)\n } catch (er) {\n return er as NodeJS.ErrnoException\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/retry-busy.d.ts b/node_modules/rimraf/dist/mjs/retry-busy.d.ts new file mode 100644 index 0000000..8df88e9 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/retry-busy.d.ts @@ -0,0 +1,8 @@ +import { RimrafAsyncOptions, RimrafOptions } from '.'; +export declare const MAXBACKOFF = 200; +export declare const RATE = 1.2; +export declare const MAXRETRIES = 10; +export declare const codes: Set; +export declare const retryBusy: (fn: (path: string) => Promise) => (path: string, opt: RimrafAsyncOptions, backoff?: number, total?: number) => Promise; +export declare const retryBusySync: (fn: (path: string) => any) => (path: string, opt: RimrafOptions) => any; +//# sourceMappingURL=retry-busy.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/retry-busy.d.ts.map b/node_modules/rimraf/dist/mjs/retry-busy.d.ts.map new file mode 100644 index 0000000..bf974f6 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/retry-busy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"retry-busy.d.ts","sourceRoot":"","sources":["../../src/retry-busy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,GAAG,CAAA;AAErD,eAAO,MAAM,UAAU,MAAM,CAAA;AAC7B,eAAO,MAAM,IAAI,MAAM,CAAA;AACvB,eAAO,MAAM,UAAU,KAAK,CAAA;AAC5B,eAAO,MAAM,KAAK,aAAyC,CAAA;AAE3D,eAAO,MAAM,SAAS,cAAe,MAAM,KAAK,QAAQ,GAAG,CAAC,YAElD,MAAM,OACP,kBAAkB,mDAkC1B,CAAA;AAGD,eAAO,MAAM,aAAa,cAAe,MAAM,KAAK,GAAG,YAC/B,MAAM,OAAO,aAAa,QAsBjD,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/retry-busy.js b/node_modules/rimraf/dist/mjs/retry-busy.js new file mode 100644 index 0000000..17e336a --- /dev/null +++ b/node_modules/rimraf/dist/mjs/retry-busy.js @@ -0,0 +1,63 @@ +// note: max backoff is the maximum that any *single* backoff will do +export const MAXBACKOFF = 200; +export const RATE = 1.2; +export const MAXRETRIES = 10; +export const codes = new Set(['EMFILE', 'ENFILE', 'EBUSY']); +export const retryBusy = (fn) => { + const method = async (path, opt, backoff = 1, total = 0) => { + const mbo = opt.maxBackoff || MAXBACKOFF; + const rate = opt.backoff || RATE; + const max = opt.maxRetries || MAXRETRIES; + let retries = 0; + while (true) { + try { + return await fn(path); + } + catch (er) { + const fer = er; + if (fer?.path === path && fer?.code && codes.has(fer.code)) { + backoff = Math.ceil(backoff * rate); + total = backoff + total; + if (total < mbo) { + return new Promise((res, rej) => { + setTimeout(() => { + method(path, opt, backoff, total).then(res, rej); + }, backoff); + }); + } + if (retries < max) { + retries++; + continue; + } + } + throw er; + } + } + }; + return method; +}; +// just retries, no async so no backoff +export const retryBusySync = (fn) => { + const method = (path, opt) => { + const max = opt.maxRetries || MAXRETRIES; + let retries = 0; + while (true) { + try { + return fn(path); + } + catch (er) { + const fer = er; + if (fer?.path === path && + fer?.code && + codes.has(fer.code) && + retries < max) { + retries++; + continue; + } + throw er; + } + } + }; + return method; +}; +//# sourceMappingURL=retry-busy.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/retry-busy.js.map b/node_modules/rimraf/dist/mjs/retry-busy.js.map new file mode 100644 index 0000000..ead22bc --- /dev/null +++ b/node_modules/rimraf/dist/mjs/retry-busy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"retry-busy.js","sourceRoot":"","sources":["../../src/retry-busy.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAIrE,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;AAC7B,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAA;AACvB,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAA;AAC5B,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAA;AAE3D,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAkC,EAAE,EAAE;IAC9D,MAAM,MAAM,GAAG,KAAK,EAClB,IAAY,EACZ,GAAuB,EACvB,OAAO,GAAG,CAAC,EACX,KAAK,GAAG,CAAC,EACT,EAAE;QACF,MAAM,GAAG,GAAG,GAAG,CAAC,UAAU,IAAI,UAAU,CAAA;QACxC,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,IAAI,IAAI,CAAA;QAChC,MAAM,GAAG,GAAG,GAAG,CAAC,UAAU,IAAI,UAAU,CAAA;QACxC,IAAI,OAAO,GAA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AE,EAAE;gBACX,MAAM,GAAG,GAAG,EAA2B,CAAA;gBACvC,IACE,GAAG,EAAE,IAAI,KAAK,IAAI;oBAClB,GAAG,EAAE,IAAI;oBACT,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;oBACnB,OAAO,GAAG,GAAG,EACb;oBACA,OAAO,EAAE,CAAA;oBACT,SAAQ;iBACT;gBACD,MAAM,EAAE,CAAA;aACT;SACF;IACH,CAAC,CAAA;IACD,OAAO,MAAM,CAAA;AACf,CAAC,CAAA","sourcesContent":["// note: max backoff is the maximum that any *single* backoff will do\n\nimport { RimrafAsyncOptions, RimrafOptions } from '.'\n\nexport const MAXBACKOFF = 200\nexport const RATE = 1.2\nexport const MAXRETRIES = 10\nexport const codes = new Set(['EMFILE', 'ENFILE', 'EBUSY'])\n\nexport const retryBusy = (fn: (path: string) => Promise) => {\n const method = async (\n path: string,\n opt: RimrafAsyncOptions,\n backoff = 1,\n total = 0\n ) => {\n const mbo = opt.maxBackoff || MAXBACKOFF\n const rate = opt.backoff || RATE\n const max = opt.maxRetries || MAXRETRIES\n let retries = 0\n while (true) {\n try {\n return await fn(path)\n } catch (er) {\n const fer = er as NodeJS.ErrnoException\n if (fer?.path === path && fer?.code && codes.has(fer.code)) {\n backoff = Math.ceil(backoff * rate)\n total = backoff + total\n if (total < mbo) {\n return new Promise((res, rej) => {\n setTimeout(() => {\n method(path, opt, backoff, total).then(res, rej)\n }, backoff)\n })\n }\n if (retries < max) {\n retries++\n continue\n }\n }\n throw er\n }\n }\n }\n\n return method\n}\n\n// just retries, no async so no backoff\nexport const retryBusySync = (fn: (path: string) => any) => {\n const method = (path: string, opt: RimrafOptions) => {\n const max = opt.maxRetries || MAXRETRIES\n let retries = 0\n while (true) {\n try {\n return fn(path)\n } catch (er) {\n const fer = er as NodeJS.ErrnoException\n if (\n fer?.path === path &&\n fer?.code &&\n codes.has(fer.code) &&\n retries < max\n ) {\n retries++\n continue\n }\n throw er\n }\n }\n }\n return method\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-manual.d.ts b/node_modules/rimraf/dist/mjs/rimraf-manual.d.ts new file mode 100644 index 0000000..5b14343 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-manual.d.ts @@ -0,0 +1,3 @@ +export declare const rimrafManual: (path: string, opt: import("./index.js").RimrafAsyncOptions) => Promise; +export declare const rimrafManualSync: (path: string, opt: import("./index.js").RimrafSyncOptions) => boolean; +//# sourceMappingURL=rimraf-manual.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-manual.d.ts.map b/node_modules/rimraf/dist/mjs/rimraf-manual.d.ts.map new file mode 100644 index 0000000..2a502fa --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-manual.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-manual.d.ts","sourceRoot":"","sources":["../../src/rimraf-manual.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,kFAAqD,CAAA;AAC9E,eAAO,MAAM,gBAAgB,wEAC+B,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-manual.js b/node_modules/rimraf/dist/mjs/rimraf-manual.js new file mode 100644 index 0000000..132708f --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-manual.js @@ -0,0 +1,6 @@ +import platform from './platform.js'; +import { rimrafPosix, rimrafPosixSync } from './rimraf-posix.js'; +import { rimrafWindows, rimrafWindowsSync } from './rimraf-windows.js'; +export const rimrafManual = platform === 'win32' ? rimrafWindows : rimrafPosix; +export const rimrafManualSync = platform === 'win32' ? rimrafWindowsSync : rimrafPosixSync; +//# sourceMappingURL=rimraf-manual.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-manual.js.map b/node_modules/rimraf/dist/mjs/rimraf-manual.js.map new file mode 100644 index 0000000..212c815 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-manual.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-manual.js","sourceRoot":"","sources":["../../src/rimraf-manual.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAA;AAEpC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAChE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEtE,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAA;AAC9E,MAAM,CAAC,MAAM,gBAAgB,GAC3B,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,eAAe,CAAA","sourcesContent":["import platform from './platform.js'\n\nimport { rimrafPosix, rimrafPosixSync } from './rimraf-posix.js'\nimport { rimrafWindows, rimrafWindowsSync } from './rimraf-windows.js'\n\nexport const rimrafManual = platform === 'win32' ? rimrafWindows : rimrafPosix\nexport const rimrafManualSync =\n platform === 'win32' ? rimrafWindowsSync : rimrafPosixSync\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-move-remove.d.ts b/node_modules/rimraf/dist/mjs/rimraf-move-remove.d.ts new file mode 100644 index 0000000..da5b6b6 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-move-remove.d.ts @@ -0,0 +1,4 @@ +import { RimrafAsyncOptions, RimrafSyncOptions } from '.'; +export declare const rimrafMoveRemove: (path: string, opt: RimrafAsyncOptions) => Promise; +export declare const rimrafMoveRemoveSync: (path: string, opt: RimrafSyncOptions) => boolean; +//# sourceMappingURL=rimraf-move-remove.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-move-remove.d.ts.map b/node_modules/rimraf/dist/mjs/rimraf-move-remove.d.ts.map new file mode 100644 index 0000000..1c64ddf --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-move-remove.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-move-remove.d.ts","sourceRoot":"","sources":["../../src/rimraf-move-remove.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAA;AA4CzD,eAAO,MAAM,gBAAgB,SACrB,MAAM,OACP,kBAAkB,qBAWxB,CAAA;AA0ED,eAAO,MAAM,oBAAoB,SAAU,MAAM,OAAO,iBAAiB,YAUxE,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-move-remove.js b/node_modules/rimraf/dist/mjs/rimraf-move-remove.js new file mode 100644 index 0000000..093e40f --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-move-remove.js @@ -0,0 +1,187 @@ +// https://youtu.be/uhRWMGBjlO8?t=537 +// +// 1. readdir +// 2. for each entry +// a. if a non-empty directory, recurse +// b. if an empty directory, move to random hidden file name in $TEMP +// c. unlink/rmdir $TEMP +// +// This works around the fact that unlink/rmdir is non-atomic and takes +// a non-deterministic amount of time to complete. +// +// However, it is HELLA SLOW, like 2-10x slower than a naive recursive rm. +import { basename, parse, resolve } from 'path'; +import { defaultTmp, defaultTmpSync } from './default-tmp.js'; +import { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js'; +import { chmodSync, lstatSync, promises as fsPromises, renameSync, rmdirSync, unlinkSync, } from './fs.js'; +const { lstat, rename, unlink, rmdir, chmod } = fsPromises; +import { readdirOrError, readdirOrErrorSync } from './readdir-or-error.js'; +// crypto.randomBytes is much slower, and Math.random() is enough here +const uniqueFilename = (path) => `.${basename(path)}.${Math.random()}`; +const unlinkFixEPERM = async (path) => unlink(path).catch((er) => { + if (er.code === 'EPERM') { + return chmod(path, 0o666).then(() => unlink(path), er2 => { + if (er2.code === 'ENOENT') { + return; + } + throw er; + }); + } + else if (er.code === 'ENOENT') { + return; + } + throw er; +}); +const unlinkFixEPERMSync = (path) => { + try { + unlinkSync(path); + } + catch (er) { + if (er?.code === 'EPERM') { + try { + return chmodSync(path, 0o666); + } + catch (er2) { + if (er2?.code === 'ENOENT') { + return; + } + throw er; + } + } + else if (er?.code === 'ENOENT') { + return; + } + throw er; + } +}; +export const rimrafMoveRemove = async (path, opt) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + try { + return await rimrafMoveRemoveDir(path, opt, await lstat(path)); + } + catch (er) { + if (er?.code === 'ENOENT') + return true; + throw er; + } +}; +const rimrafMoveRemoveDir = async (path, opt, ent) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + if (!opt.tmp) { + return rimrafMoveRemoveDir(path, { ...opt, tmp: await defaultTmp(path) }, ent); + } + if (path === opt.tmp && parse(path).root !== path) { + throw new Error('cannot delete temp directory used for deletion'); + } + const entries = ent.isDirectory() ? await readdirOrError(path) : null; + if (!Array.isArray(entries)) { + // this can only happen if lstat/readdir lied, or if the dir was + // swapped out with a file at just the right moment. + /* c8 ignore start */ + if (entries) { + if (entries.code === 'ENOENT') { + return true; + } + if (entries.code !== 'ENOTDIR') { + throw entries; + } + } + /* c8 ignore stop */ + if (opt.filter && !(await opt.filter(path, ent))) { + return false; + } + await ignoreENOENT(tmpUnlink(path, opt.tmp, unlinkFixEPERM)); + return true; + } + const removedAll = (await Promise.all(entries.map(ent => rimrafMoveRemoveDir(resolve(path, ent.name), opt, ent)))).reduce((a, b) => a && b, true); + if (!removedAll) { + return false; + } + // we don't ever ACTUALLY try to unlink /, because that can never work + // but when preserveRoot is false, we could be operating on it. + // No need to check if preserveRoot is not false. + if (opt.preserveRoot === false && path === parse(path).root) { + return false; + } + if (opt.filter && !(await opt.filter(path, ent))) { + return false; + } + await ignoreENOENT(tmpUnlink(path, opt.tmp, rmdir)); + return true; +}; +const tmpUnlink = async (path, tmp, rm) => { + const tmpFile = resolve(tmp, uniqueFilename(path)); + await rename(path, tmpFile); + return await rm(tmpFile); +}; +export const rimrafMoveRemoveSync = (path, opt) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + try { + return rimrafMoveRemoveDirSync(path, opt, lstatSync(path)); + } + catch (er) { + if (er?.code === 'ENOENT') + return true; + throw er; + } +}; +const rimrafMoveRemoveDirSync = (path, opt, ent) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + if (!opt.tmp) { + return rimrafMoveRemoveDirSync(path, { ...opt, tmp: defaultTmpSync(path) }, ent); + } + const tmp = opt.tmp; + if (path === opt.tmp && parse(path).root !== path) { + throw new Error('cannot delete temp directory used for deletion'); + } + const entries = ent.isDirectory() ? readdirOrErrorSync(path) : null; + if (!Array.isArray(entries)) { + // this can only happen if lstat/readdir lied, or if the dir was + // swapped out with a file at just the right moment. + /* c8 ignore start */ + if (entries) { + if (entries.code === 'ENOENT') { + return true; + } + if (entries.code !== 'ENOTDIR') { + throw entries; + } + } + /* c8 ignore stop */ + if (opt.filter && !opt.filter(path, ent)) { + return false; + } + ignoreENOENTSync(() => tmpUnlinkSync(path, tmp, unlinkFixEPERMSync)); + return true; + } + let removedAll = true; + for (const ent of entries) { + const p = resolve(path, ent.name); + removedAll = rimrafMoveRemoveDirSync(p, opt, ent) && removedAll; + } + if (!removedAll) { + return false; + } + if (opt.preserveRoot === false && path === parse(path).root) { + return false; + } + if (opt.filter && !opt.filter(path, ent)) { + return false; + } + ignoreENOENTSync(() => tmpUnlinkSync(path, tmp, rmdirSync)); + return true; +}; +const tmpUnlinkSync = (path, tmp, rmSync) => { + const tmpFile = resolve(tmp, uniqueFilename(path)); + renameSync(path, tmpFile); + return rmSync(tmpFile); +}; +//# sourceMappingURL=rimraf-move-remove.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-move-remove.js.map b/node_modules/rimraf/dist/mjs/rimraf-move-remove.js.map new file mode 100644 index 0000000..f017a06 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-move-remove.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-move-remove.js","sourceRoot":"","sources":["../../src/rimraf-move-remove.ts"],"names":[],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CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,kBAAkB,CAAC,CAAC,CAAA;QACpE,OAAO,IAAI,CAAA;KACZ;IAED,IAAI,UAAU,GAAG,IAAI,CAAA;IACrB,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;QACzB,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;QACjC,UAAU,GAAG,uBAAuB,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,UAAU,CAAA;KAChE;IACD,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,KAAK,CAAA;KACb;IACD,IAAI,GAAG,CAAC,YAAY,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE;QAC3D,OAAO,KAAK,CAAA;KACb;IACD,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;QACxC,OAAO,KAAK,CAAA;KACb;IACD,gBAAgB,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC,CAAA;IAC3D,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,aAAa,GAAG,CACpB,IAAY,EACZ,GAAW,EACX,MAA2B,EAC3B,EAAE;IACF,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC,CAAA;IAClD,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACzB,OAAO,MAAM,CAAC,OAAO,CAAC,CAAA;AACxB,CAAC,CAAA","sourcesContent":["// https://youtu.be/uhRWMGBjlO8?t=537\n//\n// 1. readdir\n// 2. for each entry\n// a. if a non-empty directory, recurse\n// b. if an empty directory, move to random hidden file name in $TEMP\n// c. unlink/rmdir $TEMP\n//\n// This works around the fact that unlink/rmdir is non-atomic and takes\n// a non-deterministic amount of time to complete.\n//\n// However, it is HELLA SLOW, like 2-10x slower than a naive recursive rm.\n\nimport { basename, parse, resolve } from 'path'\nimport { defaultTmp, defaultTmpSync } from './default-tmp.js'\n\nimport { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js'\n\nimport {\n chmodSync,\n lstatSync,\n promises as fsPromises,\n renameSync,\n rmdirSync,\n unlinkSync,\n} from './fs.js'\nconst { lstat, rename, unlink, rmdir, chmod } = fsPromises\n\nimport { Dirent, Stats } from 'fs'\nimport { RimrafAsyncOptions, RimrafSyncOptions } from '.'\nimport { readdirOrError, readdirOrErrorSync } from './readdir-or-error.js'\n\n// crypto.randomBytes is much slower, and Math.random() is enough here\nconst uniqueFilename = (path: string) => `.${basename(path)}.${Math.random()}`\n\nconst unlinkFixEPERM = async (path: string) =>\n unlink(path).catch((er: Error & { code?: string }) => {\n if (er.code === 'EPERM') {\n return chmod(path, 0o666).then(\n () => unlink(path),\n er2 => {\n if (er2.code === 'ENOENT') {\n return\n }\n throw er\n }\n )\n } else if (er.code === 'ENOENT') {\n return\n }\n throw er\n })\n\nconst unlinkFixEPERMSync = (path: string) => {\n try {\n unlinkSync(path)\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'EPERM') {\n try {\n return chmodSync(path, 0o666)\n } catch (er2) {\n if ((er2 as NodeJS.ErrnoException)?.code === 'ENOENT') {\n return\n }\n throw er\n }\n } else if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') {\n return\n }\n throw er\n }\n}\n\nexport const rimrafMoveRemove = async (\n path: string,\n opt: RimrafAsyncOptions\n) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return await rimrafMoveRemoveDir(path, opt, await lstat(path))\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nconst rimrafMoveRemoveDir = async (\n path: string,\n opt: RimrafAsyncOptions,\n ent: Dirent | Stats\n): Promise => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n if (!opt.tmp) {\n return rimrafMoveRemoveDir(\n path,\n { ...opt, tmp: await defaultTmp(path) },\n ent\n )\n }\n if (path === opt.tmp && parse(path).root !== path) {\n throw new Error('cannot delete temp directory used for deletion')\n }\n\n const entries = ent.isDirectory() ? await readdirOrError(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n await ignoreENOENT(tmpUnlink(path, opt.tmp, unlinkFixEPERM))\n return true\n }\n\n const removedAll = (\n await Promise.all(\n entries.map(ent => rimrafMoveRemoveDir(resolve(path, ent.name), opt, ent))\n )\n ).reduce((a, b) => a && b, true)\n if (!removedAll) {\n return false\n }\n\n // we don't ever ACTUALLY try to unlink /, because that can never work\n // but when preserveRoot is false, we could be operating on it.\n // No need to check if preserveRoot is not false.\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n await ignoreENOENT(tmpUnlink(path, opt.tmp, rmdir))\n return true\n}\n\nconst tmpUnlink = async (\n path: string,\n tmp: string,\n rm: (p: string) => Promise\n) => {\n const tmpFile = resolve(tmp, uniqueFilename(path))\n await rename(path, tmpFile)\n return await rm(tmpFile)\n}\n\nexport const rimrafMoveRemoveSync = (path: string, opt: RimrafSyncOptions) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return rimrafMoveRemoveDirSync(path, opt, lstatSync(path))\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nconst rimrafMoveRemoveDirSync = (\n path: string,\n opt: RimrafSyncOptions,\n ent: Dirent | Stats\n): boolean => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n if (!opt.tmp) {\n return rimrafMoveRemoveDirSync(\n path,\n { ...opt, tmp: defaultTmpSync(path) },\n ent\n )\n }\n const tmp: string = opt.tmp\n\n if (path === opt.tmp && parse(path).root !== path) {\n throw new Error('cannot delete temp directory used for deletion')\n }\n\n const entries = ent.isDirectory() ? readdirOrErrorSync(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n ignoreENOENTSync(() => tmpUnlinkSync(path, tmp, unlinkFixEPERMSync))\n return true\n }\n\n let removedAll = true\n for (const ent of entries) {\n const p = resolve(path, ent.name)\n removedAll = rimrafMoveRemoveDirSync(p, opt, ent) && removedAll\n }\n if (!removedAll) {\n return false\n }\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n ignoreENOENTSync(() => tmpUnlinkSync(path, tmp, rmdirSync))\n return true\n}\n\nconst tmpUnlinkSync = (\n path: string,\n tmp: string,\n rmSync: (p: string) => void\n) => {\n const tmpFile = resolve(tmp, uniqueFilename(path))\n renameSync(path, tmpFile)\n return rmSync(tmpFile)\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-native.d.ts b/node_modules/rimraf/dist/mjs/rimraf-native.d.ts new file mode 100644 index 0000000..9c08af0 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-native.d.ts @@ -0,0 +1,4 @@ +import { RimrafAsyncOptions, RimrafSyncOptions } from '.'; +export declare const rimrafNative: (path: string, opt: RimrafAsyncOptions) => Promise; +export declare const rimrafNativeSync: (path: string, opt: RimrafSyncOptions) => boolean; +//# sourceMappingURL=rimraf-native.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-native.d.ts.map b/node_modules/rimraf/dist/mjs/rimraf-native.d.ts.map new file mode 100644 index 0000000..9c25681 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-native.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-native.d.ts","sourceRoot":"","sources":["../../src/rimraf-native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAA;AAIzD,eAAO,MAAM,YAAY,SACjB,MAAM,OACP,kBAAkB,KACtB,QAAQ,OAAO,CAOjB,CAAA;AAED,eAAO,MAAM,gBAAgB,SACrB,MAAM,OACP,iBAAiB,KACrB,OAOF,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-native.js b/node_modules/rimraf/dist/mjs/rimraf-native.js new file mode 100644 index 0000000..719161f --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-native.js @@ -0,0 +1,19 @@ +import { promises, rmSync } from './fs.js'; +const { rm } = promises; +export const rimrafNative = async (path, opt) => { + await rm(path, { + ...opt, + force: true, + recursive: true, + }); + return true; +}; +export const rimrafNativeSync = (path, opt) => { + rmSync(path, { + ...opt, + force: true, + recursive: true, + }); + return true; +}; +//# sourceMappingURL=rimraf-native.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-native.js.map b/node_modules/rimraf/dist/mjs/rimraf-native.js.map new file mode 100644 index 0000000..88eda68 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-native.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-native.js","sourceRoot":"","sources":["../../src/rimraf-native.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAC1C,MAAM,EAAE,EAAE,EAAE,GAAG,QAAQ,CAAA;AAEvB,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,IAAY,EACZ,GAAuB,EACL,EAAE;IACpB,MAAM,EAAE,CAAC,IAAI,EAAE;QACb,GAAG,GAAG;QACN,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;KAChB,CAAC,CAAA;IACF,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,IAAY,EACZ,GAAsB,EACb,EAAE;IACX,MAAM,CAAC,IAAI,EAAE;QACX,GAAG,GAAG;QACN,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;KAChB,CAAC,CAAA;IACF,OAAO,IAAI,CAAA;AACb,CAAC,CAAA","sourcesContent":["import { RimrafAsyncOptions, RimrafSyncOptions } from '.'\nimport { promises, rmSync } from './fs.js'\nconst { rm } = promises\n\nexport const rimrafNative = async (\n path: string,\n opt: RimrafAsyncOptions\n): Promise => {\n await rm(path, {\n ...opt,\n force: true,\n recursive: true,\n })\n return true\n}\n\nexport const rimrafNativeSync = (\n path: string,\n opt: RimrafSyncOptions\n): boolean => {\n rmSync(path, {\n ...opt,\n force: true,\n recursive: true,\n })\n return true\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-posix.d.ts b/node_modules/rimraf/dist/mjs/rimraf-posix.d.ts new file mode 100644 index 0000000..fd4c83c --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-posix.d.ts @@ -0,0 +1,4 @@ +import { RimrafAsyncOptions, RimrafSyncOptions } from '.'; +export declare const rimrafPosix: (path: string, opt: RimrafAsyncOptions) => Promise; +export declare const rimrafPosixSync: (path: string, opt: RimrafSyncOptions) => boolean; +//# sourceMappingURL=rimraf-posix.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-posix.d.ts.map b/node_modules/rimraf/dist/mjs/rimraf-posix.d.ts.map new file mode 100644 index 0000000..397a9c5 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-posix.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-posix.d.ts","sourceRoot":"","sources":["../../src/rimraf-posix.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAA;AAGzD,eAAO,MAAM,WAAW,SAAgB,MAAM,OAAO,kBAAkB,qBAUtE,CAAA;AAED,eAAO,MAAM,eAAe,SAAU,MAAM,OAAO,iBAAiB,YAUnE,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-posix.js b/node_modules/rimraf/dist/mjs/rimraf-posix.js new file mode 100644 index 0000000..356a477 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-posix.js @@ -0,0 +1,118 @@ +// the simple recursive removal, where unlink and rmdir are atomic +// Note that this approach does NOT work on Windows! +// We stat first and only unlink if the Dirent isn't a directory, +// because sunos will let root unlink a directory, and some +// SUPER weird breakage happens as a result. +import { lstatSync, promises, rmdirSync, unlinkSync } from './fs.js'; +const { lstat, rmdir, unlink } = promises; +import { parse, resolve } from 'path'; +import { readdirOrError, readdirOrErrorSync } from './readdir-or-error.js'; +import { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js'; +export const rimrafPosix = async (path, opt) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + try { + return await rimrafPosixDir(path, opt, await lstat(path)); + } + catch (er) { + if (er?.code === 'ENOENT') + return true; + throw er; + } +}; +export const rimrafPosixSync = (path, opt) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + try { + return rimrafPosixDirSync(path, opt, lstatSync(path)); + } + catch (er) { + if (er?.code === 'ENOENT') + return true; + throw er; + } +}; +const rimrafPosixDir = async (path, opt, ent) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + const entries = ent.isDirectory() ? await readdirOrError(path) : null; + if (!Array.isArray(entries)) { + // this can only happen if lstat/readdir lied, or if the dir was + // swapped out with a file at just the right moment. + /* c8 ignore start */ + if (entries) { + if (entries.code === 'ENOENT') { + return true; + } + if (entries.code !== 'ENOTDIR') { + throw entries; + } + } + /* c8 ignore stop */ + if (opt.filter && !(await opt.filter(path, ent))) { + return false; + } + await ignoreENOENT(unlink(path)); + return true; + } + const removedAll = (await Promise.all(entries.map(ent => rimrafPosixDir(resolve(path, ent.name), opt, ent)))).reduce((a, b) => a && b, true); + if (!removedAll) { + return false; + } + // we don't ever ACTUALLY try to unlink /, because that can never work + // but when preserveRoot is false, we could be operating on it. + // No need to check if preserveRoot is not false. + if (opt.preserveRoot === false && path === parse(path).root) { + return false; + } + if (opt.filter && !(await opt.filter(path, ent))) { + return false; + } + await ignoreENOENT(rmdir(path)); + return true; +}; +const rimrafPosixDirSync = (path, opt, ent) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + const entries = ent.isDirectory() ? readdirOrErrorSync(path) : null; + if (!Array.isArray(entries)) { + // this can only happen if lstat/readdir lied, or if the dir was + // swapped out with a file at just the right moment. + /* c8 ignore start */ + if (entries) { + if (entries.code === 'ENOENT') { + return true; + } + if (entries.code !== 'ENOTDIR') { + throw entries; + } + } + /* c8 ignore stop */ + if (opt.filter && !opt.filter(path, ent)) { + return false; + } + ignoreENOENTSync(() => unlinkSync(path)); + return true; + } + let removedAll = true; + for (const ent of entries) { + const p = resolve(path, ent.name); + removedAll = rimrafPosixDirSync(p, opt, ent) && removedAll; + } + if (opt.preserveRoot === false && path === parse(path).root) { + return false; + } + if (!removedAll) { + return false; + } + if (opt.filter && !opt.filter(path, ent)) { + return false; + } + ignoreENOENTSync(() => rmdirSync(path)); + return true; +}; +//# sourceMappingURL=rimraf-posix.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-posix.js.map b/node_modules/rimraf/dist/mjs/rimraf-posix.js.map new file mode 100644 index 0000000..ef64c63 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-posix.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-posix.js","sourceRoot":"","sources":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,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAA;QACxC,OAAO,IAAI,CAAA;KACZ;IACD,IAAI,UAAU,GAAY,IAAI,CAAA;IAC9B,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;QACzB,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;QACjC,UAAU,GAAG,kBAAkB,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,UAAU,CAAA;KAC3D;IACD,IAAI,GAAG,CAAC,YAAY,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE;QAC3D,OAAO,KAAK,CAAA;KACb;IAED,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,KAAK,CAAA;KACb;IAED,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;QACxC,OAAO,KAAK,CAAA;KACb;IAED,gBAAgB,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;IACvC,OAAO,IAAI,CAAA;AACb,CAAC,CAAA","sourcesContent":["// the simple recursive removal, where unlink and rmdir are atomic\n// Note that this approach does NOT work on Windows!\n// We stat first and only unlink if the Dirent isn't a directory,\n// because sunos will let root unlink a directory, and some\n// SUPER weird breakage happens as a result.\n\nimport { lstatSync, promises, rmdirSync, unlinkSync } from './fs.js'\nconst { lstat, rmdir, unlink } = promises\n\nimport { parse, resolve } from 'path'\n\nimport { readdirOrError, readdirOrErrorSync } from './readdir-or-error.js'\n\nimport { Dirent, Stats } from 'fs'\nimport { RimrafAsyncOptions, RimrafSyncOptions } from '.'\nimport { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js'\n\nexport const rimrafPosix = async (path: string, opt: RimrafAsyncOptions) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return await rimrafPosixDir(path, opt, await lstat(path))\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nexport const rimrafPosixSync = (path: string, opt: RimrafSyncOptions) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return rimrafPosixDirSync(path, opt, lstatSync(path))\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nconst rimrafPosixDir = async (\n path: string,\n opt: RimrafAsyncOptions,\n ent: Dirent | Stats\n): Promise => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n const entries = ent.isDirectory() ? await readdirOrError(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n await ignoreENOENT(unlink(path))\n return true\n }\n\n const removedAll = (\n await Promise.all(\n entries.map(ent => rimrafPosixDir(resolve(path, ent.name), opt, ent))\n )\n ).reduce((a, b) => a && b, true)\n\n if (!removedAll) {\n return false\n }\n\n // we don't ever ACTUALLY try to unlink /, because that can never work\n // but when preserveRoot is false, we could be operating on it.\n // No need to check if preserveRoot is not false.\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n\n await ignoreENOENT(rmdir(path))\n return true\n}\n\nconst rimrafPosixDirSync = (\n path: string,\n opt: RimrafSyncOptions,\n ent: Dirent | Stats\n): boolean => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n const entries = ent.isDirectory() ? readdirOrErrorSync(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n ignoreENOENTSync(() => unlinkSync(path))\n return true\n }\n let removedAll: boolean = true\n for (const ent of entries) {\n const p = resolve(path, ent.name)\n removedAll = rimrafPosixDirSync(p, opt, ent) && removedAll\n }\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n\n if (!removedAll) {\n return false\n }\n\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n\n ignoreENOENTSync(() => rmdirSync(path))\n return true\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-windows.d.ts b/node_modules/rimraf/dist/mjs/rimraf-windows.d.ts new file mode 100644 index 0000000..9412987 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-windows.d.ts @@ -0,0 +1,4 @@ +import { RimrafAsyncOptions, RimrafSyncOptions } from '.'; +export declare const rimrafWindows: (path: string, opt: RimrafAsyncOptions) => Promise; +export declare const rimrafWindowsSync: (path: string, opt: RimrafSyncOptions) => boolean; +//# sourceMappingURL=rimraf-windows.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-windows.d.ts.map b/node_modules/rimraf/dist/mjs/rimraf-windows.d.ts.map new file mode 100644 index 0000000..03ecfb6 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-windows.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-windows.d.ts","sourceRoot":"","sources":["../../src/rimraf-windows.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAA;AA2DzD,eAAO,MAAM,aAAa,SAAgB,MAAM,OAAO,kBAAkB,qBAUxE,CAAA;AAED,eAAO,MAAM,iBAAiB,SAAU,MAAM,OAAO,iBAAiB,YAUrE,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-windows.js b/node_modules/rimraf/dist/mjs/rimraf-windows.js new file mode 100644 index 0000000..bd2fa80 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-windows.js @@ -0,0 +1,177 @@ +// This is the same as rimrafPosix, with the following changes: +// +// 1. EBUSY, ENFILE, EMFILE trigger retries and/or exponential backoff +// 2. All non-directories are removed first and then all directories are +// removed in a second sweep. +// 3. If we hit ENOTEMPTY in the second sweep, fall back to move-remove on +// the that folder. +// +// Note: "move then remove" is 2-10 times slower, and just as unreliable. +import { parse, resolve } from 'path'; +import { fixEPERM, fixEPERMSync } from './fix-eperm.js'; +import { lstatSync, promises, rmdirSync, unlinkSync } from './fs.js'; +import { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js'; +import { readdirOrError, readdirOrErrorSync } from './readdir-or-error.js'; +import { retryBusy, retryBusySync } from './retry-busy.js'; +import { rimrafMoveRemove, rimrafMoveRemoveSync } from './rimraf-move-remove.js'; +const { unlink, rmdir, lstat } = promises; +const rimrafWindowsFile = retryBusy(fixEPERM(unlink)); +const rimrafWindowsFileSync = retryBusySync(fixEPERMSync(unlinkSync)); +const rimrafWindowsDirRetry = retryBusy(fixEPERM(rmdir)); +const rimrafWindowsDirRetrySync = retryBusySync(fixEPERMSync(rmdirSync)); +const rimrafWindowsDirMoveRemoveFallback = async (path, opt) => { + /* c8 ignore start */ + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + /* c8 ignore stop */ + // already filtered, remove from options so we don't call unnecessarily + const { filter, ...options } = opt; + try { + return await rimrafWindowsDirRetry(path, options); + } + catch (er) { + if (er?.code === 'ENOTEMPTY') { + return await rimrafMoveRemove(path, options); + } + throw er; + } +}; +const rimrafWindowsDirMoveRemoveFallbackSync = (path, opt) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + // already filtered, remove from options so we don't call unnecessarily + const { filter, ...options } = opt; + try { + return rimrafWindowsDirRetrySync(path, options); + } + catch (er) { + const fer = er; + if (fer?.code === 'ENOTEMPTY') { + return rimrafMoveRemoveSync(path, options); + } + throw er; + } +}; +const START = Symbol('start'); +const CHILD = Symbol('child'); +const FINISH = Symbol('finish'); +export const rimrafWindows = async (path, opt) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + try { + return await rimrafWindowsDir(path, opt, await lstat(path), START); + } + catch (er) { + if (er?.code === 'ENOENT') + return true; + throw er; + } +}; +export const rimrafWindowsSync = (path, opt) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + try { + return rimrafWindowsDirSync(path, opt, lstatSync(path), START); + } + catch (er) { + if (er?.code === 'ENOENT') + return true; + throw er; + } +}; +const rimrafWindowsDir = async (path, opt, ent, state = START) => { + if (opt?.signal?.aborted) { + throw opt.signal.reason; + } + const entries = ent.isDirectory() ? await readdirOrError(path) : null; + if (!Array.isArray(entries)) { + // this can only happen if lstat/readdir lied, or if the dir was + // swapped out with a file at just the right moment. + /* c8 ignore start */ + if (entries) { + if (entries.code === 'ENOENT') { + return true; + } + if (entries.code !== 'ENOTDIR') { + throw entries; + } + } + /* c8 ignore stop */ + if (opt.filter && !(await opt.filter(path, ent))) { + return false; + } + // is a file + await ignoreENOENT(rimrafWindowsFile(path, opt)); + return true; + } + const s = state === START ? CHILD : state; + const removedAll = (await Promise.all(entries.map(ent => rimrafWindowsDir(resolve(path, ent.name), opt, ent, s)))).reduce((a, b) => a && b, true); + if (state === START) { + return rimrafWindowsDir(path, opt, ent, FINISH); + } + else if (state === FINISH) { + if (opt.preserveRoot === false && path === parse(path).root) { + return false; + } + if (!removedAll) { + return false; + } + if (opt.filter && !(await opt.filter(path, ent))) { + return false; + } + await ignoreENOENT(rimrafWindowsDirMoveRemoveFallback(path, opt)); + } + return true; +}; +const rimrafWindowsDirSync = (path, opt, ent, state = START) => { + const entries = ent.isDirectory() ? readdirOrErrorSync(path) : null; + if (!Array.isArray(entries)) { + // this can only happen if lstat/readdir lied, or if the dir was + // swapped out with a file at just the right moment. + /* c8 ignore start */ + if (entries) { + if (entries.code === 'ENOENT') { + return true; + } + if (entries.code !== 'ENOTDIR') { + throw entries; + } + } + /* c8 ignore stop */ + if (opt.filter && !opt.filter(path, ent)) { + return false; + } + // is a file + ignoreENOENTSync(() => rimrafWindowsFileSync(path, opt)); + return true; + } + let removedAll = true; + for (const ent of entries) { + const s = state === START ? CHILD : state; + const p = resolve(path, ent.name); + removedAll = rimrafWindowsDirSync(p, opt, ent, s) && removedAll; + } + if (state === START) { + return rimrafWindowsDirSync(path, opt, ent, FINISH); + } + else if (state === FINISH) { + if (opt.preserveRoot === false && path === parse(path).root) { + return false; + } + if (!removedAll) { + return false; + } + if (opt.filter && !opt.filter(path, ent)) { + return false; + } + ignoreENOENTSync(() => { + rimrafWindowsDirMoveRemoveFallbackSync(path, opt); + }); + } + return true; +}; +//# sourceMappingURL=rimraf-windows.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/rimraf-windows.js.map b/node_modules/rimraf/dist/mjs/rimraf-windows.js.map new file mode 100644 index 0000000..7e5ebbd --- /dev/null +++ b/node_modules/rimraf/dist/mjs/rimraf-windows.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rimraf-windows.js","sourceRoot":"","sources":["../../src/rimraf-windows.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,wEAAwE;AACxE,gCAAgC;AAChC,0EAA0E;AAC1E,sBAAsB;AACtB,EAAE;AACF,yEAAyE;AAGzE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAErC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,kBAAkB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AG,CAAC,EAAE;YACxC,OAAO,KAAK,CAAA;SACb;QACD,gBAAgB,CAAC,GAAG,EAAE;YACpB,sCAAsC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QACnD,CAAC,CAAC,CAAA;KACH;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA","sourcesContent":["// This is the same as rimrafPosix, with the following changes:\n//\n// 1. EBUSY, ENFILE, EMFILE trigger retries and/or exponential backoff\n// 2. All non-directories are removed first and then all directories are\n// removed in a second sweep.\n// 3. If we hit ENOTEMPTY in the second sweep, fall back to move-remove on\n// the that folder.\n//\n// Note: \"move then remove\" is 2-10 times slower, and just as unreliable.\n\nimport { Dirent, Stats } from 'fs'\nimport { parse, resolve } from 'path'\nimport { RimrafAsyncOptions, RimrafSyncOptions } from '.'\nimport { fixEPERM, fixEPERMSync } from './fix-eperm.js'\nimport { lstatSync, promises, rmdirSync, unlinkSync } from './fs.js'\nimport { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js'\nimport { readdirOrError, readdirOrErrorSync } from './readdir-or-error.js'\nimport { retryBusy, retryBusySync } from './retry-busy.js'\nimport { rimrafMoveRemove, rimrafMoveRemoveSync } from './rimraf-move-remove.js'\nconst { unlink, rmdir, lstat } = promises\n\nconst rimrafWindowsFile = retryBusy(fixEPERM(unlink))\nconst rimrafWindowsFileSync = retryBusySync(fixEPERMSync(unlinkSync))\nconst rimrafWindowsDirRetry = retryBusy(fixEPERM(rmdir))\nconst rimrafWindowsDirRetrySync = retryBusySync(fixEPERMSync(rmdirSync))\n\nconst rimrafWindowsDirMoveRemoveFallback = async (\n path: string,\n opt: RimrafAsyncOptions\n): Promise => {\n /* c8 ignore start */\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n /* c8 ignore stop */\n // already filtered, remove from options so we don't call unnecessarily\n const { filter, ...options } = opt\n try {\n return await rimrafWindowsDirRetry(path, options)\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOTEMPTY') {\n return await rimrafMoveRemove(path, options)\n }\n throw er\n }\n}\n\nconst rimrafWindowsDirMoveRemoveFallbackSync = (\n path: string,\n opt: RimrafSyncOptions\n): boolean => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n // already filtered, remove from options so we don't call unnecessarily\n const { filter, ...options } = opt\n try {\n return rimrafWindowsDirRetrySync(path, options)\n } catch (er) {\n const fer = er as NodeJS.ErrnoException\n if (fer?.code === 'ENOTEMPTY') {\n return rimrafMoveRemoveSync(path, options)\n }\n throw er\n }\n}\n\nconst START = Symbol('start')\nconst CHILD = Symbol('child')\nconst FINISH = Symbol('finish')\n\nexport const rimrafWindows = async (path: string, opt: RimrafAsyncOptions) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return await rimrafWindowsDir(path, opt, await lstat(path), START)\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nexport const rimrafWindowsSync = (path: string, opt: RimrafSyncOptions) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return rimrafWindowsDirSync(path, opt, lstatSync(path), START)\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nconst rimrafWindowsDir = async (\n path: string,\n opt: RimrafAsyncOptions,\n ent: Dirent | Stats,\n state = START\n): Promise => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n\n const entries = ent.isDirectory() ? await readdirOrError(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n // is a file\n await ignoreENOENT(rimrafWindowsFile(path, opt))\n return true\n }\n\n const s = state === START ? CHILD : state\n const removedAll = (\n await Promise.all(\n entries.map(ent => rimrafWindowsDir(resolve(path, ent.name), opt, ent, s))\n )\n ).reduce((a, b) => a && b, true)\n\n if (state === START) {\n return rimrafWindowsDir(path, opt, ent, FINISH)\n } else if (state === FINISH) {\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n if (!removedAll) {\n return false\n }\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n await ignoreENOENT(rimrafWindowsDirMoveRemoveFallback(path, opt))\n }\n return true\n}\n\nconst rimrafWindowsDirSync = (\n path: string,\n opt: RimrafSyncOptions,\n ent: Dirent | Stats,\n state = START\n): boolean => {\n const entries = ent.isDirectory() ? readdirOrErrorSync(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n // is a file\n ignoreENOENTSync(() => rimrafWindowsFileSync(path, opt))\n return true\n }\n\n let removedAll = true\n for (const ent of entries) {\n const s = state === START ? CHILD : state\n const p = resolve(path, ent.name)\n removedAll = rimrafWindowsDirSync(p, opt, ent, s) && removedAll\n }\n\n if (state === START) {\n return rimrafWindowsDirSync(path, opt, ent, FINISH)\n } else if (state === FINISH) {\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n if (!removedAll) {\n return false\n }\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n ignoreENOENTSync(() => {\n rimrafWindowsDirMoveRemoveFallbackSync(path, opt)\n })\n }\n return true\n}\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/use-native.d.ts b/node_modules/rimraf/dist/mjs/use-native.d.ts new file mode 100644 index 0000000..e191fd9 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/use-native.d.ts @@ -0,0 +1,4 @@ +import { RimrafAsyncOptions, RimrafOptions } from './index.js'; +export declare const useNative: (opt?: RimrafAsyncOptions) => boolean; +export declare const useNativeSync: (opt?: RimrafOptions) => boolean; +//# sourceMappingURL=use-native.d.ts.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/use-native.d.ts.map b/node_modules/rimraf/dist/mjs/use-native.d.ts.map new file mode 100644 index 0000000..847baa5 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/use-native.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"use-native.d.ts","sourceRoot":"","sources":["../../src/use-native.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAI9D,eAAO,MAAM,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,kBAAkB,KAAK,OAGb,CAAA;AACzC,eAAO,MAAM,aAAa,EAAE,CAAC,GAAG,CAAC,EAAE,aAAa,KAAK,OAGZ,CAAA"} \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/use-native.js b/node_modules/rimraf/dist/mjs/use-native.js new file mode 100644 index 0000000..4dc4a44 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/use-native.js @@ -0,0 +1,13 @@ +const version = process.env.__TESTING_RIMRAF_NODE_VERSION__ || process.version; +const versArr = version.replace(/^v/, '').split('.'); +const hasNative = +versArr[0] > 14 || (+versArr[0] === 14 && +versArr[1] >= 14); +// we do NOT use native by default on Windows, because Node's native +// rm implementation is less advanced. Change this code if that changes. +import platform from './platform.js'; +export const useNative = !hasNative || platform === 'win32' + ? () => false + : opt => !opt?.signal && !opt?.filter; +export const useNativeSync = !hasNative || platform === 'win32' + ? () => false + : opt => !opt?.signal && !opt?.filter; +//# sourceMappingURL=use-native.js.map \ No newline at end of file diff --git a/node_modules/rimraf/dist/mjs/use-native.js.map b/node_modules/rimraf/dist/mjs/use-native.js.map new file mode 100644 index 0000000..72cedf8 --- /dev/null +++ b/node_modules/rimraf/dist/mjs/use-native.js.map @@ -0,0 +1 @@ +{"version":3,"file":"use-native.js","sourceRoot":"","sources":["../../src/use-native.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,+BAA+B,IAAI,OAAO,CAAC,OAAO,CAAA;AAC9E,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AACpD,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;AAE/E,oEAAoE;AACpE,yEAAyE;AACzE,OAAO,QAAQ,MAAM,eAAe,CAAA;AACpC,MAAM,CAAC,MAAM,SAAS,GACpB,CAAC,SAAS,IAAI,QAAQ,KAAK,OAAO;IAChC,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK;IACb,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,IAAI,CAAC,GAAG,EAAE,MAAM,CAAA;AACzC,MAAM,CAAC,MAAM,aAAa,GACxB,CAAC,SAAS,IAAI,QAAQ,KAAK,OAAO;IAChC,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK;IACb,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,IAAI,CAAC,GAAG,EAAE,MAAM,CAAA","sourcesContent":["const version = process.env.__TESTING_RIMRAF_NODE_VERSION__ || process.version\nconst versArr = version.replace(/^v/, '').split('.')\nconst hasNative = +versArr[0] > 14 || (+versArr[0] === 14 && +versArr[1] >= 14)\nimport { RimrafAsyncOptions, RimrafOptions } from './index.js'\n// we do NOT use native by default on Windows, because Node's native\n// rm implementation is less advanced. Change this code if that changes.\nimport platform from './platform.js'\nexport const useNative: (opt?: RimrafAsyncOptions) => boolean =\n !hasNative || platform === 'win32'\n ? () => false\n : opt => !opt?.signal && !opt?.filter\nexport const useNativeSync: (opt?: RimrafOptions) => boolean =\n !hasNative || platform === 'win32'\n ? () => false\n : opt => !opt?.signal && !opt?.filter\n"]} \ No newline at end of file diff --git a/node_modules/rimraf/package.json b/node_modules/rimraf/package.json new file mode 100644 index 0000000..573563e --- /dev/null +++ b/node_modules/rimraf/package.json @@ -0,0 +1,84 @@ +{ + "name": "rimraf", + "version": "4.4.1", + "main": "./dist/cjs/src/index-cjs.js", + "module": "./dist/mjs/index.js", + "types": "./dist/mjs/index.d.ts", + "bin": "./dist/cjs/src/bin.js", + "exports": { + ".": { + "import": { + "types": "./dist/mjs/index.d.ts", + "default": "./dist/mjs/index.js" + }, + "require": { + "types": "./dist/cjs/src/index.d.ts", + "default": "./dist/cjs/src/index-cjs.js" + } + } + }, + "files": [ + "dist" + ], + "description": "A deep deletion module for node (like `rm -rf`)", + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "repository": "git://github.com/isaacs/rimraf.git", + "scripts": { + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "preprepare": "rm -rf dist", + "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json", + "postprepare": "bash fixup.sh", + "pretest": "npm run prepare", + "presnap": "npm run prepare", + "test": "c8 tap", + "snap": "c8 tap", + "format": "prettier --write . --loglevel warn", + "benchmark": "node benchmark/index.js", + "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts" + }, + "prettier": { + "semi": false, + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "jsxSingleQuote": false, + "bracketSameLine": true, + "arrowParens": "avoid", + "endOfLine": "lf" + }, + "devDependencies": { + "@types/node": "^18.11.9", + "@types/tap": "^15.0.7", + "c8": "^7.12.0", + "eslint-config-prettier": "^8.6.0", + "mkdirp": "1", + "prettier": "^2.8.2", + "tap": "^16.3.4", + "ts-node": "^10.9.1", + "typedoc": "^0.23.21", + "typescript": "^4.9.3" + }, + "tap": { + "coverage": false, + "libtap-settings": "libtap-settings.js", + "node-arg": [ + "--no-warnings", + "--loader", + "ts-node/esm" + ], + "ts": false + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "engines": { + "node": ">=14" + }, + "dependencies": { + "glob": "^9.2.0" + } +} diff --git a/node_modules/safe-buffer/LICENSE b/node_modules/safe-buffer/LICENSE new file mode 100644 index 0000000..0c068ce --- /dev/null +++ b/node_modules/safe-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +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/safe-buffer/README.md b/node_modules/safe-buffer/README.md new file mode 100644 index 0000000..e9a81af --- /dev/null +++ b/node_modules/safe-buffer/README.md @@ -0,0 +1,584 @@ +# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg +[travis-url]: https://travis-ci.org/feross/safe-buffer +[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg +[npm-url]: https://npmjs.org/package/safe-buffer +[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg +[downloads-url]: https://npmjs.org/package/safe-buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +#### Safer Node.js Buffer API + +**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, +`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** + +**Uses the built-in implementation when available.** + +## install + +``` +npm install safe-buffer +``` + +## usage + +The goal of this package is to provide a safe replacement for the node.js `Buffer`. + +It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to +the top of your node.js modules: + +```js +var Buffer = require('safe-buffer').Buffer + +// Existing buffer code will continue to work without issues: + +new Buffer('hey', 'utf8') +new Buffer([1, 2, 3], 'utf8') +new Buffer(obj) +new Buffer(16) // create an uninitialized buffer (potentially unsafe) + +// But you can use these new explicit APIs to make clear what you want: + +Buffer.from('hey', 'utf8') // convert from many types to a Buffer +Buffer.alloc(16) // create a zero-filled buffer (safe) +Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) +``` + +## api + +### Class Method: Buffer.from(array) + + +* `array` {Array} + +Allocates a new `Buffer` using an `array` of octets. + +```js +const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); + // creates a new Buffer containing ASCII bytes + // ['b','u','f','f','e','r'] +``` + +A `TypeError` will be thrown if `array` is not an `Array`. + +### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) + + +* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or + a `new ArrayBuffer()` +* `byteOffset` {Number} Default: `0` +* `length` {Number} Default: `arrayBuffer.length - byteOffset` + +When passed a reference to the `.buffer` property of a `TypedArray` instance, +the newly created `Buffer` will share the same allocated memory as the +TypedArray. + +```js +const arr = new Uint16Array(2); +arr[0] = 5000; +arr[1] = 4000; + +const buf = Buffer.from(arr.buffer); // shares the memory with arr; + +console.log(buf); + // Prints: + +// changing the TypedArray changes the Buffer also +arr[1] = 6000; + +console.log(buf); + // Prints: +``` + +The optional `byteOffset` and `length` arguments specify a memory range within +the `arrayBuffer` that will be shared by the `Buffer`. + +```js +const ab = new ArrayBuffer(10); +const buf = Buffer.from(ab, 0, 2); +console.log(buf.length); + // Prints: 2 +``` + +A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. + +### Class Method: Buffer.from(buffer) + + +* `buffer` {Buffer} + +Copies the passed `buffer` data onto a new `Buffer` instance. + +```js +const buf1 = Buffer.from('buffer'); +const buf2 = Buffer.from(buf1); + +buf1[0] = 0x61; +console.log(buf1.toString()); + // 'auffer' +console.log(buf2.toString()); + // 'buffer' (copy is not changed) +``` + +A `TypeError` will be thrown if `buffer` is not a `Buffer`. + +### Class Method: Buffer.from(str[, encoding]) + + +* `str` {String} String to encode. +* `encoding` {String} Encoding to use, Default: `'utf8'` + +Creates a new `Buffer` containing the given JavaScript string `str`. If +provided, the `encoding` parameter identifies the character encoding. +If not provided, `encoding` defaults to `'utf8'`. + +```js +const buf1 = Buffer.from('this is a tést'); +console.log(buf1.toString()); + // prints: this is a tést +console.log(buf1.toString('ascii')); + // prints: this is a tC)st + +const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); +console.log(buf2.toString()); + // prints: this is a tést +``` + +A `TypeError` will be thrown if `str` is not a string. + +### Class Method: Buffer.alloc(size[, fill[, encoding]]) + + +* `size` {Number} +* `fill` {Value} Default: `undefined` +* `encoding` {String} Default: `utf8` + +Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the +`Buffer` will be *zero-filled*. + +```js +const buf = Buffer.alloc(5); +console.log(buf); + // +``` + +The `size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +If `fill` is specified, the allocated `Buffer` will be initialized by calling +`buf.fill(fill)`. See [`buf.fill()`][] for more information. + +```js +const buf = Buffer.alloc(5, 'a'); +console.log(buf); + // +``` + +If both `fill` and `encoding` are specified, the allocated `Buffer` will be +initialized by calling `buf.fill(fill, encoding)`. For example: + +```js +const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); +console.log(buf); + // +``` + +Calling `Buffer.alloc(size)` can be significantly slower than the alternative +`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance +contents will *never contain sensitive data*. + +A `TypeError` will be thrown if `size` is not a number. + +### Class Method: Buffer.allocUnsafe(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must +be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit +architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is +thrown. A zero-length Buffer will be created if a `size` less than or equal to +0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +```js +const buf = Buffer.allocUnsafe(5); +console.log(buf); + // + // (octets will be different, every time) +buf.fill(0); +console.log(buf); + // +``` + +A `TypeError` will be thrown if `size` is not a number. + +Note that the `Buffer` module pre-allocates an internal `Buffer` instance of +size `Buffer.poolSize` that is used as a pool for the fast allocation of new +`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated +`new Buffer(size)` constructor) only when `size` is less than or equal to +`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default +value of `Buffer.poolSize` is `8192` but can be modified. + +Use of this pre-allocated internal memory pool is a key difference between +calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. +Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer +pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal +Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The +difference is subtle but can be important when an application requires the +additional performance that `Buffer.allocUnsafe(size)` provides. + +### Class Method: Buffer.allocUnsafeSlow(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The +`size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, +allocations under 4KB are, by default, sliced from a single pre-allocated +`Buffer`. This allows applications to avoid the garbage collection overhead of +creating many individually allocated Buffers. This approach improves both +performance and memory usage by eliminating the need to track and cleanup as +many `Persistent` objects. + +However, in the case where a developer may need to retain a small chunk of +memory from a pool for an indeterminate amount of time, it may be appropriate +to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then +copy out the relevant bits. + +```js +// need to keep around a few small chunks of memory +const store = []; + +socket.on('readable', () => { + const data = socket.read(); + // allocate for retained data + const sb = Buffer.allocUnsafeSlow(10); + // copy the data into the new allocation + data.copy(sb, 0, 0, 10); + store.push(sb); +}); +``` + +Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* +a developer has observed undue memory retention in their applications. + +A `TypeError` will be thrown if `size` is not a number. + +### All the Rest + +The rest of the `Buffer` API is exactly the same as in node.js. +[See the docs](https://nodejs.org/api/buffer.html). + + +## Related links + +- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) +- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) + +## Why is `Buffer` unsafe? + +Today, the node.js `Buffer` constructor is overloaded to handle many different argument +types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), +`ArrayBuffer`, and also `Number`. + +The API is optimized for convenience: you can throw any type at it, and it will try to do +what you want. + +Because the Buffer constructor is so powerful, you often see code like this: + +```js +// Convert UTF-8 strings to hex +function toHex (str) { + return new Buffer(str).toString('hex') +} +``` + +***But what happens if `toHex` is called with a `Number` argument?*** + +### Remote Memory Disclosure + +If an attacker can make your program call the `Buffer` constructor with a `Number` +argument, then they can make it allocate uninitialized memory from the node.js process. +This could potentially disclose TLS private keys, user data, or database passwords. + +When the `Buffer` constructor is passed a `Number` argument, it returns an +**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like +this, you **MUST** overwrite the contents before returning it to the user. + +From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): + +> `new Buffer(size)` +> +> - `size` Number +> +> The underlying memory for `Buffer` instances created in this way is not initialized. +> **The contents of a newly created `Buffer` are unknown and could contain sensitive +> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. + +(Emphasis our own.) + +Whenever the programmer intended to create an uninitialized `Buffer` you often see code +like this: + +```js +var buf = new Buffer(16) + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### Would this ever be a problem in real code? + +Yes. It's surprisingly common to forget to check the type of your variables in a +dynamically-typed language like JavaScript. + +Usually the consequences of assuming the wrong type is that your program crashes with an +uncaught exception. But the failure mode for forgetting to check the type of arguments to +the `Buffer` constructor is more catastrophic. + +Here's an example of a vulnerable service that takes a JSON payload and converts it to +hex: + +```js +// Take a JSON payload {str: "some string"} and convert it to hex +var server = http.createServer(function (req, res) { + var data = '' + req.setEncoding('utf8') + req.on('data', function (chunk) { + data += chunk + }) + req.on('end', function () { + var body = JSON.parse(data) + res.end(new Buffer(body.str).toString('hex')) + }) +}) + +server.listen(8080) +``` + +In this example, an http client just has to send: + +```json +{ + "str": 1000 +} +``` + +and it will get back 1,000 bytes of uninitialized memory from the server. + +This is a very serious bug. It's similar in severity to the +[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process +memory by remote attackers. + + +### Which real-world packages were vulnerable? + +#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) + +[Mathias Buus](https://github.com/mafintosh) and I +([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, +[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow +anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get +them to reveal 20 bytes at a time of uninitialized memory from the node.js process. + +Here's +[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) +that fixed it. We released a new fixed version, created a +[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all +vulnerable versions on npm so users will get a warning to upgrade to a newer version. + +#### [`ws`](https://www.npmjs.com/package/ws) + +That got us wondering if there were other vulnerable packages. Sure enough, within a short +period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the +most popular WebSocket implementation in node.js. + +If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as +expected, then uninitialized server memory would be disclosed to the remote peer. + +These were the vulnerable methods: + +```js +socket.send(number) +socket.ping(number) +socket.pong(number) +``` + +Here's a vulnerable socket server with some echo functionality: + +```js +server.on('connection', function (socket) { + socket.on('message', function (message) { + message = JSON.parse(message) + if (message.type === 'echo') { + socket.send(message.data) // send back the user's message + } + }) +}) +``` + +`socket.send(number)` called on the server, will disclose server memory. + +Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue +was fixed, with a more detailed explanation. Props to +[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the +[Node Security Project disclosure](https://nodesecurity.io/advisories/67). + + +### What's the solution? + +It's important that node.js offers a fast way to get memory otherwise performance-critical +applications would needlessly get a lot slower. + +But we need a better way to *signal our intent* as programmers. **When we want +uninitialized memory, we should request it explicitly.** + +Sensitive functionality should not be packed into a developer-friendly API that loosely +accepts many different types. This type of API encourages the lazy practice of passing +variables in without checking the type very carefully. + +#### A new API: `Buffer.allocUnsafe(number)` + +The functionality of creating buffers with uninitialized memory should be part of another +API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that +frequently gets user input of all sorts of different types passed into it. + +```js +var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### How do we fix node.js core? + +We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as +`semver-major`) which defends against one case: + +```js +var str = 16 +new Buffer(str, 'utf8') +``` + +In this situation, it's implied that the programmer intended the first argument to be a +string, since they passed an encoding as a second argument. Today, node.js will allocate +uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not +what the programmer intended. + +But this is only a partial solution, since if the programmer does `new Buffer(variable)` +(without an `encoding` parameter) there's no way to know what they intended. If `variable` +is sometimes a number, then uninitialized memory will sometimes be returned. + +### What's the real long-term fix? + +We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when +we need uninitialized memory. But that would break 1000s of packages. + +~~We believe the best solution is to:~~ + +~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ + +~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ + +#### Update + +We now support adding three new APIs: + +- `Buffer.from(value)` - convert from any type to a buffer +- `Buffer.alloc(size)` - create a zero-filled buffer +- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size + +This solves the core problem that affected `ws` and `bittorrent-dht` which is +`Buffer(variable)` getting tricked into taking a number argument. + +This way, existing code continues working and the impact on the npm ecosystem will be +minimal. Over time, npm maintainers can migrate performance-critical code to use +`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. + + +### Conclusion + +We think there's a serious design issue with the `Buffer` API as it exists today. It +promotes insecure software by putting high-risk functionality into a convenient API +with friendly "developer ergonomics". + +This wasn't merely a theoretical exercise because we found the issue in some of the +most popular npm packages. + +Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of +`buffer`. + +```js +var Buffer = require('safe-buffer').Buffer +``` + +Eventually, we hope that node.js core can switch to this new, safer behavior. We believe +the impact on the ecosystem would be minimal since it's not a breaking change. +Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while +older, insecure packages would magically become safe from this attack vector. + + +## links + +- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) +- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) +- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) + + +## credit + +The original issues in `bittorrent-dht` +([disclosure](https://nodesecurity.io/advisories/68)) and +`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by +[Mathias Buus](https://github.com/mafintosh) and +[Feross Aboukhadijeh](http://feross.org/). + +Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues +and for his work running the [Node Security Project](https://nodesecurity.io/). + +Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and +auditing the code. + + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/node_modules/safe-buffer/index.d.ts b/node_modules/safe-buffer/index.d.ts new file mode 100644 index 0000000..e9fed80 --- /dev/null +++ b/node_modules/safe-buffer/index.d.ts @@ -0,0 +1,187 @@ +declare module "safe-buffer" { + export class Buffer { + length: number + write(string: string, offset?: number, length?: number, encoding?: string): number; + toString(encoding?: string, start?: number, end?: number): string; + toJSON(): { type: 'Buffer', data: any[] }; + equals(otherBuffer: Buffer): boolean; + compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + slice(start?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readUInt8(offset: number, noAssert?: boolean): number; + readUInt16LE(offset: number, noAssert?: boolean): number; + readUInt16BE(offset: number, noAssert?: boolean): number; + readUInt32LE(offset: number, noAssert?: boolean): number; + readUInt32BE(offset: number, noAssert?: boolean): number; + readInt8(offset: number, noAssert?: boolean): number; + readInt16LE(offset: number, noAssert?: boolean): number; + readInt16BE(offset: number, noAssert?: boolean): number; + readInt32LE(offset: number, noAssert?: boolean): number; + readInt32BE(offset: number, noAssert?: boolean): number; + readFloatLE(offset: number, noAssert?: boolean): number; + readFloatBE(offset: number, noAssert?: boolean): number; + readDoubleLE(offset: number, noAssert?: boolean): number; + readDoubleBE(offset: number, noAssert?: boolean): number; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number, noAssert?: boolean): number; + writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeInt8(value: number, offset: number, noAssert?: boolean): number; + writeInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeFloatLE(value: number, offset: number, noAssert?: boolean): number; + writeFloatBE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; + fill(value: any, offset?: number, end?: number): this; + indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + */ + constructor (str: string, encoding?: string); + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + */ + constructor (size: number); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: Uint8Array); + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + */ + constructor (arrayBuffer: ArrayBuffer); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: any[]); + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + */ + constructor (buffer: Buffer); + prototype: Buffer; + /** + * Allocates a new Buffer using an {array} of octets. + * + * @param array + */ + static from(array: any[]): Buffer; + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() + * @param byteOffset + * @param length + */ + static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Copies the passed {buffer} data onto a new Buffer instance. + * + * @param buffer + */ + static from(buffer: Buffer): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + * + * @param str + */ + static from(str: string, encoding?: string): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + static isBuffer(obj: any): obj is Buffer; + /** + * Returns true if {encoding} is a valid encoding argument. + * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * + * @param encoding string to test. + */ + static isEncoding(encoding: string): boolean; + /** + * Gives the actual byte length of a string. encoding defaults to 'utf8'. + * This is not the same as String.prototype.length since that returns the number of characters in a string. + * + * @param string string to test. + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + static byteLength(string: string, encoding?: string): number; + /** + * Returns a buffer which is the result of concatenating all the buffers in the list together. + * + * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. + * If the list has exactly one item, then the first item of the list is returned. + * If the list has more than one item, then a new Buffer is created. + * + * @param list An array of Buffer objects to concatenate + * @param totalLength Total length of the buffers when concatenated. + * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. + */ + static concat(list: Buffer[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + static compare(buf1: Buffer, buf2: Buffer): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initalizing + */ + static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafeSlow(size: number): Buffer; + } +} \ No newline at end of file diff --git a/node_modules/safe-buffer/index.js b/node_modules/safe-buffer/index.js new file mode 100644 index 0000000..f8d3ec9 --- /dev/null +++ b/node_modules/safe-buffer/index.js @@ -0,0 +1,65 @@ +/*! safe-buffer. MIT License. Feross Aboukhadijeh */ +/* eslint-disable node/no-deprecated-api */ +var buffer = require('buffer') +var Buffer = buffer.Buffer + +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.prototype = Object.create(Buffer.prototype) + +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) + +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) +} diff --git a/node_modules/safe-buffer/package.json b/node_modules/safe-buffer/package.json new file mode 100644 index 0000000..f2869e2 --- /dev/null +++ b/node_modules/safe-buffer/package.json @@ -0,0 +1,51 @@ +{ + "name": "safe-buffer", + "description": "Safer Node.js Buffer API", + "version": "5.2.1", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "https://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/safe-buffer/issues" + }, + "devDependencies": { + "standard": "*", + "tape": "^5.0.0" + }, + "homepage": "https://github.com/feross/safe-buffer", + "keywords": [ + "buffer", + "buffer allocate", + "node security", + "safe", + "safe-buffer", + "security", + "uninitialized" + ], + "license": "MIT", + "main": "index.js", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "git://github.com/feross/safe-buffer.git" + }, + "scripts": { + "test": "standard && tape test/*.js" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] +} diff --git a/node_modules/sax/LICENSE b/node_modules/sax/LICENSE new file mode 100644 index 0000000..ccffa08 --- /dev/null +++ b/node_modules/sax/LICENSE @@ -0,0 +1,41 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and 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. + +==== + +`String.fromCodePoint` by Mathias Bynens used according to terms of MIT +License, as follows: + + 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/sax/LICENSE-W3C.html b/node_modules/sax/LICENSE-W3C.html new file mode 100644 index 0000000..a611e3f --- /dev/null +++ b/node_modules/sax/LICENSE-W3C.html @@ -0,0 +1,188 @@ + +W3C Software Notice and License
+ + + +
+

+ W3C + +

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

W3C Software Notice and License

+
+
+

This work (and included software, documentation such as READMEs, or other +related items) is being provided by the copyright holders under the following +license.

+

License

+ +

+By obtaining, using and/or copying this work, you (the licensee) +agree that you have read, understood, and will comply with the following +terms and conditions.

+ +

Permission to copy, modify, and distribute this software and its +documentation, with or without modification, for any purpose and without +fee or royalty is hereby granted, provided that you include the following on +ALL copies of the software and documentation or portions thereof, including +modifications:

+ +
  • The full text of this NOTICE in a location viewable to users of the + redistributed or derivative work.
  • Any pre-existing intellectual property disclaimers, notices, or terms + and conditions. If none exist, the W3C Software Short + Notice should be included (hypertext is preferred, text is permitted) + within the body of any redistributed or derivative code.
  • Notice of any changes or modifications to the files, including the date + changes were made. (We recommend you provide URIs to the location from + which the code is derived.)
+ +

Disclaimers

+ +

THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS +MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR +PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE +ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.

+ +

COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR +DOCUMENTATION.

+ +

The name and trademarks of copyright holders may NOT be used in +advertising or publicity pertaining to the software without specific, written +prior permission. Title to copyright in this software and any associated +documentation will at all times remain with copyright holders.

+ +

Notes

+ +

This version: http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231

+ +

This formulation of W3C's notice and license became active on December 31 +2002. This version removes the copyright ownership notice such that this +license can be used with materials other than those owned by the W3C, +reflects that ERCIM is now a host of the W3C, includes references to this +specific dated version of the license, and removes the ambiguous grant of +"use". Otherwise, this version is the same as the previous +version and is written so as to preserve the Free +Software Foundation's assessment of GPL compatibility and OSI's certification +under the Open Source +Definition.

+
+
+
+
+ + + +
+ +
diff --git a/node_modules/sax/README.md b/node_modules/sax/README.md new file mode 100644 index 0000000..91a0314 --- /dev/null +++ b/node_modules/sax/README.md @@ -0,0 +1,220 @@ +# sax js + +A sax-style parser for XML and HTML. + +Designed with [node](http://nodejs.org/) in mind, but should work fine in +the browser or other CommonJS implementations. + +## What This Is + +* A very simple tool to parse through an XML string. +* A stepping stone to a streaming HTML parser. +* A handy way to deal with RSS and other mostly-ok-but-kinda-broken XML + docs. + +## What This Is (probably) Not + +* An HTML Parser - That's a fine goal, but this isn't it. It's just + XML. +* A DOM Builder - You can use it to build an object model out of XML, + but it doesn't do that out of the box. +* XSLT - No DOM = no querying. +* 100% Compliant with (some other SAX implementation) - Most SAX + implementations are in Java and do a lot more than this does. +* An XML Validator - It does a little validation when in strict mode, but + not much. +* A Schema-Aware XSD Thing - Schemas are an exercise in fetishistic + masochism. +* A DTD-aware Thing - Fetching DTDs is a much bigger job. + +## Regarding `Hello, world!').close(); + +// stream usage +// takes the same options as the parser +var saxStream = require("sax").createStream(strict, options) +saxStream.on("error", function (e) { + // unhandled errors will throw, since this is a proper node + // event emitter. + console.error("error!", e) + // clear the error + this._parser.error = null + this._parser.resume() +}) +saxStream.on("opentag", function (node) { + // same object as above +}) +// pipe is supported, and it's readable/writable +// same chunks coming in also go out. +fs.createReadStream("file.xml") + .pipe(saxStream) + .pipe(fs.createWriteStream("file-copy.xml")) +``` + + +## Arguments + +Pass the following arguments to the parser function. All are optional. + +`strict` - Boolean. Whether or not to be a jerk. Default: `false`. + +`opt` - Object bag of settings regarding string formatting. All default to `false`. + +Settings supported: + +* `trim` - Boolean. Whether or not to trim text and comment nodes. +* `normalize` - Boolean. If true, then turn any whitespace into a single + space. +* `lowercase` - Boolean. If true, then lowercase tag names and attribute names + in loose mode, rather than uppercasing them. +* `xmlns` - Boolean. If true, then namespaces are supported. +* `position` - Boolean. If false, then don't track line/col/position. +* `strictEntities` - Boolean. If true, only parse [predefined XML + entities](http://www.w3.org/TR/REC-xml/#sec-predefined-ent) + (`&`, `'`, `>`, `<`, and `"`) + +## Methods + +`write` - Write bytes onto the stream. You don't have to do this all at +once. You can keep writing as much as you want. + +`close` - Close the stream. Once closed, no more data may be written until +it is done processing the buffer, which is signaled by the `end` event. + +`resume` - To gracefully handle errors, assign a listener to the `error` +event. Then, when the error is taken care of, you can call `resume` to +continue parsing. Otherwise, the parser will not continue while in an error +state. + +## Members + +At all times, the parser object will have the following members: + +`line`, `column`, `position` - Indications of the position in the XML +document where the parser currently is looking. + +`startTagPosition` - Indicates the position where the current tag starts. + +`closed` - Boolean indicating whether or not the parser can be written to. +If it's `true`, then wait for the `ready` event to write again. + +`strict` - Boolean indicating whether or not the parser is a jerk. + +`opt` - Any options passed into the constructor. + +`tag` - The current tag being dealt with. + +And a bunch of other stuff that you probably shouldn't touch. + +## Events + +All events emit with a single argument. To listen to an event, assign a +function to `on`. Functions get executed in the this-context of +the parser object. The list of supported events are also in the exported +`EVENTS` array. + +When using the stream interface, assign handlers using the EventEmitter +`on` function in the normal fashion. + +`error` - Indication that something bad happened. The error will be hanging +out on `parser.error`, and must be deleted before parsing can continue. By +listening to this event, you can keep an eye on that kind of stuff. Note: +this happens *much* more in strict mode. Argument: instance of `Error`. + +`text` - Text node. Argument: string of text. + +`doctype` - The ``. Argument: +object with `name` and `body` members. Attributes are not parsed, as +processing instructions have implementation dependent semantics. + +`sgmldeclaration` - Random SGML declarations. Stuff like `` +would trigger this kind of event. This is a weird thing to support, so it +might go away at some point. SAX isn't intended to be used to parse SGML, +after all. + +`opentag` - An opening tag. Argument: object with `name` and `attributes`. +In non-strict mode, tag names are uppercased, unless the `lowercase` +option is set. If the `xmlns` option is set, then it will contain +namespace binding information on the `ns` member, and will have a +`local`, `prefix`, and `uri` member. + +`closetag` - A closing tag. In loose mode, tags are auto-closed if their +parent closes. In strict mode, well-formedness is enforced. Note that +self-closing tags will have `closeTag` emitted immediately after `openTag`. +Argument: tag name. + +`attribute` - An attribute node. Argument: object with `name` and `value`. +In non-strict mode, attribute names are uppercased, unless the `lowercase` +option is set. If the `xmlns` option is set, it will also contains namespace +information. + +`comment` - A comment node. Argument: the string of the comment. + +`opencdata` - The opening tag of a ``) of a `` tags trigger a `"script"` +event, and their contents are not checked for special xml characters. +If you pass `noscript: true`, then this behavior is suppressed. + +## Reporting Problems + +It's best to write a failing test if you find an issue. I will always +accept pull requests with failing tests if they demonstrate intended +behavior, but it is very hard to figure out what issue you're describing +without a test. Writing a test is also the best way for you yourself +to figure out if you really understand the issue you think you have with +sax-js. diff --git a/node_modules/sax/lib/sax.js b/node_modules/sax/lib/sax.js new file mode 100644 index 0000000..5c08d5f --- /dev/null +++ b/node_modules/sax/lib/sax.js @@ -0,0 +1,1563 @@ +;(function (sax) { // wrapper for non-node envs + sax.parser = function (strict, opt) { return new SAXParser(strict, opt) } + sax.SAXParser = SAXParser + sax.SAXStream = SAXStream + sax.createStream = createStream + + // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns. + // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)), + // since that's the earliest that a buffer overrun could occur. This way, checks are + // as rare as required, but as often as necessary to ensure never crossing this bound. + // Furthermore, buffers are only tested at most once per write(), so passing a very + // large string into write() might have undesirable effects, but this is manageable by + // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme + // edge case, result in creating at most one complete copy of the string passed in. + // Set to Infinity to have unlimited buffers. + sax.MAX_BUFFER_LENGTH = 64 * 1024 + + var buffers = [ + 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype', + 'procInstName', 'procInstBody', 'entity', 'attribName', + 'attribValue', 'cdata', 'script' + ] + + sax.EVENTS = [ + 'text', + 'processinginstruction', + 'sgmldeclaration', + 'doctype', + 'comment', + 'attribute', + 'opentag', + 'closetag', + 'opencdata', + 'cdata', + 'closecdata', + 'error', + 'end', + 'ready', + 'script', + 'opennamespace', + 'closenamespace' + ] + + function SAXParser (strict, opt) { + if (!(this instanceof SAXParser)) { + return new SAXParser(strict, opt) + } + + var parser = this + clearBuffers(parser) + parser.q = parser.c = '' + parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH + parser.opt = opt || {} + parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags + parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase' + parser.tags = [] + parser.closed = parser.closedRoot = parser.sawRoot = false + parser.tag = parser.error = null + parser.strict = !!strict + parser.noscript = !!(strict || parser.opt.noscript) + parser.state = S.BEGIN + parser.strictEntities = parser.opt.strictEntities + parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES) + parser.attribList = [] + + // namespaces form a prototype chain. + // it always points at the current tag, + // which protos to its parent tag. + if (parser.opt.xmlns) { + parser.ns = Object.create(rootNS) + } + + // mostly just for error reporting + parser.trackPosition = parser.opt.position !== false + if (parser.trackPosition) { + parser.position = parser.line = parser.column = 0 + } + emit(parser, 'onready') + } + + if (!Object.create) { + Object.create = function (o) { + function F () {} + F.prototype = o + var newf = new F() + return newf + } + } + + if (!Object.keys) { + Object.keys = function (o) { + var a = [] + for (var i in o) if (o.hasOwnProperty(i)) a.push(i) + return a + } + } + + function checkBufferLength (parser) { + var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10) + var maxActual = 0 + for (var i = 0, l = buffers.length; i < l; i++) { + var len = parser[buffers[i]].length + if (len > maxAllowed) { + // Text/cdata nodes can get big, and since they're buffered, + // we can get here under normal conditions. + // Avoid issues by emitting the text node now, + // so at least it won't get any bigger. + switch (buffers[i]) { + case 'textNode': + closeText(parser) + break + + case 'cdata': + emitNode(parser, 'oncdata', parser.cdata) + parser.cdata = '' + break + + case 'script': + emitNode(parser, 'onscript', parser.script) + parser.script = '' + break + + default: + error(parser, 'Max buffer length exceeded: ' + buffers[i]) + } + } + maxActual = Math.max(maxActual, len) + } + // schedule the next check for the earliest possible buffer overrun. + var m = sax.MAX_BUFFER_LENGTH - maxActual + parser.bufferCheckPosition = m + parser.position + } + + function clearBuffers (parser) { + for (var i = 0, l = buffers.length; i < l; i++) { + parser[buffers[i]] = '' + } + } + + function flushBuffers (parser) { + closeText(parser) + if (parser.cdata !== '') { + emitNode(parser, 'oncdata', parser.cdata) + parser.cdata = '' + } + if (parser.script !== '') { + emitNode(parser, 'onscript', parser.script) + parser.script = '' + } + } + + SAXParser.prototype = { + end: function () { end(this) }, + write: write, + resume: function () { this.error = null; return this }, + close: function () { return this.write(null) }, + flush: function () { flushBuffers(this) } + } + + var Stream + try { + Stream = require('stream').Stream + } catch (ex) { + Stream = function () {} + } + + var streamWraps = sax.EVENTS.filter(function (ev) { + return ev !== 'error' && ev !== 'end' + }) + + function createStream (strict, opt) { + return new SAXStream(strict, opt) + } + + function SAXStream (strict, opt) { + if (!(this instanceof SAXStream)) { + return new SAXStream(strict, opt) + } + + Stream.apply(this) + + this._parser = new SAXParser(strict, opt) + this.writable = true + this.readable = true + + var me = this + + this._parser.onend = function () { + me.emit('end') + } + + this._parser.onerror = function (er) { + me.emit('error', er) + + // if didn't throw, then means error was handled. + // go ahead and clear error, so we can write again. + me._parser.error = null + } + + this._decoder = null + + streamWraps.forEach(function (ev) { + Object.defineProperty(me, 'on' + ev, { + get: function () { + return me._parser['on' + ev] + }, + set: function (h) { + if (!h) { + me.removeAllListeners(ev) + me._parser['on' + ev] = h + return h + } + me.on(ev, h) + }, + enumerable: true, + configurable: false + }) + }) + } + + SAXStream.prototype = Object.create(Stream.prototype, { + constructor: { + value: SAXStream + } + }) + + SAXStream.prototype.write = function (data) { + if (typeof Buffer === 'function' && + typeof Buffer.isBuffer === 'function' && + Buffer.isBuffer(data)) { + if (!this._decoder) { + var SD = require('string_decoder').StringDecoder + this._decoder = new SD('utf8') + } + data = this._decoder.write(data) + } + + this._parser.write(data.toString()) + this.emit('data', data) + return true + } + + SAXStream.prototype.end = function (chunk) { + if (chunk && chunk.length) { + this.write(chunk) + } + this._parser.end() + return true + } + + SAXStream.prototype.on = function (ev, handler) { + var me = this + if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) { + me._parser['on' + ev] = function () { + var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments) + args.splice(0, 0, ev) + me.emit.apply(me, args) + } + } + + return Stream.prototype.on.call(me, ev, handler) + } + + // character classes and tokens + var whitespace = '\r\n\t ' + + // this really needs to be replaced with character classes. + // XML allows all manner of ridiculous numbers and digits. + var number = '0124356789' + var letter = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' + + // (Letter | "_" | ":") + var quote = '\'"' + var attribEnd = whitespace + '>' + var CDATA = '[CDATA[' + var DOCTYPE = 'DOCTYPE' + var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace' + var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/' + var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE } + + // turn all the string character sets into character class objects. + whitespace = charClass(whitespace) + number = charClass(number) + letter = charClass(letter) + + // http://www.w3.org/TR/REC-xml/#NT-NameStartChar + // This implementation works on strings, a single character at a time + // as such, it cannot ever support astral-plane characters (10000-EFFFF) + // without a significant breaking change to either this parser, or the + // JavaScript language. Implementation of an emoji-capable xml parser + // is left as an exercise for the reader. + var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ + + var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/ + + var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ + var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/ + + quote = charClass(quote) + attribEnd = charClass(attribEnd) + + function charClass (str) { + return str.split('').reduce(function (s, c) { + s[c] = true + return s + }, {}) + } + + function isRegExp (c) { + return Object.prototype.toString.call(c) === '[object RegExp]' + } + + function is (charclass, c) { + return isRegExp(charclass) ? !!c.match(charclass) : charclass[c] + } + + function not (charclass, c) { + return !is(charclass, c) + } + + var S = 0 + sax.STATE = { + BEGIN: S++, // leading byte order mark or whitespace + BEGIN_WHITESPACE: S++, // leading whitespace + TEXT: S++, // general stuff + TEXT_ENTITY: S++, // & and such. + OPEN_WAKA: S++, // < + SGML_DECL: S++, // + SCRIPT: S++, // \ No newline at end of file diff --git a/node_modules/tslib/tslib.es6.js b/node_modules/tslib/tslib.es6.js new file mode 100644 index 0000000..6c1739b --- /dev/null +++ b/node_modules/tslib/tslib.es6.js @@ -0,0 +1,402 @@ +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +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. +***************************************************************************** */ +/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +export function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +}; + +export function __runInitializers(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +}; + +export function __propKey(x) { + return typeof x === "symbol" ? x : "".concat(x); +}; + +export function __setFunctionName(f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); +}; + +export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export var __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +}); + +export function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +/** @deprecated */ +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +/** @deprecated */ +export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +export function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +} + +export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } +} + +export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); +}; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +export function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} + +export function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +} + +export function __classPrivateFieldIn(state, receiver) { + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); +} + +export function __addDisposableResource(env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + +} + +var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}; + +export function __disposeResources(env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + var r, s = 0; + function next() { + while (r = env.stack.pop()) { + try { + if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + else s |= 1; + } + catch (e) { + fail(e); + } + } + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; + } + return next(); +} + +export function __rewriteRelativeImportExtension(path, preserveJsx) { + if (typeof path === "string" && /^\.\.?\//.test(path)) { + return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); + }); + } + return path; +} + +export default { + __extends: __extends, + __assign: __assign, + __rest: __rest, + __decorate: __decorate, + __param: __param, + __esDecorate: __esDecorate, + __runInitializers: __runInitializers, + __propKey: __propKey, + __setFunctionName: __setFunctionName, + __metadata: __metadata, + __awaiter: __awaiter, + __generator: __generator, + __createBinding: __createBinding, + __exportStar: __exportStar, + __values: __values, + __read: __read, + __spread: __spread, + __spreadArrays: __spreadArrays, + __spreadArray: __spreadArray, + __await: __await, + __asyncGenerator: __asyncGenerator, + __asyncDelegator: __asyncDelegator, + __asyncValues: __asyncValues, + __makeTemplateObject: __makeTemplateObject, + __importStar: __importStar, + __importDefault: __importDefault, + __classPrivateFieldGet: __classPrivateFieldGet, + __classPrivateFieldSet: __classPrivateFieldSet, + __classPrivateFieldIn: __classPrivateFieldIn, + __addDisposableResource: __addDisposableResource, + __disposeResources: __disposeResources, + __rewriteRelativeImportExtension: __rewriteRelativeImportExtension, +}; diff --git a/node_modules/tslib/tslib.es6.mjs b/node_modules/tslib/tslib.es6.mjs new file mode 100644 index 0000000..c17990a --- /dev/null +++ b/node_modules/tslib/tslib.es6.mjs @@ -0,0 +1,401 @@ +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +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. +***************************************************************************** */ +/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +export function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +}; + +export function __runInitializers(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +}; + +export function __propKey(x) { + return typeof x === "symbol" ? x : "".concat(x); +}; + +export function __setFunctionName(f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); +}; + +export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export var __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +}); + +export function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +/** @deprecated */ +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +/** @deprecated */ +export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +export function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +} + +export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } +} + +export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); +}; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +export function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} + +export function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +} + +export function __classPrivateFieldIn(state, receiver) { + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); +} + +export function __addDisposableResource(env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +} + +var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}; + +export function __disposeResources(env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + var r, s = 0; + function next() { + while (r = env.stack.pop()) { + try { + if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + else s |= 1; + } + catch (e) { + fail(e); + } + } + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; + } + return next(); +} + +export function __rewriteRelativeImportExtension(path, preserveJsx) { + if (typeof path === "string" && /^\.\.?\//.test(path)) { + return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); + }); + } + return path; +} + +export default { + __extends, + __assign, + __rest, + __decorate, + __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, + __metadata, + __awaiter, + __generator, + __createBinding, + __exportStar, + __values, + __read, + __spread, + __spreadArrays, + __spreadArray, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, + __classPrivateFieldIn, + __addDisposableResource, + __disposeResources, + __rewriteRelativeImportExtension, +}; diff --git a/node_modules/tslib/tslib.html b/node_modules/tslib/tslib.html new file mode 100644 index 0000000..44c9ba5 --- /dev/null +++ b/node_modules/tslib/tslib.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/tslib/tslib.js b/node_modules/tslib/tslib.js new file mode 100644 index 0000000..5e12ace --- /dev/null +++ b/node_modules/tslib/tslib.js @@ -0,0 +1,484 @@ +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +var __rewriteRelativeImportExtension; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; + }; + + __runInitializers = function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; + }; + + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; + + __setFunctionName = function (f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + /** @deprecated */ + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __spreadArray = function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (state, receiver) { + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); + }; + + __addDisposableResource = function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + }; + + __disposeResources = function (env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + var r, s = 0; + function next() { + while (r = env.stack.pop()) { + try { + if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + else s |= 1; + } + catch (e) { + fail(e); + } + } + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; + } + return next(); + }; + + __rewriteRelativeImportExtension = function (path, preserveJsx) { + if (typeof path === "string" && /^\.\.?\//.test(path)) { + return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); + }); + } + return path; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__esDecorate", __esDecorate); + exporter("__runInitializers", __runInitializers); + exporter("__propKey", __propKey); + exporter("__setFunctionName", __setFunctionName); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); + exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension); +}); + +0 && (module.exports = { + __extends: __extends, + __assign: __assign, + __rest: __rest, + __decorate: __decorate, + __param: __param, + __esDecorate: __esDecorate, + __runInitializers: __runInitializers, + __propKey: __propKey, + __setFunctionName: __setFunctionName, + __metadata: __metadata, + __awaiter: __awaiter, + __generator: __generator, + __exportStar: __exportStar, + __createBinding: __createBinding, + __values: __values, + __read: __read, + __spread: __spread, + __spreadArrays: __spreadArrays, + __spreadArray: __spreadArray, + __await: __await, + __asyncGenerator: __asyncGenerator, + __asyncDelegator: __asyncDelegator, + __asyncValues: __asyncValues, + __makeTemplateObject: __makeTemplateObject, + __importStar: __importStar, + __importDefault: __importDefault, + __classPrivateFieldGet: __classPrivateFieldGet, + __classPrivateFieldSet: __classPrivateFieldSet, + __classPrivateFieldIn: __classPrivateFieldIn, + __addDisposableResource: __addDisposableResource, + __disposeResources: __disposeResources, + __rewriteRelativeImportExtension: __rewriteRelativeImportExtension, +}); diff --git a/node_modules/typescript/LICENSE b/node_modules/typescript/LICENSE new file mode 100644 index 0000000..8746124 --- /dev/null +++ b/node_modules/typescript/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS diff --git a/node_modules/typescript/NOTICE.txt b/node_modules/typescript/NOTICE.txt new file mode 100644 index 0000000..0c40b1e --- /dev/null +++ b/node_modules/typescript/NOTICE.txt @@ -0,0 +1,436 @@ +NOTICES AND INFORMATION +Do Not Translate or Localize + +This software incorporates material from third parties. +Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com, +or you may send a check or money order for US $5.00, including the product name, +the open source component name, platform, and version number, to: + +Source Code Compliance Team +Microsoft Corporation +One Microsoft Way +Redmond, WA 98052 +USA + +Notwithstanding any other terms, you may reverse engineer this software to the extent +required to debug changes to any libraries licensed under the GNU Lesser General Public License. + + +------------------- DefinitelyTyped -------------------- +This file is based on or incorporates material from the projects listed below (collectively "Third Party Code"). Microsoft is not the original author of the Third Party Code. The original copyright notice and the license, under which Microsoft received such Third Party Code, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft, not the third party, licenses the Third Party Code to you under the terms set forth in the EULA for the Microsoft Product. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise. +DefinitelyTyped +This project is licensed under the MIT license. Copyrights are respective of each contributor listed at the beginning of each definition file. Provided for Informational Purposes Only + +MIT License +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. +-------------------------------------------------------------------------------------- + +------------------- Unicode -------------------- +UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + +Unicode Data Files include all data files under the directories +http://www.unicode.org/Public/, http://www.unicode.org/reports/, +http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and +http://www.unicode.org/utility/trac/browser/. + +Unicode Data Files do not include PDF online code charts under the +directory http://www.unicode.org/Public/. + +Software includes any source code published in the Unicode Standard +or under the directories +http://www.unicode.org/Public/, http://www.unicode.org/reports/, +http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and +http://www.unicode.org/utility/trac/browser/. + +NOTICE TO USER: Carefully read the following legal agreement. +BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S +DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), +YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. +IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE +THE DATA FILES OR SOFTWARE. + +COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 1991-2017 Unicode, Inc. All rights reserved. +Distributed under the Terms of Use in http://www.unicode.org/copyright.html. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Unicode data files and any associated documentation +(the "Data Files") or Unicode software and any associated documentation +(the "Software") to deal in the Data Files or Software +without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, and/or sell copies of +the Data Files or Software, and to permit persons to whom the Data Files +or Software are furnished to do so, provided that either +(a) this copyright and permission notice appear with all copies +of the Data Files or Software, or +(b) this copyright and permission notice appear in associated +Documentation. + +THE DATA FILES AND SOFTWARE ARE 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 OF THIRD PARTY RIGHTS. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS +NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 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 THE DATA FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, +use or other dealings in these Data Files or Software without prior +written authorization of the copyright holder. +------------------------------------------------------------------------------------- + +-------------------Document Object Model----------------------------- +DOM + +W3C License +This work is being provided by the copyright holders under the following license. +By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions. +Permission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following +on ALL copies of the work or portions thereof, including modifications: +* The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. +* Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included. +* Notice of any changes or modifications, through a copyright statement on the new code or document such as "This software or document includes material copied from or derived +from [title and URI of the W3C document]. Copyright © [YEAR] W3C® (MIT, ERCIM, Keio, Beihang)." +Disclaimers +THIS WORK IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR +FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT. +The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission. +Title to copyright in this work will at all times remain with copyright holders. + +--------- + +DOM +Copyright © 2018 WHATWG (Apple, Google, Mozilla, Microsoft). This work is licensed under a Creative Commons Attribution 4.0 International License: Attribution 4.0 International +======================================================================= +Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors: + +wiki.creativecommons.org/Considerations_for_licensors Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More_considerations for the public: wiki.creativecommons.org/Considerations_for_licensees ======================================================================= +Creative Commons Attribution 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 -- Definitions. a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. h. Licensor means the individual(s) or entity(ies) granting rights under this Public License. i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 -- Scope. a. License grant. 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: a. reproduce and Share the Licensed Material, in whole or in part; and b. produce, reproduce, and Share Adapted Material. 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. Term. The term of this Public License is specified in Section 6(a). 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material. 5. Downstream recipients. a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. b. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. Other rights. 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 2. Patent and trademark rights are not licensed under this Public License. 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 -- License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. a. Attribution. 1. If You Share the Licensed Material (including in modified form), You must: a. retain the following if it is supplied by the Licensor with the Licensed Material: i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); ii. a copyright notice; iii. a notice that refers to this Public License; iv. a notice that refers to the disclaimer of warranties; v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. Section 4 -- Sui Generis Database Rights. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 -- Disclaimer of Warranties and Limitation of Liability. a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 -- Term and Termination. a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 -- Other Terms and Conditions. a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 -- Interpretation. a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. ======================================================================= Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the "Licensor." Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. + +-------------------------------------------------------------------------------- + +----------------------Web Background Synchronization------------------------------ + +Web Background Synchronization Specification +Portions of spec © by W3C + +W3C Community Final Specification Agreement +To secure commitments from participants for the full text of a Community or Business Group Report, the group may call for voluntary commitments to the following terms; a "summary" is +available. See also the related "W3C Community Contributor License Agreement". +1. The Purpose of this Agreement. +This Agreement sets forth the terms under which I make certain copyright and patent rights available to you for your implementation of the Specification. +Any other capitalized terms not specifically defined herein have the same meaning as those terms have in the "W3C Patent Policy", and if not defined there, in the "W3C Process Document". +2. Copyrights. +2.1. Copyright Grant. I grant to you a perpetual (for the duration of the applicable copyright), worldwide, non-exclusive, no-charge, royalty-free, copyright license, without any obligation for accounting to me, to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, distribute, and implement the Specification to the full extent of my copyright interest in the Specification. +2.2. Attribution. As a condition of the copyright grant, you must include an attribution to the Specification in any derivative work you make based on the Specification. That attribution must include, at minimum, the Specification name and version number. +3. Patents. +3.1. Patent Licensing Commitment. I agree to license my Essential Claims under the W3C Community RF Licensing Requirements. This requirement includes Essential Claims that I own and any that I have the right to license without obligation of payment or other consideration to an unrelated third party. W3C Community RF Licensing Requirements obligations made concerning the Specification and described in this policy are binding on me for the life of the patents in question and encumber the patents containing Essential Claims, regardless of changes in participation status or W3C Membership. I also agree to license my Essential Claims under the W3C Community RF Licensing Requirements in derivative works of the Specification so long as all normative portions of the Specification are maintained and that this licensing commitment does not extend to any portion of the derivative work that was not included in the Specification. +3.2. Optional, Additional Patent Grant. In addition to the provisions of Section 3.1, I may also, at my option, make certain intellectual property rights infringed by implementations of the Specification, including Essential Claims, available by providing those terms via the W3C Web site. +4. No Other Rights. Except as specifically set forth in this Agreement, no other express or implied patent, trademark, copyright, or other property rights are granted under this Agreement, including by implication, waiver, or estoppel. +5. Antitrust Compliance. I acknowledge that I may compete with other participants, that I am under no obligation to implement the Specification, that each participant is free to develop competing technologies and standards, and that each party is free to license its patent rights to third parties, including for the purpose of enabling competing technologies and standards. +6. Non-Circumvention. I agree that I will not intentionally take or willfully assist any third party to take any action for the purpose of circumventing my obligations under this Agreement. +7. Transition to W3C Recommendation Track. The Specification developed by the Project may transition to the W3C Recommendation Track. The W3C Team is responsible for notifying me that a Corresponding Working Group has been chartered. I have no obligation to join the Corresponding Working Group. If the Specification developed by the Project transitions to the W3C Recommendation Track, the following terms apply: +7.1. If I join the Corresponding Working Group. If I join the Corresponding Working Group, I will be subject to all W3C rules, obligations, licensing commitments, and policies that govern that Corresponding Working Group. +7.2. If I Do Not Join the Corresponding Working Group. +7.2.1. Licensing Obligations to Resulting Specification. If I do not join the Corresponding Working Group, I agree to offer patent licenses according to the W3C Royalty-Free licensing requirements described in Section 5 of the W3C Patent Policy for the portions of the Specification included in the resulting Recommendation. This licensing commitment does not extend to any portion of an implementation of the Recommendation that was not included in the Specification. This licensing commitment may not be revoked but may be modified through the exclusion process defined in Section 4 of the W3C Patent Policy. I am not required to join the Corresponding Working Group to exclude patents from the W3C Royalty-Free licensing commitment, but must otherwise follow the normal exclusion procedures defined by the W3C Patent Policy. The W3C Team will notify me of any Call for Exclusion in the Corresponding Working Group as set forth in Section 4.5 of the W3C Patent Policy. +7.2.2. No Disclosure Obligation. If I do not join the Corresponding Working Group, I have no patent disclosure obligations outside of those set forth in Section 6 of the W3C Patent Policy. +8. Conflict of Interest. I will disclose significant relationships when those relationships might reasonably be perceived as creating a conflict of interest with my role. I will notify W3C of any change in my affiliation using W3C-provided mechanisms. +9. Representations, Warranties and Disclaimers. I represent and warrant that I am legally entitled to grant the rights and promises set forth in this Agreement. IN ALL OTHER RESPECTS THE SPECIFICATION IS PROVIDED “AS IS.” The entire risk as to implementing or otherwise using the Specification is assumed by the implementer and user. Except as stated herein, I expressly disclaim any warranties (express, implied, or otherwise), including implied warranties of merchantability, non-infringement, fitness for a particular purpose, or title, related to the Specification. IN NO EVENT WILL ANY PARTY BE LIABLE TO ANY OTHER PARTY FOR LOST PROFITS OR ANY FORM OF INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER FROM ANY CAUSES OF ACTION OF ANY KIND WITH RESPECT TO THIS AGREEMENT, WHETHER BASED ON BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, AND WHETHER OR NOT THE OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. All of my obligations under Section 3 regarding the transfer, successors in interest, or assignment of Granted Claims will be satisfied if I notify the transferee or assignee of any patent that I know contains Granted Claims of the obligations under Section 3. Nothing in this Agreement requires me to undertake a patent search. +10. Definitions. +10.1. Agreement. “Agreement” means this W3C Community Final Specification Agreement. +10.2. Corresponding Working Group. “Corresponding Working Group” is a W3C Working Group that is chartered to develop a Recommendation, as defined in the W3C Process Document, that takes the Specification as an input. +10.3. Essential Claims. “Essential Claims” shall mean all claims in any patent or patent application in any jurisdiction in the world that would necessarily be infringed by implementation of the Specification. A claim is necessarily infringed hereunder only when it is not possible to avoid infringing it because there is no non-infringing alternative for implementing the normative portions of the Specification. Existence of a non-infringing alternative shall be judged based on the state of the art at the time of the publication of the Specification. The following are expressly excluded from and shall not be deemed to constitute Essential Claims: +10.3.1. any claims other than as set forth above even if contained in the same patent as Essential Claims; and +10.3.2. claims which would be infringed only by: +portions of an implementation that are not specified in the normative portions of the Specification, or +enabling technologies that may be necessary to make or use any product or portion thereof that complies with the Specification and are not themselves expressly set forth in the Specification (e.g., semiconductor manufacturing technology, compiler technology, object-oriented technology, basic operating system technology, and the like); or +the implementation of technology developed elsewhere and merely incorporated by reference in the body of the Specification. +10.3.3. design patents and design registrations. +For purposes of this definition, the normative portions of the Specification shall be deemed to include only architectural and interoperability requirements. Optional features in the RFC 2119 sense are considered normative unless they are specifically identified as informative. Implementation examples or any other material that merely illustrate the requirements of the Specification are informative, rather than normative. +10.4. I, Me, or My. “I,” “me,” or “my” refers to the signatory. +10.5 Project. “Project” means the W3C Community Group or Business Group for which I executed this Agreement. +10.6. Specification. “Specification” means the Specification identified by the Project as the target of this agreement in a call for Final Specification Commitments. W3C shall provide the authoritative mechanisms for the identification of this Specification. +10.7. W3C Community RF Licensing Requirements. “W3C Community RF Licensing Requirements” license shall mean a non-assignable, non-sublicensable license to make, have made, use, sell, have sold, offer to sell, import, and distribute and dispose of implementations of the Specification that: +10.7.1. shall be available to all, worldwide, whether or not they are W3C Members; +10.7.2. shall extend to all Essential Claims owned or controlled by me; +10.7.3. may be limited to implementations of the Specification, and to what is required by the Specification; +10.7.4. may be conditioned on a grant of a reciprocal RF license (as defined in this policy) to all Essential Claims owned or controlled by the licensee. A reciprocal license may be required to be available to all, and a reciprocal license may itself be conditioned on a further reciprocal license from all. +10.7.5. may not be conditioned on payment of royalties, fees or other consideration; +10.7.6. may be suspended with respect to any licensee when licensor issued by licensee for infringement of claims essential to implement the Specification or any W3C Recommendation; +10.7.7. may not impose any further conditions or restrictions on the use of any technology, intellectual property rights, or other restrictions on behavior of the licensee, but may include reasonable, customary terms relating to operation or maintenance of the license relationship such as the following: choice of law and dispute resolution; +10.7.8. shall not be considered accepted by an implementer who manifests an intent not to accept the terms of the W3C Community RF Licensing Requirements license as offered by the licensor. +10.7.9. The RF license conforming to the requirements in this policy shall be made available by the licensor as long as the Specification is in effect. The term of such license shall be for the life of the patents in question. +I am encouraged to provide a contact from which licensing information can be obtained and other relevant licensing information. Any such information will be made publicly available. +10.8. You or Your. “You,” “you,” or “your” means any person or entity who exercises copyright or patent rights granted under this Agreement, and any person that person or entity controls. + +------------------------------------------------------------------------------------- + +------------------- WebGL ----------------------------- +Copyright (c) 2018 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are 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 Materials. + +THE MATERIALS ARE 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 +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +------------------------------------------------------ + +--------------------------------------------------------- + +github.com/zeebo/xxh3 v1.1.0 - BSD-2-Clause + + +Copyright (c) 2019, Jeff Wendling +Copyright (c) 2012-2014, Yann Collet + +Copyright (c) . All rights reserved. + +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. + +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. + +--------------------------------------------------------- + +--------------------------------------------------------- + +github.com/go-json-experiment/json v0.0.0-20260623181947-01eb4420fa68 - BSD-3-Clause + + +Copyright 2010 The Go Authors +Copyright 2011 The Go Authors +Copyright 2016 The Go Authors +Copyright 2018 The Go Authors +Copyright 2020 The Go Authors +Copyright 2021 The Go Authors +Copyright 2022 The Go Authors +Copyright 2023 The Go Authors +Copyright 2024 The Go Authors +Copyright (c) 2020 The Go Authors + +Copyright (c) . All rights reserved. + +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. + +--------------------------------------------------------- + +--------------------------------------------------------- + +golang.org/x/sync v0.21.0 - BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang + + +Copyright 2009 The Go Authors +Copyright 2013 The Go Authors +Copyright 2016 The Go Authors +Copyright 2017 The Go Authors +Copyright 2019 The Go Authors + +BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang + +--------------------------------------------------------- + +--------------------------------------------------------- + +golang.org/x/sys v0.46.0 - BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang + + +Copyright 2009 The Go Authors +Copyright 2010 The Go Authors +Copyright 2011 The Go Authors +Copyright 2012 The Go Authors +Copyright 2013 The Go Authors +Copyright 2014 The Go Authors +Copyright 2015 The Go Authors +Copyright 2016 The Go Authors +Copyright 2017 The Go Authors +Copyright 2018 The Go Authors +Copyright 2019 The Go Authors +Copyright 2020 The Go Authors +Copyright 2021 The Go Authors +Copyright 2022 The Go Authors +Copyright 2023 The Go Authors +Copyright 2024 The Go Authors +Copyright 2025 The Go Authors +Copyright 2009,2010 The Go Authors + +BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang + +--------------------------------------------------------- + +--------------------------------------------------------- + +golang.org/x/term v0.44.0 - BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang + + +Copyright 2009 The Go Authors +Copyright 2011 The Go Authors +Copyright 2013 The Go Authors +Copyright 2019 The Go Authors +Copyright 2021 The Go Authors + +BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang + +--------------------------------------------------------- + +--------------------------------------------------------- + +golang.org/x/text v0.38.0 - BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang + + +(c) AeHa (c) +(c) EeAoq (c) +(c) EAiE (c) A +(c) lEEe (c) AE +(c) (c) AAEE (c) +(c) oav!A (c) AY +(c) aA"AE (c) 1AE (c) +Copyright 2009 The Go Authors +Copyright 2011 The Go Authors +Copyright 2012 The Go Authors +Copyright 2013 The Go Authors +Copyright 2014 The Go Authors +Copyright 2015 The Go Authors +Copyright 2016 The Go Authors +Copyright 2017 The Go Authors +Copyright 2018 The Go Authors +Copyright 2019 The Go Authors +Copyright 2021 The Go Authors +Copyright 2025 The Go Authors + +BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang + +--------------------------------------------------------- + +--------------------------------------------------------- + +github.com/klauspost/cpuid/v2 v2.2.10 - MIT + + +Copyright (c) 2015 Klaus Post +Copyright (c) 2020 Klaus Post +Copyright (c) 2021 Klaus Post +Copyright 2018 The Go Authors +Copyright (c) 2015- Klaus Post & Contributors + +MIT License + +Copyright (c) + +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. + +--------------------------------------------------------- + +--------------------------------------------------------- + +github.com/Microsoft/go-winio v0.6.2 - MIT + + +Copyright (c) 2015 Microsoft +Copyright 2013 The Go Authors + +MIT License + +Copyright (c) + +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. + +--------------------------------------------------------- + +--------------------------------------------------------- + +github.com/mackerelio/go-osstat v0.2.7 - Apache-2.0 + + +Copyright 2017-2019 Hatena Co., Ltd. + +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 at + + 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. + +--------------------------------------------------------- + +--------------------------------------------------------- + +parcel-bundler/watcher 8926bb8b281733bbfcaf69bb4e62ab7a1431c42a - MIT + + +Copyright Node.js contributors +Copyright 2012-2020 Facebook, Inc. +Copyright (c) 2017-present Devon Govett + +MIT License + +Copyright (c) 2017-present Devon Govett + +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/typescript/README.md b/node_modules/typescript/README.md new file mode 100644 index 0000000..7b87989 --- /dev/null +++ b/node_modules/typescript/README.md @@ -0,0 +1,49 @@ +# TypeScript + +[![CI](https://github.com/microsoft/TypeScript/actions/workflows/ci.yml/badge.svg)](https://github.com/microsoft/TypeScript/actions/workflows/ci.yml) +[![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript) +[![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript) +[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/microsoft/TypeScript/badge)](https://securityscorecards.dev/viewer/?uri=github.com/microsoft/TypeScript) + +[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://devblogs.microsoft.com/typescript/) and [Bluesky](https://bsky.app/profile/typescriptlang.org). + +Find others who are using TypeScript at [our community page](https://www.typescriptlang.org/community/). + +## Installing + +For the latest stable version: + +```bash +npm install -D typescript +``` + +For our nightly builds: + +```bash +npm install -D typescript@next +``` + +## Contribute + +There are many ways to [contribute](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md) to TypeScript. + +* [Submit bugs](https://github.com/microsoft/TypeScript/issues) and help us verify fixes as they are checked in. +* Review the [source code changes](https://github.com/microsoft/TypeScript/pulls). +* Engage with other TypeScript users and developers on [Stack Overflow](https://stackoverflow.com/questions/tagged/typescript). +* Help each other in the [TypeScript Community Discord](https://discord.gg/typescript). +* Join the [#typescript](https://bsky.app/search?q=%23typescript) discussion on Bluesky. +* [Contribute bug fixes](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md). + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see +the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) +with any additional questions or comments. + +## Documentation + +* [TypeScript in 5 minutes](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html) +* [Programming handbook](https://www.typescriptlang.org/docs/handbook/intro.html) +* [Homepage](https://www.typescriptlang.org/) + +## Roadmap + +For details on our planned features and future direction, please refer to our [roadmap](https://github.com/microsoft/TypeScript/wiki/Roadmap). diff --git a/node_modules/typescript/bin/tsc b/node_modules/typescript/bin/tsc new file mode 100755 index 0000000..34638f8 --- /dev/null +++ b/node_modules/typescript/bin/tsc @@ -0,0 +1,2 @@ +#!/usr/bin/env node +import "../lib/tsc.js"; diff --git a/node_modules/typescript/dist/api/async/api.d.ts b/node_modules/typescript/dist/api/async/api.d.ts new file mode 100644 index 0000000..deb29e9 --- /dev/null +++ b/node_modules/typescript/dist/api/async/api.d.ts @@ -0,0 +1,529 @@ +/// +import { CompletionItemKind } from "#enums/completionItemKind"; +import { DiagnosticCategory } from "#enums/diagnosticCategory"; +import { ElementFlags } from "#enums/elementFlags"; +import { ModuleKind } from "#enums/moduleKind"; +import { NodeBuilderFlags } from "#enums/nodeBuilderFlags"; +import { ObjectFlags } from "#enums/objectFlags"; +import { SignatureFlags } from "#enums/signatureFlags"; +import { SignatureKind } from "#enums/signatureKind"; +import { SymbolFlags } from "#enums/symbolFlags"; +import { TypeFlags } from "#enums/typeFlags"; +import { TypePredicateKind } from "#enums/typePredicateKind"; +import { type __String, type Expression, type Identifier, ModifierFlags, type Node, type Path, type SourceFile, type SyntaxKind, type TypeNode } from "../../ast/index.ts"; +import type { APIOptions, LSPConnectionOptions } from "../options.ts"; +import type { CompilerOptions, ConfigResponse, DocumentIdentifier, DocumentPosition, LSPUpdateSnapshotParams, ProjectResponse, SignatureResponse, SourceFileMetadata, SymbolResponse, TypeResponse, UpdateSnapshotParams, UpdateSnapshotResponse } from "../proto.ts"; +import { SourceFileCache } from "../sourceFileCache.ts"; +import type { RequestTiming, TimingAccumulators, TimingInfo } from "../timing.ts"; +import { Client, type ClientSocketOptions, type ClientSpawnOptions } from "./client.ts"; +import type { AssertsIdentifierTypePredicate, AssertsThisTypePredicate, BigIntLiteralType, BooleanLiteralType, CompletionEntry, CompletionInfo, CompletionOptions, ConditionalType, Diagnostic, FreshableType, IdentifierTypePredicate, IndexedAccessType, IndexInfo, IndexType, InterfaceType, IntersectionType, IntrinsicType, JSDocTagInfo, LiteralType, NumberLiteralType, ObjectType, StringLiteralType, StringMappingType, SubstitutionType, TemplateLiteralType, ThisTypePredicate, TupleType, Type, TypeParameter, TypePredicate, TypePredicateBase, TypeReference, UnionOrIntersectionType, UnionType } from "./types.ts"; +export { documentURIToFileName, fileNameToDocumentURI } from "../path.ts"; +export { CompletionItemKind, DiagnosticCategory, ElementFlags, ModifierFlags, ModuleKind, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypePredicateKind }; +export type { APIOptions, AssertsIdentifierTypePredicate, AssertsThisTypePredicate, BigIntLiteralType, BooleanLiteralType, ClientSocketOptions, ClientSpawnOptions, CompilerOptions, CompletionEntry, CompletionInfo, CompletionOptions, ConditionalType, Diagnostic, DocumentIdentifier, DocumentPosition, FreshableType, IdentifierTypePredicate, IndexedAccessType, IndexInfo, IndexType, InterfaceType, IntersectionType, IntrinsicType, JSDocTagInfo, LiteralType, LSPConnectionOptions, NumberLiteralType, ObjectType, RequestTiming, SourceFileMetadata, StringLiteralType, StringMappingType, SubstitutionType, TemplateLiteralType, ThisTypePredicate, TimingAccumulators, TimingInfo, TupleType, Type, TypeParameter, TypePredicate, TypePredicateBase, TypeReference, UnionOrIntersectionType, UnionType }; +export declare class API { + private client; + private sourceFileCache; + private toPath; + private initialized; + private activeSnapshots; + private latestSnapshot; + readonly internal: InternalAPI; + constructor(options?: APIOptions | LSPConnectionOptions); + /** + * Create an API instance from an existing LSP connection's API session. + * Use this when connecting to an API pipe provided by an LSP server via custom/initializeAPISession. + */ + static fromLSPConnection(options: LSPConnectionOptions): Promise>; + private ensureInitialized; + parseConfigFile(file: DocumentIdentifier): Promise; + updateSnapshot(params?: FromLSP extends true ? LSPUpdateSnapshotParams : UpdateSnapshotParams): Promise; + close(): Promise; + clearSourceFileCache(): void; + /** + * Returns a snapshot of collected timing information for requests made + * through this API instance: client-measured round-trip latency and bytes + * transferred, folded together with the server's own per-request processing + * time and an estimated transport overhead (round-trip minus server time). + * + * Fetching the snapshot issues a lightweight request to the server to + * retrieve its timing collection. Collection must be enabled via the + * `collectTiming` option; when it is not, the returned snapshot has + * `enabled: false` and zeroed totals. + */ + getTimingInfo(): Promise; + /** Clears all accumulated timing totals and recent-request history, on both the client and the server. */ + resetTimingInfo(): Promise; +} +export declare class InternalAPI { + private client; + private ensureInitialized; + /** @internal */ + constructor(client: Client, ensureInitialized: () => Promise); + startCPUProfile(dir: string): Promise; + stopCPUProfile(): Promise; + saveHeapProfile(dir: string): Promise; +} +export declare class Snapshot { + readonly id: number; + private projectMap; + private toPath; + private client; + private disposed; + private onDispose; + private snapshotRegistry; + constructor(data: UpdateSnapshotResponse, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path, onDispose: () => void); + getProjects(): readonly Project[]; + getProject(configFileName: string): Project | undefined; + getDefaultProjectForFile(file: DocumentIdentifier): Promise; + [globalThis.Symbol.dispose](): void; + dispose(): Promise; + isDisposed(): boolean; + private ensureNotDisposed; +} +declare class SnapshotObjectRegistry { + private readonly symbols; + private readonly client; + private readonly snapshotId; + private readonly resolveProject; + constructor(client: Client, snapshotId: number, resolveProject: (projectId: Path) => Project | undefined); + /** Resolve a project id (a config file path) to its Project within this snapshot. */ + getProject(projectId: Path): Project | undefined; + getOrCreateSymbol(data: SymbolResponse): Symbol; + getSymbol(id: number): Symbol | undefined; + clear(): void; + fetchSymbol(source: Symbol | Signature | Type, method: string, handle: number | undefined, projectId?: Path): Promise; + fetchSymbols(source: Symbol | Signature | Type, method: string, handles?: readonly number[], projectId?: Path): Promise; +} +declare class ProjectObjectRegistry { + private client; + private snapshotId; + private project; + private snapshotRegistry; + private types; + private signatures; + constructor(client: Client, snapshotId: number, project: Project, snapshotRegistry: SnapshotObjectRegistry); + getOrCreateSymbol(data: SymbolResponse): Symbol; + getSymbol(id: number): Symbol | undefined; + getOrCreateType(data: TypeResponse): TypeObject; + getType(id: number): TypeObject | undefined; + getOrCreateSignature(data: SignatureResponse): Signature; + getSignature(id: number): Signature | undefined; + clear(): void; + fetchType(source: Symbol | Signature | Type, method: string, handle: number | false | undefined): Promise; + fetchSymbol(source: Symbol | Signature | Type, method: string, handle: number | undefined): Promise; + fetchSignature(source: Symbol | Signature | Type, method: string, handle: number | undefined): Promise; + fetchTypes(source: Symbol | Signature | Type, method: string, handles?: readonly number[]): Promise; + fetchSymbols(source: Symbol | Signature | Type, method: string, handles?: readonly number[]): Promise; + fetchBaseTypes(source: Type): Promise; +} +export declare class Project { + readonly id: Path; + readonly configFileName: string; + readonly compilerOptions: CompilerOptions; + readonly rootFiles: readonly string[]; + readonly program: Program; + readonly checker: Checker; + readonly emitter: Emitter; + private client; + constructor(data: ProjectResponse, snapshotId: number, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path, snapshotRegistry: SnapshotObjectRegistry); + dispose(): void; +} +export declare class Program { + private snapshotId; + private project; + private client; + private sourceFileCache; + private toPath; + private decoder; + private sourceFileMetadataCache; + constructor(snapshotId: number, project: Project, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path); + getCompilerOptions(): CompilerOptions; + getSourceFile(file: DocumentIdentifier): Promise; + getSourceFileNames(): Promise; + /** + * Returns program-stored metadata for the given source file, or `undefined` if the file + * is not part of the program. Metadata is fetched lazily per file and cached on this + * `Program` instance. + */ + getSourceFileMetadata(fileName: string): Promise; + /** + * Returns program-stored metadata for the source file at the given path, or `undefined` + * if the file is not part of the program. Like {@link getSourceFileMetadata}, but skips + * the file name to path conversion. Metadata is fetched lazily per file and cached on + * this `Program` instance. + */ + getSourceFileMetadataByPath(path: Path): Promise; + private fetchSourceFileMetadata; + /** + * Returns whether the given source file was loaded as part of an external library + * (e.g. a dependency resolved from `node_modules`). The underlying program metadata is + * fetched lazily per file and cached on this `Program` instance. + */ + isSourceFileFromExternalLibrary(file: SourceFile): Promise; + /** + * Returns whether the given source file is a default library file (e.g. `lib.d.ts`). + * The underlying program metadata is fetched lazily per file and cached on this + * `Program` instance. + */ + isSourceFileDefaultLibrary(file: SourceFile): Promise; + /** + * Get syntactic (parse) diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSyntacticDiagnostics(file?: DocumentIdentifier): Promise; + /** + * Get binder diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getBindDiagnostics(file?: DocumentIdentifier): Promise; + /** + * Get semantic (type-check) diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSemanticDiagnostics(file?: DocumentIdentifier): Promise; + /** + * Get suggestion diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSuggestionDiagnostics(file?: DocumentIdentifier): Promise; + /** + * Get declaration emit diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getDeclarationDiagnostics(file?: DocumentIdentifier): Promise; + /** + * Get program-wide diagnostics for the project, including compiler options diagnostics. + */ + getProgramDiagnostics(): Promise; + /** + * Get global (non-file-specific) semantic diagnostics for the project. + */ + getGlobalDiagnostics(): Promise; + /** + * Get config file parsing diagnostics for the project. + */ + getConfigFileParsingDiagnostics(): Promise; +} +export declare class Checker { + private snapshotId; + private project; + private client; + private objectRegistry; + private wellKnownSymbols; + constructor(snapshotId: number, project: Project, client: Client, objectRegistry: ProjectObjectRegistry); + dispose(): void; + getSymbolAtLocation(node: Node): Promise; + getSymbolAtLocation(nodes: readonly Node[]): Promise<(Symbol | undefined)[]>; + getSymbolAtPosition(file: DocumentIdentifier, position: number): Promise; + getSymbolAtPosition(file: DocumentIdentifier, positions: readonly number[]): Promise<(Symbol | undefined)[]>; + getTypeOfSymbol(symbol: Symbol): Promise; + getTypeOfSymbol(symbols: readonly Symbol[]): Promise<(Type | undefined)[]>; + /** + * Get the declared type of a symbol. Always returns a type; for symbols whose + * declared type cannot be determined the checker yields the error type (use + * {@link Type.isErrorType} to detect it). + */ + getDeclaredTypeOfSymbol(symbol: Symbol): Promise; + getReferencesToSymbolInFile(file: DocumentIdentifier, symbol: Symbol): Promise; + getReferencedSymbolsForNode(node: Node, position: number): Promise; + getSignatureUsage(signatureDecl: Node): Promise; + getCompletionsAtPosition(document: string, position: number, options?: CompletionOptions): Promise; + getTypeAtLocation(node: Node): Promise; + getTypeAtLocation(nodes: readonly Node[]): Promise<(Type | undefined)[]>; + getSignaturesOfType(type: Type, kind: SignatureKind): Promise; + getResolvedSignature(node: Node): Promise; + getTypeAtPosition(file: DocumentIdentifier, position: number): Promise; + getTypeAtPosition(file: DocumentIdentifier, positions: readonly number[]): Promise<(Type | undefined)[]>; + resolveName(name: string, meaning: SymbolFlags, location?: Node | DocumentPosition, excludeGlobals?: boolean): Promise; + getResolvedSymbol(node: Identifier): Promise; + getContextualType(node: Expression): Promise; + getBaseTypeOfLiteralType(type: Type): Promise; + getNonNullableType(type: Type): Promise; + getTypeFromTypeNode(node: TypeNode): Promise; + getWidenedType(type: Type): Promise; + getParameterType(signature: Signature, index: number): Promise; + isArrayLikeType(type: Type): Promise; + isTypeAssignableTo(source: Type, target: Type): Promise; + getShorthandAssignmentValueSymbol(node: Node): Promise; + /** + * Get the type of a symbol as narrowed at a specific location. Always returns + * a type; for symbols whose type cannot be determined the checker yields the + * error type (use {@link Type.isErrorType} to detect it). + */ + getTypeOfSymbolAtLocation(symbol: Symbol, location: Node): Promise; + private getIntrinsicType; + getAnyType(): Promise; + getStringType(): Promise; + getNumberType(): Promise; + getBooleanType(): Promise; + getVoidType(): Promise; + getUndefinedType(): Promise; + getNullType(): Promise; + getNeverType(): Promise; + getUnknownType(): Promise; + getBigIntType(): Promise; + getESSymbolType(): Promise; + typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: number): Promise; + signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): Promise; + typeToString(type: Type, enclosingDeclaration?: Node, flags?: number): Promise; + isContextSensitive(node: Node): Promise; + isArrayType(type: Type): Promise; + isTupleType(type: Type): Promise; + getReturnTypeOfSignature(signature: Signature): Promise; + getRestTypeOfSignature(signature: Signature): Promise; + getTypePredicateOfSignature(signature: Signature): Promise; + /** + * Get the base types of a class or interface type. A type with no base types + * yields an empty array. + */ + getBaseTypes(type: InterfaceType): Promise; + getApparentType(type: Type): Promise; + getPropertiesOfType(type: Type): Promise; + getIndexInfosOfType(type: Type): Promise; + /** + * Get the constraint of a type parameter (the `T` in ``), or + * undefined if it has none. + */ + getConstraintOfTypeParameter(type: TypeParameter): Promise; + getBaseConstraintOfType(type: Type): Promise; + getPropertyOfType(type: Type, name: string): Promise; + getConstantValue(node: Node): Promise; + getSignatureFromDeclaration(node: Node): Promise; + getExportSpecifierLocalTargetSymbol(node: Node): Promise; + /** + * Follow all aliases to get the original symbol. Always returns a symbol; for + * an unresolved alias the checker yields the unknown symbol (use + * {@link Checker.isUnknownSymbol} to detect it). + */ + getAliasedSymbol(symbol: Symbol): Promise; + getImmediateAliasedSymbol(symbol: Symbol): Promise; + /** + * Fetch (once, then cache) the handle ids of the per-checker singleton + * symbols (unknown, undefined, arguments). These ids are stable for the life + * of the project's checker, so identity checks against them are local after + * the first call. + */ + private getWellKnownSymbols; + /** + * Returns `true` if the symbol is the checker's "unknown" symbol (e.g. the + * result of {@link Checker.getAliasedSymbol} on an unresolved alias). + */ + isUnknownSymbol(symbol: Symbol): Promise; + /** + * Returns `true` if the symbol is the checker's "undefined" symbol. + */ + isUndefinedSymbol(symbol: Symbol): Promise; + /** + * Returns `true` if the symbol is the checker's "arguments" symbol. + */ + isArgumentsSymbol(symbol: Symbol): Promise; + getExportsOfModule(symbol: Symbol): Promise; + getMemberInModuleExports(symbol: Symbol, name: string): Promise; + getJsDocTagsOfSymbol(symbol: Symbol): Promise; + getDocumentationCommentOfSymbol(symbol: Symbol): Promise; + /** + * Get the type arguments of a type reference (e.g. the `string` in `Array`). + */ + getTypeArguments(type: TypeReference): Promise; +} +export interface PrintNodeOptions { + preserveSourceNewlines?: boolean | undefined; + neverAsciiEscape?: boolean | undefined; + terminateUnterminatedLiterals?: boolean | undefined; +} +export declare class Emitter { + private client; + constructor(client: Client); + printNode(node: Node, options?: PrintNodeOptions): Promise; +} +export declare class NodeHandle { + /** + * The project this handle was produced in, used as the default for {@link resolve}. + * Node handles are only meaningful within a project's program, so the producing project + * is remembered so callers don't have to pass it explicitly. + */ + private readonly canonicalProject; + readonly index: number; + readonly kind: SyntaxKind; + readonly path: Path; + constructor(handle: string, canonicalProject: Project); + /** + * Resolve this handle to the actual AST node by fetching the source file from a project + * and looking up the node by index. If no project is passed, the project that produced + * the handle is used. + */ + resolve(project?: Project): Promise; +} +/** A symbol definition paired with all of its reference nodes. */ +export interface ReferencedSymbolEntry { + /** The node handle for the symbol's definition. */ + definition: NodeHandle; + /** The resolved symbol for the definition, if available. */ + symbol?: Symbol | undefined; + /** The node handles for each reference to the symbol. */ + references: NodeHandle[]; +} +/** A single usage of a signature, pairing the reference name with its call expression (if any). */ +export interface SignatureUsage { + /** The node handle for the name reference. */ + name: NodeHandle; + /** The node handle for the call expression, if the reference is invoked. */ + call?: NodeHandle | undefined; +} +export declare class Symbol { + private objectRegistry; + /** + * The project this symbol was first observed in, used as the default project for + * lookups that need a project context (members/exports/parent). Symbols are shared + * snapshot-wide, so these lookups can otherwise be ambiguous about which project to use. + */ + private readonly canonicalProject; + readonly id: number; + /** The escaped (`__String`) name, used as the key in member/export tables. */ + readonly escapedName: __String; + /** The display name (escaped underscores removed). */ + readonly name: string; + readonly flags: SymbolFlags; + readonly checkFlags: number; + readonly declarations: readonly NodeHandle[]; + readonly valueDeclaration: NodeHandle | undefined; + private readonly parent; + private readonly exportSymbol; + private membersCache; + private exportsCache; + constructor(data: SymbolResponse, objectRegistry: SnapshotObjectRegistry); + getParent(): Promise; + /** + * Get this symbol's members keyed by escaped name. The result is cached on + * the symbol, so repeated calls do not round-trip to the server. + */ + getMembers(): Promise>; + /** + * Get this symbol's exports keyed by escaped name. The result is cached on + * the symbol, so repeated calls do not round-trip to the server. + */ + getExports(): Promise>; + private fetchSymbolTable; + getExportSymbol(): Promise; + getJsDocTags(checker: Checker): Promise; + getDocumentationComment(checker: Checker): Promise; +} +declare class TypeObject implements Type { + private objectRegistry; + readonly id: number; + readonly flags: TypeFlags; + readonly objectFlags: ObjectFlags; + readonly symbol: number; + readonly value: string | number | boolean | bigint; + readonly intrinsicName: string; + readonly isThisType: boolean; + readonly freshType: number; + readonly regularType: number; + readonly target: number; + readonly typeParameters: readonly number[]; + readonly outerTypeParameters: readonly number[]; + readonly localTypeParameters: readonly number[]; + readonly aliasTypeArguments: readonly number[]; + readonly aliasSymbol: number; + readonly elementFlags: readonly ElementFlags[]; + readonly fixedLength: number; + readonly readonly: boolean; + readonly texts: readonly string[]; + readonly objectType: number; + readonly indexType: number; + readonly checkType: number; + readonly extendsType: number; + readonly baseType: number; + readonly substConstraint: number; + private trueType; + private falseType; + constructor(data: TypeResponse, objectRegistry: ProjectObjectRegistry); + getSymbol(): Promise; + getAliasSymbol(): Promise; + getTarget(): Promise; + getFreshType(): Promise; + getRegularType(): Promise; + getTypes(): Promise; + getTypeParameters(): Promise; + getOuterTypeParameters(): Promise; + getLocalTypeParameters(): Promise; + getAliasTypeArguments(): Promise; + getObjectType(): Promise; + getIndexType(): Promise; + getCheckType(): Promise; + getExtendsType(): Promise; + getBaseType(): Promise; + getConstraint(): Promise; + getTrueType(): Promise; + getFalseType(): Promise; + /** + * Get the base types of this type. Returns `undefined` for any type that is + * not a class or interface. + */ + getBaseTypes(): Promise; + isClassOrInterface(): this is InterfaceType; + isUnionType(): this is UnionType; + isIntersectionType(): this is IntersectionType; + isObjectType(): this is ObjectType; + isIntrinsicType(): this is IntrinsicType; + isErrorType(): boolean; + isLiteralType(): this is LiteralType; + isStringLiteralType(): this is StringLiteralType; + isNumberLiteralType(): this is NumberLiteralType; + isBigIntLiteralType(): this is BigIntLiteralType; + isBooleanLiteralType(): this is BooleanLiteralType; + isTypeReference(): this is TypeReference; + isTupleType(): this is TupleType; + isIndexType(): this is IndexType; + isIndexedAccessType(): this is IndexedAccessType; + isConditionalType(): this is ConditionalType; + isSubstitutionType(): this is SubstitutionType; + isTemplateLiteralType(): this is TemplateLiteralType; + isStringMappingType(): this is StringMappingType; + isTypeParameter(): this is TypeParameter; +} +export declare function isUnionType(type: Type): type is UnionType; +export declare function isIntersectionType(type: Type): type is IntersectionType; +export declare function isObjectType(type: Type): type is ObjectType; +export declare function isClassOrInterfaceType(type: Type): type is InterfaceType; +export declare function isIntrinsicType(type: Type): type is IntrinsicType; +/** + * Whether this is the error type — the placeholder the checker produces when a + * type cannot be determined (e.g. an unresolved reference). It is an intrinsic + * type named `"error"` (this covers both the singleton error type and the + * per-alias error types manufactured for unresolved type alias references). + */ +export declare function isErrorType(type: Type): boolean; +export declare function isLiteralType(type: Type): type is LiteralType; +export declare function isStringLiteralType(type: Type): type is StringLiteralType; +export declare function isNumberLiteralType(type: Type): type is NumberLiteralType; +export declare function isBigIntLiteralType(type: Type): type is BigIntLiteralType; +export declare function isBooleanLiteralType(type: Type): type is BooleanLiteralType; +export declare function isTypeReference(type: Type): type is TypeReference; +export declare function isTupleType(type: Type): type is TupleType; +export declare function isIndexType(type: Type): type is IndexType; +export declare function isIndexedAccessType(type: Type): type is IndexedAccessType; +export declare function isConditionalType(type: Type): type is ConditionalType; +export declare function isSubstitutionType(type: Type): type is SubstitutionType; +export declare function isTemplateLiteralType(type: Type): type is TemplateLiteralType; +export declare function isStringMappingType(type: Type): type is StringMappingType; +export declare function isTypeParameter(type: Type): type is TypeParameter; +export declare class Signature { + private flags; + private objectRegistry; + readonly id: number; + readonly declaration?: NodeHandle | undefined; + readonly typeParameters?: readonly number[] | undefined; + readonly parameters: readonly number[]; + readonly thisParameter?: number | undefined; + readonly target?: number | undefined; + constructor(data: SignatureResponse, project: Project, objectRegistry: ProjectObjectRegistry); + getTypeParameters(): Promise; + getParameters(): Promise; + getThisParameter(): Promise; + getTarget(): Promise; + get hasRestParameter(): boolean; + get isConstruct(): boolean; + get isAbstract(): boolean; +} +//# sourceMappingURL=api.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/api.d.ts.map b/node_modules/typescript/dist/api/async/api.d.ts.map new file mode 100644 index 0000000..5dfbc7d --- /dev/null +++ b/node_modules/typescript/dist/api/async/api.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/api/async/api.ts"],"names":[],"mappings":";A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AU,IAAI,OAAO,CAExB;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/api.js b/node_modules/typescript/dist/api/async/api.js new file mode 100644 index 0000000..78993ae --- /dev/null +++ b/node_modules/typescript/dist/api/async/api.js @@ -0,0 +1,1657 @@ +/// +import { CompletionItemKind } from "#enums/completionItemKind"; +import { DiagnosticCategory } from "#enums/diagnosticCategory"; +import { ElementFlags } from "#enums/elementFlags"; +import { ModuleKind } from "#enums/moduleKind"; +import { NodeBuilderFlags } from "#enums/nodeBuilderFlags"; +import { ObjectFlags } from "#enums/objectFlags"; +import { SignatureFlags } from "#enums/signatureFlags"; +import { SignatureKind } from "#enums/signatureKind"; +import { SymbolFlags } from "#enums/symbolFlags"; +import { TypeFlags } from "#enums/typeFlags"; +import { TypePredicateKind } from "#enums/typePredicateKind"; +import { ModifierFlags, unescapeLeadingUnderscores, } from "../../ast/index.js"; +import { encodeNode, uint8ArrayToBase64, } from "../node/encoder.js"; +import { decodeNode, getNodeId, parseNodeHandle, readParseOptionsKey, readSourceFileHash, RemoteSourceFile, } from "../node/node.js"; +import { Wtf8Decoder } from "../node/wtf8.js"; +import { createGetCanonicalFileName, toPath, } from "../path.js"; +import { resolveFileName, toUpdateSnapshotRequest, } from "../proto.js"; +import { SourceFileCache } from "../sourceFileCache.js"; +import { Client, } from "./client.js"; +export { documentURIToFileName, fileNameToDocumentURI } from "../path.js"; +export { CompletionItemKind, DiagnosticCategory, ElementFlags, ModifierFlags, ModuleKind, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypePredicateKind }; +export class API { + client; + sourceFileCache; + toPath; + initialized = false; + activeSnapshots = new Set(); + latestSnapshot; + internal; + constructor(options = {}) { + this.client = new Client(options); + this.sourceFileCache = new SourceFileCache(); + this.internal = new InternalAPI(this.client, () => this.ensureInitialized()); + } + /** + * Create an API instance from an existing LSP connection's API session. + * Use this when connecting to an API pipe provided by an LSP server via custom/initializeAPISession. + */ + static async fromLSPConnection(options) { + const api = new API(options); + await api.ensureInitialized(); + return api; + } + async ensureInitialized() { + if (!this.initialized) { + const response = await this.client.apiRequest("initialize", null); + const getCanonicalFileName = createGetCanonicalFileName(response.useCaseSensitiveFileNames); + const currentDirectory = response.currentDirectory; + this.toPath = (fileName) => toPath(fileName, currentDirectory, getCanonicalFileName); + this.initialized = true; + } + } + async parseConfigFile(file) { + await this.ensureInitialized(); + return this.client.apiRequest("parseConfigFile", { file }); + } + async updateSnapshot(params) { + await this.ensureInitialized(); + const requestParams = toUpdateSnapshotRequest(params); + const data = await this.client.apiRequest("updateSnapshot", requestParams); + // Retain cached source files from previous snapshot for unchanged files + if (this.latestSnapshot) { + this.sourceFileCache.retainForSnapshot(data.snapshot, this.latestSnapshot.id, data.changes); + if (this.latestSnapshot.isDisposed()) { + this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id); + } + } + const snapshot = new Snapshot(data, this.client, this.sourceFileCache, this.toPath, () => { + this.activeSnapshots.delete(snapshot); + if (snapshot !== this.latestSnapshot) { + this.sourceFileCache.releaseSnapshot(snapshot.id); + } + }); + this.latestSnapshot = snapshot; + this.activeSnapshots.add(snapshot); + return snapshot; + } + async close() { + // Dispose all active snapshots + for (const snapshot of [...this.activeSnapshots]) { + await snapshot.dispose(); + } + // Release the latest snapshot's cache refs if still held + if (this.latestSnapshot) { + this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id); + this.latestSnapshot = undefined; + } + await this.client.close(); + this.sourceFileCache.clear(); + } + clearSourceFileCache() { + this.sourceFileCache.clear(); + } + /** + * Returns a snapshot of collected timing information for requests made + * through this API instance: client-measured round-trip latency and bytes + * transferred, folded together with the server's own per-request processing + * time and an estimated transport overhead (round-trip minus server time). + * + * Fetching the snapshot issues a lightweight request to the server to + * retrieve its timing collection. Collection must be enabled via the + * `collectTiming` option; when it is not, the returned snapshot has + * `enabled: false` and zeroed totals. + */ + getTimingInfo() { + return this.client.getTimingInfo(); + } + /** Clears all accumulated timing totals and recent-request history, on both the client and the server. */ + resetTimingInfo() { + return this.client.resetTimingInfo(); + } +} +export class InternalAPI { + client; + ensureInitialized; + /** @internal */ + constructor(client, ensureInitialized) { + this.client = client; + this.ensureInitialized = ensureInitialized; + } + async startCPUProfile(dir) { + await this.ensureInitialized(); + await this.client.apiRequest("startCPUProfile", { dir }); + } + async stopCPUProfile() { + await this.ensureInitialized(); + const result = await this.client.apiRequest("stopCPUProfile", null); + return result.file; + } + async saveHeapProfile(dir) { + await this.ensureInitialized(); + const result = await this.client.apiRequest("saveHeapProfile", { dir }); + return result.file; + } +} +export class Snapshot { + id; + projectMap; + toPath; + client; + disposed = false; + onDispose; + snapshotRegistry; + constructor(data, client, sourceFileCache, toPath, onDispose) { + this.id = data.snapshot; + this.client = client; + this.toPath = toPath; + this.onDispose = onDispose; + this.projectMap = new Map(); + this.snapshotRegistry = new SnapshotObjectRegistry(client, this.id, projectId => this.projectMap.get(projectId)); + for (const projData of data.projects) { + const project = new Project(projData, this.id, client, sourceFileCache, toPath, this.snapshotRegistry); + this.projectMap.set(toPath(projData.configFileName), project); + } + } + getProjects() { + this.ensureNotDisposed(); + return [...this.projectMap.values()]; + } + getProject(configFileName) { + this.ensureNotDisposed(); + return this.projectMap.get(this.toPath(configFileName)); + } + async getDefaultProjectForFile(file) { + this.ensureNotDisposed(); + const data = await this.client.apiRequest("getDefaultProjectForFile", { + snapshot: this.id, + file, + }); + if (!data) + return undefined; + return this.projectMap.get(this.toPath(data.configFileName)); + } + [globalThis.Symbol.dispose]() { + this.dispose(); + } + async dispose() { + if (this.disposed) + return; + this.disposed = true; + for (const project of this.projectMap.values()) { + project.dispose(); + } + this.projectMap.clear(); + this.snapshotRegistry.clear(); + this.onDispose(); + await this.client.apiRequest("release", { snapshot: this.id }); + } + isDisposed() { + return this.disposed; + } + ensureNotDisposed() { + if (this.disposed) { + throw new Error("Snapshot is disposed"); + } + } +} +class SnapshotObjectRegistry { + symbols = new Map(); + client; + snapshotId; + resolveProject; + constructor(client, snapshotId, resolveProject) { + this.client = client; + this.snapshotId = snapshotId; + this.resolveProject = resolveProject; + } + /** Resolve a project id (a config file path) to its Project within this snapshot. */ + getProject(projectId) { + return this.resolveProject(projectId); + } + getOrCreateSymbol(data) { + let symbol = this.symbols.get(data.id); + if (!symbol) { + symbol = new Symbol(data, this); + this.symbols.set(data.id, symbol); + } + return symbol; + } + getSymbol(id) { + return this.symbols.get(id); + } + clear() { + this.symbols.clear(); + } + async fetchSymbol(source, method, handle, projectId) { + if (!handle) + return undefined; + const cached = this.getSymbol(handle); + if (cached) + return cached; + const data = await this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: projectId, + objectId: source.id, + }); + if (!data) + throw new Error(`${method} returned null symbol for ${source.constructor.name} ${source.id}`); + return this.getOrCreateSymbol(data); + } + async fetchSymbols(source, method, handles, projectId) { + if (handles) { + const result = new Array(handles.length); + let allCached = true; + for (let i = 0; i < handles.length; i++) { + const cached = this.getSymbol(handles[i]); + if (!cached) { + allCached = false; + break; + } + result[i] = cached; + } + if (allCached) + return result; + } + const symbolData = await this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: projectId, + objectId: source.id, + }); + if (symbolData == null) + return []; + else + return symbolData.map(data => this.getOrCreateSymbol(data)); + } +} +class ProjectObjectRegistry { + client; + snapshotId; + project; + snapshotRegistry; + types = new Map(); + signatures = new Map(); + constructor(client, snapshotId, project, snapshotRegistry) { + this.client = client; + this.snapshotId = snapshotId; + this.project = project; + this.snapshotRegistry = snapshotRegistry; + } + getOrCreateSymbol(data) { + return this.snapshotRegistry.getOrCreateSymbol(data); + } + getSymbol(id) { + return this.snapshotRegistry.getSymbol(id); + } + getOrCreateType(data) { + let type = this.types.get(data.id); + if (!type) { + type = new TypeObject(data, this); + this.types.set(data.id, type); + } + return type; + } + getType(id) { + return this.types.get(id); + } + getOrCreateSignature(data) { + let sig = this.signatures.get(data.id); + if (!sig) { + sig = new Signature(data, this.project, this); + this.signatures.set(data.id, sig); + } + return sig; + } + getSignature(id) { + return this.signatures.get(id); + } + clear() { + this.types.clear(); + this.signatures.clear(); + } + async fetchType(source, method, handle) { + if (handle !== false) { + if (!handle) + return undefined; + const cached = this.getType(handle); + if (cached) + return cached; + } + const data = await this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: this.project.id, + objectId: source.id, + }); + if (!data) + throw new Error(`${method} returned null type for ${source.constructor.name} ${source.id}`); + return this.getOrCreateType(data); + } + async fetchSymbol(source, method, handle) { + return this.snapshotRegistry.fetchSymbol(source, method, handle, this.project.id); + } + async fetchSignature(source, method, handle) { + if (!handle) + return undefined; + const cached = this.getSignature(handle); + if (cached) + return cached; + const data = await this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: this.project.id, + objectId: source.id, + }); + if (!data) + throw new Error(`${method} returned null signature for ${source.constructor.name} ${source.id}`); + return this.getOrCreateSignature(data); + } + async fetchTypes(source, method, handles) { + if (handles) { + const result = new Array(handles.length); + let allCached = true; + for (let i = 0; i < handles.length; i++) { + const cached = this.getType(handles[i]); + if (!cached) { + allCached = false; + break; + } + result[i] = cached; + } + if (allCached) + return result; + } + const typesData = await this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: this.project.id, + objectId: source.id, + }); + if (typesData == null) + return []; + else + return typesData.map(data => this.getOrCreateType(data)); + } + async fetchSymbols(source, method, handles) { + return this.snapshotRegistry.fetchSymbols(source, method, handles, this.project.id); + } + // getBaseTypes is a checker-level endpoint keyed by `type` (not `objectId`), + // so it cannot go through fetchTypes. This helper reuses that server method. + async fetchBaseTypes(source) { + const typesData = await this.client.apiRequest("getBaseTypes", { + snapshot: this.snapshotId, + project: this.project.id, + type: source.id, + }); + if (typesData == null) + return []; + return typesData.map(data => this.getOrCreateType(data)); + } +} +export class Project { + id; + configFileName; + compilerOptions; + rootFiles; + program; + checker; + emitter; + client; + constructor(data, snapshotId, client, sourceFileCache, toPath, snapshotRegistry) { + this.id = data.id; + this.configFileName = data.configFileName; + this.compilerOptions = data.compilerOptions; + this.rootFiles = data.rootFiles; + this.client = client; + this.program = new Program(snapshotId, this, client, sourceFileCache, toPath); + const objectRegistry = new ProjectObjectRegistry(client, snapshotId, this, snapshotRegistry); + this.checker = new Checker(snapshotId, this, client, objectRegistry); + this.emitter = new Emitter(client); + } + dispose() { + this.checker.dispose(); + } +} +export class Program { + snapshotId; + project; + client; + sourceFileCache; + toPath; + decoder = new Wtf8Decoder(); + sourceFileMetadataCache = new Map(); + constructor(snapshotId, project, client, sourceFileCache, toPath) { + this.snapshotId = snapshotId; + this.project = project; + this.client = client; + this.sourceFileCache = sourceFileCache; + this.toPath = toPath; + } + getCompilerOptions() { + return this.project.compilerOptions; + } + async getSourceFile(file) { + const fileName = resolveFileName(file); + const path = this.toPath(fileName); + // Check if we already have a retained cache entry for this (snapshot, project) pair + const retained = this.sourceFileCache.getRetained(path, this.snapshotId, this.project.id); + if (retained) { + return retained; + } + // Fetch from server + const binaryData = await this.client.apiRequestBinary("getSourceFile", { + snapshot: this.snapshotId, + project: this.project.id, + file, + }); + if (!binaryData) { + return undefined; + } + const view = new DataView(binaryData.buffer, binaryData.byteOffset, binaryData.byteLength); + const contentHash = readSourceFileHash(view); + const parseOptionsKey = readParseOptionsKey(view); + // Create a new RemoteSourceFile and cache it (set returns existing if hash matches) + const sourceFile = new RemoteSourceFile(binaryData, this.decoder, this.client.getTimingCollector()); + return this.sourceFileCache.set(path, sourceFile, parseOptionsKey, contentHash, this.snapshotId, this.project.id); + } + async getSourceFileNames() { + const data = await this.client.apiRequest("getSourceFileNames", { + snapshot: this.snapshotId, + project: this.project.id, + }); + return data ?? []; + } + /** + * Returns program-stored metadata for the given source file, or `undefined` if the file + * is not part of the program. Metadata is fetched lazily per file and cached on this + * `Program` instance. + */ + getSourceFileMetadata(fileName) { + return this.getSourceFileMetadataByPath(this.toPath(fileName)); + } + /** + * Returns program-stored metadata for the source file at the given path, or `undefined` + * if the file is not part of the program. Like {@link getSourceFileMetadata}, but skips + * the file name to path conversion. Metadata is fetched lazily per file and cached on + * this `Program` instance. + */ + getSourceFileMetadataByPath(path) { + let metadata = this.sourceFileMetadataCache.get(path); + if (metadata === undefined) { + metadata = this.fetchSourceFileMetadata(path); + this.sourceFileMetadataCache.set(path, metadata); + } + return metadata; + } + async fetchSourceFileMetadata(path) { + const data = await this.client.apiRequest("getSourceFileMetadata", { + snapshot: this.snapshotId, + project: this.project.id, + file: path, + }); + return data ?? undefined; + } + /** + * Returns whether the given source file was loaded as part of an external library + * (e.g. a dependency resolved from `node_modules`). The underlying program metadata is + * fetched lazily per file and cached on this `Program` instance. + */ + async isSourceFileFromExternalLibrary(file) { + const metadata = await this.getSourceFileMetadataByPath(file.path); + return metadata?.isFromExternalLibrary ?? false; + } + /** + * Returns whether the given source file is a default library file (e.g. `lib.d.ts`). + * The underlying program metadata is fetched lazily per file and cached on this + * `Program` instance. + */ + async isSourceFileDefaultLibrary(file) { + const metadata = await this.getSourceFileMetadataByPath(file.path); + return metadata?.isDefaultLibrary ?? false; + } + /** + * Get syntactic (parse) diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + async getSyntacticDiagnostics(file) { + const data = await this.client.apiRequest("getSyntacticDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get binder diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + async getBindDiagnostics(file) { + const data = await this.client.apiRequest("getBindDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get semantic (type-check) diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + async getSemanticDiagnostics(file) { + const data = await this.client.apiRequest("getSemanticDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get suggestion diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + async getSuggestionDiagnostics(file) { + const data = await this.client.apiRequest("getSuggestionDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get declaration emit diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + async getDeclarationDiagnostics(file) { + const data = await this.client.apiRequest("getDeclarationDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get program-wide diagnostics for the project, including compiler options diagnostics. + */ + async getProgramDiagnostics() { + const data = await this.client.apiRequest("getProgramDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + }); + return data ?? []; + } + /** + * Get global (non-file-specific) semantic diagnostics for the project. + */ + async getGlobalDiagnostics() { + const data = await this.client.apiRequest("getGlobalDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + }); + return data ?? []; + } + /** + * Get config file parsing diagnostics for the project. + */ + async getConfigFileParsingDiagnostics() { + const data = await this.client.apiRequest("getConfigFileParsingDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + }); + return data ?? []; + } +} +export class Checker { + snapshotId; + project; + client; + objectRegistry; + wellKnownSymbols; + constructor(snapshotId, project, client, objectRegistry) { + this.snapshotId = snapshotId; + this.project = project; + this.client = client; + this.objectRegistry = objectRegistry; + } + dispose() { + this.objectRegistry.clear(); + } + async getSymbolAtLocation(nodeOrNodes) { + if (Array.isArray(nodeOrNodes)) { + const data = await this.client.apiRequest("getSymbolsAtLocations", { + snapshot: this.snapshotId, + project: this.project.id, + locations: nodeOrNodes.map(node => getNodeId(node)), + }); + return data.map(d => d ? this.objectRegistry.getOrCreateSymbol(d) : undefined); + } + const data = await this.client.apiRequest("getSymbolAtLocation", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(nodeOrNodes), + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + async getSymbolAtPosition(file, positionOrPositions) { + if (typeof positionOrPositions === "number") { + const data = await this.client.apiRequest("getSymbolAtPosition", { + snapshot: this.snapshotId, + project: this.project.id, + file, + position: positionOrPositions, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + const data = await this.client.apiRequest("getSymbolsAtPositions", { + snapshot: this.snapshotId, + project: this.project.id, + file, + positions: positionOrPositions, + }); + return data.map(d => d ? this.objectRegistry.getOrCreateSymbol(d) : undefined); + } + async getTypeOfSymbol(symbolOrSymbols) { + if (Array.isArray(symbolOrSymbols)) { + const data = await this.client.apiRequest("getTypesOfSymbols", { + snapshot: this.snapshotId, + project: this.project.id, + symbols: symbolOrSymbols.map(s => s.id), + }); + return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined); + } + const data = await this.client.apiRequest("getTypeOfSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbolOrSymbols.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + /** + * Get the declared type of a symbol. Always returns a type; for symbols whose + * declared type cannot be determined the checker yields the error type (use + * {@link Type.isErrorType} to detect it). + */ + async getDeclaredTypeOfSymbol(symbol) { + const data = await this.client.apiRequest("getDeclaredTypeOfSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + if (!data) + throw new Error(`getDeclaredTypeOfSymbol returned no type for symbol ${symbol.id}`); + return this.objectRegistry.getOrCreateType(data); + } + async getReferencesToSymbolInFile(file, symbol) { + const data = await this.client.apiRequest("getReferencesToSymbolInFile", { + snapshot: this.snapshotId, + project: this.project.id, + file, + symbol: symbol.id, + }); + return (data ?? []).map(h => new NodeHandle(h, this.project)); + } + async getReferencedSymbolsForNode(node, position) { + const data = await this.client.apiRequest("getReferencedSymbolsForNode", { + snapshot: this.snapshotId, + project: this.project.id, + node: getNodeId(node), + position, + }); + return (data ?? []).map(entry => ({ + definition: new NodeHandle(entry.definition, this.project), + symbol: entry.symbol ? this.objectRegistry.getOrCreateSymbol(entry.symbol) : undefined, + references: (entry.references ?? []).map(h => new NodeHandle(h, this.project)), + })); + } + async getSignatureUsage(signatureDecl) { + const data = await this.client.apiRequest("getSignatureUsages", { + snapshot: this.snapshotId, + project: this.project.id, + signatureDecl: getNodeId(signatureDecl), + }); + return (data ?? []).map(entry => ({ + name: new NodeHandle(entry.name, this.project), + call: entry.call ? new NodeHandle(entry.call, this.project) : undefined, + })); + } + async getCompletionsAtPosition(document, position, options) { + const data = await this.client.apiRequest("getCompletionsAtPosition", { + snapshot: this.snapshotId, + project: this.project.id, + file: document, + position, + triggerCharacter: options?.triggerCharacter, + includeSymbol: options?.includeSymbol, + }); + if (!data) + return undefined; + return { + isIncomplete: data.isIncomplete, + entries: data.entries.map(e => ({ + ...e, + symbol: e.symbol ? this.objectRegistry.getOrCreateSymbol(e.symbol) : undefined, + })), + }; + } + async getTypeAtLocation(nodeOrNodes) { + if (Array.isArray(nodeOrNodes)) { + const data = await this.client.apiRequest("getTypeAtLocations", { + snapshot: this.snapshotId, + project: this.project.id, + locations: nodeOrNodes.map(node => getNodeId(node)), + }); + return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined); + } + const data = await this.client.apiRequest("getTypeAtLocation", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(nodeOrNodes), + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getSignaturesOfType(type, kind) { + const data = await this.client.apiRequest("getSignaturesOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + kind, + }); + return data.map(d => this.objectRegistry.getOrCreateSignature(d)); + } + async getResolvedSignature(node) { + const data = await this.client.apiRequest("getResolvedSignature", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateSignature(data) : undefined; + } + async getTypeAtPosition(file, positionOrPositions) { + if (typeof positionOrPositions === "number") { + const data = await this.client.apiRequest("getTypeAtPosition", { + snapshot: this.snapshotId, + project: this.project.id, + file, + position: positionOrPositions, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + const data = await this.client.apiRequest("getTypesAtPositions", { + snapshot: this.snapshotId, + project: this.project.id, + file, + positions: positionOrPositions, + }); + return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined); + } + async resolveName(name, meaning, location, excludeGlobals) { + // Distinguish Node (has `kind`) from DocumentPosition (has `document` and `position`) + const isNode = location && "kind" in location; + const data = await this.client.apiRequest("resolveName", { + snapshot: this.snapshotId, + project: this.project.id, + name, + meaning, + location: isNode ? getNodeId(location) : undefined, + file: !isNode && location ? location.document : undefined, + position: !isNode && location ? location.position : undefined, + excludeGlobals, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + async getResolvedSymbol(node) { + const text = node.text; + if (!text) + return undefined; + return this.resolveName(text, SymbolFlags.Value | SymbolFlags.ExportValue, node); + } + async getContextualType(node) { + const data = await this.client.apiRequest("getContextualType", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getBaseTypeOfLiteralType(type) { + const data = await this.client.apiRequest("getBaseTypeOfLiteralType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getNonNullableType(type) { + const data = await this.client.apiRequest("getNonNullableType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getTypeFromTypeNode(node) { + const data = await this.client.apiRequest("getTypeFromTypeNode", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getWidenedType(type) { + const data = await this.client.apiRequest("getWidenedType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getParameterType(signature, index) { + const data = await this.client.apiRequest("getParameterType", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + index, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async isArrayLikeType(type) { + return this.client.apiRequest("isArrayLikeType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + } + async isTypeAssignableTo(source, target) { + return this.client.apiRequest("isTypeAssignableTo", { + snapshot: this.snapshotId, + project: this.project.id, + source: source.id, + target: target.id, + }); + } + async getShorthandAssignmentValueSymbol(node) { + const data = await this.client.apiRequest("getShorthandAssignmentValueSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + /** + * Get the type of a symbol as narrowed at a specific location. Always returns + * a type; for symbols whose type cannot be determined the checker yields the + * error type (use {@link Type.isErrorType} to detect it). + */ + async getTypeOfSymbolAtLocation(symbol, location) { + const data = await this.client.apiRequest("getTypeOfSymbolAtLocation", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + location: getNodeId(location), + }); + if (!data) + throw new Error(`getTypeOfSymbolAtLocation returned no type for symbol ${symbol.id}`); + return this.objectRegistry.getOrCreateType(data); + } + async getIntrinsicType(method) { + const data = await this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: this.project.id, + }); + return this.objectRegistry.getOrCreateType(data); + } + async getAnyType() { + return this.getIntrinsicType("getAnyType"); + } + async getStringType() { + return this.getIntrinsicType("getStringType"); + } + async getNumberType() { + return this.getIntrinsicType("getNumberType"); + } + async getBooleanType() { + return this.getIntrinsicType("getBooleanType"); + } + async getVoidType() { + return this.getIntrinsicType("getVoidType"); + } + async getUndefinedType() { + return this.getIntrinsicType("getUndefinedType"); + } + async getNullType() { + return this.getIntrinsicType("getNullType"); + } + async getNeverType() { + return this.getIntrinsicType("getNeverType"); + } + async getUnknownType() { + return this.getIntrinsicType("getUnknownType"); + } + async getBigIntType() { + return this.getIntrinsicType("getBigIntType"); + } + async getESSymbolType() { + return this.getIntrinsicType("getESSymbolType"); + } + async typeToTypeNode(type, enclosingDeclaration, flags) { + const binaryData = await this.client.apiRequestBinary("typeToTypeNode", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined, + flags, + }); + if (!binaryData) + return undefined; + return decodeNode(binaryData); + } + async signatureToSignatureDeclaration(signature, kind, enclosingDeclaration, flags) { + const binaryData = await this.client.apiRequestBinary("signatureToSignatureDeclaration", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + kind, + location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined, + flags, + }); + if (!binaryData) + return undefined; + return decodeNode(binaryData); + } + async typeToString(type, enclosingDeclaration, flags) { + return this.client.apiRequest("typeToString", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined, + flags, + }); + } + async isContextSensitive(node) { + return this.client.apiRequest("isContextSensitive", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + } + async isArrayType(type) { + return this.client.apiRequest("isArrayType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + } + async isTupleType(type) { + return this.client.apiRequest("isTupleType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + } + async getReturnTypeOfSignature(signature) { + const data = await this.client.apiRequest("getReturnTypeOfSignature", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getRestTypeOfSignature(signature) { + const data = await this.client.apiRequest("getRestTypeOfSignature", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getTypePredicateOfSignature(signature) { + const data = await this.client.apiRequest("getTypePredicateOfSignature", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + }); + if (!data) + return undefined; + return { + kind: data.kind, + parameterIndex: data.parameterIndex, + parameterName: data.parameterName, + type: data.type ? this.objectRegistry.getOrCreateType(data.type) : undefined, + }; + } + /** + * Get the base types of a class or interface type. A type with no base types + * yields an empty array. + */ + async getBaseTypes(type) { + const data = await this.client.apiRequest("getBaseTypes", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? data.map(d => this.objectRegistry.getOrCreateType(d)) : []; + } + async getApparentType(type) { + const data = await this.client.apiRequest("getApparentType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getPropertiesOfType(type) { + const data = await this.client.apiRequest("getPropertiesOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? data.map(d => this.objectRegistry.getOrCreateSymbol(d)) : []; + } + async getIndexInfosOfType(type) { + const data = await this.client.apiRequest("getIndexInfosOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + if (!data) + return []; + return data.map(d => ({ + keyType: this.objectRegistry.getOrCreateType(d.keyType), + valueType: this.objectRegistry.getOrCreateType(d.valueType), + isReadonly: d.isReadonly ?? false, + declaration: d.declaration ? new NodeHandle(d.declaration, this.project) : undefined, + })); + } + /** + * Get the constraint of a type parameter (the `T` in ``), or + * undefined if it has none. + */ + async getConstraintOfTypeParameter(type) { + const data = await this.client.apiRequest("getConstraintOfTypeParameter", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getBaseConstraintOfType(type) { + const data = await this.client.apiRequest("getBaseConstraintOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getPropertyOfType(type, name) { + const data = await this.client.apiRequest("getPropertyOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + name, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + async getConstantValue(node) { + const data = await this.client.apiRequest("getConstantValue", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ?? undefined; + } + async getSignatureFromDeclaration(node) { + const data = await this.client.apiRequest("getSignatureFromDeclaration", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateSignature(data) : undefined; + } + async getExportSpecifierLocalTargetSymbol(node) { + const data = await this.client.apiRequest("getExportSpecifierLocalTargetSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + /** + * Follow all aliases to get the original symbol. Always returns a symbol; for + * an unresolved alias the checker yields the unknown symbol (use + * {@link Checker.isUnknownSymbol} to detect it). + */ + async getAliasedSymbol(symbol) { + const data = await this.client.apiRequest("getAliasedSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + if (!data) + throw new Error(`getAliasedSymbol returned no symbol for symbol ${symbol.id}`); + return this.objectRegistry.getOrCreateSymbol(data); + } + async getImmediateAliasedSymbol(symbol) { + const data = await this.client.apiRequest("getImmediateAliasedSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + /** + * Fetch (once, then cache) the handle ids of the per-checker singleton + * symbols (unknown, undefined, arguments). These ids are stable for the life + * of the project's checker, so identity checks against them are local after + * the first call. + */ + getWellKnownSymbols() { + return this.wellKnownSymbols ??= this.client.apiRequest("getWellKnownSymbols", { + snapshot: this.snapshotId, + project: this.project.id, + }); + } + /** + * Returns `true` if the symbol is the checker's "unknown" symbol (e.g. the + * result of {@link Checker.getAliasedSymbol} on an unresolved alias). + */ + async isUnknownSymbol(symbol) { + return symbol.id === (await this.getWellKnownSymbols()).unknown; + } + /** + * Returns `true` if the symbol is the checker's "undefined" symbol. + */ + async isUndefinedSymbol(symbol) { + return symbol.id === (await this.getWellKnownSymbols()).undefined; + } + /** + * Returns `true` if the symbol is the checker's "arguments" symbol. + */ + async isArgumentsSymbol(symbol) { + return symbol.id === (await this.getWellKnownSymbols()).arguments; + } + async getExportsOfModule(symbol) { + const data = await this.client.apiRequest("getExportsOfModule", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + return data ? data.map(d => this.objectRegistry.getOrCreateSymbol(d)) : []; + } + async getMemberInModuleExports(symbol, name) { + const data = await this.client.apiRequest("getMemberInModuleExports", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + name, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + async getJsDocTagsOfSymbol(symbol) { + const data = await this.client.apiRequest("getJsDocTags", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + return data ?? []; + } + async getDocumentationCommentOfSymbol(symbol) { + return this.client.apiRequest("getDocumentationComment", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + } + /** + * Get the type arguments of a type reference (e.g. the `string` in `Array`). + */ + async getTypeArguments(type) { + const data = await this.client.apiRequest("getTypeArguments", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? data.map(d => this.objectRegistry.getOrCreateType(d)) : []; + } +} +export class Emitter { + client; + constructor(client) { + this.client = client; + } + async printNode(node, options = {}) { + const encoded = encodeNode(node); + const base64 = uint8ArrayToBase64(encoded); + return this.client.apiRequest("printNode", { + data: base64, + ...options, + }); + } +} +export class NodeHandle { + /** + * The project this handle was produced in, used as the default for {@link resolve}. + * Node handles are only meaningful within a project's program, so the producing project + * is remembered so callers don't have to pass it explicitly. + */ + canonicalProject; + index; + kind; + path; + constructor(handle, canonicalProject) { + const parsed = parseNodeHandle(handle); + this.index = parsed.index; + this.kind = parsed.kind; + this.path = parsed.path; + this.canonicalProject = canonicalProject; + } + /** + * Resolve this handle to the actual AST node by fetching the source file from a project + * and looking up the node by index. If no project is passed, the project that produced + * the handle is used. + */ + async resolve(project = this.canonicalProject) { + const sourceFile = await project.program.getSourceFile(this.path); + if (!sourceFile) { + return undefined; + } + return sourceFile.getOrCreateNodeAtIndex(this.index); + } +} +export class Symbol { + objectRegistry; + /** + * The project this symbol was first observed in, used as the default project for + * lookups that need a project context (members/exports/parent). Symbols are shared + * snapshot-wide, so these lookups can otherwise be ambiguous about which project to use. + */ + canonicalProject; + id; + /** The escaped (`__String`) name, used as the key in member/export tables. */ + escapedName; + /** The display name (escaped underscores removed). */ + name; + flags; + checkFlags; + declarations; + valueDeclaration; + parent; + exportSymbol; + membersCache; + exportsCache; + constructor(data, objectRegistry) { + this.objectRegistry = objectRegistry; + this.id = data.id; + this.escapedName = data.name; + this.name = unescapeLeadingUnderscores(data.name); + this.flags = data.flags; + this.checkFlags = data.checkFlags; + const canonicalProject = objectRegistry.getProject(data.project); + if (!canonicalProject) { + throw new Error(`Symbol ${data.id} references unknown canonical project '${data.project}'`); + } + this.canonicalProject = canonicalProject; + this.declarations = (data.declarations ?? []).map(d => new NodeHandle(d, canonicalProject)); + this.valueDeclaration = data.valueDeclaration ? new NodeHandle(data.valueDeclaration, canonicalProject) : undefined; + if (data.parent !== undefined) + this.parent = data.parent; + if (data.exportSymbol !== undefined) + this.exportSymbol = data.exportSymbol; + } + async getParent() { + return this.objectRegistry.fetchSymbol(this, "getParentOfSymbol", this.parent, this.canonicalProject.id); + } + /** + * Get this symbol's members keyed by escaped name. The result is cached on + * the symbol, so repeated calls do not round-trip to the server. + */ + getMembers() { + return this.membersCache ??= this.fetchSymbolTable("getMembersOfSymbol"); + } + /** + * Get this symbol's exports keyed by escaped name. The result is cached on + * the symbol, so repeated calls do not round-trip to the server. + */ + getExports() { + return this.exportsCache ??= this.fetchSymbolTable("getExportsOfSymbol"); + } + async fetchSymbolTable(method) { + const symbols = await this.objectRegistry.fetchSymbols(this, method, undefined, this.canonicalProject.id); + const table = new Map(); + for (const symbol of symbols) { + table.set(symbol.escapedName, symbol); + } + return table; + } + async getExportSymbol() { + if (!this.exportSymbol) + return this; + return this.objectRegistry.fetchSymbol(this, "getExportSymbolOfSymbol", this.exportSymbol, this.canonicalProject.id); + } + async getJsDocTags(checker) { + return checker.getJsDocTagsOfSymbol(this); + } + async getDocumentationComment(checker) { + return checker.getDocumentationCommentOfSymbol(this); + } +} +class TypeObject { + objectRegistry; + id; + flags; + objectFlags; + symbol; + value; + intrinsicName; + isThisType; + freshType; + regularType; + target; + typeParameters; + outerTypeParameters; + localTypeParameters; + aliasTypeArguments; + aliasSymbol; + elementFlags; + fixedLength; + readonly; + texts; + objectType; + indexType; + checkType; + extendsType; + baseType; + substConstraint; + trueType; // false if not yet loaded + falseType; // false if not yet loaded + constructor(data, objectRegistry) { + this.objectRegistry = objectRegistry; + this.id = data.id; + this.flags = data.flags; + if (data.objectFlags !== undefined) + this.objectFlags = data.objectFlags; + if (data.symbol !== undefined) + this.symbol = data.symbol; + if (data.value != null) { + // BigInt literal values are serialized as decimal strings (e.g. "-123") because + // JSON cannot represent bigint. Decode them back into a real bigint here. + this.value = (data.flags & TypeFlags.BigIntLiteral) ? BigInt(data.value) : data.value; + } + if (data.intrinsicName !== undefined) + this.intrinsicName = data.intrinsicName; + if (data.isThisType !== undefined) + this.isThisType = data.isThisType; + if (data.freshType !== undefined) + this.freshType = data.freshType; + if (data.regularType !== undefined) + this.regularType = data.regularType; + if (data.target !== undefined) + this.target = data.target; + this.typeParameters = data.typeParameters ?? []; + this.outerTypeParameters = data.outerTypeParameters ?? []; + this.localTypeParameters = data.localTypeParameters ?? []; + this.aliasTypeArguments = data.aliasTypeArguments ?? []; + if (data.aliasSymbol !== undefined) + this.aliasSymbol = data.aliasSymbol; + if (data.elementFlags !== undefined) + this.elementFlags = data.elementFlags; + if (data.fixedLength !== undefined) + this.fixedLength = data.fixedLength; + if (data.readonly !== undefined) + this.readonly = data.readonly; + if (data.texts !== undefined) + this.texts = data.texts; + if (data.objectType !== undefined) + this.objectType = data.objectType; + if (data.indexType !== undefined) + this.indexType = data.indexType; + if (data.checkType !== undefined) + this.checkType = data.checkType; + if (data.extendsType !== undefined) + this.extendsType = data.extendsType; + if (data.baseType !== undefined) + this.baseType = data.baseType; + if (data.substConstraint !== undefined) + this.substConstraint = data.substConstraint; + this.trueType = false; + this.falseType = false; + } + async getSymbol() { + return this.objectRegistry.fetchSymbol(this, "getSymbolOfType", this.symbol); + } + async getAliasSymbol() { + return this.objectRegistry.fetchSymbol(this, "getAliasSymbolOfType", this.aliasSymbol); + } + async getTarget() { + return this.objectRegistry.fetchType(this, "getTargetOfType", this.target); + } + async getFreshType() { + return this.objectRegistry.fetchType(this, "getFreshTypeOfType", this.freshType); + } + async getRegularType() { + return this.objectRegistry.fetchType(this, "getRegularTypeOfType", this.regularType); + } + async getTypes() { + // Only union, intersection, and template literal types have constituent + // types; any other kind has none, so return undefined rather than sending + // a request the server cannot satisfy. + if (!(this.flags & (TypeFlags.UnionOrIntersection | TypeFlags.TemplateLiteral))) { + return undefined; + } + return this.objectRegistry.fetchTypes(this, "getTypesOfType"); + } + async getTypeParameters() { + return this.objectRegistry.fetchTypes(this, "getTypeParametersOfType", this.typeParameters); + } + async getOuterTypeParameters() { + return this.objectRegistry.fetchTypes(this, "getOuterTypeParametersOfType", this.outerTypeParameters); + } + async getLocalTypeParameters() { + return this.objectRegistry.fetchTypes(this, "getLocalTypeParametersOfType", this.localTypeParameters); + } + async getAliasTypeArguments() { + return this.objectRegistry.fetchTypes(this, "getAliasTypeArgumentsOfType", this.aliasTypeArguments); + } + async getObjectType() { + return this.objectRegistry.fetchType(this, "getObjectTypeOfType", this.objectType); + } + async getIndexType() { + return this.objectRegistry.fetchType(this, "getIndexTypeOfType", this.indexType); + } + async getCheckType() { + return this.objectRegistry.fetchType(this, "getCheckTypeOfType", this.checkType); + } + async getExtendsType() { + return this.objectRegistry.fetchType(this, "getExtendsTypeOfType", this.extendsType); + } + async getBaseType() { + return this.objectRegistry.fetchType(this, "getBaseTypeOfType", this.baseType); + } + async getConstraint() { + return this.objectRegistry.fetchType(this, "getConstraintOfType", this.substConstraint); + } + async getTrueType() { + const result = await this.objectRegistry.fetchType(this, "getTrueTypeOfConditionalType", this.trueType); + this.trueType = result.id; + return result; + } + async getFalseType() { + const result = await this.objectRegistry.fetchType(this, "getFalseTypeOfConditionalType", this.falseType); + this.falseType = result.id; + return result; + } + /** + * Get the base types of this type. Returns `undefined` for any type that is + * not a class or interface. + */ + async getBaseTypes() { + if (!this.isClassOrInterface()) { + return undefined; + } + return this.objectRegistry.fetchBaseTypes(this); + } + isClassOrInterface() { + return isClassOrInterfaceType(this); + } + isUnionType() { + return isUnionType(this); + } + isIntersectionType() { + return isIntersectionType(this); + } + isObjectType() { + return isObjectType(this); + } + isIntrinsicType() { + return isIntrinsicType(this); + } + isErrorType() { + return isErrorType(this); + } + isLiteralType() { + return isLiteralType(this); + } + isStringLiteralType() { + return isStringLiteralType(this); + } + isNumberLiteralType() { + return isNumberLiteralType(this); + } + isBigIntLiteralType() { + return isBigIntLiteralType(this); + } + isBooleanLiteralType() { + return isBooleanLiteralType(this); + } + isTypeReference() { + return isTypeReference(this); + } + isTupleType() { + return isTupleType(this); + } + isIndexType() { + return isIndexType(this); + } + isIndexedAccessType() { + return isIndexedAccessType(this); + } + isConditionalType() { + return isConditionalType(this); + } + isSubstitutionType() { + return isSubstitutionType(this); + } + isTemplateLiteralType() { + return isTemplateLiteralType(this); + } + isStringMappingType() { + return isStringMappingType(this); + } + isTypeParameter() { + return isTypeParameter(this); + } +} +export function isUnionType(type) { + return (type.flags & TypeFlags.Union) !== 0; +} +export function isIntersectionType(type) { + return (type.flags & TypeFlags.Intersection) !== 0; +} +export function isObjectType(type) { + return (type.flags & TypeFlags.Object) !== 0; +} +export function isClassOrInterfaceType(type) { + return isObjectType(type) && (type.objectFlags & ObjectFlags.ClassOrInterface) !== 0; +} +export function isIntrinsicType(type) { + return (type.flags & TypeFlags.Intrinsic) !== 0; +} +/** + * Whether this is the error type — the placeholder the checker produces when a + * type cannot be determined (e.g. an unresolved reference). It is an intrinsic + * type named `"error"` (this covers both the singleton error type and the + * per-alias error types manufactured for unresolved type alias references). + */ +export function isErrorType(type) { + return isIntrinsicType(type) && type.intrinsicName === "error"; +} +export function isLiteralType(type) { + return (type.flags & TypeFlags.Literal) !== 0; +} +export function isStringLiteralType(type) { + return (type.flags & TypeFlags.StringLiteral) !== 0; +} +export function isNumberLiteralType(type) { + return (type.flags & TypeFlags.NumberLiteral) !== 0; +} +export function isBigIntLiteralType(type) { + return (type.flags & TypeFlags.BigIntLiteral) !== 0; +} +export function isBooleanLiteralType(type) { + return (type.flags & TypeFlags.BooleanLiteral) !== 0; +} +export function isTypeReference(type) { + return isObjectType(type) && (type.objectFlags & ObjectFlags.Reference) !== 0; +} +export function isTupleType(type) { + return isObjectType(type) && (type.objectFlags & ObjectFlags.Tuple) !== 0; +} +export function isIndexType(type) { + return (type.flags & TypeFlags.Index) !== 0; +} +export function isIndexedAccessType(type) { + return (type.flags & TypeFlags.IndexedAccess) !== 0; +} +export function isConditionalType(type) { + return (type.flags & TypeFlags.Conditional) !== 0; +} +export function isSubstitutionType(type) { + return (type.flags & TypeFlags.Substitution) !== 0; +} +export function isTemplateLiteralType(type) { + return (type.flags & TypeFlags.TemplateLiteral) !== 0; +} +export function isStringMappingType(type) { + return (type.flags & TypeFlags.StringMapping) !== 0; +} +export function isTypeParameter(type) { + return (type.flags & TypeFlags.TypeParameter) !== 0; +} +export class Signature { + flags; + objectRegistry; + id; + declaration; + typeParameters; + parameters; + thisParameter; + target; + constructor(data, project, objectRegistry) { + this.id = data.id; + this.flags = data.flags; + this.objectRegistry = objectRegistry; + this.declaration = data.declaration ? new NodeHandle(data.declaration, project) : undefined; + this.typeParameters = data.typeParameters ?? []; + this.parameters = data.parameters ?? []; + this.thisParameter = data.thisParameter; + this.target = data.target; + } + async getTypeParameters() { + return this.objectRegistry.fetchTypes(this, "getTypeParametersOfSignature", this.typeParameters); + } + async getParameters() { + return this.objectRegistry.fetchSymbols(this, "getParametersOfSignature", this.parameters); + } + async getThisParameter() { + return this.objectRegistry.fetchSymbol(this, "getThisParameterOfSignature", this.thisParameter); + } + async getTarget() { + return this.objectRegistry.fetchSignature(this, "getTargetOfSignature", this.target); + } + get hasRestParameter() { + return (this.flags & SignatureFlags.HasRestParameter) !== 0; + } + get isConstruct() { + return (this.flags & SignatureFlags.Construct) !== 0; + } + get isAbstract() { + return (this.flags & SignatureFlags.Abstract) !== 0; + } +} +//# sourceMappingURL=api.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/api.js.map b/node_modules/typescript/dist/api/async/api.js.map new file mode 100644 index 0000000..eab4939 --- /dev/null +++ b/node_modules/typescript/dist/api/async/api.js.map @@ -0,0 +1 @@ +{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/api/async/api.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAIH,aAAa,EAMb,0BAA0B,GAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,UAAU,EACV,kBAAkB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,UAAU,EACV,SAAS,EACT,eAAe,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C,UAAU,IAAI,EAAE,CAAC;QACxC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QACxC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9B,CAAC;IAED,KAAK,CAAC,iBAAiB;QACnB,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,EAAE,8BAA8B,EAAE,IAAI,CAAC,cAAc,CAAsC,CAAC;IAC1I,CAAC;IAED,KAAK,CAAC,aAAa;QACf,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,EAAE,0BAA0B,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC/F,CAAC;IAED,KAAK,CAAC,gBAAgB;QAClB,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,EAAE,6BAA6B,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACpG,CAAC;IAED,KAAK,CAAC,SAAS;QACX,OAAO,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,IAAI,EAAE,sBAAsB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACzF,CAAC;IAED,IAAI,gBAAgB;QAChB,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,WAAW;QACX,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;IAED,IAAI,UAAU;QACV,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/client.d.ts b/node_modules/typescript/dist/api/async/client.d.ts new file mode 100644 index 0000000..fd2f435 --- /dev/null +++ b/node_modules/typescript/dist/api/async/client.d.ts @@ -0,0 +1,39 @@ +import { type ClientOptions, type ClientSocketOptions, type ClientSpawnOptions } from "../options.ts"; +import { TimingCollector, type TimingInfo } from "../timing.ts"; +export type { ClientOptions, ClientSocketOptions, ClientSpawnOptions }; +/** + * Client handles communication with the TypeScript API server + * over STDIO (spawned process) or a Unix domain socket using JSON-RPC. + */ +export declare class Client { + private socket; + private process; + private connection; + private options; + private connected; + private timing; + constructor(options: ClientOptions); + connect(): Promise; + private connectViaSpawn; + private connectViaSocket; + private registerFSCallbacks; + apiRequest(method: string, params?: unknown): Promise; + apiRequestBinary(method: string, params?: unknown): Promise; + /** + * Returns the timing collector that per-node materialization is reported + * into, or undefined when timing collection is disabled. The returned + * collector is the same one folded into {@link getTimingInfo}, so + * materialization totals surface alongside request timings. + */ + getTimingCollector(): TimingCollector | undefined; + /** + * Returns a combined timing snapshot: client-measured round-trip and byte + * counts folded together with the server's own per-request processing time + * (fetched via a getServerTiming request) and estimated transport overhead. + */ + getTimingInfo(): Promise; + resetTimingInfo(): Promise; + private fetchServerTiming; + close(): Promise; +} +//# sourceMappingURL=client.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/client.d.ts.map b/node_modules/typescript/dist/api/async/client.d.ts.map new file mode 100644 index 0000000..c0b54b7 --- /dev/null +++ b/node_modules/typescript/dist/api/async/client.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/api/async/client.ts"],"names":[],"mappings":"AAeA,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EAG1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAKH,eAAe,EACf,KAAK,UAAU,EAClB,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;AAEvE;;;GAGG;AACH,qBAAa,MAAM;IACf,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,MAAM,CAA8B;gBAEhC,OAAO,EAAE,aAAa;IAO5B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YAWhB,eAAe;YAiDf,gBAAgB;IAmB9B,OAAO,CAAC,mBAAmB;IAoBrB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAgC3D,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAOzF;;;;;OAKG;IACH,kBAAkB,IAAI,eAAe,GAAG,SAAS;IAIjD;;;;OAIG;IACG,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC;IAYpC,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;YAUxB,iBAAiB;IAUzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAoB/B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/client.js b/node_modules/typescript/dist/api/async/client.js new file mode 100644 index 0000000..d175d96 --- /dev/null +++ b/node_modules/typescript/dist/api/async/client.js @@ -0,0 +1,211 @@ +import { createMessageConnection, RequestType, SocketMessageReader, SocketMessageWriter, StreamMessageReader, StreamMessageWriter, } from "#vscode-jsonrpc/node"; +import { fsCallbackNames, } from "../fs.js"; +import { isSpawnOptions, resolveExePath, } from "../options.js"; +import { combineTimingInfo, disabledServerTimingInfo, disabledTimingInfo, TimingCollector, } from "../timing.js"; +/** + * Client handles communication with the TypeScript API server + * over STDIO (spawned process) or a Unix domain socket using JSON-RPC. + */ +export class Client { + socket; + process; + connection; + options; + connected = false; + timing; + constructor(options) { + this.options = options; + if (isSpawnOptions(options) && options.collectTiming) { + this.timing = new TimingCollector(); + } + } + async connect() { + if (this.connected) + return; + if (isSpawnOptions(this.options)) { + await this.connectViaSpawn(this.options); + } + else { + await this.connectViaSocket(this.options); + } + } + async connectViaSpawn(options) { + const { spawn } = await import("node:child_process"); + return new Promise((resolve, reject) => { + const args = [ + "--api", + "--async", + "--cwd", + options.cwd ?? process.cwd(), + ]; + if (options.collectTiming) { + args.push("--timing"); + } + // Enable virtual FS callbacks for each provided FS function + const enabledCallbacks = []; + if (options.fs) { + for (const name of fsCallbackNames) { + if (options.fs[name]) { + enabledCallbacks.push(name); + } + } + } + if (enabledCallbacks.length > 0) { + args.push(`--callbacks=${enabledCallbacks.join(",")}`); + } + this.process = spawn(resolveExePath(options), args, { + stdio: ["pipe", "pipe", "inherit"], + }); + this.process.once("error", error => { + reject(new Error(`Failed to start tsgo process: ${error.message}`)); + }); + this.process.once("spawn", () => { + this.connected = true; + resolve(); + }); + const reader = new StreamMessageReader(this.process.stdout); + const writer = new StreamMessageWriter(this.process.stdin); + this.connection = createMessageConnection(reader, writer); + this.registerFSCallbacks(this.connection, options.fs); + this.connection.listen(); + }); + } + async connectViaSocket(options) { + const { createConnection } = await import("node:net"); + return new Promise((resolve, reject) => { + this.socket = createConnection(options.pipe, () => { + const reader = new SocketMessageReader(this.socket); + const writer = new SocketMessageWriter(this.socket); + this.connection = createMessageConnection(reader, writer); + this.connection.listen(); + this.connected = true; + resolve(); + }); + this.socket.once("error", error => { + reject(new Error(`Socket error: ${error.message}`)); + }); + }); + } + registerFSCallbacks(connection, fs) { + if (!fs) + return; + for (const name of fsCallbackNames) { + const callback = fs[name]; + if (callback) { + const requestType = new RequestType(name); + connection.onRequest(requestType, (arg) => { + const result = callback(arg); + if (name === "readFile") { + // readFile has 3 returns: string (content), null (not found), undefined (fall back). + // JSON-RPC can't distinguish null from undefined, so wrap in object. + if (result === undefined) + return null; + return { content: result }; + } + return result ?? null; + }); + } + } + } + async apiRequest(method, params) { + if (!this.connected) { + await this.connect(); + } + if (!this.connection) { + throw new Error("Connection not established"); + } + const requestType = new RequestType(method); + if (!this.timing) { + return this.connection.sendRequest(requestType, params); + } + // Round-trip latency is measured here; byte counts approximate the wire + // payload via the serialized JSON. Server-side processing time is not + // carried on the response; it is retrieved separately (via a + // getServerTiming request) and folded in by getTimingInfo(). + const bytesSent = params === undefined ? 0 : Buffer.byteLength(JSON.stringify(params), "utf-8"); + const start = performance.now(); + const result = await this.connection.sendRequest(requestType, params); + const roundTripMs = performance.now() - start; + this.timing.record({ + method, + roundTripMs, + bytesSent, + bytesReceived: result === undefined || result === null + ? 0 + : Buffer.byteLength(JSON.stringify(result), "utf-8"), + }); + return result; + } + async apiRequestBinary(method, params) { + const response = await this.apiRequest(method, params); + if (!response) + return undefined; + const buffer = Buffer.from(response.data, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); + } + /** + * Returns the timing collector that per-node materialization is reported + * into, or undefined when timing collection is disabled. The returned + * collector is the same one folded into {@link getTimingInfo}, so + * materialization totals surface alongside request timings. + */ + getTimingCollector() { + return this.timing; + } + /** + * Returns a combined timing snapshot: client-measured round-trip and byte + * counts folded together with the server's own per-request processing time + * (fetched via a getServerTiming request) and estimated transport overhead. + */ + async getTimingInfo() { + if (!this.timing) { + return disabledTimingInfo(); + } + const local = this.timing.getInfo(); + // No requests have been sent yet: nothing to fetch from the server. + if (!this.connected || !this.connection) { + return local; + } + return combineTimingInfo(local, await this.fetchServerTiming()); + } + async resetTimingInfo() { + if (!this.timing) + return; + this.timing.reset(); + if (this.connected && this.connection) { + // Keep the server's collection in sync so combined totals stay meaningful. + const requestType = new RequestType("resetServerTiming"); + await this.connection.sendRequest(requestType, undefined); + } + } + async fetchServerTiming() { + if (!this.connection) { + return disabledServerTimingInfo(); + } + // Fetch the server's own timing collection via a dedicated request. This + // bypasses the client-side collector so the query does not pollute it. + const requestType = new RequestType("getServerTiming"); + return this.connection.sendRequest(requestType, undefined); + } + async close() { + if (this.connection) { + this.connection.dispose(); + this.connection = undefined; + } + if (this.socket) { + this.socket.destroy(); + this.socket = undefined; + } + if (this.process) { + // Close stdin to unblock the server's read loop, allowing it to exit cleanly. + // The server is blocked on stdin.Read(), so just sending SIGTERM would deadlock: + // - Node won't exit while child is alive + // - Child can't process SIGTERM while blocked on read + // - Read won't error until stdin is closed + this.process.stdin?.end(); + this.process = undefined; + } + this.connected = false; + } +} +//# sourceMappingURL=client.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/client.js.map b/node_modules/typescript/dist/api/async/client.js.map new file mode 100644 index 0000000..bc39d41 --- /dev/null +++ b/node_modules/typescript/dist/api/async/client.js.map @@ -0,0 +1 @@ +{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/api/async/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,uBAAuB,EAEvB,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,GACtB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAEH,eAAe,GAClB,MAAM,UAAU,CAAC;AAClB,OAAO,EAIH,cAAc,EACd,cAAc,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAElB,eAAe,GAElB,MAAM,cAAc,CAAC;AAItB;;;GAGG;AACH,MAAM,OAAO,MAAM;IACP,MAAM,CAAqB;IAC3B,OAAO,CAA2B;IAClC,UAAU,CAAgC;IAC1C,OAAO,CAAgB;IACvB,SAAS,GAAG,KAAK,CAAC;IAClB,MAAM,CAA8B;IAE5C,YAAY,OAAsB;QAC9B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,cAAc,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;YACnD,IAAI,CAAC,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;QACxC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,OAAO;QACT,IAAI,IAAI,CAAC,SAAS;YAAE,OAAO;QAE3B,IAAI,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC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MAAM,WAAW,GAAG,IAAI,WAAW,CAAkC,iBAAiB,CAAC,CAAC;QACxF,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IAC/D,CAAC;IAED,KAAK,CAAC,KAAK;QACP,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YAClB,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAChC,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACd,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACtB,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QAC5B,CAAC;QACD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,8EAA8E;YAC9E,iFAAiF;YACjF,yCAAyC;YACzC,sDAAsD;YACtD,2CAA2C;YAC3C,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;YAC1B,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QAC7B,CAAC;QACD,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/types.d.ts b/node_modules/typescript/dist/api/async/types.d.ts new file mode 100644 index 0000000..fd1869c --- /dev/null +++ b/node_modules/typescript/dist/api/async/types.d.ts @@ -0,0 +1,310 @@ +import type { CompletionItemKind } from "#enums/completionItemKind"; +import type { DiagnosticCategory } from "#enums/diagnosticCategory"; +import type { ElementFlags } from "#enums/elementFlags"; +import type { ObjectFlags } from "#enums/objectFlags"; +import type { TypeFlags } from "#enums/typeFlags"; +import type { TypePredicateKind } from "#enums/typePredicateKind"; +import type { NodeHandle, Symbol } from "./api.ts"; +/** + * A TypeScript type. + * + * Use TypeFlags to determine the specific kind of type and access + * kind-specific properties. For example: + * + * ```ts + * if (type.flags & TypeFlags.StringLiteral) { + * console.log((type as StringLiteralType).value); // string + * } + * ``` + */ +export interface Type { + /** Type flags — use to determine the specific kind of type. */ + readonly flags: TypeFlags; + /** Unique identifier for this type */ + readonly id: number; + /** Get the symbol associated with this type, if any */ + getSymbol(): Promise; + /** Get the type arguments of the type alias this type was instantiated from, if any */ + getAliasTypeArguments(): Promise; + /** Get the symbol of the type alias this type was instantiated from, if any */ + getAliasSymbol(): Promise; + /** + * Get the base types of this type, or `undefined` if it is not a class or + * interface type. + */ + getBaseTypes(): Promise; + /** Whether this type is a class or interface type */ + isClassOrInterface(): this is InterfaceType; + /** Whether this type is a union type */ + isUnionType(): this is UnionType; + /** Whether this type is an intersection type */ + isIntersectionType(): this is IntersectionType; + /** Whether this type is an object type */ + isObjectType(): this is ObjectType; + /** Whether this type is an intrinsic primitive type */ + isIntrinsicType(): this is IntrinsicType; + /** + * Whether this is the error type — the placeholder produced when a type + * cannot be determined (e.g. an unresolved reference). + */ + isErrorType(): boolean; + /** Whether this type is a literal type */ + isLiteralType(): this is LiteralType; + /** Whether this type is a string literal type */ + isStringLiteralType(): this is StringLiteralType; + /** Whether this type is a number literal type */ + isNumberLiteralType(): this is NumberLiteralType; + /** Whether this type is a bigint literal type */ + isBigIntLiteralType(): this is BigIntLiteralType; + /** Whether this type is a boolean literal type */ + isBooleanLiteralType(): this is BooleanLiteralType; + /** Whether this type is a type reference */ + isTypeReference(): this is TypeReference; + /** Whether this type is a tuple type */ + isTupleType(): this is TupleType; + /** Whether this type is an index type (`keyof T`) */ + isIndexType(): this is IndexType; + /** Whether this type is an indexed access type (`T[K]`) */ + isIndexedAccessType(): this is IndexedAccessType; + /** Whether this type is a conditional type */ + isConditionalType(): this is ConditionalType; + /** Whether this type is a substitution type */ + isSubstitutionType(): this is SubstitutionType; + /** Whether this type is a template literal type */ + isTemplateLiteralType(): this is TemplateLiteralType; + /** Whether this type is a string mapping type */ + isStringMappingType(): this is StringMappingType; + /** Whether this type is a type parameter */ + isTypeParameter(): this is TypeParameter; +} +/** + * Freshable types (TypeFlags.Freshable) - literal types (TypeFlags.Literal) and computed enum types (TypeFlags.Enum). + */ +export interface FreshableType extends Type { + /** Get the fresh version of this type, if any */ + getFreshType(): Promise; + /** Get the regular (non-fresh) version of this type, if any */ + getRegularType(): Promise; +} +/** Literal types: StringLiteral, NumberLiteral, BigIntLiteral, BooleanLiteral */ +export interface LiteralType extends FreshableType { + /** The literal value. Use TypeFlags to narrow to a specific literal subtype with a concrete value type. */ + readonly value: string | number | boolean | bigint; +} +/** String literal types (TypeFlags.StringLiteral) */ +export interface StringLiteralType extends LiteralType { + /** The string value of the literal */ + readonly value: string; +} +/** Numeric literal types (TypeFlags.NumberLiteral) */ +export interface NumberLiteralType extends LiteralType { + /** The numeric value of the literal */ + readonly value: number; +} +/** BigInt literal types (TypeFlags.BigIntLiteral) */ +export interface BigIntLiteralType extends LiteralType { + /** The bigint value of the literal */ + readonly value: bigint; +} +/** Boolean literal types (TypeFlags.BooleanLiteral) */ +export interface BooleanLiteralType extends LiteralType { + /** The boolean value of the literal */ + readonly value: boolean; +} +/** Object types (TypeFlags.Object) */ +export interface ObjectType extends Type { + /** Object flags — use to determine the specific kind of object type. */ + readonly objectFlags: ObjectFlags; +} +/** Type references (ObjectFlags.Reference) — e.g. Array, Map */ +export interface TypeReference extends ObjectType { + /** Get the generic target type (e.g. Array for Array) */ + getTarget(): Promise; +} +/** Interface types — classes and interfaces (ObjectFlags.ClassOrInterface) */ +export interface InterfaceType extends TypeReference { + /** Get all type parameters (outer + local, excluding thisType) */ + getTypeParameters(): Promise; + /** Get outer type parameters from enclosing declarations */ + getOuterTypeParameters(): Promise; + /** Get local type parameters declared on this interface/class */ + getLocalTypeParameters(): Promise; +} +/** Tuple types (ObjectFlags.Tuple) */ +export interface TupleType extends InterfaceType { + /** Per-element flags (Required, Optional, Rest, Variadic) */ + readonly elementFlags: readonly ElementFlags[]; + /** Number of initial required or optional elements */ + readonly fixedLength: number; + /** Whether the tuple is readonly */ + readonly readonly: boolean; +} +/** Union or intersection types (TypeFlags.Union | TypeFlags.Intersection) */ +export interface UnionOrIntersectionType extends Type { + /** Get the constituent types */ + getTypes(): Promise; +} +/** Union types (TypeFlags.Union) */ +export interface UnionType extends UnionOrIntersectionType { +} +/** Intersection types (TypeFlags.Intersection) */ +export interface IntersectionType extends UnionOrIntersectionType { +} +/** Type parameters (TypeFlags.TypeParameter) */ +export interface TypeParameter extends Type { + /** True if this is the synthetic `this` type of an interface, class, or tuple */ + readonly isThisType?: boolean | undefined; +} +/** Index types — keyof T (TypeFlags.Index) */ +export interface IndexType extends Type { + /** Get the target type T in `keyof T` */ + getTarget(): Promise; +} +/** Indexed access types — T[K] (TypeFlags.IndexedAccess) */ +export interface IndexedAccessType extends Type { + /** Get the object type T in `T[K]` */ + getObjectType(): Promise; + /** Get the index type K in `T[K]` */ + getIndexType(): Promise; +} +/** Conditional types — T extends U ? X : Y (TypeFlags.Conditional) */ +export interface ConditionalType extends Type { + /** Get the check type T in `T extends U ? X : Y` */ + getCheckType(): Promise; + /** Get the extends type U in `T extends U ? X : Y` */ + getExtendsType(): Promise; + /** Get the true type X in `T extends U ? X : Y` */ + getTrueType(): Promise; + /** Get the false type Y in `T extends U ? X : Y` */ + getFalseType(): Promise; +} +/** Substitution types (TypeFlags.Substitution) */ +export interface SubstitutionType extends Type { + getBaseType(): Promise; + getConstraint(): Promise; +} +/** Template literal types (TypeFlags.TemplateLiteral) */ +export interface TemplateLiteralType extends Type { + /** Text segments (always one more than the number of type spans) */ + readonly texts: readonly string[]; + /** Get the types interspersed between text segments */ + getTypes(): Promise; +} +/** String mapping types — Uppercase, Lowercase, etc. (TypeFlags.StringMapping) */ +export interface StringMappingType extends Type { + /** Get the mapped type */ + getTarget(): Promise; +} +/** Intrinsic types — any, unknown, string, number, bigint, symbol, void, undefined, null, never, object (TypeFlags.Intrinsic) */ +export interface IntrinsicType extends Type { + /** The intrinsic type name (e.g. "any", "string", "never") */ + readonly intrinsicName: string; +} +/** Base for all type predicates */ +export interface TypePredicateBase { + readonly kind: TypePredicateKind; + readonly type: Type | undefined; +} +/** `this is T` */ +export interface ThisTypePredicate extends TypePredicateBase { + readonly kind: TypePredicateKind.This; + readonly parameterName: undefined; + readonly parameterIndex: undefined; + readonly type: Type; +} +/** `x is T` */ +export interface IdentifierTypePredicate extends TypePredicateBase { + readonly kind: TypePredicateKind.Identifier; + readonly parameterName: string; + readonly parameterIndex: number; + readonly type: Type; +} +/** `asserts this is T` */ +export interface AssertsThisTypePredicate extends TypePredicateBase { + readonly kind: TypePredicateKind.AssertsThis; + readonly parameterName: undefined; + readonly parameterIndex: undefined; + readonly type: Type | undefined; +} +/** `asserts x is T` */ +export interface AssertsIdentifierTypePredicate extends TypePredicateBase { + readonly kind: TypePredicateKind.AssertsIdentifier; + readonly parameterName: string; + readonly parameterIndex: number; + readonly type: Type | undefined; +} +/** A type predicate — e.g. `x is T` or `asserts x is T` */ +export type TypePredicate = ThisTypePredicate | IdentifierTypePredicate | AssertsThisTypePredicate | AssertsIdentifierTypePredicate; +/** An index signature — e.g. `[key: string]: T` */ +export interface IndexInfo { + /** The index key type (e.g. string or number) */ + readonly keyType: Type; + /** The index value type */ + readonly valueType: Type; + /** Whether the index signature is readonly */ + readonly isReadonly: boolean; + /** The index signature declaration, if any */ + readonly declaration?: NodeHandle | undefined; +} +/** + * A single JSDoc tag attached to a symbol — e.g. `@param`, `@returns`. + */ +export interface JSDocTagInfo { + /** The tag name, without the leading `@` — e.g. `"param"`. */ + readonly name: string; + /** The rendered tag text, if any — e.g. `"a the first number"` for `@param a the first number`. */ + readonly text?: string | undefined; +} +export interface CompletionEntryLabelDetails { + detail?: string | undefined; + description?: string | undefined; +} +/** Options for {@link Checker.getCompletionsAtPosition}. */ +export interface CompletionOptions { + triggerCharacter?: string | undefined; + /** Include a `symbol` property on each completion entry. Only populated for symbol-based completions (not keywords or literals). */ + includeSymbol?: boolean | undefined; +} +/** A single completion item returned by {@link Checker.getCompletionsAtPosition}. */ +export interface CompletionEntry { + readonly name: string; + readonly kind?: CompletionItemKind | undefined; + readonly sortText?: string | undefined; + readonly insertText?: string | undefined; + readonly filterText?: string | undefined; + readonly detail?: string | undefined; + readonly labelDetails?: CompletionEntryLabelDetails | undefined; + /** The symbol associated with this completion entry. Only set when `includeSymbol: true` is passed and a symbol is available. */ + readonly symbol?: Symbol | undefined; +} +/** The result of {@link Checker.getCompletionsAtPosition}. */ +export interface CompletionInfo { + readonly isIncomplete: boolean; + readonly entries: readonly CompletionEntry[]; +} +/** + * A diagnostic message from the TypeScript compiler. + */ +export interface Diagnostic { + /** File name of the source file this diagnostic belongs to, if any */ + readonly fileName?: string | undefined; + /** Start position of the diagnostic */ + readonly pos: number; + /** End position of the diagnostic */ + readonly end: number; + /** Diagnostic error code */ + readonly code: number; + /** Diagnostic category (error, warning, suggestion, message) */ + readonly category: DiagnosticCategory; + /** Localized diagnostic message text */ + readonly text: string; + /** Whether this diagnostic highlights unnecessary code */ + readonly reportsUnnecessary?: boolean | undefined; + /** Whether this diagnostic highlights deprecated code */ + readonly reportsDeprecated?: boolean | undefined; + /** Chained diagnostic messages */ + readonly messageChain?: readonly Diagnostic[] | undefined; + /** Related diagnostic information */ + readonly relatedInformation?: readonly Diagnostic[] | undefined; +} +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/types.d.ts.map b/node_modules/typescript/dist/api/async/types.d.ts.map new file mode 100644 index 0000000..b539050 --- /dev/null +++ b/node_modules/typescript/dist/api/async/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/api/async/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MA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types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/typescript/dist/api/async/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/types.js.map b/node_modules/typescript/dist/api/async/types.js.map new file mode 100644 index 0000000..0defc86 --- /dev/null +++ b/node_modules/typescript/dist/api/async/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/api/async/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/compilerOptions.d.ts b/node_modules/typescript/dist/api/compilerOptions.d.ts new file mode 100644 index 0000000..d514cf4 --- /dev/null +++ b/node_modules/typescript/dist/api/compilerOptions.d.ts @@ -0,0 +1,109 @@ +import type { JsxEmit } from "#enums/jsxEmit"; +import type { ModuleDetectionKind } from "#enums/moduleDetectionKind"; +import type { ModuleKind } from "#enums/moduleKind"; +import type { ModuleResolutionKind } from "#enums/moduleResolutionKind"; +import type { NewLineKind } from "#enums/newLineKind"; +import type { ScriptTarget } from "#enums/scriptTarget"; +export interface CompilerOptions { + allowJs?: boolean; + allowArbitraryExtensions?: boolean; + allowImportingTsExtensions?: boolean; + allowNonTsExtensions?: boolean; + allowUmdGlobalAccess?: boolean; + allowUnreachableCode?: boolean; + allowUnusedLabels?: boolean; + assumeChangesOnlyAffectDirectDependencies?: boolean; + checkJs?: boolean; + customConditions?: string[]; + composite?: boolean; + emitDeclarationOnly?: boolean; + emitBOM?: boolean; + emitDecoratorMetadata?: boolean; + declaration?: boolean; + declarationDir?: string; + declarationMap?: boolean; + deduplicatePackages?: boolean; + disableSizeLimit?: boolean; + disableSourceOfProjectReferenceRedirect?: boolean; + disableSolutionSearching?: boolean; + disableReferencedProjectLoad?: boolean; + erasableSyntaxOnly?: boolean; + exactOptionalPropertyTypes?: boolean; + experimentalDecorators?: boolean; + forceConsistentCasingInFileNames?: boolean; + isolatedModules?: boolean; + isolatedDeclarations?: boolean; + ignoreConfig?: boolean; + ignoreDeprecations?: string; + importHelpers?: boolean; + inlineSourceMap?: boolean; + inlineSources?: boolean; + init?: boolean; + incremental?: boolean; + jsx?: JsxEmit; + jsxFactory?: string; + jsxFragmentFactory?: string; + jsxImportSource?: string; + lib?: string[]; + libReplacement?: boolean; + locale?: string; + mapRoot?: string; + module?: ModuleKind; + moduleResolution?: ModuleResolutionKind; + moduleSuffixes?: string[]; + moduleDetection?: ModuleDetectionKind; + newLine?: NewLineKind; + noEmit?: boolean; + noCheck?: boolean; + noErrorTruncation?: boolean; + noFallthroughCasesInSwitch?: boolean; + noImplicitAny?: boolean; + noImplicitThis?: boolean; + noImplicitReturns?: boolean; + noEmitHelpers?: boolean; + noLib?: boolean; + noPropertyAccessFromIndexSignature?: boolean; + noUncheckedIndexedAccess?: boolean; + noEmitOnError?: boolean; + noUnusedLocals?: boolean; + noUnusedParameters?: boolean; + noResolve?: boolean; + noImplicitOverride?: boolean; + noUncheckedSideEffectImports?: boolean; + outDir?: string; + paths?: Record; + preserveConstEnums?: boolean; + preserveSymlinks?: boolean; + project?: string; + resolveJsonModule?: boolean; + resolvePackageJsonExports?: boolean; + resolvePackageJsonImports?: boolean; + removeComments?: boolean; + rewriteRelativeImportExtensions?: boolean; + reactNamespace?: string; + rootDir?: string; + rootDirs?: string[]; + skipLibCheck?: boolean; + stableTypeOrdering?: boolean; + strict?: boolean; + strictBindCallApply?: boolean; + strictBuiltinIteratorReturn?: boolean; + strictFunctionTypes?: boolean; + strictNullChecks?: boolean; + strictPropertyInitialization?: boolean; + stripInternal?: boolean; + skipDefaultLibCheck?: boolean; + sourceMap?: boolean; + sourceRoot?: string; + suppressOutputPathCheck?: boolean; + target?: ScriptTarget; + traceResolution?: boolean; + tsBuildInfoFile?: string; + typeRoots?: string[]; + types?: string[]; + useDefineForClassFields?: boolean; + useUnknownInCatchVariables?: boolean; + verbatimModuleSyntax?: boolean; + maxNodeModuleJsDepth?: number; +} +//# sourceMappingURL=compilerOptions.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/compilerOptions.d.ts.map b/node_modules/typescript/dist/api/compilerOptions.d.ts.map new file mode 100644 index 0000000..9a064d6 --- /dev/null +++ b/node_modules/typescript/dist/api/compilerOptions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"compilerOptions.d.ts","sourceRoot":"","sources":["../../src/api/compilerOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIxD,MAAM,WAAW,eAAe;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,yCAAyC,CAAC,EAAE,OAAO,CAAC;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC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OAAO,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/compilerOptions.js b/node_modules/typescript/dist/api/compilerOptions.js new file mode 100644 index 0000000..aeadba7 --- /dev/null +++ b/node_modules/typescript/dist/api/compilerOptions.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=compilerOptions.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/compilerOptions.js.map b/node_modules/typescript/dist/api/compilerOptions.js.map new file mode 100644 index 0000000..68f5c80 --- /dev/null +++ b/node_modules/typescript/dist/api/compilerOptions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"compilerOptions.js","sourceRoot":"","sources":["../../src/api/compilerOptions.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/fs.d.ts b/node_modules/typescript/dist/api/fs.d.ts new file mode 100644 index 0000000..8623183 --- /dev/null +++ b/node_modules/typescript/dist/api/fs.d.ts @@ -0,0 +1,23 @@ +export interface FileSystemEntries { + files: string[]; + directories: string[]; +} +export interface FileSystem { + directoryExists?: (directoryName: string) => boolean | undefined; + fileExists?: (fileName: string) => boolean | undefined; + getAccessibleEntries?: (directoryName: string) => FileSystemEntries | undefined; + /** + * Read a file's content. + * - Return the file content as a `string` (including `""` for empty files). + * - Return `null` to indicate the file does not exist (without falling back to the real FS). + * - Return `undefined` to fall back to the real filesystem. + */ + readFile?: (fileName: string) => string | null | undefined; + realpath?: (path: string) => string | undefined; + writeFile?: (path: string, content: string) => void; + removeFile?: (path: string) => void; +} +/** The callback names supported by the Go server for virtual FS delegation. */ +export declare const fsCallbackNames: readonly ["readFile", "fileExists", "directoryExists", "getAccessibleEntries", "realpath"]; +export declare function createVirtualFileSystem(files: Record): FileSystem; +//# sourceMappingURL=fs.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/fs.d.ts.map b/node_modules/typescript/dist/api/fs.d.ts.map new file mode 100644 index 0000000..60f8465 --- /dev/null +++ b/node_modules/typescript/dist/api/fs.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/api/fs.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAC9B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,UAAU;IACvB,eAAe,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,GAAG,SAAS,CAAC;IACjE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,GAAG,SAAS,CAAC;IACvD,oBAAoB,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,iBAAiB,GAAG,SAAS,CAAC;IAChF;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAChD,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,+EAA+E;AAC/E,eAAO,MAAM,eAAe,4FAA6F,CAAC;AAa1H,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAkHjF"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/fs.js b/node_modules/typescript/dist/api/fs.js new file mode 100644 index 0000000..264edba --- /dev/null +++ b/node_modules/typescript/dist/api/fs.js @@ -0,0 +1,109 @@ +import { getPathComponents } from "./path.js"; +/** The callback names supported by the Go server for virtual FS delegation. */ +export const fsCallbackNames = ["readFile", "fileExists", "directoryExists", "getAccessibleEntries", "realpath"]; +export function createVirtualFileSystem(files) { + const root = { + type: "directory", + children: {}, + }; + const content = {}; + for (const filePath of Object.keys(files)) { + content[filePath] = files[filePath]; + addToTree(filePath); + } + return { + directoryExists, + fileExists, + getAccessibleEntries, + readFile, + realpath: path => path, + writeFile, + removeFile, + }; + function getNodeFromPath(path) { + if (!path || path === "/") { + return root; + } + const segments = getPathComponents(path).slice(1); + let current = root; + for (const segment of segments) { + if (current.type !== "directory") { + return undefined; + } + const child = current.children[segment]; + if (!child) { + return undefined; + } + current = child; + } + return current; + } + function ensureDirectory(segments) { + let current = root; + for (const segment of segments) { + if (!current.children[segment]) { + current.children[segment] = { type: "directory", children: {} }; + } + else if (current.children[segment].type !== "directory") { + throw new Error(`Cannot create directory: a file already exists at "/${segments.join("/")}"`); + } + current = current.children[segment]; + } + return current; + } + function addToTree(path) { + const segments = getPathComponents(path).slice(1); + if (segments.length === 0) { + throw new Error(`Invalid file path: "${path}"`); + } + const filename = segments.pop(); + const dirNode = ensureDirectory(segments); + dirNode.children[filename] = { type: "file" }; + } + function writeFile(path, data) { + content[path] = data; + addToTree(path); + } + function removeFile(path) { + delete content[path]; + const segments = getPathComponents(path).slice(1); + if (segments.length === 0) + return; + const filename = segments.pop(); + const dirNode = getNodeFromPath("/" + segments.join("/")); + if (dirNode && dirNode.type === "directory") { + delete dirNode.children[filename]; + } + } + function directoryExists(directoryName) { + const node = getNodeFromPath(directoryName); + return !!node && node.type === "directory"; + } + function fileExists(fileName) { + return fileName in content; + } + function getAccessibleEntries(directoryName) { + const node = getNodeFromPath(directoryName); + if (!node || node.type !== "directory") { + return undefined; + } + const fileEntries = []; + const directories = []; + for (const [name, child] of Object.entries(node.children)) { + if (child.type === "file") { + fileEntries.push(name); + } + else { + directories.push(name); + } + } + return { files: fileEntries, directories }; + } + function readFile(fileName) { + if (fileName in content) { + return content[fileName]; + } + return undefined; + } +} +//# sourceMappingURL=fs.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/fs.js.map b/node_modules/typescript/dist/api/fs.js.map new file mode 100644 index 0000000..9462d0a --- /dev/null +++ b/node_modules/typescript/dist/api/fs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fs.js","sourceRoot":"","sources":["../../src/api/fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAuB9C,+EAA+E;AAC/E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,UAAU,CAAU,CAAC;AAa1H,MAAM,UAAU,uBAAuB,CAAC,KAA6B;IACjE,MAAM,IAAI,GAAe;QACrB,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,EAAE;KACf,CAAC;IACF,MAAM,OAAO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AAC,QAAQ,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/encoder.d.ts b/node_modules/typescript/dist/api/node/encoder.d.ts new file mode 100644 index 0000000..415de06 --- /dev/null +++ b/node_modules/typescript/dist/api/node/encoder.d.ts @@ -0,0 +1,15 @@ +import type { Node, SourceFile } from "../../ast/index.ts"; +/** + * Encode a SourceFile AST node into the binary format. + */ +export declare function encodeSourceFile(sourceFile: SourceFile): Uint8Array; +/** + * Encode an arbitrary AST node into the binary format. + * When encoding a non-SourceFile node, the header hash and parse options fields will be zero. + */ +export declare function encodeNode(node: Node): Uint8Array; +/** + * Encode a Uint8Array to a base64 string. + */ +export declare function uint8ArrayToBase64(data: Uint8Array): string; +//# sourceMappingURL=encoder.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/encoder.d.ts.map b/node_modules/typescript/dist/api/node/encoder.d.ts.map new file mode 100644 index 0000000..69c1adb --- /dev/null +++ b/node_modules/typescript/dist/api/node/encoder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"encoder.d.ts","sourceRoot":"","sources":["../../../src/api/node/encoder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGR,IAAI,EAEJ,UAAU,EAEb,MAAM,oBAAoB,CAAC;AAyL5B;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAEnE;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,CAuKjD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAE3D"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/encoder.generated.d.ts b/node_modules/typescript/dist/api/node/encoder.generated.d.ts new file mode 100644 index 0000000..7170cd7 --- /dev/null +++ b/node_modules/typescript/dist/api/node/encoder.generated.d.ts @@ -0,0 +1,5 @@ +import type { Node } from "../../ast/index.ts"; +import { SyntaxKind } from "../../ast/index.ts"; +export declare function getNodeDataType(kind: SyntaxKind): number; +export declare function getNodeCommonData(node: Node): number; +//# sourceMappingURL=encoder.generated.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map b/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map new file mode 100644 index 0000000..622d069 --- /dev/null +++ b/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"encoder.generated.d.ts","sourceRoot":"","sources":["../../../src/api/node/encoder.generated.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAiBR,IAAI,EAMP,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAOhD,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAuBxD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CA6CpD"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/encoder.generated.js b/node_modules/typescript/dist/api/node/encoder.generated.js new file mode 100644 index 0000000..fdb93ee --- /dev/null +++ b/node_modules/typescript/dist/api/node/encoder.generated.js @@ -0,0 +1,74 @@ +// Code generated by _scripts/generate-encoder.ts. DO NOT EDIT. +import { SyntaxKind } from "../../ast/index.js"; +import { NODE_DATA_TYPE_CHILDREN, NODE_DATA_TYPE_EXTENDED, NODE_DATA_TYPE_STRING, } from "./protocol.js"; +export function getNodeDataType(kind) { + switch (kind) { + case SyntaxKind.Identifier: + case SyntaxKind.PrivateIdentifier: + case SyntaxKind.JsxText: + case SyntaxKind.JSDocText: + case SyntaxKind.JSDocLink: + case SyntaxKind.JSDocLinkPlain: + case SyntaxKind.JSDocLinkCode: + return NODE_DATA_TYPE_STRING; + case SyntaxKind.StringLiteral: + case SyntaxKind.NumericLiteral: + case SyntaxKind.BigIntLiteral: + case SyntaxKind.RegularExpressionLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateHead: + case SyntaxKind.TemplateMiddle: + case SyntaxKind.TemplateTail: + case SyntaxKind.SourceFile: + return NODE_DATA_TYPE_EXTENDED; + default: + return NODE_DATA_TYPE_CHILDREN; + } +} +export function getNodeCommonData(node) { + switch (node.kind) { + case SyntaxKind.Block: + return (node.multiLine ? 1 : 0) << 24; + case SyntaxKind.HeritageClause: + return (node.token === SyntaxKind.ImplementsKeyword ? 1 : 0) << 24; + case SyntaxKind.ExportAssignment: + return (node.isExportEquals ? 1 : 0) << 24; + case SyntaxKind.ExportSpecifier: + return (node.isTypeOnly ? 1 : 0) << 24; + case SyntaxKind.PrefixUnaryExpression: + return (node.operator === SyntaxKind.MinusToken ? 1 : node.operator === SyntaxKind.TildeToken ? 2 : node.operator === SyntaxKind.ExclamationToken ? 3 : node.operator === SyntaxKind.PlusPlusToken ? 4 : node.operator === SyntaxKind.MinusMinusToken ? 5 : 0) << 24; + case SyntaxKind.PostfixUnaryExpression: + return (node.operator === SyntaxKind.MinusMinusToken ? 1 : 0) << 24; + case SyntaxKind.MetaProperty: + return (node.keywordToken === SyntaxKind.NewKeyword ? 1 : 0) << 24; + case SyntaxKind.ArrayLiteralExpression: + return (node.multiLine ? 1 : 0) << 24; + case SyntaxKind.ObjectLiteralExpression: + return (node.multiLine ? 1 : 0) << 24; + case SyntaxKind.TypeOperator: + return (node.operator === SyntaxKind.ReadonlyKeyword ? 1 : node.operator === SyntaxKind.UniqueKeyword ? 2 : 0) << 24; + case SyntaxKind.ImportAttributes: + return (node.multiLine ? 1 : 0) << 24 | (node.token === SyntaxKind.AssertKeyword ? 1 : 0) << 25; + case SyntaxKind.JsxText: + return (node.containsOnlyTriviaWhiteSpaces ? 1 : 0) << 24; + case SyntaxKind.ModuleDeclaration: + return (node.keyword === SyntaxKind.NamespaceKeyword ? 1 : 0) << 24; + case SyntaxKind.ImportEqualsDeclaration: + return (node.isTypeOnly ? 1 : 0) << 24; + case SyntaxKind.ExportDeclaration: + return (node.isTypeOnly ? 1 : 0) << 24; + case SyntaxKind.ImportType: + return (node.isTypeOf ? 1 : 0) << 24; + case SyntaxKind.ImportClause: + return (node.phaseModifier === SyntaxKind.TypeKeyword ? 1 : node.phaseModifier === SyntaxKind.DeferKeyword ? 2 : 0) << 24; + case SyntaxKind.ImportSpecifier: + return (node.isTypeOnly ? 1 : 0) << 24; + case SyntaxKind.JSDocTypeLiteral: + return (node.isArrayType ? 1 : 0) << 24; + case SyntaxKind.JSDocParameterTag: + case SyntaxKind.JSDocPropertyTag: + return (node.isBracketed ? 1 : 0) << 24 | (node.isNameFirst ? 1 : 0) << 25; + } + return 0; +} +//# sourceMappingURL=encoder.generated.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/encoder.generated.js.map b/node_modules/typescript/dist/api/node/encoder.generated.js.map new file mode 100644 index 0000000..b947d51 --- /dev/null +++ b/node_modules/typescript/dist/api/node/encoder.generated.js.map @@ -0,0 +1 @@ +{"version":3,"file":"encoder.generated.js","sourceRoot":"","sources":["../../../src/api/node/encoder.generated.ts"],"names":[],"mappings":"AAAA,+DAA+D;AA0B/D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACH,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,GACxB,MAAM,eAAe,CAAC;AAEvB,MAAM,UAAU,eAAe,CAAC,IAAgB;IAC5C,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,UAAU,CAAC,UAAU,CAAC;QAC3B,KAAK,UAAU,CAAC,iBAAiB,CAAC;QAClC,KAAK,UAAU,CAAC,OAAO,CAAC;QACxB,KAAK,UAAU,CAAC,SAAS,CAAC;QAC1B,KAAK,UAAU,CAAC,SAAS,CAAC;QAC1B,KAAK,UAAU,CAAC,cAAc,CAAC;QAC/B,KAAK,UAAU,CAAC,aAAa;YACzB,OAAO,qBAAqB,C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C,CAAC,CAAC,IAAI,EAAE,CAAC;QAClK,KAAK,UAAU,CAAC,eAAe;YAC3B,OAAO,CAAE,IAAwB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAChE,KAAK,UAAU,CAAC,gBAAgB;YAC5B,OAAO,CAAE,IAAyB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAClE,KAAK,UAAU,CAAC,iBAAiB,CAAC;QAClC,KAAK,UAAU,CAAC,gBAAgB;YAC5B,OAAO,CAAE,IAAoC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAE,IAAoC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACrJ,CAAC;IACD,OAAO,CAAC,CAAC;AACb,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/encoder.js b/node_modules/typescript/dist/api/node/encoder.js new file mode 100644 index 0000000..1e4f4b0 --- /dev/null +++ b/node_modules/typescript/dist/api/node/encoder.js @@ -0,0 +1,287 @@ +import { SyntaxKind } from "../../ast/index.js"; +import { getNodeCommonData, getNodeDataType, } from "./encoder.generated.js"; +import { MsgpackWriter } from "./msgpack.js"; +import { childProperties, HEADER_OFFSET_EXTENDED_DATA, HEADER_OFFSET_METADATA, HEADER_OFFSET_NODES, HEADER_OFFSET_STRING_TABLE, HEADER_OFFSET_STRING_TABLE_OFFSETS, HEADER_OFFSET_STRUCTURED_DATA, HEADER_SIZE, KIND_NODE_LIST, NODE_DATA_TYPE_CHILDREN, NODE_DATA_TYPE_EXTENDED, NODE_DATA_TYPE_STRING, NODE_LEN, PROTOCOL_VERSION, } from "./protocol.js"; +const NODE_FIELDS = NODE_LEN / 4; +const NODE_FIELD_NEXT = 3; +const NO_STRUCTURED_DATA = 0xFFFFFFFF; +// String table that accumulates strings into a flat byte pool. +class StringTable { + parts; + byteLen; + offsets; + constructor() { + this.parts = []; + this.byteLen = 0; + this.offsets = []; + } + add(text) { + const index = this.offsets.length; + const encoder = cachedEncoder(); + const encodedLength = encoder.encode(text).length; + const offset = this.byteLen; + this.parts.push(text); + this.byteLen += encodedLength; + this.offsets.push(offset, offset + encodedLength); + return index; + } + encode() { + const encoder = cachedEncoder(); + const dataBytes = encoder.encode(this.parts.join("")); + const offsetBytes = new Uint8Array(this.offsets.length * 4); + const view = new DataView(offsetBytes.buffer); + for (let i = 0; i < this.offsets.length; i++) { + view.setUint32(i * 4, this.offsets[i], true); + } + const result = new Uint8Array(offsetBytes.length + dataBytes.length); + result.set(offsetBytes, 0); + result.set(dataBytes, offsetBytes.length); + return result; + } + stringByteLength() { + return this.byteLen; + } + offsetsCount() { + return this.offsets.length; + } +} +let _encoder; +function cachedEncoder() { + return _encoder ??= new TextEncoder(); +} +function getChildrenPropertyMask(node) { + const kind = node.kind; + const props = childProperties[kind]; + if (!props) { + return 0; + } + const n = node; + let mask = 0; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop !== undefined && isChildPresent(n[prop])) { + mask |= 1 << i; + } + } + return mask; +} +// A child is "present" if it's non-null/non-undefined. +// This matches the Go encoder's behavior where non-nil NodeLists (even empty) +// are treated as present, and only nil NodeLists are absent. +function isChildPresent(v) { + if (v === undefined || v === null) + return false; + return true; +} +function recordNodeStrings(node, strs) { + return strs.add(node.text ?? ""); +} +function encodeFileReferences(refs, writer) { + if (!refs || refs.length === 0) + return NO_STRUCTURED_DATA; + const offset = writer.finish().length; + writer.writeArrayHeader(refs.length); + for (const ref of refs) { + writer.writeArrayHeader(5); + writer.writeUint(ref.pos); + writer.writeUint(ref.end); + writer.writeString(ref.fileName); + writer.writeUint(ref.resolutionMode ?? 0); + writer.writeBool(ref.preserve ?? false); + } + return offset; +} +function recordExtendedData(node, strs, extendedData, structuredWriter) { + const offset = extendedData.length * 4; + if (node.kind === SyntaxKind.SourceFile) { + const sf = node; + const textIndex = strs.add(sf.text); + const fileNameIndex = strs.add(sf.fileName); + const pathIndex = strs.add(sf.path); + const referencedFilesOffset = encodeFileReferences(sf.referencedFiles, structuredWriter); + const typeRefDirectivesOffset = encodeFileReferences(sf.typeReferenceDirectives, structuredWriter); + const libRefDirectivesOffset = encodeFileReferences(sf.libReferenceDirectives, structuredWriter); + extendedData.push(textIndex, fileNameIndex, pathIndex, sf.languageVariant, sf.scriptKind, referencedFilesOffset, typeRefDirectivesOffset, libRefDirectivesOffset, NO_STRUCTURED_DATA, NO_STRUCTURED_DATA, NO_STRUCTURED_DATA, 0); + } + else if (node.kind === SyntaxKind.TemplateHead || + node.kind === SyntaxKind.TemplateMiddle || + node.kind === SyntaxKind.TemplateTail) { + const tmpl = node; + const text = tmpl.text ?? ""; + const rawText = tmpl.rawText ?? ""; + const templateFlags = tmpl.templateFlags ?? 0; + const textIndex = strs.add(text); + const rawTextIndex = strs.add(rawText); + extendedData.push(textIndex, rawTextIndex, templateFlags); + } + else { + // StringLiteral, NumericLiteral, BigIntLiteral, RegularExpressionLiteral, + // NoSubstitutionTemplateLiteral — format: [textIndex, tokenFlags] + const n = node; + const text = n.text ?? ""; + const tokenFlags = n.tokenFlags ?? 0; + const textIndex = strs.add(text); + extendedData.push(textIndex, tokenFlags); + } + return offset; +} +function getNodeData(node, strs, extendedData, structuredWriter) { + const t = getNodeDataType(node.kind); + const common = getNodeCommonData(node); + switch (t) { + case NODE_DATA_TYPE_CHILDREN: + return t | common | getChildrenPropertyMask(node); + case NODE_DATA_TYPE_STRING: + return t | common | recordNodeStrings(node, strs); + case NODE_DATA_TYPE_EXTENDED: + return t | common | recordExtendedData(node, strs, extendedData, structuredWriter); + default: + throw new Error("unreachable"); + } +} +function getChildPropertiesForNode(node) { + return childProperties[node.kind]; +} +// Returns whether a value is a NodeArray (array-like with pos and end). +function isNodeArray(value) { + return Array.isArray(value) && typeof value.pos === "number" && typeof value.end === "number"; +} +/** + * Encode a SourceFile AST node into the binary format. + */ +export function encodeSourceFile(sourceFile) { + return encodeNode(sourceFile); +} +/** + * Encode an arbitrary AST node into the binary format. + * When encoding a non-SourceFile node, the header hash and parse options fields will be zero. + */ +export function encodeNode(node) { + const strs = new StringTable(); + const extendedDataValues = []; + const structuredWriter = new MsgpackWriter(); + // We'll build an array of uint32 values for the nodes section, 7 per node + const nodeValues = []; + // Nil node (index 0) + nodeValues.push(0, 0, 0, 0, 0, 0, 0); + let nodeCount = 0; + let parentIndex = 0; + let prevIndex = 0; + function visitNode(node) { + nodeCount++; + const currentIndex = nodeCount; + if (prevIndex !== 0) { + // Set next pointer on previous sibling + nodeValues[prevIndex * NODE_FIELDS + NODE_FIELD_NEXT] = currentIndex; + } + const data = getNodeData(node, strs, extendedDataValues, structuredWriter); + nodeValues.push(node.kind, node.pos >= 0 ? node.pos : 0, node.end >= 0 ? node.end : 0, 0, // next (filled in later) + parentIndex, data, node.flags); + const saveParentIndex = parentIndex; + const savePrevIndex = prevIndex; + parentIndex = currentIndex; + prevIndex = 0; + visitChildren(node); + prevIndex = currentIndex; + parentIndex = saveParentIndex; + } + function visitNodeList(list) { + if (!list) { + return; + } + nodeCount++; + const currentIndex = nodeCount; + if (prevIndex !== 0) { + nodeValues[prevIndex * NODE_FIELDS + NODE_FIELD_NEXT] = currentIndex; + } + nodeValues.push(KIND_NODE_LIST, list.pos >= 0 ? list.pos : 0, list.end >= 0 ? list.end : 0, 0, // next + parentIndex, list.length, // data for NodeList is its length + 0); + const saveParentIndex = parentIndex; + parentIndex = currentIndex; + prevIndex = 0; + for (const child of list) { + visitNode(child); + } + prevIndex = currentIndex; + parentIndex = saveParentIndex; + } + function visitChildren(node) { + const props = getChildPropertiesForNode(node); + const n = node; + if (props) { + for (const propName of props) { + if (propName === undefined) + continue; + const child = n[propName]; + if (child === undefined || child === null) + continue; + if (isNodeArray(child)) { + visitNodeList(child); + } + else { + visitNode(child); + } + } + } + } + // Encode root node + nodeCount++; + parentIndex++; + const rootData = getNodeData(node, strs, extendedDataValues, structuredWriter); + nodeValues.push(node.kind, node.pos >= 0 ? node.pos : 0, node.end >= 0 ? node.end : 0, 0, 0, rootData, node.flags); + const saveParent = parentIndex; + prevIndex = 0; + parentIndex = 1; // root is at index 1 + visitChildren(node); + parentIndex = saveParent; + // Encode extended data section + const extendedDataBytes = new Uint8Array(extendedDataValues.length * 4); + const extView = new DataView(extendedDataBytes.buffer); + for (let i = 0; i < extendedDataValues.length; i++) { + extView.setUint32(i * 4, extendedDataValues[i], true); + } + // Encode structured data section + const structuredDataBytes = structuredWriter.finish(); + // Encode string table + const strsBytes = strs.encode(); + // Encode nodes section + const nodesBytes = new Uint8Array(nodeValues.length * 4); + const nodesView = new DataView(nodesBytes.buffer); + for (let i = 0; i < nodeValues.length; i++) { + nodesView.setUint32(i * 4, nodeValues[i] >>> 0, true); + } + // Calculate section offsets + const offsetStringTableOffsets = HEADER_SIZE; + const offsetStringTableData = HEADER_SIZE + strs.offsetsCount() * 4; + const offsetExtendedData = offsetStringTableData + strs.stringByteLength(); + const offsetStructuredData = offsetExtendedData + extendedDataBytes.length; + const offsetNodes = offsetStructuredData + structuredDataBytes.length; + // Build header + const header = new Uint8Array(HEADER_SIZE); + const headerView = new DataView(header.buffer); + const metadata = PROTOCOL_VERSION << 24; + headerView.setUint32(HEADER_OFFSET_METADATA, metadata, true); + // bytes 4-19: hash (zero for non-SourceFile, we don't have access to xxh3 here) + // byte 20-23: parse options (zero for non-SourceFile) + headerView.setUint32(HEADER_OFFSET_STRING_TABLE_OFFSETS, offsetStringTableOffsets, true); + headerView.setUint32(HEADER_OFFSET_STRING_TABLE, offsetStringTableData, true); + headerView.setUint32(HEADER_OFFSET_EXTENDED_DATA, offsetExtendedData, true); + headerView.setUint32(HEADER_OFFSET_STRUCTURED_DATA, offsetStructuredData, true); + headerView.setUint32(HEADER_OFFSET_NODES, offsetNodes, true); + // Concatenate all sections + const result = new Uint8Array(header.length + strsBytes.length + extendedDataBytes.length + structuredDataBytes.length + nodesBytes.length); + result.set(header, 0); + result.set(strsBytes, HEADER_SIZE); + result.set(extendedDataBytes, offsetExtendedData); + result.set(structuredDataBytes, offsetStructuredData); + result.set(nodesBytes, offsetNodes); + return result; +} +/** + * Encode a Uint8Array to a base64 string. + */ +export function uint8ArrayToBase64(data) { + return Buffer.from(data).toString("base64"); +} +//# sourceMappingURL=encoder.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/encoder.js.map b/node_modules/typescript/dist/api/node/encoder.js.map new file mode 100644 index 0000000..f71efeb --- /dev/null +++ b/node_modules/typescript/dist/api/node/encoder.js.map @@ -0,0 +1 @@ +{"version":3,"file":"encoder.js","sourceRoot":"","sources":["../../../src/api/node/encoder.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACH,iBAAiB,EACjB,eAAe,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACH,eAAe,EACf,2BAA2B,EAC3B,sBAAsB,EACtB,mBAAmB,EACnB,0BAA0B,EAC1B,kCAAkC,EAClC,6BAA6B,EAC7B,WAAW,EACX,cAAc,EACd,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,QAAQ,EACR,gBAAgB,GACnB,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,GAAG,QAAQ,GAAG,CAAC,CAAC;AACjC,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,MAAM,kBAAkB,GAAG,UAAU,CAAC;AAEtC,+DAA+D;AAC/D,MAAM,WAAW;IACL,KAAK,CAAW;IAChB,OAAO,CAAS;IAChB,OAAO,CAAW;IAE1B;QACI,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;QACjB,IAAI,CAAC,OA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C,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/msgpack.d.ts b/node_modules/typescript/dist/api/node/msgpack.d.ts new file mode 100644 index 0000000..471e8e5 --- /dev/null +++ b/node_modules/typescript/dist/api/node/msgpack.d.ts @@ -0,0 +1,32 @@ +export declare const MSGPACK_FIXARRAY3 = 147; +export declare const MSGPACK_BIN8 = 196; +export declare const MSGPACK_BIN16 = 197; +export declare const MSGPACK_BIN32 = 198; +export declare const MSGPACK_UINT8 = 204; +/** Compute the MessagePack bin header size for a given data length. */ +export declare function binHeaderSize(len: number): number; +/** Write a MessagePack bin header into `buf` at `off`, return new offset. */ +export declare function writeBinHeader(buf: Uint8Array, off: number, len: number): number; +export declare class MsgpackWriter { + private buf; + private view; + private pos; + constructor(initialSize?: number); + private ensure; + writeArrayHeader(length: number): void; + writeUint(value: number): void; + writeString(str: string): void; + writeBool(value: boolean): void; + finish(): Uint8Array; +} +export declare class MsgpackReader { + private buf; + private view; + private pos; + constructor(data: Uint8Array, offset?: number); + readArrayHeader(): number; + readUint(): number; + readString(): string; + readBool(): boolean; +} +//# sourceMappingURL=msgpack.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/msgpack.d.ts.map b/node_modules/typescript/dist/api/node/msgpack.d.ts.map new file mode 100644 index 0000000..91ba1b0 --- /dev/null +++ b/node_modules/typescript/dist/api/node/msgpack.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"msgpack.d.ts","sourceRoot":"","sources":["../../../src/api/node/msgpack.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB,MAAO,CAAC;AACtC,eAAO,MAAM,YAAY,MAAO,CAAC;AACjC,eAAO,MAAM,aAAa,MAAO,CAAC;AAClC,eAAO,MAAM,aAAa,MAAO,CAAC;AAClC,eAAO,MAAM,aAAa,MAAO,CAAC;AAIlC,uEAAuE;AACvE,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAkBhF;AAKD,qBAAa,aAAa;IACtB,OAAO,CAAC,GAAG,CAAa;IACxB,OAAO,CAAC,IAAI,CAAW;IACvB,OAAO,CAAC,GAAG,CAAS;gBAER,WAAW,SAAM;IAM7B,OAAO,CAAC,MAAM;IAWd,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAmBtC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAwB9B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IA4B9B,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAK/B,MAAM,IAAI,UAAU;CAGvB;AAED,qBAAa,aAAa;IACtB,OAAO,CAAC,GAAG,CAAa;IACxB,OAAO,CAAC,IAAI,CAAW;IACvB,OAAO,CAAC,GAAG,CAAS;gBAER,IAAI,EAAE,UAAU,EAAE,MAAM,SAAI;IAMxC,eAAe,IAAI,MAAM;IAgBzB,QAAQ,IAAI,MAAM;IAiBlB,UAAU,IAAI,MAAM;IAyBpB,QAAQ,IAAI,OAAO;CAMtB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/msgpack.js b/node_modules/typescript/dist/api/node/msgpack.js new file mode 100644 index 0000000..7c7048e --- /dev/null +++ b/node_modules/typescript/dist/api/node/msgpack.js @@ -0,0 +1,213 @@ +// Minimal msgpack encoder/decoder. +// Supports: arrays, unsigned integers, strings, booleans, binary data. +import { Wtf8Decoder } from "./wtf8.js"; +// ── MessagePack format constants ──────────────────────────────────── +export const MSGPACK_FIXARRAY3 = 0x93; // 3-element fixarray +export const MSGPACK_BIN8 = 0xc4; +export const MSGPACK_BIN16 = 0xc5; +export const MSGPACK_BIN32 = 0xc6; +export const MSGPACK_UINT8 = 0xcc; +// ── Bin header helpers ────────────────────────────────────────────── +/** Compute the MessagePack bin header size for a given data length. */ +export function binHeaderSize(len) { + if (len < 0x100) + return 2; // BIN8: marker + 1-byte size + if (len < 0x10000) + return 3; // BIN16: marker + 2-byte size + return 5; // BIN32: marker + 4-byte size +} +/** Write a MessagePack bin header into `buf` at `off`, return new offset. */ +export function writeBinHeader(buf, off, len) { + if (len < 0x100) { + buf[off++] = MSGPACK_BIN8; + buf[off++] = len; + } + else if (len < 0x10000) { + buf[off++] = MSGPACK_BIN16; + buf[off++] = (len >>> 8) & 0xff; + buf[off++] = len & 0xff; + } + else { + buf[off++] = MSGPACK_BIN32; + buf[off++] = (len >>> 24) & 0xff; + buf[off++] = (len >>> 16) & 0xff; + buf[off++] = (len >>> 8) & 0xff; + buf[off++] = len & 0xff; + } + return off; +} +const encoder = new TextEncoder(); +const decoder = new Wtf8Decoder(); +export class MsgpackWriter { + buf; + view; + pos; + constructor(initialSize = 256) { + this.buf = new Uint8Array(initialSize); + this.view = new DataView(this.buf.buffer); + this.pos = 0; + } + ensure(n) { + if (this.pos + n > this.buf.length) { + let newSize = this.buf.length * 2; + while (newSize < this.pos + n) + newSize *= 2; + const next = new Uint8Array(newSize); + next.set(this.buf); + this.buf = next; + this.view = new DataView(this.buf.buffer); + } + } + writeArrayHeader(length) { + if (length <= 0x0f) { + this.ensure(1); + this.buf[this.pos++] = 0x90 | length; + } + else if (length <= 0xffff) { + this.ensure(3); + this.buf[this.pos++] = 0xdc; + this.view.setUint16(this.pos, length, false); + this.pos += 2; + } + else { + this.ensure(5); + this.buf[this.pos++] = 0xdd; + this.view.setUint32(this.pos, length, false); + this.pos += 4; + } + } + writeUint(value) { + if (value <= 0x7f) { + this.ensure(1); + this.buf[this.pos++] = value; + } + else if (value <= 0xff) { + this.ensure(2); + this.buf[this.pos++] = 0xcc; + this.buf[this.pos++] = value; + } + else if (value <= 0xffff) { + this.ensure(3); + this.buf[this.pos++] = 0xcd; + this.view.setUint16(this.pos, value, false); + this.pos += 2; + } + else { + this.ensure(5); + this.buf[this.pos++] = 0xce; + this.view.setUint32(this.pos, value, false); + this.pos += 4; + } + } + writeString(str) { + const encoded = encoder.encode(str); + const len = encoded.length; + if (len <= 0x1f) { + this.ensure(1 + len); + this.buf[this.pos++] = 0xa0 | len; + } + else if (len <= 0xff) { + this.ensure(2 + len); + this.buf[this.pos++] = 0xd9; + this.buf[this.pos++] = len; + } + else if (len <= 0xffff) { + this.ensure(3 + len); + this.buf[this.pos++] = 0xda; + this.view.setUint16(this.pos, len, false); + this.pos += 2; + } + else { + this.ensure(5 + len); + this.buf[this.pos++] = 0xdb; + this.view.setUint32(this.pos, len, false); + this.pos += 4; + } + this.buf.set(encoded, this.pos); + this.pos += len; + } + writeBool(value) { + this.ensure(1); + this.buf[this.pos++] = value ? 0xc3 : 0xc2; + } + finish() { + return this.buf.subarray(0, this.pos); + } +} +export class MsgpackReader { + buf; + view; + pos; + constructor(data, offset = 0) { + this.buf = data; + this.view = new DataView(data.buffer, data.byteOffset, data.byteLength); + this.pos = offset; + } + readArrayHeader() { + const byte = this.buf[this.pos++]; + if ((byte & 0xf0) === 0x90) + return byte & 0x0f; + if (byte === 0xdc) { + const len = this.view.getUint16(this.pos, false); + this.pos += 2; + return len; + } + if (byte === 0xdd) { + const len = this.view.getUint32(this.pos, false); + this.pos += 4; + return len; + } + throw new Error(`Expected array header, got 0x${byte.toString(16)}`); + } + readUint() { + const byte = this.buf[this.pos++]; + if (byte <= 0x7f) + return byte; + if (byte === 0xcc) + return this.buf[this.pos++]; + if (byte === 0xcd) { + const val = this.view.getUint16(this.pos, false); + this.pos += 2; + return val; + } + if (byte === 0xce) { + const val = this.view.getUint32(this.pos, false); + this.pos += 4; + return val; + } + throw new Error(`Expected uint, got 0x${byte.toString(16)}`); + } + readString() { + const byte = this.buf[this.pos++]; + let len; + if ((byte & 0xe0) === 0xa0) { + len = byte & 0x1f; + } + else if (byte === 0xd9) { + len = this.buf[this.pos++]; + } + else if (byte === 0xda) { + len = this.view.getUint16(this.pos, false); + this.pos += 2; + } + else if (byte === 0xdb) { + len = this.view.getUint32(this.pos, false); + this.pos += 4; + } + else { + throw new Error(`Expected string, got 0x${byte.toString(16)}`); + } + const str = decoder.decode(this.buf.subarray(this.pos, this.pos + len)); + this.pos += len; + return str; + } + readBool() { + const byte = this.buf[this.pos++]; + if (byte === 0xc3) + return true; + if (byte === 0xc2) + return false; + throw new Error(`Expected bool, got 0x${byte.toString(16)}`); + } +} +//# sourceMappingURL=msgpack.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/msgpack.js.map b/node_modules/typescript/dist/api/node/msgpack.js.map new file mode 100644 index 0000000..9feecca --- /dev/null +++ b/node_modules/typescript/dist/api/node/msgpack.js.map @@ -0,0 +1 @@ +{"version":3,"file":"msgpack.js","sourceRoot":"","sources":["../../../src/api/node/msgpack.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uEAAuE;AAEvE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,uEAAuE;AACvE,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,CAAC,qBAAqB;AAC5D,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AACjC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAClC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAClC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAElC,uEAAuE;AAEvE,uEAAuE;AACvE,MAAM,UAAU,aAAa,CAAC,GAAW;IACrC,IAAI,GAAG,GAAG,KAAK;QAAE,OAAO,CAAC,CAAC,CAAC,6BAA6B;IACxD,IAAI,GAAG,GAAG,OAAO;QAAE,OAAO,CAAC,CAAC,CAAC,8BAA8B;IAC3D,OAAO,CAAC,CAAC,CAAC,8BAA8B;AAC5C,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,cAAc,CAAC,GAAe,EAAE,GAAW,EAAE,GAAW;IACpE,IA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AAO,KAAK,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,wBAAwB,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACjE,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.d.ts b/node_modules/typescript/dist/api/node/node.d.ts new file mode 100644 index 0000000..fdf9e2f --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.d.ts @@ -0,0 +1,76 @@ +import { type FileReference, type LineAndCharacter, type Node, type Path, SyntaxKind } from "../../ast/index.ts"; +import type { TimingCollector } from "../timing.ts"; +import { RemoteNode, RemoteNodeList } from "./node.generated.ts"; +import { type SourceFileInfo, type TextDecoder } from "./node.infrastructure.ts"; +export { RemoteNode, RemoteNodeList } from "./node.generated.ts"; +export { readParseOptionsKey, readSourceFileHash, RemoteNodeBase } from "./node.infrastructure.ts"; +export declare class RemoteSourceFile extends RemoteNode implements SourceFileInfo { + readonly nodes: (RemoteNode | RemoteNodeList)[]; + readonly _offsetNodes: number; + readonly _offsetStringTableOffsets: number; + readonly _offsetStringTable: number; + readonly _offsetExtendedData: number; + readonly _offsetStructuredData: number; + readonly _decoder: TextDecoder; + readonly _timing: TimingCollector | undefined; + private _lineStarts; + private _cachedText; + private _cachedReferencedFiles; + private _cachedTypeReferenceDirectives; + private _cachedLibReferenceDirectives; + private _cachedImports; + private _cachedModuleAugmentations; + private _cachedAmbientModuleNames; + constructor(data: Uint8Array, decoder: TextDecoder, timing?: TimingCollector); + readFileReferences(structuredDataOffset: number): readonly FileReference[]; + readNodeIndexArray(structuredDataOffset: number): readonly Node[]; + readStringArray(structuredDataOffset: number): readonly string[]; + /** @internal */ + getOrCreateNodeAtIndex(index: number): Node; + private get extendedDataOffset(); + get fileName(): string; + get path(): string; + get languageVariant(): number; + get scriptKind(): number; + get referencedFiles(): readonly FileReference[]; + get typeReferenceDirectives(): readonly FileReference[]; + get libReferenceDirectives(): readonly FileReference[]; + get imports(): readonly Node[]; + get moduleAugmentations(): readonly Node[]; + get ambientModuleNames(): readonly string[]; + get externalModuleIndicator(): Node | true | undefined; + get isDeclarationFile(): boolean; + get text(): string; + getLineStarts(): readonly number[]; + getLineAndCharacterOfPosition(position: number): LineAndCharacter; + getPositionOfLineAndCharacter(line: number, character: number): number; +} +/** + * Find a descendant node at a specific position with matching kind and end position. + */ +export declare function findDescendant(root: Node, pos: number, end: number, kind: SyntaxKind): Node | undefined; +/** + * Parsed components of a node handle. + */ +export interface ParsedNodeHandle { + index: number; + kind: SyntaxKind; + path: Path; +} +/** + * Parse a node handle string into its components. + * Handle format: "index.kind.path" where path may contain dots. + */ +export declare function parseNodeHandle(handle: string): ParsedNodeHandle; +/** + * Decode binary-encoded AST data into a Node. + * Works for any binary-encoded node, including synthetic nodes + * (e.g. from typeToTypeNode) that don't have a source file. + */ +export declare function decodeNode(data: Uint8Array): Node; +/** + * Get the unique ID string for a remote node. + * Throws if the node is not a RemoteNode (i.e. not decoded from binary data). + */ +export declare function getNodeId(node: Node): string; +//# sourceMappingURL=node.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.d.ts.map b/node_modules/typescript/dist/api/node/node.d.ts.map new file mode 100644 index 0000000..71c7016 --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/api/node/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,IAAI,EAET,KAAK,IAAI,EACT,UAAU,EAEb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EACH,UAAU,EACV,cAAc,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEH,KAAK,cAAc,EACnB,KAAK,WAAW,EACnB,MAAM,0BAA0B,CAAC;AAelC,OAAO,EAAE,UAAU,EAAE,cAAc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AG,MAAM,CAK5C"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.generated.d.ts b/node_modules/typescript/dist/api/node/node.generated.d.ts new file mode 100644 index 0000000..3fae8eb --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.generated.d.ts @@ -0,0 +1,182 @@ +import { ModifierFlags, type Node, type NodeArray, type SourceFile, SyntaxKind } from "../../ast/index.ts"; +import { RemoteNodeBase, type SourceFileInfo } from "./node.infrastructure.ts"; +export declare class RemoteNodeList extends Array implements NodeArray { + static get [Symbol.species](): ArrayConstructor; + parent: RemoteNode; + hasTrailingComma?: boolean; + transformFlags: number; + protected view: DataView; + protected index: number; + private _byteIndex; + private _cursorIndex; + private _cursorNodeIndex; + get pos(): number; + get end(): number; + get next(): number; + private get data(); + private sourceFile; + constructor(view: DataView, index: number, parent: RemoteNode, sourceFile: SourceFileInfo, offsetNodes: number); + get 0(): RemoteNode; + get 1(): RemoteNode; + get 2(): RemoteNode; + get 3(): RemoteNode; + get 4(): RemoteNode; + get 5(): RemoteNode; + get 6(): RemoteNode; + get 7(): RemoteNode; + get 8(): RemoteNode; + get 9(): RemoteNode; + get 10(): RemoteNode; + get 11(): RemoteNode; + get 12(): RemoteNode; + get 13(): RemoteNode; + get 14(): RemoteNode; + get 15(): RemoteNode; + [Symbol.iterator](): ArrayIterator; + forEachNode(visitNode: (node: RemoteNode) => T | undefined): T | undefined; + at(index: number): RemoteNode; + private getOrCreateChildAtNodeIndex; + __print(): string; +} +export declare class RemoteNode extends RemoteNodeBase implements Node { + protected static NODE_LEN: number; + protected get sourceFile(): SourceFileInfo; + protected _sourceFile: SourceFileInfo; + get id(): string; + constructor(view: DataView, index: number, parent: RemoteNode, sourceFile: SourceFileInfo, offsetNodes: number); + forEachChild(visitNode: (node: Node) => T, visitList?: (list: NodeArray) => T): T | undefined; + get jsDoc(): readonly Node[] | undefined; + getSourceFile(): SourceFile; + getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number; + getFullStart(): number; + getEnd(): number; + getWidth(sourceFile?: SourceFile): number; + getFullWidth(): number; + getLeadingTriviaWidth(sourceFile?: SourceFile): number; + getFullText(sourceFile?: SourceFile): string; + getText(sourceFile?: SourceFile): string; + protected getString(index: number): string; + private getOrCreateChildAtNodeIndex; + private hasChildren; + private getNamedChild; + private getChildAtOrder; + __print(): string; + __printChildren(): string; + __printSubtree(): string; + get containsOnlyTriviaWhiteSpaces(): boolean; + get isArrayType(): boolean; + get isBracketed(): boolean; + get isExportEquals(): boolean; + get isNameFirst(): boolean; + get isTypeOf(): boolean; + get isTypeOnly(): boolean; + get multiLine(): boolean; + get keyword(): SyntaxKind | undefined; + get keywordToken(): SyntaxKind | undefined; + get operator(): SyntaxKind | undefined; + get phaseModifier(): SyntaxKind | undefined; + get token(): SyntaxKind | undefined; + get templateFlags(): number | undefined; + get tokenFlags(): number; + get argument(): RemoteNode | undefined; + get argumentExpression(): RemoteNode | undefined; + get arguments(): RemoteNodeList | undefined; + get assertsModifier(): RemoteNode | undefined; + get asteriskToken(): RemoteNode | undefined; + get attributes(): RemoteNode | RemoteNodeList | undefined; + get awaitModifier(): RemoteNode | undefined; + get block(): RemoteNode | undefined; + get body(): RemoteNode | undefined; + get caseBlock(): RemoteNode | undefined; + get catchClause(): RemoteNode | undefined; + get checkType(): RemoteNode | undefined; + get children(): RemoteNode | RemoteNodeList | undefined; + get className(): RemoteNode | undefined; + get clauses(): RemoteNodeList | undefined; + get closingElement(): RemoteNode | undefined; + get closingFragment(): RemoteNode | undefined; + get colonToken(): RemoteNode | undefined; + get comment(): RemoteNodeList | undefined; + get condition(): RemoteNode | undefined; + get constraint(): RemoteNode | undefined; + get declarationList(): RemoteNode | undefined; + get declarations(): RemoteNodeList | undefined; + get defaultType(): RemoteNode | undefined; + get dotDotDotToken(): RemoteNode | undefined; + get elements(): RemoteNodeList | undefined; + get elementType(): RemoteNode | undefined; + get elseStatement(): RemoteNode | undefined; + get endOfFileToken(): RemoteNode | undefined; + get equalsGreaterThanToken(): RemoteNode | undefined; + get equalsToken(): RemoteNode | undefined; + get exclamationToken(): RemoteNode | undefined; + get exportClause(): RemoteNode | undefined; + get expression(): RemoteNode | undefined; + get exprName(): RemoteNode | undefined; + get extendsType(): RemoteNode | undefined; + get falseType(): RemoteNode | undefined; + get finallyBlock(): RemoteNode | undefined; + get head(): RemoteNode | undefined; + get heritageClauses(): RemoteNodeList | undefined; + get importClause(): RemoteNode | undefined; + get incrementor(): RemoteNode | undefined; + get indexType(): RemoteNode | undefined; + get initializer(): RemoteNode | undefined; + get jsdocPropertyTags(): RemoteNode | undefined; + get label(): RemoteNode | undefined; + get left(): RemoteNode | undefined; + get literal(): RemoteNode | undefined; + get members(): RemoteNodeList | undefined; + get modifiers(): RemoteNodeList | undefined; + get moduleReference(): RemoteNode | undefined; + get moduleSpecifier(): RemoteNode | undefined; + get name(): RemoteNode | undefined; + get namedBindings(): RemoteNode | undefined; + get nameExpression(): RemoteNode | undefined; + get namespace(): RemoteNode | undefined; + get nameType(): RemoteNode | undefined; + get objectAssignmentInitializer(): RemoteNode | undefined; + get objectType(): RemoteNode | undefined; + get openingElement(): RemoteNode | undefined; + get openingFragment(): RemoteNode | undefined; + get operand(): RemoteNode | undefined; + get operatorToken(): RemoteNode | undefined; + get parameterName(): RemoteNode | undefined; + get parameters(): RemoteNodeList | undefined; + get postfixToken(): RemoteNode | undefined; + get properties(): RemoteNodeList | undefined; + get propertyName(): RemoteNode | undefined; + get qualifier(): RemoteNode | undefined; + get questionDotToken(): RemoteNode | undefined; + get questionToken(): RemoteNode | undefined; + get readonlyToken(): RemoteNode | undefined; + get right(): RemoteNode | undefined; + get statement(): RemoteNode | undefined; + get statements(): RemoteNodeList | undefined; + get tag(): RemoteNode | undefined; + get tagName(): RemoteNode | undefined; + get tags(): RemoteNodeList | undefined; + get template(): RemoteNode | undefined; + get templateSpans(): RemoteNodeList | undefined; + get thenStatement(): RemoteNode | undefined; + get thisArg(): RemoteNode | undefined; + get trueType(): RemoteNode | undefined; + get tryBlock(): RemoteNode | undefined; + get tupleNameSource(): RemoteNode | undefined; + get type(): RemoteNode | undefined; + get typeArguments(): RemoteNodeList | undefined; + get typeExpression(): RemoteNode | undefined; + get typeName(): RemoteNode | undefined; + get typeParameter(): RemoteNode | undefined; + get typeParameters(): RemoteNodeList | undefined; + get types(): RemoteNodeList | undefined; + get value(): RemoteNode | undefined; + get variableDeclaration(): RemoteNode | undefined; + get whenFalse(): RemoteNode | undefined; + get whenTrue(): RemoteNode | undefined; + get text(): string | undefined; + get rawText(): string | undefined; + get flags(): number; + get modifierFlags(): ModifierFlags; +} +//# sourceMappingURL=node.generated.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.generated.d.ts.map b/node_modules/typescript/dist/api/node/node.generated.d.ts.map new file mode 100644 index 0000000..6ebc463 --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.generated.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"node.generated.d.ts","sourceRoot":"","sources":["../../../src/api/node/node.generated.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,aAAa,EACb,KAAK,IAAI,EACT,KAAK,SAAS,EACd,KAAK,UAAU,EACf,UAAU,EACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAQH,cAAc,EACd,KAAK,cAAc,EACtB,MAAM,0BAA0B,CAAC;AAiBlC,qBAAa,cAAe,SAAQ,KAAK,CAAC,UAAU,CAAE,YAAW,SAAS,CAAC,UAAU,CAAC;IAGlF,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;IAED,MAAM,EAAE,UAAU,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAK;IAC3B,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC;IACzB,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,UAAU,CAAS;IAK3B,OAAO,CAAC,YAAY,CAAa;IACjC,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,IAAI,cAAc,IAAI,cAAc,GAAG,SAAS,CAE/C;IACD,IAAI,KAAK,IAAI,cAAc,GAAG,SAAS,CAEtC;IACD,IAAI,KAAK,IAAI,UAAU,GAAG,SAAS,CAElC;IACD,IAAI,mBAAmB,IAAI,UAAU,GAAG,SAAS,CAEhD;IACD,IAAI,SAAS,IAAI,UAAU,GAAG,SAAS,CAEtC;IACD,IAAI,QAAQ,IAAI,UAAU,GAAG,SAAS,CAErC;IAID,IAAI,IAAI,IAAI,MAAM,GAAG,SAAS,CA0B7B;IAED,IAAI,OAAO,IAAI,MAAM,GAAG,SAAS,CAShC;IAMD,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,IAAI,aAAa,IAAI,aAAa,CAQjC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.generated.js b/node_modules/typescript/dist/api/node/node.generated.js new file mode 100644 index 0000000..e42577b --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.generated.js @@ -0,0 +1,835 @@ +// Code generated by _scripts/generate-encoder.ts. DO NOT EDIT. +import { getTokenPosOfNode, ModifierFlags, SyntaxKind, } from "../../ast/index.js"; +import { modifierToFlag, NODE_CHILD_MASK, NODE_DATA_TYPE_MASK, NODE_EXTENDED_DATA_MASK, NODE_STRING_INDEX_MASK, popcount8, RemoteNodeBase, } from "./node.infrastructure.js"; +import { childProperties, KIND_NODE_LIST, NODE_DATA_TYPE_CHILDREN, NODE_DATA_TYPE_EXTENDED, NODE_DATA_TYPE_STRING, NODE_LEN, NODE_OFFSET_DATA, NODE_OFFSET_END, NODE_OFFSET_FLAGS, NODE_OFFSET_KIND, NODE_OFFSET_NEXT, NODE_OFFSET_PARENT, NODE_OFFSET_POS, } from "./protocol.js"; +export class RemoteNodeList extends Array { + // Inherited Array methods like filter/map/slice use ArraySpeciesCreate, which would + // otherwise call `new RemoteNodeList(length)` and fail. Produce a plain Array instead. + static get [Symbol.species]() { + return Array; + } + parent; + hasTrailingComma; + transformFlags = 0; + view; + index; + _byteIndex; + // Cursor memoizing the last resolved (logical index -> node index) so that + // sequential forward access (index loops and list[i], plus forEach/map/ + // reduce/filter) resumes instead of re-walking from the head, turning an + // O(n) pass over the whole list from O(n^2) into O(n). + _cursorIndex = 0; + _cursorNodeIndex = 0; + get pos() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_POS, true); + } + get end() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_END, true); + } + get next() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_NEXT, true); + } + get data() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_DATA, true); + } + sourceFile; + constructor(view, index, parent, sourceFile, offsetNodes) { + super(); + this.view = view; + this.index = index; + this.parent = parent; + this.sourceFile = sourceFile; + this._byteIndex = offsetNodes + index * NODE_LEN; + this.length = this.data; + this._cursorNodeIndex = index + 1; + const length = this.length; + for (let i = 16; i < length; i++) { + Object.defineProperty(this, i, { + get() { + return this.at(i); + }, + }); + } + } + get 0() { + return this.at(0); + } + get 1() { + return this.at(1); + } + get 2() { + return this.at(2); + } + get 3() { + return this.at(3); + } + get 4() { + return this.at(4); + } + get 5() { + return this.at(5); + } + get 6() { + return this.at(6); + } + get 7() { + return this.at(7); + } + get 8() { + return this.at(8); + } + get 9() { + return this.at(9); + } + get 10() { + return this.at(10); + } + get 11() { + return this.at(11); + } + get 12() { + return this.at(12); + } + get 13() { + return this.at(13); + } + get 14() { + return this.at(14); + } + get 15() { + return this.at(15); + } + *[Symbol.iterator]() { + if (!this.length) + return; + let next = this.index + 1; + while (next) { + const child = this.getOrCreateChildAtNodeIndex(next); + next = child.next; + yield child; + } + } + forEachNode(visitNode) { + if (!this.length) + return; + let next = this.index + 1; + while (next) { + const child = this.getOrCreateChildAtNodeIndex(next); + next = child.next; + const result = visitNode(child); + if (result) + return result; + } + } + at(index) { + if (!Number.isInteger(index)) { + return undefined; + } + if (index >= this.data || (index < 0 && -index > this.data)) { + return undefined; + } + if (index < 0) { + index = this.length + index; + } + // Walk the raw buffer following each node's `next` pointer instead of + // materializing every intermediate RemoteNode just to read it. Resume from + // the memoized cursor when possible so sequential forward access is O(1) + // amortized (a full in-order pass is O(n) rather than O(n^2)). + const offsetNodes = this.sourceFile._offsetNodes; + let i; + let next; + if (index >= this._cursorIndex) { + i = this._cursorIndex; + next = this._cursorNodeIndex; + } + else { + i = 0; + next = this.index + 1; + } + for (; i < index; i++) { + next = this.view.getUint32(offsetNodes + next * NODE_LEN + NODE_OFFSET_NEXT, true); + } + this._cursorIndex = index; + this._cursorNodeIndex = next; + return this.getOrCreateChildAtNodeIndex(next); + } + getOrCreateChildAtNodeIndex(index) { + let child = this.sourceFile.nodes[index]; + if (!child) { + const kind = this.view.getUint32(this.sourceFile._offsetNodes + index * NODE_LEN + NODE_OFFSET_KIND, true); + if (kind === KIND_NODE_LIST) { + throw new Error("NodeList cannot directly contain another NodeList"); + } + const sf = this.sourceFile; + child = new RemoteNode(this.view, index, this.parent, sf, sf._offsetNodes); + sf.nodes[index] = child; + sf._timing?.recordMaterialization(); + } + return child; + } + __print() { + const result = []; + result.push(`kind: NodeList`); + result.push(`index: ${this.index}`); + result.push(`byteIndex: ${this._byteIndex}`); + result.push(`length: ${this.length}`); + return result.join("\n"); + } +} +export class RemoteNode extends RemoteNodeBase { + static NODE_LEN = NODE_LEN; + get sourceFile() { + return this._sourceFile; + } + _sourceFile; + get id() { + return `${this.index}.${this.kind}.${this.sourceFile.path}`; + } + constructor(view, index, parent, sourceFile, offsetNodes) { + super(view, index, parent, offsetNodes + index * NODE_LEN); + this._sourceFile = sourceFile; + } + forEachChild(visitNode, visitList) { + if (this.hasChildren()) { + let next = this.index + 1; + do { + const child = this.getOrCreateChildAtNodeIndex(next); + if (child instanceof RemoteNodeList) { + if (visitList) { + const result = visitList(child); + if (result) { + return result; + } + } + else { + const result = child.forEachNode(visitNode); + if (result) { + return result; + } + } + } + else if (child.kind !== SyntaxKind.JSDoc) { + const result = visitNode(child); + if (result) { + return result; + } + } + next = child.next; + } while (next); + } + } + get jsDoc() { + if (!this.hasChildren()) { + return undefined; + } + let result; + let next = this.index + 1; + do { + const child = this.getOrCreateChildAtNodeIndex(next); + if (!(child instanceof RemoteNodeList) && child.kind === SyntaxKind.JSDoc) { + (result ??= []).push(child); + } + next = child.next; + } while (next); + return result; + } + getSourceFile() { + return this.sourceFile; + } + getStart(sourceFile, includeJsDocComment) { + return getTokenPosOfNode(this, sourceFile ?? this.getSourceFile(), includeJsDocComment); + } + getFullStart() { + return this.pos; + } + getEnd() { + return this.end; + } + getWidth(sourceFile) { + return this.getEnd() - this.getStart(sourceFile); + } + getFullWidth() { + return this.end - this.pos; + } + getLeadingTriviaWidth(sourceFile) { + return this.getStart(sourceFile) - this.pos; + } + getFullText(sourceFile) { + return (sourceFile ?? this.getSourceFile()).text.substring(this.pos, this.end); + } + getText(sourceFile) { + sourceFile ??= this.getSourceFile(); + return sourceFile.text.substring(this.getStart(sourceFile), this.end); + } + getString(index) { + const offsetStringTableOffsets = this.sourceFile._offsetStringTableOffsets; + const start = this.view.getUint32(offsetStringTableOffsets + index * 4, true); + const end = this.view.getUint32(offsetStringTableOffsets + (index + 1) * 4, true); + const offsetStringTable = this.sourceFile._offsetStringTable; + const text = new Uint8Array(this.view.buffer, this.view.byteOffset + offsetStringTable + start, end - start); + return this.sourceFile._decoder.decode(text); + } + getOrCreateChildAtNodeIndex(index) { + let child = this.sourceFile.nodes[index]; + if (!child) { + const sf = this.sourceFile; + const offsetNodes = sf._offsetNodes; + const kind = this.view.getUint32(offsetNodes + index * NODE_LEN + NODE_OFFSET_KIND, true); + child = kind === KIND_NODE_LIST + ? new RemoteNodeList(this.view, index, this, sf, offsetNodes) + : new RemoteNode(this.view, index, this, sf, offsetNodes); + sf.nodes[index] = child; + sf._timing?.recordMaterialization(); + } + return child; + } + hasChildren() { + if (this._byteIndex >= this.view.byteLength - NODE_LEN) { + return false; + } + const nextNodeParent = this.view.getUint32(this.sourceFile._offsetNodes + (this.index + 1) * NODE_LEN + NODE_OFFSET_PARENT, true); + return nextNodeParent === this.index; + } + getNamedChild(propertyName) { + const kind = this.kind; + const propertyNames = childProperties[kind]; + if (!propertyNames) { + return undefined; + } + const order = propertyNames.indexOf(propertyName); + if (order === -1) { + return undefined; + } + return this.getChildAtOrder(order); + } + getChildAtOrder(order) { + const mask = this.childMask; + if (!(mask & (1 << order))) { + // Property is not present + return undefined; + } + // The property index is `order`, minus the number of zeros in the mask that are in bit positions less + // than the `order`th bit. Example: + // + // This is a MethodDeclaration with mask 0b01110101. The possible properties are + // ["modifiers", "asteriskToken", "name", "postfixToken", "typeParameters", "parameters", "type", "body"] + // (it has modifiers, name, typeParameters, parameters, and type). + // + // | Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | + // | ----- | ---- | ---- | ---------- | -------------- | ------------ | ---- | ------------- | --------- | + // | Value | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | + // | Name | body | type | parameters | typeParameters | postfixToken | name | asteriskToken | modifiers | + // + // We are trying to get the index of "parameters" (bit = 5). + // First, set all the more significant bits to 1: + // + // | Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | + // | ----- | ---- | ---- | ---------- | -------------- | ------------ | ---- | ------------- | --------- | + // | Value | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | + // + // Then, flip the bits: + // + // | Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | + // | ----- | ---- | ---- | ---------- | -------------- | ------------ | ---- | ------------- | --------- | + // | Value | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | + // + // Counting the 1s gives us the number of *missing properties* before the `order`th property. If every property + // were present, we would have `parameters = children[5]`, but since `postfixToken` and `astersiskToken` are + // missing, we have `parameters = children[5 - 2]`. + const propertyIndex = order - popcount8[~(mask | ((0xff << order) & 0xff)) & 0xff]; + let childIndex = this.index + 1; + for (let i = 0; i < propertyIndex; i++) { + // Walk through children via their `next` pointer until we get to the right property index + childIndex = this.view.getUint32(this.sourceFile._offsetNodes + childIndex * NODE_LEN + NODE_OFFSET_NEXT, true); + } + return this.getOrCreateChildAtNodeIndex(childIndex); + } + __print() { + const result = []; + result.push(`index: ${this.index}`); + result.push(`byteIndex: ${this._byteIndex}`); + result.push(`kind: ${SyntaxKind[this.kind]}`); + result.push(`pos: ${this.pos}`); + result.push(`end: ${this.end}`); + result.push(`next: ${this.next}`); + result.push(`parent: ${this.parentIndex}`); + result.push(`data: ${this.data.toString(2).padStart(32, "0")}`); + const dataType = this.dataType === NODE_DATA_TYPE_CHILDREN ? "children" : + this.dataType === NODE_DATA_TYPE_STRING ? "string" : + "extended"; + result.push(`dataType: ${dataType}`); + if (this.dataType === NODE_DATA_TYPE_CHILDREN) { + result.push(`childMask: ${this.childMask.toString(2).padStart(8, "0")}`); + result.push(`childProperties: ${childProperties[this.kind]?.join(", ")}`); + } + return result.join("\n"); + } + __printChildren() { + const result = []; + let next = this.index + 1; + while (next) { + const child = this.getOrCreateChildAtNodeIndex(next); + next = child.next; + result.push(child.__print()); + } + return result.join("\n\n"); + } + __printSubtree() { + const result = [this.__print()]; + this.forEachChild(function visitNode(node) { + result.push(node.__print()); + node.forEachChild(visitNode); + }, visitList => { + result.push(visitList.__print()); + }); + return result.join("\n\n"); + } + // ═══ Generated boolean property getters ═══ + get containsOnlyTriviaWhiteSpaces() { + return (this.data & (1 << 24)) !== 0; + } + get isArrayType() { + return (this.data & (1 << 24)) !== 0; + } + get isBracketed() { + return (this.data & (1 << 24)) !== 0; + } + get isExportEquals() { + return (this.data & (1 << 24)) !== 0; + } + get isNameFirst() { + return (this.data & (1 << 25)) !== 0; + } + get isTypeOf() { + return (this.data & (1 << 24)) !== 0; + } + get isTypeOnly() { + return (this.data & (1 << 24)) !== 0; + } + get multiLine() { + return (this.data & (1 << 24)) !== 0; + } + // ═══ Generated SyntaxKind union property getters ═══ + get keyword() { + switch (this.kind) { + case SyntaxKind.ModuleDeclaration: + return (this.data >> 24) & 0x1 ? SyntaxKind.NamespaceKeyword : SyntaxKind.ModuleKeyword; + } + } + get keywordToken() { + switch (this.kind) { + case SyntaxKind.MetaProperty: + return (this.data >> 24) & 0x1 ? SyntaxKind.NewKeyword : SyntaxKind.ImportKeyword; + } + } + get operator() { + switch (this.kind) { + case SyntaxKind.PrefixUnaryExpression: { + const idx = (this.data >> 24) & 0x7; + if (idx === 1) + return SyntaxKind.MinusToken; + if (idx === 2) + return SyntaxKind.TildeToken; + if (idx === 3) + return SyntaxKind.ExclamationToken; + if (idx === 4) + return SyntaxKind.PlusPlusToken; + if (idx === 5) + return SyntaxKind.MinusMinusToken; + return SyntaxKind.PlusToken; + } + case SyntaxKind.PostfixUnaryExpression: + return (this.data >> 24) & 0x1 ? SyntaxKind.MinusMinusToken : SyntaxKind.PlusPlusToken; + case SyntaxKind.TypeOperator: { + const idx = (this.data >> 24) & 0x3; + if (idx === 1) + return SyntaxKind.ReadonlyKeyword; + if (idx === 2) + return SyntaxKind.UniqueKeyword; + return SyntaxKind.KeyOfKeyword; + } + } + } + get phaseModifier() { + switch (this.kind) { + case SyntaxKind.ImportClause: { + const idx = (this.data >> 24) & 0x3; + if (idx === 0) + return undefined; + return idx === 1 ? SyntaxKind.TypeKeyword : idx === 2 ? SyntaxKind.DeferKeyword : undefined; + } + } + } + get token() { + switch (this.kind) { + case SyntaxKind.HeritageClause: + return (this.data >> 24) & 0x1 ? SyntaxKind.ImplementsKeyword : SyntaxKind.ExtendsKeyword; + case SyntaxKind.ImportAttributes: + return (this.data >> 25) & 0x1 ? SyntaxKind.AssertKeyword : SyntaxKind.WithKeyword; + } + } + get templateFlags() { + switch (this.kind) { + case SyntaxKind.TemplateHead: + case SyntaxKind.TemplateMiddle: + case SyntaxKind.TemplateTail: + const extendedDataOffset = this.sourceFile._offsetExtendedData + (this.data & NODE_EXTENDED_DATA_MASK); + return this.view.getUint32(extendedDataOffset + 8, true); + } + } + get tokenFlags() { + switch (this.kind) { + case SyntaxKind.StringLiteral: + case SyntaxKind.NumericLiteral: + case SyntaxKind.BigIntLiteral: + case SyntaxKind.RegularExpressionLiteral: + const extendedDataOffset = this.sourceFile._offsetExtendedData + (this.data & NODE_EXTENDED_DATA_MASK); + return this.view.getUint32(extendedDataOffset + 4, true); + default: + return 0; + } + } + // ═══ Generated child property getters ═══ + get argument() { + return this.getNamedChild("argument"); + } + get argumentExpression() { + return this.getNamedChild("argumentExpression"); + } + get arguments() { + return this.getNamedChild("arguments"); + } + get assertsModifier() { + return this.getNamedChild("assertsModifier"); + } + get asteriskToken() { + return this.getNamedChild("asteriskToken"); + } + get attributes() { + return this.getNamedChild("attributes"); + } + get awaitModifier() { + return this.getNamedChild("awaitModifier"); + } + get block() { + return this.getNamedChild("block"); + } + get body() { + return this.getNamedChild("body"); + } + get caseBlock() { + return this.getNamedChild("caseBlock"); + } + get catchClause() { + return this.getNamedChild("catchClause"); + } + get checkType() { + return this.getNamedChild("checkType"); + } + get children() { + return this.getNamedChild("children"); + } + get className() { + return this.getNamedChild("className"); + } + get clauses() { + return this.getNamedChild("clauses"); + } + get closingElement() { + return this.getNamedChild("closingElement"); + } + get closingFragment() { + return this.getNamedChild("closingFragment"); + } + get colonToken() { + return this.getNamedChild("colonToken"); + } + get comment() { + return this.getNamedChild("comment"); + } + get condition() { + return this.getNamedChild("condition"); + } + get constraint() { + return this.getNamedChild("constraint"); + } + get declarationList() { + return this.getNamedChild("declarationList"); + } + get declarations() { + return this.getNamedChild("declarations"); + } + get defaultType() { + return this.getNamedChild("defaultType"); + } + get dotDotDotToken() { + return this.getNamedChild("dotDotDotToken"); + } + get elements() { + return this.getNamedChild("elements"); + } + get elementType() { + return this.getNamedChild("elementType"); + } + get elseStatement() { + return this.getNamedChild("elseStatement"); + } + get endOfFileToken() { + return this.getNamedChild("endOfFileToken"); + } + get equalsGreaterThanToken() { + return this.getNamedChild("equalsGreaterThanToken"); + } + get equalsToken() { + return this.getNamedChild("equalsToken"); + } + get exclamationToken() { + return this.getNamedChild("exclamationToken"); + } + get exportClause() { + return this.getNamedChild("exportClause"); + } + get expression() { + return this.getNamedChild("expression"); + } + get exprName() { + return this.getNamedChild("exprName"); + } + get extendsType() { + return this.getNamedChild("extendsType"); + } + get falseType() { + return this.getNamedChild("falseType"); + } + get finallyBlock() { + return this.getNamedChild("finallyBlock"); + } + get head() { + return this.getNamedChild("head"); + } + get heritageClauses() { + return this.getNamedChild("heritageClauses"); + } + get importClause() { + return this.getNamedChild("importClause"); + } + get incrementor() { + return this.getNamedChild("incrementor"); + } + get indexType() { + return this.getNamedChild("indexType"); + } + get initializer() { + return this.getNamedChild("initializer"); + } + get jsdocPropertyTags() { + return this.getNamedChild("jsdocPropertyTags"); + } + get label() { + return this.getNamedChild("label"); + } + get left() { + return this.getNamedChild("left"); + } + get literal() { + return this.getNamedChild("literal"); + } + get members() { + return this.getNamedChild("members"); + } + get modifiers() { + return this.getNamedChild("modifiers"); + } + get moduleReference() { + return this.getNamedChild("moduleReference"); + } + get moduleSpecifier() { + return this.getNamedChild("moduleSpecifier"); + } + get name() { + return this.getNamedChild("name"); + } + get namedBindings() { + return this.getNamedChild("namedBindings"); + } + get nameExpression() { + return this.getNamedChild("nameExpression"); + } + get namespace() { + return this.getNamedChild("namespace"); + } + get nameType() { + return this.getNamedChild("nameType"); + } + get objectAssignmentInitializer() { + return this.getNamedChild("objectAssignmentInitializer"); + } + get objectType() { + return this.getNamedChild("objectType"); + } + get openingElement() { + return this.getNamedChild("openingElement"); + } + get openingFragment() { + return this.getNamedChild("openingFragment"); + } + get operand() { + return this.getNamedChild("operand"); + } + get operatorToken() { + return this.getNamedChild("operatorToken"); + } + get parameterName() { + return this.getNamedChild("parameterName"); + } + get parameters() { + return this.getNamedChild("parameters"); + } + get postfixToken() { + return this.getNamedChild("postfixToken"); + } + get properties() { + return this.getNamedChild("properties"); + } + get propertyName() { + return this.getNamedChild("propertyName"); + } + get qualifier() { + return this.getNamedChild("qualifier"); + } + get questionDotToken() { + return this.getNamedChild("questionDotToken"); + } + get questionToken() { + return this.getNamedChild("questionToken"); + } + get readonlyToken() { + return this.getNamedChild("readonlyToken"); + } + get right() { + return this.getNamedChild("right"); + } + get statement() { + return this.getNamedChild("statement"); + } + get statements() { + return this.getNamedChild("statements"); + } + get tag() { + return this.getNamedChild("tag"); + } + get tagName() { + return this.getNamedChild("tagName"); + } + get tags() { + return this.getNamedChild("tags"); + } + get template() { + return this.getNamedChild("template"); + } + get templateSpans() { + return this.getNamedChild("templateSpans"); + } + get thenStatement() { + return this.getNamedChild("thenStatement"); + } + get thisArg() { + return this.getNamedChild("thisArg"); + } + get trueType() { + return this.getNamedChild("trueType"); + } + get tryBlock() { + return this.getNamedChild("tryBlock"); + } + get tupleNameSource() { + return this.getNamedChild("tupleNameSource"); + } + get type() { + return this.getNamedChild("type"); + } + get typeArguments() { + return this.getNamedChild("typeArguments"); + } + get typeExpression() { + return this.getNamedChild("typeExpression"); + } + get typeName() { + return this.getNamedChild("typeName"); + } + get typeParameter() { + return this.getNamedChild("typeParameter"); + } + get typeParameters() { + return this.getNamedChild("typeParameters"); + } + get types() { + return this.getNamedChild("types"); + } + get value() { + return this.getNamedChild("value"); + } + get variableDeclaration() { + return this.getNamedChild("variableDeclaration"); + } + get whenFalse() { + return this.getNamedChild("whenFalse"); + } + get whenTrue() { + return this.getNamedChild("whenTrue"); + } + // ═══ Generated string property getters ═══ + get text() { + switch (this.kind) { + case SyntaxKind.Identifier: + case SyntaxKind.PrivateIdentifier: + case SyntaxKind.JsxText: + case SyntaxKind.JSDocText: + case SyntaxKind.JSDocLink: + case SyntaxKind.JSDocLinkPlain: + case SyntaxKind.JSDocLinkCode: { + const stringIndex = this.data & NODE_STRING_INDEX_MASK; + return this.getString(stringIndex); + } + case SyntaxKind.StringLiteral: + case SyntaxKind.NumericLiteral: + case SyntaxKind.BigIntLiteral: + case SyntaxKind.RegularExpressionLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateHead: + case SyntaxKind.TemplateMiddle: + case SyntaxKind.TemplateTail: + case SyntaxKind.SourceFile: { + const extendedDataOffset = this.sourceFile._offsetExtendedData + (this.data & NODE_EXTENDED_DATA_MASK); + const stringIndex = this.view.getUint32(extendedDataOffset, true); + return this.getString(stringIndex); + } + } + } + get rawText() { + switch (this.kind) { + case SyntaxKind.TemplateHead: + case SyntaxKind.TemplateMiddle: + case SyntaxKind.TemplateTail: + const extendedDataOffset = this.sourceFile._offsetExtendedData + (this.data & NODE_EXTENDED_DATA_MASK); + const stringIndex = this.view.getUint32(extendedDataOffset + 4, true); + return this.getString(stringIndex); + } + } + // ═══ Generated extended data property getters ═══ + // ═══ Other property getters ═══ + get flags() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_FLAGS, true); + } + get modifierFlags() { + const mods = this.modifiers; + if (!mods) + return ModifierFlags.None; + let flags = ModifierFlags.None; + for (const mod of mods) { + flags |= modifierToFlag(mod.kind); + } + return flags; + } +} +//# sourceMappingURL=node.generated.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.generated.js.map b/node_modules/typescript/dist/api/node/node.generated.js.map new file mode 100644 index 0000000..1ab247b --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.generated.js.map @@ -0,0 +1 @@ +{"version":3,"file":"node.generated.js","sourceRoot":"","sources":["../../../src/api/node/node.generated.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAE/D,OAAO,EACH,iBAAiB,EACjB,aAAa,EAIb,UAAU,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EAEtB,SAAS,EACT,cAAc,GAEjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACH,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,GAClB,MAAM,eAAe,CAAC;AA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C,CAAC;YACvC,CAAC;QACL,CAAC;IACL,CAAC;IAED,IAAI,OAAO;QACP,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;YAChB,KAAK,UAAU,CAAC,YAAY,CAAC;YAC7B,KAAK,UAAU,CAAC,cAAc,CAAC;YAC/B,KAAK,UAAU,CAAC,YAAY;gBACxB,MAAM,kBAAkB,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC,CAAC;gBACvG,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,kBAAkB,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;gBACtE,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAC3C,CAAC;IACL,CAAC;IAED,mDAAmD;IAEnD,iCAAiC;IAEjC,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,GAAG,iBAAiB,EAAE,IAAI,CAAC,CAAC;IAC1E,CAAC;IAED,IAAI,aAAa;QACb,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;QAC5B,IAAI,CAAC,IAAI;YAAE,OAAO,aAAa,CAAC,IAAI,CAAC;QACrC,IAAI,KAAK,GAAkB,aAAa,CAAC,IAAI,CAAC;QAC9C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACrB,KAAK,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.infrastructure.d.ts b/node_modules/typescript/dist/api/node/node.infrastructure.d.ts new file mode 100644 index 0000000..d39c282 --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.infrastructure.d.ts @@ -0,0 +1,62 @@ +import { type FileReference, ModifierFlags, type Node, SyntaxKind } from "../../ast/index.ts"; +import type { TimingCollector } from "../timing.ts"; +import { NODE_DATA_TYPE_CHILDREN, NODE_DATA_TYPE_EXTENDED, NODE_DATA_TYPE_STRING } from "./protocol.ts"; +export declare const popcount8: number[]; +export type NodeDataType = typeof NODE_DATA_TYPE_CHILDREN | typeof NODE_DATA_TYPE_STRING | typeof NODE_DATA_TYPE_EXTENDED; +export declare const NODE_DATA_TYPE_MASK = 3221225472; +export declare const NODE_CHILD_MASK = 255; +export declare const NODE_STRING_INDEX_MASK = 16777215; +export declare const NODE_EXTENDED_DATA_MASK = 16777215; +export interface TextDecoder { + decode(input?: ArrayBufferView | ArrayBufferLike): string; +} +export interface SourceFileInfo { + readonly _offsetNodes: number; + readonly _offsetStringTableOffsets: number; + readonly _offsetStringTable: number; + readonly _offsetExtendedData: number; + readonly _offsetStructuredData: number; + readonly _decoder: TextDecoder; + nodes: any[]; + readonly path?: string; + /** + * The timing collector that per-node materialization is reported into, and + * that this source file registered itself with when fetched. Present only + * when timing collection is enabled; when undefined, materialization is not + * timed and no clock is read. + */ + readonly _timing?: TimingCollector | undefined; + readFileReferences(offset: number): readonly FileReference[]; + readNodeIndexArray(offset: number): readonly Node[]; + readStringArray(offset: number): readonly string[]; + getOrCreateNodeAtIndex(index: number): Node; +} +/** + * Read the 128-bit content hash from a source file binary response as a hex string. + */ +export declare function readSourceFileHash(data: DataView): string; +/** + * Read the per-file parse options key from a source file binary response. + * This encodes the ExternalModuleIndicatorOptions bitmask as a string, + * allowing the client to distinguish files parsed with different options. + */ +export declare function readParseOptionsKey(data: DataView): string; +export declare function modifierToFlag(kind: SyntaxKind): ModifierFlags; +export declare class RemoteNodeBase { + parent: any; + view: DataView; + protected index: number; + protected _byteIndex: number; + constructor(view: DataView, index: number, parent: any, byteIndex: number); + get kind(): SyntaxKind; + get pos(): number; + get end(): number; + get next(): number; + protected get parentIndex(): number; + protected get data(): number; + protected get dataType(): NodeDataType; + protected get childMask(): number; + protected getFileText(start: number, end: number): string; + protected get sourceFile(): SourceFileInfo; +} +//# sourceMappingURL=node.infrastructure.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map b/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map new file mode 100644 index 0000000..bcd58d5 --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"node.infrastructure.d.ts","sourceRoot":"","sources":["../../../src/api/node/node.infrastructure.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,aAAa,EAClB,aAAa,EACb,KAAK,IAAI,EACT,UAAU,EACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAMH,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EAOxB,MAAM,eAAe,CAAC;AAMvB,eAAO,MAAM,SAAS,EAAE,MAAM,EAAqwB,CAAC;AAEpyB,MAAM,MAAM,YAAY,GAAG,OAAO,uBAAuB,GAAG,OAAO,qBAAqB,GAAG,OAAO,uBAAuB,CAAC;AAC1H,eAAO,MAAM,mBAAmB,aAAgB,CAAC;AACjD,eAAO,MAAM,eAAe,MAAgB,CAAC;AAC7C,eAAO,MAAM,sBAAsB,WAAgB,CAAC;AACpD,eAAO,MAAM,uBAAuB,WAAgB,CAAC;AAQrD,MAAM,WAAW,WAAW;IACxB,MAAM,CAAC,KAAK,CAAC,EAAE,eAAe,GAAG,eAAe,GAAG,MAAM,CAAC;CAC7D;AAED,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAC3C,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,W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AAM,CAKhC;IAED,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAIzD,SAAS,KAAK,UAAU,IAAI,cAAc,CAGzC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.infrastructure.js b/node_modules/typescript/dist/api/node/node.infrastructure.js new file mode 100644 index 0000000..353652f --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.infrastructure.js @@ -0,0 +1,122 @@ +import { ModifierFlags, SyntaxKind, } from "../../ast/index.js"; +import { HEADER_OFFSET_HASH_HI0, HEADER_OFFSET_HASH_HI1, HEADER_OFFSET_HASH_LO0, HEADER_OFFSET_HASH_LO1, HEADER_OFFSET_PARSE_OPTIONS, NODE_DATA_TYPE_CHILDREN, NODE_DATA_TYPE_EXTENDED, NODE_DATA_TYPE_STRING, NODE_OFFSET_DATA, NODE_OFFSET_END, NODE_OFFSET_KIND, NODE_OFFSET_NEXT, NODE_OFFSET_PARENT, NODE_OFFSET_POS, } from "./protocol.js"; +// ═══════════════════════════════════════════════════════════════════════════ +// Constants +// ═══════════════════════════════════════════════════════════════════════════ +export const popcount8 = [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8]; +export const NODE_DATA_TYPE_MASK = 0xc0_00_00_00; +export const NODE_CHILD_MASK = 0x00_00_00_ff; +export const NODE_STRING_INDEX_MASK = 0x00_ff_ff_ff; +export const NODE_EXTENDED_DATA_MASK = 0x00_ff_ff_ff; +// ═══════════════════════════════════════════════════════════════════════════ +// Free functions +// ═══════════════════════════════════════════════════════════════════════════ +/** + * Read the 128-bit content hash from a source file binary response as a hex string. + */ +export function readSourceFileHash(data) { + const lo0 = data.getUint32(HEADER_OFFSET_HASH_LO0, true); + const lo1 = data.getUint32(HEADER_OFFSET_HASH_LO1, true); + const hi0 = data.getUint32(HEADER_OFFSET_HASH_HI0, true); + const hi1 = data.getUint32(HEADER_OFFSET_HASH_HI1, true); + return hex8(hi1) + hex8(hi0) + hex8(lo1) + hex8(lo0); +} +/** + * Read the per-file parse options key from a source file binary response. + * This encodes the ExternalModuleIndicatorOptions bitmask as a string, + * allowing the client to distinguish files parsed with different options. + */ +export function readParseOptionsKey(data) { + return data.getUint32(HEADER_OFFSET_PARSE_OPTIONS, true).toString(); +} +function hex8(n) { + return (n >>> 0).toString(16).padStart(8, "0"); +} +export function modifierToFlag(kind) { + switch (kind) { + case SyntaxKind.StaticKeyword: + return ModifierFlags.Static; + case SyntaxKind.PublicKeyword: + return ModifierFlags.Public; + case SyntaxKind.ProtectedKeyword: + return ModifierFlags.Protected; + case SyntaxKind.PrivateKeyword: + return ModifierFlags.Private; + case SyntaxKind.AbstractKeyword: + return ModifierFlags.Abstract; + case SyntaxKind.AccessorKeyword: + return ModifierFlags.Accessor; + case SyntaxKind.ExportKeyword: + return ModifierFlags.Export; + case SyntaxKind.DeclareKeyword: + return ModifierFlags.Ambient; + case SyntaxKind.ConstKeyword: + return ModifierFlags.Const; + case SyntaxKind.DefaultKeyword: + return ModifierFlags.Default; + case SyntaxKind.AsyncKeyword: + return ModifierFlags.Async; + case SyntaxKind.ReadonlyKeyword: + return ModifierFlags.Readonly; + case SyntaxKind.OverrideKeyword: + return ModifierFlags.Override; + case SyntaxKind.InKeyword: + return ModifierFlags.In; + case SyntaxKind.OutKeyword: + return ModifierFlags.Out; + case SyntaxKind.Decorator: + return ModifierFlags.Decorator; + default: + return ModifierFlags.None; + } +} +// ═══════════════════════════════════════════════════════════════════════════ +// RemoteNodeBase +// ═══════════════════════════════════════════════════════════════════════════ +export class RemoteNodeBase { + parent; // RemoteNode at runtime + view; + index; + _byteIndex; + constructor(view, index, parent, byteIndex) { + this.view = view; + this.index = index; + this.parent = parent; + this._byteIndex = byteIndex; + } + get kind() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_KIND, true); + } + get pos() { + return this.view.getInt32(this._byteIndex + NODE_OFFSET_POS, true); + } + get end() { + return this.view.getInt32(this._byteIndex + NODE_OFFSET_END, true); + } + get next() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_NEXT, true); + } + get parentIndex() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_PARENT, true); + } + get data() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_DATA, true); + } + get dataType() { + return (this.data & NODE_DATA_TYPE_MASK); + } + get childMask() { + if (this.dataType !== NODE_DATA_TYPE_CHILDREN) { + return -1; + } + return this.data & NODE_CHILD_MASK; + } + getFileText(start, end) { + return this.sourceFile._decoder.decode(new Uint8Array(this.view.buffer, this.view.byteOffset + this.sourceFile._offsetStringTable + start, end - start)); + } + get sourceFile() { + // Overridden in RemoteNode; exists here for getFileText access + throw new Error("sourceFile not available on base"); + } +} +//# sourceMappingURL=node.infrastructure.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.infrastructure.js.map b/node_modules/typescript/dist/api/node/node.infrastructure.js.map new file mode 100644 index 0000000..d32e342 --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.infrastructure.js.map @@ -0,0 +1 @@ +{"version":3,"file":"node.infrastructure.js","sourceRoot":"","sources":["../../../src/api/node/node.infrastructure.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,aAAa,EAEb,UAAU,GACb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACH,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,GAClB,MAAM,eAAe,CAAC;AAEvB,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,CAAC,MAAM,SAAS,GAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,C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mBAAmB,CAAiB,CAAC;IAC7D,CAAC;IAED,IAAc,SAAS;QACnB,IAAI,IAAI,CAAC,QAAQ,KAAK,uBAAuB,EAAE,CAAC;YAC5C,OAAO,CAAC,CAAC,CAAC;QACd,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IACvC,CAAC;IAES,WAAW,CAAC,KAAa,EAAE,GAAW;QAC5C,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,GAAG,KAAK,EAAE,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC;IAC7J,CAAC;IAED,IAAc,UAAU;QACpB,+DAA+D;QAC/D,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACxD,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.js b/node_modules/typescript/dist/api/node/node.js new file mode 100644 index 0000000..a2e08f0 --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.js @@ -0,0 +1,298 @@ +import { computeLineStarts, NodeFlags, SyntaxKind, TokenFlags, } from "../../ast/index.js"; +import { MsgpackReader } from "./msgpack.js"; +import { RemoteNode, RemoteNodeList, } from "./node.generated.js"; +import { NODE_EXTENDED_DATA_MASK, } from "./node.infrastructure.js"; +import { HEADER_OFFSET_EXTENDED_DATA, HEADER_OFFSET_NODES, HEADER_OFFSET_STRING_TABLE, HEADER_OFFSET_STRING_TABLE_OFFSETS, HEADER_OFFSET_STRUCTURED_DATA, KIND_NODE_LIST, NODE_LEN, NODE_OFFSET_KIND, NODE_OFFSET_PARENT, } from "./protocol.js"; +import { Wtf8Decoder } from "./wtf8.js"; +// Re-export everything consumers need from the other two files. +export { RemoteNode, RemoteNodeList } from "./node.generated.js"; +export { readParseOptionsKey, readSourceFileHash, RemoteNodeBase } from "./node.infrastructure.js"; +// ═══════════════════════════════════════════════════════════════════════════ +// RemoteSourceFile +// ═══════════════════════════════════════════════════════════════════════════ +const NO_STRUCTURED_DATA = 0xFFFFFFFF; +export class RemoteSourceFile extends RemoteNode { + nodes; + _offsetNodes; + _offsetStringTableOffsets; + _offsetStringTable; + _offsetExtendedData; + _offsetStructuredData; + _decoder; + _timing; + _lineStarts; + _cachedText; + _cachedReferencedFiles; + _cachedTypeReferenceDirectives; + _cachedLibReferenceDirectives; + _cachedImports; + _cachedModuleAugmentations; + _cachedAmbientModuleNames; + constructor(data, decoder, timing) { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + const offsetNodes = view.getUint32(HEADER_OFFSET_NODES, true); + super(view, 1, undefined, undefined, offsetNodes); + this._sourceFile = this; + this._offsetNodes = offsetNodes; + this._offsetStringTableOffsets = view.getUint32(HEADER_OFFSET_STRING_TABLE_OFFSETS, true); + this._offsetStringTable = view.getUint32(HEADER_OFFSET_STRING_TABLE, true); + this._offsetExtendedData = view.getUint32(HEADER_OFFSET_EXTENDED_DATA, true); + this._offsetStructuredData = view.getUint32(HEADER_OFFSET_STRUCTURED_DATA, true); + this._decoder = decoder; + this._timing = timing; + this.nodes = Array((view.byteLength - offsetNodes) / NODE_LEN); + this.nodes[1] = this; + // Every node slot is materializable on demand except the nil sentinel at + // index 0 and the source-file node at index 1, which is pre-materialized. + timing?.recordSourceFileFetched(Math.max(0, this.nodes.length - 2)); + } + readFileReferences(structuredDataOffset) { + if (structuredDataOffset === NO_STRUCTURED_DATA) { + return []; + } + const buf = new Uint8Array(this.view.buffer, this.view.byteOffset, this.view.byteLength); + const reader = new MsgpackReader(buf, this._offsetStructuredData + structuredDataOffset); + const count = reader.readArrayHeader(); + const result = []; + for (let i = 0; i < count; i++) { + reader.readArrayHeader(); // 5-element tuple + const pos = reader.readUint(); + const end = reader.readUint(); + const fileName = reader.readString(); + const resolutionMode = reader.readUint(); + const preserve = reader.readBool(); + result.push({ pos, end, fileName, resolutionMode, preserve }); + } + return result; + } + readNodeIndexArray(structuredDataOffset) { + if (structuredDataOffset === NO_STRUCTURED_DATA) { + return []; + } + const buf = new Uint8Array(this.view.buffer, this.view.byteOffset, this.view.byteLength); + const reader = new MsgpackReader(buf, this._offsetStructuredData + structuredDataOffset); + const count = reader.readArrayHeader(); + const result = []; + for (let i = 0; i < count; i++) { + const nodeIndex = reader.readUint(); + result.push(this.getOrCreateNodeAtIndex(nodeIndex)); + } + return result; + } + readStringArray(structuredDataOffset) { + if (structuredDataOffset === NO_STRUCTURED_DATA) { + return []; + } + const buf = new Uint8Array(this.view.buffer, this.view.byteOffset, this.view.byteLength); + const reader = new MsgpackReader(buf, this._offsetStructuredData + structuredDataOffset); + const count = reader.readArrayHeader(); + const result = []; + for (let i = 0; i < count; i++) { + result.push(reader.readString()); + } + return result; + } + /** @internal */ + getOrCreateNodeAtIndex(index) { + let node = this.nodes[index]; + if (!node) { + // Resolve the real parent so that nodes looked up directly by index (e.g. via + // NodeHandle.resolve) report the correct `parent`, rather than always pointing at + // the source file. The stored parent index can refer to a synthetic NodeList + // container; skip those to mirror normal traversal, where list elements take the + // list's parent. The walk terminates at the source file, which occupies index 1 + // and is already cached. + let parentIndex = this.view.getUint32(this._offsetNodes + index * NODE_LEN + NODE_OFFSET_PARENT, true); + while (parentIndex !== index && + this.view.getUint32(this._offsetNodes + parentIndex * NODE_LEN + NODE_OFFSET_KIND, true) === KIND_NODE_LIST) { + parentIndex = this.view.getUint32(this._offsetNodes + parentIndex * NODE_LEN + NODE_OFFSET_PARENT, true); + } + const parent = parentIndex === index ? this : this.getOrCreateNodeAtIndex(parentIndex); + node = new RemoteNode(this.view, index, parent, this, this._offsetNodes); + this.nodes[index] = node; + this._timing?.recordMaterialization(); + } + return node; + } + // ═══ SourceFile-specific extended data getters ═══ + get extendedDataOffset() { + return this._offsetExtendedData + (this.data & NODE_EXTENDED_DATA_MASK); + } + get fileName() { + const stringIndex = this.view.getUint32(this.extendedDataOffset + 4, true); + return this.getString(stringIndex); + } + get path() { + const stringIndex = this.view.getUint32(this.extendedDataOffset + 8, true); + return this.getString(stringIndex); + } + get languageVariant() { + return this.view.getUint32(this.extendedDataOffset + 12, true); + } + get scriptKind() { + return this.view.getUint32(this.extendedDataOffset + 16, true); + } + get referencedFiles() { + if (this._cachedReferencedFiles !== undefined) + return this._cachedReferencedFiles; + const offset = this.view.getUint32(this.extendedDataOffset + 20, true); + const files = this.readFileReferences(offset); + this._cachedReferencedFiles = files; + return files; + } + get typeReferenceDirectives() { + if (this._cachedTypeReferenceDirectives !== undefined) + return this._cachedTypeReferenceDirectives; + const offset = this.view.getUint32(this.extendedDataOffset + 24, true); + const directives = this.readFileReferences(offset); + this._cachedTypeReferenceDirectives = directives; + return directives; + } + get libReferenceDirectives() { + if (this._cachedLibReferenceDirectives !== undefined) + return this._cachedLibReferenceDirectives; + const offset = this.view.getUint32(this.extendedDataOffset + 28, true); + const directives = this.readFileReferences(offset); + this._cachedLibReferenceDirectives = directives; + return directives; + } + get imports() { + if (this._cachedImports !== undefined) + return this._cachedImports; + const offset = this.view.getUint32(this.extendedDataOffset + 32, true); + const imports = this.readNodeIndexArray(offset); + this._cachedImports = imports; + return imports; + } + get moduleAugmentations() { + if (this._cachedModuleAugmentations !== undefined) + return this._cachedModuleAugmentations; + const offset = this.view.getUint32(this.extendedDataOffset + 36, true); + const moduleAugmentations = this.readNodeIndexArray(offset); + this._cachedModuleAugmentations = moduleAugmentations; + return moduleAugmentations; + } + get ambientModuleNames() { + if (this._cachedAmbientModuleNames !== undefined) + return this._cachedAmbientModuleNames; + const offset = this.view.getUint32(this.extendedDataOffset + 40, true); + const names = this.readStringArray(offset); + this._cachedAmbientModuleNames = names; + return names; + } + get externalModuleIndicator() { + const nodeIndex = this.view.getUint32(this.extendedDataOffset + 44, true); + if (nodeIndex === 0) + return undefined; + if (nodeIndex === this.index) + return true; + return this.getOrCreateNodeAtIndex(nodeIndex); + } + get isDeclarationFile() { + return (this.flags & NodeFlags.Ambient) !== 0; + } + get text() { + if (this._cachedText !== undefined) + return this._cachedText; + const text = super.text; + this._cachedText = text; + return text; + } + // ═══ Line/character position mapping ═══ + getLineStarts() { + return this._lineStarts ??= computeLineStarts(this.text ?? ""); + } + getLineAndCharacterOfPosition(position) { + const lineStarts = this.getLineStarts(); + const line = computeLineOfPosition(lineStarts, position); + return { line, character: position - lineStarts[line] }; + } + getPositionOfLineAndCharacter(line, character) { + const lineStarts = this.getLineStarts(); + if (line < 0 || line >= lineStarts.length) { + throw new Error(`Bad line number. Line: ${line}, lineStarts.length: ${lineStarts.length}`); + } + return lineStarts[line] + character; + } +} +/** + * Find the 0-based line number containing the given position via binary search. + * Assumes the first line starts at position 0 and `position` is non-negative. + */ +function computeLineOfPosition(lineStarts, position) { + let low = 0; + let high = lineStarts.length - 1; + while (low <= high) { + const middle = low + ((high - low) >> 1); + const value = lineStarts[middle]; + if (value < position) { + low = middle + 1; + } + else if (value > position) { + high = middle - 1; + } + else { + return middle; + } + } + return low - 1; +} +/** + * Find a descendant node at a specific position with matching kind and end position. + */ +export function findDescendant(root, pos, end, kind) { + if (root.pos === pos && root.end === end && root.kind === kind) { + return root; + } + // Search children + let result; + root.forEachChild(child => { + if (result) + return result; // Already found + // Only search in children that could contain our target + if (child.pos <= pos && child.end >= end) { + result = findDescendant(child, pos, end, kind); + } + return undefined; + }); + return result; +} +/** + * Parse a node handle string into its components. + * Handle format: "index.kind.path" where path may contain dots. + */ +export function parseNodeHandle(handle) { + const firstDot = handle.indexOf("."); + if (firstDot === -1) { + throw new Error(`Invalid node handle: ${handle}`); + } + const secondDot = handle.indexOf(".", firstDot + 1); + if (secondDot === -1) { + throw new Error(`Invalid node handle: ${handle}`); + } + return { + index: parseInt(handle.slice(0, firstDot), 10), + kind: parseInt(handle.slice(firstDot + 1, secondDot), 10), + path: handle.slice(secondDot + 1), + }; +} +/** + * Decode binary-encoded AST data into a Node. + * Works for any binary-encoded node, including synthetic nodes + * (e.g. from typeToTypeNode) that don't have a source file. + */ +export function decodeNode(data) { + const sf = new RemoteSourceFile(data, new Wtf8Decoder()); + return sf; +} +/** + * Get the unique ID string for a remote node. + * Throws if the node is not a RemoteNode (i.e. not decoded from binary data). + */ +export function getNodeId(node) { + if (!(node instanceof RemoteNode)) { + throw new Error("getNodeId requires a RemoteNode"); + } + return node.id; +} +//# sourceMappingURL=node.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.js.map b/node_modules/typescript/dist/api/node/node.js.map new file mode 100644 index 0000000..e39c00c --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.js.map @@ -0,0 +1 @@ +{"version":3,"file":"node.js","sourceRoot":"","sources":["../../../src/api/node/node.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EAIjB,SAAS,EAET,UAAU,EACV,UAAU,GACb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACH,UAAU,EACV,cAAc,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,uBAAuB,GAG1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACH,2BAA2B,EAC3B,mBAAmB,EACnB,0BAA0B,EAC1B,kCAAkC,EAClC,6BAA6B,EAC7B,cAAc,EACd,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,gEAAgE;AAChE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEnG,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E,MAAM,kBAAkB,GAAG,UAAU,CAAC;AAEtC,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IACnC,KAAK,CAAkC;IACvC,YAAY,C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AAG,CAAC,CAAC,CAAC;IACpD,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,wBAAwB,MAAM,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,OAAO;QACH,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC;QAC9C,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE,SAAS,CAAC,EAAE,EAAE,CAAe;QACvE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAS;KAC5C,CAAC;AACN,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,IAAgB;IACvC,MAAM,EAAE,GAAG,IAAI,gBAAgB,CAAC,IAAI,EAAE,IAAI,WAAW,EAAE,CAAC,CAAC;IACzD,OAAO,EAAqB,CAAC;AACjC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,IAAU;IAChC,IAAI,CAAC,CAAC,IAAI,YAAY,UAAU,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,IAAI,CAAC,EAAE,CAAC;AACnB,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/protocol.d.ts b/node_modules/typescript/dist/api/node/protocol.d.ts new file mode 100644 index 0000000..cbebf38 --- /dev/null +++ b/node_modules/typescript/dist/api/node/protocol.d.ts @@ -0,0 +1,29 @@ +export declare const PROTOCOL_VERSION = 5; +export declare const HEADER_OFFSET_METADATA = 0; +export declare const HEADER_OFFSET_HASH_LO0 = 4; +export declare const HEADER_OFFSET_HASH_LO1 = 8; +export declare const HEADER_OFFSET_HASH_HI0 = 12; +export declare const HEADER_OFFSET_HASH_HI1 = 16; +export declare const HEADER_OFFSET_PARSE_OPTIONS = 20; +export declare const HEADER_OFFSET_STRING_TABLE_OFFSETS = 24; +export declare const HEADER_OFFSET_STRING_TABLE = 28; +export declare const HEADER_OFFSET_EXTENDED_DATA = 32; +export declare const HEADER_OFFSET_STRUCTURED_DATA = 36; +export declare const HEADER_OFFSET_NODES = 40; +export declare const HEADER_SIZE = 44; +export declare const NODE_LEN = 28; +export declare const NODE_OFFSET_KIND = 0; +export declare const NODE_OFFSET_POS = 4; +export declare const NODE_OFFSET_END = 8; +export declare const NODE_OFFSET_NEXT = 12; +export declare const NODE_OFFSET_PARENT = 16; +export declare const NODE_OFFSET_DATA = 20; +export declare const NODE_OFFSET_FLAGS = 24; +export declare const KIND_NODE_LIST = 4294967295; +export declare const NODE_DATA_TYPE_CHILDREN = 0; +export declare const NODE_DATA_TYPE_STRING = 1073741824; +export declare const NODE_DATA_TYPE_EXTENDED = 2147483648; +export declare const NODE_STRING_INDEX_MASK = 16777215; +export declare const NODE_EXTENDED_DATA_MASK = 16777215; +export { childProperties, singleChildNodePropertyNames } from "./protocol.generated.ts"; +//# sourceMappingURL=protocol.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/protocol.d.ts.map b/node_modules/typescript/dist/api/node/protocol.d.ts.map new file mode 100644 index 0000000..d0f6deb --- /dev/null +++ b/node_modules/typescript/dist/api/node/protocol.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../src/api/node/protocol.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAC9C,eAAO,MAAM,kCAAkC,KAAK,CAAC;AACrD,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAC9C,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAChD,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,WAAW,KAAK,CAAC;AAE9B,eAAO,MAAM,QAAQ,KAAK,CAAC;AAE3B,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,eAAO,MAAM,cAAc,aAAa,CAAC;AAEzC,eAAO,MAAM,uBAAuB,IAAa,CAAC;AAClD,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAChD,eAAO,MAAM,uBAAuB,aAAa,CAAC;AAElD,eAAO,MAAM,sBAAsB,WAAa,CAAC;AACjD,eAAO,MAAM,uBAAuB,WAAa,CAAC;AAGlD,OAAO,EAAE,eAAe,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/protocol.generated.d.ts b/node_modules/typescript/dist/api/node/protocol.generated.d.ts new file mode 100644 index 0000000..4bcb8d5 --- /dev/null +++ b/node_modules/typescript/dist/api/node/protocol.generated.d.ts @@ -0,0 +1,4 @@ +import { SyntaxKind } from "../../ast/index.ts"; +export declare const childProperties: Readonly>>; +export declare const singleChildNodePropertyNames: Readonly>>; +//# sourceMappingURL=protocol.generated.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map b/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map new file mode 100644 index 0000000..198ac43 --- /dev/null +++ b/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"protocol.generated.d.ts","sourceRoot":"","sources":["../../../src/api/node/protocol.generated.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC,CA8KlG,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CA8DtF,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/protocol.generated.js b/node_modules/typescript/dist/api/node/protocol.generated.js new file mode 100644 index 0000000..628478a --- /dev/null +++ b/node_modules/typescript/dist/api/node/protocol.generated.js @@ -0,0 +1,241 @@ +// Code generated by _scripts/generate-encoder.ts. DO NOT EDIT. +import { SyntaxKind } from "../../ast/index.js"; +export const childProperties = { + [SyntaxKind.QualifiedName]: ["left", "right"], + [SyntaxKind.ComputedPropertyName]: ["expression"], + [SyntaxKind.Decorator]: ["expression"], + [SyntaxKind.IfStatement]: ["expression", "thenStatement", "elseStatement"], + [SyntaxKind.DoStatement]: ["statement", "expression"], + [SyntaxKind.WhileStatement]: ["expression", "statement"], + [SyntaxKind.ForStatement]: ["initializer", "condition", "incrementor", "statement"], + [SyntaxKind.ForInStatement]: ["awaitModifier", "initializer", "expression", "statement"], + [SyntaxKind.ForOfStatement]: ["awaitModifier", "initializer", "expression", "statement"], + [SyntaxKind.BreakStatement]: ["label"], + [SyntaxKind.ContinueStatement]: ["label"], + [SyntaxKind.ReturnStatement]: ["expression"], + [SyntaxKind.WithStatement]: ["expression", "statement"], + [SyntaxKind.SwitchStatement]: ["expression", "caseBlock"], + [SyntaxKind.CaseBlock]: ["clauses"], + [SyntaxKind.CaseClause]: ["expression", "statements"], + [SyntaxKind.DefaultClause]: ["expression", "statements"], + [SyntaxKind.ThrowStatement]: ["expression"], + [SyntaxKind.TryStatement]: ["tryBlock", "catchClause", "finallyBlock"], + [SyntaxKind.CatchClause]: ["variableDeclaration", "block"], + [SyntaxKind.LabeledStatement]: ["label", "statement"], + [SyntaxKind.ExpressionStatement]: ["expression"], + [SyntaxKind.Block]: ["statements"], + [SyntaxKind.VariableStatement]: ["modifiers", "declarationList"], + [SyntaxKind.VariableDeclaration]: ["name", "exclamationToken", "type", "initializer"], + [SyntaxKind.VariableDeclarationList]: ["declarations"], + [SyntaxKind.ObjectBindingPattern]: ["elements"], + [SyntaxKind.ArrayBindingPattern]: ["elements"], + [SyntaxKind.Parameter]: ["modifiers", "dotDotDotToken", "name", "questionToken", "type", "initializer"], + [SyntaxKind.BindingElement]: ["dotDotDotToken", "propertyName", "name", "initializer"], + [SyntaxKind.MissingDeclaration]: ["modifiers"], + [SyntaxKind.FunctionDeclaration]: ["modifiers", "asteriskToken", "name", "typeParameters", "parameters", "type", "body"], + [SyntaxKind.ClassDeclaration]: ["modifiers", "name", "typeParameters", "heritageClauses", "members"], + [SyntaxKind.ClassExpression]: ["modifiers", "name", "typeParameters", "heritageClauses", "members"], + [SyntaxKind.HeritageClause]: ["types"], + [SyntaxKind.InterfaceDeclaration]: ["modifiers", "name", "typeParameters", "heritageClauses", "members"], + [SyntaxKind.TypeAliasDeclaration]: ["modifiers", "name", "typeParameters", "type"], + [SyntaxKind.JSTypeAliasDeclaration]: ["modifiers", "name", "typeParameters", "type"], + [SyntaxKind.EnumMember]: ["name", "initializer"], + [SyntaxKind.EnumDeclaration]: ["modifiers", "name", "members"], + [SyntaxKind.ModuleBlock]: ["statements"], + [SyntaxKind.ImportDeclaration]: ["modifiers", "importClause", "moduleSpecifier", "attributes"], + [SyntaxKind.JSImportDeclaration]: ["modifiers", "importClause", "moduleSpecifier", "attributes"], + [SyntaxKind.ExternalModuleReference]: ["expression"], + [SyntaxKind.NamespaceImport]: ["name"], + [SyntaxKind.NamedImports]: ["elements"], + [SyntaxKind.ExportAssignment]: ["modifiers", "type", "expression"], + [SyntaxKind.NamespaceExportDeclaration]: ["modifiers", "name"], + [SyntaxKind.NamespaceExport]: ["name"], + [SyntaxKind.NamedExports]: ["elements"], + [SyntaxKind.ExportSpecifier]: ["propertyName", "name"], + [SyntaxKind.CallSignature]: ["typeParameters", "parameters", "type"], + [SyntaxKind.ConstructSignature]: ["typeParameters", "parameters", "type"], + [SyntaxKind.Constructor]: ["modifiers", "typeParameters", "parameters", "type", "body"], + [SyntaxKind.GetAccessor]: ["modifiers", "name", "typeParameters", "parameters", "type", "body"], + [SyntaxKind.SetAccessor]: ["modifiers", "name", "typeParameters", "parameters", "type", "body"], + [SyntaxKind.IndexSignature]: ["modifiers", "parameters", "type"], + [SyntaxKind.MethodSignature]: ["modifiers", "name", "postfixToken", "typeParameters", "parameters", "type"], + [SyntaxKind.MethodDeclaration]: ["modifiers", "asteriskToken", "name", "postfixToken", "typeParameters", "parameters", "type", "body"], + [SyntaxKind.PropertySignature]: ["modifiers", "name", "postfixToken", "type", "initializer"], + [SyntaxKind.PropertyDeclaration]: ["modifiers", "name", "postfixToken", "type", "initializer"], + [SyntaxKind.ClassStaticBlockDeclaration]: ["modifiers", "body"], + [SyntaxKind.BinaryExpression]: ["modifiers", "left", "type", "operatorToken", "right"], + [SyntaxKind.PrefixUnaryExpression]: ["operand"], + [SyntaxKind.PostfixUnaryExpression]: ["operand"], + [SyntaxKind.YieldExpression]: ["asteriskToken", "expression"], + [SyntaxKind.ArrowFunction]: ["modifiers", "typeParameters", "parameters", "type", "equalsGreaterThanToken", "body"], + [SyntaxKind.FunctionExpression]: ["modifiers", "asteriskToken", "name", "typeParameters", "parameters", "type", "body"], + [SyntaxKind.AsExpression]: ["expression", "type"], + [SyntaxKind.SatisfiesExpression]: ["expression", "type"], + [SyntaxKind.ConditionalExpression]: ["condition", "questionToken", "whenTrue", "colonToken", "whenFalse"], + [SyntaxKind.PropertyAccessExpression]: ["expression", "questionDotToken", "name"], + [SyntaxKind.ElementAccessExpression]: ["expression", "questionDotToken", "argumentExpression"], + [SyntaxKind.CallExpression]: ["expression", "questionDotToken", "typeArguments", "arguments"], + [SyntaxKind.NewExpression]: ["expression", "typeArguments", "arguments"], + [SyntaxKind.MetaProperty]: ["name"], + [SyntaxKind.NonNullExpression]: ["expression"], + [SyntaxKind.SpreadElement]: ["expression"], + [SyntaxKind.TemplateExpression]: ["head", "templateSpans"], + [SyntaxKind.TemplateSpan]: ["expression", "literal"], + [SyntaxKind.TaggedTemplateExpression]: ["tag", "questionDotToken", "typeArguments", "template"], + [SyntaxKind.ParenthesizedExpression]: ["expression"], + [SyntaxKind.ArrayLiteralExpression]: ["elements"], + [SyntaxKind.ObjectLiteralExpression]: ["properties"], + [SyntaxKind.SpreadAssignment]: ["expression"], + [SyntaxKind.PropertyAssignment]: ["modifiers", "name", "postfixToken", "type", "initializer"], + [SyntaxKind.ShorthandPropertyAssignment]: ["modifiers", "name", "postfixToken", "type", "equalsToken", "objectAssignmentInitializer"], + [SyntaxKind.DeleteExpression]: ["expression"], + [SyntaxKind.TypeOfExpression]: ["expression"], + [SyntaxKind.VoidExpression]: ["expression"], + [SyntaxKind.AwaitExpression]: ["expression"], + [SyntaxKind.TypeAssertionExpression]: ["type", "expression"], + [SyntaxKind.UnionType]: ["types"], + [SyntaxKind.IntersectionType]: ["types"], + [SyntaxKind.ConditionalType]: ["checkType", "extendsType", "trueType", "falseType"], + [SyntaxKind.TypeOperator]: ["type"], + [SyntaxKind.InferType]: ["typeParameter"], + [SyntaxKind.ArrayType]: ["elementType"], + [SyntaxKind.IndexedAccessType]: ["objectType", "indexType"], + [SyntaxKind.TypeReference]: ["typeName", "typeArguments"], + [SyntaxKind.ExpressionWithTypeArguments]: ["expression", "typeArguments"], + [SyntaxKind.LiteralType]: ["literal"], + [SyntaxKind.TypePredicate]: ["assertsModifier", "parameterName", "type"], + [SyntaxKind.ImportAttribute]: ["name", "value"], + [SyntaxKind.ImportAttributes]: ["attributes"], + [SyntaxKind.TypeQuery]: ["exprName", "typeArguments"], + [SyntaxKind.MappedType]: ["readonlyToken", "typeParameter", "nameType", "questionToken", "type", "members"], + [SyntaxKind.TypeLiteral]: ["members"], + [SyntaxKind.TupleType]: ["elements"], + [SyntaxKind.NamedTupleMember]: ["dotDotDotToken", "name", "questionToken", "type"], + [SyntaxKind.OptionalType]: ["type"], + [SyntaxKind.RestType]: ["type"], + [SyntaxKind.ParenthesizedType]: ["type"], + [SyntaxKind.FunctionType]: ["typeParameters", "parameters", "type"], + [SyntaxKind.ConstructorType]: ["modifiers", "typeParameters", "parameters", "type"], + [SyntaxKind.TemplateLiteralType]: ["head", "templateSpans"], + [SyntaxKind.TemplateLiteralTypeSpan]: ["type", "literal"], + [SyntaxKind.SyntheticExpression]: ["tupleNameSource"], + [SyntaxKind.PartiallyEmittedExpression]: ["expression"], + [SyntaxKind.JsxElement]: ["openingElement", "children", "closingElement"], + [SyntaxKind.JsxAttributes]: ["properties"], + [SyntaxKind.JsxNamespacedName]: ["namespace", "name"], + [SyntaxKind.JsxOpeningElement]: ["tagName", "typeArguments", "attributes"], + [SyntaxKind.JsxSelfClosingElement]: ["tagName", "typeArguments", "attributes"], + [SyntaxKind.JsxFragment]: ["openingFragment", "children", "closingFragment"], + [SyntaxKind.JsxAttribute]: ["name", "initializer"], + [SyntaxKind.JsxSpreadAttribute]: ["expression"], + [SyntaxKind.JsxClosingElement]: ["tagName"], + [SyntaxKind.JsxExpression]: ["dotDotDotToken", "expression"], + [SyntaxKind.SyntaxList]: ["children"], + [SyntaxKind.JSDoc]: ["comment", "tags"], + [SyntaxKind.JSDocTypeExpression]: ["type"], + [SyntaxKind.JSDocNonNullableType]: ["type"], + [SyntaxKind.JSDocNullableType]: ["type"], + [SyntaxKind.JSDocVariadicType]: ["type"], + [SyntaxKind.JSDocOptionalType]: ["type"], + [SyntaxKind.JSDocTypeTag]: ["tagName", "typeExpression", "comment"], + [SyntaxKind.JSDocUnknownTag]: ["tagName", "comment"], + [SyntaxKind.JSDocTemplateTag]: ["tagName", "constraint", "typeParameters", "comment"], + [SyntaxKind.JSDocReturnTag]: ["tagName", "typeExpression", "comment"], + [SyntaxKind.JSDocPublicTag]: ["tagName", "comment"], + [SyntaxKind.JSDocPrivateTag]: ["tagName", "comment"], + [SyntaxKind.JSDocProtectedTag]: ["tagName", "comment"], + [SyntaxKind.JSDocReadonlyTag]: ["tagName", "comment"], + [SyntaxKind.JSDocOverrideTag]: ["tagName", "comment"], + [SyntaxKind.JSDocDeprecatedTag]: ["tagName", "comment"], + [SyntaxKind.JSDocSeeTag]: ["tagName", "nameExpression", "comment"], + [SyntaxKind.JSDocImplementsTag]: ["tagName", "className", "comment"], + [SyntaxKind.JSDocAugmentsTag]: ["tagName", "className", "comment"], + [SyntaxKind.JSDocSatisfiesTag]: ["tagName", "typeExpression", "comment"], + [SyntaxKind.JSDocThrowsTag]: ["tagName", "typeExpression", "comment"], + [SyntaxKind.JSDocThisTag]: ["tagName", "typeExpression", "comment"], + [SyntaxKind.JSDocImportTag]: ["tagName", "importClause", "moduleSpecifier", "attributes", "comment"], + [SyntaxKind.JSDocCallbackTag]: ["tagName", "typeExpression", "name", "comment"], + [SyntaxKind.JSDocOverloadTag]: ["tagName", "typeExpression", "comment"], + [SyntaxKind.JSDocTypedefTag]: ["tagName", "typeExpression", "name", "comment"], + [SyntaxKind.JSDocSignature]: ["typeParameters", "parameters", "type"], + [SyntaxKind.JSDocNameReference]: ["name"], + [SyntaxKind.SourceFile]: ["statements", "endOfFileToken"], + [SyntaxKind.ModuleDeclaration]: ["modifiers", "name", "body"], + [SyntaxKind.ImportEqualsDeclaration]: ["modifiers", "name", "moduleReference"], + [SyntaxKind.ExportDeclaration]: ["modifiers", "exportClause", "moduleSpecifier", "attributes"], + [SyntaxKind.ImportType]: ["argument", "attributes", "qualifier", "typeArguments"], + [SyntaxKind.ImportClause]: ["name", "namedBindings"], + [SyntaxKind.ImportSpecifier]: ["propertyName", "name"], + [SyntaxKind.JSDocLink]: ["name"], + [SyntaxKind.JSDocLinkPlain]: ["name"], + [SyntaxKind.JSDocLinkCode]: ["name"], + [SyntaxKind.TypeParameter]: ["modifiers", "name", "constraint", "expression", "defaultType"], + [SyntaxKind.SyntheticReferenceExpression]: ["expression", "thisArg"], + [SyntaxKind.JSDocTypeLiteral]: ["jsdocPropertyTags"], + [SyntaxKind.JSDocParameterTag]: ["tagName", "name", "typeExpression", "comment"], + [SyntaxKind.JSDocPropertyTag]: ["tagName", "name", "typeExpression", "comment"], +}; +export const singleChildNodePropertyNames = { + [SyntaxKind.ComputedPropertyName]: "expression", + [SyntaxKind.Decorator]: "expression", + [SyntaxKind.BreakStatement]: "label", + [SyntaxKind.ContinueStatement]: "label", + [SyntaxKind.ReturnStatement]: "expression", + [SyntaxKind.CaseBlock]: "clauses", + [SyntaxKind.ThrowStatement]: "expression", + [SyntaxKind.ExpressionStatement]: "expression", + [SyntaxKind.Block]: "statements", + [SyntaxKind.VariableDeclarationList]: "declarations", + [SyntaxKind.ObjectBindingPattern]: "elements", + [SyntaxKind.ArrayBindingPattern]: "elements", + [SyntaxKind.MissingDeclaration]: "modifiers", + [SyntaxKind.HeritageClause]: "types", + [SyntaxKind.ModuleBlock]: "statements", + [SyntaxKind.ExternalModuleReference]: "expression", + [SyntaxKind.NamespaceImport]: "name", + [SyntaxKind.NamedImports]: "elements", + [SyntaxKind.NamespaceExport]: "name", + [SyntaxKind.NamedExports]: "elements", + [SyntaxKind.PrefixUnaryExpression]: "operand", + [SyntaxKind.PostfixUnaryExpression]: "operand", + [SyntaxKind.MetaProperty]: "name", + [SyntaxKind.NonNullExpression]: "expression", + [SyntaxKind.SpreadElement]: "expression", + [SyntaxKind.ParenthesizedExpression]: "expression", + [SyntaxKind.ArrayLiteralExpression]: "elements", + [SyntaxKind.ObjectLiteralExpression]: "properties", + [SyntaxKind.SpreadAssignment]: "expression", + [SyntaxKind.DeleteExpression]: "expression", + [SyntaxKind.TypeOfExpression]: "expression", + [SyntaxKind.VoidExpression]: "expression", + [SyntaxKind.AwaitExpression]: "expression", + [SyntaxKind.UnionType]: "types", + [SyntaxKind.IntersectionType]: "types", + [SyntaxKind.TypeOperator]: "type", + [SyntaxKind.InferType]: "typeParameter", + [SyntaxKind.ArrayType]: "elementType", + [SyntaxKind.LiteralType]: "literal", + [SyntaxKind.ImportAttributes]: "attributes", + [SyntaxKind.TypeLiteral]: "members", + [SyntaxKind.TupleType]: "elements", + [SyntaxKind.OptionalType]: "type", + [SyntaxKind.RestType]: "type", + [SyntaxKind.ParenthesizedType]: "type", + [SyntaxKind.SyntheticExpression]: "tupleNameSource", + [SyntaxKind.PartiallyEmittedExpression]: "expression", + [SyntaxKind.JsxAttributes]: "properties", + [SyntaxKind.JsxSpreadAttribute]: "expression", + [SyntaxKind.JsxClosingElement]: "tagName", + [SyntaxKind.SyntaxList]: "children", + [SyntaxKind.JSDocTypeExpression]: "type", + [SyntaxKind.JSDocNonNullableType]: "type", + [SyntaxKind.JSDocNullableType]: "type", + [SyntaxKind.JSDocVariadicType]: "type", + [SyntaxKind.JSDocOptionalType]: "type", + [SyntaxKind.JSDocNameReference]: "name", + [SyntaxKind.JSDocLink]: "name", + [SyntaxKind.JSDocLinkPlain]: "name", + [SyntaxKind.JSDocLinkCode]: "name", + [SyntaxKind.JSDocTypeLiteral]: "jsdocPropertyTags", +}; +//# sourceMappingURL=protocol.generated.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/protocol.generated.js.map b/node_modules/typescript/dist/api/node/protocol.generated.js.map new file mode 100644 index 0000000..811c073 --- /dev/null +++ b/node_modules/typescript/dist/api/node/protocol.generated.js.map @@ -0,0 +1 @@ +{"version":3,"file":"protocol.generated.js","sourceRoot":"","sources":["../../../src/api/node/protocol.generated.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,CAAC,MAAM,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,CAAC,EAAE,SAAS;IACnC,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,UAAU;IAClC,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,MAAM;IACjC,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM;IAC7B,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,MAAM;IACtC,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,iBAAiB;IACnD,CAAC,UAAU,CAAC,0BAA0B,CAAC,EAAE,YAAY;IACrD,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,YAAY;IACxC,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE,YAAY;IAC7C,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,SAAS;IACzC,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,UAAU;IACnC,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,MAAM;IACxC,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE,MAAM;IACzC,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,MAAM;IACtC,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,MAAM;IACtC,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,MAAM;IACtC,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE,MAAM;IACvC,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,MAAM;IAC9B,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,MAAM;IACnC,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,MAAM;IAClC,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,mBAAmB;CACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/protocol.js b/node_modules/typescript/dist/api/node/protocol.js new file mode 100644 index 0000000..6cc2352 --- /dev/null +++ b/node_modules/typescript/dist/api/node/protocol.js @@ -0,0 +1,30 @@ +export const PROTOCOL_VERSION = 5; +export const HEADER_OFFSET_METADATA = 0; +export const HEADER_OFFSET_HASH_LO0 = 4; +export const HEADER_OFFSET_HASH_LO1 = 8; +export const HEADER_OFFSET_HASH_HI0 = 12; +export const HEADER_OFFSET_HASH_HI1 = 16; +export const HEADER_OFFSET_PARSE_OPTIONS = 20; +export const HEADER_OFFSET_STRING_TABLE_OFFSETS = 24; +export const HEADER_OFFSET_STRING_TABLE = 28; +export const HEADER_OFFSET_EXTENDED_DATA = 32; +export const HEADER_OFFSET_STRUCTURED_DATA = 36; +export const HEADER_OFFSET_NODES = 40; +export const HEADER_SIZE = 44; +export const NODE_LEN = 28; +export const NODE_OFFSET_KIND = 0; +export const NODE_OFFSET_POS = 4; +export const NODE_OFFSET_END = 8; +export const NODE_OFFSET_NEXT = 12; +export const NODE_OFFSET_PARENT = 16; +export const NODE_OFFSET_DATA = 20; +export const NODE_OFFSET_FLAGS = 24; +export const KIND_NODE_LIST = 0xFFFFFFFF; +export const NODE_DATA_TYPE_CHILDREN = 0x00000000; +export const NODE_DATA_TYPE_STRING = 0x40000000; +export const NODE_DATA_TYPE_EXTENDED = 0x80000000; +export const NODE_STRING_INDEX_MASK = 0x00FFFFFF; +export const NODE_EXTENDED_DATA_MASK = 0x00FFFFFF; +// Re-export generated child properties +export { childProperties, singleChildNodePropertyNames } from "./protocol.generated.js"; +//# sourceMappingURL=protocol.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/protocol.js.map b/node_modules/typescript/dist/api/node/protocol.js.map new file mode 100644 index 0000000..7905c71 --- /dev/null +++ b/node_modules/typescript/dist/api/node/protocol.js.map @@ -0,0 +1 @@ +{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/api/node/protocol.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAElC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,sB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A4B,EAAE,MAAM,yBAAyB,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/wtf8.d.ts b/node_modules/typescript/dist/api/node/wtf8.d.ts new file mode 100644 index 0000000..71f1845 --- /dev/null +++ b/node_modules/typescript/dist/api/node/wtf8.d.ts @@ -0,0 +1,6 @@ +type DecodeOptions = Parameters[1]; +export declare class Wtf8Decoder extends TextDecoder { + decode(input?: NodeJS.AllowSharedBufferSource, options?: DecodeOptions): string; +} +export {}; +//# sourceMappingURL=wtf8.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/wtf8.d.ts.map b/node_modules/typescript/dist/api/node/wtf8.d.ts.map new file mode 100644 index 0000000..bacab6d --- /dev/null +++ b/node_modules/typescript/dist/api/node/wtf8.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"wtf8.d.ts","sourceRoot":"","sources":["../../../src/api/node/wtf8.ts"],"names":[],"mappings":"AAOA,KAAK,aAAa,GAAG,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AA6B1D,qBAAa,WAAY,SAAQ,WAAW;IAC/B,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM;CAkC3F"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/wtf8.js b/node_modules/typescript/dist/api/node/wtf8.js new file mode 100644 index 0000000..ae98df9 --- /dev/null +++ b/node_modules/typescript/dist/api/node/wtf8.js @@ -0,0 +1,61 @@ +import { Buffer } from "node:buffer"; +const surrogateLeadByte = 0xED; +const surrogateSecondByteMin = 0xA0; +const surrogateSecondByteMax = 0xBF; +const continuationByteMin = 0x80; +const continuationByteMax = 0xBF; +function isWtf8Surrogate(bytes, index) { + return index + 2 < bytes.length + && bytes[index] === surrogateLeadByte + && bytes[index + 1] >= surrogateSecondByteMin + && bytes[index + 1] <= surrogateSecondByteMax + && bytes[index + 2] >= continuationByteMin + && bytes[index + 2] <= continuationByteMax; +} +function getSurrogateCodeUnit(bytes, index) { + return 0xD000 | ((bytes[index + 1] & 0x3F) << 6) | (bytes[index + 2] & 0x3F); +} +function hasSurrogateLeadByte(bytes) { + return Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).indexOf(surrogateLeadByte) >= 0; +} +function toUint8Array(input) { + if (input instanceof Uint8Array) { + return input; + } + if (ArrayBuffer.isView(input)) { + return new Uint8Array(input.buffer, input.byteOffset, input.byteLength); + } + return new Uint8Array(input); +} +export class Wtf8Decoder extends TextDecoder { + decode(input, options) { + if (input === undefined) { + return super.decode(input, options); + } + const bytes = toUint8Array(input); + if (!hasSurrogateLeadByte(bytes)) { + return super.decode(bytes, options); + } + const parts = []; + let segmentStart = 0; + for (let i = 0; i < bytes.length; i++) { + if (!isWtf8Surrogate(bytes, i)) { + continue; + } + if (segmentStart < i) { + parts.push(super.decode(bytes.subarray(segmentStart, i), options)); + } + parts.push(String.fromCharCode(getSurrogateCodeUnit(bytes, i))); + i += 2; + segmentStart = i + 1; + } + if (segmentStart === 0) { + return super.decode(bytes, options); + } + if (segmentStart < bytes.length) { + parts.push(super.decode(bytes.subarray(segmentStart), options)); + } + return parts.join(""); + } +} +//# sourceMappingURL=wtf8.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/wtf8.js.map b/node_modules/typescript/dist/api/node/wtf8.js.map new file mode 100644 index 0000000..2cffd1e --- /dev/null +++ b/node_modules/typescript/dist/api/node/wtf8.js.map @@ -0,0 +1 @@ +{"version":3,"file":"wtf8.js","sourceRoot":"","sources":["../../../src/api/node/wtf8.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAC/B,MAAM,sBAAsB,GAAG,IAAI,CAAC;AACpC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AACpC,MAAM,mBAAmB,GAAG,IAAI,CAA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,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;QACpE,CAAC;QACD,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/options.d.ts b/node_modules/typescript/dist/api/options.d.ts new file mode 100644 index 0000000..1b565b8 --- /dev/null +++ b/node_modules/typescript/dist/api/options.d.ts @@ -0,0 +1,32 @@ +/** + * Shared utilities for the TypeScript API client. + */ +import type { FileSystem } from "./fs.ts"; +export interface ClientSocketOptions { + /** Path to the Unix domain socket or Windows named pipe for API communication */ + pipe: string; +} +export interface ClientSpawnOptions { + /** Path to the tsgo executable. Defaults to the bundled tsgo binary. */ + tsserverPath?: string; + /** Current working directory */ + cwd?: string; + /** Virtual filesystem callbacks */ + fs?: FileSystem; + /** + * When true, collect timing information for each request. The client + * measures round-trip latency and bytes sent/received, and the server + * measures its own per-request processing time; both are combined (along + * with an estimated transport overhead) in the snapshot returned by + * {@link API.getTimingInfo}. + */ + collectTiming?: boolean; +} +export type ClientOptions = ClientSocketOptions | ClientSpawnOptions; +export declare function isSpawnOptions(options: ClientOptions): options is ClientSpawnOptions; +export declare function resolveExePath(options: ClientSpawnOptions): string; +export interface LSPConnectionOptions extends ClientSocketOptions { +} +export interface APIOptions extends ClientSpawnOptions { +} +//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/options.d.ts.map b/node_modules/typescript/dist/api/options.d.ts.map new file mode 100644 index 0000000..c2036ef --- /dev/null +++ b/node_modules/typescript/dist/api/options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/api/options.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,mBAAmB;IAChC,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IAC/B,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gCAAgC;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;AAErE,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,IAAI,kBAAkB,CAEpF;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAElE;AAED,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;CAChE;AAED,MAAM,WAAW,UAAW,SAAQ,kBAAkB;CACrD"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/options.js b/node_modules/typescript/dist/api/options.js new file mode 100644 index 0000000..f71e78b --- /dev/null +++ b/node_modules/typescript/dist/api/options.js @@ -0,0 +1,11 @@ +/** + * Shared utilities for the TypeScript API client. + */ +import getExePath from "#getExePath"; +export function isSpawnOptions(options) { + return !("pipe" in options); +} +export function resolveExePath(options) { + return options.tsserverPath ?? getExePath(); +} +//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/options.js.map b/node_modules/typescript/dist/api/options.js.map new file mode 100644 index 0000000..f815c27 --- /dev/null +++ b/node_modules/typescript/dist/api/options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/api/options.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,UAAU,MAAM,aAAa,CAAC;AA2BrC,MAAM,UAAU,cAAc,CAAC,OAAsB;IACjD,OAAO,CAAC,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAA2B;IACtD,OAAO,OAAO,CAAC,YAAY,IAAI,UAAU,EAAE,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/path.d.ts b/node_modules/typescript/dist/api/path.d.ts new file mode 100644 index 0000000..c3e738e --- /dev/null +++ b/node_modules/typescript/dist/api/path.d.ts @@ -0,0 +1,110 @@ +/** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * + * For example: + * ```ts + * getRootLength("a") === 0 // "" + * getRootLength("/") === 1 // "/" + * getRootLength("c:") === 2 // "c:" + * getRootLength("c:d") === 0 // "" + * getRootLength("c:/") === 3 // "c:/" + * getRootLength("c:\\") === 3 // "c:\\" + * getRootLength("//server") === 7 // "//server" + * getRootLength("//server/share") === 8 // "//server/" + * getRootLength("\\\\server") === 7 // "\\\\server" + * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" + * getRootLength("file:///path") === 8 // "file:///" + * getRootLength("file:///c:") === 10 // "file:///c:" + * getRootLength("file:///c:d") === 8 // "file:///" + * getRootLength("file:///c:/path") === 11 // "file:///c:/" + * getRootLength("file://server") === 13 // "file://server" + * getRootLength("file://server/path") === 14 // "file://server/" + * getRootLength("http://server") === 13 // "http://server" + * getRootLength("http://server/path") === 14 // "http://server/" + * ``` + * + * @internal + */ +export declare function getRootLength(path: string): number; +export declare function getPathComponents(path: string): string[]; +/** + * Determines whether a path has a trailing separator (`/` or `\\`). + */ +export declare function hasTrailingDirectorySeparator(path: string): boolean; +/** + * Removes a trailing directory separator from a path, if it does not already have one. + */ +export declare function removeTrailingDirectorySeparator(path: string): string; +/** + * Adds a trailing directory separator to a path, if it does not already have one. + */ +export declare function ensureTrailingDirectorySeparator(path: string): string; +/** + * Normalize path separators, converting `\\` into `/`. + */ +export declare function normalizeSlashes(path: string): string; +/** + * Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified. + */ +export declare function combinePaths(path: string, ...paths: (string | undefined)[]): string; +/** + * Returns the normalized absolute path, resolving `.` and `..` segments. + */ +export declare function getNormalizedAbsolutePath(path: string, currentDirectory: string | undefined): string; +/** + * Normalizes a path, resolving `.` and `..` segments and converting backslashes to forward slashes. + */ +export declare function normalizePath(path: string): string; +/** + * Determines whether a path is an absolute disk path (e.g. starts with `/`, or a DOS path + * like `c:`, `c:\\` or `c:/`). + */ +export declare function isRootedDiskPath(path: string): boolean; +/** + * Converts a file name to a normalized path. + * + * @param fileName The file name to convert + * @param basePath The base path to use for relative file names + * @param getCanonicalFileName A function to get the canonical file name (e.g., toLowerCase for case-insensitive systems) + * @returns The normalized path + */ +export declare function toPath(fileName: string, basePath: string | undefined, getCanonicalFileName: (path: string) => string): string; +/** + * Creates a getCanonicalFileName function based on case sensitivity. + */ +export declare function createGetCanonicalFileName(useCaseSensitiveFileNames: boolean): (fileName: string) => string; +/** + * Returns true if the path refers to a bundled library file. + */ +export declare function isBundled(path: string): boolean; +/** + * Returns true if the file name represents a dynamic/virtual file + * that doesn't exist on disk (e.g., untitled files with paths like "^/untitled/..."). + */ +export declare function isDynamicFileName(fileName: string): boolean; +/** + * Splits a Windows volume (e.g., "c:") from the rest of the path. + * Returns [volume, rest, ok] where ok is true if a volume was found. + */ +export declare function splitVolumePath(path: string): [volume: string, rest: string, ok: boolean]; +/** + * Converts a file name to a document URI. + * + * @example + * fileNameToDocumentURI("/path/to/file.ts") === "file:///path/to/file.ts" + * fileNameToDocumentURI("c:/path/to/file.ts") === "file:///c%3A/path/to/file.ts" + * fileNameToDocumentURI("^/untitled/ts-nul-authority/Untitled-1") === "untitled:Untitled-1" + * fileNameToDocumentURI("^/vscode-vfs/github/microsoft/typescript-go/file.ts") === "vscode-vfs://github/microsoft/typescript-go/file.ts" + */ +export declare function fileNameToDocumentURI(fileName: string): string; +/** + * Converts a document URI to a file name. + * + * @example + * documentURIToFileName("file:///path/to/file.ts") === "/path/to/file.ts" + * documentURIToFileName("file:///c%3A/path/to/file.ts") === "c:/path/to/file.ts" + * documentURIToFileName("untitled:Untitled-1") === "^/untitled/ts-nul-authority/Untitled-1" + * documentURIToFileName("vscode-vfs://github/microsoft/typescript-go/file.ts") === "^/vscode-vfs/github/microsoft/typescript-go/file.ts" + */ +export declare function documentURIToFileName(uri: string): string; +//# sourceMappingURL=path.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/path.d.ts.map b/node_modules/typescript/dist/api/path.d.ts.map new file mode 100644 index 0000000..8a074df --- /dev/null +++ b/node_modules/typescript/dist/api/path.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/api/path.ts"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGlD;AAgED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAExD;AAaD;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrE;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIrD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,MAAM,CAanF;AAqBD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CA4FpG;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQlD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAK7H;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,yBAAyB,EAAE,OAAO,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAE3G;AAYD;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,CAAC,CAKzF;AAkCD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA8C9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAuDzD"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/path.js b/node_modules/typescript/dist/api/path.js new file mode 100644 index 0000000..e290d8c --- /dev/null +++ b/node_modules/typescript/dist/api/path.js @@ -0,0 +1,508 @@ +const CharacterCodesSlash = "/".charCodeAt(0); +const CharacterCodesBackslash = "\\".charCodeAt(0); +const CharacterCodesColon = ":".charCodeAt(0); +const CharacterCodesPercent = "%".charCodeAt(0); +const CharacterCodes3 = "3".charCodeAt(0); +const CharacterCodesa = "a".charCodeAt(0); +const CharacterCodesz = "z".charCodeAt(0); +const CharacterCodesA = "A".charCodeAt(0); +const CharacterCodesZ = "Z".charCodeAt(0); +const CharacterCodesDot = ".".charCodeAt(0); +const directorySeparator = "/"; +const altDirectorySeparator = "\\"; +const urlSchemeSeparator = "://"; +const backslashRegExp = /\\/g; +// check path for these segments: '', '.'. '..' +const relativePathSegmentRegExp = /\/\/|(?:^|\/)\.\.?(?:$|\/)/; +/** + * Determines whether a charCode corresponds to `/` or `\\`. + */ +function isAnyDirectorySeparator(charCode) { + return charCode === CharacterCodesSlash || charCode === CharacterCodesBackslash; +} +function isVolumeCharacter(charCode) { + return (charCode >= CharacterCodesa && charCode <= CharacterCodesz) || + (charCode >= CharacterCodesA && charCode <= CharacterCodesZ); +} +function getFileUrlVolumeSeparatorEnd(url, start) { + const ch0 = url.charCodeAt(start); + if (ch0 === CharacterCodesColon) + return start + 1; + if (ch0 === CharacterCodesPercent && url.charCodeAt(start + 1) === CharacterCodes3) { + const ch2 = url.charCodeAt(start + 2); + if (ch2 === CharacterCodesa || ch2 === CharacterCodesA) + return start + 3; + } + return -1; +} +/** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * + * For example: + * ```ts + * getRootLength("a") === 0 // "" + * getRootLength("/") === 1 // "/" + * getRootLength("c:") === 2 // "c:" + * getRootLength("c:d") === 0 // "" + * getRootLength("c:/") === 3 // "c:/" + * getRootLength("c:\\") === 3 // "c:\\" + * getRootLength("//server") === 7 // "//server" + * getRootLength("//server/share") === 8 // "//server/" + * getRootLength("\\\\server") === 7 // "\\\\server" + * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" + * getRootLength("file:///path") === 8 // "file:///" + * getRootLength("file:///c:") === 10 // "file:///c:" + * getRootLength("file:///c:d") === 8 // "file:///" + * getRootLength("file:///c:/path") === 11 // "file:///c:/" + * getRootLength("file://server") === 13 // "file://server" + * getRootLength("file://server/path") === 14 // "file://server/" + * getRootLength("http://server") === 13 // "http://server" + * getRootLength("http://server/path") === 14 // "http://server/" + * ``` + * + * @internal + */ +export function getRootLength(path) { + const rootLength = getEncodedRootLength(path); + return rootLength < 0 ? ~rootLength : rootLength; +} +/** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * If the root is part of a URL, the twos-complement of the root length is returned. + */ +function getEncodedRootLength(path) { + if (!path) + return 0; + const ch0 = path.charCodeAt(0); + // POSIX or UNC + if (ch0 === CharacterCodesSlash || ch0 === CharacterCodesBackslash) { + if (path.charCodeAt(1) !== ch0) + return 1; // POSIX: "/" (or non-normalized "\") + const p1 = path.indexOf(ch0 === CharacterCodesSlash ? directorySeparator : altDirectorySeparator, 2); + if (p1 < 0) + return path.length; // UNC: "//server" or "\\server" + return p1 + 1; // UNC: "//server/" or "\\server\" + } + // DOS + if (isVolumeCharacter(ch0) && path.charCodeAt(1) === CharacterCodesColon) { + const ch2 = path.charCodeAt(2); + if (ch2 === CharacterCodesSlash || ch2 === CharacterCodesBackslash) + return 3; // DOS: "c:/" or "c:\" + if (path.length === 2) + return 2; // DOS: "c:" (but not "c:d") + } + // URL + const schemeEnd = path.indexOf(urlSchemeSeparator); + if (schemeEnd !== -1) { + const authorityStart = schemeEnd + urlSchemeSeparator.length; + const authorityEnd = path.indexOf(directorySeparator, authorityStart); + if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" + // For local "file" URLs, include the leading DOS volume (if present). + // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a + // special case interpreted as "the machine from which the URL is being interpreted". + const scheme = path.slice(0, schemeEnd); + const authority = path.slice(authorityStart, authorityEnd); + if (scheme === "file" && (authority === "" || authority === "localhost") && + isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { + const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); + if (volumeSeparatorEnd !== -1) { + if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodesSlash) { + // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" + return ~(volumeSeparatorEnd + 1); + } + if (volumeSeparatorEnd === path.length) { + // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" + // but not "file:///c:d" or "file:///c%3ad" + return ~volumeSeparatorEnd; + } + } + } + return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" + } + return ~path.length; // URL: "file://server", "http://server" + } + // relative + return 0; +} +export function getPathComponents(path) { + return pathComponents(path, getRootLength(path)); +} +function pathComponents(path, rootLength) { + const root = path.substring(0, rootLength); + const rest = path.substring(rootLength).split("/"); + if (rest.length && !lastOrUndefined(rest)) + rest.pop(); + return [root, ...rest]; +} +function lastOrUndefined(array) { + return array.length ? array[array.length - 1] : undefined; +} +/** + * Determines whether a path has a trailing separator (`/` or `\\`). + */ +export function hasTrailingDirectorySeparator(path) { + return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1)); +} +/** + * Removes a trailing directory separator from a path, if it does not already have one. + */ +export function removeTrailingDirectorySeparator(path) { + if (hasTrailingDirectorySeparator(path)) { + return path.substr(0, path.length - 1); + } + return path; +} +/** + * Adds a trailing directory separator to a path, if it does not already have one. + */ +export function ensureTrailingDirectorySeparator(path) { + if (!hasTrailingDirectorySeparator(path)) { + return path + directorySeparator; + } + return path; +} +/** + * Normalize path separators, converting `\\` into `/`. + */ +export function normalizeSlashes(path) { + return path.includes("\\") + ? path.replace(backslashRegExp, directorySeparator) + : path; +} +/** + * Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified. + */ +export function combinePaths(path, ...paths) { + if (path) + path = normalizeSlashes(path); + for (let relativePath of paths) { + if (!relativePath) + continue; + relativePath = normalizeSlashes(relativePath); + if (!path || getRootLength(relativePath) !== 0) { + path = relativePath; + } + else { + path = ensureTrailingDirectorySeparator(path) + relativePath; + } + } + return path; +} +function simpleNormalizePath(path) { + // Most paths don't require normalization + if (!relativePathSegmentRegExp.test(path)) { + return path; + } + // Some paths only require cleanup of `/./` or leading `./` + let simplified = path.replace(/\/\.\//g, "/"); + if (simplified.startsWith("./")) { + simplified = simplified.slice(2); + } + if (simplified !== path) { + path = simplified; + if (!relativePathSegmentRegExp.test(path)) { + return path; + } + } + return undefined; +} +/** + * Returns the normalized absolute path, resolving `.` and `..` segments. + */ +export function getNormalizedAbsolutePath(path, currentDirectory) { + let rootLength = getRootLength(path); + if (rootLength === 0 && currentDirectory) { + path = combinePaths(currentDirectory, path); + rootLength = getRootLength(path); + } + else { + // combinePaths normalizes slashes, so not necessary in the other branch + path = normalizeSlashes(path); + } + const simpleNormalized = simpleNormalizePath(path); + if (simpleNormalized !== undefined) { + return simpleNormalized.length > rootLength ? removeTrailingDirectorySeparator(simpleNormalized) : simpleNormalized; + } + const length = path.length; + const root = path.substring(0, rootLength); + // `normalized` is only initialized once `path` is determined to be non-normalized + let normalized; + let index = rootLength; + let segmentStart = index; + let normalizedUpTo = index; + let seenNonDotDotSegment = rootLength !== 0; + while (index < length) { + // At beginning of segment + segmentStart = index; + let ch = path.charCodeAt(index); + while (ch === CharacterCodesSlash && index + 1 < length) { + index++; + ch = path.charCodeAt(index); + } + if (index > segmentStart) { + // Seen superfluous separator + normalized ??= path.substring(0, segmentStart - 1); + segmentStart = index; + } + // Past any superfluous separators + let segmentEnd = path.indexOf(directorySeparator, index + 1); + if (segmentEnd === -1) { + segmentEnd = length; + } + const segmentLength = segmentEnd - segmentStart; + if (segmentLength === 1 && path.charCodeAt(index) === CharacterCodesDot) { + // "." segment (skip) + normalized ??= path.substring(0, normalizedUpTo); + } + else if (segmentLength === 2 && path.charCodeAt(index) === CharacterCodesDot && path.charCodeAt(index + 1) === CharacterCodesDot) { + // ".." segment + if (!seenNonDotDotSegment) { + if (normalized !== undefined) { + normalized += normalized.length === rootLength ? ".." : "/.."; + } + else { + normalizedUpTo = index + 2; + } + } + else if (normalized === undefined) { + if (normalizedUpTo - 2 >= 0) { + normalized = path.substring(0, Math.max(rootLength, path.lastIndexOf(directorySeparator, normalizedUpTo - 2))); + } + else { + normalized = path.substring(0, normalizedUpTo); + } + } + else { + const lastSlash = normalized.lastIndexOf(directorySeparator); + if (lastSlash !== -1) { + normalized = normalized.substring(0, Math.max(rootLength, lastSlash)); + } + else { + normalized = root; + } + if (normalized.length === rootLength) { + seenNonDotDotSegment = rootLength !== 0; + } + } + } + else if (normalized !== undefined) { + if (normalized.length !== rootLength) { + normalized += directorySeparator; + } + seenNonDotDotSegment = true; + normalized += path.substring(segmentStart, segmentEnd); + } + else { + seenNonDotDotSegment = true; + normalizedUpTo = segmentEnd; + } + index = segmentEnd + 1; + } + return normalized ?? (length > rootLength ? removeTrailingDirectorySeparator(path) : path); +} +/** + * Normalizes a path, resolving `.` and `..` segments and converting backslashes to forward slashes. + */ +export function normalizePath(path) { + path = normalizeSlashes(path); + let normalized = simpleNormalizePath(path); + if (normalized !== undefined) { + return normalized; + } + normalized = getNormalizedAbsolutePath(path, ""); + return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized; +} +/** + * Determines whether a path is an absolute disk path (e.g. starts with `/`, or a DOS path + * like `c:`, `c:\\` or `c:/`). + */ +export function isRootedDiskPath(path) { + return getEncodedRootLength(path) > 0; +} +/** + * Converts a file name to a normalized path. + * + * @param fileName The file name to convert + * @param basePath The base path to use for relative file names + * @param getCanonicalFileName A function to get the canonical file name (e.g., toLowerCase for case-insensitive systems) + * @returns The normalized path + */ +export function toPath(fileName, basePath, getCanonicalFileName) { + const nonCanonicalizedPath = isRootedDiskPath(fileName) + ? normalizePath(fileName) + : getNormalizedAbsolutePath(fileName, basePath); + return getCanonicalFileName(nonCanonicalizedPath); +} +/** + * Creates a getCanonicalFileName function based on case sensitivity. + */ +export function createGetCanonicalFileName(useCaseSensitiveFileNames) { + return useCaseSensitiveFileNames ? identity : toLowerCase; +} +function identity(x) { + return x; +} +function toLowerCase(s) { + return s.toLowerCase(); +} +const bundledScheme = "bundled:///"; +/** + * Returns true if the path refers to a bundled library file. + */ +export function isBundled(path) { + return path.startsWith(bundledScheme); +} +/** + * Returns true if the file name represents a dynamic/virtual file + * that doesn't exist on disk (e.g., untitled files with paths like "^/untitled/..."). + */ +export function isDynamicFileName(fileName) { + return fileName.startsWith("^/"); +} +/** + * Splits a Windows volume (e.g., "c:") from the rest of the path. + * Returns [volume, rest, ok] where ok is true if a volume was found. + */ +export function splitVolumePath(path) { + if (path.length >= 2 && isVolumeCharacter(path.charCodeAt(0)) && path.charCodeAt(1) === CharacterCodesColon) { + return [path.substring(0, 2).toLowerCase(), path.substring(2), true]; + } + return ["", path, false]; +} +// Characters that need extra escaping in URI path segments +// https://github.com/microsoft/vscode-uri/blob/edfdccd976efaf4bb8fdeca87e97c47257721729/src/uri.ts#L455 +const extraEscapeChars = { + ":": "%3A", + "/": "%2F", + "?": "%3F", + "#": "%23", + "[": "%5B", + "]": "%5D", + "@": "%40", + "!": "%21", + "$": "%24", + "&": "%26", + "'": "%27", + "(": "%28", + ")": "%29", + "*": "%2A", + "+": "%2B", + ",": "%2C", + ";": "%3B", + "=": "%3D", + " ": "%20", +}; +function extraEscape(s) { + let result = s; + for (const [char, escape] of Object.entries(extraEscapeChars)) { + result = result.replaceAll(char, escape); + } + return result; +} +/** + * Converts a file name to a document URI. + * + * @example + * fileNameToDocumentURI("/path/to/file.ts") === "file:///path/to/file.ts" + * fileNameToDocumentURI("c:/path/to/file.ts") === "file:///c%3A/path/to/file.ts" + * fileNameToDocumentURI("^/untitled/ts-nul-authority/Untitled-1") === "untitled:Untitled-1" + * fileNameToDocumentURI("^/vscode-vfs/github/microsoft/typescript-go/file.ts") === "vscode-vfs://github/microsoft/typescript-go/file.ts" + */ +export function fileNameToDocumentURI(fileName) { + // Bundled files are returned as-is + if (isBundled(fileName)) { + return fileName; + } + // Dynamic/virtual files (untitled, vscode-vfs, etc.) need special handling + if (isDynamicFileName(fileName)) { + // Format: ^/scheme/authority/path + const withoutPrefix = fileName.substring(2); // Remove "^/" + const firstSlash = withoutPrefix.indexOf("/"); + if (firstSlash === -1) { + throw new Error("invalid file name: " + fileName); + } + const scheme = withoutPrefix.substring(0, firstSlash); + const rest = withoutPrefix.substring(firstSlash + 1); + const secondSlash = rest.indexOf("/"); + if (secondSlash === -1) { + throw new Error("invalid file name: " + fileName); + } + const authority = rest.substring(0, secondSlash); + const path = rest.substring(secondSlash + 1); + // ts-nul-authority is a placeholder for URIs without an authority + if (authority === "ts-nul-authority") { + return scheme + ":" + path; + } + return scheme + "://" + authority + "/" + path; + } + // Regular file path - convert to file:// URI + let [volume, rest] = splitVolumePath(fileName); + if (volume !== "") { + volume = "/" + extraEscape(volume); + } + // Remove leading // for UNC paths (already handled by file://) + if (rest.startsWith("//")) { + rest = rest.substring(2); + } + const parts = rest.split("/"); + const encodedParts = parts.map(part => extraEscape(encodeURIComponent(part))); + return "file://" + volume + encodedParts.join("/"); +} +/** + * Converts a document URI to a file name. + * + * @example + * documentURIToFileName("file:///path/to/file.ts") === "/path/to/file.ts" + * documentURIToFileName("file:///c%3A/path/to/file.ts") === "c:/path/to/file.ts" + * documentURIToFileName("untitled:Untitled-1") === "^/untitled/ts-nul-authority/Untitled-1" + * documentURIToFileName("vscode-vfs://github/microsoft/typescript-go/file.ts") === "^/vscode-vfs/github/microsoft/typescript-go/file.ts" + */ +export function documentURIToFileName(uri) { + // Bundled files are returned as-is + if (isBundled(uri)) { + return uri; + } + // Handle file:// URIs + if (uri.startsWith("file://")) { + let parsed; + try { + parsed = new URL(uri); + } + catch { + throw new Error("invalid file URI: " + uri); + } + // UNC path: file://server/share/... + if (parsed.host !== "") { + return "//" + parsed.host + parsed.pathname; + } + // Local file - fix Windows path by removing leading slash before volume + const path = decodeURIComponent(parsed.pathname); + if (path.length >= 3 && path.charCodeAt(0) === CharacterCodesSlash) { + const [volume, rest, ok] = splitVolumePath(path.substring(1)); + if (ok) { + return volume + rest; + } + } + return path; + } + // Leave all other URIs escaped so we can round-trip them. + // Convert to dynamic file name format: ^/scheme/authority/path + const colonIndex = uri.indexOf(":"); + if (colonIndex === -1) { + throw new Error("invalid URI: " + uri); + } + const scheme = uri.substring(0, colonIndex); + let path = uri.substring(colonIndex + 1); + let authority = "ts-nul-authority"; + if (path.startsWith("//")) { + const rest = path.substring(2); + const slashIndex = rest.indexOf("/"); + if (slashIndex === -1) { + throw new Error("invalid URI: " + uri); + } + authority = rest.substring(0, slashIndex); + path = rest.substring(slashIndex + 1); + } + return "^/" + scheme + "/" + authority + "/" + path; +} +//# sourceMappingURL=path.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/path.js.map b/node_modules/typescript/dist/api/path.js.map new file mode 100644 index 0000000..13b3e83 --- /dev/null +++ b/node_modules/typescript/dist/api/path.js.map @@ -0,0 +1 @@ +{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/api/path.ts"],"names":[],"mappings":"AAAA,MAAM,mBAAmB,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC9C,MAAM,uBAAuB,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AACnD,MAAM,mBAAmB,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC9C,MAAM,qBAAqB,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAChD,MAAM,eAAe,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC1C,MAAM,eAAe,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC1C,MAAM,eAAe,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC1C,MAAM,eAAe,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC1C,MAAM,eAAe,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC1C,MAAM,iBAAiB,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC5C,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAC/B,MAAM,qBAAqB,GAAG,IAAI,CAAC;AACnC,MAAM,kBAAkB,GAAG,KAAK,CAAC;AACjC,MAAM,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,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACrC,IAAI,UAAU,KAAK,CAAC,CAAC,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC,CAAC;QAC3C,CAAC;QACD,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;QAC1C,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,IAAI,GAAG,MAAM,GAAG,GAAG,GAAG,SAAS,GAAG,GAAG,GAAG,IAAI,CAAC;AACxD,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/proto.d.ts b/node_modules/typescript/dist/api/proto.d.ts new file mode 100644 index 0000000..4799f1e --- /dev/null +++ b/node_modules/typescript/dist/api/proto.d.ts @@ -0,0 +1,239 @@ +import type { CompletionItemKind } from "#enums/completionItemKind"; +import type { ModuleKind } from "#enums/moduleKind"; +import type { __String, Path } from "../ast/index.ts"; +import type { CompilerOptions } from "./compilerOptions.ts"; +export type { CompilerOptions } from "./compilerOptions.ts"; +/** + * A document identifier that can be either a file name (path string) or a document URI object. + * + * @example + * // Using a file name + * project.program.getSourceFile("/path/to/file.ts"); + * + * // Using a URI + * project.program.getSourceFile({ uri: "file:///path/to/file.ts" }); + */ +export type DocumentIdentifier = string | { + uri: string; +}; +/** + * A position within a document, combining a document identifier with an offset. + */ +export interface DocumentPosition { + /** The document containing the position */ + document: DocumentIdentifier; + /** The character offset within the document */ + position: number; +} +/** + * Resolves a DocumentIdentifier to a file name. + * If the identifier contains a URI, it is converted to a file name. + */ +export declare function resolveFileName(identifier: DocumentIdentifier): string; +/** + * Resolves a DocumentIdentifier to a document URI. + * If the identifier contains a file name, it is converted to a URI. + */ +export declare function resolveDocumentURI(identifier: DocumentIdentifier): string; +/** + * Response from the initialize method. + */ +export interface InitializeResponse { + /** Whether the host file system is case-sensitive */ + useCaseSensitiveFileNames: boolean; + /** The server's current working directory */ + currentDirectory: string; +} +export interface ConfigResponse { + options: Record; + fileNames: string[]; +} +export interface LSPUpdateSnapshotParams { + /** + * @deprecated Use {@link openProjects} instead. + * Path to a tsconfig.json file to open in the new snapshot. + */ + openProject?: string; + /** + * tsconfig.json files to open/load in the new snapshot. Opens are ref-counted + * and persist across snapshots until closed via {@link closeProjects}. + */ + openProjects?: DocumentIdentifier[]; + /** + * tsconfig.json files to release in the new snapshot. A project is only unloaded + * once every API client that opened it closes it. + */ + closeProjects?: DocumentIdentifier[]; + /** + * Files to keep open for the API client, mirroring LSP's `textDocument/didOpen`. + * For each file, ancestor directories are searched for a tsconfig that contains it; + * if one is found, that configured project is loaded and becomes the file's default + * project. Otherwise the file is loaded into the inferred project (e.g. a d.ts in + * node_modules that is not part of any project's import graph). Opens persist across + * subsequent snapshots until the file is closed via {@link closeFiles}. + * After calling updateSnapshot with openFiles, getDefaultProjectForFile returns the + * resolved configured or inferred project. + */ + openFiles?: DocumentIdentifier[]; + /** + * Files to release in the new snapshot. A file is only fully closed once every + * API client that opened it closes it. + */ + closeFiles?: DocumentIdentifier[]; +} +export interface FileChangeSummary { + changed?: DocumentIdentifier[]; + created?: DocumentIdentifier[]; + deleted?: DocumentIdentifier[]; +} +export type FileChanges = FileChangeSummary | { + invalidateAll: true; +}; +/** + * Parameters for updateSnapshot. + */ +export interface UpdateSnapshotParams extends LSPUpdateSnapshotParams { + fileChanges?: FileChanges; +} +/** + * Builds the wire request for updateSnapshot, applying the deprecated `openProject` + * compatibility shim: a single `openProject` is folded into `openProjects` and is + * never sent on the wire. + */ +export declare function toUpdateSnapshotRequest(params?: UpdateSnapshotParams): UpdateSnapshotParams; +/** + * Changes to source files within a single project. + */ +export interface ProjectFileChanges { + /** Source file paths whose content changed */ + changedFiles?: string[]; + /** Source file paths removed from the project's program */ + deletedFiles?: string[]; +} +/** + * Changes between two consecutive snapshots, reported per-project. + */ +export interface SnapshotChanges { + /** Project handles mapped to their file changes. Projects not listed are unchanged. */ + changedProjects?: Record; + /** Project handles that were removed from the snapshot */ + removedProjects?: string[]; +} +/** + * Response from updateSnapshot. + */ +export interface UpdateSnapshotResponse { + /** Handle for the newly created snapshot */ + snapshot: number; + /** List of projects in the snapshot */ + projects: ProjectResponse[]; + /** Changes from the previous snapshot (absent for the first snapshot) */ + changes?: SnapshotChanges; +} +export interface ProjectResponse { + id: Path; + configFileName: string; + compilerOptions: CompilerOptions; + rootFiles: string[]; +} +export interface SourceFileResponse { + /** Base64-encoded binary AST data */ + data: string; +} +export interface SourceFileMetadata { + isDefaultLibrary: boolean; + isFromExternalLibrary: boolean; + packageJsonType: string; + packageJsonDirectory: string; + impliedNodeFormat: ModuleKind; +} +export interface SymbolResponse { + id: number; + /** + * The project the symbol was first observed in. Used as the default project for + * follow-up lookups that need a project context (e.g. members/exports), since symbols + * are shared snapshot-wide and such lookups can vary by project. + */ + project: Path; + name: __String; + flags: number; + checkFlags: number; + declarations?: string[]; + valueDeclaration?: string; + parent?: number; + exportSymbol?: number; +} +export interface TypeResponse { + id: number; + flags: number; + objectFlags?: number; + /** Literal value. BigInt literals are encoded as a decimal string (e.g. "-123") since JSON cannot represent bigint. Absent values are serialized as null. */ + value?: string | number | boolean | null; + freshType?: number; + regularType?: number; + target?: number; + typeParameters?: number[]; + outerTypeParameters?: number[]; + localTypeParameters?: number[]; + elementFlags?: number[]; + fixedLength?: number; + readonly?: boolean; + objectType?: number; + indexType?: number; + checkType?: number; + extendsType?: number; + baseType?: number; + substConstraint?: number; + texts?: string[]; + intrinsicName?: string; + isThisType?: boolean; + aliasTypeArguments?: number[]; + aliasSymbol?: number; + symbol?: number; +} +export interface SignatureResponse { + id: number; + flags: number; + declaration?: string; + typeParameters?: number[]; + parameters?: number[]; + thisParameter?: number; + target?: number; +} +export interface TypePredicateResponse { + kind: number; + parameterIndex: number; + parameterName?: string; + type?: TypeResponse; +} +export interface IndexInfoResponse { + keyType: TypeResponse; + valueType: TypeResponse; + isReadonly?: boolean; + declaration?: string; +} +export interface ProfileParams { + dir: string; +} +export interface ProfileResult { + file: string; +} +export interface CompletionEntryLabelDetailsResponse { + detail?: string; + description?: string; +} +export interface CompletionEntryResponse { + name: string; + kind?: CompletionItemKind; + sortText?: string; + insertText?: string; + filterText?: string; + detail?: string; + labelDetails?: CompletionEntryLabelDetailsResponse; + symbol?: SymbolResponse; +} +export interface CompletionInfoResponse { + isIncomplete: boolean; + entries: CompletionEntryResponse[]; +} +//# sourceMappingURL=proto.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/proto.d.ts.map b/node_modules/typescript/dist/api/proto.d.ts.map new file mode 100644 index 0000000..35ac635 --- /dev/null +++ b/node_modules/typescript/dist/api/proto.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"proto.d.ts","sourceRoot":"","sources":["../../src/api/proto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EACR,QAAQ,EACR,IAAI,EACP,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAM5D,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;;;;GASG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;CAAE,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,2CAA2C;IAC3C,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,kBAAkB,GAAG,MAAM,CAKtE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,kBAAkB,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AAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAC9B,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,EAAE,YAAY,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC1B,GAAG,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mCAAmC;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,uBAAuB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,mCAAmC,CAAC;IACnD,MAAM,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,MAAM,WAAW,sBAAsB;IACnC,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,uBAAuB,EAAE,CAAC;CACtC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/proto.js b/node_modules/typescript/dist/api/proto.js new file mode 100644 index 0000000..69808e0 --- /dev/null +++ b/node_modules/typescript/dist/api/proto.js @@ -0,0 +1,37 @@ +import { documentURIToFileName, fileNameToDocumentURI, } from "./path.js"; +/** + * Resolves a DocumentIdentifier to a file name. + * If the identifier contains a URI, it is converted to a file name. + */ +export function resolveFileName(identifier) { + if (typeof identifier === "string") { + return identifier; + } + return documentURIToFileName(identifier.uri); +} +/** + * Resolves a DocumentIdentifier to a document URI. + * If the identifier contains a file name, it is converted to a URI. + */ +export function resolveDocumentURI(identifier) { + if (typeof identifier === "string") { + return fileNameToDocumentURI(identifier); + } + return identifier.uri; +} +/** + * Builds the wire request for updateSnapshot, applying the deprecated `openProject` + * compatibility shim: a single `openProject` is folded into `openProjects` and is + * never sent on the wire. + */ +export function toUpdateSnapshotRequest(params) { + const { openProject, openProjects, ...rest } = params ?? {}; + const mergedOpenProjects = openProject !== undefined + ? [resolveFileName(openProject), ...(openProjects ?? [])] + : openProjects; + return { + ...rest, + ...(mergedOpenProjects !== undefined ? { openProjects: mergedOpenProjects } : {}), + }; +} +//# sourceMappingURL=proto.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/proto.js.map b/node_modules/typescript/dist/api/proto.js.map new file mode 100644 index 0000000..1311f1c --- /dev/null +++ b/node_modules/typescript/dist/api/proto.js.map @@ -0,0 +1 @@ +{"version":3,"file":"proto.js","sourceRoot":"","sources":["../../src/api/proto.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,qBAAqB,EACrB,qBAAqB,GACxB,MAAM,WAAW,CAAC;AA0BnB;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,UAA8B;IAC1D,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACjC,OAAO,UAAU,CAAC;IACtB,CAAC;IACD,OAAO,qBAAqB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AACjD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAA8B;IAC7D,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACjC,OAAO,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,UAAU,CAAC,GAAG,CAAC;AAC1B,CAAC;AAkED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,MAA6B;IACjE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;IAC5D,MAAM,kBAAkB,GAAG,WAAW,KAAK,SAAS;QAChD,CAAC,CAAC,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC;QACzD,CAAC,CAAC,YAAY,CAAC;IACnB,OAAO;QACH,GAAG,IAAI;QACP,GAAG,CAAC,kBAAkB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACpF,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sourceFileCache.d.ts b/node_modules/typescript/dist/api/sourceFileCache.d.ts new file mode 100644 index 0000000..3113bcb --- /dev/null +++ b/node_modules/typescript/dist/api/sourceFileCache.d.ts @@ -0,0 +1,79 @@ +import type { Path, SourceFile } from "../ast/index.ts"; +import type { SnapshotChanges } from "./proto.ts"; +/** + * A cached source file entry, identified by content hash. + */ +export interface CachedSourceFile { + /** The cached source file object */ + file: SourceFile; + /** The content hash from the server */ + contentHash: string; + /** The parse options key that was used to create this file */ + parseOptionsKey: string; + /** Set of (snapshot, project) ref keys that reference this entry */ + refs: Set; +} +/** + * Client-side cache for source files keyed by (path, parseOptionsKey, contentHash). + * + * Supports multiple versions of the same file at the same path (e.g., from + * different snapshots with different file contents). Each version is identified + * by its content hash and parse options key. + * + * Entries are ref-counted by (snapshot, project) pairs. When a snapshot is + * disposed, all refs for that snapshot across all projects are released, + * and entries with no remaining references are evicted. + * + * When a new snapshot is created, unchanged cache entries from the previous + * snapshot are retained per-project. Only files within changed or removed + * projects are invalidated. + */ +export declare class SourceFileCache { + /** Map from path to all cached versions of that file */ + private cache; + /** Map from snapshotId to (projectId → Set of paths fetched through that project) */ + private snapshotProjectPaths; + /** + * Get a cached source file already retained for the given (snapshot, project) pair. + * This does not require a content hash or parse options key — it returns the entry + * if one exists with a matching ref. Used to skip the server request entirely when + * retainForSnapshot has already carried over the ref. + * + * A given (snapshot, project) pair always parses a file the same way, so there is + * at most one matching entry per ref. + */ + getRetained(path: Path, snapshotId: number, projectId: string): SourceFile | undefined; + /** + * Store a source file in the cache and retain it for the given (snapshot, project) pair. + * Returns the cached file — which may be an existing entry if the hash matches. + */ + set(path: Path, file: SourceFile, parseOptionsKey: string, contentHash: string, snapshotId: number, projectId: string): SourceFile; + /** + * Retain cache entries from a previous snapshot for a new snapshot. + * For each project in the previous snapshot: + * - Removed projects: skip (don't retain any refs). + * - Changed projects: retain refs for files not listed in changedFiles/deletedFiles. + * - Unchanged projects: retain all refs. + */ + retainForSnapshot(newSnapshotId: number, previousSnapshotId: number, changes: SnapshotChanges | undefined): void; + /** + * Release all entries retained by the given snapshot across all projects. + * Only visits paths that the snapshot actually referenced. + * Entries with no remaining refs are evicted. + */ + releaseSnapshot(snapshotId: number): void; + private trackPath; + /** + * Clear all entries from the cache. + */ + clear(): void; + /** + * Get the number of unique paths in the cache. + */ + get size(): number; + /** + * Check if a path is in the cache. + */ + has(path: Path): boolean; +} +//# sourceMappingURL=sourceFileCache.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sourceFileCache.d.ts.map b/node_modules/typescript/dist/api/sourceFileCache.d.ts.map new file mode 100644 index 0000000..15f8f9e --- /dev/null +++ b/node_modules/typescript/dist/api/sourceFileCache.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sourceFileCache.d.ts","sourceRoot":"","sources":["../../src/api/sourceFileCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,IAAI,EACJ,UAAU,EACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AASlD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,oCAAoC;IACpC,IAAI,EAAE,UAAU,CAAC;IACjB,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,eAAe,EAAE,MAAM,CAAC;IACxB,oEAAoE;IACpE,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,eAAe;IACxB,wDAAwD;IACxD,OAAO,CAAC,KAAK,CAA4C;IACzD,qFAAqF;IACrF,OAAO,CAAC,oBAAoB,CAAkD;IAE9E;;;;;;;;OAQG;IACH,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAQtF;;;OAGG;IACH,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU;IAmBlI;;;;;;OAMG;IACH,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,SAAS,GAAG,IAAI;IAmChH;;;;OAIG;IACH,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAsBzC,OAAO,CAAC,SAAS;IAcjB;;OAEG;IACH,KAAK,IAAI,IAAI;IAKb;;OAEG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;CAG3B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sourceFileCache.js b/node_modules/typescript/dist/api/sourceFileCache.js new file mode 100644 index 0000000..fe44aef --- /dev/null +++ b/node_modules/typescript/dist/api/sourceFileCache.js @@ -0,0 +1,169 @@ +/** + * Builds a composite ref key from a snapshot ID and project ID. + */ +function refKey(snapshotId, projectId) { + return `${snapshotId}:${projectId}`; +} +/** + * Client-side cache for source files keyed by (path, parseOptionsKey, contentHash). + * + * Supports multiple versions of the same file at the same path (e.g., from + * different snapshots with different file contents). Each version is identified + * by its content hash and parse options key. + * + * Entries are ref-counted by (snapshot, project) pairs. When a snapshot is + * disposed, all refs for that snapshot across all projects are released, + * and entries with no remaining references are evicted. + * + * When a new snapshot is created, unchanged cache entries from the previous + * snapshot are retained per-project. Only files within changed or removed + * projects are invalidated. + */ +export class SourceFileCache { + /** Map from path to all cached versions of that file */ + cache = new Map(); + /** Map from snapshotId to (projectId → Set of paths fetched through that project) */ + snapshotProjectPaths = new Map(); + /** + * Get a cached source file already retained for the given (snapshot, project) pair. + * This does not require a content hash or parse options key — it returns the entry + * if one exists with a matching ref. Used to skip the server request entirely when + * retainForSnapshot has already carried over the ref. + * + * A given (snapshot, project) pair always parses a file the same way, so there is + * at most one matching entry per ref. + */ + getRetained(path, snapshotId, projectId) { + const entries = this.cache.get(path); + if (!entries) + return undefined; + const key = refKey(snapshotId, projectId); + const entry = entries.find(e => e.refs.has(key)); + return entry?.file; + } + /** + * Store a source file in the cache and retain it for the given (snapshot, project) pair. + * Returns the cached file — which may be an existing entry if the hash matches. + */ + set(path, file, parseOptionsKey, contentHash, snapshotId, projectId) { + let entries = this.cache.get(path); + if (!entries) { + entries = []; + this.cache.set(path, entries); + } + const ref = refKey(snapshotId, projectId); + // Check if we already have this exact version + const existing = entries.find(e => e.parseOptionsKey === parseOptionsKey && e.contentHash === contentHash); + if (existing) { + existing.refs.add(ref); + this.trackPath(snapshotId, projectId, path); + return existing.file; + } + entries.push({ file, contentHash, parseOptionsKey, refs: new Set([ref]) }); + this.trackPath(snapshotId, projectId, path); + return file; + } + /** + * Retain cache entries from a previous snapshot for a new snapshot. + * For each project in the previous snapshot: + * - Removed projects: skip (don't retain any refs). + * - Changed projects: retain refs for files not listed in changedFiles/deletedFiles. + * - Unchanged projects: retain all refs. + */ + retainForSnapshot(newSnapshotId, previousSnapshotId, changes) { + const prevProjectMap = this.snapshotProjectPaths.get(previousSnapshotId); + if (!prevProjectMap) + return; + const removedProjects = new Set(changes?.removedProjects ?? []); + const changedProjects = changes?.changedProjects ?? {}; + for (const [projectId, paths] of prevProjectMap) { + if (removedProjects.has(projectId)) + continue; + const projectChanges = changedProjects[projectId]; + let invalidPaths; + if (projectChanges) { + invalidPaths = new Set(); + for (const p of projectChanges.changedFiles ?? []) + invalidPaths.add(p); + for (const p of projectChanges.deletedFiles ?? []) + invalidPaths.add(p); + } + const prevRef = refKey(previousSnapshotId, projectId); + const newRef = refKey(newSnapshotId, projectId); + for (const path of paths) { + if (invalidPaths?.has(path)) + continue; + const entries = this.cache.get(path); + if (!entries) + continue; + for (const entry of entries) { + if (entry.refs.has(prevRef)) { + entry.refs.add(newRef); + this.trackPath(newSnapshotId, projectId, path); + } + } + } + } + } + /** + * Release all entries retained by the given snapshot across all projects. + * Only visits paths that the snapshot actually referenced. + * Entries with no remaining refs are evicted. + */ + releaseSnapshot(snapshotId) { + const projectMap = this.snapshotProjectPaths.get(snapshotId); + if (!projectMap) + return; + for (const [projectId, paths] of projectMap) { + const key = refKey(snapshotId, projectId); + for (const path of paths) { + const entries = this.cache.get(path); + if (!entries) + continue; + for (let i = entries.length - 1; i >= 0; i--) { + entries[i].refs.delete(key); + if (entries[i].refs.size === 0) { + entries.splice(i, 1); + } + } + if (entries.length === 0) { + this.cache.delete(path); + } + } + } + this.snapshotProjectPaths.delete(snapshotId); + } + trackPath(snapshotId, projectId, path) { + let projectMap = this.snapshotProjectPaths.get(snapshotId); + if (!projectMap) { + projectMap = new Map(); + this.snapshotProjectPaths.set(snapshotId, projectMap); + } + let paths = projectMap.get(projectId); + if (!paths) { + paths = new Set(); + projectMap.set(projectId, paths); + } + paths.add(path); + } + /** + * Clear all entries from the cache. + */ + clear() { + this.cache.clear(); + this.snapshotProjectPaths.clear(); + } + /** + * Get the number of unique paths in the cache. + */ + get size() { + return this.cache.size; + } + /** + * Check if a path is in the cache. + */ + has(path) { + return this.cache.has(path); + } +} +//# sourceMappingURL=sourceFileCache.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sourceFileCache.js.map b/node_modules/typescript/dist/api/sourceFileCache.js.map new file mode 100644 index 0000000..3f858e3 --- /dev/null +++ b/node_modules/typescript/dist/api/sourceFileCache.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sourceFileCache.js","sourceRoot":"","sources":["../../src/api/sourceFileCache.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,SAAS,MAAM,CAAC,UAAkB,EAAE,SAAiB;IACjD,OAAO,GAAG,UAAU,IAAI,SAAS,EAAE,CAAC;AACxC,CAAC;AAgBD;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,eAAe;IACxB,wDAAwD;IAChD,KAAK,GAAkC,IAAI,GAAG,EAAE,CAAC;IACzD,qFAAqF;IAC7E,oBAAoB,GAAwC,IAAI,GAAG,EAAE,CAAC;IAE9E;;;;;;;;OAQG;IACH,WAAW,CAAC,IAAU,EAAE,UAAkB,EAAE,SAAiB;QACzD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,OAAO;YAAE,OAAO,SAAS,CAAC;QAC/B,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QAC1C,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,OAAO,KAAK,EAAE,IAAI,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,IAAU,EAAE,IAAgB,EAAE,eAAuB,EAAE,WAAmB,EAAE,UAAkB,EAAE,SAAiB;QACjH,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,OAAO,EAAE,CAAC;YACX,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,KAAK,CAAC,GAAG,CA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SAAS,CAAC,CAAC;QACtC,IAAI,CAAC,KAAK,EAAE,CAAC;YACT,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;YAClB,UAAU,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACrC,CAAC;QACD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,KAAK;QACD,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACnB,IAAI,CAAC,oBAAoB,CAAC,KAAK,EAAE,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,IAAU;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/api.d.ts b/node_modules/typescript/dist/api/sync/api.d.ts new file mode 100644 index 0000000..1295076 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/api.d.ts @@ -0,0 +1,529 @@ +/// +import { CompletionItemKind } from "#enums/completionItemKind"; +import { DiagnosticCategory } from "#enums/diagnosticCategory"; +import { ElementFlags } from "#enums/elementFlags"; +import { ModuleKind } from "#enums/moduleKind"; +import { NodeBuilderFlags } from "#enums/nodeBuilderFlags"; +import { ObjectFlags } from "#enums/objectFlags"; +import { SignatureFlags } from "#enums/signatureFlags"; +import { SignatureKind } from "#enums/signatureKind"; +import { SymbolFlags } from "#enums/symbolFlags"; +import { TypeFlags } from "#enums/typeFlags"; +import { TypePredicateKind } from "#enums/typePredicateKind"; +import { type __String, type Expression, type Identifier, ModifierFlags, type Node, type Path, type SourceFile, type SyntaxKind, type TypeNode } from "../../ast/index.ts"; +import type { APIOptions, LSPConnectionOptions } from "../options.ts"; +import type { CompilerOptions, ConfigResponse, DocumentIdentifier, DocumentPosition, LSPUpdateSnapshotParams, ProjectResponse, SignatureResponse, SourceFileMetadata, SymbolResponse, TypeResponse, UpdateSnapshotParams, UpdateSnapshotResponse } from "../proto.ts"; +import { SourceFileCache } from "../sourceFileCache.ts"; +import type { RequestTiming, TimingAccumulators, TimingInfo } from "../timing.ts"; +import { Client, type ClientSocketOptions, type ClientSpawnOptions } from "./client.ts"; +import type { AssertsIdentifierTypePredicate, AssertsThisTypePredicate, BigIntLiteralType, BooleanLiteralType, CompletionEntry, CompletionInfo, CompletionOptions, ConditionalType, Diagnostic, FreshableType, IdentifierTypePredicate, IndexedAccessType, IndexInfo, IndexType, InterfaceType, IntersectionType, IntrinsicType, JSDocTagInfo, LiteralType, NumberLiteralType, ObjectType, StringLiteralType, StringMappingType, SubstitutionType, TemplateLiteralType, ThisTypePredicate, TupleType, Type, TypeParameter, TypePredicate, TypePredicateBase, TypeReference, UnionOrIntersectionType, UnionType } from "./types.ts"; +export { documentURIToFileName, fileNameToDocumentURI } from "../path.ts"; +export { CompletionItemKind, DiagnosticCategory, ElementFlags, ModifierFlags, ModuleKind, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypePredicateKind }; +export type { APIOptions, AssertsIdentifierTypePredicate, AssertsThisTypePredicate, BigIntLiteralType, BooleanLiteralType, ClientSocketOptions, ClientSpawnOptions, CompilerOptions, CompletionEntry, CompletionInfo, CompletionOptions, ConditionalType, Diagnostic, DocumentIdentifier, DocumentPosition, FreshableType, IdentifierTypePredicate, IndexedAccessType, IndexInfo, IndexType, InterfaceType, IntersectionType, IntrinsicType, JSDocTagInfo, LiteralType, LSPConnectionOptions, NumberLiteralType, ObjectType, RequestTiming, SourceFileMetadata, StringLiteralType, StringMappingType, SubstitutionType, TemplateLiteralType, ThisTypePredicate, TimingAccumulators, TimingInfo, TupleType, Type, TypeParameter, TypePredicate, TypePredicateBase, TypeReference, UnionOrIntersectionType, UnionType }; +export declare class API { + private client; + private sourceFileCache; + private toPath; + private initialized; + private activeSnapshots; + private latestSnapshot; + readonly internal: InternalAPI; + constructor(options?: APIOptions | LSPConnectionOptions); + /** + * Create an API instance from an existing LSP connection's API session. + * Use this when connecting to an API pipe provided by an LSP server via custom/initializeAPISession. + */ + static fromLSPConnection(options: LSPConnectionOptions): API; + private ensureInitialized; + parseConfigFile(file: DocumentIdentifier): ConfigResponse; + updateSnapshot(params?: FromLSP extends true ? LSPUpdateSnapshotParams : UpdateSnapshotParams): Snapshot; + close(): void; + clearSourceFileCache(): void; + /** + * Returns a snapshot of collected timing information for requests made + * through this API instance: client-measured round-trip latency and bytes + * transferred, folded together with the server's own per-request processing + * time and an estimated transport overhead (round-trip minus server time). + * + * Fetching the snapshot issues a lightweight request to the server to + * retrieve its timing collection. Collection must be enabled via the + * `collectTiming` option; when it is not, the returned snapshot has + * `enabled: false` and zeroed totals. + */ + getTimingInfo(): TimingInfo; + /** Clears all accumulated timing totals and recent-request history, on both the client and the server. */ + resetTimingInfo(): void; +} +export declare class InternalAPI { + private client; + private ensureInitialized; + /** @internal */ + constructor(client: Client, ensureInitialized: () => void); + startCPUProfile(dir: string): void; + stopCPUProfile(): string; + saveHeapProfile(dir: string): string; +} +export declare class Snapshot { + readonly id: number; + private projectMap; + private toPath; + private client; + private disposed; + private onDispose; + private snapshotRegistry; + constructor(data: UpdateSnapshotResponse, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path, onDispose: () => void); + getProjects(): readonly Project[]; + getProject(configFileName: string): Project | undefined; + getDefaultProjectForFile(file: DocumentIdentifier): Project | undefined; + [globalThis.Symbol.dispose](): void; + dispose(): void; + isDisposed(): boolean; + private ensureNotDisposed; +} +declare class SnapshotObjectRegistry { + private readonly symbols; + private readonly client; + private readonly snapshotId; + private readonly resolveProject; + constructor(client: Client, snapshotId: number, resolveProject: (projectId: Path) => Project | undefined); + /** Resolve a project id (a config file path) to its Project within this snapshot. */ + getProject(projectId: Path): Project | undefined; + getOrCreateSymbol(data: SymbolResponse): Symbol; + getSymbol(id: number): Symbol | undefined; + clear(): void; + fetchSymbol(source: Symbol | Signature | Type, method: string, handle: number | undefined, projectId?: Path): Symbol; + fetchSymbols(source: Symbol | Signature | Type, method: string, handles?: readonly number[], projectId?: Path): readonly Symbol[]; +} +declare class ProjectObjectRegistry { + private client; + private snapshotId; + private project; + private snapshotRegistry; + private types; + private signatures; + constructor(client: Client, snapshotId: number, project: Project, snapshotRegistry: SnapshotObjectRegistry); + getOrCreateSymbol(data: SymbolResponse): Symbol; + getSymbol(id: number): Symbol | undefined; + getOrCreateType(data: TypeResponse): TypeObject; + getType(id: number): TypeObject | undefined; + getOrCreateSignature(data: SignatureResponse): Signature; + getSignature(id: number): Signature | undefined; + clear(): void; + fetchType(source: Symbol | Signature | Type, method: string, handle: number | false | undefined): T; + fetchSymbol(source: Symbol | Signature | Type, method: string, handle: number | undefined): Symbol; + fetchSignature(source: Symbol | Signature | Type, method: string, handle: number | undefined): Signature; + fetchTypes(source: Symbol | Signature | Type, method: string, handles?: readonly number[]): readonly Type[]; + fetchSymbols(source: Symbol | Signature | Type, method: string, handles?: readonly number[]): readonly Symbol[]; + fetchBaseTypes(source: Type): readonly Type[]; +} +export declare class Project { + readonly id: Path; + readonly configFileName: string; + readonly compilerOptions: CompilerOptions; + readonly rootFiles: readonly string[]; + readonly program: Program; + readonly checker: Checker; + readonly emitter: Emitter; + private client; + constructor(data: ProjectResponse, snapshotId: number, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path, snapshotRegistry: SnapshotObjectRegistry); + dispose(): void; +} +export declare class Program { + private snapshotId; + private project; + private client; + private sourceFileCache; + private toPath; + private decoder; + private sourceFileMetadataCache; + constructor(snapshotId: number, project: Project, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path); + getCompilerOptions(): CompilerOptions; + getSourceFile(file: DocumentIdentifier): SourceFile | undefined; + getSourceFileNames(): readonly string[]; + /** + * Returns program-stored metadata for the given source file, or `undefined` if the file + * is not part of the program. Metadata is fetched lazily per file and cached on this + * `Program` instance. + */ + getSourceFileMetadata(fileName: string): SourceFileMetadata | undefined; + /** + * Returns program-stored metadata for the source file at the given path, or `undefined` + * if the file is not part of the program. Like {@link getSourceFileMetadata}, but skips + * the file name to path conversion. Metadata is fetched lazily per file and cached on + * this `Program` instance. + */ + getSourceFileMetadataByPath(path: Path): SourceFileMetadata | undefined; + private fetchSourceFileMetadata; + /** + * Returns whether the given source file was loaded as part of an external library + * (e.g. a dependency resolved from `node_modules`). The underlying program metadata is + * fetched lazily per file and cached on this `Program` instance. + */ + isSourceFileFromExternalLibrary(file: SourceFile): boolean; + /** + * Returns whether the given source file is a default library file (e.g. `lib.d.ts`). + * The underlying program metadata is fetched lazily per file and cached on this + * `Program` instance. + */ + isSourceFileDefaultLibrary(file: SourceFile): boolean; + /** + * Get syntactic (parse) diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSyntacticDiagnostics(file?: DocumentIdentifier): readonly Diagnostic[]; + /** + * Get binder diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getBindDiagnostics(file?: DocumentIdentifier): readonly Diagnostic[]; + /** + * Get semantic (type-check) diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSemanticDiagnostics(file?: DocumentIdentifier): readonly Diagnostic[]; + /** + * Get suggestion diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSuggestionDiagnostics(file?: DocumentIdentifier): readonly Diagnostic[]; + /** + * Get declaration emit diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getDeclarationDiagnostics(file?: DocumentIdentifier): readonly Diagnostic[]; + /** + * Get program-wide diagnostics for the project, including compiler options diagnostics. + */ + getProgramDiagnostics(): readonly Diagnostic[]; + /** + * Get global (non-file-specific) semantic diagnostics for the project. + */ + getGlobalDiagnostics(): readonly Diagnostic[]; + /** + * Get config file parsing diagnostics for the project. + */ + getConfigFileParsingDiagnostics(): readonly Diagnostic[]; +} +export declare class Checker { + private snapshotId; + private project; + private client; + private objectRegistry; + private wellKnownSymbols; + constructor(snapshotId: number, project: Project, client: Client, objectRegistry: ProjectObjectRegistry); + dispose(): void; + getSymbolAtLocation(node: Node): Symbol | undefined; + getSymbolAtLocation(nodes: readonly Node[]): (Symbol | undefined)[]; + getSymbolAtPosition(file: DocumentIdentifier, position: number): Symbol | undefined; + getSymbolAtPosition(file: DocumentIdentifier, positions: readonly number[]): (Symbol | undefined)[]; + getTypeOfSymbol(symbol: Symbol): Type | undefined; + getTypeOfSymbol(symbols: readonly Symbol[]): (Type | undefined)[]; + /** + * Get the declared type of a symbol. Always returns a type; for symbols whose + * declared type cannot be determined the checker yields the error type (use + * {@link Type.isErrorType} to detect it). + */ + getDeclaredTypeOfSymbol(symbol: Symbol): Type; + getReferencesToSymbolInFile(file: DocumentIdentifier, symbol: Symbol): NodeHandle[]; + getReferencedSymbolsForNode(node: Node, position: number): ReferencedSymbolEntry[]; + getSignatureUsage(signatureDecl: Node): SignatureUsage[]; + getCompletionsAtPosition(document: string, position: number, options?: CompletionOptions): CompletionInfo | undefined; + getTypeAtLocation(node: Node): Type | undefined; + getTypeAtLocation(nodes: readonly Node[]): (Type | undefined)[]; + getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[]; + getResolvedSignature(node: Node): Signature | undefined; + getTypeAtPosition(file: DocumentIdentifier, position: number): Type | undefined; + getTypeAtPosition(file: DocumentIdentifier, positions: readonly number[]): (Type | undefined)[]; + resolveName(name: string, meaning: SymbolFlags, location?: Node | DocumentPosition, excludeGlobals?: boolean): Symbol | undefined; + getResolvedSymbol(node: Identifier): Symbol | undefined; + getContextualType(node: Expression): Type | undefined; + getBaseTypeOfLiteralType(type: Type): Type | undefined; + getNonNullableType(type: Type): Type | undefined; + getTypeFromTypeNode(node: TypeNode): Type | undefined; + getWidenedType(type: Type): Type | undefined; + getParameterType(signature: Signature, index: number): Type | undefined; + isArrayLikeType(type: Type): boolean; + isTypeAssignableTo(source: Type, target: Type): boolean; + getShorthandAssignmentValueSymbol(node: Node): Symbol | undefined; + /** + * Get the type of a symbol as narrowed at a specific location. Always returns + * a type; for symbols whose type cannot be determined the checker yields the + * error type (use {@link Type.isErrorType} to detect it). + */ + getTypeOfSymbolAtLocation(symbol: Symbol, location: Node): Type; + private getIntrinsicType; + getAnyType(): Type; + getStringType(): Type; + getNumberType(): Type; + getBooleanType(): Type; + getVoidType(): Type; + getUndefinedType(): Type; + getNullType(): Type; + getNeverType(): Type; + getUnknownType(): Type; + getBigIntType(): Type; + getESSymbolType(): Type; + typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: number): TypeNode | undefined; + signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): Node | undefined; + typeToString(type: Type, enclosingDeclaration?: Node, flags?: number): string; + isContextSensitive(node: Node): boolean; + isArrayType(type: Type): boolean; + isTupleType(type: Type): boolean; + getReturnTypeOfSignature(signature: Signature): Type | undefined; + getRestTypeOfSignature(signature: Signature): Type | undefined; + getTypePredicateOfSignature(signature: Signature): TypePredicate | undefined; + /** + * Get the base types of a class or interface type. A type with no base types + * yields an empty array. + */ + getBaseTypes(type: InterfaceType): readonly Type[]; + getApparentType(type: Type): Type | undefined; + getPropertiesOfType(type: Type): readonly Symbol[]; + getIndexInfosOfType(type: Type): readonly IndexInfo[]; + /** + * Get the constraint of a type parameter (the `T` in ``), or + * undefined if it has none. + */ + getConstraintOfTypeParameter(type: TypeParameter): Type | undefined; + getBaseConstraintOfType(type: Type): Type | undefined; + getPropertyOfType(type: Type, name: string): Symbol | undefined; + getConstantValue(node: Node): string | number | undefined; + getSignatureFromDeclaration(node: Node): Signature | undefined; + getExportSpecifierLocalTargetSymbol(node: Node): Symbol | undefined; + /** + * Follow all aliases to get the original symbol. Always returns a symbol; for + * an unresolved alias the checker yields the unknown symbol (use + * {@link Checker.isUnknownSymbol} to detect it). + */ + getAliasedSymbol(symbol: Symbol): Symbol; + getImmediateAliasedSymbol(symbol: Symbol): Symbol | undefined; + /** + * Fetch (once, then cache) the handle ids of the per-checker singleton + * symbols (unknown, undefined, arguments). These ids are stable for the life + * of the project's checker, so identity checks against them are local after + * the first call. + */ + private getWellKnownSymbols; + /** + * Returns `true` if the symbol is the checker's "unknown" symbol (e.g. the + * result of {@link Checker.getAliasedSymbol} on an unresolved alias). + */ + isUnknownSymbol(symbol: Symbol): boolean; + /** + * Returns `true` if the symbol is the checker's "undefined" symbol. + */ + isUndefinedSymbol(symbol: Symbol): boolean; + /** + * Returns `true` if the symbol is the checker's "arguments" symbol. + */ + isArgumentsSymbol(symbol: Symbol): boolean; + getExportsOfModule(symbol: Symbol): readonly Symbol[]; + getMemberInModuleExports(symbol: Symbol, name: string): Symbol | undefined; + getJsDocTagsOfSymbol(symbol: Symbol): readonly JSDocTagInfo[]; + getDocumentationCommentOfSymbol(symbol: Symbol): string; + /** + * Get the type arguments of a type reference (e.g. the `string` in `Array`). + */ + getTypeArguments(type: TypeReference): readonly Type[]; +} +export interface PrintNodeOptions { + preserveSourceNewlines?: boolean | undefined; + neverAsciiEscape?: boolean | undefined; + terminateUnterminatedLiterals?: boolean | undefined; +} +export declare class Emitter { + private client; + constructor(client: Client); + printNode(node: Node, options?: PrintNodeOptions): string; +} +export declare class NodeHandle { + /** + * The project this handle was produced in, used as the default for {@link resolve}. + * Node handles are only meaningful within a project's program, so the producing project + * is remembered so callers don't have to pass it explicitly. + */ + private readonly canonicalProject; + readonly index: number; + readonly kind: SyntaxKind; + readonly path: Path; + constructor(handle: string, canonicalProject: Project); + /** + * Resolve this handle to the actual AST node by fetching the source file from a project + * and looking up the node by index. If no project is passed, the project that produced + * the handle is used. + */ + resolve(project?: Project): Node | undefined; +} +/** A symbol definition paired with all of its reference nodes. */ +export interface ReferencedSymbolEntry { + /** The node handle for the symbol's definition. */ + definition: NodeHandle; + /** The resolved symbol for the definition, if available. */ + symbol?: Symbol | undefined; + /** The node handles for each reference to the symbol. */ + references: NodeHandle[]; +} +/** A single usage of a signature, pairing the reference name with its call expression (if any). */ +export interface SignatureUsage { + /** The node handle for the name reference. */ + name: NodeHandle; + /** The node handle for the call expression, if the reference is invoked. */ + call?: NodeHandle | undefined; +} +export declare class Symbol { + private objectRegistry; + /** + * The project this symbol was first observed in, used as the default project for + * lookups that need a project context (members/exports/parent). Symbols are shared + * snapshot-wide, so these lookups can otherwise be ambiguous about which project to use. + */ + private readonly canonicalProject; + readonly id: number; + /** The escaped (`__String`) name, used as the key in member/export tables. */ + readonly escapedName: __String; + /** The display name (escaped underscores removed). */ + readonly name: string; + readonly flags: SymbolFlags; + readonly checkFlags: number; + readonly declarations: readonly NodeHandle[]; + readonly valueDeclaration: NodeHandle | undefined; + private readonly parent; + private readonly exportSymbol; + private membersCache; + private exportsCache; + constructor(data: SymbolResponse, objectRegistry: SnapshotObjectRegistry); + getParent(): Symbol | undefined; + /** + * Get this symbol's members keyed by escaped name. The result is cached on + * the symbol, so repeated calls do not round-trip to the server. + */ + getMembers(): ReadonlyMap<__String, Symbol>; + /** + * Get this symbol's exports keyed by escaped name. The result is cached on + * the symbol, so repeated calls do not round-trip to the server. + */ + getExports(): ReadonlyMap<__String, Symbol>; + private fetchSymbolTable; + getExportSymbol(): Symbol; + getJsDocTags(checker: Checker): readonly JSDocTagInfo[]; + getDocumentationComment(checker: Checker): string; +} +declare class TypeObject implements Type { + private objectRegistry; + readonly id: number; + readonly flags: TypeFlags; + readonly objectFlags: ObjectFlags; + readonly symbol: number; + readonly value: string | number | boolean | bigint; + readonly intrinsicName: string; + readonly isThisType: boolean; + readonly freshType: number; + readonly regularType: number; + readonly target: number; + readonly typeParameters: readonly number[]; + readonly outerTypeParameters: readonly number[]; + readonly localTypeParameters: readonly number[]; + readonly aliasTypeArguments: readonly number[]; + readonly aliasSymbol: number; + readonly elementFlags: readonly ElementFlags[]; + readonly fixedLength: number; + readonly readonly: boolean; + readonly texts: readonly string[]; + readonly objectType: number; + readonly indexType: number; + readonly checkType: number; + readonly extendsType: number; + readonly baseType: number; + readonly substConstraint: number; + private trueType; + private falseType; + constructor(data: TypeResponse, objectRegistry: ProjectObjectRegistry); + getSymbol(): Symbol | undefined; + getAliasSymbol(): Symbol | undefined; + getTarget(): Type; + getFreshType(): FreshableType | undefined; + getRegularType(): FreshableType | undefined; + getTypes(): readonly Type[] | undefined; + getTypeParameters(): readonly TypeParameter[]; + getOuterTypeParameters(): readonly TypeParameter[]; + getLocalTypeParameters(): readonly TypeParameter[]; + getAliasTypeArguments(): readonly Type[]; + getObjectType(): Type; + getIndexType(): Type; + getCheckType(): Type; + getExtendsType(): Type; + getBaseType(): Type; + getConstraint(): Type; + getTrueType(): Type; + getFalseType(): Type; + /** + * Get the base types of this type. Returns `undefined` for any type that is + * not a class or interface. + */ + getBaseTypes(): readonly Type[] | undefined; + isClassOrInterface(): this is InterfaceType; + isUnionType(): this is UnionType; + isIntersectionType(): this is IntersectionType; + isObjectType(): this is ObjectType; + isIntrinsicType(): this is IntrinsicType; + isErrorType(): boolean; + isLiteralType(): this is LiteralType; + isStringLiteralType(): this is StringLiteralType; + isNumberLiteralType(): this is NumberLiteralType; + isBigIntLiteralType(): this is BigIntLiteralType; + isBooleanLiteralType(): this is BooleanLiteralType; + isTypeReference(): this is TypeReference; + isTupleType(): this is TupleType; + isIndexType(): this is IndexType; + isIndexedAccessType(): this is IndexedAccessType; + isConditionalType(): this is ConditionalType; + isSubstitutionType(): this is SubstitutionType; + isTemplateLiteralType(): this is TemplateLiteralType; + isStringMappingType(): this is StringMappingType; + isTypeParameter(): this is TypeParameter; +} +export declare function isUnionType(type: Type): type is UnionType; +export declare function isIntersectionType(type: Type): type is IntersectionType; +export declare function isObjectType(type: Type): type is ObjectType; +export declare function isClassOrInterfaceType(type: Type): type is InterfaceType; +export declare function isIntrinsicType(type: Type): type is IntrinsicType; +/** + * Whether this is the error type — the placeholder the checker produces when a + * type cannot be determined (e.g. an unresolved reference). It is an intrinsic + * type named `"error"` (this covers both the singleton error type and the + * per-alias error types manufactured for unresolved type alias references). + */ +export declare function isErrorType(type: Type): boolean; +export declare function isLiteralType(type: Type): type is LiteralType; +export declare function isStringLiteralType(type: Type): type is StringLiteralType; +export declare function isNumberLiteralType(type: Type): type is NumberLiteralType; +export declare function isBigIntLiteralType(type: Type): type is BigIntLiteralType; +export declare function isBooleanLiteralType(type: Type): type is BooleanLiteralType; +export declare function isTypeReference(type: Type): type is TypeReference; +export declare function isTupleType(type: Type): type is TupleType; +export declare function isIndexType(type: Type): type is IndexType; +export declare function isIndexedAccessType(type: Type): type is IndexedAccessType; +export declare function isConditionalType(type: Type): type is ConditionalType; +export declare function isSubstitutionType(type: Type): type is SubstitutionType; +export declare function isTemplateLiteralType(type: Type): type is TemplateLiteralType; +export declare function isStringMappingType(type: Type): type is StringMappingType; +export declare function isTypeParameter(type: Type): type is TypeParameter; +export declare class Signature { + private flags; + private objectRegistry; + readonly id: number; + readonly declaration?: NodeHandle | undefined; + readonly typeParameters?: readonly number[] | undefined; + readonly parameters: readonly number[]; + readonly thisParameter?: number | undefined; + readonly target?: number | undefined; + constructor(data: SignatureResponse, project: Project, objectRegistry: ProjectObjectRegistry); + getTypeParameters(): readonly TypeParameter[]; + getParameters(): readonly Symbol[]; + getThisParameter(): Symbol | undefined; + getTarget(): Signature | undefined; + get hasRestParameter(): boolean; + get isConstruct(): boolean; + get isAbstract(): boolean; +} +//# sourceMappingURL=api.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/api.d.ts.map b/node_modules/typescript/dist/api/sync/api.d.ts.map new file mode 100644 index 0000000..578ddf5 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/api.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/api/sync/api.ts"],"names":[],"mappings":";AASA,OAAO,EAAE,kBAAk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gB,IAAI,OAAO,CAE9B;IAED,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/api.js b/node_modules/typescript/dist/api/sync/api.js new file mode 100644 index 0000000..39a465b --- /dev/null +++ b/node_modules/typescript/dist/api/sync/api.js @@ -0,0 +1,1665 @@ +// +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// !!! THIS FILE IS AUTO-GENERATED - DO NOT EDIT !!! +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// +// Source: src/api/async/api.ts +// Regenerate: npm run generate (from _packages/native-preview) +// +/// +import { CompletionItemKind } from "#enums/completionItemKind"; +import { DiagnosticCategory } from "#enums/diagnosticCategory"; +import { ElementFlags } from "#enums/elementFlags"; +import { ModuleKind } from "#enums/moduleKind"; +import { NodeBuilderFlags } from "#enums/nodeBuilderFlags"; +import { ObjectFlags } from "#enums/objectFlags"; +import { SignatureFlags } from "#enums/signatureFlags"; +import { SignatureKind } from "#enums/signatureKind"; +import { SymbolFlags } from "#enums/symbolFlags"; +import { TypeFlags } from "#enums/typeFlags"; +import { TypePredicateKind } from "#enums/typePredicateKind"; +import { ModifierFlags, unescapeLeadingUnderscores, } from "../../ast/index.js"; +import { encodeNode, uint8ArrayToBase64, } from "../node/encoder.js"; +import { decodeNode, getNodeId, parseNodeHandle, readParseOptionsKey, readSourceFileHash, RemoteSourceFile, } from "../node/node.js"; +import { Wtf8Decoder } from "../node/wtf8.js"; +import { createGetCanonicalFileName, toPath, } from "../path.js"; +import { resolveFileName, toUpdateSnapshotRequest, } from "../proto.js"; +import { SourceFileCache } from "../sourceFileCache.js"; +import { Client, } from "./client.js"; +export { documentURIToFileName, fileNameToDocumentURI } from "../path.js"; +export { CompletionItemKind, DiagnosticCategory, ElementFlags, ModifierFlags, ModuleKind, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypePredicateKind }; +export class API { + client; + sourceFileCache; + toPath; + initialized = false; + activeSnapshots = new Set(); + latestSnapshot; + internal; + constructor(options = {}) { + this.client = new Client(options); + this.sourceFileCache = new SourceFileCache(); + this.internal = new InternalAPI(this.client, () => this.ensureInitialized()); + } + /** + * Create an API instance from an existing LSP connection's API session. + * Use this when connecting to an API pipe provided by an LSP server via custom/initializeAPISession. + */ + static fromLSPConnection(options) { + const api = new API(options); + api.ensureInitialized(); + return api; + } + ensureInitialized() { + if (!this.initialized) { + const response = this.client.apiRequest("initialize", null); + const getCanonicalFileName = createGetCanonicalFileName(response.useCaseSensitiveFileNames); + const currentDirectory = response.currentDirectory; + this.toPath = (fileName) => toPath(fileName, currentDirectory, getCanonicalFileName); + this.initialized = true; + } + } + parseConfigFile(file) { + this.ensureInitialized(); + return this.client.apiRequest("parseConfigFile", { file }); + } + updateSnapshot(params) { + this.ensureInitialized(); + const requestParams = toUpdateSnapshotRequest(params); + const data = this.client.apiRequest("updateSnapshot", requestParams); + // Retain cached source files from previous snapshot for unchanged files + if (this.latestSnapshot) { + this.sourceFileCache.retainForSnapshot(data.snapshot, this.latestSnapshot.id, data.changes); + if (this.latestSnapshot.isDisposed()) { + this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id); + } + } + const snapshot = new Snapshot(data, this.client, this.sourceFileCache, this.toPath, () => { + this.activeSnapshots.delete(snapshot); + if (snapshot !== this.latestSnapshot) { + this.sourceFileCache.releaseSnapshot(snapshot.id); + } + }); + this.latestSnapshot = snapshot; + this.activeSnapshots.add(snapshot); + return snapshot; + } + close() { + // Dispose all active snapshots + for (const snapshot of [...this.activeSnapshots]) { + snapshot.dispose(); + } + // Release the latest snapshot's cache refs if still held + if (this.latestSnapshot) { + this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id); + this.latestSnapshot = undefined; + } + this.client.close(); + this.sourceFileCache.clear(); + } + clearSourceFileCache() { + this.sourceFileCache.clear(); + } + /** + * Returns a snapshot of collected timing information for requests made + * through this API instance: client-measured round-trip latency and bytes + * transferred, folded together with the server's own per-request processing + * time and an estimated transport overhead (round-trip minus server time). + * + * Fetching the snapshot issues a lightweight request to the server to + * retrieve its timing collection. Collection must be enabled via the + * `collectTiming` option; when it is not, the returned snapshot has + * `enabled: false` and zeroed totals. + */ + getTimingInfo() { + return this.client.getTimingInfo(); + } + /** Clears all accumulated timing totals and recent-request history, on both the client and the server. */ + resetTimingInfo() { + return this.client.resetTimingInfo(); + } +} +export class InternalAPI { + client; + ensureInitialized; + /** @internal */ + constructor(client, ensureInitialized) { + this.client = client; + this.ensureInitialized = ensureInitialized; + } + startCPUProfile(dir) { + this.ensureInitialized(); + this.client.apiRequest("startCPUProfile", { dir }); + } + stopCPUProfile() { + this.ensureInitialized(); + const result = this.client.apiRequest("stopCPUProfile", null); + return result.file; + } + saveHeapProfile(dir) { + this.ensureInitialized(); + const result = this.client.apiRequest("saveHeapProfile", { dir }); + return result.file; + } +} +export class Snapshot { + id; + projectMap; + toPath; + client; + disposed = false; + onDispose; + snapshotRegistry; + constructor(data, client, sourceFileCache, toPath, onDispose) { + this.id = data.snapshot; + this.client = client; + this.toPath = toPath; + this.onDispose = onDispose; + this.projectMap = new Map(); + this.snapshotRegistry = new SnapshotObjectRegistry(client, this.id, projectId => this.projectMap.get(projectId)); + for (const projData of data.projects) { + const project = new Project(projData, this.id, client, sourceFileCache, toPath, this.snapshotRegistry); + this.projectMap.set(toPath(projData.configFileName), project); + } + } + getProjects() { + this.ensureNotDisposed(); + return [...this.projectMap.values()]; + } + getProject(configFileName) { + this.ensureNotDisposed(); + return this.projectMap.get(this.toPath(configFileName)); + } + getDefaultProjectForFile(file) { + this.ensureNotDisposed(); + const data = this.client.apiRequest("getDefaultProjectForFile", { + snapshot: this.id, + file, + }); + if (!data) + return undefined; + return this.projectMap.get(this.toPath(data.configFileName)); + } + [globalThis.Symbol.dispose]() { + this.dispose(); + } + dispose() { + if (this.disposed) + return; + this.disposed = true; + for (const project of this.projectMap.values()) { + project.dispose(); + } + this.projectMap.clear(); + this.snapshotRegistry.clear(); + this.onDispose(); + this.client.apiRequest("release", { snapshot: this.id }); + } + isDisposed() { + return this.disposed; + } + ensureNotDisposed() { + if (this.disposed) { + throw new Error("Snapshot is disposed"); + } + } +} +class SnapshotObjectRegistry { + symbols = new Map(); + client; + snapshotId; + resolveProject; + constructor(client, snapshotId, resolveProject) { + this.client = client; + this.snapshotId = snapshotId; + this.resolveProject = resolveProject; + } + /** Resolve a project id (a config file path) to its Project within this snapshot. */ + getProject(projectId) { + return this.resolveProject(projectId); + } + getOrCreateSymbol(data) { + let symbol = this.symbols.get(data.id); + if (!symbol) { + symbol = new Symbol(data, this); + this.symbols.set(data.id, symbol); + } + return symbol; + } + getSymbol(id) { + return this.symbols.get(id); + } + clear() { + this.symbols.clear(); + } + fetchSymbol(source, method, handle, projectId) { + if (!handle) + return undefined; + const cached = this.getSymbol(handle); + if (cached) + return cached; + const data = this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: projectId, + objectId: source.id, + }); + if (!data) + throw new Error(`${method} returned null symbol for ${source.constructor.name} ${source.id}`); + return this.getOrCreateSymbol(data); + } + fetchSymbols(source, method, handles, projectId) { + if (handles) { + const result = new Array(handles.length); + let allCached = true; + for (let i = 0; i < handles.length; i++) { + const cached = this.getSymbol(handles[i]); + if (!cached) { + allCached = false; + break; + } + result[i] = cached; + } + if (allCached) + return result; + } + const symbolData = this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: projectId, + objectId: source.id, + }); + if (symbolData == null) + return []; + else + return symbolData.map(data => this.getOrCreateSymbol(data)); + } +} +class ProjectObjectRegistry { + client; + snapshotId; + project; + snapshotRegistry; + types = new Map(); + signatures = new Map(); + constructor(client, snapshotId, project, snapshotRegistry) { + this.client = client; + this.snapshotId = snapshotId; + this.project = project; + this.snapshotRegistry = snapshotRegistry; + } + getOrCreateSymbol(data) { + return this.snapshotRegistry.getOrCreateSymbol(data); + } + getSymbol(id) { + return this.snapshotRegistry.getSymbol(id); + } + getOrCreateType(data) { + let type = this.types.get(data.id); + if (!type) { + type = new TypeObject(data, this); + this.types.set(data.id, type); + } + return type; + } + getType(id) { + return this.types.get(id); + } + getOrCreateSignature(data) { + let sig = this.signatures.get(data.id); + if (!sig) { + sig = new Signature(data, this.project, this); + this.signatures.set(data.id, sig); + } + return sig; + } + getSignature(id) { + return this.signatures.get(id); + } + clear() { + this.types.clear(); + this.signatures.clear(); + } + fetchType(source, method, handle) { + if (handle !== false) { + if (!handle) + return undefined; + const cached = this.getType(handle); + if (cached) + return cached; + } + const data = this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: this.project.id, + objectId: source.id, + }); + if (!data) + throw new Error(`${method} returned null type for ${source.constructor.name} ${source.id}`); + return this.getOrCreateType(data); + } + fetchSymbol(source, method, handle) { + return this.snapshotRegistry.fetchSymbol(source, method, handle, this.project.id); + } + fetchSignature(source, method, handle) { + if (!handle) + return undefined; + const cached = this.getSignature(handle); + if (cached) + return cached; + const data = this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: this.project.id, + objectId: source.id, + }); + if (!data) + throw new Error(`${method} returned null signature for ${source.constructor.name} ${source.id}`); + return this.getOrCreateSignature(data); + } + fetchTypes(source, method, handles) { + if (handles) { + const result = new Array(handles.length); + let allCached = true; + for (let i = 0; i < handles.length; i++) { + const cached = this.getType(handles[i]); + if (!cached) { + allCached = false; + break; + } + result[i] = cached; + } + if (allCached) + return result; + } + const typesData = this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: this.project.id, + objectId: source.id, + }); + if (typesData == null) + return []; + else + return typesData.map(data => this.getOrCreateType(data)); + } + fetchSymbols(source, method, handles) { + return this.snapshotRegistry.fetchSymbols(source, method, handles, this.project.id); + } + // getBaseTypes is a checker-level endpoint keyed by `type` (not `objectId`), + // so it cannot go through fetchTypes. This helper reuses that server method. + fetchBaseTypes(source) { + const typesData = this.client.apiRequest("getBaseTypes", { + snapshot: this.snapshotId, + project: this.project.id, + type: source.id, + }); + if (typesData == null) + return []; + return typesData.map(data => this.getOrCreateType(data)); + } +} +export class Project { + id; + configFileName; + compilerOptions; + rootFiles; + program; + checker; + emitter; + client; + constructor(data, snapshotId, client, sourceFileCache, toPath, snapshotRegistry) { + this.id = data.id; + this.configFileName = data.configFileName; + this.compilerOptions = data.compilerOptions; + this.rootFiles = data.rootFiles; + this.client = client; + this.program = new Program(snapshotId, this, client, sourceFileCache, toPath); + const objectRegistry = new ProjectObjectRegistry(client, snapshotId, this, snapshotRegistry); + this.checker = new Checker(snapshotId, this, client, objectRegistry); + this.emitter = new Emitter(client); + } + dispose() { + this.checker.dispose(); + } +} +export class Program { + snapshotId; + project; + client; + sourceFileCache; + toPath; + decoder = new Wtf8Decoder(); + sourceFileMetadataCache = new Map(); + constructor(snapshotId, project, client, sourceFileCache, toPath) { + this.snapshotId = snapshotId; + this.project = project; + this.client = client; + this.sourceFileCache = sourceFileCache; + this.toPath = toPath; + } + getCompilerOptions() { + return this.project.compilerOptions; + } + getSourceFile(file) { + const fileName = resolveFileName(file); + const path = this.toPath(fileName); + // Check if we already have a retained cache entry for this (snapshot, project) pair + const retained = this.sourceFileCache.getRetained(path, this.snapshotId, this.project.id); + if (retained) { + return retained; + } + // Fetch from server + const binaryData = this.client.apiRequestBinary("getSourceFile", { + snapshot: this.snapshotId, + project: this.project.id, + file, + }); + if (!binaryData) { + return undefined; + } + const view = new DataView(binaryData.buffer, binaryData.byteOffset, binaryData.byteLength); + const contentHash = readSourceFileHash(view); + const parseOptionsKey = readParseOptionsKey(view); + // Create a new RemoteSourceFile and cache it (set returns existing if hash matches) + const sourceFile = new RemoteSourceFile(binaryData, this.decoder, this.client.getTimingCollector()); + return this.sourceFileCache.set(path, sourceFile, parseOptionsKey, contentHash, this.snapshotId, this.project.id); + } + getSourceFileNames() { + const data = this.client.apiRequest("getSourceFileNames", { + snapshot: this.snapshotId, + project: this.project.id, + }); + return data ?? []; + } + /** + * Returns program-stored metadata for the given source file, or `undefined` if the file + * is not part of the program. Metadata is fetched lazily per file and cached on this + * `Program` instance. + */ + getSourceFileMetadata(fileName) { + return this.getSourceFileMetadataByPath(this.toPath(fileName)); + } + /** + * Returns program-stored metadata for the source file at the given path, or `undefined` + * if the file is not part of the program. Like {@link getSourceFileMetadata}, but skips + * the file name to path conversion. Metadata is fetched lazily per file and cached on + * this `Program` instance. + */ + getSourceFileMetadataByPath(path) { + let metadata = this.sourceFileMetadataCache.get(path); + if (metadata === undefined) { + metadata = this.fetchSourceFileMetadata(path); + this.sourceFileMetadataCache.set(path, metadata); + } + return metadata; + } + fetchSourceFileMetadata(path) { + const data = this.client.apiRequest("getSourceFileMetadata", { + snapshot: this.snapshotId, + project: this.project.id, + file: path, + }); + return data ?? undefined; + } + /** + * Returns whether the given source file was loaded as part of an external library + * (e.g. a dependency resolved from `node_modules`). The underlying program metadata is + * fetched lazily per file and cached on this `Program` instance. + */ + isSourceFileFromExternalLibrary(file) { + const metadata = this.getSourceFileMetadataByPath(file.path); + return metadata?.isFromExternalLibrary ?? false; + } + /** + * Returns whether the given source file is a default library file (e.g. `lib.d.ts`). + * The underlying program metadata is fetched lazily per file and cached on this + * `Program` instance. + */ + isSourceFileDefaultLibrary(file) { + const metadata = this.getSourceFileMetadataByPath(file.path); + return metadata?.isDefaultLibrary ?? false; + } + /** + * Get syntactic (parse) diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSyntacticDiagnostics(file) { + const data = this.client.apiRequest("getSyntacticDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get binder diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getBindDiagnostics(file) { + const data = this.client.apiRequest("getBindDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get semantic (type-check) diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSemanticDiagnostics(file) { + const data = this.client.apiRequest("getSemanticDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get suggestion diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSuggestionDiagnostics(file) { + const data = this.client.apiRequest("getSuggestionDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get declaration emit diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getDeclarationDiagnostics(file) { + const data = this.client.apiRequest("getDeclarationDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get program-wide diagnostics for the project, including compiler options diagnostics. + */ + getProgramDiagnostics() { + const data = this.client.apiRequest("getProgramDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + }); + return data ?? []; + } + /** + * Get global (non-file-specific) semantic diagnostics for the project. + */ + getGlobalDiagnostics() { + const data = this.client.apiRequest("getGlobalDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + }); + return data ?? []; + } + /** + * Get config file parsing diagnostics for the project. + */ + getConfigFileParsingDiagnostics() { + const data = this.client.apiRequest("getConfigFileParsingDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + }); + return data ?? []; + } +} +export class Checker { + snapshotId; + project; + client; + objectRegistry; + wellKnownSymbols; + constructor(snapshotId, project, client, objectRegistry) { + this.snapshotId = snapshotId; + this.project = project; + this.client = client; + this.objectRegistry = objectRegistry; + } + dispose() { + this.objectRegistry.clear(); + } + getSymbolAtLocation(nodeOrNodes) { + if (Array.isArray(nodeOrNodes)) { + const data = this.client.apiRequest("getSymbolsAtLocations", { + snapshot: this.snapshotId, + project: this.project.id, + locations: nodeOrNodes.map(node => getNodeId(node)), + }); + return data.map(d => d ? this.objectRegistry.getOrCreateSymbol(d) : undefined); + } + const data = this.client.apiRequest("getSymbolAtLocation", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(nodeOrNodes), + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + getSymbolAtPosition(file, positionOrPositions) { + if (typeof positionOrPositions === "number") { + const data = this.client.apiRequest("getSymbolAtPosition", { + snapshot: this.snapshotId, + project: this.project.id, + file, + position: positionOrPositions, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + const data = this.client.apiRequest("getSymbolsAtPositions", { + snapshot: this.snapshotId, + project: this.project.id, + file, + positions: positionOrPositions, + }); + return data.map(d => d ? this.objectRegistry.getOrCreateSymbol(d) : undefined); + } + getTypeOfSymbol(symbolOrSymbols) { + if (Array.isArray(symbolOrSymbols)) { + const data = this.client.apiRequest("getTypesOfSymbols", { + snapshot: this.snapshotId, + project: this.project.id, + symbols: symbolOrSymbols.map(s => s.id), + }); + return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined); + } + const data = this.client.apiRequest("getTypeOfSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbolOrSymbols.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + /** + * Get the declared type of a symbol. Always returns a type; for symbols whose + * declared type cannot be determined the checker yields the error type (use + * {@link Type.isErrorType} to detect it). + */ + getDeclaredTypeOfSymbol(symbol) { + const data = this.client.apiRequest("getDeclaredTypeOfSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + if (!data) + throw new Error(`getDeclaredTypeOfSymbol returned no type for symbol ${symbol.id}`); + return this.objectRegistry.getOrCreateType(data); + } + getReferencesToSymbolInFile(file, symbol) { + const data = this.client.apiRequest("getReferencesToSymbolInFile", { + snapshot: this.snapshotId, + project: this.project.id, + file, + symbol: symbol.id, + }); + return (data ?? []).map(h => new NodeHandle(h, this.project)); + } + getReferencedSymbolsForNode(node, position) { + const data = this.client.apiRequest("getReferencedSymbolsForNode", { + snapshot: this.snapshotId, + project: this.project.id, + node: getNodeId(node), + position, + }); + return (data ?? []).map(entry => ({ + definition: new NodeHandle(entry.definition, this.project), + symbol: entry.symbol ? this.objectRegistry.getOrCreateSymbol(entry.symbol) : undefined, + references: (entry.references ?? []).map(h => new NodeHandle(h, this.project)), + })); + } + getSignatureUsage(signatureDecl) { + const data = this.client.apiRequest("getSignatureUsages", { + snapshot: this.snapshotId, + project: this.project.id, + signatureDecl: getNodeId(signatureDecl), + }); + return (data ?? []).map(entry => ({ + name: new NodeHandle(entry.name, this.project), + call: entry.call ? new NodeHandle(entry.call, this.project) : undefined, + })); + } + getCompletionsAtPosition(document, position, options) { + const data = this.client.apiRequest("getCompletionsAtPosition", { + snapshot: this.snapshotId, + project: this.project.id, + file: document, + position, + triggerCharacter: options?.triggerCharacter, + includeSymbol: options?.includeSymbol, + }); + if (!data) + return undefined; + return { + isIncomplete: data.isIncomplete, + entries: data.entries.map(e => ({ + ...e, + symbol: e.symbol ? this.objectRegistry.getOrCreateSymbol(e.symbol) : undefined, + })), + }; + } + getTypeAtLocation(nodeOrNodes) { + if (Array.isArray(nodeOrNodes)) { + const data = this.client.apiRequest("getTypeAtLocations", { + snapshot: this.snapshotId, + project: this.project.id, + locations: nodeOrNodes.map(node => getNodeId(node)), + }); + return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined); + } + const data = this.client.apiRequest("getTypeAtLocation", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(nodeOrNodes), + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getSignaturesOfType(type, kind) { + const data = this.client.apiRequest("getSignaturesOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + kind, + }); + return data.map(d => this.objectRegistry.getOrCreateSignature(d)); + } + getResolvedSignature(node) { + const data = this.client.apiRequest("getResolvedSignature", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateSignature(data) : undefined; + } + getTypeAtPosition(file, positionOrPositions) { + if (typeof positionOrPositions === "number") { + const data = this.client.apiRequest("getTypeAtPosition", { + snapshot: this.snapshotId, + project: this.project.id, + file, + position: positionOrPositions, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + const data = this.client.apiRequest("getTypesAtPositions", { + snapshot: this.snapshotId, + project: this.project.id, + file, + positions: positionOrPositions, + }); + return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined); + } + resolveName(name, meaning, location, excludeGlobals) { + // Distinguish Node (has `kind`) from DocumentPosition (has `document` and `position`) + const isNode = location && "kind" in location; + const data = this.client.apiRequest("resolveName", { + snapshot: this.snapshotId, + project: this.project.id, + name, + meaning, + location: isNode ? getNodeId(location) : undefined, + file: !isNode && location ? location.document : undefined, + position: !isNode && location ? location.position : undefined, + excludeGlobals, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + getResolvedSymbol(node) { + const text = node.text; + if (!text) + return undefined; + return this.resolveName(text, SymbolFlags.Value | SymbolFlags.ExportValue, node); + } + getContextualType(node) { + const data = this.client.apiRequest("getContextualType", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getBaseTypeOfLiteralType(type) { + const data = this.client.apiRequest("getBaseTypeOfLiteralType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getNonNullableType(type) { + const data = this.client.apiRequest("getNonNullableType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getTypeFromTypeNode(node) { + const data = this.client.apiRequest("getTypeFromTypeNode", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getWidenedType(type) { + const data = this.client.apiRequest("getWidenedType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getParameterType(signature, index) { + const data = this.client.apiRequest("getParameterType", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + index, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + isArrayLikeType(type) { + return this.client.apiRequest("isArrayLikeType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + } + isTypeAssignableTo(source, target) { + return this.client.apiRequest("isTypeAssignableTo", { + snapshot: this.snapshotId, + project: this.project.id, + source: source.id, + target: target.id, + }); + } + getShorthandAssignmentValueSymbol(node) { + const data = this.client.apiRequest("getShorthandAssignmentValueSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + /** + * Get the type of a symbol as narrowed at a specific location. Always returns + * a type; for symbols whose type cannot be determined the checker yields the + * error type (use {@link Type.isErrorType} to detect it). + */ + getTypeOfSymbolAtLocation(symbol, location) { + const data = this.client.apiRequest("getTypeOfSymbolAtLocation", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + location: getNodeId(location), + }); + if (!data) + throw new Error(`getTypeOfSymbolAtLocation returned no type for symbol ${symbol.id}`); + return this.objectRegistry.getOrCreateType(data); + } + getIntrinsicType(method) { + const data = this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: this.project.id, + }); + return this.objectRegistry.getOrCreateType(data); + } + getAnyType() { + return this.getIntrinsicType("getAnyType"); + } + getStringType() { + return this.getIntrinsicType("getStringType"); + } + getNumberType() { + return this.getIntrinsicType("getNumberType"); + } + getBooleanType() { + return this.getIntrinsicType("getBooleanType"); + } + getVoidType() { + return this.getIntrinsicType("getVoidType"); + } + getUndefinedType() { + return this.getIntrinsicType("getUndefinedType"); + } + getNullType() { + return this.getIntrinsicType("getNullType"); + } + getNeverType() { + return this.getIntrinsicType("getNeverType"); + } + getUnknownType() { + return this.getIntrinsicType("getUnknownType"); + } + getBigIntType() { + return this.getIntrinsicType("getBigIntType"); + } + getESSymbolType() { + return this.getIntrinsicType("getESSymbolType"); + } + typeToTypeNode(type, enclosingDeclaration, flags) { + const binaryData = this.client.apiRequestBinary("typeToTypeNode", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined, + flags, + }); + if (!binaryData) + return undefined; + return decodeNode(binaryData); + } + signatureToSignatureDeclaration(signature, kind, enclosingDeclaration, flags) { + const binaryData = this.client.apiRequestBinary("signatureToSignatureDeclaration", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + kind, + location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined, + flags, + }); + if (!binaryData) + return undefined; + return decodeNode(binaryData); + } + typeToString(type, enclosingDeclaration, flags) { + return this.client.apiRequest("typeToString", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined, + flags, + }); + } + isContextSensitive(node) { + return this.client.apiRequest("isContextSensitive", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + } + isArrayType(type) { + return this.client.apiRequest("isArrayType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + } + isTupleType(type) { + return this.client.apiRequest("isTupleType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + } + getReturnTypeOfSignature(signature) { + const data = this.client.apiRequest("getReturnTypeOfSignature", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getRestTypeOfSignature(signature) { + const data = this.client.apiRequest("getRestTypeOfSignature", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getTypePredicateOfSignature(signature) { + const data = this.client.apiRequest("getTypePredicateOfSignature", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + }); + if (!data) + return undefined; + return { + kind: data.kind, + parameterIndex: data.parameterIndex, + parameterName: data.parameterName, + type: data.type ? this.objectRegistry.getOrCreateType(data.type) : undefined, + }; + } + /** + * Get the base types of a class or interface type. A type with no base types + * yields an empty array. + */ + getBaseTypes(type) { + const data = this.client.apiRequest("getBaseTypes", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? data.map(d => this.objectRegistry.getOrCreateType(d)) : []; + } + getApparentType(type) { + const data = this.client.apiRequest("getApparentType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getPropertiesOfType(type) { + const data = this.client.apiRequest("getPropertiesOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? data.map(d => this.objectRegistry.getOrCreateSymbol(d)) : []; + } + getIndexInfosOfType(type) { + const data = this.client.apiRequest("getIndexInfosOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + if (!data) + return []; + return data.map(d => ({ + keyType: this.objectRegistry.getOrCreateType(d.keyType), + valueType: this.objectRegistry.getOrCreateType(d.valueType), + isReadonly: d.isReadonly ?? false, + declaration: d.declaration ? new NodeHandle(d.declaration, this.project) : undefined, + })); + } + /** + * Get the constraint of a type parameter (the `T` in ``), or + * undefined if it has none. + */ + getConstraintOfTypeParameter(type) { + const data = this.client.apiRequest("getConstraintOfTypeParameter", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getBaseConstraintOfType(type) { + const data = this.client.apiRequest("getBaseConstraintOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getPropertyOfType(type, name) { + const data = this.client.apiRequest("getPropertyOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + name, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + getConstantValue(node) { + const data = this.client.apiRequest("getConstantValue", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ?? undefined; + } + getSignatureFromDeclaration(node) { + const data = this.client.apiRequest("getSignatureFromDeclaration", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateSignature(data) : undefined; + } + getExportSpecifierLocalTargetSymbol(node) { + const data = this.client.apiRequest("getExportSpecifierLocalTargetSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + /** + * Follow all aliases to get the original symbol. Always returns a symbol; for + * an unresolved alias the checker yields the unknown symbol (use + * {@link Checker.isUnknownSymbol} to detect it). + */ + getAliasedSymbol(symbol) { + const data = this.client.apiRequest("getAliasedSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + if (!data) + throw new Error(`getAliasedSymbol returned no symbol for symbol ${symbol.id}`); + return this.objectRegistry.getOrCreateSymbol(data); + } + getImmediateAliasedSymbol(symbol) { + const data = this.client.apiRequest("getImmediateAliasedSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + /** + * Fetch (once, then cache) the handle ids of the per-checker singleton + * symbols (unknown, undefined, arguments). These ids are stable for the life + * of the project's checker, so identity checks against them are local after + * the first call. + */ + getWellKnownSymbols() { + return this.wellKnownSymbols ??= this.client.apiRequest("getWellKnownSymbols", { + snapshot: this.snapshotId, + project: this.project.id, + }); + } + /** + * Returns `true` if the symbol is the checker's "unknown" symbol (e.g. the + * result of {@link Checker.getAliasedSymbol} on an unresolved alias). + */ + isUnknownSymbol(symbol) { + return symbol.id === (this.getWellKnownSymbols()).unknown; + } + /** + * Returns `true` if the symbol is the checker's "undefined" symbol. + */ + isUndefinedSymbol(symbol) { + return symbol.id === (this.getWellKnownSymbols()).undefined; + } + /** + * Returns `true` if the symbol is the checker's "arguments" symbol. + */ + isArgumentsSymbol(symbol) { + return symbol.id === (this.getWellKnownSymbols()).arguments; + } + getExportsOfModule(symbol) { + const data = this.client.apiRequest("getExportsOfModule", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + return data ? data.map(d => this.objectRegistry.getOrCreateSymbol(d)) : []; + } + getMemberInModuleExports(symbol, name) { + const data = this.client.apiRequest("getMemberInModuleExports", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + name, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + getJsDocTagsOfSymbol(symbol) { + const data = this.client.apiRequest("getJsDocTags", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + return data ?? []; + } + getDocumentationCommentOfSymbol(symbol) { + return this.client.apiRequest("getDocumentationComment", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + } + /** + * Get the type arguments of a type reference (e.g. the `string` in `Array`). + */ + getTypeArguments(type) { + const data = this.client.apiRequest("getTypeArguments", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? data.map(d => this.objectRegistry.getOrCreateType(d)) : []; + } +} +export class Emitter { + client; + constructor(client) { + this.client = client; + } + printNode(node, options = {}) { + const encoded = encodeNode(node); + const base64 = uint8ArrayToBase64(encoded); + return this.client.apiRequest("printNode", { + data: base64, + ...options, + }); + } +} +export class NodeHandle { + /** + * The project this handle was produced in, used as the default for {@link resolve}. + * Node handles are only meaningful within a project's program, so the producing project + * is remembered so callers don't have to pass it explicitly. + */ + canonicalProject; + index; + kind; + path; + constructor(handle, canonicalProject) { + const parsed = parseNodeHandle(handle); + this.index = parsed.index; + this.kind = parsed.kind; + this.path = parsed.path; + this.canonicalProject = canonicalProject; + } + /** + * Resolve this handle to the actual AST node by fetching the source file from a project + * and looking up the node by index. If no project is passed, the project that produced + * the handle is used. + */ + resolve(project = this.canonicalProject) { + const sourceFile = project.program.getSourceFile(this.path); + if (!sourceFile) { + return undefined; + } + return sourceFile.getOrCreateNodeAtIndex(this.index); + } +} +export class Symbol { + objectRegistry; + /** + * The project this symbol was first observed in, used as the default project for + * lookups that need a project context (members/exports/parent). Symbols are shared + * snapshot-wide, so these lookups can otherwise be ambiguous about which project to use. + */ + canonicalProject; + id; + /** The escaped (`__String`) name, used as the key in member/export tables. */ + escapedName; + /** The display name (escaped underscores removed). */ + name; + flags; + checkFlags; + declarations; + valueDeclaration; + parent; + exportSymbol; + membersCache; + exportsCache; + constructor(data, objectRegistry) { + this.objectRegistry = objectRegistry; + this.id = data.id; + this.escapedName = data.name; + this.name = unescapeLeadingUnderscores(data.name); + this.flags = data.flags; + this.checkFlags = data.checkFlags; + const canonicalProject = objectRegistry.getProject(data.project); + if (!canonicalProject) { + throw new Error(`Symbol ${data.id} references unknown canonical project '${data.project}'`); + } + this.canonicalProject = canonicalProject; + this.declarations = (data.declarations ?? []).map(d => new NodeHandle(d, canonicalProject)); + this.valueDeclaration = data.valueDeclaration ? new NodeHandle(data.valueDeclaration, canonicalProject) : undefined; + if (data.parent !== undefined) + this.parent = data.parent; + if (data.exportSymbol !== undefined) + this.exportSymbol = data.exportSymbol; + } + getParent() { + return this.objectRegistry.fetchSymbol(this, "getParentOfSymbol", this.parent, this.canonicalProject.id); + } + /** + * Get this symbol's members keyed by escaped name. The result is cached on + * the symbol, so repeated calls do not round-trip to the server. + */ + getMembers() { + return this.membersCache ??= this.fetchSymbolTable("getMembersOfSymbol"); + } + /** + * Get this symbol's exports keyed by escaped name. The result is cached on + * the symbol, so repeated calls do not round-trip to the server. + */ + getExports() { + return this.exportsCache ??= this.fetchSymbolTable("getExportsOfSymbol"); + } + fetchSymbolTable(method) { + const symbols = this.objectRegistry.fetchSymbols(this, method, undefined, this.canonicalProject.id); + const table = new Map(); + for (const symbol of symbols) { + table.set(symbol.escapedName, symbol); + } + return table; + } + getExportSymbol() { + if (!this.exportSymbol) + return this; + return this.objectRegistry.fetchSymbol(this, "getExportSymbolOfSymbol", this.exportSymbol, this.canonicalProject.id); + } + getJsDocTags(checker) { + return checker.getJsDocTagsOfSymbol(this); + } + getDocumentationComment(checker) { + return checker.getDocumentationCommentOfSymbol(this); + } +} +class TypeObject { + objectRegistry; + id; + flags; + objectFlags; + symbol; + value; + intrinsicName; + isThisType; + freshType; + regularType; + target; + typeParameters; + outerTypeParameters; + localTypeParameters; + aliasTypeArguments; + aliasSymbol; + elementFlags; + fixedLength; + readonly; + texts; + objectType; + indexType; + checkType; + extendsType; + baseType; + substConstraint; + trueType; // false if not yet loaded + falseType; // false if not yet loaded + constructor(data, objectRegistry) { + this.objectRegistry = objectRegistry; + this.id = data.id; + this.flags = data.flags; + if (data.objectFlags !== undefined) + this.objectFlags = data.objectFlags; + if (data.symbol !== undefined) + this.symbol = data.symbol; + if (data.value != null) { + // BigInt literal values are serialized as decimal strings (e.g. "-123") because + // JSON cannot represent bigint. Decode them back into a real bigint here. + this.value = (data.flags & TypeFlags.BigIntLiteral) ? BigInt(data.value) : data.value; + } + if (data.intrinsicName !== undefined) + this.intrinsicName = data.intrinsicName; + if (data.isThisType !== undefined) + this.isThisType = data.isThisType; + if (data.freshType !== undefined) + this.freshType = data.freshType; + if (data.regularType !== undefined) + this.regularType = data.regularType; + if (data.target !== undefined) + this.target = data.target; + this.typeParameters = data.typeParameters ?? []; + this.outerTypeParameters = data.outerTypeParameters ?? []; + this.localTypeParameters = data.localTypeParameters ?? []; + this.aliasTypeArguments = data.aliasTypeArguments ?? []; + if (data.aliasSymbol !== undefined) + this.aliasSymbol = data.aliasSymbol; + if (data.elementFlags !== undefined) + this.elementFlags = data.elementFlags; + if (data.fixedLength !== undefined) + this.fixedLength = data.fixedLength; + if (data.readonly !== undefined) + this.readonly = data.readonly; + if (data.texts !== undefined) + this.texts = data.texts; + if (data.objectType !== undefined) + this.objectType = data.objectType; + if (data.indexType !== undefined) + this.indexType = data.indexType; + if (data.checkType !== undefined) + this.checkType = data.checkType; + if (data.extendsType !== undefined) + this.extendsType = data.extendsType; + if (data.baseType !== undefined) + this.baseType = data.baseType; + if (data.substConstraint !== undefined) + this.substConstraint = data.substConstraint; + this.trueType = false; + this.falseType = false; + } + getSymbol() { + return this.objectRegistry.fetchSymbol(this, "getSymbolOfType", this.symbol); + } + getAliasSymbol() { + return this.objectRegistry.fetchSymbol(this, "getAliasSymbolOfType", this.aliasSymbol); + } + getTarget() { + return this.objectRegistry.fetchType(this, "getTargetOfType", this.target); + } + getFreshType() { + return this.objectRegistry.fetchType(this, "getFreshTypeOfType", this.freshType); + } + getRegularType() { + return this.objectRegistry.fetchType(this, "getRegularTypeOfType", this.regularType); + } + getTypes() { + // Only union, intersection, and template literal types have constituent + // types; any other kind has none, so return undefined rather than sending + // a request the server cannot satisfy. + if (!(this.flags & (TypeFlags.UnionOrIntersection | TypeFlags.TemplateLiteral))) { + return undefined; + } + return this.objectRegistry.fetchTypes(this, "getTypesOfType"); + } + getTypeParameters() { + return this.objectRegistry.fetchTypes(this, "getTypeParametersOfType", this.typeParameters); + } + getOuterTypeParameters() { + return this.objectRegistry.fetchTypes(this, "getOuterTypeParametersOfType", this.outerTypeParameters); + } + getLocalTypeParameters() { + return this.objectRegistry.fetchTypes(this, "getLocalTypeParametersOfType", this.localTypeParameters); + } + getAliasTypeArguments() { + return this.objectRegistry.fetchTypes(this, "getAliasTypeArgumentsOfType", this.aliasTypeArguments); + } + getObjectType() { + return this.objectRegistry.fetchType(this, "getObjectTypeOfType", this.objectType); + } + getIndexType() { + return this.objectRegistry.fetchType(this, "getIndexTypeOfType", this.indexType); + } + getCheckType() { + return this.objectRegistry.fetchType(this, "getCheckTypeOfType", this.checkType); + } + getExtendsType() { + return this.objectRegistry.fetchType(this, "getExtendsTypeOfType", this.extendsType); + } + getBaseType() { + return this.objectRegistry.fetchType(this, "getBaseTypeOfType", this.baseType); + } + getConstraint() { + return this.objectRegistry.fetchType(this, "getConstraintOfType", this.substConstraint); + } + getTrueType() { + const result = this.objectRegistry.fetchType(this, "getTrueTypeOfConditionalType", this.trueType); + this.trueType = result.id; + return result; + } + getFalseType() { + const result = this.objectRegistry.fetchType(this, "getFalseTypeOfConditionalType", this.falseType); + this.falseType = result.id; + return result; + } + /** + * Get the base types of this type. Returns `undefined` for any type that is + * not a class or interface. + */ + getBaseTypes() { + if (!this.isClassOrInterface()) { + return undefined; + } + return this.objectRegistry.fetchBaseTypes(this); + } + isClassOrInterface() { + return isClassOrInterfaceType(this); + } + isUnionType() { + return isUnionType(this); + } + isIntersectionType() { + return isIntersectionType(this); + } + isObjectType() { + return isObjectType(this); + } + isIntrinsicType() { + return isIntrinsicType(this); + } + isErrorType() { + return isErrorType(this); + } + isLiteralType() { + return isLiteralType(this); + } + isStringLiteralType() { + return isStringLiteralType(this); + } + isNumberLiteralType() { + return isNumberLiteralType(this); + } + isBigIntLiteralType() { + return isBigIntLiteralType(this); + } + isBooleanLiteralType() { + return isBooleanLiteralType(this); + } + isTypeReference() { + return isTypeReference(this); + } + isTupleType() { + return isTupleType(this); + } + isIndexType() { + return isIndexType(this); + } + isIndexedAccessType() { + return isIndexedAccessType(this); + } + isConditionalType() { + return isConditionalType(this); + } + isSubstitutionType() { + return isSubstitutionType(this); + } + isTemplateLiteralType() { + return isTemplateLiteralType(this); + } + isStringMappingType() { + return isStringMappingType(this); + } + isTypeParameter() { + return isTypeParameter(this); + } +} +export function isUnionType(type) { + return (type.flags & TypeFlags.Union) !== 0; +} +export function isIntersectionType(type) { + return (type.flags & TypeFlags.Intersection) !== 0; +} +export function isObjectType(type) { + return (type.flags & TypeFlags.Object) !== 0; +} +export function isClassOrInterfaceType(type) { + return isObjectType(type) && (type.objectFlags & ObjectFlags.ClassOrInterface) !== 0; +} +export function isIntrinsicType(type) { + return (type.flags & TypeFlags.Intrinsic) !== 0; +} +/** + * Whether this is the error type — the placeholder the checker produces when a + * type cannot be determined (e.g. an unresolved reference). It is an intrinsic + * type named `"error"` (this covers both the singleton error type and the + * per-alias error types manufactured for unresolved type alias references). + */ +export function isErrorType(type) { + return isIntrinsicType(type) && type.intrinsicName === "error"; +} +export function isLiteralType(type) { + return (type.flags & TypeFlags.Literal) !== 0; +} +export function isStringLiteralType(type) { + return (type.flags & TypeFlags.StringLiteral) !== 0; +} +export function isNumberLiteralType(type) { + return (type.flags & TypeFlags.NumberLiteral) !== 0; +} +export function isBigIntLiteralType(type) { + return (type.flags & TypeFlags.BigIntLiteral) !== 0; +} +export function isBooleanLiteralType(type) { + return (type.flags & TypeFlags.BooleanLiteral) !== 0; +} +export function isTypeReference(type) { + return isObjectType(type) && (type.objectFlags & ObjectFlags.Reference) !== 0; +} +export function isTupleType(type) { + return isObjectType(type) && (type.objectFlags & ObjectFlags.Tuple) !== 0; +} +export function isIndexType(type) { + return (type.flags & TypeFlags.Index) !== 0; +} +export function isIndexedAccessType(type) { + return (type.flags & TypeFlags.IndexedAccess) !== 0; +} +export function isConditionalType(type) { + return (type.flags & TypeFlags.Conditional) !== 0; +} +export function isSubstitutionType(type) { + return (type.flags & TypeFlags.Substitution) !== 0; +} +export function isTemplateLiteralType(type) { + return (type.flags & TypeFlags.TemplateLiteral) !== 0; +} +export function isStringMappingType(type) { + return (type.flags & TypeFlags.StringMapping) !== 0; +} +export function isTypeParameter(type) { + return (type.flags & TypeFlags.TypeParameter) !== 0; +} +export class Signature { + flags; + objectRegistry; + id; + declaration; + typeParameters; + parameters; + thisParameter; + target; + constructor(data, project, objectRegistry) { + this.id = data.id; + this.flags = data.flags; + this.objectRegistry = objectRegistry; + this.declaration = data.declaration ? new NodeHandle(data.declaration, project) : undefined; + this.typeParameters = data.typeParameters ?? []; + this.parameters = data.parameters ?? []; + this.thisParameter = data.thisParameter; + this.target = data.target; + } + getTypeParameters() { + return this.objectRegistry.fetchTypes(this, "getTypeParametersOfSignature", this.typeParameters); + } + getParameters() { + return this.objectRegistry.fetchSymbols(this, "getParametersOfSignature", this.parameters); + } + getThisParameter() { + return this.objectRegistry.fetchSymbol(this, "getThisParameterOfSignature", this.thisParameter); + } + getTarget() { + return this.objectRegistry.fetchSignature(this, "getTargetOfSignature", this.target); + } + get hasRestParameter() { + return (this.flags & SignatureFlags.HasRestParameter) !== 0; + } + get isConstruct() { + return (this.flags & SignatureFlags.Construct) !== 0; + } + get isAbstract() { + return (this.flags & SignatureFlags.Abstract) !== 0; + } +} +//# sourceMappingURL=api.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/api.js.map b/node_modules/typescript/dist/api/sync/api.js.map new file mode 100644 index 0000000..225bab1 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/api.js.map @@ -0,0 +1 @@ +{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/api/sync/api.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,oDAAoD;AACpD,oDAAoD;AACpD,oDAAoD;AACpD,EAAE;AACF,+BAA+B;AAC/B,+DAA+D;AAC/D,EAAE;AACF,wDAAwD;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAIH,aAAa,EA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AC;IACzF,CAAC;IAED,IAAI,gBAAgB;QAChB,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,WAAW;QACX,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;IAED,IAAI,UAAU;QACV,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/client.d.ts b/node_modules/typescript/dist/api/sync/client.d.ts new file mode 100644 index 0000000..2b3e08f --- /dev/null +++ b/node_modules/typescript/dist/api/sync/client.d.ts @@ -0,0 +1,30 @@ +import { type ClientOptions, type ClientSocketOptions, type ClientSpawnOptions } from "../options.ts"; +import { TimingCollector, type TimingInfo } from "../timing.ts"; +export type { ClientOptions, ClientSocketOptions, ClientSpawnOptions }; +export declare class Client { + private channel; + private encoder; + private timing; + constructor(options: ClientOptions); + apiRequest(method: string, params?: unknown): T; + apiRequestBinary(method: string, params?: unknown): Uint8Array | undefined; + echo(payload: string): string; + echoBinary(payload: Uint8Array): Uint8Array; + /** + * Returns a combined timing snapshot: client-measured round-trip and byte + * counts folded together with the server's own per-request processing time + * (fetched via a getServerTiming request) and estimated transport overhead. + */ + getTimingInfo(): TimingInfo; + resetTimingInfo(): void; + /** + * Returns the timing collector that per-node materialization is reported + * into, or undefined when timing collection is disabled. The returned + * collector is the same one folded into {@link getTimingInfo}, so + * materialization totals surface alongside request timings. + */ + getTimingCollector(): TimingCollector | undefined; + private recordTiming; + close(): void; +} +//# sourceMappingURL=client.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/client.d.ts.map b/node_modules/typescript/dist/api/sync/client.d.ts.map new file mode 100644 index 0000000..09b1252 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/client.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/api/sync/client.ts"],"names":[],"mappings":"AACA,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EAG1B,MAAM,eAAe,CAAC;AAEvB,OAAO,EAIH,eAAe,EACf,KAAK,UAAU,EAClB,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;AAEvE,qBAAa,MAAM;IACf,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,MAAM,CAA8B;gBAEhC,OAAO,EAAE,aAAa;IAmDlC,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,CAAC;IAWlD,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS;IAQ1E,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAI7B,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,UAAU;IAI3C;;;;OAIG;IACH,aAAa,IAAI,UAAU;IAW3B,eAAe,IAAI,IAAI;IAOvB;;;;;OAKG;IACH,kBAAkB,IAAI,eAAe,GAAG,SAAS;IAIjD,OAAO,CAAC,YAAY;IAUpB,KAAK,IAAI,IAAI;CAGhB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/client.js b/node_modules/typescript/dist/api/sync/client.js new file mode 100644 index 0000000..59e4145 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/client.js @@ -0,0 +1,124 @@ +import { fsCallbackNames } from "../fs.js"; +import { isSpawnOptions, resolveExePath, } from "../options.js"; +import { SyncRpcChannel } from "../syncChannel.js"; +import { combineTimingInfo, disabledTimingInfo, TimingCollector, } from "../timing.js"; +export class Client { + channel; + encoder = new TextEncoder(); + timing; + constructor(options) { + if (!isSpawnOptions(options)) { + throw new Error("Socket connections are not yet supported in the sync client"); + } + const cwd = options.cwd ?? process.cwd(); + const args = [ + "--api", + "--cwd", + cwd, + ]; + // Enable virtual FS callbacks for each provided FS function + const enabledCallbacks = []; + if (options.fs) { + for (const name of fsCallbackNames) { + if (options.fs[name]) { + enabledCallbacks.push(name); + } + } + } + if (enabledCallbacks.length > 0) { + args.push(`--callbacks=${enabledCallbacks.join(",")}`); + } + const collectTiming = options.collectTiming ?? false; + if (collectTiming) { + args.push("--timing"); + this.timing = new TimingCollector(); + } + const channel = new SyncRpcChannel(resolveExePath(options), args, collectTiming); + this.channel = channel; + if (options.fs) { + for (const name of enabledCallbacks) { + const callback = options.fs[name]; + channel.registerCallback(name, (_, arg) => { + const result = callback(JSON.parse(arg)); + if (name === "readFile") { + // readFile has 3 returns: string (content), null (not found), undefined (fall back). + // Wrap in object to preserve null vs undefined distinction. + if (result === undefined) + return ""; + return JSON.stringify({ content: result }); + } + return JSON.stringify(result) ?? ""; + }); + } + } + } + apiRequest(method, params) { + const encodedPayload = JSON.stringify(params); + const start = performance.now(); + const result = this.channel.requestSync(method, encodedPayload); + this.recordTiming(method, start); + if (result.length) { + return JSON.parse(result); + } + return undefined; + } + apiRequestBinary(method, params) { + const start = performance.now(); + const result = this.channel.requestBinarySync(method, this.encoder.encode(JSON.stringify(params))); + this.recordTiming(method, start); + if (result.length === 0) + return undefined; + return result; + } + echo(payload) { + return this.channel.requestSync("echo", payload); + } + echoBinary(payload) { + return this.channel.requestBinarySync("echo", payload); + } + /** + * Returns a combined timing snapshot: client-measured round-trip and byte + * counts folded together with the server's own per-request processing time + * (fetched via a getServerTiming request) and estimated transport overhead. + */ + getTimingInfo() { + if (!this.timing) { + return disabledTimingInfo(); + } + const local = this.timing.getInfo(); + // requestSync bypasses recordTiming, so this query does not pollute the + // client-side collector. + const result = this.channel.requestSync("getServerTiming", ""); + return combineTimingInfo(local, JSON.parse(result)); + } + resetTimingInfo() { + if (!this.timing) + return; + this.timing.reset(); + // Keep the server's collection in sync so combined totals stay meaningful. + this.channel.requestSync("resetServerTiming", ""); + } + /** + * Returns the timing collector that per-node materialization is reported + * into, or undefined when timing collection is disabled. The returned + * collector is the same one folded into {@link getTimingInfo}, so + * materialization totals surface alongside request timings. + */ + getTimingCollector() { + return this.timing; + } + recordTiming(method, start) { + if (!this.timing) + return; + this.timing.record({ + method, + roundTripMs: performance.now() - start, + bytesSent: this.channel.lastBytesSent, + bytesReceived: this.channel.lastBytesReceived, + }); + } + close() { + this.channel.close(); + } +} +//# sourceMappingURL=client.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/client.js.map b/node_modules/typescript/dist/api/sync/client.js.map new file mode 100644 index 0000000..d436c19 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/client.js.map @@ -0,0 +1 @@ +{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/api/sync/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAIH,cAAc,EACd,cAAc,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EACH,iBAAiB,EACjB,kBAAkB,EAElB,eAAe,GAElB,MAAM,cAAc,CAAC;AAItB,MAAM,OAAO,MAAM;IACP,OAAO,CAAiB;IACxB,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAC5B,MAAM,CAA8B;IAE5C,YAAY,OAAsB;QAC9B,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;QACnF,CAAC;QAED,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QACzC,MAAM,IAAI,GAAG;YACT,OAAO;YACP,OAAO;YACP,GAAG;SACN,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/node_modules/typescript/dist/api/sync/types.d.ts b/node_modules/typescript/dist/api/sync/types.d.ts new file mode 100644 index 0000000..8e4720f --- /dev/null +++ b/node_modules/typescript/dist/api/sync/types.d.ts @@ -0,0 +1,310 @@ +import type { CompletionItemKind } from "#enums/completionItemKind"; +import type { DiagnosticCategory } from "#enums/diagnosticCategory"; +import type { ElementFlags } from "#enums/elementFlags"; +import type { ObjectFlags } from "#enums/objectFlags"; +import type { TypeFlags } from "#enums/typeFlags"; +import type { TypePredicateKind } from "#enums/typePredicateKind"; +import type { NodeHandle, Symbol } from "./api.ts"; +/** + * A TypeScript type. + * + * Use TypeFlags to determine the specific kind of type and access + * kind-specific properties. For example: + * + * ```ts + * if (type.flags & TypeFlags.StringLiteral) { + * console.log((type as StringLiteralType).value); // string + * } + * ``` + */ +export interface Type { + /** Type flags — use to determine the specific kind of type. */ + readonly flags: TypeFlags; + /** Unique identifier for this type */ + readonly id: number; + /** Get the symbol associated with this type, if any */ + getSymbol(): Symbol | undefined; + /** Get the type arguments of the type alias this type was instantiated from, if any */ + getAliasTypeArguments(): readonly Type[]; + /** Get the symbol of the type alias this type was instantiated from, if any */ + getAliasSymbol(): Symbol | undefined; + /** + * Get the base types of this type, or `undefined` if it is not a class or + * interface type. + */ + getBaseTypes(): readonly Type[] | undefined; + /** Whether this type is a class or interface type */ + isClassOrInterface(): this is InterfaceType; + /** Whether this type is a union type */ + isUnionType(): this is UnionType; + /** Whether this type is an intersection type */ + isIntersectionType(): this is IntersectionType; + /** Whether this type is an object type */ + isObjectType(): this is ObjectType; + /** Whether this type is an intrinsic primitive type */ + isIntrinsicType(): this is IntrinsicType; + /** + * Whether this is the error type — the placeholder produced when a type + * cannot be determined (e.g. an unresolved reference). + */ + isErrorType(): boolean; + /** Whether this type is a literal type */ + isLiteralType(): this is LiteralType; + /** Whether this type is a string literal type */ + isStringLiteralType(): this is StringLiteralType; + /** Whether this type is a number literal type */ + isNumberLiteralType(): this is NumberLiteralType; + /** Whether this type is a bigint literal type */ + isBigIntLiteralType(): this is BigIntLiteralType; + /** Whether this type is a boolean literal type */ + isBooleanLiteralType(): this is BooleanLiteralType; + /** Whether this type is a type reference */ + isTypeReference(): this is TypeReference; + /** Whether this type is a tuple type */ + isTupleType(): this is TupleType; + /** Whether this type is an index type (`keyof T`) */ + isIndexType(): this is IndexType; + /** Whether this type is an indexed access type (`T[K]`) */ + isIndexedAccessType(): this is IndexedAccessType; + /** Whether this type is a conditional type */ + isConditionalType(): this is ConditionalType; + /** Whether this type is a substitution type */ + isSubstitutionType(): this is SubstitutionType; + /** Whether this type is a template literal type */ + isTemplateLiteralType(): this is TemplateLiteralType; + /** Whether this type is a string mapping type */ + isStringMappingType(): this is StringMappingType; + /** Whether this type is a type parameter */ + isTypeParameter(): this is TypeParameter; +} +/** + * Freshable types (TypeFlags.Freshable) - literal types (TypeFlags.Literal) and computed enum types (TypeFlags.Enum). + */ +export interface FreshableType extends Type { + /** Get the fresh version of this type, if any */ + getFreshType(): FreshableType | undefined; + /** Get the regular (non-fresh) version of this type, if any */ + getRegularType(): FreshableType | undefined; +} +/** Literal types: StringLiteral, NumberLiteral, BigIntLiteral, BooleanLiteral */ +export interface LiteralType extends FreshableType { + /** The literal value. Use TypeFlags to narrow to a specific literal subtype with a concrete value type. */ + readonly value: string | number | boolean | bigint; +} +/** String literal types (TypeFlags.StringLiteral) */ +export interface StringLiteralType extends LiteralType { + /** The string value of the literal */ + readonly value: string; +} +/** Numeric literal types (TypeFlags.NumberLiteral) */ +export interface NumberLiteralType extends LiteralType { + /** The numeric value of the literal */ + readonly value: number; +} +/** BigInt literal types (TypeFlags.BigIntLiteral) */ +export interface BigIntLiteralType extends LiteralType { + /** The bigint value of the literal */ + readonly value: bigint; +} +/** Boolean literal types (TypeFlags.BooleanLiteral) */ +export interface BooleanLiteralType extends LiteralType { + /** The boolean value of the literal */ + readonly value: boolean; +} +/** Object types (TypeFlags.Object) */ +export interface ObjectType extends Type { + /** Object flags — use to determine the specific kind of object type. */ + readonly objectFlags: ObjectFlags; +} +/** Type references (ObjectFlags.Reference) — e.g. Array, Map */ +export interface TypeReference extends ObjectType { + /** Get the generic target type (e.g. Array for Array) */ + getTarget(): Type; +} +/** Interface types — classes and interfaces (ObjectFlags.ClassOrInterface) */ +export interface InterfaceType extends TypeReference { + /** Get all type parameters (outer + local, excluding thisType) */ + getTypeParameters(): readonly TypeParameter[]; + /** Get outer type parameters from enclosing declarations */ + getOuterTypeParameters(): readonly TypeParameter[]; + /** Get local type parameters declared on this interface/class */ + getLocalTypeParameters(): readonly TypeParameter[]; +} +/** Tuple types (ObjectFlags.Tuple) */ +export interface TupleType extends InterfaceType { + /** Per-element flags (Required, Optional, Rest, Variadic) */ + readonly elementFlags: readonly ElementFlags[]; + /** Number of initial required or optional elements */ + readonly fixedLength: number; + /** Whether the tuple is readonly */ + readonly readonly: boolean; +} +/** Union or intersection types (TypeFlags.Union | TypeFlags.Intersection) */ +export interface UnionOrIntersectionType extends Type { + /** Get the constituent types */ + getTypes(): readonly Type[]; +} +/** Union types (TypeFlags.Union) */ +export interface UnionType extends UnionOrIntersectionType { +} +/** Intersection types (TypeFlags.Intersection) */ +export interface IntersectionType extends UnionOrIntersectionType { +} +/** Type parameters (TypeFlags.TypeParameter) */ +export interface TypeParameter extends Type { + /** True if this is the synthetic `this` type of an interface, class, or tuple */ + readonly isThisType?: boolean | undefined; +} +/** Index types — keyof T (TypeFlags.Index) */ +export interface IndexType extends Type { + /** Get the target type T in `keyof T` */ + getTarget(): Type; +} +/** Indexed access types — T[K] (TypeFlags.IndexedAccess) */ +export interface IndexedAccessType extends Type { + /** Get the object type T in `T[K]` */ + getObjectType(): Type; + /** Get the index type K in `T[K]` */ + getIndexType(): Type; +} +/** Conditional types — T extends U ? X : Y (TypeFlags.Conditional) */ +export interface ConditionalType extends Type { + /** Get the check type T in `T extends U ? X : Y` */ + getCheckType(): Type; + /** Get the extends type U in `T extends U ? X : Y` */ + getExtendsType(): Type; + /** Get the true type X in `T extends U ? X : Y` */ + getTrueType(): Type; + /** Get the false type Y in `T extends U ? X : Y` */ + getFalseType(): Type; +} +/** Substitution types (TypeFlags.Substitution) */ +export interface SubstitutionType extends Type { + getBaseType(): Type; + getConstraint(): Type; +} +/** Template literal types (TypeFlags.TemplateLiteral) */ +export interface TemplateLiteralType extends Type { + /** Text segments (always one more than the number of type spans) */ + readonly texts: readonly string[]; + /** Get the types interspersed between text segments */ + getTypes(): readonly Type[]; +} +/** String mapping types — Uppercase, Lowercase, etc. (TypeFlags.StringMapping) */ +export interface StringMappingType extends Type { + /** Get the mapped type */ + getTarget(): Type; +} +/** Intrinsic types — any, unknown, string, number, bigint, symbol, void, undefined, null, never, object (TypeFlags.Intrinsic) */ +export interface IntrinsicType extends Type { + /** The intrinsic type name (e.g. "any", "string", "never") */ + readonly intrinsicName: string; +} +/** Base for all type predicates */ +export interface TypePredicateBase { + readonly kind: TypePredicateKind; + readonly type: Type | undefined; +} +/** `this is T` */ +export interface ThisTypePredicate extends TypePredicateBase { + readonly kind: TypePredicateKind.This; + readonly parameterName: undefined; + readonly parameterIndex: undefined; + readonly type: Type; +} +/** `x is T` */ +export interface IdentifierTypePredicate extends TypePredicateBase { + readonly kind: TypePredicateKind.Identifier; + readonly parameterName: string; + readonly parameterIndex: number; + readonly type: Type; +} +/** `asserts this is T` */ +export interface AssertsThisTypePredicate extends TypePredicateBase { + readonly kind: TypePredicateKind.AssertsThis; + readonly parameterName: undefined; + readonly parameterIndex: undefined; + readonly type: Type | undefined; +} +/** `asserts x is T` */ +export interface AssertsIdentifierTypePredicate extends TypePredicateBase { + readonly kind: TypePredicateKind.AssertsIdentifier; + readonly parameterName: string; + readonly parameterIndex: number; + readonly type: Type | undefined; +} +/** A type predicate — e.g. `x is T` or `asserts x is T` */ +export type TypePredicate = ThisTypePredicate | IdentifierTypePredicate | AssertsThisTypePredicate | AssertsIdentifierTypePredicate; +/** An index signature — e.g. `[key: string]: T` */ +export interface IndexInfo { + /** The index key type (e.g. string or number) */ + readonly keyType: Type; + /** The index value type */ + readonly valueType: Type; + /** Whether the index signature is readonly */ + readonly isReadonly: boolean; + /** The index signature declaration, if any */ + readonly declaration?: NodeHandle | undefined; +} +/** + * A single JSDoc tag attached to a symbol — e.g. `@param`, `@returns`. + */ +export interface JSDocTagInfo { + /** The tag name, without the leading `@` — e.g. `"param"`. */ + readonly name: string; + /** The rendered tag text, if any — e.g. `"a the first number"` for `@param a the first number`. */ + readonly text?: string | undefined; +} +export interface CompletionEntryLabelDetails { + detail?: string | undefined; + description?: string | undefined; +} +/** Options for {@link Checker.getCompletionsAtPosition}. */ +export interface CompletionOptions { + triggerCharacter?: string | undefined; + /** Include a `symbol` property on each completion entry. Only populated for symbol-based completions (not keywords or literals). */ + includeSymbol?: boolean | undefined; +} +/** A single completion item returned by {@link Checker.getCompletionsAtPosition}. */ +export interface CompletionEntry { + readonly name: string; + readonly kind?: CompletionItemKind | undefined; + readonly sortText?: string | undefined; + readonly insertText?: string | undefined; + readonly filterText?: string | undefined; + readonly detail?: string | undefined; + readonly labelDetails?: CompletionEntryLabelDetails | undefined; + /** The symbol associated with this completion entry. Only set when `includeSymbol: true` is passed and a symbol is available. */ + readonly symbol?: Symbol | undefined; +} +/** The result of {@link Checker.getCompletionsAtPosition}. */ +export interface CompletionInfo { + readonly isIncomplete: boolean; + readonly entries: readonly CompletionEntry[]; +} +/** + * A diagnostic message from the TypeScript compiler. + */ +export interface Diagnostic { + /** File name of the source file this diagnostic belongs to, if any */ + readonly fileName?: string | undefined; + /** Start position of the diagnostic */ + readonly pos: number; + /** End position of the diagnostic */ + readonly end: number; + /** Diagnostic error code */ + readonly code: number; + /** Diagnostic category (error, warning, suggestion, message) */ + readonly category: DiagnosticCategory; + /** Localized diagnostic message text */ + readonly text: string; + /** Whether this diagnostic highlights unnecessary code */ + readonly reportsUnnecessary?: boolean | undefined; + /** Whether this diagnostic highlights deprecated code */ + readonly reportsDeprecated?: boolean | undefined; + /** Chained diagnostic messages */ + readonly messageChain?: readonly Diagnostic[] | undefined; + /** Related diagnostic information */ + readonly relatedInformation?: readonly Diagnostic[] | undefined; +} +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/types.d.ts.map b/node_modules/typescript/dist/api/sync/types.d.ts.map new file mode 100644 index 0000000..84d6151 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/api/sync/types.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EACR,UAAU,EACV,MAAM,EACT,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,IAAI;IACjB,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAE1B,sCAAsC;IACtC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,uDAAuD;IACvD,SAAS,IAAI,MAAM,GAAG,SAAS,CAAC;IAEhC,uFAAuF;IACvF,qBAAqB,IAAI,SAAS,IAAI,EAAE,CAAC;IAEzC,+EAA+E;IAC/E,cAAc,IAAI,MAAM,GAAG,SAAS,CAAC;IAErC;;;OAGG;IACH,YAAY,IAAI,SAAS,IAAI,EAAE,GAAG,SAAS,CAAC;IAE5C,qDAAqD;IACrD,kBAAkB,IAAI,IAAI,IAAI,aAAa,CAAC;IAC5C,wCAAwC;IACxC,WAAW,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AAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,CAAC;CACnE"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/types.js b/node_modules/typescript/dist/api/sync/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/types.js.map b/node_modules/typescript/dist/api/sync/types.js.map new file mode 100644 index 0000000..8f42c24 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/api/sync/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/syncChannel.d.ts b/node_modules/typescript/dist/api/syncChannel.d.ts new file mode 100644 index 0000000..a7eadf3 --- /dev/null +++ b/node_modules/typescript/dist/api/syncChannel.d.ts @@ -0,0 +1,114 @@ +/** + * Pure JS replacement for @typescript/libsyncrpc. + * + * Spawns a child process and communicates with it synchronously over + * stdin/stdout pipes using the same MessagePack-based tuple protocol: + * [MessageType (u8), method (bin), payload (bin)] + * + * Synchronous I/O is achieved by calling fs.readSync / fs.writeSync + * directly on the pipe file descriptors obtained from the spawned + * ChildProcess. + */ +/** + * SyncRpcChannel – drop-in replacement for the native libsyncrpc class. + * + * API surface intentionally matches the original: + * - constructor(exe, args) + * - requestSync(method, payload): string + * - requestBinarySync(method, payload): Uint8Array + * - registerCallback(name, cb) + * - close() + * + * The protocol is unversioned; both sides (this JS channel and the Go + * child process) must be built from the same tree. + * + * This class is **not** thread-safe. All calls must originate from a + * single thread — do not share an instance across worker threads. + */ +export declare class SyncRpcChannel { + private child; + private readFd; + private writeFd; + private pipeFd; + private callbacks; + private methodBufCache; + private readonly collectTiming; + lastBytesSent: number; + lastBytesReceived: number; + private _msgType; + private _msgName; + private _msgPayload; + private headerBuf; + private readBuf; + private readBufPos; + private readBufLen; + private writeBuf; + constructor(exe: string, args: string[], collectTiming?: boolean); + /** + * Send a request and synchronously wait for the response (string). + * Handles Call (callback) messages from the child inline. + */ + requestSync(method: string, payload: string): string; + /** + * Send a request and synchronously wait for the response (binary). + * Handles Call (callback) messages from the child inline. + */ + requestBinarySync(method: string, payload: Uint8Array): Uint8Array; + /** Register a string→string callback that the child may invoke. */ + registerCallback(name: string, callback: (name: string, payload: string) => string): void; + /** Kill the child process and release resources. */ + close(): void; + private ensureOpen; + private getMethodBuf; + private requestBytesSync; + /** + * Handle an incoming MSG_CALL from the child process. + * + * After sending the error response back to the child, this method + * intentionally re-throws to abort the caller's request loop. + * A failed callback is treated as unrecoverable to match the + * behavior of the native libsyncrpc addon. + */ + private handleCall; + /** + * Write a complete [type, name, payload] tuple in as few writeSync + * calls as possible. For messages that fit in the pre-allocated + * write buffer (64 KB), everything is assembled and sent in a single + * syscall. Larger messages use two syscalls: one for the header + * portion and one for the payload data. + */ + private writeTuple; + /** + * Read a [type, name, payload] tuple into instance fields + * (_msgType, _msgName, _msgPayload) to avoid allocating a + * short-lived 3-element array on every call. + */ + private readTuple; + /** + * Read a MessagePack bin field. + */ + private readBin; + /** Build an EOF error with the child's exit code/signal if available. */ + private eofError; + /** Read a single byte from the buffered read-ahead. */ + private readByte; + private readExact; + /** + * Fill the internal read-ahead buffer from the pipe fd. + * Retries on EAGAIN for non-blocking mode compatibility. + */ + private fillReadBuffer; + /** + * Synchronously read exactly `length` bytes into `buffer`. + * Serves from the internal read-ahead buffer first; for large reads + * that exceed the buffer size, reads directly from the fd to avoid + * an extra copy. + */ + private readExactInto; + /** + * Synchronously write all bytes from `data` (up to `length`). + * Retries on EAGAIN. + */ + private writeAllBuf; +} +//# sourceMappingURL=syncChannel.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/syncChannel.d.ts.map b/node_modules/typescript/dist/api/syncChannel.d.ts.map new file mode 100644 index 0000000..57d212a --- /dev/null +++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AAgB;IA8CxB;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU;IAiClB;;;;;;OAMG;IACH,OAAO,CAAC,UAAU;IA0DlB;;;;OAIG;IACH,OAAO,CAAC,SAAS;IA2BjB;;OAEG;IACH,OAAO,CAAC,OAAO;IA0Bf,yEAAyE;IACzE,OAAO,CAAC,QAAQ;IAOhB,uDAAuD;IACvD,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,SAAS;IAiBjB;;;OAGG;IACH,OAAO,CAAC,cAAc;IAsBtB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAoCrB;;;OAGG;IACH,OAAO,CAAC,WAAW;CAiBtB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/syncChannel.js b/node_modules/typescript/dist/api/syncChannel.js new file mode 100644 index 0000000..7b9cf99 --- /dev/null +++ b/node_modules/typescript/dist/api/syncChannel.js @@ -0,0 +1,508 @@ +/** + * Pure JS replacement for @typescript/libsyncrpc. + * + * Spawns a child process and communicates with it synchronously over + * stdin/stdout pipes using the same MessagePack-based tuple protocol: + * [MessageType (u8), method (bin), payload (bin)] + * + * Synchronous I/O is achieved by calling fs.readSync / fs.writeSync + * directly on the pipe file descriptors obtained from the spawned + * ChildProcess. + */ +import { spawn, } from "node:child_process"; +import { closeSync, openSync, readSync, writeSync, } from "node:fs"; +import { binHeaderSize, MSGPACK_BIN16, MSGPACK_BIN32, MSGPACK_BIN8, MSGPACK_FIXARRAY3, MSGPACK_UINT8, writeBinHeader, } from "./node/msgpack.js"; +// ── MessageType constants ──────────────────────────────────────────── +// Sent by channel (parent → child) +const MSG_REQUEST = 1; +const MSG_CALL_RESPONSE = 2; +const MSG_CALL_ERROR = 3; +// Sent by child (child → parent) +const MSG_RESPONSE = 4; +const MSG_ERROR = 5; +const MSG_CALL = 6; +// Pre-allocated buffer used by Atomics.wait for tiny sleeps when a +// non-blocking fd returns EAGAIN. +const sleepBuf = new Int32Array(new SharedArrayBuffer(4)); +// Shared empty buffer – avoids allocating Buffer.alloc(0) on every +// zero-length bin field. +const EMPTY_BUF = Buffer.alloc(0); +// ── Global cleanup tracking ───────────────────────────────────────── +// Track all live child processes so they can be killed on process exit. +// This mimics the auto-cleanup behavior of the native libsyncrpc module, +// whose Rust/C++ destructors would kill children automatically. +const liveChildren = new Set(); +process.on("exit", () => { + for (const child of liveChildren) { + try { + child.kill(); + } + catch { + // swallow – process may already be dead + } + } + liveChildren.clear(); +}); +/** + * SyncRpcChannel – drop-in replacement for the native libsyncrpc class. + * + * API surface intentionally matches the original: + * - constructor(exe, args) + * - requestSync(method, payload): string + * - requestBinarySync(method, payload): Uint8Array + * - registerCallback(name, cb) + * - close() + * + * The protocol is unversioned; both sides (this JS channel and the Go + * child process) must be built from the same tree. + * + * This class is **not** thread-safe. All calls must originate from a + * single thread — do not share an instance across worker threads. + */ +export class SyncRpcChannel { + child; + readFd; + writeFd; + pipeFd; + callbacks = new Map(); + methodBufCache = new Map(); + // When true, the payload byte lengths of each request/response are recorded + // and exposed via the `last*` fields below. These count only the JSON/binary + // payload bytes, not the MessagePack tuple framing (message type, method + // name, and length headers). + collectTiming; + // Per-request payload byte measurements for the most recently completed + // request. Only meaningful when `collectTiming` is true. Callers read these + // immediately after a request returns (the channel is strictly serial). + lastBytesSent = 0; + lastBytesReceived = 0; + _msgType = 0; + _msgName = EMPTY_BUF; + _msgPayload = EMPTY_BUF; + headerBuf = Buffer.allocUnsafe(4); + // Read-ahead buffer – reduces readSync syscalls by buffering data from the pipe. + readBuf = Buffer.allocUnsafe(65536); + readBufPos = 0; + readBufLen = 0; + // Write buffer – assembles entire tuples for a single writeSync. + writeBuf = Buffer.allocUnsafe(65536); + constructor(exe, args, collectTiming = false) { + this.collectTiming = collectTiming; + const isWindows = process.platform === "win32"; + if (isWindows) { + // On Windows, libuv pipe handles don't expose POSIX fds, so + // readSync/writeSync can't be used on stdio pipes. Instead, + // we create a Windows named pipe path, pass it to the child + // via --pipe, and open it with fs.openSync which returns a + // real C-runtime fd backed by a proper HANDLE. + const pipePath = `\\\\.\\pipe\\tsgo-sync-${process.pid}-${Date.now()}`; + this.child = spawn(exe, [...args, "--pipe", pipePath], { + stdio: ["ignore", "ignore", "inherit"], + }); + // Retry openSync until the child creates the named pipe. + let fd; + for (let i = 0; i < 500; i++) { + try { + fd = openSync(pipePath, "r+"); + break; + } + catch { + if (this.child.exitCode !== null) { + throw new Error(`Child process exited with code ${this.child.exitCode} before pipe was ready`); + } + Atomics.wait(sleepBuf, 0, 0, 10); + } + } + if (fd === undefined) { + this.child.kill(); + throw new Error("SyncRpcChannel: timed out connecting to named pipe"); + } + this.readFd = fd; + this.writeFd = fd; + this.pipeFd = fd; + } + else { + // POSIX: use stdio pipe file descriptors directly. + this.child = spawn(exe, args, { + stdio: ["pipe", "pipe", "inherit"], + }); + const stdout = this.child.stdout; + const stdin = this.child.stdin; + this.readFd = stdout._handle.fd; + this.writeFd = stdin._handle.fd; + if (typeof this.readFd !== "number" || this.readFd < 0 || typeof this.writeFd !== "number" || this.writeFd < 0) { + stdout.destroy(); + stdin.destroy(); + this.child.kill(); + throw new Error("SyncRpcChannel: could not obtain pipe file descriptors."); + } + // Set the pipe handles to blocking mode. Under node --test's + // process isolation, pipes are created in non-blocking mode + // (for the IPC channel). This causes readSync/writeSync to get + // EAGAIN, requiring costly 1ms sleeps per retry. Setting + // blocking mode ensures readSync blocks properly until data + // arrives, matching the behavior of the native libsyncrpc. + stdout._handle.setBlocking?.(true); + stdin._handle.setBlocking?.(true); + // Prevent Node's event-loop from reading stdout or keeping the + // process alive – we will use fs.readSync exclusively. + stdout.pause(); + stdout.unref(); + stdin.unref(); + } + // Track for auto-cleanup on process exit. + liveChildren.add(this.child); + this.child.unref(); + } + // ── Public API ────────────────────────────────────────────────── + /** + * Send a request and synchronously wait for the response (string). + * Handles Call (callback) messages from the child inline. + */ + requestSync(method, payload) { + this.ensureOpen(); + const result = this.requestBytesSync(method, payload); + return result.toString("utf-8"); + } + /** + * Send a request and synchronously wait for the response (binary). + * Handles Call (callback) messages from the child inline. + */ + requestBinarySync(method, payload) { + this.ensureOpen(); + return this.requestBytesSync(method, payload); + } + /** Register a string→string callback that the child may invoke. */ + registerCallback(name, callback) { + this.callbacks.set(name, callback); + } + /** Kill the child process and release resources. */ + close() { + try { + liveChildren.delete(this.child); + if (this.pipeFd !== undefined) { + closeSync(this.pipeFd); + this.pipeFd = undefined; + } + // Destroy the stdio streams so that their pipe handles are closed + // and no longer prevent the event loop from draining. + this.child.stdout?.destroy(); + this.child.stdin?.destroy(); + this.child.kill(); + this.readFd = -1; + this.writeFd = -1; + } + catch { + // swallow – process may already be dead + } + } + // ── Core request loop ─────────────────────────────────────────── + ensureOpen() { + if (this.readFd < 0) { + throw new Error("SyncRpcChannel is closed"); + } + } + getMethodBuf(method) { + let buf = this.methodBufCache.get(method); + if (buf === undefined) { + buf = Buffer.from(method, "utf-8"); + this.methodBufCache.set(method, buf); + } + return buf; + } + requestBytesSync(method, payload) { + const methodBuf = this.getMethodBuf(method); + if (this.collectTiming) { + this.lastBytesSent = typeof payload === "string" + ? Buffer.byteLength(payload, "utf-8") + : payload.length; + this.lastBytesReceived = 0; + } + this.writeTuple(MSG_REQUEST, methodBuf, payload); + for (;;) { + this.readTuple(); + switch (this._msgType) { + case MSG_RESPONSE: { + // Compare raw bytes instead of decoding to string. + if (!methodBuf.equals(this._msgName)) { + throw new Error(`name mismatch for response: expected \`${method}\`, got \`${this._msgName.toString("utf-8")}\``); + } + if (this.collectTiming) { + this.lastBytesReceived = this._msgPayload.length; + } + return this._msgPayload; + } + case MSG_ERROR: { + if (methodBuf.equals(this._msgName)) { + throw new Error(this._msgPayload.toString("utf-8")); + } + throw new Error(`name mismatch for response: expected \`${method}\`, got \`${this._msgName.toString("utf-8")}\``); + } + case MSG_CALL: { + this.handleCall(this._msgName.toString("utf-8"), this._msgPayload); + break; + } + default: + throw new Error(`Invalid message type from child: ${this._msgType}`); + } + } + } + // ── Callback handling ─────────────────────────────────────────── + /** + * Handle an incoming MSG_CALL from the child process. + * + * After sending the error response back to the child, this method + * intentionally re-throws to abort the caller's request loop. + * A failed callback is treated as unrecoverable to match the + * behavior of the native libsyncrpc addon. + */ + handleCall(name, payload) { + const cb = this.callbacks.get(name); + if (!cb) { + const errMsg = `unknown callback: \`${name}\`. Please make sure to register it on the JavaScript side before invoking it.`; + this.writeTuple(MSG_CALL_ERROR, Buffer.from(name, "utf-8"), Buffer.from(errMsg, "utf-8")); + throw new Error(`no callback named \`${name}\` found`); + } + try { + const result = cb(name, payload.toString("utf-8")); + this.writeTuple(MSG_CALL_RESPONSE, Buffer.from(name, "utf-8"), Buffer.from(result, "utf-8")); + } + catch (e) { + const errMsg = String(e instanceof Error ? e.message : e).trim(); + this.writeTuple(MSG_CALL_ERROR, Buffer.from(name, "utf-8"), Buffer.from(errMsg, "utf-8")); + throw new Error(`Error calling callback \`${name}\`: ${errMsg}`); + } + } + // ── MessagePack tuple write ───────────────────────────────────── + /** + * Write a complete [type, name, payload] tuple in as few writeSync + * calls as possible. For messages that fit in the pre-allocated + * write buffer (64 KB), everything is assembled and sent in a single + * syscall. Larger messages use two syscalls: one for the header + * portion and one for the payload data. + */ + writeTuple(type, name, payload) { + const nameLen = name.length; + const payloadIsString = typeof payload === "string"; + const payloadLen = payloadIsString ? Buffer.byteLength(payload, "utf-8") : payload.length; + const nameHdrSize = binHeaderSize(nameLen); + const payloadHdrSize = binHeaderSize(payloadLen); + const headerSize = 2 + nameHdrSize + nameLen + payloadHdrSize; + const totalSize = headerSize + payloadLen; + if (totalSize <= this.writeBuf.length) { + // Small message: assemble into write buffer, one syscall + let off = 0; + this.writeBuf[off++] = MSGPACK_FIXARRAY3; + this.writeBuf[off++] = type; + off = writeBinHeader(this.writeBuf, off, nameLen); + name.copy(this.writeBuf, off); + off += nameLen; + off = writeBinHeader(this.writeBuf, off, payloadLen); + if (payloadLen > 0) { + if (payloadIsString) { + // Encode string directly into write buffer — avoids + // Buffer.from(string, 'utf-8') allocation entirely. + this.writeBuf.write(payload, off, payloadLen, "utf-8"); + } + else if (payload instanceof Buffer) { + payload.copy(this.writeBuf, off); + } + else { + this.writeBuf.set(payload, off); + } + } + this.writeAllBuf(this.writeBuf, totalSize); + } + else { + // Large message: header + name in one call, payload in another + let off = 0; + this.writeBuf[off++] = MSGPACK_FIXARRAY3; + this.writeBuf[off++] = type; + off = writeBinHeader(this.writeBuf, off, nameLen); + name.copy(this.writeBuf, off); + off += nameLen; + off = writeBinHeader(this.writeBuf, off, payloadLen); + this.writeAllBuf(this.writeBuf, off); + if (payloadLen > 0) { + if (payloadIsString) { + // Large string: must allocate (can't stream-encode + // across multiple writeSync calls). + this.writeAllBuf(Buffer.from(payload, "utf-8")); + } + else { + this.writeAllBuf(payload); + } + } + } + } + // ── MessagePack tuple read ────────────────────────────────────── + /** + * Read a [type, name, payload] tuple into instance fields + * (_msgType, _msgName, _msgPayload) to avoid allocating a + * short-lived 3-element array on every call. + */ + readTuple() { + // Fixed 3-element array marker + const marker = this.readByte(); + if (marker !== MSGPACK_FIXARRAY3) { + throw new Error(`Expected fixed 3-element array (0x93), received: 0x${marker.toString(16)}`); + } + // Message type – positive fixint or uint8 + const tb = this.readByte(); + if (tb <= 0x7f) { + this._msgType = tb; + } + else if (tb === MSGPACK_UINT8) { + this._msgType = this.readByte(); + } + else { + throw new Error(`Expected positive fixint or uint8 marker, received: 0x${tb.toString(16)}`); + } + this._msgName = this.readBin(); + this._msgPayload = this.readBin(); + } + /** + * Read a MessagePack bin field. + */ + readBin() { + const marker = this.readByte(); + let size; + switch (marker) { + case MSGPACK_BIN8: + size = this.readByte(); + break; + case MSGPACK_BIN16: + this.readExactInto(this.headerBuf, 2); + size = (this.headerBuf[0] << 8) | this.headerBuf[1]; + break; + case MSGPACK_BIN32: + this.readExactInto(this.headerBuf, 4); + size = this.headerBuf.readUInt32BE(0); + break; + default: + throw new Error(`Expected binary data (0xc4-0xc6), received: 0x${marker.toString(16)}`); + } + if (size === 0) + return EMPTY_BUF; + return this.readExact(size); + } + // ── Low-level synchronous I/O ─────────────────────────────────── + /** Build an EOF error with the child's exit code/signal if available. */ + eofError() { + const code = this.child.exitCode; + const signal = this.child.signalCode; + const detail = signal ? `killed by signal ${signal}` : code !== null ? `exited with code ${code}` : "unknown reason"; + return new Error(`Unexpected EOF while reading from child process (${detail})`); + } + /** Read a single byte from the buffered read-ahead. */ + readByte() { + if (this.readBufPos >= this.readBufLen) { + this.fillReadBuffer(); + } + return this.readBuf[this.readBufPos++]; + } + readExact(length) { + // Use allocUnsafeSlow (not allocUnsafe) so the buffer has its own + // backing ArrayBuffer at byteOffset 0. This is critical because + // callers such as RemoteSourceFile create DataView/Uint8Array over + // buffer.buffer with absolute offsets. Buffer.allocUnsafe returns + // slices of a shared pool whose byteOffset is non-zero, corrupting + // those downstream views. + // + // allocUnsafeSlow (vs alloc) skips zero-fill, which matters for + // large transfers — e.g. checker.ts at ~57 MB saves ~5 ms of + // unnecessary memset. The buffer is immediately filled by + // readExactInto so uninitialized memory is never exposed. + const buf = Buffer.allocUnsafeSlow(length); + this.readExactInto(buf, length); + return buf; + } + /** + * Fill the internal read-ahead buffer from the pipe fd. + * Retries on EAGAIN for non-blocking mode compatibility. + */ + fillReadBuffer() { + this.readBufPos = 0; + this.readBufLen = 0; + for (;;) { + try { + const n = readSync(this.readFd, this.readBuf, 0, this.readBuf.length, null); + if (n === 0) { + throw this.eofError(); + } + this.readBufLen = n; + return; + } + catch (e) { + if (e instanceof Error && ("code" in e) && (e.code === "EAGAIN" || e.code === "EWOULDBLOCK")) { + Atomics.wait(sleepBuf, 0, 0, 1); + continue; + } + throw e; + } + } + } + /** + * Synchronously read exactly `length` bytes into `buffer`. + * Serves from the internal read-ahead buffer first; for large reads + * that exceed the buffer size, reads directly from the fd to avoid + * an extra copy. + */ + readExactInto(buffer, length) { + let pos = 0; + while (pos < length) { + const avail = this.readBufLen - this.readBufPos; + if (avail > 0) { + // Serve from read-ahead buffer + const toCopy = Math.min(avail, length - pos); + this.readBuf.copy(buffer, pos, this.readBufPos, this.readBufPos + toCopy); + this.readBufPos += toCopy; + pos += toCopy; + } + else if (length - pos >= this.readBuf.length) { + // Remaining data is larger than read buffer; read directly + // into the target to avoid unnecessary copying. + try { + const n = readSync(this.readFd, buffer, pos, length - pos, null); + if (n === 0) { + throw this.eofError(); + } + pos += n; + } + catch (e) { + if (e instanceof Error && ("code" in e) && (e.code === "EAGAIN" || e.code === "EWOULDBLOCK")) { + Atomics.wait(sleepBuf, 0, 0, 1); + continue; + } + throw e; + } + } + else { + // Refill the read-ahead buffer + this.fillReadBuffer(); + } + } + } + /** + * Synchronously write all bytes from `data` (up to `length`). + * Retries on EAGAIN. + */ + writeAllBuf(data, length) { + const total = length ?? data.length; + let pos = 0; + while (pos < total) { + try { + const n = writeSync(this.writeFd, data, pos, total - pos); + pos += n; + } + catch (e) { + if (e instanceof Error && ("code" in e) && (e.code === "EAGAIN" || e.code === "EWOULDBLOCK")) { + Atomics.wait(sleepBuf, 0, 0, 1); + continue; + } + throw e; + } + } + } +} +//# sourceMappingURL=syncChannel.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/syncChannel.js.map b/node_modules/typescript/dist/api/syncChannel.js.map new file mode 100644 index 0000000..fd7e975 --- /dev/null +++ b/node_modules/typescript/dist/api/syncChannel.js.map @@ -0,0 +1 @@ +{"version":3,"file":"syncChannel.js","sourceRoot":"","sources":["../../src/api/syncChannel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAEH,KAAK,GACR,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,SAAS,GACZ,MAAM,SAAS,CAAC;AAqBjB,OAAO,EACH,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,cAAc,GACjB,MAAM,mBAAmB,CAAC;AAE3B,wEAAwE;AACxE,mCAAmC;AACnC,MAAM,WAAW,GAAG,CAAC,CAAC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ACL,CAAC;iBACI,CAAC;gBACF,+BAA+B;gBAC/B,IAAI,CAAC,cAAc,EAAE,CAAC;YAC1B,CAAC;QACL,CAAC;IACL,CAAC;IAED;;;OAGG;IACK,WAAW,CAAC,IAAyB,EAAE,MAAe;QAC1D,MAAM,KAAK,GAAG,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC;QACpC,IAAI,GAAG,GAAG,CAAC,CAAC;QACZ,OAAO,GAAG,GAAG,KAAK,EAAE,CAAC;YACjB,IAAI,CAAC;gBACD,MAAM,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,CAAC,CAAC;gBAC1D,GAAG,IAAI,CAAC,CAAC;YACb,CAAC;YACD,OAAO,CAAU,EAAE,CAAC;gBAChB,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,CAAE,CAA2B,CAAC,IAAI,KAAK,QAAQ,IAAK,CAA2B,CAAC,IAAI,KAAK,aAAa,CAAC,EAAE,CAAC;oBACjJ,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;oBAChC,SAAS;gBACb,CAAC;gBACD,MAAM,CAAC,CAAC;YACZ,CAAC;QACL,CAAC;IACL,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/timing.d.ts b/node_modules/typescript/dist/api/timing.d.ts new file mode 100644 index 0000000..941529b --- /dev/null +++ b/node_modules/typescript/dist/api/timing.d.ts @@ -0,0 +1,175 @@ +/** + * Client-side collection of per-request timing and transfer measurements. + * + * When enabled, each request records its round-trip latency and the number of + * payload bytes sent and received, accumulated into running totals and a + * fixed-size ring buffer of the most recent requests. + * + * The server measures its own per-request processing time independently. When a + * timing snapshot is requested, the client fetches the server's collection via + * a `getServerTiming` request and folds it into the returned {@link TimingInfo}, + * yielding per-request and total server processing time and an estimated + * transport overhead (round-trip minus server processing time). Normal response + * messages are left unchanged. + */ +/** Number of most-recent requests retained in the ring buffer. */ +export declare const RECENT_REQUEST_CAPACITY = 5; +/** A single request's measured timing and transfer sample. */ +export interface RequestTiming { + /** The API method that was invoked. */ + method: string; + /** Wall-clock round-trip time measured by the client, in milliseconds. */ + roundTripMs: number; + /** Number of request payload bytes sent to the server. */ + bytesSent: number; + /** Number of response payload bytes received from the server. */ + bytesReceived: number; + /** Wall-clock timestamp ({@link Date.now}) captured when the request completed. */ + timestamp: number; + /** + * Server-side processing time for this request, in milliseconds, as folded + * in from the server's own timing collection. Undefined when server timing + * for the request could not be matched. + */ + serverTimeMs?: number; + /** + * Estimated transport overhead for this request, in milliseconds + * (`roundTripMs - serverTimeMs`, clamped to be non-negative). Present + * exactly when {@link serverTimeMs} is. + */ + transportOverheadMs?: number; +} +/** Running totals accumulated across every measured request. */ +export interface TimingAccumulators { + /** Number of requests measured. */ + requestCount: number; + /** Sum of round-trip latencies, in milliseconds. */ + roundTripMs: number; + /** Sum of request payload bytes sent. */ + bytesSent: number; + /** Sum of response payload bytes received. */ + bytesReceived: number; + /** Sum of server-side processing time, in milliseconds. */ + serverTimeMs: number; + /** + * Estimated total transport overhead, in milliseconds + * (`roundTripMs - serverTimeMs`, clamped to be non-negative). + */ + transportOverheadMs: number; + /** + * Number of AST nodes materialized from binary source-file responses as the + * client walked the returned trees. Materialization is lazy and happens on + * demand, so this accrues after the originating request completes. + */ + nodesMaterialized: number; + /** + * Number of source files fetched from the server (each decoded into a + * lazily-materialized tree). + */ + sourceFilesFetched: number; + /** + * Number of AST nodes across all fetched source files that can be + * materialized on demand. Each fetched file contributes its full node count + * (excluding the pre-materialized source-file node), whether or not those + * nodes are ever walked. Serves as the denominator for the share of fetched + * nodes that end up materialized (`nodesMaterialized / nodesFetched`). + */ + nodesFetched: number; +} +/** A point-in-time snapshot of collected timing information. */ +export interface TimingInfo { + /** Whether timing collection is enabled for this API instance. */ + enabled: boolean; + /** Running totals across every measured request. */ + totals: TimingAccumulators; + /** + * The most recent requests, up to {@link RECENT_REQUEST_CAPACITY}, ordered + * from oldest to newest. + */ + recentRequests: RequestTiming[]; +} +/** A raw measurement handed to {@link TimingCollector.record}. */ +export interface TimingSample { + method: string; + roundTripMs: number; + bytesSent: number; + bytesReceived: number; +} +/** + * A single server-side request's processing-time sample, as returned by a + * `getServerTiming` request. This is an internal wire shape; consumers see the + * folded-in {@link RequestTiming.serverTimeMs}. + */ +export interface ServerRequestTiming { + /** The API method that was handled. */ + method: string; + /** Server-side processing time, in milliseconds. */ + processingTimeMs: number; + /** Unix timestamp in milliseconds captured when the request completed. */ + timestamp: number; +} +/** Running totals accumulated on the server across every handled request. */ +export interface ServerTimingTotals { + /** Total number of requests handled. */ + requestCount: number; + /** Sum of server-side processing time, in milliseconds. */ + totalProcessingTimeMs: number; +} +/** + * A snapshot of the server's own timing collection, retrieved via a + * `getServerTiming` request. This is an internal wire shape used to compute the + * server-derived fields of {@link TimingInfo}. + */ +export interface ServerTimingInfo { + /** Whether server-side timing collection is enabled. */ + enabled: boolean; + /** Running totals across every request the server handled. */ + totals: ServerTimingTotals; + /** + * The most recent requests as seen by the server, ordered from oldest to + * newest. + */ + recentRequests: ServerRequestTiming[]; +} +/** Returns a snapshot representing a disabled (never-collecting) timing state. */ +export declare function disabledTimingInfo(): TimingInfo; +/** Returns a snapshot representing disabled server-side timing collection. */ +export declare function disabledServerTimingInfo(): ServerTimingInfo; +/** + * Folds a server-side timing snapshot into a client-side snapshot, producing a + * combined {@link TimingInfo} with per-request and total server processing time + * plus estimated transport overhead. + * + * Recent requests are paired newest-to-newest and only matched when the method + * names agree, so that requests recorded by only one side (e.g. the meta + * requests used to fetch timing) do not misalign the two ring buffers. + */ +export declare function combineTimingInfo(client: TimingInfo, server: ServerTimingInfo): TimingInfo; +/** + * Accumulates request timing samples into running totals and a fixed-size ring + * buffer of the most recent requests. + */ +export declare class TimingCollector { + private totals; + private ring; + private head; + /** Records a single request's measurements. */ + record(sample: TimingSample): void; + /** + * Records a single AST node materialization. Called on demand as the consumer + * walks a binary source-file response's tree, so it is not tied to any one + * request. + */ + recordMaterialization(): void; + /** + * Records a fetched source file: increments the fetched-file counter and adds + * the file's materializable node count to the fetched-node total, which serves + * as the denominator for the share of fetched nodes that end up materialized. + */ + recordSourceFileFetched(materializableNodeCount: number): void; + /** Returns a snapshot of the collected timing information. */ + getInfo(): TimingInfo; + /** Clears all accumulated totals and recent-request history. */ + reset(): void; +} +//# sourceMappingURL=timing.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/timing.d.ts.map b/node_modules/typescript/dist/api/timing.d.ts.map new file mode 100644 index 0000000..43c00b2 --- /dev/null +++ b/node_modules/typescript/dist/api/timing.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"timing.d.ts","sourceRoot":"","sources":["../../src/api/timing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,kEAAkE;AAClE,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,8DAA8D;AAC9D,MAAM,WAAW,aAAa;IAC1B,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,WAAW,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,aAAa,EAAE,MAAM,CAAC;IACtB,mFAAmF;IACnF,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,gEAAgE;AAChE,MAAM,WAAW,kBAAkB;IAC/B,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB,2DAA2D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BAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,GAAG,UAAU,CA6B1F;AAED;;;GAGG;AACH,qBAAa,eAAe;IACxB,OAAO,CAAC,MAAM,CAA2C;IAGzD,OAAO,CAAC,IAAI,CAAuB;IACnC,OAAO,CAAC,IAAI,CAAK;IAEjB,+CAA+C;IAC/C,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAuBlC;;;;OAIG;IACH,qBAAqB,IAAI,IAAI;IAI7B;;;;OAIG;IACH,uBAAuB,CAAC,uBAAuB,EAAE,MAAM,GAAG,IAAI;IAK9D,8DAA8D;IAC9D,OAAO,IAAI,UAAU;IAYrB,gEAAgE;IAChE,KAAK,IAAI,IAAI;CAKhB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/timing.js b/node_modules/typescript/dist/api/timing.js new file mode 100644 index 0000000..cd758a4 --- /dev/null +++ b/node_modules/typescript/dist/api/timing.js @@ -0,0 +1,149 @@ +/** + * Client-side collection of per-request timing and transfer measurements. + * + * When enabled, each request records its round-trip latency and the number of + * payload bytes sent and received, accumulated into running totals and a + * fixed-size ring buffer of the most recent requests. + * + * The server measures its own per-request processing time independently. When a + * timing snapshot is requested, the client fetches the server's collection via + * a `getServerTiming` request and folds it into the returned {@link TimingInfo}, + * yielding per-request and total server processing time and an estimated + * transport overhead (round-trip minus server processing time). Normal response + * messages are left unchanged. + */ +/** Number of most-recent requests retained in the ring buffer. */ +export const RECENT_REQUEST_CAPACITY = 5; +function emptyAccumulators() { + return { + requestCount: 0, + roundTripMs: 0, + bytesSent: 0, + bytesReceived: 0, + serverTimeMs: 0, + transportOverheadMs: 0, + nodesMaterialized: 0, + sourceFilesFetched: 0, + nodesFetched: 0, + }; +} +/** Returns a snapshot representing a disabled (never-collecting) timing state. */ +export function disabledTimingInfo() { + return { + enabled: false, + totals: emptyAccumulators(), + recentRequests: [], + }; +} +/** Returns a snapshot representing disabled server-side timing collection. */ +export function disabledServerTimingInfo() { + return { + enabled: false, + totals: { requestCount: 0, totalProcessingTimeMs: 0 }, + recentRequests: [], + }; +} +/** + * Folds a server-side timing snapshot into a client-side snapshot, producing a + * combined {@link TimingInfo} with per-request and total server processing time + * plus estimated transport overhead. + * + * Recent requests are paired newest-to-newest and only matched when the method + * names agree, so that requests recorded by only one side (e.g. the meta + * requests used to fetch timing) do not misalign the two ring buffers. + */ +export function combineTimingInfo(client, server) { + if (!client.enabled) { + return client; + } + const serverTimeMs = server.totals.totalProcessingTimeMs; + const totals = { + ...client.totals, + serverTimeMs, + transportOverheadMs: Math.max(0, client.totals.roundTripMs - serverTimeMs), + }; + const recentRequests = client.recentRequests.map(r => ({ ...r })); + const serverRecent = server.recentRequests; + const pairs = Math.min(recentRequests.length, serverRecent.length); + for (let i = 1; i <= pairs; i++) { + const c = recentRequests[recentRequests.length - i]; + const s = serverRecent[serverRecent.length - i]; + if (c.method === s.method) { + c.serverTimeMs = s.processingTimeMs; + c.transportOverheadMs = Math.max(0, c.roundTripMs - s.processingTimeMs); + } + } + return { + enabled: true, + totals, + recentRequests, + }; +} +/** + * Accumulates request timing samples into running totals and a fixed-size ring + * buffer of the most recent requests. + */ +export class TimingCollector { + totals = emptyAccumulators(); + // Ring buffer of the most recent requests. `ring` grows to at most + // RECENT_REQUEST_CAPACITY; once full, `head` marks the oldest entry. + ring = []; + head = 0; + /** Records a single request's measurements. */ + record(sample) { + this.totals.requestCount++; + this.totals.roundTripMs += sample.roundTripMs; + this.totals.bytesSent += sample.bytesSent; + this.totals.bytesReceived += sample.bytesReceived; + const entry = { + method: sample.method, + roundTripMs: sample.roundTripMs, + bytesSent: sample.bytesSent, + bytesReceived: sample.bytesReceived, + timestamp: Date.now(), + }; + if (this.ring.length < RECENT_REQUEST_CAPACITY) { + this.ring.push(entry); + } + else { + this.ring[this.head] = entry; + this.head = (this.head + 1) % RECENT_REQUEST_CAPACITY; + } + } + /** + * Records a single AST node materialization. Called on demand as the consumer + * walks a binary source-file response's tree, so it is not tied to any one + * request. + */ + recordMaterialization() { + this.totals.nodesMaterialized++; + } + /** + * Records a fetched source file: increments the fetched-file counter and adds + * the file's materializable node count to the fetched-node total, which serves + * as the denominator for the share of fetched nodes that end up materialized. + */ + recordSourceFileFetched(materializableNodeCount) { + this.totals.sourceFilesFetched++; + this.totals.nodesFetched += materializableNodeCount; + } + /** Returns a snapshot of the collected timing information. */ + getInfo() { + const recentRequests = []; + for (let i = 0; i < this.ring.length; i++) { + recentRequests.push(this.ring[(this.head + i) % this.ring.length]); + } + return { + enabled: true, + totals: { ...this.totals }, + recentRequests, + }; + } + /** Clears all accumulated totals and recent-request history. */ + reset() { + this.totals = emptyAccumulators(); + this.ring = []; + this.head = 0; + } +} +//# sourceMappingURL=timing.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/timing.js.map b/node_modules/typescript/dist/api/timing.js.map new file mode 100644 index 0000000..4039cf0 --- /dev/null +++ b/node_modules/typescript/dist/api/timing.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timing.js","sourceRoot":"","sources":["../../src/api/timing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,kEAAkE;AAClE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AA8HzC,SAAS,iBAAiB;IACtB,OAAO;QACH,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,CAAC;QACd,SAAS,EAAE,CAAC;QACZ,aAAa,EAAE,CAAC;QAChB,YAAY,EAAE,CAAC;QACf,mBAAmB,EAAE,CAAC;QACtB,iBAAiB,EAAE,CAAC;QACpB,kBAAkB,EAAE,CAAC;QACrB,YAAY,EAAE,CAAC;KAClB,CAAC;AACN,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,kBAAkB;IAC9B,OAAO;QACH,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,iBAAiB,EAAE;QAC3B,cAAc,EAAE,EAAE;KACrB,CAAC;AACN,CAAC;AAED,8EAA8E;AAC9E,MAA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QAC1D,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,qBAAqB;QACjB,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;IACpC,CAAC;IAED;;;;OAIG;IACH,uBAAuB,CAAC,uBAA+B;QACnD,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC;QACjC,IAAI,CAAC,MAAM,CAAC,YAAY,IAAI,uBAAuB,CAAC;IACxD,CAAC;IAED,8DAA8D;IAC9D,OAAO;QACH,MAAM,cAAc,GAAoB,EAAE,CAAC;QAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QACvE,CAAC;QACD,OAAO;YACH,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE;YAC1B,cAAc;SACjB,CAAC;IACN,CAAC;IAED,gEAAgE;IAChE,KAAK;QACD,IAAI,CAAC,MAAM,GAAG,iBAAiB,EAAE,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IAClB,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/ast.d.ts b/node_modules/typescript/dist/ast/ast.d.ts new file mode 100644 index 0000000..be41667 --- /dev/null +++ b/node_modules/typescript/dist/ast/ast.d.ts @@ -0,0 +1,100 @@ +import type { InternalSymbolName } from "#enums/internalSymbolName"; +import type { LanguageVariant } from "#enums/languageVariant"; +import type { NodeFlags } from "#enums/nodeFlags"; +import type { ScriptKind } from "#enums/scriptKind"; +import { SyntaxKind } from "#enums/syntaxKind"; +import type { EndOfFile, EntityName, Identifier, KeywordSyntaxKind, ModifierSyntaxKind, PropertyAccessExpression, PunctuationSyntaxKind, Statement, ThisExpression, Token } from "./ast.generated.ts"; +export { SyntaxKind } from "#enums/syntaxKind"; +export { TokenFlags } from "#enums/tokenFlags"; +export * from "./ast.generated.ts"; +export type Path = string & { + __pathBrand: any; +}; +/** + * The escaped form of a symbol/identifier name. Internal compiler names are + * prefixed with `__` (e.g. `__type`, `__call`), and user names that already + * begin with `__` carry an extra leading underscore. Use + * {@link unescapeLeadingUnderscores} to recover the display name and + * {@link escapeLeadingUnderscores} to produce a key from a display name. + */ +export type __String = (string & { + __escapedIdentifier: void; +}) | InternalSymbolName; +export interface TextRange { + pos: number; + end: number; +} +export interface ReadonlyTextRange { + readonly pos: number; + readonly end: number; +} +export interface NodeArray extends ReadonlyArray, ReadonlyTextRange { + hasTrailingComma?: boolean; + transformFlags: number; +} +export interface Node extends ReadonlyTextRange { + readonly kind: SyntaxKind; + readonly flags: NodeFlags; + readonly parent: Node; + readonly jsDoc?: readonly Node[] | undefined; + forEachChild(visitor: (node: Node) => T, visitArray?: (nodes: NodeArray) => T): T | undefined; + getSourceFile(): SourceFile; + getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number; + getFullStart(): number; + getEnd(): number; + getWidth(sourceFile?: SourceFile): number; + getFullWidth(): number; + getLeadingTriviaWidth(sourceFile?: SourceFile): number; + getFullText(sourceFile?: SourceFile): string; + getText(sourceFile?: SourceFile): string; +} +export interface FileReference extends TextRange { + readonly fileName: string; + readonly resolutionMode: number; + readonly preserve: boolean; +} +export interface LineAndCharacter { + /** 0-based line number. */ + readonly line: number; + /** 0-based character offset, in UTF-16 code units, from the start of the line. */ + readonly character: number; +} +export interface SourceFile extends Node { + readonly kind: SyntaxKind.SourceFile; + readonly statements: NodeArray; + readonly endOfFileToken: EndOfFile; + readonly text: string; + readonly fileName: string; + readonly path: Path; + readonly languageVariant: LanguageVariant; + readonly scriptKind: ScriptKind; + readonly isDeclarationFile: boolean; + readonly referencedFiles: readonly FileReference[]; + readonly typeReferenceDirectives: readonly FileReference[]; + readonly libReferenceDirectives: readonly FileReference[]; + readonly imports: readonly Node[]; + readonly moduleAugmentations: readonly Node[]; + readonly ambientModuleNames: readonly string[]; + readonly externalModuleIndicator: Node | true | undefined; + /** Returns the UTF-16 code unit offset of the start of each line. */ + getLineStarts(): readonly number[]; + /** Converts a UTF-16 code unit position into a 0-based line and character. */ + getLineAndCharacterOfPosition(position: number): LineAndCharacter; + /** Converts a 0-based line and character into a UTF-16 code unit position. */ + getPositionOfLineAndCharacter(line: number, character: number): number; + /** @internal */ + tokenCache?: Map; +} +export type PunctuationToken = Token; +export type KeywordToken = Token; +export type ModifierToken = KeywordToken; +export interface PropertyAccessEntityNameExpression extends PropertyAccessExpression { + readonly expression: EntityNameExpression; + readonly name: Identifier; +} +export type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression; +export type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression; +export interface JsxTagNamePropertyAccess extends PropertyAccessExpression { + readonly expression: Identifier | ThisExpression | JsxTagNamePropertyAccess; +} +//# sourceMappingURL=ast.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/ast.d.ts.map b/node_modules/typescript/dist/ast/ast.d.ts.map new file mode 100644 index 0000000..33fc88a --- /dev/null +++ b/node_modules/typescript/dist/ast/ast.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/ast/ast.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OA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E,UAAU,CAAC;CAC7B;AAED,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,kCAAkC,CAAC;AACnF,MAAM,MAAM,gCAAgC,GAAG,UAAU,GAAG,oBAAoB,CAAC;AAEjF,MAAM,WAAW,wBAAyB,SAAQ,wBAAwB;IACtE,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,cAAc,GAAG,wBAAwB,CAAC;CAC/E"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/ast.generated.d.ts b/node_modules/typescript/dist/ast/ast.generated.d.ts new file mode 100644 index 0000000..1a33d40 --- /dev/null +++ b/node_modules/typescript/dist/ast/ast.generated.d.ts @@ -0,0 +1,1161 @@ +import type { ModifierFlags } from "#enums/modifierFlags"; +import type { NodeFlags } from "#enums/nodeFlags"; +import { SyntaxKind } from "#enums/syntaxKind"; +import { TokenFlags } from "#enums/tokenFlags"; +import type { JsxTagNamePropertyAccess, Node, NodeArray } from "./ast.ts"; +export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ConflictMarkerTrivia; +export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; +export type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail; +export type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.CaretEqualsToken; +export type KeywordSyntaxKind = SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.LetKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.StaticKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.GetKeyword | SyntaxKind.ImmediateKeyword | SyntaxKind.InferKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.OutKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.TypeKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.UsingKeyword | SyntaxKind.FromKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.OfKeyword | SyntaxKind.DeferKeyword; +export type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.InKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword; +export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword; +export type KeywordExpressionSyntaxKind = SyntaxKind.NullKeyword | SyntaxKind.TrueKeyword | SyntaxKind.FalseKeyword | SyntaxKind.ThisKeyword | SyntaxKind.SuperKeyword | SyntaxKind.ImportKeyword; +export type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFile | SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.NonTextFileMarkerTrivia | SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral | SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.Identifier | SyntaxKind.PrivateIdentifier | SyntaxKind.JSDocCommentTextToken | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.LetKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.StaticKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.GetKeyword | SyntaxKind.ImmediateKeyword | SyntaxKind.InferKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.OutKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.TypeKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.UsingKeyword | SyntaxKind.FromKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.OfKeyword | SyntaxKind.DeferKeyword; +export type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFile | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken; +export type JSDocNodeSyntaxKind = SyntaxKind.JSDocTypeExpression | SyntaxKind.JSDocNameReference | SyntaxKind.JSDocAllType | SyntaxKind.JSDocNullableType | SyntaxKind.JSDocNonNullableType | SyntaxKind.JSDocOptionalType | SyntaxKind.JSDocVariadicType | SyntaxKind.JSDoc | SyntaxKind.JSDocText | SyntaxKind.JSDocTypeLiteral | SyntaxKind.JSDocSignature | SyntaxKind.JSDocLink | SyntaxKind.JSDocLinkCode | SyntaxKind.JSDocLinkPlain | SyntaxKind.JSDocUnknownTag | SyntaxKind.JSDocAugmentsTag | SyntaxKind.JSDocImplementsTag | SyntaxKind.JSDocDeprecatedTag | SyntaxKind.JSDocPublicTag | SyntaxKind.JSDocPrivateTag | SyntaxKind.JSDocProtectedTag | SyntaxKind.JSDocReadonlyTag | SyntaxKind.JSDocOverrideTag | SyntaxKind.JSDocCallbackTag | SyntaxKind.JSDocOverloadTag | SyntaxKind.JSDocParameterTag | SyntaxKind.JSDocReturnTag | SyntaxKind.JSDocThisTag | SyntaxKind.JSDocTypeTag | SyntaxKind.JSDocTemplateTag | SyntaxKind.JSDocTypedefTag | SyntaxKind.JSDocSeeTag | SyntaxKind.JSDocPropertyTag | SyntaxKind.JSDocThrowsTag | SyntaxKind.JSDocSatisfiesTag | SyntaxKind.JSDocImportTag; +export type ImportPhaseModifierSyntaxKind = SyntaxKind.TypeKeyword | SyntaxKind.DeferKeyword; +export type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken; +export type PrefixUnaryOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken; +export type AssignmentOperator = SyntaxKind.EqualsToken | CompoundAssignmentOperator; +export type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken; +export type ExponentiationOperator = SyntaxKind.AsteriskAsteriskToken; +export type MultiplicativeOperator = SyntaxKind.AsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken; +export type MultiplicativeOperatorOrHigher = ExponentiationOperator | MultiplicativeOperator; +export type AdditiveOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken; +export type AdditiveOperatorOrHigher = MultiplicativeOperatorOrHigher | AdditiveOperator; +export type ShiftOperator = SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken; +export type ShiftOperatorOrHigher = AdditiveOperatorOrHigher | ShiftOperator; +export type RelationalOperator = SyntaxKind.LessThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.InstanceOfKeyword | SyntaxKind.InKeyword; +export type RelationalOperatorOrHigher = ShiftOperatorOrHigher | RelationalOperator; +export type EqualityOperator = SyntaxKind.EqualsEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.ExclamationEqualsToken; +export type EqualityOperatorOrHigher = RelationalOperatorOrHigher | EqualityOperator; +export type BitwiseOperator = SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken; +export type BitwiseOperatorOrHigher = EqualityOperatorOrHigher | BitwiseOperator; +export type LogicalOperator = SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken; +export type LogicalOperatorOrHigher = BitwiseOperatorOrHigher | LogicalOperator; +export type CompoundAssignmentOperator = SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken; +export type AssignmentOperatorOrHigher = SyntaxKind.QuestionQuestionToken | LogicalOperatorOrHigher | AssignmentOperator; +export type LogicalOrCoalescingAssignmentOperator = SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionEqualsToken; +export interface NodeBase extends Node { + readonly flags: NodeFlags; +} +export interface StatementBase extends NodeBase { + readonly _statementBrand: any; +} +export interface IterationStatementBase extends StatementBase { + readonly statement: Statement; +} +export interface ExpressionBase extends NodeBase { + readonly _expressionBrand: any; +} +export interface UnaryExpressionBase extends ExpressionBase { + readonly _unaryExpressionBrand: any; +} +export interface UpdateExpressionBase extends UnaryExpressionBase { + readonly _updateExpressionBrand: any; +} +export interface LeftHandSideExpressionBase extends UpdateExpressionBase { + readonly _leftHandSideExpressionBrand: any; +} +export interface MemberExpressionBase extends LeftHandSideExpressionBase { + readonly _memberExpressionBrand: any; +} +export interface PrimaryExpressionBase extends MemberExpressionBase { + readonly _primaryExpressionBrand: any; +} +export interface TypeNodeBase extends NodeBase { + readonly _typeNodeBrand: any; +} +export interface NodeWithTypeArgumentsBase extends TypeNodeBase { + readonly typeArguments?: NodeArray; +} +export interface JSDocTypeBase extends TypeNodeBase { + readonly _jsDocTypeBrand: any; +} +export interface DeclarationBase extends Node { + readonly _declarationBrand: any; +} +export interface ModifiersBase extends Node { + readonly modifiers?: NodeArray; + readonly modifierFlags: ModifierFlags; +} +export interface FunctionLikeBase extends DeclarationBase { + readonly typeParameters?: NodeArray; + readonly parameters: NodeArray; + readonly type?: TypeNode; + readonly fullSignature?: TypeNode; +} +export interface BodyBase extends Node { + readonly asteriskToken?: AsteriskToken; + readonly body?: NodeBody; +} +export interface FunctionLikeWithBodyBase extends FunctionLikeBase, BodyBase { + readonly _functionLikeDeclarationBrand: any; + readonly body?: BlockOrExpression; +} +export interface ClassLikeBase extends DeclarationBase, ModifiersBase { + readonly name?: Identifier; + readonly typeParameters?: NodeArray; + readonly heritageClauses?: NodeArray; + readonly members: NodeArray; +} +export interface LiteralLikeNodeBase extends Node { + readonly text: string; + readonly tokenFlags: TokenFlags; +} +export interface LiteralExpressionBase extends LiteralLikeNodeBase, PrimaryExpressionBase { + readonly _literalExpressionBrand: any; +} +export interface TemplateLiteralLikeNodeBase extends LiteralLikeNodeBase { + readonly rawText: string; + readonly templateFlags: TokenFlags; +} +export interface TypeElementBase extends Node { + readonly _typeElementBrand: any; +} +export interface ClassElementBase extends Node { + readonly _classElementBrand: any; +} +export interface NamedMemberBase extends DeclarationBase, ModifiersBase { + readonly name: PropertyName; + readonly postfixToken?: QuestionToken | ExclamationToken; +} +export interface ObjectLiteralElementBase extends Node { + readonly _objectLiteralBrand: any; +} +export interface UnionOrIntersectionTypeNodeBase extends TypeNodeBase { + readonly types: NodeArray; +} +export interface JSDocTagBase extends NodeBase { + readonly tagName: Identifier; + readonly comment?: NodeArray; +} +export interface JSDocCommentBase extends NodeBase { + readonly text: string; +} +export interface Token extends NodeBase { + readonly kind: TKind; +} +export interface Identifier extends PrimaryExpressionBase { + readonly kind: SyntaxKind.Identifier; + readonly text: string; +} +export interface PrivateIdentifier extends PrimaryExpressionBase { + readonly kind: SyntaxKind.PrivateIdentifier; + readonly text: string; +} +export interface QualifiedName extends NodeBase { + readonly kind: SyntaxKind.QualifiedName; + readonly left: EntityName; + readonly right: Identifier; +} +export interface ComputedPropertyName extends NodeBase { + readonly kind: SyntaxKind.ComputedPropertyName; + readonly expression: Expression; +} +export interface Decorator extends NodeBase { + readonly kind: SyntaxKind.Decorator; + readonly expression: LeftHandSideExpression; +} +export interface EmptyStatement extends StatementBase { + readonly kind: SyntaxKind.EmptyStatement; +} +export interface IfStatement extends StatementBase { + readonly kind: SyntaxKind.IfStatement; + readonly expression: Expression; + readonly thenStatement: Statement; + readonly elseStatement?: Statement; +} +export interface DoStatement extends IterationStatementBase { + readonly kind: SyntaxKind.DoStatement; + readonly expression: Expression; +} +export interface WhileStatement extends IterationStatementBase { + readonly kind: SyntaxKind.WhileStatement; + readonly expression: Expression; +} +export interface ForStatement extends IterationStatementBase { + readonly kind: SyntaxKind.ForStatement; + readonly initializer?: ForInitializer; + readonly condition?: Expression; + readonly incrementor?: Expression; +} +export interface BreakStatement extends StatementBase { + readonly kind: SyntaxKind.BreakStatement; + readonly label?: Identifier; +} +export interface ContinueStatement extends StatementBase { + readonly kind: SyntaxKind.ContinueStatement; + readonly label?: Identifier; +} +export interface ReturnStatement extends StatementBase { + readonly kind: SyntaxKind.ReturnStatement; + readonly expression?: Expression; +} +export interface WithStatement extends StatementBase { + readonly kind: SyntaxKind.WithStatement; + readonly expression: Expression; + readonly statement: Statement; +} +export interface SwitchStatement extends StatementBase { + readonly kind: SyntaxKind.SwitchStatement; + readonly expression: Expression; + readonly caseBlock: CaseBlock; +} +export interface CaseBlock extends NodeBase { + readonly kind: SyntaxKind.CaseBlock; + readonly clauses: NodeArray; +} +export interface ThrowStatement extends StatementBase { + readonly kind: SyntaxKind.ThrowStatement; + readonly expression: Expression; +} +export interface TryStatement extends StatementBase { + readonly kind: SyntaxKind.TryStatement; + readonly tryBlock: Block; + readonly catchClause?: CatchClause; + readonly finallyBlock?: Block; +} +export interface CatchClause extends NodeBase { + readonly kind: SyntaxKind.CatchClause; + readonly variableDeclaration?: VariableDeclaration; + readonly block: Block; +} +export interface DebuggerStatement extends StatementBase { + readonly kind: SyntaxKind.DebuggerStatement; +} +export interface LabeledStatement extends StatementBase { + readonly kind: SyntaxKind.LabeledStatement; + readonly label: Identifier; + readonly statement: Statement; +} +export interface ExpressionStatement extends StatementBase { + readonly kind: SyntaxKind.ExpressionStatement; + readonly expression: Expression; +} +export interface Block extends StatementBase { + readonly kind: SyntaxKind.Block; + readonly statements: NodeArray; + readonly multiLine: boolean; +} +export interface VariableStatement extends StatementBase, ModifiersBase { + readonly kind: SyntaxKind.VariableStatement; + readonly declarationList: VariableDeclarationList; +} +export interface VariableDeclaration extends NodeBase, DeclarationBase { + readonly kind: SyntaxKind.VariableDeclaration; + readonly name: BindingName; + readonly exclamationToken?: ExclamationToken; + readonly type?: TypeNode; + readonly initializer?: Expression; +} +export interface VariableDeclarationList extends NodeBase { + readonly kind: SyntaxKind.VariableDeclarationList; + readonly declarations: NodeArray; +} +export interface ParameterDeclaration extends NodeBase, DeclarationBase, ModifiersBase { + readonly kind: SyntaxKind.Parameter; + readonly dotDotDotToken?: DotDotDotToken; + readonly name: BindingName; + readonly questionToken?: QuestionToken; + readonly type?: TypeNode; + readonly initializer?: Expression; +} +export interface BindingElement extends NodeBase, DeclarationBase { + readonly kind: SyntaxKind.BindingElement; + readonly dotDotDotToken?: DotDotDotToken; + readonly propertyName?: PropertyName; + readonly name?: BindingName; + readonly initializer?: Expression; +} +export interface MissingDeclaration extends StatementBase, DeclarationBase, ModifiersBase { + readonly kind: SyntaxKind.MissingDeclaration; +} +export interface FunctionDeclaration extends DeclarationBase, StatementBase, ModifiersBase, FunctionLikeWithBodyBase { + readonly kind: SyntaxKind.FunctionDeclaration; + readonly name?: Identifier; + readonly body?: FunctionBody; +} +export interface ClassDeclaration extends DeclarationBase, StatementBase, ClassLikeBase { + readonly kind: SyntaxKind.ClassDeclaration; +} +export interface ClassExpression extends PrimaryExpressionBase, ClassLikeBase { + readonly kind: SyntaxKind.ClassExpression; +} +export interface HeritageClause extends NodeBase { + readonly kind: SyntaxKind.HeritageClause; + readonly token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword; + readonly types: NodeArray; +} +export interface InterfaceDeclaration extends DeclarationBase, StatementBase, ModifiersBase { + readonly kind: SyntaxKind.InterfaceDeclaration; + readonly name: Identifier; + readonly typeParameters?: NodeArray; + readonly heritageClauses?: NodeArray; + readonly members: NodeArray; +} +export interface TypeAliasDeclaration extends DeclarationBase, StatementBase, ModifiersBase { + readonly kind: SyntaxKind.TypeAliasDeclaration; + readonly name: Identifier; + readonly typeParameters?: NodeArray; + readonly type: TypeNode; +} +export interface EnumMember extends NodeBase, NamedMemberBase { + readonly kind: SyntaxKind.EnumMember; + readonly initializer?: Expression; +} +export interface EnumDeclaration extends DeclarationBase, StatementBase, ModifiersBase { + readonly kind: SyntaxKind.EnumDeclaration; + readonly name: Identifier; + readonly members: NodeArray; +} +export interface ModuleBlock extends StatementBase { + readonly kind: SyntaxKind.ModuleBlock; + readonly statements: NodeArray; +} +export interface NotEmittedStatement extends StatementBase { + readonly kind: SyntaxKind.NotEmittedStatement; +} +export interface NotEmittedTypeElement extends NodeBase, TypeElementBase { + readonly kind: SyntaxKind.NotEmittedTypeElement; +} +export interface ImportDeclaration extends StatementBase, ModifiersBase, DeclarationBase { + readonly kind: SyntaxKind.ImportDeclaration; + readonly importClause?: ImportClause; + readonly moduleSpecifier: Expression; + readonly attributes?: ImportAttributes; +} +export interface ExternalModuleReference extends NodeBase { + readonly kind: SyntaxKind.ExternalModuleReference; + readonly expression: Expression; +} +export interface NamespaceImport extends NodeBase, DeclarationBase { + readonly kind: SyntaxKind.NamespaceImport; + readonly name: Identifier; +} +export interface NamedImports extends NodeBase { + readonly kind: SyntaxKind.NamedImports; + readonly elements: NodeArray; +} +export interface ExportAssignment extends DeclarationBase, StatementBase, ModifiersBase { + readonly kind: SyntaxKind.ExportAssignment; + readonly isExportEquals: boolean; + readonly type: TypeNode; + readonly expression: Expression; +} +export interface NamespaceExportDeclaration extends DeclarationBase, StatementBase, ModifiersBase { + readonly kind: SyntaxKind.NamespaceExportDeclaration; + readonly name: Identifier; +} +export interface NamespaceExport extends NodeBase, DeclarationBase { + readonly kind: SyntaxKind.NamespaceExport; + readonly name: ModuleExportName; +} +export interface NamedExports extends NodeBase { + readonly kind: SyntaxKind.NamedExports; + readonly elements: NodeArray; +} +export interface ExportSpecifier extends NodeBase, DeclarationBase { + readonly kind: SyntaxKind.ExportSpecifier; + readonly isTypeOnly: boolean; + readonly propertyName?: ModuleExportName; + readonly name: ModuleExportName; +} +export interface CallSignatureDeclaration extends NodeBase, DeclarationBase, FunctionLikeBase, TypeElementBase { + readonly kind: SyntaxKind.CallSignature; +} +export interface ConstructSignatureDeclaration extends NodeBase, DeclarationBase, FunctionLikeBase, TypeElementBase { + readonly kind: SyntaxKind.ConstructSignature; +} +export interface ConstructorDeclaration extends NodeBase, DeclarationBase, ModifiersBase, FunctionLikeWithBodyBase, ClassElementBase { + readonly kind: SyntaxKind.Constructor; + readonly body?: FunctionBody; +} +export interface GetAccessorDeclaration extends NamedMemberBase, FunctionLikeWithBodyBase, TypeElementBase, ClassElementBase, ObjectLiteralElementBase, NodeBase { + readonly kind: SyntaxKind.GetAccessor; + readonly body?: FunctionBody; +} +export interface SetAccessorDeclaration extends NamedMemberBase, FunctionLikeWithBodyBase, TypeElementBase, ClassElementBase, ObjectLiteralElementBase, NodeBase { + readonly kind: SyntaxKind.SetAccessor; + readonly body?: FunctionBody; +} +export interface IndexSignatureDeclaration extends NodeBase, DeclarationBase, ModifiersBase, FunctionLikeBase, TypeElementBase, ClassElementBase { + readonly kind: SyntaxKind.IndexSignature; + readonly type: TypeNode; +} +export interface MethodSignatureDeclaration extends NodeBase, NamedMemberBase, FunctionLikeBase, TypeElementBase { + readonly kind: SyntaxKind.MethodSignature; +} +export interface MethodDeclaration extends NodeBase, NamedMemberBase, FunctionLikeWithBodyBase, ClassElementBase, ObjectLiteralElementBase { + readonly kind: SyntaxKind.MethodDeclaration; + readonly body?: FunctionBody; +} +export interface PropertySignatureDeclaration extends NodeBase, NamedMemberBase, TypeElementBase { + readonly kind: SyntaxKind.PropertySignature; + readonly type: TypeNode; + readonly initializer: Expression; +} +export interface PropertyDeclaration extends NodeBase, NamedMemberBase, ClassElementBase { + readonly kind: SyntaxKind.PropertyDeclaration; + readonly type?: TypeNode; + readonly initializer?: Expression; +} +export interface SemicolonClassElement extends NodeBase, DeclarationBase, ClassElementBase { + readonly kind: SyntaxKind.SemicolonClassElement; +} +export interface ClassStaticBlockDeclaration extends NodeBase, DeclarationBase, ModifiersBase, ClassElementBase { + readonly kind: SyntaxKind.ClassStaticBlockDeclaration; + readonly body: Block; +} +export interface OmittedExpression extends ExpressionBase { + readonly kind: SyntaxKind.OmittedExpression; +} +export interface KeywordExpression extends ExpressionBase { + readonly kind: TKind; +} +export interface StringLiteral extends LiteralExpressionBase { + readonly kind: SyntaxKind.StringLiteral; +} +export interface NumericLiteral extends LiteralExpressionBase { + readonly kind: SyntaxKind.NumericLiteral; +} +export interface BigIntLiteral extends LiteralExpressionBase { + readonly kind: SyntaxKind.BigIntLiteral; +} +export interface RegularExpressionLiteral extends LiteralExpressionBase { + readonly kind: SyntaxKind.RegularExpressionLiteral; +} +export interface NoSubstitutionTemplateLiteral extends ExpressionBase, TemplateLiteralLikeNodeBase, DeclarationBase { + readonly kind: SyntaxKind.NoSubstitutionTemplateLiteral; +} +export interface BinaryExpression extends ExpressionBase, DeclarationBase, ModifiersBase { + readonly kind: SyntaxKind.BinaryExpression; + readonly left: Expression; + readonly type?: TypeNode; + readonly operatorToken: BinaryOperatorToken; + readonly right: Expression; +} +export interface PrefixUnaryExpression extends UpdateExpressionBase { + readonly kind: SyntaxKind.PrefixUnaryExpression; + readonly operator: SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken; + readonly operand: Expression; +} +export interface PostfixUnaryExpression extends UpdateExpressionBase { + readonly kind: SyntaxKind.PostfixUnaryExpression; + readonly operand: Expression; + readonly operator: SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken; +} +export interface YieldExpression extends ExpressionBase { + readonly kind: SyntaxKind.YieldExpression; + readonly asteriskToken?: AsteriskToken; + readonly expression?: Expression; +} +export interface ArrowFunction extends ExpressionBase, DeclarationBase, ModifiersBase, FunctionLikeWithBodyBase { + readonly kind: SyntaxKind.ArrowFunction; + readonly equalsGreaterThanToken: EqualsGreaterThanToken; + readonly body: ConciseBody; +} +export interface FunctionExpression extends PrimaryExpressionBase, DeclarationBase, ModifiersBase, FunctionLikeWithBodyBase { + readonly kind: SyntaxKind.FunctionExpression; + readonly name?: Identifier; + readonly body: FunctionBody; +} +export interface AsExpression extends ExpressionBase { + readonly kind: SyntaxKind.AsExpression; + readonly expression: Expression; + readonly type: TypeNode; +} +export interface SatisfiesExpression extends ExpressionBase { + readonly kind: SyntaxKind.SatisfiesExpression; + readonly expression: Expression; + readonly type: TypeNode; +} +export interface ConditionalExpression extends ExpressionBase { + readonly kind: SyntaxKind.ConditionalExpression; + readonly condition: Expression; + readonly questionToken: QuestionToken; + readonly whenTrue: Expression; + readonly colonToken: ColonToken; + readonly whenFalse: Expression; +} +export interface PropertyAccessExpression extends MemberExpressionBase { + readonly kind: SyntaxKind.PropertyAccessExpression; + readonly expression: Expression; + readonly questionDotToken?: QuestionDotToken; + readonly name: MemberName; +} +export interface ElementAccessExpression extends MemberExpressionBase { + readonly kind: SyntaxKind.ElementAccessExpression; + readonly expression: Expression; + readonly questionDotToken?: QuestionDotToken; + readonly argumentExpression: Expression; +} +export interface CallExpression extends LeftHandSideExpressionBase, DeclarationBase { + readonly kind: SyntaxKind.CallExpression; + readonly expression: Expression; + readonly questionDotToken?: QuestionDotToken; + readonly typeArguments?: NodeArray; + readonly arguments: NodeArray; +} +export interface NewExpression extends PrimaryExpressionBase { + readonly kind: SyntaxKind.NewExpression; + readonly expression: Expression; + readonly typeArguments?: NodeArray; + readonly arguments?: NodeArray; +} +export interface MetaProperty extends PrimaryExpressionBase { + readonly kind: SyntaxKind.MetaProperty; + readonly keywordToken: SyntaxKind.ImportKeyword | SyntaxKind.NewKeyword; + readonly name: Identifier; +} +export interface NonNullExpression extends LeftHandSideExpressionBase { + readonly kind: SyntaxKind.NonNullExpression; + readonly expression: Expression; +} +export interface SpreadElement extends ExpressionBase { + readonly kind: SyntaxKind.SpreadElement; + readonly expression: Expression; +} +export interface TemplateExpression extends PrimaryExpressionBase { + readonly kind: SyntaxKind.TemplateExpression; + readonly head: TemplateHead; + readonly templateSpans: NodeArray; +} +export interface TemplateSpan extends NodeBase { + readonly kind: SyntaxKind.TemplateSpan; + readonly expression: Expression; + readonly literal: TemplateMiddleOrTail; +} +export interface TaggedTemplateExpression extends MemberExpressionBase { + readonly kind: SyntaxKind.TaggedTemplateExpression; + readonly tag: Expression; + readonly questionDotToken: QuestionDotToken; + readonly typeArguments?: NodeArray; + readonly template: TemplateLiteral; +} +export interface ParenthesizedExpression extends PrimaryExpressionBase { + readonly kind: SyntaxKind.ParenthesizedExpression; + readonly expression: Expression; +} +export interface ArrayLiteralExpression extends PrimaryExpressionBase { + readonly kind: SyntaxKind.ArrayLiteralExpression; + readonly elements: NodeArray; + readonly multiLine: boolean; +} +export interface ObjectLiteralExpression extends PrimaryExpressionBase, DeclarationBase { + readonly kind: SyntaxKind.ObjectLiteralExpression; + readonly properties: NodeArray; + readonly multiLine: boolean; +} +export interface SpreadAssignment extends NodeBase, DeclarationBase, ObjectLiteralElementBase { + readonly kind: SyntaxKind.SpreadAssignment; + readonly expression: Expression; +} +export interface PropertyAssignment extends NodeBase, NamedMemberBase, ObjectLiteralElementBase { + readonly kind: SyntaxKind.PropertyAssignment; + readonly type: TypeNode; + readonly initializer: Expression; +} +export interface ShorthandPropertyAssignment extends NodeBase, NamedMemberBase, ObjectLiteralElementBase { + readonly kind: SyntaxKind.ShorthandPropertyAssignment; + readonly type: TypeNode; + readonly equalsToken?: EqualsToken; + readonly objectAssignmentInitializer?: Expression; +} +export interface DeleteExpression extends UnaryExpressionBase { + readonly kind: SyntaxKind.DeleteExpression; + readonly expression: Expression; +} +export interface TypeOfExpression extends UnaryExpressionBase { + readonly kind: SyntaxKind.TypeOfExpression; + readonly expression: Expression; +} +export interface VoidExpression extends UnaryExpressionBase { + readonly kind: SyntaxKind.VoidExpression; + readonly expression: Expression; +} +export interface AwaitExpression extends UnaryExpressionBase { + readonly kind: SyntaxKind.AwaitExpression; + readonly expression: Expression; +} +export interface TypeAssertion extends UnaryExpressionBase { + readonly kind: SyntaxKind.TypeAssertionExpression; + readonly type: TypeNode; + readonly expression: Expression; +} +export interface KeywordTypeNode extends TypeNodeBase { + readonly kind: TKind; +} +export interface UnionTypeNode extends TypeNodeBase, UnionOrIntersectionTypeNodeBase { + readonly kind: SyntaxKind.UnionType; +} +export interface IntersectionTypeNode extends TypeNodeBase, UnionOrIntersectionTypeNodeBase { + readonly kind: SyntaxKind.IntersectionType; +} +export interface ConditionalTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.ConditionalType; + readonly checkType: TypeNode; + readonly extendsType: TypeNode; + readonly trueType: TypeNode; + readonly falseType: TypeNode; +} +export interface TypeOperatorNode extends TypeNodeBase { + readonly kind: SyntaxKind.TypeOperator; + readonly operator: SyntaxKind.KeyOfKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.UniqueKeyword; + readonly type: TypeNode; +} +export interface InferTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.InferType; + readonly typeParameter: TypeParameterDeclaration; +} +export interface ArrayTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.ArrayType; + readonly elementType: TypeNode; +} +export interface IndexedAccessTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.IndexedAccessType; + readonly objectType: TypeNode; + readonly indexType: TypeNode; +} +export interface TypeReferenceNode extends NodeWithTypeArgumentsBase { + readonly kind: SyntaxKind.TypeReference; + readonly typeName: EntityName; +} +export interface ExpressionWithTypeArguments extends MemberExpressionBase { + readonly kind: SyntaxKind.ExpressionWithTypeArguments; + readonly expression: Expression; + readonly typeArguments?: NodeArray; +} +export interface LiteralTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.LiteralType; + readonly literal: Node; +} +export interface ThisTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.ThisType; +} +export interface TypePredicateNode extends TypeNodeBase { + readonly kind: SyntaxKind.TypePredicate; + readonly assertsModifier?: AssertsKeyword; + readonly parameterName: TypePredicateParameterName; + readonly type?: TypeNode; +} +export interface ImportAttribute extends NodeBase { + readonly kind: SyntaxKind.ImportAttribute; + readonly name: ImportAttributeName; + readonly value: Expression; +} +export interface ImportAttributes extends NodeBase { + readonly kind: SyntaxKind.ImportAttributes; + readonly token: SyntaxKind.WithKeyword | SyntaxKind.AssertKeyword; + readonly attributes: NodeArray; + readonly multiLine: boolean; +} +export interface TypeQueryNode extends NodeWithTypeArgumentsBase { + readonly kind: SyntaxKind.TypeQuery; + readonly exprName: EntityName; +} +export interface MappedTypeNode extends TypeNodeBase, DeclarationBase { + readonly kind: SyntaxKind.MappedType; + readonly readonlyToken?: ReadonlyKeyword | PlusToken | MinusToken; + readonly typeParameter: TypeParameterDeclaration; + readonly nameType?: TypeNode; + readonly questionToken?: QuestionToken | PlusToken | MinusToken; + readonly type?: TypeNode; + readonly members?: NodeArray; +} +export interface TypeLiteralNode extends TypeNodeBase, DeclarationBase { + readonly kind: SyntaxKind.TypeLiteral; + readonly members: NodeArray; +} +export interface TupleTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.TupleType; + readonly elements: NodeArray; +} +export interface NamedTupleMember extends TypeNodeBase, DeclarationBase { + readonly kind: SyntaxKind.NamedTupleMember; + readonly dotDotDotToken?: DotDotDotToken; + readonly name: Identifier; + readonly questionToken?: QuestionToken; + readonly type: TypeNode; +} +export interface OptionalTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.OptionalType; + readonly type: TypeNode; +} +export interface RestTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.RestType; + readonly type: TypeNode; +} +export interface ParenthesizedTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.ParenthesizedType; + readonly type: TypeNode; +} +export interface FunctionTypeNode extends TypeNodeBase, ModifiersBase, FunctionLikeBase { + readonly kind: SyntaxKind.FunctionType; +} +export interface ConstructorTypeNode extends TypeNodeBase, ModifiersBase, FunctionLikeBase { + readonly kind: SyntaxKind.ConstructorType; +} +export interface TemplateHead extends NodeBase, TemplateLiteralLikeNodeBase { + readonly kind: SyntaxKind.TemplateHead; +} +export interface TemplateMiddle extends NodeBase, TemplateLiteralLikeNodeBase { + readonly kind: SyntaxKind.TemplateMiddle; +} +export interface TemplateTail extends NodeBase, TemplateLiteralLikeNodeBase { + readonly kind: SyntaxKind.TemplateTail; +} +export interface TemplateLiteralTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.TemplateLiteralType; + readonly head: TemplateHead; + readonly templateSpans: NodeArray; +} +export interface TemplateLiteralTypeSpan extends TypeNodeBase { + readonly kind: SyntaxKind.TemplateLiteralTypeSpan; + readonly type: TypeNode; + readonly literal: TemplateMiddleOrTail; +} +export interface SyntheticExpression extends ExpressionBase { + readonly kind: SyntaxKind.SyntheticExpression; + readonly type: any; + readonly isSpread: boolean; + readonly tupleNameSource?: Node; +} +export interface PartiallyEmittedExpression extends LeftHandSideExpressionBase { + readonly kind: SyntaxKind.PartiallyEmittedExpression; + readonly expression: Expression; +} +export interface JsxElement extends PrimaryExpressionBase { + readonly kind: SyntaxKind.JsxElement; + readonly openingElement: JsxOpeningElement; + readonly children: NodeArray; + readonly closingElement: JsxClosingElement; +} +export interface JsxAttributes extends PrimaryExpressionBase, DeclarationBase { + readonly kind: SyntaxKind.JsxAttributes; + readonly properties: NodeArray; +} +export interface JsxNamespacedName extends ExpressionBase { + readonly kind: SyntaxKind.JsxNamespacedName; + readonly namespace: Identifier; + readonly name: Identifier; +} +export interface JsxOpeningElement extends ExpressionBase { + readonly kind: SyntaxKind.JsxOpeningElement; + readonly tagName: JsxTagNameExpression; + readonly typeArguments?: NodeArray; + readonly attributes: JsxAttributes; +} +export interface JsxSelfClosingElement extends PrimaryExpressionBase { + readonly kind: SyntaxKind.JsxSelfClosingElement; + readonly tagName: JsxTagNameExpression; + readonly typeArguments?: NodeArray; + readonly attributes: JsxAttributes; +} +export interface JsxFragment extends PrimaryExpressionBase { + readonly kind: SyntaxKind.JsxFragment; + readonly openingFragment: JsxOpeningFragment; + readonly children: NodeArray; + readonly closingFragment: JsxClosingFragment; +} +export interface JsxOpeningFragment extends ExpressionBase { + readonly kind: SyntaxKind.JsxOpeningFragment; +} +export interface JsxClosingFragment extends ExpressionBase { + readonly kind: SyntaxKind.JsxClosingFragment; +} +export interface JsxAttribute extends NodeBase, DeclarationBase { + readonly kind: SyntaxKind.JsxAttribute; + readonly name: JsxAttributeName; + readonly initializer?: JsxAttributeValue; +} +export interface JsxSpreadAttribute extends ObjectLiteralElementBase, NodeBase { + readonly kind: SyntaxKind.JsxSpreadAttribute; + readonly expression: Expression; +} +export interface JsxClosingElement extends NodeBase { + readonly kind: SyntaxKind.JsxClosingElement; + readonly tagName: JsxTagNameExpression; +} +export interface JsxExpression extends ExpressionBase { + readonly kind: SyntaxKind.JsxExpression; + readonly dotDotDotToken?: DotDotDotToken; + readonly expression?: Expression; +} +export interface JsxText extends ExpressionBase, LiteralLikeNodeBase { + readonly kind: SyntaxKind.JsxText; + readonly containsOnlyTriviaWhiteSpaces: boolean; +} +export interface SyntaxList extends NodeBase { + readonly kind: SyntaxKind.SyntaxList; + readonly children: readonly Node[]; +} +export interface JSDoc extends NodeBase { + readonly kind: SyntaxKind.JSDoc; + readonly comment: NodeArray; + readonly tags?: NodeArray; +} +export interface JSDocTypeExpression extends TypeNodeBase { + readonly kind: SyntaxKind.JSDocTypeExpression; + readonly type: TypeNode; +} +export interface JSDocNonNullableType extends JSDocTypeBase { + readonly kind: SyntaxKind.JSDocNonNullableType; + readonly type: TypeNode; +} +export interface JSDocNullableType extends JSDocTypeBase { + readonly kind: SyntaxKind.JSDocNullableType; + readonly type: TypeNode; +} +export interface JSDocAllType extends JSDocTypeBase { + readonly kind: SyntaxKind.JSDocAllType; +} +export interface JSDocVariadicType extends JSDocTypeBase { + readonly kind: SyntaxKind.JSDocVariadicType; + readonly type: TypeNode; +} +export interface JSDocOptionalType extends JSDocTypeBase { + readonly kind: SyntaxKind.JSDocOptionalType; + readonly type: TypeNode; +} +export interface JSDocTypeTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocTypeTag; + readonly typeExpression: Node; +} +export interface JSDocUnknownTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocUnknownTag; +} +export interface JSDocTemplateTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocTemplateTag; + readonly constraint: Node; + readonly typeParameters: NodeArray; +} +export interface JSDocReturnTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocReturnTag; + readonly typeExpression?: TypeNode; +} +export interface JSDocPublicTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocPublicTag; +} +export interface JSDocPrivateTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocPrivateTag; +} +export interface JSDocProtectedTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocProtectedTag; +} +export interface JSDocReadonlyTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocReadonlyTag; +} +export interface JSDocOverrideTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocOverrideTag; +} +export interface JSDocDeprecatedTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocDeprecatedTag; +} +export interface JSDocSeeTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocSeeTag; + readonly nameExpression: TypeNode; +} +export interface JSDocImplementsTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocImplementsTag; + readonly className: ExpressionWithTypeArguments; +} +export interface JSDocAugmentsTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocAugmentsTag; + readonly className: ExpressionWithTypeArguments; +} +export interface JSDocSatisfiesTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocSatisfiesTag; + readonly typeExpression: TypeNode; +} +export interface JSDocThrowsTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocThrowsTag; + readonly typeExpression?: TypeNode; +} +export interface JSDocThisTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocThisTag; + readonly typeExpression: TypeNode; +} +export interface JSDocImportTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocImportTag; + readonly importClause?: ImportClause; + readonly moduleSpecifier: Expression; + readonly attributes?: ImportAttributes; +} +export interface JSDocCallbackTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocCallbackTag; + readonly typeExpression: TypeNode; + readonly name?: JSDocFullName; +} +export interface JSDocOverloadTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocOverloadTag; + readonly typeExpression: TypeNode; +} +export interface JSDocTypedefTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocTypedefTag; + readonly typeExpression?: Node; + readonly name?: JSDocFullName; +} +export interface JSDocSignature extends JSDocTypeBase, FunctionLikeBase { + readonly kind: SyntaxKind.JSDocSignature; +} +export interface JSDocNameReference extends TypeNodeBase { + readonly kind: SyntaxKind.JSDocNameReference; + readonly name: EntityName; +} +export interface ModuleDeclaration extends DeclarationBase, StatementBase, ModifiersBase, BodyBase { + readonly kind: SyntaxKind.ModuleDeclaration; + readonly keyword: SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword; + readonly name: ModuleName; + readonly body?: ModuleBody; +} +export interface ImportEqualsDeclaration extends DeclarationBase, StatementBase, ModifiersBase { + readonly kind: SyntaxKind.ImportEqualsDeclaration; + readonly isTypeOnly: boolean; + readonly name: Identifier; + readonly moduleReference: ModuleReference; +} +export interface ExportDeclaration extends DeclarationBase, StatementBase, ModifiersBase { + readonly kind: SyntaxKind.ExportDeclaration; + readonly isTypeOnly: boolean; + readonly exportClause?: NamedExportBindings; + readonly moduleSpecifier?: Expression; + readonly attributes?: ImportAttributes; +} +export interface ImportTypeNode extends NodeWithTypeArgumentsBase { + readonly kind: SyntaxKind.ImportType; + readonly isTypeOf: boolean; + readonly argument: TypeNode; + readonly attributes?: ImportAttributes; + readonly qualifier?: EntityName; +} +export interface ImportClause extends NodeBase, DeclarationBase { + readonly kind: SyntaxKind.ImportClause; + readonly phaseModifier?: ImportPhaseModifierSyntaxKind; + readonly name?: Identifier; + readonly namedBindings?: NamedImportBindings; +} +export interface ImportSpecifier extends NodeBase, DeclarationBase { + readonly kind: SyntaxKind.ImportSpecifier; + readonly isTypeOnly: boolean; + readonly propertyName?: ModuleExportName; + readonly name: Identifier; +} +export interface JSDocText extends JSDocCommentBase { + readonly kind: SyntaxKind.JSDocText; +} +export interface JSDocLink extends JSDocCommentBase { + readonly kind: SyntaxKind.JSDocLink; + readonly name?: EntityName; +} +export interface JSDocLinkPlain extends JSDocCommentBase { + readonly kind: SyntaxKind.JSDocLinkPlain; + readonly name?: EntityName; +} +export interface JSDocLinkCode extends JSDocCommentBase { + readonly kind: SyntaxKind.JSDocLinkCode; + readonly name?: EntityName; +} +export interface TypeParameterDeclaration extends NodeBase, DeclarationBase, ModifiersBase { + readonly kind: SyntaxKind.TypeParameter; + readonly name: Identifier; + readonly constraint?: TypeNode; + readonly expression?: Expression; + readonly defaultType?: TypeNode; +} +export interface SyntheticReferenceExpression extends ExpressionBase { + readonly kind: SyntaxKind.SyntheticReferenceExpression; + readonly expression: Expression; + readonly thisArg: Expression; +} +export interface JSDocTypeLiteral extends JSDocTypeBase, DeclarationBase { + readonly kind: SyntaxKind.JSDocTypeLiteral; + readonly jsdocPropertyTags?: readonly JSDocTag[]; + readonly isArrayType: boolean; +} +export type Expression = ExpressionBase; +export type Statement = StatementBase; +export type TypeNode = TypeNodeBase; +export type BlockOrExpression = Block | Expression; +export type NodeBody = Block | Expression | ModuleBlock | ModuleDeclaration; +export type AccessExpression = PropertyAccessExpression | ElementAccessExpression; +export type DeclarationName = Identifier | PrivateIdentifier | StringLiteral | NumericLiteral | BigIntLiteral | NoSubstitutionTemplateLiteral | ComputedPropertyName | BindingPattern | ElementAccessExpression; +export type ModuleName = Identifier | StringLiteral; +export type ModuleExportName = Identifier | StringLiteral; +export type PropertyName = Identifier | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier | BigIntLiteral; +export type ModuleBody = ModuleBlock | ModuleDeclaration; +export type JSDocFullName = Identifier | ModuleDeclaration; +export type ForInitializer = Expression | MissingDeclaration | VariableDeclarationList; +export type ModuleReference = Identifier | QualifiedName | ExternalModuleReference; +export type NamedImportBindings = NamespaceImport | NamedImports; +export type NamedExportBindings = NamespaceExport | NamedExports; +export type MemberName = Identifier | PrivateIdentifier; +export type EntityName = Identifier | QualifiedName; +export type BindingName = Identifier | BindingPattern; +export type ModifierLike = Modifier | Decorator; +export type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment; +export type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute; +export type JsxAttributeName = Identifier | JsxNamespacedName; +export type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment; +export type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess | JsxNamespacedName; +export type ClassLikeDeclaration = ClassDeclaration | ClassExpression; +export type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration; +export type LiteralLikeNode = StringLiteral | NumericLiteral | BigIntLiteral | RegularExpressionLiteral | TemplateLiteralLikeNode | JsxText; +export type LiteralExpression = StringLiteral | NumericLiteral | BigIntLiteral | RegularExpressionLiteral | NoSubstitutionTemplateLiteral; +export type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode; +export type TemplateLiteralLikeNode = TemplateHead | TemplateMiddle | TemplateTail; +export type TemplateMiddleOrTail = TemplateMiddle | TemplateTail; +export type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral; +export type TypePredicateParameterName = Identifier | ThisTypeNode; +export type ImportAttributeName = Identifier | StringLiteral; +export type LeftHandSideExpression = LeftHandSideExpressionBase; +export type JSDocComment = JSDocText | JSDocLink | JSDocLinkCode | JSDocLinkPlain; +export type SignatureDeclaration = CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignatureDeclaration | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction; +export type StringLiteralLikeNode = StringLiteral | NoSubstitutionTemplateLiteral; +export type NumericOrStringLikeLiteral = StringLiteralLikeNode | NumericLiteral; +export type ObjectLiteralLikeNode = ObjectLiteralExpression | ObjectBindingPattern; +export type ObjectTypeDeclaration = ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode; +export type JsxOpeningLikeElement = JsxOpeningElement | JsxSelfClosingElement; +export type NamedImportsOrExports = NamedImports | NamedExports; +export type BreakOrContinueStatement = BreakStatement | ContinueStatement; +export type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement | BinaryExpression; +export type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction; +export type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; +export type VariableOrPropertyDeclaration = VariableDeclaration | PropertyDeclaration; +export type CallOrNewExpression = CallExpression | NewExpression; +export type ImportClauseOrBindingPattern = ImportClause | BindingPattern; +export type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration; +export type Declaration = DeclarationBase; +export type ClassElement = ClassElementBase; +export type TypeElement = TypeElementBase; +export type ObjectLiteralElement = ObjectLiteralElementBase; +export type JSDocTag = JSDocTagBase; +export type ArrayBindingElement = BindingElement | OmittedExpression; +export type AssertionExpression = TypeAssertion | AsExpression; +export type BooleanLiteral = TrueLiteral | FalseLiteral; +export type ConciseBody = Block | Expression; +export type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment; +export type LiteralToken = NumericLiteral | BigIntLiteral | StringLiteral | JsxText | RegularExpressionLiteral | NoSubstitutionTemplateLiteral; +export type Modifier = AbstractKeyword | AccessorKeyword | AsyncKeyword | ConstKeyword | DeclareKeyword | DefaultKeyword | ExportKeyword | InKeyword | PrivateKeyword | ProtectedKeyword | PublicKeyword | ReadonlyKeyword | OutKeyword | OverrideKeyword | StaticKeyword; +export type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration; +export type PropertyNameLiteral = Identifier | StringLiteral | NumericLiteral; +export type PseudoLiteralToken = TemplateHead | TemplateMiddle | TemplateTail; +export type TemplateLiteralToken = NoSubstitutionTemplateLiteral | PseudoLiteralToken; +export type ArrayDestructuringAssignment = BinaryExpression; +export type ObjectDestructuringAssignment = BinaryExpression; +export type FunctionBody = Block; +export type IncrementExpression = UpdateExpressionBase; +export interface ForInStatement extends StatementBase { + readonly kind: SyntaxKind.ForInStatement; + readonly awaitModifier?: AwaitKeyword; + readonly initializer: ForInitializer; + readonly expression: Expression; + readonly statement: Statement; +} +export interface ForOfStatement extends StatementBase { + readonly kind: SyntaxKind.ForOfStatement; + readonly awaitModifier?: AwaitKeyword; + readonly initializer: ForInitializer; + readonly expression: Expression; + readonly statement: Statement; +} +export interface CaseClause extends NodeBase { + readonly kind: SyntaxKind.CaseClause; + readonly expression: Expression; + readonly statements: NodeArray; +} +export interface DefaultClause extends NodeBase { + readonly kind: SyntaxKind.DefaultClause; + readonly expression: Expression; + readonly statements: NodeArray; +} +export interface ObjectBindingPattern extends NodeBase { + readonly kind: SyntaxKind.ObjectBindingPattern; + readonly elements: NodeArray; +} +export interface ArrayBindingPattern extends NodeBase { + readonly kind: SyntaxKind.ArrayBindingPattern; + readonly elements: NodeArray; +} +export interface JSDocParameterTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocParameterTag; + readonly name: EntityName; + readonly isBracketed: boolean; + readonly typeExpression?: TypeNode; + readonly isNameFirst: boolean; +} +export interface JSDocPropertyTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocPropertyTag; + readonly name: EntityName; + readonly isBracketed: boolean; + readonly typeExpression?: TypeNode; + readonly isNameFirst: boolean; +} +export type ForInOrOfStatement = ForInStatement | ForOfStatement; +export type CaseOrDefaultClause = CaseClause | DefaultClause; +export type BindingPattern = ObjectBindingPattern | ArrayBindingPattern; +export type JSDocParameterOrPropertyTag = JSDocParameterTag | JSDocPropertyTag; +export type EndOfFile = Token; +export type DotToken = Token; +export type DotDotDotToken = Token; +export type QuestionToken = Token; +export type ExclamationToken = Token; +export type ColonToken = Token; +export type EqualsToken = Token; +export type AsteriskToken = Token; +export type EqualsGreaterThanToken = Token; +export type PlusToken = Token; +export type MinusToken = Token; +export type QuestionDotToken = Token; +export type AssertsKeyword = Token; +export type AssertKeyword = Token; +export type AwaitKeyword = Token; +export type CaseKeyword = Token; +export type AbstractKeyword = Token; +export type AccessorKeyword = Token; +export type AsyncKeyword = Token; +export type ConstKeyword = Token; +export type DeclareKeyword = Token; +export type DefaultKeyword = Token; +export type ExportKeyword = Token; +export type InKeyword = Token; +export type PrivateKeyword = Token; +export type ProtectedKeyword = Token; +export type PublicKeyword = Token; +export type ReadonlyKeyword = Token; +export type OutKeyword = Token; +export type OverrideKeyword = Token; +export type StaticKeyword = Token; +export type BinaryOperatorToken = Token; +export type AssignmentOperatorToken = Token; +export type NullLiteral = KeywordExpression; +export type TrueLiteral = KeywordExpression; +export type FalseLiteral = KeywordExpression; +export type ThisExpression = KeywordExpression; +export type SuperExpression = KeywordExpression; +export type ImportExpression = KeywordExpression; +export type StatementList = NodeArray; +export type CaseClausesList = NodeArray; +export type VariableDeclarationNodeList = NodeArray; +export type BindingElementList = NodeArray; +export type TypeParameterList = NodeArray; +export type ParameterList = NodeArray; +export type HeritageClauseList = NodeArray; +export type ClassElementList = NodeArray; +export type TypeElementList = NodeArray; +export type ExpressionWithTypeArgumentsList = NodeArray; +export type EnumMemberList = NodeArray; +export type ImportSpecifierList = NodeArray; +export type ExportSpecifierList = NodeArray; +export type TypeArgumentList = NodeArray; +export type ArgumentList = NodeArray; +export type TemplateSpanList = NodeArray; +export type ElementList = NodeArray; +export type PropertyDefinitionList = NodeArray; +export type TypeList = NodeArray; +export type ImportAttributeList = NodeArray; +export type TemplateLiteralTypeSpanList = NodeArray; +export type JsxChildList = NodeArray; +export type JsxAttributeList = NodeArray; +//# sourceMappingURL=ast.generated.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/ast.generated.d.ts.map b/node_modules/typescript/dist/ast/ast.generated.d.ts.map new file mode 100644 index 0000000..de5e12f --- /dev/null +++ b/node_modules/typescript/dist/ast/ast.generated.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ast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dist/ast/ast.generated.js b/node_modules/typescript/dist/ast/ast.generated.js new file mode 100644 index 0000000..b71ee9f --- /dev/null +++ b/node_modules/typescript/dist/ast/ast.generated.js @@ -0,0 +1,4 @@ +// Code generated by _scripts/generate-ts-ast.ts. DO NOT EDIT. +import { SyntaxKind } from "#enums/syntaxKind"; +import { TokenFlags } from "#enums/tokenFlags"; +//# sourceMappingURL=ast.generated.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/ast.generated.js.map b/node_modules/typescript/dist/ast/ast.generated.js.map new file mode 100644 index 0000000..b3226d7 --- /dev/null +++ b/node_modules/typescript/dist/ast/ast.generated.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ast.generated.js","sourceRoot":"","sources":["../../src/ast/ast.generated.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAI9D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/ast.js b/node_modules/typescript/dist/ast/ast.js new file mode 100644 index 0000000..c6a0580 --- /dev/null +++ b/node_modules/typescript/dist/ast/ast.js @@ -0,0 +1,7 @@ +// ast.ts — Hand-written AST type definitions +// Generated types are in ast.generated.ts +import { SyntaxKind } from "#enums/syntaxKind"; +export { SyntaxKind } from "#enums/syntaxKind"; +export { TokenFlags } from "#enums/tokenFlags"; +export * from "./ast.generated.js"; +//# sourceMappingURL=ast.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/ast.js.map b/node_modules/typescript/dist/ast/ast.js.map new file mode 100644 index 0000000..d2693b0 --- /dev/null +++ b/node_modules/typescript/dist/ast/ast.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/ast/ast.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,0CAA0C;AAM1C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAc/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,cAAc,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/astnav.d.ts b/node_modules/typescript/dist/ast/astnav.d.ts new file mode 100644 index 0000000..518f0b6 --- /dev/null +++ b/node_modules/typescript/dist/ast/astnav.d.ts @@ -0,0 +1,19 @@ +import type { Node, SourceFile } from "./ast.ts"; +export declare function getTokenAtPosition(sourceFile: SourceFile, position: number): Node; +export declare function getTouchingPropertyName(sourceFile: SourceFile, position: number): Node; +export declare function getTouchingToken(sourceFile: SourceFile, position: number): Node; +/** + * Finds the token that starts immediately after `previousToken` ends, searching + * within `parent`. Returns `undefined` if no such token exists. + */ +export declare function findNextToken(previousToken: Node, parent: Node, sourceFile: SourceFile): Node | undefined; +/** + * Finds the leftmost token satisfying `position < token.end`. + * If the position is in the trivia of that leftmost token, or the token is invalid, + * returns the rightmost valid token with `token.end <= position`. + * Excludes `JsxText` tokens containing only whitespace. + */ +export declare function findPrecedingToken(sourceFile: SourceFile, position: number): Node | undefined; +/** @internal */ +export declare function getTokenPosOfNode(node: Node, sourceFile: SourceFile, includeJSDoc?: boolean): number; +//# sourceMappingURL=astnav.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/astnav.d.ts.map b/node_modules/typescript/dist/ast/astnav.d.ts.map new file mode 100644 index 0000000..fc03e0a --- /dev/null +++ b/node_modules/typescript/dist/ast/astnav.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"astnav.d.ts","sourceRoot":"","sources":["../../src/ast/astnav.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,IAAI,EAEJ,UAAU,EACb,MAAM,UAAU,CAAC;AAclB,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAEjF;AAED,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAEtF;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAE/E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,CAiEzG;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAE7F;AAkMD,gBAAgB;AAChB,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAapG"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/astnav.js b/node_modules/typescript/dist/ast/astnav.js new file mode 100644 index 0000000..527ab72 --- /dev/null +++ b/node_modules/typescript/dist/ast/astnav.js @@ -0,0 +1,596 @@ +import { NodeFlags } from "#enums/nodeFlags"; +import { SyntaxKind } from "#enums/syntaxKind"; +import { createToken } from "./factory.generated.js"; +import { isJSDocNodeKind, isKeywordKind, isPrivateIdentifier, isPropertyNameLiteral, isTokenKind, } from "./is.js"; +import { createScanner, skipTrivia, } from "./scanner.js"; +export function getTokenAtPosition(sourceFile, position) { + return getTokenAtPositionImpl(sourceFile, position, /*allowPositionInLeadingTrivia*/ true, /*includePrecedingTokenAtEndPosition*/ undefined); +} +export function getTouchingPropertyName(sourceFile, position) { + return getTokenAtPositionImpl(sourceFile, position, /*allowPositionInLeadingTrivia*/ false, node => isPropertyNameLiteral(node) || isKeywordKind(node.kind) || isPrivateIdentifier(node)); +} +export function getTouchingToken(sourceFile, position) { + return getTokenAtPositionImpl(sourceFile, position, /*allowPositionInLeadingTrivia*/ false, /*includePrecedingTokenAtEndPosition*/ undefined); +} +/** + * Finds the token that starts immediately after `previousToken` ends, searching + * within `parent`. Returns `undefined` if no such token exists. + */ +export function findNextToken(previousToken, parent, sourceFile) { + return find(parent); + function find(n) { + if (isTokenKind(n.kind) && n.pos === previousToken.end) { + // This is the token that starts at the end of previousToken – return it. + return n; + } + // Find the child node that contains `previousToken` or starts immediately after it. + let foundNode; + const visitChild = (node) => { + if (node.flags & NodeFlags.Reparsed) { + return undefined; + } + if (node.pos <= previousToken.end && node.end > previousToken.end) { + foundNode = node; + } + return undefined; + }; + // Visit JSDoc children first (mirrors Go's VisitEachChildAndJSDoc). + if (n.jsDoc) { + for (const jsdoc of n.jsDoc) { + visitChild(jsdoc); + } + } + n.forEachChild(visitChild, nodes => { + if (nodes.length > 0 && foundNode === undefined) { + for (const node of nodes) { + if (node.flags & NodeFlags.Reparsed) + continue; + if (node.pos > previousToken.end) + break; + if (node.end > previousToken.end) { + foundNode = node; + break; + } + } + } + return undefined; + }); + // Recurse into the found child. + if (foundNode !== undefined) { + return find(foundNode); + } + // No AST child covers the position; use the scanner to find the syntactic token. + // The scanner is initialized at `previousToken.end`, so tokenFullStart === previousToken.end. + const startPos = previousToken.end; + if (startPos >= n.pos && startPos < n.end) { + const scanner = getScannerForSourceFile(sourceFile, startPos); + const token = scanner.getToken(); + const tokenFullStart = scanner.getTokenFullStart(); + const tokenEnd = scanner.getTokenEnd(); + const flags = scanner.getTokenFlags(); + return getOrCreateToken(sourceFile, token, tokenFullStart, tokenEnd, n, flags); + } + return undefined; + } +} +/** + * Finds the leftmost token satisfying `position < token.end`. + * If the position is in the trivia of that leftmost token, or the token is invalid, + * returns the rightmost valid token with `token.end <= position`. + * Excludes `JsxText` tokens containing only whitespace. + */ +export function findPrecedingToken(sourceFile, position) { + return findPrecedingTokenImpl(sourceFile, position, sourceFile); +} +function getTokenAtPositionImpl(sourceFile, position, allowPositionInLeadingTrivia, includePrecedingTokenAtEndPosition) { + let current = sourceFile; + let nodeAfterLeft; + const state = { + next: undefined, + prevSubtree: undefined, + left: 0, + }; + const testNode = (node) => { + if (node.kind !== SyntaxKind.EndOfFile && node.end === position && includePrecedingTokenAtEndPosition !== undefined) { + state.prevSubtree = node; + } + // A node "contains" the position if position < end, except nodes at the file end + // treat end as inclusive (there's nowhere else to look). This applies to the EOF + // token itself, and to JSDoc nodes reaching EOF (e.g. unterminated JSDoc comments). + if (node.end < position || node.end === position && + node.kind !== SyntaxKind.EndOfFile && + (!isJSDocNodeKind(node.kind) || node.end !== sourceFile.endOfFileToken.end)) { + return -1; + } + const nodePos = getPosition(node, sourceFile, allowPositionInLeadingTrivia); + if (nodePos > position) { + return 1; + } + return 0; + }; + while (true) { + // Visit each child of current to find the one containing the position. + state.next = undefined; + nodeAfterLeft = undefined; + // In Strada, JSDoc nodes with a single comment represent that comment as a string + // property (not a child node), so forEachChild does not visit it. We replicate this + // by detecting single-comment NodeLists in visitList and skipping their elements in visitNode. + let skipSingleCommentChildren = false; + const visitNode = (node) => { + if (node.flags & NodeFlags.Reparsed) { + return undefined; + } + if (skipSingleCommentChildren && isJSDocCommentChildKind(node.kind)) { + return undefined; + } + if (nodeAfterLeft === undefined) { + nodeAfterLeft = node; + } + if (state.next === undefined) { + const result = testNode(node); + switch (result) { + case -1: + if (!isJSDocNodeKind(node.kind)) { + state.left = node.end; + } + nodeAfterLeft = undefined; + break; + case 0: + state.next = node; + break; + } + } + return undefined; + }; + // Visit JSDoc children first, then regular children (mirrors Go's VisitEachChildAndJSDoc). + if (current.jsDoc) { + for (const jsdoc of current.jsDoc) { + visitNode(jsdoc); + } + } + current.forEachChild(visitNode, nodes => { + // Track whether this NodeList is a single-comment list that should be skipped. + // The flag affects the subsequent forEachNode(visitNode) calls for this NodeList. + skipSingleCommentChildren = isJSDocSingleCommentNodeList(nodes); + if (nodes.length === 0 || skipSingleCommentChildren) { + return undefined; + } + if (nodeAfterLeft === undefined) { + for (const node of nodes) { + if (!(node.flags & NodeFlags.Reparsed)) { + nodeAfterLeft = node; + break; + } + } + } + if (state.next === undefined) { + if (nodes.end === position && includePrecedingTokenAtEndPosition !== undefined) { + state.left = nodes.end; + nodeAfterLeft = undefined; + state.prevSubtree = nodes[nodes.length - 1]; + } + else if (nodes.end <= position) { + state.left = nodes.end; + nodeAfterLeft = undefined; + } + else if (nodes.pos <= position) { + binarySearchNodeList(nodes, testNode, (node, middle, arr) => { + state.left = node.end; + nodeAfterLeft = undefined; + for (let i = middle + 1; i < arr.length; i++) { + if (!(arr[i].flags & NodeFlags.Reparsed)) { + nodeAfterLeft = arr[i]; + break; + } + } + }, found => { + state.next = found; + }); + } + } + return undefined; + }); + // If prevSubtree was set, check if the rightmost token of prevSubtree should be returned. + if (state.prevSubtree !== undefined) { + const child = findPrecedingTokenImpl(sourceFile, position, state.prevSubtree); + if (child !== undefined && child.end === position && includePrecedingTokenAtEndPosition(child)) { + return child; + } + state.prevSubtree = undefined; + } + if (state.next === undefined) { + if (isTokenKind(current.kind) || shouldSkipChild(current)) { + return current; + } + // Use the scanner to find a token not stored in the AST. + const scanner = getScannerForSourceFile(sourceFile, state.left); + let end = current.end; + const afterLeft = nodeAfterLeft; + if (afterLeft !== undefined) { + end = afterLeft.pos; + } + while (state.left < end) { + const token = scanner.getToken(); + const tokenFullStart = scanner.getTokenFullStart(); + const tokenStart = allowPositionInLeadingTrivia ? tokenFullStart : scanner.getTokenStart(); + const tokenEnd = scanner.getTokenEnd(); + const flags = scanner.getTokenFlags(); + if (tokenEnd > end) { + break; + } + if (tokenStart <= position && position < tokenEnd) { + if (token === SyntaxKind.Identifier || !isTokenKind(token)) { + if (isJSDocNodeKind(current.kind)) { + return current; + } + throw new Error(`did not expect ${SyntaxKind[current.kind]} to have ${SyntaxKind[token]} in its trivia`); + } + return getOrCreateToken(sourceFile, token, tokenFullStart, tokenEnd, current, flags); + } + if (includePrecedingTokenAtEndPosition !== undefined && tokenEnd === position) { + const prevToken = getOrCreateToken(sourceFile, token, tokenFullStart, tokenEnd, current, flags); + if (includePrecedingTokenAtEndPosition(prevToken)) { + return prevToken; + } + } + state.left = tokenEnd; + scanner.scan(); + } + return current; + } + current = state.next; + state.left = current.pos; + nodeAfterLeft = undefined; + } +} +function getPosition(node, sourceFile, allowPositionInLeadingTrivia) { + if (allowPositionInLeadingTrivia) { + return node.pos; + } + return getTokenPosOfNode(node, sourceFile, /*includeJSDoc*/ true); +} +/** @internal */ +export function getTokenPosOfNode(node, sourceFile, includeJSDoc) { + // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't* + // want to skip trivia because this will launch us forward to the next token. + if (nodeIsMissing(node)) { + return node.pos; + } + if (isJSDocNodeKind(node.kind) || node.kind === SyntaxKind.JsxText) { + return skipTrivia(sourceFile.text, node.pos, /*stopAfterLineBreak*/ false, /*stopAtComments*/ true); + } + if (includeJSDoc && node.jsDoc && node.jsDoc.length > 0) { + return getTokenPosOfNode(node.jsDoc[0], sourceFile, /*includeJSDoc*/ false); + } + return skipTrivia(sourceFile.text, node.pos, /*stopAfterLineBreak*/ false, /*stopAtComments*/ false, /*inJSDoc*/ !!(node.flags & NodeFlags.JSDoc)); +} +function nodeIsMissing(node) { + return node.pos === node.end && node.pos >= 0 && node.kind !== SyntaxKind.EndOfFile; +} +function findPrecedingTokenImpl(sourceFile, position, startNode) { + const find = (n) => { + if (isTokenKind(n.kind) && n.kind !== SyntaxKind.EndOfFile) { + return n; + } + let foundChild; + let prevChild; + // Visit JSDoc nodes first (mirrors Go's VisitEachChildAndJSDoc). + if (n.jsDoc) { + for (const jsdoc of n.jsDoc) { + if (jsdoc.flags & NodeFlags.Reparsed) + continue; + if (foundChild !== undefined) + break; + if (position < jsdoc.end && (prevChild === undefined || prevChild.end <= position)) { + foundChild = jsdoc; + } + else { + prevChild = jsdoc; + } + } + } + let skipSingleCommentChildrenImpl = false; + n.forEachChild(node => { + if (node.flags & NodeFlags.Reparsed) { + return undefined; + } + if (skipSingleCommentChildrenImpl && isJSDocCommentChildKind(node.kind)) { + return undefined; + } + if (foundChild !== undefined) { + return undefined; + } + if (position < node.end && (prevChild === undefined || prevChild.end <= position)) { + foundChild = node; + } + else { + prevChild = node; + } + return undefined; + }, nodes => { + skipSingleCommentChildrenImpl = isJSDocSingleCommentNodeList(nodes); + if (foundChild !== undefined) { + return undefined; + } + if (nodes.length > 0 && !skipSingleCommentChildrenImpl) { + const index = binarySearchForPrecedingToken(nodes, position); + if (index >= 0 && !(nodes[index].flags & NodeFlags.Reparsed)) { + foundChild = nodes[index]; + } + const lookupIndex = index >= 0 ? index - 1 : nodes.length - 1; + for (let i = lookupIndex; i >= 0; i--) { + if (!(nodes[i].flags & NodeFlags.Reparsed)) { + if (prevChild === undefined) { + prevChild = nodes[i]; + } + break; + } + } + } + return undefined; + }); + if (foundChild !== undefined) { + const start = getTokenPosOfNode(foundChild, sourceFile, /*includeJSDoc*/ true); + if (start >= position) { + if (position >= foundChild.pos) { + // We are in the leading trivia of foundChild. Check for JSDoc nodes of n + // preceding foundChild, mirroring Go's findPrecedingToken logic. + let jsDoc; + if (n.jsDoc) { + for (let i = n.jsDoc.length - 1; i >= 0; i--) { + if (n.jsDoc[i].pos >= foundChild.pos) { + jsDoc = n.jsDoc[i]; + break; + } + } + } + if (jsDoc !== undefined) { + if (position < jsDoc.end) { + return find(jsDoc); + } + return findRightmostValidToken(sourceFile, jsDoc.end, n, position); + } + return findRightmostValidToken(sourceFile, foundChild.pos, n, -1); + } + // Answer is in tokens between two visited children. + return findRightmostValidToken(sourceFile, foundChild.pos, n, position); + } + return find(foundChild); + } + if (position >= n.end) { + return findRightmostValidToken(sourceFile, n.end, n, -1); + } + return findRightmostValidToken(sourceFile, n.end, n, position); + }; + return find(startNode); +} +function findRightmostValidToken(sourceFile, endPos, containingNode, position) { + if (position === -1) { + position = containingNode.end; + } + const find = (n, endPos) => { + if (isTokenKind(n.kind) && n.kind !== SyntaxKind.EndOfFile) { + return n; + } + let rightmostValidNode; + let hasChildren = false; + // Visit JSDoc nodes first (mirrors Go's VisitEachChildAndJSDoc). + if (n.jsDoc) { + hasChildren = true; + for (const jsdoc of n.jsDoc) { + if (jsdoc.flags & NodeFlags.Reparsed) + continue; + if (jsdoc.end > endPos || getTokenPosOfNode(jsdoc, sourceFile) >= position) + continue; + if (isValidPrecedingNode(jsdoc, sourceFile)) { + rightmostValidNode = jsdoc; + } + } + } + let skipSingleCommentChildren = false; + n.forEachChild(node => { + if (node.flags & NodeFlags.Reparsed) { + return undefined; + } + if (skipSingleCommentChildren && isJSDocCommentChildKind(node.kind)) { + return undefined; + } + hasChildren = true; + if (node.end > endPos || getTokenPosOfNode(node, sourceFile) >= position) { + return undefined; + } + if (isValidPrecedingNode(node, sourceFile)) { + rightmostValidNode = node; + } + return undefined; + }, nodes => { + // Skip single-comment JSDoc NodeLists (e.g. JSDocText children of a JSDoc node): + // In Go, these are stored as string properties and are never visited as children. + skipSingleCommentChildren = isJSDocSingleCommentNodeList(nodes); + if (nodes.length > 0 && !skipSingleCommentChildren) { + hasChildren = true; + for (let i = nodes.length - 1; i >= 0; i--) { + const node = nodes[i]; + if (node.flags & NodeFlags.Reparsed) + continue; + if (node.end > endPos || getTokenPosOfNode(node, sourceFile) >= position) + continue; + if (isValidPrecedingNode(node, sourceFile)) { + rightmostValidNode = node; + break; + } + } + } + return undefined; + }); + // Scan for syntactic tokens (e.g. `{`, `,`) between AST nodes, matching Go's + // findRightmostValidToken scanner step. + if (!shouldSkipChild(n)) { + const startPos = rightmostValidNode !== undefined ? rightmostValidNode.end : n.pos; + const targetEnd = Math.min(endPos, position); + if (startPos < targetEnd) { + const scanner = getScannerForSourceFile(sourceFile, startPos); + let pos = startPos; + let lastScannedToken; + while (pos < targetEnd) { + const tokenStart = scanner.getTokenStart(); + if (tokenStart >= position) + break; + const tokenFullStart = scanner.getTokenFullStart(); + const tokenEnd = scanner.getTokenEnd(); + const token = scanner.getToken(); + const flags = scanner.getTokenFlags(); + lastScannedToken = getOrCreateToken(sourceFile, token, tokenFullStart, tokenEnd, n, flags); + pos = tokenEnd; + scanner.scan(); + } + if (lastScannedToken !== undefined) { + return lastScannedToken; + } + } + } + if (!hasChildren) { + if (n !== containingNode) { + return n; + } + return undefined; + } + if (rightmostValidNode !== undefined) { + return find(rightmostValidNode, rightmostValidNode.end); + } + return undefined; + }; + return find(containingNode, endPos); +} +function isValidPrecedingNode(node, sourceFile) { + if (node.kind === SyntaxKind.EndOfFile) { + return false; + } + const start = getTokenPosOfNode(node, sourceFile); + const width = node.end - start; + return width > 0; +} +function shouldSkipChild(node) { + return node.kind === SyntaxKind.JSDoc || + node.kind === SyntaxKind.JSDocText || + node.kind === SyntaxKind.JSDocTypeLiteral || + node.kind === SyntaxKind.JSDocSignature || + node.kind === SyntaxKind.JSDocLink || + node.kind === SyntaxKind.JSDocLinkCode || + node.kind === SyntaxKind.JSDocLinkPlain || + isJSDocTag(node); +} +function isJSDocTag(node) { + return node.kind >= SyntaxKind.FirstJSDocTagNode && node.kind <= SyntaxKind.LastJSDocTagNode; +} +// In Strada, if a JSDoc node has a single comment, that comment is represented as a string +// property as a simplification, and therefore that comment is not visited by forEachChild. +// To match, we skip single-element comment NodeLists within JSDoc/JSDocTag nodes. +function isJSDocCommentChildKind(kind) { + switch (kind) { + case SyntaxKind.JSDocText: + case SyntaxKind.JSDocLink: + case SyntaxKind.JSDocLinkCode: + case SyntaxKind.JSDocLinkPlain: + return true; + default: + return false; + } +} +function isJSDocSingleCommentNodeList(nodes) { + return nodes.length === 1 && isJSDocCommentChildKind(nodes[0].kind); +} +function getScannerForSourceFile(sourceFile, pos) { + const scanner = createScanner(/*skipTrivia*/ true, sourceFile.languageVariant, sourceFile.text); + scanner.resetTokenState(pos); + scanner.scan(); + return scanner; +} +function getOrCreateToken(sourceFile, kind, pos, end, parent, _flags) { + const key = `${pos}_${end}`; + if (!sourceFile.tokenCache) { + sourceFile.tokenCache = new Map(); + } + const existing = sourceFile.tokenCache.get(key); + if (existing !== undefined) { + return existing; + } + const token = createToken(kind); + token.pos = pos; + token.end = end; + token.parent = parent; + sourceFile.tokenCache.set(key, token); + return token; +} +/** Binary search a node list for the node containing position. */ +function binarySearchNodeList(nodes, testNode, onLeft, onMatch) { + let lo = 0; + let hi = nodes.length - 1; + while (lo <= hi) { + const mid = (lo + hi) >>> 1; + const node = nodes[mid]; + if (node.flags & NodeFlags.Reparsed) { + // Skip reparsed nodes: try to find a non-reparsed node nearby + let found = false; + for (let i = mid + 1; i <= hi; i++) { + if (!(nodes[i].flags & NodeFlags.Reparsed)) { + const cmp = testNode(nodes[i]); + if (cmp < 0) { + onLeft(nodes[i], i, nodes); + lo = i + 1; + } + else if (cmp > 0) { + hi = i - 1; + } + else { + onMatch(nodes[i]); + return; + } + found = true; + break; + } + } + if (!found) { + hi = mid - 1; + } + continue; + } + const cmp = testNode(node); + if (cmp < 0) { + onLeft(node, mid, nodes); + lo = mid + 1; + } + else if (cmp > 0) { + hi = mid - 1; + } + else { + onMatch(node); + return; + } + } +} +function binarySearchForPrecedingToken(nodes, position) { + let lo = 0; + let hi = nodes.length - 1; + let result = -1; + while (lo <= hi) { + const mid = (lo + hi) >>> 1; + const node = nodes[mid]; + if (node.flags & NodeFlags.Reparsed) { + lo = mid + 1; + continue; + } + if (position < node.end) { + if (mid === 0 || position >= nodes[mid - 1].end) { + result = mid; + break; + } + hi = mid - 1; + } + else { + lo = mid + 1; + } + } + return result; +} +//# sourceMappingURL=astnav.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/astnav.js.map b/node_modules/typescript/dist/ast/astnav.js.map new file mode 100644 index 0000000..e3cd3d0 --- /dev/null +++ b/node_modules/typescript/dist/ast/astnav.js.map @@ -0,0 +1 @@ +{"version":3,"file":"astnav.js","sourceRoot":"","sources":["../../src/ast/astnav.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAO/C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACH,eA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CAAC,CAAC;QACjB,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/clone.d.ts b/node_modules/typescript/dist/ast/clone.d.ts new file mode 100644 index 0000000..f4aad2d --- /dev/null +++ b/node_modules/typescript/dist/ast/clone.d.ts @@ -0,0 +1,16 @@ +import type { Node, NodeArray } from "./ast.ts"; +/** + * Creates a deep clone of a node and its subtree, synthesizing new nodes for every child. + * The resulting tree has fully set parent pointers. + * + * @param node The node to clone. + * @param includeTrivia Whether to preserve the text range (pos/end) on the clone. + */ +export declare function getSynthesizedDeepClone(node: T, includeTrivia?: boolean): T; +export declare function getSynthesizedDeepClone(node: T | undefined, includeTrivia?: boolean): T | undefined; +/** + * Creates deep clones of a NodeArray and all its elements. + */ +export declare function getSynthesizedDeepClones(nodes: NodeArray, includeTrivia?: boolean): NodeArray; +export declare function getSynthesizedDeepClones(nodes: NodeArray | undefined, includeTrivia?: boolean): NodeArray | undefined; +//# sourceMappingURL=clone.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/clone.d.ts.map b/node_modules/typescript/dist/ast/clone.d.ts.map new file mode 100644 index 0000000..51a7dd3 --- /dev/null +++ b/node_modules/typescript/dist/ast/clone.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"clone.d.ts","sourceRoot":"","sources":["../../src/ast/clone.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,IAAI,EACJ,SAAS,EAIZ,MAAM,UAAU,CAAC;AAgFlB;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC;AAC7F,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,SAAS,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,CAAC,GAAG,SAAS,CAAC;AAUrH;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AACrH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/clone.js b/node_modules/typescript/dist/ast/clone.js new file mode 100644 index 0000000..eaf403f --- /dev/null +++ b/node_modules/typescript/dist/ast/clone.js @@ -0,0 +1,104 @@ +import { SyntaxKind } from "#enums/syntaxKind"; +import { cloneNode, createNodeArray, createNumericLiteral, createStringLiteral, } from "./factory.generated.js"; +import { visitEachChild } from "./visitor.js"; +function isArray(value) { + // See: https://github.com/microsoft/TypeScript/issues/17002 + return Array.isArray(value); +} +function forEachChildRecursively(rootNode, cbNode, cbNodes) { + const queue = gatherPossibleChildren(rootNode); + const parents = []; // tracks parent references for elements in queue + while (parents.length < queue.length) { + parents.push(rootNode); + } + while (queue.length !== 0) { + const current = queue.pop(); + const parent = parents.pop(); + if (isArray(current)) { + if (cbNodes) { + const res = cbNodes(current, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + } + for (let i = current.length - 1; i >= 0; --i) { + queue.push(current[i]); + parents.push(parent); + } + } + else { + const res = cbNode(current, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + if (current.kind >= SyntaxKind.FirstNode) { + // add children in reverse order to the queue, so popping gives the first child + for (const child of gatherPossibleChildren(current)) { + queue.push(child); + parents.push(current); + } + } + } + } +} +function gatherPossibleChildren(node) { + const children = []; + node.forEachChild(addWorkItem, addWorkItem); // By using a stack above and `unshift` here, we emulate a depth-first preorder traversal + return children; + function addWorkItem(n) { + children.unshift(n); + } +} +function setParentRecursive(rootNode) { + if (rootNode === undefined) + return rootNode; + forEachChildRecursively(rootNode, (child, parent) => { + child.parent = parent; + return undefined; + }); + return rootNode; +} +function setTextRange(node, range) { + if (range) { + node.pos = range.pos; + node.end = range.end; + } + return node; +} +export function getSynthesizedDeepClone(node, includeTrivia = true) { + const clone = node && getSynthesizedDeepCloneWorker(node); + if (clone && !includeTrivia) { + clone.pos = -1; + clone.end = -1; + } + return setParentRecursive(clone); +} +export function getSynthesizedDeepClones(nodes, includeTrivia = true) { + if (nodes) { + const cloned = createNodeArray(nodes.map(n => getSynthesizedDeepClone(n, includeTrivia)), nodes.pos, nodes.end); + return cloned; + } + return nodes; +} +function getSynthesizedDeepCloneWorker(node) { + const visited = visitEachChild(node, n => getSynthesizedDeepCloneWorker(n)); + if (visited === node) { + // Leaf node — visitEachChild returned the same node since there are no children. + // We need to explicitly clone it. + const clone = node.kind === SyntaxKind.StringLiteral + ? createStringLiteral(node.text, node.tokenFlags) + : node.kind === SyntaxKind.NumericLiteral + ? createNumericLiteral(node.text, node.tokenFlags) + : cloneNode(node); + return setTextRange(clone, node); + } + // visitEachChild already created a new node with visited children. + // Clear the parent since setParentRecursive will set it later. + visited.parent = undefined; + return visited; +} +//# sourceMappingURL=clone.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/clone.js.map b/node_modules/typescript/dist/ast/clone.js.map new file mode 100644 index 0000000..707bfdd --- /dev/null +++ b/node_modules/typescript/dist/ast/clone.js.map @@ -0,0 +1 @@ +{"version":3,"file":"clone.js","sourceRoot":"","sources":["../../src/ast/clone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAQ/C,OAAO,EACH,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,mBAAmB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,SAAS,OAAO,CAAC,KAAU;IACvB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nE,+DAA+D;IAC9D,OAAe,CAAC,MAAM,GAAG,SAAU,CAAC;IACrC,OAAO,OAAO,CAAC;AACnB,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/factory.generated.d.ts b/node_modules/typescript/dist/ast/factory.generated.d.ts new file mode 100644 index 0000000..e9073d9 --- /dev/null +++ b/node_modules/typescript/dist/ast/factory.generated.d.ts @@ -0,0 +1,520 @@ +import { NodeFlags } from "#enums/nodeFlags"; +import { SyntaxKind } from "#enums/syntaxKind"; +import { TokenFlags } from "#enums/tokenFlags"; +import type { ArrayBindingPattern, ArrayLiteralExpression, ArrayTypeNode, ArrowFunction, AsExpression, AssertsKeyword, AsteriskToken, AwaitExpression, AwaitKeyword, BigIntLiteral, BinaryExpression, BinaryOperatorToken, BindingElement, BindingName, Block, BreakStatement, CallExpression, CallSignatureDeclaration, CaseBlock, CaseClause, CaseOrDefaultClause, CatchClause, ClassDeclaration, ClassElement, ClassExpression, ClassStaticBlockDeclaration, ColonToken, ComputedPropertyName, ConciseBody, ConditionalExpression, ConditionalTypeNode, ConstructorDeclaration, ConstructorTypeNode, ConstructSignatureDeclaration, ContinueStatement, DebuggerStatement, Decorator, DefaultClause, DeleteExpression, DoStatement, DotDotDotToken, ElementAccessExpression, EmptyStatement, EndOfFile, EntityName, EnumDeclaration, EnumMember, EqualsGreaterThanToken, EqualsToken, ExclamationToken, ExportAssignment, ExportDeclaration, ExportSpecifier, Expression, ExpressionStatement, ExpressionWithTypeArguments, ExternalModuleReference, ForInitializer, ForInStatement, ForOfStatement, ForStatement, FunctionBody, FunctionDeclaration, FunctionExpression, FunctionTypeNode, GetAccessorDeclaration, HeritageClause, Identifier, IfStatement, ImportAttribute, ImportAttributeName, ImportAttributes, ImportClause, ImportDeclaration, ImportEqualsDeclaration, ImportPhaseModifierSyntaxKind, ImportSpecifier, ImportTypeNode, IndexedAccessTypeNode, IndexSignatureDeclaration, InferTypeNode, InterfaceDeclaration, IntersectionTypeNode, JSDoc, JSDocAllType, JSDocAugmentsTag, JSDocCallbackTag, JSDocComment, JSDocDeprecatedTag, JSDocFullName, JSDocImplementsTag, JSDocImportTag, JSDocLink, JSDocLinkCode, JSDocLinkPlain, JSDocNameReference, JSDocNonNullableType, JSDocNullableType, JSDocOptionalType, JSDocOverloadTag, JSDocOverrideTag, JSDocParameterTag, JSDocPrivateTag, JSDocPropertyTag, JSDocProtectedTag, JSDocPublicTag, JSDocReadonlyTag, JSDocReturnTag, JSDocSatisfiesTag, JSDocSeeTag, JSDocSignature, JSDocTag, JSDocTemplateTag, JSDocText, JSDocThisTag, JSDocThrowsTag, JSDocTypedefTag, JSDocTypeExpression, JSDocTypeLiteral, JSDocTypeTag, JSDocUnknownTag, JSDocVariadicType, JsxAttribute, JsxAttributeLike, JsxAttributeName, JsxAttributes, JsxAttributeValue, JsxChild, JsxClosingElement, JsxClosingFragment, JsxElement, JsxExpression, JsxFragment, JsxNamespacedName, JsxOpeningElement, JsxOpeningFragment, JsxSelfClosingElement, JsxSpreadAttribute, JsxTagNameExpression, JsxText, KeywordExpression, KeywordExpressionSyntaxKind, KeywordTypeNode, KeywordTypeSyntaxKind, LabeledStatement, LeftHandSideExpression, LiteralTypeNode, MappedTypeNode, MemberName, MetaProperty, MethodDeclaration, MethodSignatureDeclaration, MinusToken, MissingDeclaration, ModifierLike, ModuleBlock, ModuleBody, ModuleDeclaration, ModuleExportName, ModuleName, ModuleReference, NamedExportBindings, NamedExports, NamedImportBindings, NamedImports, NamedTupleMember, NamespaceExport, NamespaceExportDeclaration, NamespaceImport, NewExpression, Node, NodeArray, NonNullExpression, NoSubstitutionTemplateLiteral, NotEmittedStatement, NotEmittedTypeElement, NumericLiteral, ObjectBindingPattern, ObjectLiteralElementLike, ObjectLiteralExpression, OmittedExpression, OptionalTypeNode, ParameterDeclaration, ParenthesizedExpression, ParenthesizedTypeNode, PartiallyEmittedExpression, Path, PlusToken, PostfixUnaryExpression, PrefixUnaryExpression, PrivateIdentifier, PropertyAccessExpression, PropertyAssignment, PropertyDeclaration, PropertyName, PropertySignatureDeclaration, QualifiedName, QuestionDotToken, QuestionToken, ReadonlyKeyword, RegularExpressionLiteral, RestTypeNode, ReturnStatement, SatisfiesExpression, SemicolonClassElement, SetAccessorDeclaration, ShorthandPropertyAssignment, SourceFile, SpreadAssignment, SpreadElement, Statement, StringLiteral, SwitchStatement, SyntaxList, SyntheticExpression, SyntheticReferenceExpression, TaggedTemplateExpression, TemplateExpression, TemplateHead, TemplateLiteral, TemplateLiteralTypeNode, TemplateLiteralTypeSpan, TemplateMiddle, TemplateMiddleOrTail, TemplateSpan, TemplateTail, ThisTypeNode, ThrowStatement, Token, TokenSyntaxKind, TryStatement, TupleTypeNode, TypeAliasDeclaration, TypeAssertion, TypeElement, TypeLiteralNode, TypeNode, TypeOfExpression, TypeOperatorNode, TypeParameterDeclaration, TypePredicateNode, TypePredicateParameterName, TypeQueryNode, TypeReferenceNode, UnionTypeNode, VariableDeclaration, VariableDeclarationList, VariableStatement, VoidExpression, WhileStatement, WithStatement, YieldExpression } from "./ast.ts"; +export declare class NodeObject { + readonly kind: SyntaxKind; + flags: NodeFlags; + readonly pos: number; + readonly end: number; + parent: Node; + _data: any; + constructor(kind: SyntaxKind, data: any); + get ambientModuleNames(): any; + get argument(): any; + get argumentExpression(): any; + get arguments(): any; + get assertsModifier(): any; + get asteriskToken(): any; + get attributes(): any; + get awaitModifier(): any; + get block(): any; + get body(): any; + get caseBlock(): any; + get catchClause(): any; + get checkType(): any; + get children(): any; + get className(): any; + get clauses(): any; + get closingElement(): any; + get closingFragment(): any; + get colonToken(): any; + get comment(): any; + get condition(): any; + get constraint(): any; + get containsOnlyTriviaWhiteSpaces(): any; + get declarationList(): any; + get declarations(): any; + get defaultType(): any; + get dotDotDotToken(): any; + get elementType(): any; + get elements(): any; + get elseStatement(): any; + get endOfFileToken(): any; + get equalsGreaterThanToken(): any; + get equalsToken(): any; + get exclamationToken(): any; + get exportClause(): any; + get exprName(): any; + get expression(): any; + get extendsType(): any; + get externalModuleIndicator(): any; + get falseType(): any; + get fileName(): any; + get finallyBlock(): any; + get head(): any; + get heritageClauses(): any; + get importClause(): any; + get imports(): any; + get incrementor(): any; + get indexType(): any; + get initializer(): any; + get isArrayType(): any; + get isBracketed(): any; + get isDeclarationFile(): any; + get isExportEquals(): any; + get isNameFirst(): any; + get isSpread(): any; + get isTypeOf(): any; + get isTypeOnly(): any; + get jsdocPropertyTags(): any; + get keyword(): any; + get keywordToken(): any; + get label(): any; + get languageVariant(): any; + get left(): any; + get libReferenceDirectives(): any; + get literal(): any; + get members(): any; + get modifiers(): any; + get moduleAugmentations(): any; + get moduleReference(): any; + get moduleSpecifier(): any; + get multiLine(): any; + get name(): any; + get nameExpression(): any; + get nameType(): any; + get namedBindings(): any; + get namespace(): any; + get objectAssignmentInitializer(): any; + get objectType(): any; + get openingElement(): any; + get openingFragment(): any; + get operand(): any; + get operator(): any; + get operatorToken(): any; + get parameterName(): any; + get parameters(): any; + get path(): any; + get phaseModifier(): any; + get postfixToken(): any; + get properties(): any; + get propertyName(): any; + get qualifier(): any; + get questionDotToken(): any; + get questionToken(): any; + get rawText(): any; + get readonlyToken(): any; + get referencedFiles(): any; + get right(): any; + get scriptKind(): any; + get statement(): any; + get statements(): any; + get tag(): any; + get tagName(): any; + get tags(): any; + get template(): any; + get templateFlags(): any; + get templateSpans(): any; + get text(): any; + get thenStatement(): any; + get thisArg(): any; + get token(): any; + get tokenCache(): any; + get tokenFlags(): any; + get trueType(): any; + get tryBlock(): any; + get tupleNameSource(): any; + get type(): any; + get typeArguments(): any; + get typeExpression(): any; + get typeName(): any; + get typeParameter(): any; + get typeParameters(): any; + get typeReferenceDirectives(): any; + get types(): any; + get value(): any; + get variableDeclaration(): any; + get whenFalse(): any; + get whenTrue(): any; + forEachChild(visitor: (node: Node) => T, visitArray?: (nodes: NodeArray) => T): T | undefined; + getSourceFile(): SourceFile; + getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number; + getFullStart(): number; + getEnd(): number; + getWidth(sourceFile?: SourceFile): number; + getFullWidth(): number; + getLeadingTriviaWidth(sourceFile?: SourceFile): number; + getFullText(sourceFile?: SourceFile): string; + getText(sourceFile?: SourceFile): string; +} +export declare function createNodeArray(elements: readonly T[], pos?: number, end?: number): NodeArray; +export declare function cloneNode(node: T): T; +export declare function createToken(kind: TKind): Token; +export declare function createIdentifier(text: string): Identifier; +export declare function createPrivateIdentifier(text: string): PrivateIdentifier; +export declare function createQualifiedName(left: EntityName, right: Identifier): QualifiedName; +export declare function createComputedPropertyName(expression: Expression): ComputedPropertyName; +export declare function createDecorator(expression: LeftHandSideExpression): Decorator; +export declare function createEmptyStatement(): EmptyStatement; +export declare function createIfStatement(expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement; +export declare function createDoStatement(statement: Statement, expression: Expression): DoStatement; +export declare function createWhileStatement(expression: Expression, statement: Statement): WhileStatement; +export declare function createForStatement(initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement; +export declare function createBreakStatement(label?: Identifier): BreakStatement; +export declare function createContinueStatement(label?: Identifier): ContinueStatement; +export declare function createReturnStatement(expression?: Expression): ReturnStatement; +export declare function createWithStatement(expression: Expression, statement: Statement): WithStatement; +export declare function createSwitchStatement(expression: Expression, caseBlock: CaseBlock): SwitchStatement; +export declare function createCaseBlock(clauses: readonly CaseOrDefaultClause[]): CaseBlock; +export declare function createThrowStatement(expression: Expression): ThrowStatement; +export declare function createTryStatement(tryBlock: Block, catchClause?: CatchClause, finallyBlock?: Block): TryStatement; +export declare function createCatchClause(variableDeclaration: VariableDeclaration | undefined, block: Block): CatchClause; +export declare function createDebuggerStatement(): DebuggerStatement; +export declare function createLabeledStatement(label: Identifier, statement: Statement): LabeledStatement; +export declare function createExpressionStatement(expression: Expression): ExpressionStatement; +export declare function createBlock(statements: readonly Statement[], multiLine?: boolean): Block; +export declare function createVariableStatement(modifiers: readonly ModifierLike[] | undefined, declarationList: VariableDeclarationList): VariableStatement; +export declare function createVariableDeclaration(name: BindingName, exclamationToken?: ExclamationToken, type?: TypeNode, initializer?: Expression): VariableDeclaration; +export declare function createVariableDeclarationList(declarations: readonly VariableDeclaration[], flags: NodeFlags): VariableDeclarationList; +export declare function createParameterDeclaration(modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration; +export declare function createBindingElement(dotDotDotToken?: DotDotDotToken, propertyName?: PropertyName, name?: BindingName, initializer?: Expression): BindingElement; +export declare function createMissingDeclaration(modifiers?: readonly ModifierLike[]): MissingDeclaration; +export declare function createFunctionDeclaration(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): FunctionDeclaration; +export declare function createClassDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; +export declare function createClassExpression(modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; +export declare function createHeritageClause(token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword, types: readonly ExpressionWithTypeArguments[]): HeritageClause; +export declare function createInterfaceDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; +export declare function createTypeAliasDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; +export declare function createEnumMember(name: PropertyName, initializer?: Expression): EnumMember; +export declare function createEnumDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; +export declare function createModuleBlock(statements: readonly Statement[]): ModuleBlock; +export declare function createNotEmittedStatement(): NotEmittedStatement; +export declare function createNotEmittedTypeElement(): NotEmittedTypeElement; +export declare function createImportDeclaration(modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes): ImportDeclaration; +export declare function createExternalModuleReference(expression: Expression): ExternalModuleReference; +export declare function createNamespaceImport(name: Identifier): NamespaceImport; +export declare function createNamedImports(elements: readonly ImportSpecifier[]): NamedImports; +export declare function createExportAssignment(modifiers: readonly ModifierLike[] | undefined, isExportEquals: boolean | undefined, type: TypeNode, expression: Expression): ExportAssignment; +export declare function createNamespaceExportDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier): NamespaceExportDeclaration; +export declare function createNamespaceExport(name: ModuleExportName): NamespaceExport; +export declare function createNamedExports(elements: readonly ExportSpecifier[]): NamedExports; +export declare function createExportSpecifier(isTypeOnly: boolean | undefined, propertyName: ModuleExportName | undefined, name: ModuleExportName): ExportSpecifier; +export declare function createCallSignatureDeclaration(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): CallSignatureDeclaration; +export declare function createConstructSignatureDeclaration(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): ConstructSignatureDeclaration; +export declare function createConstructorDeclaration(modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): ConstructorDeclaration; +export declare function createGetAccessorDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): GetAccessorDeclaration; +export declare function createSetAccessorDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): SetAccessorDeclaration; +export declare function createIndexSignatureDeclaration(modifiers: readonly ModifierLike[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; +export declare function createMethodSignatureDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): MethodSignatureDeclaration; +export declare function createMethodDeclaration(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): MethodDeclaration; +export declare function createPropertySignatureDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, initializer: Expression): PropertySignatureDeclaration; +export declare function createPropertyDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken?: QuestionToken | ExclamationToken, type?: TypeNode, initializer?: Expression): PropertyDeclaration; +export declare function createSemicolonClassElement(): SemicolonClassElement; +export declare function createClassStaticBlockDeclaration(modifiers: readonly ModifierLike[] | undefined, body: Block): ClassStaticBlockDeclaration; +export declare function createOmittedExpression(): OmittedExpression; +export declare function createKeywordExpression(kind: TKind): KeywordExpression; +export declare function createStringLiteral(text: string, tokenFlags: TokenFlags): StringLiteral; +export declare function createNumericLiteral(text: string, tokenFlags: TokenFlags): NumericLiteral; +export declare function createBigIntLiteral(text: string, tokenFlags: TokenFlags): BigIntLiteral; +export declare function createRegularExpressionLiteral(text: string, tokenFlags: TokenFlags): RegularExpressionLiteral; +export declare function createNoSubstitutionTemplateLiteral(text: string, templateFlags: TokenFlags): NoSubstitutionTemplateLiteral; +export declare function createBinaryExpression(modifiers: readonly ModifierLike[] | undefined, left: Expression, type: TypeNode | undefined, operatorToken: BinaryOperatorToken, right: Expression): BinaryExpression; +export declare function createPrefixUnaryExpression(operator: SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken, operand: Expression): PrefixUnaryExpression; +export declare function createPostfixUnaryExpression(operand: Expression, operator: SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken): PostfixUnaryExpression; +export declare function createYieldExpression(asteriskToken?: AsteriskToken, expression?: Expression): YieldExpression; +export declare function createArrowFunction(modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction; +export declare function createFunctionExpression(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: FunctionBody): FunctionExpression; +export declare function createAsExpression(expression: Expression, type: TypeNode): AsExpression; +export declare function createSatisfiesExpression(expression: Expression, type: TypeNode): SatisfiesExpression; +export declare function createConditionalExpression(condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression; +export declare function createPropertyAccessExpression(expression: Expression, questionDotToken: QuestionDotToken | undefined, name: MemberName, flags: NodeFlags): PropertyAccessExpression; +export declare function createElementAccessExpression(expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression, flags: NodeFlags): ElementAccessExpression; +export declare function createCallExpression(expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, arguments_: readonly Expression[], flags: NodeFlags): CallExpression; +export declare function createNewExpression(expression: Expression, typeArguments?: readonly TypeNode[], arguments_?: readonly Expression[]): NewExpression; +export declare function createMetaProperty(keywordToken: SyntaxKind.ImportKeyword | SyntaxKind.NewKeyword, name: Identifier): MetaProperty; +export declare function createNonNullExpression(expression: Expression, flags: NodeFlags): NonNullExpression; +export declare function createSpreadElement(expression: Expression): SpreadElement; +export declare function createTemplateExpression(head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression; +export declare function createTemplateSpan(expression: Expression, literal: TemplateMiddleOrTail): TemplateSpan; +export declare function createTaggedTemplateExpression(tag: Expression, questionDotToken: QuestionDotToken, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral, flags: NodeFlags): TaggedTemplateExpression; +export declare function createParenthesizedExpression(expression: Expression): ParenthesizedExpression; +export declare function createArrayLiteralExpression(elements: readonly Expression[], multiLine?: boolean): ArrayLiteralExpression; +export declare function createObjectLiteralExpression(properties: readonly ObjectLiteralElementLike[], multiLine?: boolean): ObjectLiteralExpression; +export declare function createSpreadAssignment(expression: Expression): SpreadAssignment; +export declare function createPropertyAssignment(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, initializer: Expression): PropertyAssignment; +export declare function createShorthandPropertyAssignment(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, equalsToken?: EqualsToken, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment; +export declare function createDeleteExpression(expression: Expression): DeleteExpression; +export declare function createTypeOfExpression(expression: Expression): TypeOfExpression; +export declare function createVoidExpression(expression: Expression): VoidExpression; +export declare function createAwaitExpression(expression: Expression): AwaitExpression; +export declare function createTypeAssertion(type: TypeNode, expression: Expression): TypeAssertion; +export declare function createKeywordTypeNode(kind: TKind): KeywordTypeNode; +export declare function createUnionTypeNode(types: readonly TypeNode[]): UnionTypeNode; +export declare function createIntersectionTypeNode(types: readonly TypeNode[]): IntersectionTypeNode; +export declare function createConditionalTypeNode(checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode; +export declare function createTypeOperatorNode(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.UniqueKeyword, type: TypeNode): TypeOperatorNode; +export declare function createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode; +export declare function createArrayTypeNode(elementType: TypeNode): ArrayTypeNode; +export declare function createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; +export declare function createTypeReferenceNode(typeName: EntityName, typeArguments?: readonly TypeNode[]): TypeReferenceNode; +export declare function createExpressionWithTypeArguments(expression: Expression, typeArguments?: readonly TypeNode[]): ExpressionWithTypeArguments; +export declare function createLiteralTypeNode(literal: Node): LiteralTypeNode; +export declare function createThisTypeNode(): ThisTypeNode; +export declare function createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: TypePredicateParameterName, type?: TypeNode): TypePredicateNode; +export declare function createImportAttribute(name: ImportAttributeName, value: Expression): ImportAttribute; +export declare function createImportAttributes(token: SyntaxKind.WithKeyword | SyntaxKind.AssertKeyword, attributes: readonly ImportAttribute[], multiLine?: boolean): ImportAttributes; +export declare function createTypeQueryNode(exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode; +export declare function createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType?: TypeNode, questionToken?: QuestionToken | PlusToken | MinusToken, type?: TypeNode, members?: readonly TypeElement[]): MappedTypeNode; +export declare function createTypeLiteralNode(members: readonly TypeElement[]): TypeLiteralNode; +export declare function createTupleTypeNode(elements: readonly TypeNode[]): TupleTypeNode; +export declare function createNamedTupleMember(dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember; +export declare function createOptionalTypeNode(type: TypeNode): OptionalTypeNode; +export declare function createRestTypeNode(type: TypeNode): RestTypeNode; +export declare function createParenthesizedTypeNode(type: TypeNode): ParenthesizedTypeNode; +export declare function createFunctionTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): FunctionTypeNode; +export declare function createConstructorTypeNode(modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): ConstructorTypeNode; +export declare function createTemplateHead(text: string, rawText: string, templateFlags: TokenFlags): TemplateHead; +export declare function createTemplateMiddle(text: string, rawText: string, templateFlags: TokenFlags): TemplateMiddle; +export declare function createTemplateTail(text: string, rawText: string, templateFlags: TokenFlags): TemplateTail; +export declare function createTemplateLiteralTypeNode(head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; +export declare function createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddleOrTail): TemplateLiteralTypeSpan; +export declare function createSyntheticExpression(type: any, isSpread?: boolean, tupleNameSource?: Node): SyntheticExpression; +export declare function createPartiallyEmittedExpression(expression: Expression): PartiallyEmittedExpression; +export declare function createJsxElement(openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement; +export declare function createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes; +export declare function createJsxNamespacedName(namespace: Identifier, name: Identifier): JsxNamespacedName; +export declare function createJsxOpeningElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement; +export declare function createJsxSelfClosingElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement; +export declare function createJsxFragment(openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment; +export declare function createJsxOpeningFragment(): JsxOpeningFragment; +export declare function createJsxClosingFragment(): JsxClosingFragment; +export declare function createJsxAttribute(name: JsxAttributeName, initializer?: JsxAttributeValue): JsxAttribute; +export declare function createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute; +export declare function createJsxClosingElement(tagName: JsxTagNameExpression): JsxClosingElement; +export declare function createJsxExpression(dotDotDotToken?: DotDotDotToken, expression?: Expression): JsxExpression; +export declare function createJsxText(text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText; +export declare function createSyntaxList(children: readonly Node[]): SyntaxList; +export declare function createJSDoc(comment: readonly JSDocComment[], tags?: readonly JSDocTag[]): JSDoc; +export declare function createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression; +export declare function createJSDocNonNullableType(type: TypeNode): JSDocNonNullableType; +export declare function createJSDocNullableType(type: TypeNode): JSDocNullableType; +export declare function createJSDocAllType(): JSDocAllType; +export declare function createJSDocVariadicType(type: TypeNode): JSDocVariadicType; +export declare function createJSDocOptionalType(type: TypeNode): JSDocOptionalType; +export declare function createJSDocTypeTag(tagName: Identifier, typeExpression: Node, comment?: readonly JSDocComment[]): JSDocTypeTag; +export declare function createJSDocUnknownTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocUnknownTag; +export declare function createJSDocTemplateTag(tagName: Identifier, constraint: Node, typeParameters: readonly TypeParameterDeclaration[], comment?: readonly JSDocComment[]): JSDocTemplateTag; +export declare function createJSDocReturnTag(tagName: Identifier, typeExpression?: TypeNode, comment?: readonly JSDocComment[]): JSDocReturnTag; +export declare function createJSDocPublicTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocPublicTag; +export declare function createJSDocPrivateTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocPrivateTag; +export declare function createJSDocProtectedTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocProtectedTag; +export declare function createJSDocReadonlyTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocReadonlyTag; +export declare function createJSDocOverrideTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocOverrideTag; +export declare function createJSDocDeprecatedTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocDeprecatedTag; +export declare function createJSDocSeeTag(tagName: Identifier, nameExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocSeeTag; +export declare function createJSDocImplementsTag(tagName: Identifier, className: ExpressionWithTypeArguments, comment?: readonly JSDocComment[]): JSDocImplementsTag; +export declare function createJSDocAugmentsTag(tagName: Identifier, className: ExpressionWithTypeArguments, comment?: readonly JSDocComment[]): JSDocAugmentsTag; +export declare function createJSDocSatisfiesTag(tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocSatisfiesTag; +export declare function createJSDocThrowsTag(tagName: Identifier, typeExpression?: TypeNode, comment?: readonly JSDocComment[]): JSDocThrowsTag; +export declare function createJSDocThisTag(tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocThisTag; +export declare function createJSDocImportTag(tagName: Identifier, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes, comment?: readonly JSDocComment[]): JSDocImportTag; +export declare function createJSDocCallbackTag(tagName: Identifier, typeExpression: TypeNode, name?: JSDocFullName, comment?: readonly JSDocComment[]): JSDocCallbackTag; +export declare function createJSDocOverloadTag(tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocOverloadTag; +export declare function createJSDocTypedefTag(tagName: Identifier, typeExpression?: Node, name?: JSDocFullName, comment?: readonly JSDocComment[]): JSDocTypedefTag; +export declare function createJSDocSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): JSDocSignature; +export declare function createJSDocNameReference(name: EntityName): JSDocNameReference; +export declare function createModuleDeclaration(modifiers: readonly ModifierLike[] | undefined, keyword: SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword, name: ModuleName, body?: ModuleBody): ModuleDeclaration; +export declare function createImportEqualsDeclaration(modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean | undefined, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; +export declare function createExportDeclaration(modifiers?: readonly ModifierLike[], isTypeOnly?: boolean, exportClause?: NamedExportBindings, moduleSpecifier?: Expression, attributes?: ImportAttributes): ExportDeclaration; +export declare function createImportTypeNode(isTypeOf: boolean | undefined, argument: TypeNode, attributes?: ImportAttributes, qualifier?: EntityName, typeArguments?: readonly TypeNode[]): ImportTypeNode; +export declare function createImportClause(phaseModifier?: ImportPhaseModifierSyntaxKind, name?: Identifier, namedBindings?: NamedImportBindings): ImportClause; +export declare function createImportSpecifier(isTypeOnly: boolean | undefined, propertyName: ModuleExportName | undefined, name: Identifier): ImportSpecifier; +export declare function createJSDocText(text: string): JSDocText; +export declare function createJSDocLink(name: EntityName | undefined, text: string): JSDocLink; +export declare function createJSDocLinkPlain(name: EntityName | undefined, text: string): JSDocLinkPlain; +export declare function createJSDocLinkCode(name: EntityName | undefined, text: string): JSDocLinkCode; +export declare function createTypeParameterDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier, constraint?: TypeNode, expression?: Expression, defaultType?: TypeNode): TypeParameterDeclaration; +export declare function createSyntheticReferenceExpression(expression: Expression, thisArg: Expression): SyntheticReferenceExpression; +export declare function createJSDocTypeLiteral(jsdocPropertyTags?: readonly JSDocTag[], isArrayType?: boolean): JSDocTypeLiteral; +export declare function createForInStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement; +export declare function createForOfStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement; +export declare function createCaseClause(expression: Expression, statements: readonly Statement[]): CaseClause; +export declare function createDefaultClause(expression: Expression, statements: readonly Statement[]): DefaultClause; +export declare function createObjectBindingPattern(elements: readonly BindingElement[]): ObjectBindingPattern; +export declare function createArrayBindingPattern(elements: readonly BindingElement[]): ArrayBindingPattern; +export declare function createJSDocParameterTag(tagName: Identifier, name: EntityName, isBracketed: boolean, typeExpression: TypeNode | undefined, isNameFirst: boolean, comment: readonly JSDocComment[] | undefined): JSDocParameterTag; +export declare function createJSDocPropertyTag(tagName: Identifier, name: EntityName, isBracketed: boolean, typeExpression: TypeNode | undefined, isNameFirst: boolean, comment: readonly JSDocComment[] | undefined): JSDocPropertyTag; +export declare function updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName; +export declare function updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName; +export declare function updateDecorator(node: Decorator, expression: LeftHandSideExpression): Decorator; +export declare function updateIfStatement(node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement; +export declare function updateDoStatement(node: DoStatement, statement: Statement, expression: Expression): DoStatement; +export declare function updateWhileStatement(node: WhileStatement, expression: Expression, statement: Statement): WhileStatement; +export declare function updateForStatement(node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement; +export declare function updateBreakStatement(node: BreakStatement, label?: Identifier): BreakStatement; +export declare function updateContinueStatement(node: ContinueStatement, label?: Identifier): ContinueStatement; +export declare function updateReturnStatement(node: ReturnStatement, expression?: Expression): ReturnStatement; +export declare function updateWithStatement(node: WithStatement, expression: Expression, statement: Statement): WithStatement; +export declare function updateSwitchStatement(node: SwitchStatement, expression: Expression, caseBlock: CaseBlock): SwitchStatement; +export declare function updateCaseBlock(node: CaseBlock, clauses: readonly CaseOrDefaultClause[]): CaseBlock; +export declare function updateThrowStatement(node: ThrowStatement, expression: Expression): ThrowStatement; +export declare function updateTryStatement(node: TryStatement, tryBlock: Block, catchClause?: CatchClause, finallyBlock?: Block): TryStatement; +export declare function updateCatchClause(node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block): CatchClause; +export declare function updateLabeledStatement(node: LabeledStatement, label: Identifier, statement: Statement): LabeledStatement; +export declare function updateExpressionStatement(node: ExpressionStatement, expression: Expression): ExpressionStatement; +export declare function updateBlock(node: Block, statements: readonly Statement[]): Block; +export declare function updateVariableStatement(node: VariableStatement, modifiers: readonly ModifierLike[] | undefined, declarationList: VariableDeclarationList): VariableStatement; +export declare function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, exclamationToken?: ExclamationToken, type?: TypeNode, initializer?: Expression): VariableDeclaration; +export declare function updateVariableDeclarationList(node: VariableDeclarationList, declarations: readonly VariableDeclaration[]): VariableDeclarationList; +export declare function updateParameterDeclaration(node: ParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration; +export declare function updateBindingElement(node: BindingElement, dotDotDotToken?: DotDotDotToken, propertyName?: PropertyName, name?: BindingName, initializer?: Expression): BindingElement; +export declare function updateMissingDeclaration(node: MissingDeclaration, modifiers?: readonly ModifierLike[]): MissingDeclaration; +export declare function updateFunctionDeclaration(node: FunctionDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): FunctionDeclaration; +export declare function updateClassDeclaration(node: ClassDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; +export declare function updateClassExpression(node: ClassExpression, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; +export declare function updateHeritageClause(node: HeritageClause, types: readonly ExpressionWithTypeArguments[]): HeritageClause; +export declare function updateInterfaceDeclaration(node: InterfaceDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; +export declare function updateTypeAliasDeclaration(node: TypeAliasDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; +export declare function updateEnumMember(node: EnumMember, name: PropertyName, initializer?: Expression): EnumMember; +export declare function updateEnumDeclaration(node: EnumDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; +export declare function updateModuleBlock(node: ModuleBlock, statements: readonly Statement[]): ModuleBlock; +export declare function updateImportDeclaration(node: ImportDeclaration, modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes): ImportDeclaration; +export declare function updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference; +export declare function updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport; +export declare function updateNamedImports(node: NamedImports, elements: readonly ImportSpecifier[]): NamedImports; +export declare function updateExportAssignment(node: ExportAssignment, modifiers: readonly ModifierLike[] | undefined, type: TypeNode, expression: Expression): ExportAssignment; +export declare function updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier): NamespaceExportDeclaration; +export declare function updateNamespaceExport(node: NamespaceExport, name: ModuleExportName): NamespaceExport; +export declare function updateNamedExports(node: NamedExports, elements: readonly ExportSpecifier[]): NamedExports; +export declare function updateExportSpecifier(node: ExportSpecifier, propertyName: ModuleExportName | undefined, name: ModuleExportName): ExportSpecifier; +export declare function updateCallSignatureDeclaration(node: CallSignatureDeclaration, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): CallSignatureDeclaration; +export declare function updateConstructSignatureDeclaration(node: ConstructSignatureDeclaration, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): ConstructSignatureDeclaration; +export declare function updateConstructorDeclaration(node: ConstructorDeclaration, modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): ConstructorDeclaration; +export declare function updateGetAccessorDeclaration(node: GetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): GetAccessorDeclaration; +export declare function updateSetAccessorDeclaration(node: SetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): SetAccessorDeclaration; +export declare function updateIndexSignatureDeclaration(node: IndexSignatureDeclaration, modifiers: readonly ModifierLike[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; +export declare function updateMethodSignatureDeclaration(node: MethodSignatureDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): MethodSignatureDeclaration; +export declare function updateMethodDeclaration(node: MethodDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): MethodDeclaration; +export declare function updatePropertySignatureDeclaration(node: PropertySignatureDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, initializer: Expression): PropertySignatureDeclaration; +export declare function updatePropertyDeclaration(node: PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken?: QuestionToken | ExclamationToken, type?: TypeNode, initializer?: Expression): PropertyDeclaration; +export declare function updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, modifiers: readonly ModifierLike[] | undefined, body: Block): ClassStaticBlockDeclaration; +export declare function updateBinaryExpression(node: BinaryExpression, modifiers: readonly ModifierLike[] | undefined, left: Expression, type: TypeNode | undefined, operatorToken: BinaryOperatorToken, right: Expression): BinaryExpression; +export declare function updatePrefixUnaryExpression(node: PrefixUnaryExpression, operand: Expression): PrefixUnaryExpression; +export declare function updatePostfixUnaryExpression(node: PostfixUnaryExpression, operand: Expression): PostfixUnaryExpression; +export declare function updateYieldExpression(node: YieldExpression, asteriskToken?: AsteriskToken, expression?: Expression): YieldExpression; +export declare function updateArrowFunction(node: ArrowFunction, modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction; +export declare function updateFunctionExpression(node: FunctionExpression, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: FunctionBody): FunctionExpression; +export declare function updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression; +export declare function updateSatisfiesExpression(node: SatisfiesExpression, expression: Expression, type: TypeNode): SatisfiesExpression; +export declare function updateConditionalExpression(node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression; +export declare function updatePropertyAccessExpression(node: PropertyAccessExpression, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: MemberName): PropertyAccessExpression; +export declare function updateElementAccessExpression(node: ElementAccessExpression, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression): ElementAccessExpression; +export declare function updateCallExpression(node: CallExpression, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, arguments_: readonly Expression[]): CallExpression; +export declare function updateNewExpression(node: NewExpression, expression: Expression, typeArguments?: readonly TypeNode[], arguments_?: readonly Expression[]): NewExpression; +export declare function updateMetaProperty(node: MetaProperty, name: Identifier): MetaProperty; +export declare function updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression; +export declare function updateSpreadElement(node: SpreadElement, expression: Expression): SpreadElement; +export declare function updateTemplateExpression(node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression; +export declare function updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddleOrTail): TemplateSpan; +export declare function updateTaggedTemplateExpression(node: TaggedTemplateExpression, tag: Expression, questionDotToken: QuestionDotToken, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; +export declare function updateParenthesizedExpression(node: ParenthesizedExpression, expression: Expression): ParenthesizedExpression; +export declare function updateArrayLiteralExpression(node: ArrayLiteralExpression, elements: readonly Expression[]): ArrayLiteralExpression; +export declare function updateObjectLiteralExpression(node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]): ObjectLiteralExpression; +export declare function updateSpreadAssignment(node: SpreadAssignment, expression: Expression): SpreadAssignment; +export declare function updatePropertyAssignment(node: PropertyAssignment, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, initializer: Expression): PropertyAssignment; +export declare function updateShorthandPropertyAssignment(node: ShorthandPropertyAssignment, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, equalsToken?: EqualsToken, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment; +export declare function updateDeleteExpression(node: DeleteExpression, expression: Expression): DeleteExpression; +export declare function updateTypeOfExpression(node: TypeOfExpression, expression: Expression): TypeOfExpression; +export declare function updateVoidExpression(node: VoidExpression, expression: Expression): VoidExpression; +export declare function updateAwaitExpression(node: AwaitExpression, expression: Expression): AwaitExpression; +export declare function updateTypeAssertion(node: TypeAssertion, type: TypeNode, expression: Expression): TypeAssertion; +export declare function updateUnionTypeNode(node: UnionTypeNode, types: readonly TypeNode[]): UnionTypeNode; +export declare function updateIntersectionTypeNode(node: IntersectionTypeNode, types: readonly TypeNode[]): IntersectionTypeNode; +export declare function updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode; +export declare function updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode; +export declare function updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode; +export declare function updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode; +export declare function updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; +export declare function updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments?: readonly TypeNode[]): TypeReferenceNode; +export declare function updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, expression: Expression, typeArguments?: readonly TypeNode[]): ExpressionWithTypeArguments; +export declare function updateLiteralTypeNode(node: LiteralTypeNode, literal: Node): LiteralTypeNode; +export declare function updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: TypePredicateParameterName, type?: TypeNode): TypePredicateNode; +export declare function updateImportAttribute(node: ImportAttribute, name: ImportAttributeName, value: Expression): ImportAttribute; +export declare function updateImportAttributes(node: ImportAttributes, attributes: readonly ImportAttribute[]): ImportAttributes; +export declare function updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode; +export declare function updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType?: TypeNode, questionToken?: QuestionToken | PlusToken | MinusToken, type?: TypeNode, members?: readonly TypeElement[]): MappedTypeNode; +export declare function updateTypeLiteralNode(node: TypeLiteralNode, members: readonly TypeElement[]): TypeLiteralNode; +export declare function updateTupleTypeNode(node: TupleTypeNode, elements: readonly TypeNode[]): TupleTypeNode; +export declare function updateNamedTupleMember(node: NamedTupleMember, dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember; +export declare function updateOptionalTypeNode(node: OptionalTypeNode, type: TypeNode): OptionalTypeNode; +export declare function updateRestTypeNode(node: RestTypeNode, type: TypeNode): RestTypeNode; +export declare function updateParenthesizedTypeNode(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode; +export declare function updateFunctionTypeNode(node: FunctionTypeNode, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): FunctionTypeNode; +export declare function updateConstructorTypeNode(node: ConstructorTypeNode, modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): ConstructorTypeNode; +export declare function updateTemplateLiteralTypeNode(node: TemplateLiteralTypeNode, head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; +export declare function updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddleOrTail): TemplateLiteralTypeSpan; +export declare function updateSyntheticExpression(node: SyntheticExpression, tupleNameSource?: Node): SyntheticExpression; +export declare function updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression; +export declare function updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement; +export declare function updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes; +export declare function updateJsxNamespacedName(node: JsxNamespacedName, namespace: Identifier, name: Identifier): JsxNamespacedName; +export declare function updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement; +export declare function updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement; +export declare function updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment; +export declare function updateJsxAttribute(node: JsxAttribute, name: JsxAttributeName, initializer?: JsxAttributeValue): JsxAttribute; +export declare function updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute; +export declare function updateJsxClosingElement(node: JsxClosingElement, tagName: JsxTagNameExpression): JsxClosingElement; +export declare function updateJsxExpression(node: JsxExpression, dotDotDotToken?: DotDotDotToken, expression?: Expression): JsxExpression; +export declare function updateSyntaxList(node: SyntaxList, children: readonly Node[]): SyntaxList; +export declare function updateJSDoc(node: JSDoc, comment: readonly JSDocComment[], tags?: readonly JSDocTag[]): JSDoc; +export declare function updateJSDocTypeExpression(node: JSDocTypeExpression, type: TypeNode): JSDocTypeExpression; +export declare function updateJSDocNonNullableType(node: JSDocNonNullableType, type: TypeNode): JSDocNonNullableType; +export declare function updateJSDocNullableType(node: JSDocNullableType, type: TypeNode): JSDocNullableType; +export declare function updateJSDocVariadicType(node: JSDocVariadicType, type: TypeNode): JSDocVariadicType; +export declare function updateJSDocOptionalType(node: JSDocOptionalType, type: TypeNode): JSDocOptionalType; +export declare function updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier, typeExpression: Node, comment?: readonly JSDocComment[]): JSDocTypeTag; +export declare function updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocUnknownTag; +export declare function updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier, constraint: Node, typeParameters: readonly TypeParameterDeclaration[], comment?: readonly JSDocComment[]): JSDocTemplateTag; +export declare function updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier, typeExpression?: TypeNode, comment?: readonly JSDocComment[]): JSDocReturnTag; +export declare function updateJSDocPublicTag(node: JSDocPublicTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocPublicTag; +export declare function updateJSDocPrivateTag(node: JSDocPrivateTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocPrivateTag; +export declare function updateJSDocProtectedTag(node: JSDocProtectedTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocProtectedTag; +export declare function updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocReadonlyTag; +export declare function updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocOverrideTag; +export declare function updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocDeprecatedTag; +export declare function updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier, nameExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocSeeTag; +export declare function updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier, className: ExpressionWithTypeArguments, comment?: readonly JSDocComment[]): JSDocImplementsTag; +export declare function updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier, className: ExpressionWithTypeArguments, comment?: readonly JSDocComment[]): JSDocAugmentsTag; +export declare function updateJSDocSatisfiesTag(node: JSDocSatisfiesTag, tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocSatisfiesTag; +export declare function updateJSDocThrowsTag(node: JSDocThrowsTag, tagName: Identifier, typeExpression?: TypeNode, comment?: readonly JSDocComment[]): JSDocThrowsTag; +export declare function updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocThisTag; +export declare function updateJSDocImportTag(node: JSDocImportTag, tagName: Identifier, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes, comment?: readonly JSDocComment[]): JSDocImportTag; +export declare function updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier, typeExpression: TypeNode, name?: JSDocFullName, comment?: readonly JSDocComment[]): JSDocCallbackTag; +export declare function updateJSDocOverloadTag(node: JSDocOverloadTag, tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocOverloadTag; +export declare function updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier, typeExpression?: Node, name?: JSDocFullName, comment?: readonly JSDocComment[]): JSDocTypedefTag; +export declare function updateJSDocSignature(node: JSDocSignature, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): JSDocSignature; +export declare function updateJSDocNameReference(node: JSDocNameReference, name: EntityName): JSDocNameReference; +export declare function updateModuleDeclaration(node: ModuleDeclaration, modifiers: readonly ModifierLike[] | undefined, name: ModuleName, body?: ModuleBody): ModuleDeclaration; +export declare function updateImportEqualsDeclaration(node: ImportEqualsDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; +export declare function updateExportDeclaration(node: ExportDeclaration, modifiers?: readonly ModifierLike[], exportClause?: NamedExportBindings, moduleSpecifier?: Expression, attributes?: ImportAttributes): ExportDeclaration; +export declare function updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, attributes?: ImportAttributes, qualifier?: EntityName, typeArguments?: readonly TypeNode[]): ImportTypeNode; +export declare function updateImportClause(node: ImportClause, name?: Identifier, namedBindings?: NamedImportBindings): ImportClause; +export declare function updateImportSpecifier(node: ImportSpecifier, propertyName: ModuleExportName | undefined, name: Identifier): ImportSpecifier; +export declare function updateJSDocLink(node: JSDocLink, name?: EntityName): JSDocLink; +export declare function updateJSDocLinkPlain(node: JSDocLinkPlain, name?: EntityName): JSDocLinkPlain; +export declare function updateJSDocLinkCode(node: JSDocLinkCode, name?: EntityName): JSDocLinkCode; +export declare function updateTypeParameterDeclaration(node: TypeParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, constraint?: TypeNode, expression?: Expression, defaultType?: TypeNode): TypeParameterDeclaration; +export declare function updateSyntheticReferenceExpression(node: SyntheticReferenceExpression, expression: Expression, thisArg: Expression): SyntheticReferenceExpression; +export declare function updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsdocPropertyTags?: readonly JSDocTag[]): JSDocTypeLiteral; +export declare function updateForInStatement(node: ForInStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement; +export declare function updateForOfStatement(node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement; +export declare function updateCaseClause(node: CaseClause, expression: Expression, statements: readonly Statement[]): CaseClause; +export declare function updateDefaultClause(node: DefaultClause, expression: Expression, statements: readonly Statement[]): DefaultClause; +export declare function updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]): ObjectBindingPattern; +export declare function updateArrayBindingPattern(node: ArrayBindingPattern, elements: readonly BindingElement[]): ArrayBindingPattern; +export declare function updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier, name: EntityName, typeExpression: TypeNode | undefined, comment: readonly JSDocComment[] | undefined): JSDocParameterTag; +export declare function updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier, name: EntityName, typeExpression: TypeNode | undefined, comment: readonly JSDocComment[] | undefined): JSDocPropertyTag; +export declare function createSourceFile(statements: readonly Statement[], endOfFileToken: EndOfFile, text: string, fileName: string, path: Path): SourceFile; +export declare function updateSourceFile(node: SourceFile, statements: readonly Statement[], endOfFileToken: EndOfFile): SourceFile; +//# sourceMappingURL=factory.generated.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/factory.generated.d.ts.map b/node_modules/typescript/dist/ast/factory.generated.d.ts.map new file mode 100644 index 0000000..2f4f1e6 --- /dev/null +++ b/node_modules/typescript/dist/ast/factory.generated.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"factory.generated.d.ts","sourceRoot":"","sources":["../../src/ast/factory.generated.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EACR,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,KAAK,EACL,cAAc,EACd,cAAc,EACd,wBAAwB,EACxB,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,2BAA2B,EAC3B,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,6BAA6B,EAC7B,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,SAAS,EACT,UAAU,EACV,eAAe,EACf,UAAU,EACV,sBAAsB,EACtB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,mBAAmB,EACnB,2BAA2B,EAC3B,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,EACd,UAAU,EACV,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,EACvB,6B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escript/dist/ast/factory.generated.js new file mode 100644 index 0000000..40cdd76 --- /dev/null +++ b/node_modules/typescript/dist/ast/factory.generated.js @@ -0,0 +1,3057 @@ +// Code generated by _scripts/generate-ts-ast.ts. DO NOT EDIT. +import { NodeFlags } from "#enums/nodeFlags"; +import { SyntaxKind } from "#enums/syntaxKind"; +import { TokenFlags } from "#enums/tokenFlags"; +import { getTokenPosOfNode } from "./astnav.js"; +import { cloneSourceFileData } from "./utils.js"; +import { forEachChildOfJSDocParameterTag, forEachChildOfJSDocPropertyTag, } from "./visitor.js"; +export class NodeObject { + kind; + flags = 0; + pos = -1; + end = -1; + parent = undefined; + _data; + constructor(kind, data) { + this.kind = kind; + this._data = data; + } + get ambientModuleNames() { + return this._data?.ambientModuleNames; + } + get argument() { + return this._data?.argument; + } + get argumentExpression() { + return this._data?.argumentExpression; + } + get arguments() { + return this._data?.arguments; + } + get assertsModifier() { + return this._data?.assertsModifier; + } + get asteriskToken() { + return this._data?.asteriskToken; + } + get attributes() { + return this._data?.attributes; + } + get awaitModifier() { + return this._data?.awaitModifier; + } + get block() { + return this._data?.block; + } + get body() { + return this._data?.body; + } + get caseBlock() { + return this._data?.caseBlock; + } + get catchClause() { + return this._data?.catchClause; + } + get checkType() { + return this._data?.checkType; + } + get children() { + return this._data?.children; + } + get className() { + return this._data?.className; + } + get clauses() { + return this._data?.clauses; + } + get closingElement() { + return this._data?.closingElement; + } + get closingFragment() { + return this._data?.closingFragment; + } + get colonToken() { + return this._data?.colonToken; + } + get comment() { + return this._data?.comment; + } + get condition() { + return this._data?.condition; + } + get constraint() { + return this._data?.constraint; + } + get containsOnlyTriviaWhiteSpaces() { + return this._data?.containsOnlyTriviaWhiteSpaces; + } + get declarationList() { + return this._data?.declarationList; + } + get declarations() { + return this._data?.declarations; + } + get defaultType() { + return this._data?.defaultType; + } + get dotDotDotToken() { + return this._data?.dotDotDotToken; + } + get elementType() { + return this._data?.elementType; + } + get elements() { + return this._data?.elements; + } + get elseStatement() { + return this._data?.elseStatement; + } + get endOfFileToken() { + return this._data?.endOfFileToken; + } + get equalsGreaterThanToken() { + return this._data?.equalsGreaterThanToken; + } + get equalsToken() { + return this._data?.equalsToken; + } + get exclamationToken() { + return this._data?.exclamationToken; + } + get exportClause() { + return this._data?.exportClause; + } + get exprName() { + return this._data?.exprName; + } + get expression() { + return this._data?.expression; + } + get extendsType() { + return this._data?.extendsType; + } + get externalModuleIndicator() { + return this._data?.externalModuleIndicator; + } + get falseType() { + return this._data?.falseType; + } + get fileName() { + return this._data?.fileName; + } + get finallyBlock() { + return this._data?.finallyBlock; + } + get head() { + return this._data?.head; + } + get heritageClauses() { + return this._data?.heritageClauses; + } + get importClause() { + return this._data?.importClause; + } + get imports() { + return this._data?.imports; + } + get incrementor() { + return this._data?.incrementor; + } + get indexType() { + return this._data?.indexType; + } + get initializer() { + return this._data?.initializer; + } + get isArrayType() { + return this._data?.isArrayType; + } + get isBracketed() { + return this._data?.isBracketed; + } + get isDeclarationFile() { + return this._data?.isDeclarationFile; + } + get isExportEquals() { + return this._data?.isExportEquals; + } + get isNameFirst() { + return this._data?.isNameFirst; + } + get isSpread() { + return this._data?.isSpread; + } + get isTypeOf() { + return this._data?.isTypeOf; + } + get isTypeOnly() { + return this._data?.isTypeOnly; + } + get jsdocPropertyTags() { + return this._data?.jsdocPropertyTags; + } + get keyword() { + return this._data?.keyword; + } + get keywordToken() { + return this._data?.keywordToken; + } + get label() { + return this._data?.label; + } + get languageVariant() { + return this._data?.languageVariant; + } + get left() { + return this._data?.left; + } + get libReferenceDirectives() { + return this._data?.libReferenceDirectives; + } + get literal() { + return this._data?.literal; + } + get members() { + return this._data?.members; + } + get modifiers() { + return this._data?.modifiers; + } + get moduleAugmentations() { + return this._data?.moduleAugmentations; + } + get moduleReference() { + return this._data?.moduleReference; + } + get moduleSpecifier() { + return this._data?.moduleSpecifier; + } + get multiLine() { + return this._data?.multiLine; + } + get name() { + return this._data?.name; + } + get nameExpression() { + return this._data?.nameExpression; + } + get nameType() { + return this._data?.nameType; + } + get namedBindings() { + return this._data?.namedBindings; + } + get namespace() { + return this._data?.namespace; + } + get objectAssignmentInitializer() { + return this._data?.objectAssignmentInitializer; + } + get objectType() { + return this._data?.objectType; + } + get openingElement() { + return this._data?.openingElement; + } + get openingFragment() { + return this._data?.openingFragment; + } + get operand() { + return this._data?.operand; + } + get operator() { + return this._data?.operator; + } + get operatorToken() { + return this._data?.operatorToken; + } + get parameterName() { + return this._data?.parameterName; + } + get parameters() { + return this._data?.parameters; + } + get path() { + return this._data?.path; + } + get phaseModifier() { + return this._data?.phaseModifier; + } + get postfixToken() { + return this._data?.postfixToken; + } + get properties() { + return this._data?.properties; + } + get propertyName() { + return this._data?.propertyName; + } + get qualifier() { + return this._data?.qualifier; + } + get questionDotToken() { + return this._data?.questionDotToken; + } + get questionToken() { + return this._data?.questionToken; + } + get rawText() { + return this._data?.rawText; + } + get readonlyToken() { + return this._data?.readonlyToken; + } + get referencedFiles() { + return this._data?.referencedFiles; + } + get right() { + return this._data?.right; + } + get scriptKind() { + return this._data?.scriptKind; + } + get statement() { + return this._data?.statement; + } + get statements() { + return this._data?.statements; + } + get tag() { + return this._data?.tag; + } + get tagName() { + return this._data?.tagName; + } + get tags() { + return this._data?.tags; + } + get template() { + return this._data?.template; + } + get templateFlags() { + return this._data?.templateFlags; + } + get templateSpans() { + return this._data?.templateSpans; + } + get text() { + return this._data?.text; + } + get thenStatement() { + return this._data?.thenStatement; + } + get thisArg() { + return this._data?.thisArg; + } + get token() { + return this._data?.token; + } + get tokenCache() { + return this._data?.tokenCache; + } + get tokenFlags() { + return this._data?.tokenFlags; + } + get trueType() { + return this._data?.trueType; + } + get tryBlock() { + return this._data?.tryBlock; + } + get tupleNameSource() { + return this._data?.tupleNameSource; + } + get type() { + return this._data?.type; + } + get typeArguments() { + return this._data?.typeArguments; + } + get typeExpression() { + return this._data?.typeExpression; + } + get typeName() { + return this._data?.typeName; + } + get typeParameter() { + return this._data?.typeParameter; + } + get typeParameters() { + return this._data?.typeParameters; + } + get typeReferenceDirectives() { + return this._data?.typeReferenceDirectives; + } + get types() { + return this._data?.types; + } + get value() { + return this._data?.value; + } + get variableDeclaration() { + return this._data?.variableDeclaration; + } + get whenFalse() { + return this._data?.whenFalse; + } + get whenTrue() { + return this._data?.whenTrue; + } + forEachChild(visitor, visitArray) { + const fn = forEachChildTable[this.kind]; + return fn ? fn(this._data, visitor, visitArray) : undefined; + } + getSourceFile() { + let node = this; + while (node.parent) + node = node.parent; + return node; + } + getStart(sourceFile, includeJsDocComment) { + return getTokenPosOfNode(this, sourceFile ?? this.getSourceFile(), includeJsDocComment); + } + getFullStart() { + return this.pos; + } + getEnd() { + return this.end; + } + getWidth(sourceFile) { + return this.getEnd() - this.getStart(sourceFile); + } + getFullWidth() { + return this.end - this.pos; + } + getLeadingTriviaWidth(sourceFile) { + return this.getStart(sourceFile) - this.pos; + } + getFullText(sourceFile) { + return (sourceFile ?? this.getSourceFile()).text.substring(this.pos, this.end); + } + getText(sourceFile) { + sourceFile ??= this.getSourceFile(); + return sourceFile.text.substring(this.getStart(sourceFile), this.end); + } +} +function isNodeArray(array) { + return "pos" in array && "end" in array; +} +export function createNodeArray(elements, pos = -1, end = -1) { + if (isNodeArray(elements)) + return elements; + const arr = elements.slice(); + arr.pos = pos; + arr.end = end; + return arr; +} +export function cloneNode(node) { + const data = cloneNodeData(node); + const clone = new NodeObject(node.kind, data); + clone.flags = node.flags; + clone.pos = node.pos; + clone.end = node.end; + return clone; +} +function cloneNodeData(node) { + const n = node; + switch (node.kind) { + case SyntaxKind.Identifier: + return { text: n.text }; + case SyntaxKind.PrivateIdentifier: + return { text: n.text }; + case SyntaxKind.QualifiedName: + return { left: n.left, right: n.right }; + case SyntaxKind.ComputedPropertyName: + return { expression: n.expression }; + case SyntaxKind.Decorator: + return { expression: n.expression }; + case SyntaxKind.IfStatement: + return { expression: n.expression, thenStatement: n.thenStatement, elseStatement: n.elseStatement }; + case SyntaxKind.DoStatement: + return { statement: n.statement, expression: n.expression }; + case SyntaxKind.WhileStatement: + return { expression: n.expression, statement: n.statement }; + case SyntaxKind.ForStatement: + return { initializer: n.initializer, condition: n.condition, incrementor: n.incrementor, statement: n.statement }; + case SyntaxKind.BreakStatement: + return { label: n.label }; + case SyntaxKind.ContinueStatement: + return { label: n.label }; + case SyntaxKind.ReturnStatement: + return { expression: n.expression }; + case SyntaxKind.WithStatement: + return { expression: n.expression, statement: n.statement }; + case SyntaxKind.SwitchStatement: + return { expression: n.expression, caseBlock: n.caseBlock }; + case SyntaxKind.CaseBlock: + return { clauses: n.clauses }; + case SyntaxKind.ThrowStatement: + return { expression: n.expression }; + case SyntaxKind.TryStatement: + return { tryBlock: n.tryBlock, catchClause: n.catchClause, finallyBlock: n.finallyBlock }; + case SyntaxKind.CatchClause: + return { variableDeclaration: n.variableDeclaration, block: n.block }; + case SyntaxKind.LabeledStatement: + return { label: n.label, statement: n.statement }; + case SyntaxKind.ExpressionStatement: + return { expression: n.expression }; + case SyntaxKind.Block: + return { statements: n.statements, multiLine: n.multiLine }; + case SyntaxKind.VariableStatement: + return { modifiers: n.modifiers, declarationList: n.declarationList }; + case SyntaxKind.VariableDeclaration: + return { name: n.name, exclamationToken: n.exclamationToken, type: n.type, initializer: n.initializer }; + case SyntaxKind.VariableDeclarationList: + return { declarations: n.declarations }; + case SyntaxKind.Parameter: + return { modifiers: n.modifiers, dotDotDotToken: n.dotDotDotToken, name: n.name, questionToken: n.questionToken, type: n.type, initializer: n.initializer }; + case SyntaxKind.BindingElement: + return { dotDotDotToken: n.dotDotDotToken, propertyName: n.propertyName, name: n.name, initializer: n.initializer }; + case SyntaxKind.MissingDeclaration: + return { modifiers: n.modifiers }; + case SyntaxKind.FunctionDeclaration: + return { modifiers: n.modifiers, asteriskToken: n.asteriskToken, name: n.name, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body }; + case SyntaxKind.ClassDeclaration: + return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, heritageClauses: n.heritageClauses, members: n.members }; + case SyntaxKind.ClassExpression: + return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, heritageClauses: n.heritageClauses, members: n.members }; + case SyntaxKind.HeritageClause: + return { token: n.token, types: n.types }; + case SyntaxKind.InterfaceDeclaration: + return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, heritageClauses: n.heritageClauses, members: n.members }; + case SyntaxKind.TypeAliasDeclaration: + case SyntaxKind.JSTypeAliasDeclaration: + return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, type: n.type }; + case SyntaxKind.EnumMember: + return { name: n.name, initializer: n.initializer }; + case SyntaxKind.EnumDeclaration: + return { modifiers: n.modifiers, name: n.name, members: n.members }; + case SyntaxKind.ModuleBlock: + return { statements: n.statements }; + case SyntaxKind.ImportDeclaration: + case SyntaxKind.JSImportDeclaration: + return { modifiers: n.modifiers, importClause: n.importClause, moduleSpecifier: n.moduleSpecifier, attributes: n.attributes }; + case SyntaxKind.ExternalModuleReference: + return { expression: n.expression }; + case SyntaxKind.NamespaceImport: + return { name: n.name }; + case SyntaxKind.NamedImports: + return { elements: n.elements }; + case SyntaxKind.ExportAssignment: + return { modifiers: n.modifiers, isExportEquals: n.isExportEquals, type: n.type, expression: n.expression }; + case SyntaxKind.NamespaceExportDeclaration: + return { modifiers: n.modifiers, name: n.name }; + case SyntaxKind.NamespaceExport: + return { name: n.name }; + case SyntaxKind.NamedExports: + return { elements: n.elements }; + case SyntaxKind.ExportSpecifier: + return { isTypeOnly: n.isTypeOnly, propertyName: n.propertyName, name: n.name }; + case SyntaxKind.CallSignature: + return { typeParameters: n.typeParameters, parameters: n.parameters, type: n.type }; + case SyntaxKind.ConstructSignature: + return { typeParameters: n.typeParameters, parameters: n.parameters, type: n.type }; + case SyntaxKind.Constructor: + return { modifiers: n.modifiers, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body }; + case SyntaxKind.GetAccessor: + return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body }; + case SyntaxKind.SetAccessor: + return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body }; + case SyntaxKind.IndexSignature: + return { modifiers: n.modifiers, parameters: n.parameters, type: n.type }; + case SyntaxKind.MethodSignature: + return { modifiers: n.modifiers, name: n.name, postfixToken: n.postfixToken, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type }; + case SyntaxKind.MethodDeclaration: + return { modifiers: n.modifiers, asteriskToken: n.asteriskToken, name: n.name, postfixToken: n.postfixToken, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body }; + case SyntaxKind.PropertySignature: + return { modifiers: n.modifiers, name: n.name, postfixToken: n.postfixToken, type: n.type, initializer: n.initializer }; + case SyntaxKind.PropertyDeclaration: + return { modifiers: n.modifiers, name: n.name, postfixToken: n.postfixToken, type: n.type, initializer: n.initializer }; + case SyntaxKind.ClassStaticBlockDeclaration: + return { modifiers: n.modifiers, body: n.body }; + case SyntaxKind.StringLiteral: + return { text: n.text, tokenFlags: n.tokenFlags }; + case SyntaxKind.NumericLiteral: + return { text: n.text, tokenFlags: n.tokenFlags }; + case SyntaxKind.BigIntLiteral: + return { text: n.text, tokenFlags: n.tokenFlags }; + case SyntaxKind.RegularExpressionLiteral: + return { text: n.text, tokenFlags: n.tokenFlags }; + case SyntaxKind.NoSubstitutionTemplateLiteral: + return { text: n.text, templateFlags: n.templateFlags }; + case SyntaxKind.BinaryExpression: + return { modifiers: n.modifiers, left: n.left, type: n.type, operatorToken: n.operatorToken, right: n.right }; + case SyntaxKind.PrefixUnaryExpression: + return { operator: n.operator, operand: n.operand }; + case SyntaxKind.PostfixUnaryExpression: + return { operand: n.operand, operator: n.operator }; + case SyntaxKind.YieldExpression: + return { asteriskToken: n.asteriskToken, expression: n.expression }; + case SyntaxKind.ArrowFunction: + return { modifiers: n.modifiers, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, equalsGreaterThanToken: n.equalsGreaterThanToken, body: n.body }; + case SyntaxKind.FunctionExpression: + return { modifiers: n.modifiers, asteriskToken: n.asteriskToken, name: n.name, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body }; + case SyntaxKind.AsExpression: + return { expression: n.expression, type: n.type }; + case SyntaxKind.SatisfiesExpression: + return { expression: n.expression, type: n.type }; + case SyntaxKind.ConditionalExpression: + return { condition: n.condition, questionToken: n.questionToken, whenTrue: n.whenTrue, colonToken: n.colonToken, whenFalse: n.whenFalse }; + case SyntaxKind.PropertyAccessExpression: + return { expression: n.expression, questionDotToken: n.questionDotToken, name: n.name }; + case SyntaxKind.ElementAccessExpression: + return { expression: n.expression, questionDotToken: n.questionDotToken, argumentExpression: n.argumentExpression }; + case SyntaxKind.CallExpression: + return { expression: n.expression, questionDotToken: n.questionDotToken, typeArguments: n.typeArguments, arguments: n.arguments }; + case SyntaxKind.NewExpression: + return { expression: n.expression, typeArguments: n.typeArguments, arguments: n.arguments }; + case SyntaxKind.MetaProperty: + return { keywordToken: n.keywordToken, name: n.name }; + case SyntaxKind.NonNullExpression: + return { expression: n.expression }; + case SyntaxKind.SpreadElement: + return { expression: n.expression }; + case SyntaxKind.TemplateExpression: + return { head: n.head, templateSpans: n.templateSpans }; + case SyntaxKind.TemplateSpan: + return { expression: n.expression, literal: n.literal }; + case SyntaxKind.TaggedTemplateExpression: + return { tag: n.tag, questionDotToken: n.questionDotToken, typeArguments: n.typeArguments, template: n.template }; + case SyntaxKind.ParenthesizedExpression: + return { expression: n.expression }; + case SyntaxKind.ArrayLiteralExpression: + return { elements: n.elements, multiLine: n.multiLine }; + case SyntaxKind.ObjectLiteralExpression: + return { properties: n.properties, multiLine: n.multiLine }; + case SyntaxKind.SpreadAssignment: + return { expression: n.expression }; + case SyntaxKind.PropertyAssignment: + return { modifiers: n.modifiers, name: n.name, postfixToken: n.postfixToken, type: n.type, initializer: n.initializer }; + case SyntaxKind.ShorthandPropertyAssignment: + return { modifiers: n.modifiers, name: n.name, postfixToken: n.postfixToken, type: n.type, equalsToken: n.equalsToken, objectAssignmentInitializer: n.objectAssignmentInitializer }; + case SyntaxKind.DeleteExpression: + return { expression: n.expression }; + case SyntaxKind.TypeOfExpression: + return { expression: n.expression }; + case SyntaxKind.VoidExpression: + return { expression: n.expression }; + case SyntaxKind.AwaitExpression: + return { expression: n.expression }; + case SyntaxKind.TypeAssertionExpression: + return { type: n.type, expression: n.expression }; + case SyntaxKind.UnionType: + return { types: n.types }; + case SyntaxKind.IntersectionType: + return { types: n.types }; + case SyntaxKind.ConditionalType: + return { checkType: n.checkType, extendsType: n.extendsType, trueType: n.trueType, falseType: n.falseType }; + case SyntaxKind.TypeOperator: + return { operator: n.operator, type: n.type }; + case SyntaxKind.InferType: + return { typeParameter: n.typeParameter }; + case SyntaxKind.ArrayType: + return { elementType: n.elementType }; + case SyntaxKind.IndexedAccessType: + return { objectType: n.objectType, indexType: n.indexType }; + case SyntaxKind.TypeReference: + return { typeName: n.typeName, typeArguments: n.typeArguments }; + case SyntaxKind.ExpressionWithTypeArguments: + return { expression: n.expression, typeArguments: n.typeArguments }; + case SyntaxKind.LiteralType: + return { literal: n.literal }; + case SyntaxKind.TypePredicate: + return { assertsModifier: n.assertsModifier, parameterName: n.parameterName, type: n.type }; + case SyntaxKind.ImportAttribute: + return { name: n.name, value: n.value }; + case SyntaxKind.ImportAttributes: + return { token: n.token, attributes: n.attributes, multiLine: n.multiLine }; + case SyntaxKind.TypeQuery: + return { exprName: n.exprName, typeArguments: n.typeArguments }; + case SyntaxKind.MappedType: + return { readonlyToken: n.readonlyToken, typeParameter: n.typeParameter, nameType: n.nameType, questionToken: n.questionToken, type: n.type, members: n.members }; + case SyntaxKind.TypeLiteral: + return { members: n.members }; + case SyntaxKind.TupleType: + return { elements: n.elements }; + case SyntaxKind.NamedTupleMember: + return { dotDotDotToken: n.dotDotDotToken, name: n.name, questionToken: n.questionToken, type: n.type }; + case SyntaxKind.OptionalType: + return { type: n.type }; + case SyntaxKind.RestType: + return { type: n.type }; + case SyntaxKind.ParenthesizedType: + return { type: n.type }; + case SyntaxKind.FunctionType: + return { typeParameters: n.typeParameters, parameters: n.parameters, type: n.type }; + case SyntaxKind.ConstructorType: + return { modifiers: n.modifiers, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type }; + case SyntaxKind.TemplateHead: + return { text: n.text, rawText: n.rawText, templateFlags: n.templateFlags }; + case SyntaxKind.TemplateMiddle: + return { text: n.text, rawText: n.rawText, templateFlags: n.templateFlags }; + case SyntaxKind.TemplateTail: + return { text: n.text, rawText: n.rawText, templateFlags: n.templateFlags }; + case SyntaxKind.TemplateLiteralType: + return { head: n.head, templateSpans: n.templateSpans }; + case SyntaxKind.TemplateLiteralTypeSpan: + return { type: n.type, literal: n.literal }; + case SyntaxKind.SyntheticExpression: + return { type: n.type, isSpread: n.isSpread, tupleNameSource: n.tupleNameSource }; + case SyntaxKind.PartiallyEmittedExpression: + return { expression: n.expression }; + case SyntaxKind.JsxElement: + return { openingElement: n.openingElement, children: n.children, closingElement: n.closingElement }; + case SyntaxKind.JsxAttributes: + return { properties: n.properties }; + case SyntaxKind.JsxNamespacedName: + return { namespace: n.namespace, name: n.name }; + case SyntaxKind.JsxOpeningElement: + return { tagName: n.tagName, typeArguments: n.typeArguments, attributes: n.attributes }; + case SyntaxKind.JsxSelfClosingElement: + return { tagName: n.tagName, typeArguments: n.typeArguments, attributes: n.attributes }; + case SyntaxKind.JsxFragment: + return { openingFragment: n.openingFragment, children: n.children, closingFragment: n.closingFragment }; + case SyntaxKind.JsxAttribute: + return { name: n.name, initializer: n.initializer }; + case SyntaxKind.JsxSpreadAttribute: + return { expression: n.expression }; + case SyntaxKind.JsxClosingElement: + return { tagName: n.tagName }; + case SyntaxKind.JsxExpression: + return { dotDotDotToken: n.dotDotDotToken, expression: n.expression }; + case SyntaxKind.JsxText: + return { text: n.text, containsOnlyTriviaWhiteSpaces: n.containsOnlyTriviaWhiteSpaces }; + case SyntaxKind.SyntaxList: + return { children: n.children }; + case SyntaxKind.JSDoc: + return { comment: n.comment, tags: n.tags }; + case SyntaxKind.JSDocTypeExpression: + return { type: n.type }; + case SyntaxKind.JSDocNonNullableType: + return { type: n.type }; + case SyntaxKind.JSDocNullableType: + return { type: n.type }; + case SyntaxKind.JSDocVariadicType: + return { type: n.type }; + case SyntaxKind.JSDocOptionalType: + return { type: n.type }; + case SyntaxKind.JSDocTypeTag: + return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment }; + case SyntaxKind.JSDocUnknownTag: + return { tagName: n.tagName, comment: n.comment }; + case SyntaxKind.JSDocTemplateTag: + return { tagName: n.tagName, constraint: n.constraint, typeParameters: n.typeParameters, comment: n.comment }; + case SyntaxKind.JSDocReturnTag: + return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment }; + case SyntaxKind.JSDocPublicTag: + return { tagName: n.tagName, comment: n.comment }; + case SyntaxKind.JSDocPrivateTag: + return { tagName: n.tagName, comment: n.comment }; + case SyntaxKind.JSDocProtectedTag: + return { tagName: n.tagName, comment: n.comment }; + case SyntaxKind.JSDocReadonlyTag: + return { tagName: n.tagName, comment: n.comment }; + case SyntaxKind.JSDocOverrideTag: + return { tagName: n.tagName, comment: n.comment }; + case SyntaxKind.JSDocDeprecatedTag: + return { tagName: n.tagName, comment: n.comment }; + case SyntaxKind.JSDocSeeTag: + return { tagName: n.tagName, nameExpression: n.nameExpression, comment: n.comment }; + case SyntaxKind.JSDocImplementsTag: + return { tagName: n.tagName, className: n.className, comment: n.comment }; + case SyntaxKind.JSDocAugmentsTag: + return { tagName: n.tagName, className: n.className, comment: n.comment }; + case SyntaxKind.JSDocSatisfiesTag: + return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment }; + case SyntaxKind.JSDocThrowsTag: + return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment }; + case SyntaxKind.JSDocThisTag: + return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment }; + case SyntaxKind.JSDocImportTag: + return { tagName: n.tagName, importClause: n.importClause, moduleSpecifier: n.moduleSpecifier, attributes: n.attributes, comment: n.comment }; + case SyntaxKind.JSDocCallbackTag: + return { tagName: n.tagName, typeExpression: n.typeExpression, name: n.name, comment: n.comment }; + case SyntaxKind.JSDocOverloadTag: + return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment }; + case SyntaxKind.JSDocTypedefTag: + return { tagName: n.tagName, typeExpression: n.typeExpression, name: n.name, comment: n.comment }; + case SyntaxKind.JSDocSignature: + return { typeParameters: n.typeParameters, parameters: n.parameters, type: n.type }; + case SyntaxKind.JSDocNameReference: + return { name: n.name }; + case SyntaxKind.ModuleDeclaration: + return { modifiers: n.modifiers, keyword: n.keyword, name: n.name, body: n.body }; + case SyntaxKind.ImportEqualsDeclaration: + return { modifiers: n.modifiers, isTypeOnly: n.isTypeOnly, name: n.name, moduleReference: n.moduleReference }; + case SyntaxKind.ExportDeclaration: + return { modifiers: n.modifiers, isTypeOnly: n.isTypeOnly, exportClause: n.exportClause, moduleSpecifier: n.moduleSpecifier, attributes: n.attributes }; + case SyntaxKind.ImportType: + return { isTypeOf: n.isTypeOf, argument: n.argument, attributes: n.attributes, qualifier: n.qualifier, typeArguments: n.typeArguments }; + case SyntaxKind.ImportClause: + return { phaseModifier: n.phaseModifier, name: n.name, namedBindings: n.namedBindings }; + case SyntaxKind.ImportSpecifier: + return { isTypeOnly: n.isTypeOnly, propertyName: n.propertyName, name: n.name }; + case SyntaxKind.JSDocText: + return { text: n.text }; + case SyntaxKind.JSDocLink: + return { name: n.name, text: n.text }; + case SyntaxKind.JSDocLinkPlain: + return { name: n.name, text: n.text }; + case SyntaxKind.JSDocLinkCode: + return { name: n.name, text: n.text }; + case SyntaxKind.TypeParameter: + return { modifiers: n.modifiers, name: n.name, constraint: n.constraint, expression: n.expression, defaultType: n.defaultType }; + case SyntaxKind.SyntheticReferenceExpression: + return { expression: n.expression, thisArg: n.thisArg }; + case SyntaxKind.JSDocTypeLiteral: + return { jsdocPropertyTags: n.jsdocPropertyTags, isArrayType: n.isArrayType }; + case SyntaxKind.ForInStatement: + return { awaitModifier: n.awaitModifier, initializer: n.initializer, expression: n.expression, statement: n.statement }; + case SyntaxKind.ForOfStatement: + return { awaitModifier: n.awaitModifier, initializer: n.initializer, expression: n.expression, statement: n.statement }; + case SyntaxKind.CaseClause: + return { expression: n.expression, statements: n.statements }; + case SyntaxKind.DefaultClause: + return { expression: n.expression, statements: n.statements }; + case SyntaxKind.ObjectBindingPattern: + return { elements: n.elements }; + case SyntaxKind.ArrayBindingPattern: + return { elements: n.elements }; + case SyntaxKind.JSDocParameterTag: + return { tagName: n.tagName, name: n.name, isBracketed: n.isBracketed, typeExpression: n.typeExpression, isNameFirst: n.isNameFirst, comment: n.comment }; + case SyntaxKind.JSDocPropertyTag: + return { tagName: n.tagName, name: n.name, isBracketed: n.isBracketed, typeExpression: n.typeExpression, isNameFirst: n.isNameFirst, comment: n.comment }; + case SyntaxKind.SourceFile: + return cloneSourceFileData(n); + default: + return undefined; + } +} +const forEachChildTable = { + [SyntaxKind.QualifiedName]: (data, cbNode, cbNodes) => visitNode(cbNode, data.left) || + visitNode(cbNode, data.right), + [SyntaxKind.ComputedPropertyName]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.Decorator]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.IfStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.thenStatement) || + visitNode(cbNode, data.elseStatement), + [SyntaxKind.DoStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.statement) || + visitNode(cbNode, data.expression), + [SyntaxKind.WhileStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.statement), + [SyntaxKind.ForStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.initializer) || + visitNode(cbNode, data.condition) || + visitNode(cbNode, data.incrementor) || + visitNode(cbNode, data.statement), + [SyntaxKind.BreakStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.label), + [SyntaxKind.ContinueStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.label), + [SyntaxKind.ReturnStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.WithStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.statement), + [SyntaxKind.SwitchStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.caseBlock), + [SyntaxKind.CaseBlock]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.clauses), + [SyntaxKind.ThrowStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.TryStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tryBlock) || + visitNode(cbNode, data.catchClause) || + visitNode(cbNode, data.finallyBlock), + [SyntaxKind.CatchClause]: (data, cbNode, cbNodes) => visitNode(cbNode, data.variableDeclaration) || + visitNode(cbNode, data.block), + [SyntaxKind.LabeledStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.label) || + visitNode(cbNode, data.statement), + [SyntaxKind.ExpressionStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.Block]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.statements), + [SyntaxKind.VariableStatement]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.declarationList), + [SyntaxKind.VariableDeclaration]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name) || + visitNode(cbNode, data.exclamationToken) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.initializer), + [SyntaxKind.VariableDeclarationList]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.declarations), + [SyntaxKind.Parameter]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.dotDotDotToken) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.questionToken) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.initializer), + [SyntaxKind.BindingElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.dotDotDotToken) || + visitNode(cbNode, data.propertyName) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.initializer), + [SyntaxKind.MissingDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers), + [SyntaxKind.FunctionDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.asteriskToken) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.body), + [SyntaxKind.ClassDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.heritageClauses) || + visitNodes(cbNode, cbNodes, data.members), + [SyntaxKind.ClassExpression]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.heritageClauses) || + visitNodes(cbNode, cbNodes, data.members), + [SyntaxKind.HeritageClause]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.types), + [SyntaxKind.InterfaceDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.heritageClauses) || + visitNodes(cbNode, cbNodes, data.members), + [SyntaxKind.TypeAliasDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNode(cbNode, data.type), + [SyntaxKind.JSTypeAliasDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNode(cbNode, data.type), + [SyntaxKind.EnumMember]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name) || + visitNode(cbNode, data.initializer), + [SyntaxKind.EnumDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.members), + [SyntaxKind.ModuleBlock]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.statements), + [SyntaxKind.ImportDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.importClause) || + visitNode(cbNode, data.moduleSpecifier) || + visitNode(cbNode, data.attributes), + [SyntaxKind.JSImportDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.importClause) || + visitNode(cbNode, data.moduleSpecifier) || + visitNode(cbNode, data.attributes), + [SyntaxKind.ExternalModuleReference]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.NamespaceImport]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name), + [SyntaxKind.NamedImports]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements), + [SyntaxKind.ExportAssignment]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.expression), + [SyntaxKind.NamespaceExportDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name), + [SyntaxKind.NamespaceExport]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name), + [SyntaxKind.NamedExports]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements), + [SyntaxKind.ExportSpecifier]: (data, cbNode, cbNodes) => visitNode(cbNode, data.propertyName) || + visitNode(cbNode, data.name), + [SyntaxKind.CallSignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type), + [SyntaxKind.ConstructSignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type), + [SyntaxKind.Constructor]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.body), + [SyntaxKind.GetAccessor]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.body), + [SyntaxKind.SetAccessor]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.body), + [SyntaxKind.IndexSignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type), + [SyntaxKind.MethodSignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.postfixToken) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type), + [SyntaxKind.MethodDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.asteriskToken) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.postfixToken) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.body), + [SyntaxKind.PropertySignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.postfixToken) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.initializer), + [SyntaxKind.PropertyDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.postfixToken) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.initializer), + [SyntaxKind.ClassStaticBlockDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.body), + [SyntaxKind.BinaryExpression]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.left) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.operatorToken) || + visitNode(cbNode, data.right), + [SyntaxKind.PrefixUnaryExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.operand), + [SyntaxKind.PostfixUnaryExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.operand), + [SyntaxKind.YieldExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.asteriskToken) || + visitNode(cbNode, data.expression), + [SyntaxKind.ArrowFunction]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.equalsGreaterThanToken) || + visitNode(cbNode, data.body), + [SyntaxKind.FunctionExpression]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.asteriskToken) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.body), + [SyntaxKind.AsExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.type), + [SyntaxKind.SatisfiesExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.type), + [SyntaxKind.ConditionalExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.condition) || + visitNode(cbNode, data.questionToken) || + visitNode(cbNode, data.whenTrue) || + visitNode(cbNode, data.colonToken) || + visitNode(cbNode, data.whenFalse), + [SyntaxKind.PropertyAccessExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.questionDotToken) || + visitNode(cbNode, data.name), + [SyntaxKind.ElementAccessExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.questionDotToken) || + visitNode(cbNode, data.argumentExpression), + [SyntaxKind.CallExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.questionDotToken) || + visitNodes(cbNode, cbNodes, data.typeArguments) || + visitNodes(cbNode, cbNodes, data.arguments), + [SyntaxKind.NewExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNodes(cbNode, cbNodes, data.typeArguments) || + visitNodes(cbNode, cbNodes, data.arguments), + [SyntaxKind.MetaProperty]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name), + [SyntaxKind.NonNullExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.SpreadElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.TemplateExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.head) || + visitNodes(cbNode, cbNodes, data.templateSpans), + [SyntaxKind.TemplateSpan]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.literal), + [SyntaxKind.TaggedTemplateExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tag) || + visitNode(cbNode, data.questionDotToken) || + visitNodes(cbNode, cbNodes, data.typeArguments) || + visitNode(cbNode, data.template), + [SyntaxKind.ParenthesizedExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.ArrayLiteralExpression]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements), + [SyntaxKind.ObjectLiteralExpression]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.properties), + [SyntaxKind.SpreadAssignment]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.PropertyAssignment]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.postfixToken) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.initializer), + [SyntaxKind.ShorthandPropertyAssignment]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.postfixToken) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.equalsToken) || + visitNode(cbNode, data.objectAssignmentInitializer), + [SyntaxKind.DeleteExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.TypeOfExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.VoidExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.AwaitExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.TypeAssertionExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type) || + visitNode(cbNode, data.expression), + [SyntaxKind.UnionType]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.types), + [SyntaxKind.IntersectionType]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.types), + [SyntaxKind.ConditionalType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.checkType) || + visitNode(cbNode, data.extendsType) || + visitNode(cbNode, data.trueType) || + visitNode(cbNode, data.falseType), + [SyntaxKind.TypeOperator]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.InferType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.typeParameter), + [SyntaxKind.ArrayType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.elementType), + [SyntaxKind.IndexedAccessType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.objectType) || + visitNode(cbNode, data.indexType), + [SyntaxKind.TypeReference]: (data, cbNode, cbNodes) => visitNode(cbNode, data.typeName) || + visitNodes(cbNode, cbNodes, data.typeArguments), + [SyntaxKind.ExpressionWithTypeArguments]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNodes(cbNode, cbNodes, data.typeArguments), + [SyntaxKind.LiteralType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.literal), + [SyntaxKind.TypePredicate]: (data, cbNode, cbNodes) => visitNode(cbNode, data.assertsModifier) || + visitNode(cbNode, data.parameterName) || + visitNode(cbNode, data.type), + [SyntaxKind.ImportAttribute]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name) || + visitNode(cbNode, data.value), + [SyntaxKind.ImportAttributes]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.attributes), + [SyntaxKind.TypeQuery]: (data, cbNode, cbNodes) => visitNode(cbNode, data.exprName) || + visitNodes(cbNode, cbNodes, data.typeArguments), + [SyntaxKind.MappedType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.readonlyToken) || + visitNode(cbNode, data.typeParameter) || + visitNode(cbNode, data.nameType) || + visitNode(cbNode, data.questionToken) || + visitNode(cbNode, data.type) || + visitNodes(cbNode, cbNodes, data.members), + [SyntaxKind.TypeLiteral]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.members), + [SyntaxKind.TupleType]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements), + [SyntaxKind.NamedTupleMember]: (data, cbNode, cbNodes) => visitNode(cbNode, data.dotDotDotToken) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.questionToken) || + visitNode(cbNode, data.type), + [SyntaxKind.OptionalType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.RestType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.ParenthesizedType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.FunctionType]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type), + [SyntaxKind.ConstructorType]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type), + [SyntaxKind.TemplateLiteralType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.head) || + visitNodes(cbNode, cbNodes, data.templateSpans), + [SyntaxKind.TemplateLiteralTypeSpan]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type) || + visitNode(cbNode, data.literal), + [SyntaxKind.SyntheticExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tupleNameSource), + [SyntaxKind.PartiallyEmittedExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.JsxElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.openingElement) || + visitNodes(cbNode, cbNodes, data.children) || + visitNode(cbNode, data.closingElement), + [SyntaxKind.JsxAttributes]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.properties), + [SyntaxKind.JsxNamespacedName]: (data, cbNode, cbNodes) => visitNode(cbNode, data.namespace) || + visitNode(cbNode, data.name), + [SyntaxKind.JsxOpeningElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.typeArguments) || + visitNode(cbNode, data.attributes), + [SyntaxKind.JsxSelfClosingElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.typeArguments) || + visitNode(cbNode, data.attributes), + [SyntaxKind.JsxFragment]: (data, cbNode, cbNodes) => visitNode(cbNode, data.openingFragment) || + visitNodes(cbNode, cbNodes, data.children) || + visitNode(cbNode, data.closingFragment), + [SyntaxKind.JsxAttribute]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name) || + visitNode(cbNode, data.initializer), + [SyntaxKind.JsxSpreadAttribute]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.JsxClosingElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName), + [SyntaxKind.JsxExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.dotDotDotToken) || + visitNode(cbNode, data.expression), + [SyntaxKind.SyntaxList]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.children), + [SyntaxKind.JSDoc]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.comment) || + visitNodes(cbNode, cbNodes, data.tags), + [SyntaxKind.JSDocTypeExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.JSDocNonNullableType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.JSDocNullableType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.JSDocVariadicType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.JSDocOptionalType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.JSDocTypeTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.typeExpression) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocUnknownTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocTemplateTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.constraint) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocReturnTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.typeExpression) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocPublicTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocPrivateTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocProtectedTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocReadonlyTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocOverrideTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocDeprecatedTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocSeeTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.nameExpression) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocImplementsTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.className) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocAugmentsTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.className) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocSatisfiesTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.typeExpression) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocThrowsTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.typeExpression) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocThisTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.typeExpression) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocImportTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.importClause) || + visitNode(cbNode, data.moduleSpecifier) || + visitNode(cbNode, data.attributes) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocCallbackTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.typeExpression) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocOverloadTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.typeExpression) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocTypedefTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.typeExpression) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocSignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type), + [SyntaxKind.JSDocNameReference]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name), + [SyntaxKind.ModuleDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.body), + [SyntaxKind.ImportEqualsDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.moduleReference), + [SyntaxKind.ExportDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.exportClause) || + visitNode(cbNode, data.moduleSpecifier) || + visitNode(cbNode, data.attributes), + [SyntaxKind.ImportType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.argument) || + visitNode(cbNode, data.attributes) || + visitNode(cbNode, data.qualifier) || + visitNodes(cbNode, cbNodes, data.typeArguments), + [SyntaxKind.ImportClause]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name) || + visitNode(cbNode, data.namedBindings), + [SyntaxKind.ImportSpecifier]: (data, cbNode, cbNodes) => visitNode(cbNode, data.propertyName) || + visitNode(cbNode, data.name), + [SyntaxKind.JSDocLink]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name), + [SyntaxKind.JSDocLinkPlain]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name), + [SyntaxKind.JSDocLinkCode]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name), + [SyntaxKind.TypeParameter]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.constraint) || + visitNode(cbNode, data.expression) || + visitNode(cbNode, data.defaultType), + [SyntaxKind.SyntheticReferenceExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.thisArg), + [SyntaxKind.JSDocTypeLiteral]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.jsdocPropertyTags), + [SyntaxKind.ForInStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.awaitModifier) || + visitNode(cbNode, data.initializer) || + visitNode(cbNode, data.expression) || + visitNode(cbNode, data.statement), + [SyntaxKind.ForOfStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.awaitModifier) || + visitNode(cbNode, data.initializer) || + visitNode(cbNode, data.expression) || + visitNode(cbNode, data.statement), + [SyntaxKind.CaseClause]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNodes(cbNode, cbNodes, data.statements), + [SyntaxKind.DefaultClause]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNodes(cbNode, cbNodes, data.statements), + [SyntaxKind.ObjectBindingPattern]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements), + [SyntaxKind.ArrayBindingPattern]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements), + [SyntaxKind.JSDocParameterTag]: forEachChildOfJSDocParameterTag, + [SyntaxKind.JSDocPropertyTag]: forEachChildOfJSDocPropertyTag, + [SyntaxKind.SourceFile]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.statements) || + visitNode(cbNode, data.endOfFileToken), +}; +function visitNode(cbNode, node) { + return node ? cbNode(node) : undefined; +} +function visitNodes(cbNode, cbNodes, nodes) { + if (!nodes) + return undefined; + if (cbNodes) + return cbNodes(nodes); + for (const node of nodes) { + const result = cbNode(node); + if (result) + return result; + } + return undefined; +} +export function createToken(kind) { + return new NodeObject(kind, undefined); +} +export function createIdentifier(text) { + return new NodeObject(SyntaxKind.Identifier, { + text, + }); +} +export function createPrivateIdentifier(text) { + return new NodeObject(SyntaxKind.PrivateIdentifier, { + text, + }); +} +export function createQualifiedName(left, right) { + return new NodeObject(SyntaxKind.QualifiedName, { + left, + right, + }); +} +export function createComputedPropertyName(expression) { + return new NodeObject(SyntaxKind.ComputedPropertyName, { + expression, + }); +} +export function createDecorator(expression) { + return new NodeObject(SyntaxKind.Decorator, { + expression, + }); +} +export function createEmptyStatement() { + return new NodeObject(SyntaxKind.EmptyStatement, undefined); +} +export function createIfStatement(expression, thenStatement, elseStatement) { + return new NodeObject(SyntaxKind.IfStatement, { + expression, + thenStatement, + elseStatement, + }); +} +export function createDoStatement(statement, expression) { + return new NodeObject(SyntaxKind.DoStatement, { + statement, + expression, + }); +} +export function createWhileStatement(expression, statement) { + return new NodeObject(SyntaxKind.WhileStatement, { + expression, + statement, + }); +} +export function createForStatement(initializer, condition, incrementor, statement) { + return new NodeObject(SyntaxKind.ForStatement, { + initializer, + condition, + incrementor, + statement, + }); +} +export function createBreakStatement(label) { + return new NodeObject(SyntaxKind.BreakStatement, { + label, + }); +} +export function createContinueStatement(label) { + return new NodeObject(SyntaxKind.ContinueStatement, { + label, + }); +} +export function createReturnStatement(expression) { + return new NodeObject(SyntaxKind.ReturnStatement, { + expression, + }); +} +export function createWithStatement(expression, statement) { + return new NodeObject(SyntaxKind.WithStatement, { + expression, + statement, + }); +} +export function createSwitchStatement(expression, caseBlock) { + return new NodeObject(SyntaxKind.SwitchStatement, { + expression, + caseBlock, + }); +} +export function createCaseBlock(clauses) { + return new NodeObject(SyntaxKind.CaseBlock, { + clauses: createNodeArray(clauses), + }); +} +export function createThrowStatement(expression) { + return new NodeObject(SyntaxKind.ThrowStatement, { + expression, + }); +} +export function createTryStatement(tryBlock, catchClause, finallyBlock) { + return new NodeObject(SyntaxKind.TryStatement, { + tryBlock, + catchClause, + finallyBlock, + }); +} +export function createCatchClause(variableDeclaration, block) { + return new NodeObject(SyntaxKind.CatchClause, { + variableDeclaration, + block, + }); +} +export function createDebuggerStatement() { + return new NodeObject(SyntaxKind.DebuggerStatement, undefined); +} +export function createLabeledStatement(label, statement) { + return new NodeObject(SyntaxKind.LabeledStatement, { + label, + statement, + }); +} +export function createExpressionStatement(expression) { + return new NodeObject(SyntaxKind.ExpressionStatement, { + expression, + }); +} +export function createBlock(statements, multiLine) { + return new NodeObject(SyntaxKind.Block, { + statements: createNodeArray(statements), + multiLine, + }); +} +export function createVariableStatement(modifiers, declarationList) { + return new NodeObject(SyntaxKind.VariableStatement, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + declarationList, + }); +} +export function createVariableDeclaration(name, exclamationToken, type, initializer) { + return new NodeObject(SyntaxKind.VariableDeclaration, { + name, + exclamationToken, + type, + initializer, + }); +} +export function createVariableDeclarationList(declarations, flags) { + const node = new NodeObject(SyntaxKind.VariableDeclarationList, { + declarations: createNodeArray(declarations), + }); + node.flags = flags; + return node; +} +export function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { + return new NodeObject(SyntaxKind.Parameter, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + dotDotDotToken, + name, + questionToken, + type, + initializer, + }); +} +export function createBindingElement(dotDotDotToken, propertyName, name, initializer) { + return new NodeObject(SyntaxKind.BindingElement, { + dotDotDotToken, + propertyName, + name, + initializer, + }); +} +export function createMissingDeclaration(modifiers) { + return new NodeObject(SyntaxKind.MissingDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + }); +} +export function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { + return new NodeObject(SyntaxKind.FunctionDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + asteriskToken, + name, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + body, + }); +} +export function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) { + return new NodeObject(SyntaxKind.ClassDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + heritageClauses: heritageClauses ? createNodeArray(heritageClauses) : undefined, + members: createNodeArray(members), + }); +} +export function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { + return new NodeObject(SyntaxKind.ClassExpression, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + heritageClauses: heritageClauses ? createNodeArray(heritageClauses) : undefined, + members: createNodeArray(members), + }); +} +export function createHeritageClause(token, types) { + return new NodeObject(SyntaxKind.HeritageClause, { + token, + types: createNodeArray(types), + }); +} +export function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) { + return new NodeObject(SyntaxKind.InterfaceDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + heritageClauses: heritageClauses ? createNodeArray(heritageClauses) : undefined, + members: createNodeArray(members), + }); +} +export function createTypeAliasDeclaration(modifiers, name, typeParameters, type) { + return new NodeObject(SyntaxKind.TypeAliasDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + type, + }); +} +export function createEnumMember(name, initializer) { + return new NodeObject(SyntaxKind.EnumMember, { + name, + initializer, + }); +} +export function createEnumDeclaration(modifiers, name, members) { + return new NodeObject(SyntaxKind.EnumDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + members: createNodeArray(members), + }); +} +export function createModuleBlock(statements) { + return new NodeObject(SyntaxKind.ModuleBlock, { + statements: createNodeArray(statements), + }); +} +export function createNotEmittedStatement() { + return new NodeObject(SyntaxKind.NotEmittedStatement, undefined); +} +export function createNotEmittedTypeElement() { + return new NodeObject(SyntaxKind.NotEmittedTypeElement, undefined); +} +export function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) { + return new NodeObject(SyntaxKind.ImportDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + importClause, + moduleSpecifier, + attributes, + }); +} +export function createExternalModuleReference(expression) { + return new NodeObject(SyntaxKind.ExternalModuleReference, { + expression, + }); +} +export function createNamespaceImport(name) { + return new NodeObject(SyntaxKind.NamespaceImport, { + name, + }); +} +export function createNamedImports(elements) { + return new NodeObject(SyntaxKind.NamedImports, { + elements: createNodeArray(elements), + }); +} +export function createExportAssignment(modifiers, isExportEquals = false, type, expression) { + return new NodeObject(SyntaxKind.ExportAssignment, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + isExportEquals, + type, + expression, + }); +} +export function createNamespaceExportDeclaration(modifiers, name) { + return new NodeObject(SyntaxKind.NamespaceExportDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + }); +} +export function createNamespaceExport(name) { + return new NodeObject(SyntaxKind.NamespaceExport, { + name, + }); +} +export function createNamedExports(elements) { + return new NodeObject(SyntaxKind.NamedExports, { + elements: createNodeArray(elements), + }); +} +export function createExportSpecifier(isTypeOnly = false, propertyName, name) { + return new NodeObject(SyntaxKind.ExportSpecifier, { + isTypeOnly, + propertyName, + name, + }); +} +export function createCallSignatureDeclaration(typeParameters, parameters, type) { + return new NodeObject(SyntaxKind.CallSignature, { + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + }); +} +export function createConstructSignatureDeclaration(typeParameters, parameters, type) { + return new NodeObject(SyntaxKind.ConstructSignature, { + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + }); +} +export function createConstructorDeclaration(modifiers, typeParameters, parameters, type, body) { + return new NodeObject(SyntaxKind.Constructor, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + body, + }); +} +export function createGetAccessorDeclaration(modifiers, name, typeParameters, parameters, type, body) { + return new NodeObject(SyntaxKind.GetAccessor, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + body, + }); +} +export function createSetAccessorDeclaration(modifiers, name, typeParameters, parameters, type, body) { + return new NodeObject(SyntaxKind.SetAccessor, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + body, + }); +} +export function createIndexSignatureDeclaration(modifiers, parameters, type) { + return new NodeObject(SyntaxKind.IndexSignature, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + parameters: createNodeArray(parameters), + type, + }); +} +export function createMethodSignatureDeclaration(modifiers, name, postfixToken, typeParameters, parameters, type) { + return new NodeObject(SyntaxKind.MethodSignature, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + postfixToken, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + }); +} +export function createMethodDeclaration(modifiers, asteriskToken, name, postfixToken, typeParameters, parameters, type, body) { + return new NodeObject(SyntaxKind.MethodDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + asteriskToken, + name, + postfixToken, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + body, + }); +} +export function createPropertySignatureDeclaration(modifiers, name, postfixToken, type, initializer) { + return new NodeObject(SyntaxKind.PropertySignature, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + postfixToken, + type, + initializer, + }); +} +export function createPropertyDeclaration(modifiers, name, postfixToken, type, initializer) { + return new NodeObject(SyntaxKind.PropertyDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + postfixToken, + type, + initializer, + }); +} +export function createSemicolonClassElement() { + return new NodeObject(SyntaxKind.SemicolonClassElement, undefined); +} +export function createClassStaticBlockDeclaration(modifiers, body) { + return new NodeObject(SyntaxKind.ClassStaticBlockDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + body, + }); +} +export function createOmittedExpression() { + return new NodeObject(SyntaxKind.OmittedExpression, undefined); +} +export function createKeywordExpression(kind) { + return new NodeObject(kind, undefined); +} +export function createStringLiteral(text, tokenFlags) { + return new NodeObject(SyntaxKind.StringLiteral, { + text, + tokenFlags, + }); +} +export function createNumericLiteral(text, tokenFlags) { + return new NodeObject(SyntaxKind.NumericLiteral, { + text, + tokenFlags, + }); +} +export function createBigIntLiteral(text, tokenFlags) { + return new NodeObject(SyntaxKind.BigIntLiteral, { + text, + tokenFlags, + }); +} +export function createRegularExpressionLiteral(text, tokenFlags) { + return new NodeObject(SyntaxKind.RegularExpressionLiteral, { + text, + tokenFlags, + }); +} +export function createNoSubstitutionTemplateLiteral(text, templateFlags) { + return new NodeObject(SyntaxKind.NoSubstitutionTemplateLiteral, { + text, + templateFlags, + }); +} +export function createBinaryExpression(modifiers, left, type, operatorToken, right) { + return new NodeObject(SyntaxKind.BinaryExpression, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + left, + type, + operatorToken, + right, + }); +} +export function createPrefixUnaryExpression(operator, operand) { + return new NodeObject(SyntaxKind.PrefixUnaryExpression, { + operator, + operand, + }); +} +export function createPostfixUnaryExpression(operand, operator) { + return new NodeObject(SyntaxKind.PostfixUnaryExpression, { + operand, + operator, + }); +} +export function createYieldExpression(asteriskToken, expression) { + return new NodeObject(SyntaxKind.YieldExpression, { + asteriskToken, + expression, + }); +} +export function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { + return new NodeObject(SyntaxKind.ArrowFunction, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + equalsGreaterThanToken, + body, + }); +} +export function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { + return new NodeObject(SyntaxKind.FunctionExpression, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + asteriskToken, + name, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + body, + }); +} +export function createAsExpression(expression, type) { + return new NodeObject(SyntaxKind.AsExpression, { + expression, + type, + }); +} +export function createSatisfiesExpression(expression, type) { + return new NodeObject(SyntaxKind.SatisfiesExpression, { + expression, + type, + }); +} +export function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) { + return new NodeObject(SyntaxKind.ConditionalExpression, { + condition, + questionToken, + whenTrue, + colonToken, + whenFalse, + }); +} +export function createPropertyAccessExpression(expression, questionDotToken, name, flags) { + const node = new NodeObject(SyntaxKind.PropertyAccessExpression, { + expression, + questionDotToken, + name, + }); + node.flags = flags; + return node; +} +export function createElementAccessExpression(expression, questionDotToken, argumentExpression, flags) { + const node = new NodeObject(SyntaxKind.ElementAccessExpression, { + expression, + questionDotToken, + argumentExpression, + }); + node.flags = flags; + return node; +} +export function createCallExpression(expression, questionDotToken, typeArguments, arguments_, flags) { + const node = new NodeObject(SyntaxKind.CallExpression, { + expression, + questionDotToken, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + arguments: createNodeArray(arguments_), + }); + node.flags = flags; + return node; +} +export function createNewExpression(expression, typeArguments, arguments_) { + return new NodeObject(SyntaxKind.NewExpression, { + expression, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + arguments: arguments_ ? createNodeArray(arguments_) : undefined, + }); +} +export function createMetaProperty(keywordToken, name) { + return new NodeObject(SyntaxKind.MetaProperty, { + keywordToken, + name, + }); +} +export function createNonNullExpression(expression, flags) { + const node = new NodeObject(SyntaxKind.NonNullExpression, { + expression, + }); + node.flags = flags; + return node; +} +export function createSpreadElement(expression) { + return new NodeObject(SyntaxKind.SpreadElement, { + expression, + }); +} +export function createTemplateExpression(head, templateSpans) { + return new NodeObject(SyntaxKind.TemplateExpression, { + head, + templateSpans: createNodeArray(templateSpans), + }); +} +export function createTemplateSpan(expression, literal) { + return new NodeObject(SyntaxKind.TemplateSpan, { + expression, + literal, + }); +} +export function createTaggedTemplateExpression(tag, questionDotToken, typeArguments, template, flags) { + const node = new NodeObject(SyntaxKind.TaggedTemplateExpression, { + tag, + questionDotToken, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + template, + }); + node.flags = flags; + return node; +} +export function createParenthesizedExpression(expression) { + return new NodeObject(SyntaxKind.ParenthesizedExpression, { + expression, + }); +} +export function createArrayLiteralExpression(elements, multiLine) { + return new NodeObject(SyntaxKind.ArrayLiteralExpression, { + elements: createNodeArray(elements), + multiLine, + }); +} +export function createObjectLiteralExpression(properties, multiLine) { + return new NodeObject(SyntaxKind.ObjectLiteralExpression, { + properties: createNodeArray(properties), + multiLine, + }); +} +export function createSpreadAssignment(expression) { + return new NodeObject(SyntaxKind.SpreadAssignment, { + expression, + }); +} +export function createPropertyAssignment(modifiers, name, postfixToken, type, initializer) { + return new NodeObject(SyntaxKind.PropertyAssignment, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + postfixToken, + type, + initializer, + }); +} +export function createShorthandPropertyAssignment(modifiers, name, postfixToken, type, equalsToken, objectAssignmentInitializer) { + return new NodeObject(SyntaxKind.ShorthandPropertyAssignment, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + postfixToken, + type, + equalsToken, + objectAssignmentInitializer, + }); +} +export function createDeleteExpression(expression) { + return new NodeObject(SyntaxKind.DeleteExpression, { + expression, + }); +} +export function createTypeOfExpression(expression) { + return new NodeObject(SyntaxKind.TypeOfExpression, { + expression, + }); +} +export function createVoidExpression(expression) { + return new NodeObject(SyntaxKind.VoidExpression, { + expression, + }); +} +export function createAwaitExpression(expression) { + return new NodeObject(SyntaxKind.AwaitExpression, { + expression, + }); +} +export function createTypeAssertion(type, expression) { + return new NodeObject(SyntaxKind.TypeAssertionExpression, { + type, + expression, + }); +} +export function createKeywordTypeNode(kind) { + return new NodeObject(kind, undefined); +} +export function createUnionTypeNode(types) { + return new NodeObject(SyntaxKind.UnionType, { + types: createNodeArray(types), + }); +} +export function createIntersectionTypeNode(types) { + return new NodeObject(SyntaxKind.IntersectionType, { + types: createNodeArray(types), + }); +} +export function createConditionalTypeNode(checkType, extendsType, trueType, falseType) { + return new NodeObject(SyntaxKind.ConditionalType, { + checkType, + extendsType, + trueType, + falseType, + }); +} +export function createTypeOperatorNode(operator, type) { + return new NodeObject(SyntaxKind.TypeOperator, { + operator, + type, + }); +} +export function createInferTypeNode(typeParameter) { + return new NodeObject(SyntaxKind.InferType, { + typeParameter, + }); +} +export function createArrayTypeNode(elementType) { + return new NodeObject(SyntaxKind.ArrayType, { + elementType, + }); +} +export function createIndexedAccessTypeNode(objectType, indexType) { + return new NodeObject(SyntaxKind.IndexedAccessType, { + objectType, + indexType, + }); +} +export function createTypeReferenceNode(typeName, typeArguments) { + return new NodeObject(SyntaxKind.TypeReference, { + typeName, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + }); +} +export function createExpressionWithTypeArguments(expression, typeArguments) { + return new NodeObject(SyntaxKind.ExpressionWithTypeArguments, { + expression, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + }); +} +export function createLiteralTypeNode(literal) { + return new NodeObject(SyntaxKind.LiteralType, { + literal, + }); +} +export function createThisTypeNode() { + return new NodeObject(SyntaxKind.ThisType, undefined); +} +export function createTypePredicateNode(assertsModifier, parameterName, type) { + return new NodeObject(SyntaxKind.TypePredicate, { + assertsModifier, + parameterName, + type, + }); +} +export function createImportAttribute(name, value) { + return new NodeObject(SyntaxKind.ImportAttribute, { + name, + value, + }); +} +export function createImportAttributes(token, attributes, multiLine) { + return new NodeObject(SyntaxKind.ImportAttributes, { + token, + attributes: createNodeArray(attributes), + multiLine, + }); +} +export function createTypeQueryNode(exprName, typeArguments) { + return new NodeObject(SyntaxKind.TypeQuery, { + exprName, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + }); +} +export function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) { + return new NodeObject(SyntaxKind.MappedType, { + readonlyToken, + typeParameter, + nameType, + questionToken, + type, + members: members ? createNodeArray(members) : undefined, + }); +} +export function createTypeLiteralNode(members) { + return new NodeObject(SyntaxKind.TypeLiteral, { + members: createNodeArray(members), + }); +} +export function createTupleTypeNode(elements) { + return new NodeObject(SyntaxKind.TupleType, { + elements: createNodeArray(elements), + }); +} +export function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { + return new NodeObject(SyntaxKind.NamedTupleMember, { + dotDotDotToken, + name, + questionToken, + type, + }); +} +export function createOptionalTypeNode(type) { + return new NodeObject(SyntaxKind.OptionalType, { + type, + }); +} +export function createRestTypeNode(type) { + return new NodeObject(SyntaxKind.RestType, { + type, + }); +} +export function createParenthesizedTypeNode(type) { + return new NodeObject(SyntaxKind.ParenthesizedType, { + type, + }); +} +export function createFunctionTypeNode(typeParameters, parameters, type) { + return new NodeObject(SyntaxKind.FunctionType, { + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + }); +} +export function createConstructorTypeNode(modifiers, typeParameters, parameters, type) { + return new NodeObject(SyntaxKind.ConstructorType, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + }); +} +export function createTemplateHead(text, rawText, templateFlags) { + return new NodeObject(SyntaxKind.TemplateHead, { + text, + rawText, + templateFlags, + }); +} +export function createTemplateMiddle(text, rawText, templateFlags) { + return new NodeObject(SyntaxKind.TemplateMiddle, { + text, + rawText, + templateFlags, + }); +} +export function createTemplateTail(text, rawText, templateFlags) { + return new NodeObject(SyntaxKind.TemplateTail, { + text, + rawText, + templateFlags, + }); +} +export function createTemplateLiteralTypeNode(head, templateSpans) { + return new NodeObject(SyntaxKind.TemplateLiteralType, { + head, + templateSpans: createNodeArray(templateSpans), + }); +} +export function createTemplateLiteralTypeSpan(type, literal) { + return new NodeObject(SyntaxKind.TemplateLiteralTypeSpan, { + type, + literal, + }); +} +export function createSyntheticExpression(type, isSpread, tupleNameSource) { + return new NodeObject(SyntaxKind.SyntheticExpression, { + type, + isSpread, + tupleNameSource, + }); +} +export function createPartiallyEmittedExpression(expression) { + return new NodeObject(SyntaxKind.PartiallyEmittedExpression, { + expression, + }); +} +export function createJsxElement(openingElement, children, closingElement) { + return new NodeObject(SyntaxKind.JsxElement, { + openingElement, + children: createNodeArray(children), + closingElement, + }); +} +export function createJsxAttributes(properties) { + return new NodeObject(SyntaxKind.JsxAttributes, { + properties: createNodeArray(properties), + }); +} +export function createJsxNamespacedName(namespace, name) { + return new NodeObject(SyntaxKind.JsxNamespacedName, { + namespace, + name, + }); +} +export function createJsxOpeningElement(tagName, typeArguments, attributes) { + return new NodeObject(SyntaxKind.JsxOpeningElement, { + tagName, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + attributes, + }); +} +export function createJsxSelfClosingElement(tagName, typeArguments, attributes) { + return new NodeObject(SyntaxKind.JsxSelfClosingElement, { + tagName, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + attributes, + }); +} +export function createJsxFragment(openingFragment, children, closingFragment) { + return new NodeObject(SyntaxKind.JsxFragment, { + openingFragment, + children: createNodeArray(children), + closingFragment, + }); +} +export function createJsxOpeningFragment() { + return new NodeObject(SyntaxKind.JsxOpeningFragment, undefined); +} +export function createJsxClosingFragment() { + return new NodeObject(SyntaxKind.JsxClosingFragment, undefined); +} +export function createJsxAttribute(name, initializer) { + return new NodeObject(SyntaxKind.JsxAttribute, { + name, + initializer, + }); +} +export function createJsxSpreadAttribute(expression) { + return new NodeObject(SyntaxKind.JsxSpreadAttribute, { + expression, + }); +} +export function createJsxClosingElement(tagName) { + return new NodeObject(SyntaxKind.JsxClosingElement, { + tagName, + }); +} +export function createJsxExpression(dotDotDotToken, expression) { + return new NodeObject(SyntaxKind.JsxExpression, { + dotDotDotToken, + expression, + }); +} +export function createJsxText(text, containsOnlyTriviaWhiteSpaces) { + return new NodeObject(SyntaxKind.JsxText, { + text, + containsOnlyTriviaWhiteSpaces, + }); +} +export function createSyntaxList(children) { + return new NodeObject(SyntaxKind.SyntaxList, { + children, + }); +} +export function createJSDoc(comment, tags) { + return new NodeObject(SyntaxKind.JSDoc, { + comment: createNodeArray(comment), + tags: tags ? createNodeArray(tags) : undefined, + }); +} +export function createJSDocTypeExpression(type) { + return new NodeObject(SyntaxKind.JSDocTypeExpression, { + type, + }); +} +export function createJSDocNonNullableType(type) { + return new NodeObject(SyntaxKind.JSDocNonNullableType, { + type, + }); +} +export function createJSDocNullableType(type) { + return new NodeObject(SyntaxKind.JSDocNullableType, { + type, + }); +} +export function createJSDocAllType() { + return new NodeObject(SyntaxKind.JSDocAllType, undefined); +} +export function createJSDocVariadicType(type) { + return new NodeObject(SyntaxKind.JSDocVariadicType, { + type, + }); +} +export function createJSDocOptionalType(type) { + return new NodeObject(SyntaxKind.JSDocOptionalType, { + type, + }); +} +export function createJSDocTypeTag(tagName, typeExpression, comment) { + return new NodeObject(SyntaxKind.JSDocTypeTag, { + tagName, + typeExpression, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocUnknownTag(tagName, comment) { + return new NodeObject(SyntaxKind.JSDocUnknownTag, { + tagName, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) { + return new NodeObject(SyntaxKind.JSDocTemplateTag, { + tagName, + constraint, + typeParameters: createNodeArray(typeParameters), + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocReturnTag(tagName, typeExpression, comment) { + return new NodeObject(SyntaxKind.JSDocReturnTag, { + tagName, + typeExpression, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocPublicTag(tagName, comment) { + return new NodeObject(SyntaxKind.JSDocPublicTag, { + tagName, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocPrivateTag(tagName, comment) { + return new NodeObject(SyntaxKind.JSDocPrivateTag, { + tagName, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocProtectedTag(tagName, comment) { + return new NodeObject(SyntaxKind.JSDocProtectedTag, { + tagName, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocReadonlyTag(tagName, comment) { + return new NodeObject(SyntaxKind.JSDocReadonlyTag, { + tagName, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocOverrideTag(tagName, comment) { + return new NodeObject(SyntaxKind.JSDocOverrideTag, { + tagName, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocDeprecatedTag(tagName, comment) { + return new NodeObject(SyntaxKind.JSDocDeprecatedTag, { + tagName, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocSeeTag(tagName, nameExpression, comment) { + return new NodeObject(SyntaxKind.JSDocSeeTag, { + tagName, + nameExpression, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocImplementsTag(tagName, className, comment) { + return new NodeObject(SyntaxKind.JSDocImplementsTag, { + tagName, + className, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocAugmentsTag(tagName, className, comment) { + return new NodeObject(SyntaxKind.JSDocAugmentsTag, { + tagName, + className, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocSatisfiesTag(tagName, typeExpression, comment) { + return new NodeObject(SyntaxKind.JSDocSatisfiesTag, { + tagName, + typeExpression, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocThrowsTag(tagName, typeExpression, comment) { + return new NodeObject(SyntaxKind.JSDocThrowsTag, { + tagName, + typeExpression, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocThisTag(tagName, typeExpression, comment) { + return new NodeObject(SyntaxKind.JSDocThisTag, { + tagName, + typeExpression, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocImportTag(tagName, importClause, moduleSpecifier, attributes, comment) { + return new NodeObject(SyntaxKind.JSDocImportTag, { + tagName, + importClause, + moduleSpecifier, + attributes, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocCallbackTag(tagName, typeExpression, name, comment) { + return new NodeObject(SyntaxKind.JSDocCallbackTag, { + tagName, + typeExpression, + name, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocOverloadTag(tagName, typeExpression, comment) { + return new NodeObject(SyntaxKind.JSDocOverloadTag, { + tagName, + typeExpression, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocTypedefTag(tagName, typeExpression, name, comment) { + return new NodeObject(SyntaxKind.JSDocTypedefTag, { + tagName, + typeExpression, + name, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocSignature(typeParameters, parameters, type) { + return new NodeObject(SyntaxKind.JSDocSignature, { + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + }); +} +export function createJSDocNameReference(name) { + return new NodeObject(SyntaxKind.JSDocNameReference, { + name, + }); +} +export function createModuleDeclaration(modifiers, keyword, name, body) { + return new NodeObject(SyntaxKind.ModuleDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + keyword, + name, + body, + }); +} +export function createImportEqualsDeclaration(modifiers, isTypeOnly = false, name, moduleReference) { + return new NodeObject(SyntaxKind.ImportEqualsDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + isTypeOnly, + name, + moduleReference, + }); +} +export function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) { + return new NodeObject(SyntaxKind.ExportDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + isTypeOnly, + exportClause, + moduleSpecifier, + attributes, + }); +} +export function createImportTypeNode(isTypeOf = false, argument, attributes, qualifier, typeArguments) { + return new NodeObject(SyntaxKind.ImportType, { + isTypeOf, + argument, + attributes, + qualifier, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + }); +} +export function createImportClause(phaseModifier, name, namedBindings) { + return new NodeObject(SyntaxKind.ImportClause, { + phaseModifier, + name, + namedBindings, + }); +} +export function createImportSpecifier(isTypeOnly = false, propertyName, name) { + return new NodeObject(SyntaxKind.ImportSpecifier, { + isTypeOnly, + propertyName, + name, + }); +} +export function createJSDocText(text) { + return new NodeObject(SyntaxKind.JSDocText, { + text, + }); +} +export function createJSDocLink(name, text) { + return new NodeObject(SyntaxKind.JSDocLink, { + name, + text, + }); +} +export function createJSDocLinkPlain(name, text) { + return new NodeObject(SyntaxKind.JSDocLinkPlain, { + name, + text, + }); +} +export function createJSDocLinkCode(name, text) { + return new NodeObject(SyntaxKind.JSDocLinkCode, { + name, + text, + }); +} +export function createTypeParameterDeclaration(modifiers, name, constraint, expression, defaultType) { + return new NodeObject(SyntaxKind.TypeParameter, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + constraint, + expression, + defaultType, + }); +} +export function createSyntheticReferenceExpression(expression, thisArg) { + return new NodeObject(SyntaxKind.SyntheticReferenceExpression, { + expression, + thisArg, + }); +} +export function createJSDocTypeLiteral(jsdocPropertyTags, isArrayType) { + return new NodeObject(SyntaxKind.JSDocTypeLiteral, { + jsdocPropertyTags, + isArrayType, + }); +} +export function createForInStatement(awaitModifier, initializer, expression, statement) { + return new NodeObject(SyntaxKind.ForInStatement, { + awaitModifier, + initializer, + expression, + statement, + }); +} +export function createForOfStatement(awaitModifier, initializer, expression, statement) { + return new NodeObject(SyntaxKind.ForOfStatement, { + awaitModifier, + initializer, + expression, + statement, + }); +} +export function createCaseClause(expression, statements) { + return new NodeObject(SyntaxKind.CaseClause, { + expression, + statements: createNodeArray(statements), + }); +} +export function createDefaultClause(expression, statements) { + return new NodeObject(SyntaxKind.DefaultClause, { + expression, + statements: createNodeArray(statements), + }); +} +export function createObjectBindingPattern(elements) { + return new NodeObject(SyntaxKind.ObjectBindingPattern, { + elements: createNodeArray(elements), + }); +} +export function createArrayBindingPattern(elements) { + return new NodeObject(SyntaxKind.ArrayBindingPattern, { + elements: createNodeArray(elements), + }); +} +export function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { + return new NodeObject(SyntaxKind.JSDocParameterTag, { + tagName, + name, + isBracketed, + typeExpression, + isNameFirst, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { + return new NodeObject(SyntaxKind.JSDocPropertyTag, { + tagName, + name, + isBracketed, + typeExpression, + isNameFirst, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function updateQualifiedName(node, left, right) { + return node.left !== left || node.right !== right ? createQualifiedName(left, right) : node; +} +export function updateComputedPropertyName(node, expression) { + return node.expression !== expression ? createComputedPropertyName(expression) : node; +} +export function updateDecorator(node, expression) { + return node.expression !== expression ? createDecorator(expression) : node; +} +export function updateIfStatement(node, expression, thenStatement, elseStatement) { + return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? createIfStatement(expression, thenStatement, elseStatement) : node; +} +export function updateDoStatement(node, statement, expression) { + return node.statement !== statement || node.expression !== expression ? createDoStatement(statement, expression) : node; +} +export function updateWhileStatement(node, expression, statement) { + return node.expression !== expression || node.statement !== statement ? createWhileStatement(expression, statement) : node; +} +export function updateForStatement(node, initializer, condition, incrementor, statement) { + return node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement ? createForStatement(initializer, condition, incrementor, statement) : node; +} +export function updateBreakStatement(node, label) { + return node.label !== label ? createBreakStatement(label) : node; +} +export function updateContinueStatement(node, label) { + return node.label !== label ? createContinueStatement(label) : node; +} +export function updateReturnStatement(node, expression) { + return node.expression !== expression ? createReturnStatement(expression) : node; +} +export function updateWithStatement(node, expression, statement) { + return node.expression !== expression || node.statement !== statement ? createWithStatement(expression, statement) : node; +} +export function updateSwitchStatement(node, expression, caseBlock) { + return node.expression !== expression || node.caseBlock !== caseBlock ? createSwitchStatement(expression, caseBlock) : node; +} +export function updateCaseBlock(node, clauses) { + return node.clauses !== clauses ? createCaseBlock(clauses) : node; +} +export function updateThrowStatement(node, expression) { + return node.expression !== expression ? createThrowStatement(expression) : node; +} +export function updateTryStatement(node, tryBlock, catchClause, finallyBlock) { + return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? createTryStatement(tryBlock, catchClause, finallyBlock) : node; +} +export function updateCatchClause(node, variableDeclaration, block) { + return node.variableDeclaration !== variableDeclaration || node.block !== block ? createCatchClause(variableDeclaration, block) : node; +} +export function updateLabeledStatement(node, label, statement) { + return node.label !== label || node.statement !== statement ? createLabeledStatement(label, statement) : node; +} +export function updateExpressionStatement(node, expression) { + return node.expression !== expression ? createExpressionStatement(expression) : node; +} +export function updateBlock(node, statements) { + return node.statements !== statements ? createBlock(statements, node.multiLine) : node; +} +export function updateVariableStatement(node, modifiers, declarationList) { + return node.modifiers !== modifiers || node.declarationList !== declarationList ? createVariableStatement(modifiers, declarationList) : node; +} +export function updateVariableDeclaration(node, name, exclamationToken, type, initializer) { + return node.name !== name || node.exclamationToken !== exclamationToken || node.type !== type || node.initializer !== initializer ? createVariableDeclaration(name, exclamationToken, type, initializer) : node; +} +export function updateVariableDeclarationList(node, declarations) { + return node.declarations !== declarations ? createVariableDeclarationList(declarations, node.flags) : node; +} +export function updateParameterDeclaration(node, modifiers, dotDotDotToken, name, questionToken, type, initializer) { + return node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type || node.initializer !== initializer ? createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) : node; +} +export function updateBindingElement(node, dotDotDotToken, propertyName, name, initializer) { + return node.dotDotDotToken !== dotDotDotToken || node.propertyName !== propertyName || node.name !== name || node.initializer !== initializer ? createBindingElement(dotDotDotToken, propertyName, name, initializer) : node; +} +export function updateMissingDeclaration(node, modifiers) { + return node.modifiers !== modifiers ? createMissingDeclaration(modifiers) : node; +} +export function updateFunctionDeclaration(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) { + return node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) : node; +} +export function updateClassDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) { + return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : node; +} +export function updateClassExpression(node, modifiers, name, typeParameters, heritageClauses, members) { + return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? createClassExpression(modifiers, name, typeParameters, heritageClauses, members) : node; +} +export function updateHeritageClause(node, types) { + return node.types !== types ? createHeritageClause(node.token, types) : node; +} +export function updateInterfaceDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) { + return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) : node; +} +export function updateTypeAliasDeclaration(node, modifiers, name, typeParameters, type) { + return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? createTypeAliasDeclaration(modifiers, name, typeParameters, type) : node; +} +export function updateEnumMember(node, name, initializer) { + return node.name !== name || node.initializer !== initializer ? createEnumMember(name, initializer) : node; +} +export function updateEnumDeclaration(node, modifiers, name, members) { + return node.modifiers !== modifiers || node.name !== name || node.members !== members ? createEnumDeclaration(modifiers, name, members) : node; +} +export function updateModuleBlock(node, statements) { + return node.statements !== statements ? createModuleBlock(statements) : node; +} +export function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, attributes) { + return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) : node; +} +export function updateExternalModuleReference(node, expression) { + return node.expression !== expression ? createExternalModuleReference(expression) : node; +} +export function updateNamespaceImport(node, name) { + return node.name !== name ? createNamespaceImport(name) : node; +} +export function updateNamedImports(node, elements) { + return node.elements !== elements ? createNamedImports(elements) : node; +} +export function updateExportAssignment(node, modifiers, type, expression) { + return node.modifiers !== modifiers || node.type !== type || node.expression !== expression ? createExportAssignment(modifiers, node.isExportEquals, type, expression) : node; +} +export function updateNamespaceExportDeclaration(node, modifiers, name) { + return node.modifiers !== modifiers || node.name !== name ? createNamespaceExportDeclaration(modifiers, name) : node; +} +export function updateNamespaceExport(node, name) { + return node.name !== name ? createNamespaceExport(name) : node; +} +export function updateNamedExports(node, elements) { + return node.elements !== elements ? createNamedExports(elements) : node; +} +export function updateExportSpecifier(node, propertyName, name) { + return node.propertyName !== propertyName || node.name !== name ? createExportSpecifier(node.isTypeOnly, propertyName, name) : node; +} +export function updateCallSignatureDeclaration(node, typeParameters, parameters, type) { + return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createCallSignatureDeclaration(typeParameters, parameters, type) : node; +} +export function updateConstructSignatureDeclaration(node, typeParameters, parameters, type) { + return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createConstructSignatureDeclaration(typeParameters, parameters, type) : node; +} +export function updateConstructorDeclaration(node, modifiers, typeParameters, parameters, type, body) { + return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createConstructorDeclaration(modifiers, typeParameters, parameters, type, body) : node; +} +export function updateGetAccessorDeclaration(node, modifiers, name, typeParameters, parameters, type, body) { + return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createGetAccessorDeclaration(modifiers, name, typeParameters, parameters, type, body) : node; +} +export function updateSetAccessorDeclaration(node, modifiers, name, typeParameters, parameters, type, body) { + return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createSetAccessorDeclaration(modifiers, name, typeParameters, parameters, type, body) : node; +} +export function updateIndexSignatureDeclaration(node, modifiers, parameters, type) { + return node.modifiers !== modifiers || node.parameters !== parameters || node.type !== type ? createIndexSignatureDeclaration(modifiers, parameters, type) : node; +} +export function updateMethodSignatureDeclaration(node, modifiers, name, postfixToken, typeParameters, parameters, type) { + return node.modifiers !== modifiers || node.name !== name || node.postfixToken !== postfixToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createMethodSignatureDeclaration(modifiers, name, postfixToken, typeParameters, parameters, type) : node; +} +export function updateMethodDeclaration(node, modifiers, asteriskToken, name, postfixToken, typeParameters, parameters, type, body) { + return node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.name !== name || node.postfixToken !== postfixToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createMethodDeclaration(modifiers, asteriskToken, name, postfixToken, typeParameters, parameters, type, body) : node; +} +export function updatePropertySignatureDeclaration(node, modifiers, name, postfixToken, type, initializer) { + return node.modifiers !== modifiers || node.name !== name || node.postfixToken !== postfixToken || node.type !== type || node.initializer !== initializer ? createPropertySignatureDeclaration(modifiers, name, postfixToken, type, initializer) : node; +} +export function updatePropertyDeclaration(node, modifiers, name, postfixToken, type, initializer) { + return node.modifiers !== modifiers || node.name !== name || node.postfixToken !== postfixToken || node.type !== type || node.initializer !== initializer ? createPropertyDeclaration(modifiers, name, postfixToken, type, initializer) : node; +} +export function updateClassStaticBlockDeclaration(node, modifiers, body) { + return node.modifiers !== modifiers || node.body !== body ? createClassStaticBlockDeclaration(modifiers, body) : node; +} +export function updateBinaryExpression(node, modifiers, left, type, operatorToken, right) { + return node.modifiers !== modifiers || node.left !== left || node.type !== type || node.operatorToken !== operatorToken || node.right !== right ? createBinaryExpression(modifiers, left, type, operatorToken, right) : node; +} +export function updatePrefixUnaryExpression(node, operand) { + return node.operand !== operand ? createPrefixUnaryExpression(node.operator, operand) : node; +} +export function updatePostfixUnaryExpression(node, operand) { + return node.operand !== operand ? createPostfixUnaryExpression(operand, node.operator) : node; +} +export function updateYieldExpression(node, asteriskToken, expression) { + return node.asteriskToken !== asteriskToken || node.expression !== expression ? createYieldExpression(asteriskToken, expression) : node; +} +export function updateArrowFunction(node, modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { + return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) : node; +} +export function updateFunctionExpression(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) { + return node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) : node; +} +export function updateAsExpression(node, expression, type) { + return node.expression !== expression || node.type !== type ? createAsExpression(expression, type) : node; +} +export function updateSatisfiesExpression(node, expression, type) { + return node.expression !== expression || node.type !== type ? createSatisfiesExpression(expression, type) : node; +} +export function updateConditionalExpression(node, condition, questionToken, whenTrue, colonToken, whenFalse) { + return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) : node; +} +export function updatePropertyAccessExpression(node, expression, questionDotToken, name) { + return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? createPropertyAccessExpression(expression, questionDotToken, name, node.flags) : node; +} +export function updateElementAccessExpression(node, expression, questionDotToken, argumentExpression) { + return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? createElementAccessExpression(expression, questionDotToken, argumentExpression, node.flags) : node; +} +export function updateCallExpression(node, expression, questionDotToken, typeArguments, arguments_) { + return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== arguments_ ? createCallExpression(expression, questionDotToken, typeArguments, arguments_, node.flags) : node; +} +export function updateNewExpression(node, expression, typeArguments, arguments_) { + return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== arguments_ ? createNewExpression(expression, typeArguments, arguments_) : node; +} +export function updateMetaProperty(node, name) { + return node.name !== name ? createMetaProperty(node.keywordToken, name) : node; +} +export function updateNonNullExpression(node, expression) { + return node.expression !== expression ? createNonNullExpression(expression, node.flags) : node; +} +export function updateSpreadElement(node, expression) { + return node.expression !== expression ? createSpreadElement(expression) : node; +} +export function updateTemplateExpression(node, head, templateSpans) { + return node.head !== head || node.templateSpans !== templateSpans ? createTemplateExpression(head, templateSpans) : node; +} +export function updateTemplateSpan(node, expression, literal) { + return node.expression !== expression || node.literal !== literal ? createTemplateSpan(expression, literal) : node; +} +export function updateTaggedTemplateExpression(node, tag, questionDotToken, typeArguments, template) { + return node.tag !== tag || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.template !== template ? createTaggedTemplateExpression(tag, questionDotToken, typeArguments, template, node.flags) : node; +} +export function updateParenthesizedExpression(node, expression) { + return node.expression !== expression ? createParenthesizedExpression(expression) : node; +} +export function updateArrayLiteralExpression(node, elements) { + return node.elements !== elements ? createArrayLiteralExpression(elements, node.multiLine) : node; +} +export function updateObjectLiteralExpression(node, properties) { + return node.properties !== properties ? createObjectLiteralExpression(properties, node.multiLine) : node; +} +export function updateSpreadAssignment(node, expression) { + return node.expression !== expression ? createSpreadAssignment(expression) : node; +} +export function updatePropertyAssignment(node, modifiers, name, postfixToken, type, initializer) { + return node.modifiers !== modifiers || node.name !== name || node.postfixToken !== postfixToken || node.type !== type || node.initializer !== initializer ? createPropertyAssignment(modifiers, name, postfixToken, type, initializer) : node; +} +export function updateShorthandPropertyAssignment(node, modifiers, name, postfixToken, type, equalsToken, objectAssignmentInitializer) { + return node.modifiers !== modifiers || node.name !== name || node.postfixToken !== postfixToken || node.type !== type || node.equalsToken !== equalsToken || node.objectAssignmentInitializer !== objectAssignmentInitializer ? createShorthandPropertyAssignment(modifiers, name, postfixToken, type, equalsToken, objectAssignmentInitializer) : node; +} +export function updateDeleteExpression(node, expression) { + return node.expression !== expression ? createDeleteExpression(expression) : node; +} +export function updateTypeOfExpression(node, expression) { + return node.expression !== expression ? createTypeOfExpression(expression) : node; +} +export function updateVoidExpression(node, expression) { + return node.expression !== expression ? createVoidExpression(expression) : node; +} +export function updateAwaitExpression(node, expression) { + return node.expression !== expression ? createAwaitExpression(expression) : node; +} +export function updateTypeAssertion(node, type, expression) { + return node.type !== type || node.expression !== expression ? createTypeAssertion(type, expression) : node; +} +export function updateUnionTypeNode(node, types) { + return node.types !== types ? createUnionTypeNode(types) : node; +} +export function updateIntersectionTypeNode(node, types) { + return node.types !== types ? createIntersectionTypeNode(types) : node; +} +export function updateConditionalTypeNode(node, checkType, extendsType, trueType, falseType) { + return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? createConditionalTypeNode(checkType, extendsType, trueType, falseType) : node; +} +export function updateTypeOperatorNode(node, type) { + return node.type !== type ? createTypeOperatorNode(node.operator, type) : node; +} +export function updateInferTypeNode(node, typeParameter) { + return node.typeParameter !== typeParameter ? createInferTypeNode(typeParameter) : node; +} +export function updateArrayTypeNode(node, elementType) { + return node.elementType !== elementType ? createArrayTypeNode(elementType) : node; +} +export function updateIndexedAccessTypeNode(node, objectType, indexType) { + return node.objectType !== objectType || node.indexType !== indexType ? createIndexedAccessTypeNode(objectType, indexType) : node; +} +export function updateTypeReferenceNode(node, typeName, typeArguments) { + return node.typeName !== typeName || node.typeArguments !== typeArguments ? createTypeReferenceNode(typeName, typeArguments) : node; +} +export function updateExpressionWithTypeArguments(node, expression, typeArguments) { + return node.expression !== expression || node.typeArguments !== typeArguments ? createExpressionWithTypeArguments(expression, typeArguments) : node; +} +export function updateLiteralTypeNode(node, literal) { + return node.literal !== literal ? createLiteralTypeNode(literal) : node; +} +export function updateTypePredicateNode(node, assertsModifier, parameterName, type) { + return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? createTypePredicateNode(assertsModifier, parameterName, type) : node; +} +export function updateImportAttribute(node, name, value) { + return node.name !== name || node.value !== value ? createImportAttribute(name, value) : node; +} +export function updateImportAttributes(node, attributes) { + return node.attributes !== attributes ? createImportAttributes(node.token, attributes, node.multiLine) : node; +} +export function updateTypeQueryNode(node, exprName, typeArguments) { + return node.exprName !== exprName || node.typeArguments !== typeArguments ? createTypeQueryNode(exprName, typeArguments) : node; +} +export function updateMappedTypeNode(node, readonlyToken, typeParameter, nameType, questionToken, type, members) { + return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) : node; +} +export function updateTypeLiteralNode(node, members) { + return node.members !== members ? createTypeLiteralNode(members) : node; +} +export function updateTupleTypeNode(node, elements) { + return node.elements !== elements ? createTupleTypeNode(elements) : node; +} +export function updateNamedTupleMember(node, dotDotDotToken, name, questionToken, type) { + return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? createNamedTupleMember(dotDotDotToken, name, questionToken, type) : node; +} +export function updateOptionalTypeNode(node, type) { + return node.type !== type ? createOptionalTypeNode(type) : node; +} +export function updateRestTypeNode(node, type) { + return node.type !== type ? createRestTypeNode(type) : node; +} +export function updateParenthesizedTypeNode(node, type) { + return node.type !== type ? createParenthesizedTypeNode(type) : node; +} +export function updateFunctionTypeNode(node, typeParameters, parameters, type) { + return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createFunctionTypeNode(typeParameters, parameters, type) : node; +} +export function updateConstructorTypeNode(node, modifiers, typeParameters, parameters, type) { + return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createConstructorTypeNode(modifiers, typeParameters, parameters, type) : node; +} +export function updateTemplateLiteralTypeNode(node, head, templateSpans) { + return node.head !== head || node.templateSpans !== templateSpans ? createTemplateLiteralTypeNode(head, templateSpans) : node; +} +export function updateTemplateLiteralTypeSpan(node, type, literal) { + return node.type !== type || node.literal !== literal ? createTemplateLiteralTypeSpan(type, literal) : node; +} +export function updateSyntheticExpression(node, tupleNameSource) { + return node.tupleNameSource !== tupleNameSource ? createSyntheticExpression(node.type, node.isSpread, tupleNameSource) : node; +} +export function updatePartiallyEmittedExpression(node, expression) { + return node.expression !== expression ? createPartiallyEmittedExpression(expression) : node; +} +export function updateJsxElement(node, openingElement, children, closingElement) { + return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? createJsxElement(openingElement, children, closingElement) : node; +} +export function updateJsxAttributes(node, properties) { + return node.properties !== properties ? createJsxAttributes(properties) : node; +} +export function updateJsxNamespacedName(node, namespace, name) { + return node.namespace !== namespace || node.name !== name ? createJsxNamespacedName(namespace, name) : node; +} +export function updateJsxOpeningElement(node, tagName, typeArguments, attributes) { + return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? createJsxOpeningElement(tagName, typeArguments, attributes) : node; +} +export function updateJsxSelfClosingElement(node, tagName, typeArguments, attributes) { + return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? createJsxSelfClosingElement(tagName, typeArguments, attributes) : node; +} +export function updateJsxFragment(node, openingFragment, children, closingFragment) { + return node.openingFragment !== openingFragment || node.children !== children || node.closingFragment !== closingFragment ? createJsxFragment(openingFragment, children, closingFragment) : node; +} +export function updateJsxAttribute(node, name, initializer) { + return node.name !== name || node.initializer !== initializer ? createJsxAttribute(name, initializer) : node; +} +export function updateJsxSpreadAttribute(node, expression) { + return node.expression !== expression ? createJsxSpreadAttribute(expression) : node; +} +export function updateJsxClosingElement(node, tagName) { + return node.tagName !== tagName ? createJsxClosingElement(tagName) : node; +} +export function updateJsxExpression(node, dotDotDotToken, expression) { + return node.dotDotDotToken !== dotDotDotToken || node.expression !== expression ? createJsxExpression(dotDotDotToken, expression) : node; +} +export function updateSyntaxList(node, children) { + return node.children !== children ? createSyntaxList(children) : node; +} +export function updateJSDoc(node, comment, tags) { + return node.comment !== comment || node.tags !== tags ? createJSDoc(comment, tags) : node; +} +export function updateJSDocTypeExpression(node, type) { + return node.type !== type ? createJSDocTypeExpression(type) : node; +} +export function updateJSDocNonNullableType(node, type) { + return node.type !== type ? createJSDocNonNullableType(type) : node; +} +export function updateJSDocNullableType(node, type) { + return node.type !== type ? createJSDocNullableType(type) : node; +} +export function updateJSDocVariadicType(node, type) { + return node.type !== type ? createJSDocVariadicType(type) : node; +} +export function updateJSDocOptionalType(node, type) { + return node.type !== type ? createJSDocOptionalType(type) : node; +} +export function updateJSDocTypeTag(node, tagName, typeExpression, comment) { + return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocTypeTag(tagName, typeExpression, comment) : node; +} +export function updateJSDocUnknownTag(node, tagName, comment) { + return node.tagName !== tagName || node.comment !== comment ? createJSDocUnknownTag(tagName, comment) : node; +} +export function updateJSDocTemplateTag(node, tagName, constraint, typeParameters, comment) { + return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? createJSDocTemplateTag(tagName, constraint, typeParameters, comment) : node; +} +export function updateJSDocReturnTag(node, tagName, typeExpression, comment) { + return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocReturnTag(tagName, typeExpression, comment) : node; +} +export function updateJSDocPublicTag(node, tagName, comment) { + return node.tagName !== tagName || node.comment !== comment ? createJSDocPublicTag(tagName, comment) : node; +} +export function updateJSDocPrivateTag(node, tagName, comment) { + return node.tagName !== tagName || node.comment !== comment ? createJSDocPrivateTag(tagName, comment) : node; +} +export function updateJSDocProtectedTag(node, tagName, comment) { + return node.tagName !== tagName || node.comment !== comment ? createJSDocProtectedTag(tagName, comment) : node; +} +export function updateJSDocReadonlyTag(node, tagName, comment) { + return node.tagName !== tagName || node.comment !== comment ? createJSDocReadonlyTag(tagName, comment) : node; +} +export function updateJSDocOverrideTag(node, tagName, comment) { + return node.tagName !== tagName || node.comment !== comment ? createJSDocOverrideTag(tagName, comment) : node; +} +export function updateJSDocDeprecatedTag(node, tagName, comment) { + return node.tagName !== tagName || node.comment !== comment ? createJSDocDeprecatedTag(tagName, comment) : node; +} +export function updateJSDocSeeTag(node, tagName, nameExpression, comment) { + return node.tagName !== tagName || node.nameExpression !== nameExpression || node.comment !== comment ? createJSDocSeeTag(tagName, nameExpression, comment) : node; +} +export function updateJSDocImplementsTag(node, tagName, className, comment) { + return node.tagName !== tagName || node.className !== className || node.comment !== comment ? createJSDocImplementsTag(tagName, className, comment) : node; +} +export function updateJSDocAugmentsTag(node, tagName, className, comment) { + return node.tagName !== tagName || node.className !== className || node.comment !== comment ? createJSDocAugmentsTag(tagName, className, comment) : node; +} +export function updateJSDocSatisfiesTag(node, tagName, typeExpression, comment) { + return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocSatisfiesTag(tagName, typeExpression, comment) : node; +} +export function updateJSDocThrowsTag(node, tagName, typeExpression, comment) { + return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocThrowsTag(tagName, typeExpression, comment) : node; +} +export function updateJSDocThisTag(node, tagName, typeExpression, comment) { + return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocThisTag(tagName, typeExpression, comment) : node; +} +export function updateJSDocImportTag(node, tagName, importClause, moduleSpecifier, attributes, comment) { + return node.tagName !== tagName || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes || node.comment !== comment ? createJSDocImportTag(tagName, importClause, moduleSpecifier, attributes, comment) : node; +} +export function updateJSDocCallbackTag(node, tagName, typeExpression, name, comment) { + return node.tagName !== tagName || node.typeExpression !== typeExpression || node.name !== name || node.comment !== comment ? createJSDocCallbackTag(tagName, typeExpression, name, comment) : node; +} +export function updateJSDocOverloadTag(node, tagName, typeExpression, comment) { + return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocOverloadTag(tagName, typeExpression, comment) : node; +} +export function updateJSDocTypedefTag(node, tagName, typeExpression, name, comment) { + return node.tagName !== tagName || node.typeExpression !== typeExpression || node.name !== name || node.comment !== comment ? createJSDocTypedefTag(tagName, typeExpression, name, comment) : node; +} +export function updateJSDocSignature(node, typeParameters, parameters, type) { + return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createJSDocSignature(typeParameters, parameters, type) : node; +} +export function updateJSDocNameReference(node, name) { + return node.name !== name ? createJSDocNameReference(name) : node; +} +export function updateModuleDeclaration(node, modifiers, name, body) { + return node.modifiers !== modifiers || node.name !== name || node.body !== body ? createModuleDeclaration(modifiers, node.keyword, name, body) : node; +} +export function updateImportEqualsDeclaration(node, modifiers, name, moduleReference) { + return node.modifiers !== modifiers || node.name !== name || node.moduleReference !== moduleReference ? createImportEqualsDeclaration(modifiers, node.isTypeOnly, name, moduleReference) : node; +} +export function updateExportDeclaration(node, modifiers, exportClause, moduleSpecifier, attributes) { + return node.modifiers !== modifiers || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? createExportDeclaration(modifiers, node.isTypeOnly, exportClause, moduleSpecifier, attributes) : node; +} +export function updateImportTypeNode(node, argument, attributes, qualifier, typeArguments) { + return node.argument !== argument || node.attributes !== attributes || node.qualifier !== qualifier || node.typeArguments !== typeArguments ? createImportTypeNode(node.isTypeOf, argument, attributes, qualifier, typeArguments) : node; +} +export function updateImportClause(node, name, namedBindings) { + return node.name !== name || node.namedBindings !== namedBindings ? createImportClause(node.phaseModifier, name, namedBindings) : node; +} +export function updateImportSpecifier(node, propertyName, name) { + return node.propertyName !== propertyName || node.name !== name ? createImportSpecifier(node.isTypeOnly, propertyName, name) : node; +} +export function updateJSDocLink(node, name) { + return node.name !== name ? createJSDocLink(name, node.text) : node; +} +export function updateJSDocLinkPlain(node, name) { + return node.name !== name ? createJSDocLinkPlain(name, node.text) : node; +} +export function updateJSDocLinkCode(node, name) { + return node.name !== name ? createJSDocLinkCode(name, node.text) : node; +} +export function updateTypeParameterDeclaration(node, modifiers, name, constraint, expression, defaultType) { + return node.modifiers !== modifiers || node.name !== name || node.constraint !== constraint || node.expression !== expression || node.defaultType !== defaultType ? createTypeParameterDeclaration(modifiers, name, constraint, expression, defaultType) : node; +} +export function updateSyntheticReferenceExpression(node, expression, thisArg) { + return node.expression !== expression || node.thisArg !== thisArg ? createSyntheticReferenceExpression(expression, thisArg) : node; +} +export function updateJSDocTypeLiteral(node, jsdocPropertyTags) { + return node.jsdocPropertyTags !== jsdocPropertyTags ? createJSDocTypeLiteral(jsdocPropertyTags, node.isArrayType) : node; +} +export function updateForInStatement(node, awaitModifier, initializer, expression, statement) { + return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? createForInStatement(awaitModifier, initializer, expression, statement) : node; +} +export function updateForOfStatement(node, awaitModifier, initializer, expression, statement) { + return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? createForOfStatement(awaitModifier, initializer, expression, statement) : node; +} +export function updateCaseClause(node, expression, statements) { + return node.expression !== expression || node.statements !== statements ? createCaseClause(expression, statements) : node; +} +export function updateDefaultClause(node, expression, statements) { + return node.expression !== expression || node.statements !== statements ? createDefaultClause(expression, statements) : node; +} +export function updateObjectBindingPattern(node, elements) { + return node.elements !== elements ? createObjectBindingPattern(elements) : node; +} +export function updateArrayBindingPattern(node, elements) { + return node.elements !== elements ? createArrayBindingPattern(elements) : node; +} +export function updateJSDocParameterTag(node, tagName, name, typeExpression, comment) { + return node.tagName !== tagName || node.name !== name || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocParameterTag(tagName, name, node.isBracketed, typeExpression, node.isNameFirst, comment) : node; +} +export function updateJSDocPropertyTag(node, tagName, name, typeExpression, comment) { + return node.tagName !== tagName || node.name !== name || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocPropertyTag(tagName, name, node.isBracketed, typeExpression, node.isNameFirst, comment) : node; +} +export function createSourceFile(statements, endOfFileToken, text, fileName, path) { + return new NodeObject(SyntaxKind.SourceFile, { + statements: createNodeArray(statements), + endOfFileToken, + text, + fileName, + path, + }); +} +function cloneSourceFileWithChanges(source, statements, endOfFileToken) { + return new NodeObject(SyntaxKind.SourceFile, { + ...cloneSourceFileData(source), + statements: createNodeArray(statements), + endOfFileToken, + }); +} +export function updateSourceFile(node, statements, endOfFileToken) { + return node.statements !== statements || node.endOfFileToken !== endOfFileToken + ? cloneSourceFileWithChanges(node, statements, endOfFileToken) + : node; +} +//# sourceMappingURL=factory.generated.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/factory.generated.js.map b/node_modules/typescript/dist/ast/factory.generated.js.map new file mode 100644 index 0000000..512faca --- /dev/null +++ b/node_modules/typescript/dist/ast/factory.generated.js.map @@ -0,0 +1 @@ +{"version":3,"file":"factory.generated.js","sourceRoot":"","sources":["../../src/ast/factory.generated.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AA+P/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EACH,+BAA+B,EAC/B,8BAA8B,GACjC,MAAM,cAAc,CAAC;AAEtB,MAAM,OAAO,UAAU;IACV,IAAI,CAAa;IAC1B,KAAK,GAAc,CAAc,CAAC;IACzB,GAAG,GAAW,CAAC,CAAC,CAAC;IACjB,GAAG,GAAW,CAAC,CAAC,CAAC;IAC1B,MAAM,GAAS,SAAU,CAAC;IAC1B,KAAK,CAAM;IAEX,YAAY,IAAgB,EAAE,IAAS;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACtB,CAAC;IAED,IAAI,kBAAkB;QAClB,OAAO,IAAI,CAAC,KAAK,EAAE,kBAAkB,CAAC;IAC1C,CAAC;IACD,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC;IAChC,CAAC;IACD,IAAI,kBAAkB;QAClB,OAAO,IAAI,CAAC,KAAK,EAAE,kBAAkB,CAAC;IAC1C,CAAC;IACD,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC;IACjC,CAAC;IACD,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,KAAK,EAAE,eAAe,CAAC;IACvC,CAA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AAI,EAAE,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5O,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,UAAgC,EAAE,cAAyB,EAAE,IAAY,EAAE,QAAgB,EAAE,IAAU;IACpI,OAAO,IAAI,UAAU,CAAC,UAAU,CAAC,UAAU,EAAE;QACzC,UAAU,EAAE,eAAe,CAAC,UAAU,CAAC;QACvC,cAAc;QACd,IAAI;QACJ,QAAQ;QACR,IAAI;KACP,CAA0B,CAAC;AAChC,CAAC;AAED,SAAS,0BAA0B,CAAC,MAAkB,EAAE,UAAgC,EAAE,cAAyB;IAC/G,OAAO,IAAI,UAAU,CAAC,UAAU,CAAC,UAAU,EAAE;QACzC,GAAG,mBAAmB,CAAC,MAAM,CAAC;QAC9B,UAAU,EAAE,eAAe,CAAC,UAAU,CAAC;QACvC,cAAc;KACjB,CAA0B,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAgB,EAAE,UAAgC,EAAE,cAAyB;IAC1G,OAAO,IAAI,CAAC,UAAU,KAAK,UAAU,IAAI,IAAI,CAAC,cAAc,KAAK,cAAc;QAC3E,CAAC,CAAC,0BAA0B,CAAC,IAAI,EAAE,UAAU,EAAE,cAAc,CAAC;QAC9D,CAAC,CAAC,IAAI,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/index.d.ts b/node_modules/typescript/dist/ast/index.d.ts new file mode 100644 index 0000000..7a74699 --- /dev/null +++ b/node_modules/typescript/dist/ast/index.d.ts @@ -0,0 +1,20 @@ +export { CharacterCodes } from "#enums/characterCodes"; +export { CommentDirectiveType } from "#enums/commentDirectiveType"; +export { InternalSymbolName } from "#enums/internalSymbolName"; +export { LanguageVariant } from "#enums/languageVariant"; +export { ModifierFlags } from "#enums/modifierFlags"; +export { NodeFlags } from "#enums/nodeFlags"; +export { RegularExpressionFlags } from "#enums/regularExpressionFlags"; +export { ScriptKind } from "#enums/scriptKind"; +export { ScriptTarget } from "#enums/scriptTarget"; +export { SyntaxKind } from "#enums/syntaxKind"; +export { TokenFlags } from "#enums/tokenFlags"; +export * from "./ast.ts"; +export * from "./astnav.ts"; +export * from "./clone.ts"; +export * from "./is.ts"; +export * from "./jsdoc.ts"; +export * from "./scanner.ts"; +export * from "./utils.ts"; +export * from "./visitor.ts"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/index.d.ts.map b/node_modules/typescript/dist/ast/index.d.ts.map new file mode 100644 index 0000000..53d8898 --- /dev/null +++ b/node_modules/typescript/dist/ast/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/index.js b/node_modules/typescript/dist/ast/index.js new file mode 100644 index 0000000..2621741 --- /dev/null +++ b/node_modules/typescript/dist/ast/index.js @@ -0,0 +1,20 @@ +export { CharacterCodes } from "#enums/characterCodes"; +export { CommentDirectiveType } from "#enums/commentDirectiveType"; +export { InternalSymbolName } from "#enums/internalSymbolName"; +export { LanguageVariant } from "#enums/languageVariant"; +export { ModifierFlags } from "#enums/modifierFlags"; +export { NodeFlags } from "#enums/nodeFlags"; +export { RegularExpressionFlags } from "#enums/regularExpressionFlags"; +export { ScriptKind } from "#enums/scriptKind"; +export { ScriptTarget } from "#enums/scriptTarget"; +export { SyntaxKind } from "#enums/syntaxKind"; +export { TokenFlags } from "#enums/tokenFlags"; +export * from "./ast.js"; +export * from "./astnav.js"; +export * from "./clone.js"; +export * from "./is.js"; +export * from "./jsdoc.js"; +export * from "./scanner.js"; +export * from "./utils.js"; +export * from "./visitor.js"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/index.js.map b/node_modules/typescript/dist/ast/index.js.map new file mode 100644 index 0000000..7017eee --- /dev/null +++ b/node_modules/typescript/dist/ast/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/is.d.ts b/node_modules/typescript/dist/ast/is.d.ts new file mode 100644 index 0000000..77d81a1 --- /dev/null +++ b/node_modules/typescript/dist/ast/is.d.ts @@ -0,0 +1,35 @@ +import { OuterExpressionKinds } from "#enums/outerExpressionKinds"; +import type { AsExpression, BindingPattern, BlockOrExpression, BooleanLiteral, ConciseBody, ExclamationToken, Expression, ExpressionWithTypeArguments, ForInitializer, Identifier, JSDocTypeExpression, JSDocTypeLiteral, JsxTagNameExpression, LeftHandSideExpression, LiteralExpression, MinusToken, ModuleDeclaration, Node, NonNullExpression, NullLiteral, ParenthesizedExpression, PartiallyEmittedExpression, PlusToken, PrefixUnaryExpression, QuestionToken, ReadonlyKeyword, SatisfiesExpression, Statement, TemplateMiddle, TemplateTail, ThisTypeNode, TypeAssertion, TypeNode, UnaryExpressionBase } from "./ast.ts"; +export * from "./is.generated.ts"; +type JSDocNamespaceDeclaration = ModuleDeclaration; +type WrappedExpression = ParenthesizedExpression | TypeAssertion | AsExpression | SatisfiesExpression | ExpressionWithTypeArguments | NonNullExpression | PartiallyEmittedExpression; +type OuterExpression = WrappedExpression; +export declare function isTypeNode(node: Node): node is TypeNode; +export declare function isStatement(node: Node): node is Statement; +export declare function isExpression(node: Node): node is Expression; +export declare function isBlockOrExpression(node: Node): node is BlockOrExpression; +export declare function isLeftHandSideExpression(node: Node): node is LeftHandSideExpression; +export declare function skipPartiallyEmittedExpressions(node: Expression): Expression; +export declare function skipPartiallyEmittedExpressions(node: Node): Node; +export declare function isUnaryExpression(node: Node): node is UnaryExpressionBase; +/** @internal */ +export declare function isOuterExpression(node: Node, kinds?: OuterExpressionKinds): node is OuterExpression; +/** @internal */ +export declare function skipOuterExpressions(node: WrappedExpression): T; +/** @internal */ +export declare function skipOuterExpressions(node: Expression, kinds?: OuterExpressionKinds): Expression; +/** @internal */ +export declare function skipOuterExpressions(node: Node, kinds?: OuterExpressionKinds): Node; +export declare function isBindingPattern(node: Node): node is BindingPattern; +export declare function isConciseBody(node: Node): node is ConciseBody; +export declare function isForInitializer(node: Node): node is ForInitializer; +export declare function isQuestionOrExclamationToken(node: Node): node is QuestionToken | ExclamationToken; +export declare function isIdentifierOrThisTypeNode(node: Node): node is Identifier | ThisTypeNode; +export declare function isReadonlyKeywordOrPlusOrMinusToken(node: Node): node is ReadonlyKeyword | PlusToken | MinusToken; +export declare function isQuestionOrPlusOrMinusToken(node: Node): node is QuestionToken | PlusToken | MinusToken; +export declare function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail; +export declare function isLiteralTypeLiteral(node: Node): node is NullLiteral | BooleanLiteral | LiteralExpression | PrefixUnaryExpression; +export declare function isIdentifierOrJSDocNamespaceDeclaration(node: Node): node is Identifier | JSDocNamespaceDeclaration; +export declare function isJSDocTypeExpressionOrJSDocTypeLiteral(node: Node): node is JSDocTypeExpression | JSDocTypeLiteral; +export declare function isJsxTagNameExpression(node: Node): node is JsxTagNameExpression; +//# sourceMappingURL=is.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/is.d.ts.map b/node_modules/typescript/dist/ast/is.d.ts.map new file mode 100644 index 0000000..4b19750 --- /dev/null +++ b/node_modules/typescript/dist/ast/is.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":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C,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,aAAa,GAAG,SAAS,GAAG,UAAU,CAEvG;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,cAAc,GAAG,YAAY,CAEhG;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,WAAW,GAAG,cAAc,GAAG,iBAAiB,GAAG,qBAAqB,CAKjI;AAED,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,UAAU,GAAG,yBAAyB,CAElH;AAED,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,mBAAmB,GAAG,gBAAgB,CAElH;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,oBAAoB,CAM/E"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/is.generated.d.ts b/node_modules/typescript/dist/ast/is.generated.d.ts new file mode 100644 index 0000000..2b785fc --- /dev/null +++ b/node_modules/typescript/dist/ast/is.generated.d.ts @@ -0,0 +1,329 @@ +import { SyntaxKind } from "#enums/syntaxKind"; +import type { AbstractKeyword, AccessExpression, AccessorDeclaration, AccessorKeyword, AdditiveOperator, AdditiveOperatorOrHigher, AnyImportSyntax, ArrayBindingElement, ArrayBindingPattern, ArrayDestructuringAssignment, ArrayLiteralExpression, ArrayTypeNode, ArrowFunction, AsExpression, AssertionExpression, AssertKeyword, AssertsKeyword, AssignmentOperator, AssignmentOperatorOrHigher, AssignmentOperatorToken, AsteriskToken, AsyncKeyword, AwaitExpression, AwaitKeyword, BigIntLiteral, BinaryExpression, BinaryOperator, BinaryOperatorToken, BindingElement, BindingName, BitwiseOperator, BitwiseOperatorOrHigher, Block, BooleanLiteral, BreakOrContinueStatement, BreakStatement, CallExpression, CallLikeExpression, CallOrNewExpression, CallSignatureDeclaration, CaseBlock, CaseClause, CaseKeyword, CatchClause, ClassDeclaration, ClassExpression, ClassLikeDeclaration, ClassStaticBlockDeclaration, ColonToken, CompoundAssignmentOperator, ComputedPropertyName, ConditionalExpression, ConditionalTypeNode, ConstKeyword, ConstructorDeclaration, ConstructorTypeNode, ConstructSignatureDeclaration, ContinueStatement, DebuggerStatement, DeclarationName, DeclareKeyword, Decorator, DefaultClause, DefaultKeyword, DeleteExpression, DestructuringAssignment, DoStatement, DotDotDotToken, DotToken, ElementAccessExpression, EmptyStatement, EndOfFile, EntityName, EnumDeclaration, EnumMember, EqualityOperator, EqualityOperatorOrHigher, EqualsGreaterThanToken, EqualsToken, ExclamationToken, ExponentiationOperator, ExportAssignment, ExportDeclaration, ExportKeyword, ExportSpecifier, ExpressionStatement, ExpressionWithTypeArguments, ExternalModuleReference, FalseLiteral, ForInStatement, ForOfStatement, ForStatement, FunctionBody, FunctionDeclaration, FunctionExpression, FunctionLikeDeclaration, FunctionTypeNode, GetAccessorDeclaration, HeritageClause, Identifier, IfStatement, ImportAttribute, ImportAttributeName, ImportAttributes, ImportClause, ImportClauseOrBindingPattern, ImportDeclaration, ImportEqualsDeclaration, ImportExpression, ImportPhaseModifierSyntaxKind, ImportSpecifier, ImportTypeNode, IndexedAccessTypeNode, IndexSignatureDeclaration, InferTypeNode, InKeyword, InterfaceDeclaration, IntersectionTypeNode, JSDoc, JSDocAllType, JSDocAugmentsTag, JSDocCallbackTag, JSDocComment, JSDocDeprecatedTag, JSDocFullName, JSDocImplementsTag, JSDocImportTag, JSDocLink, JSDocLinkCode, JSDocLinkPlain, JSDocNameReference, JSDocNonNullableType, JSDocNullableType, JSDocOptionalType, JSDocOverloadTag, JSDocOverrideTag, JSDocParameterTag, JSDocPrivateTag, JSDocPropertyTag, JSDocProtectedTag, JSDocPublicTag, JSDocReadonlyTag, JSDocReturnTag, JSDocSatisfiesTag, JSDocSeeTag, JSDocSignature, JSDocTemplateTag, JSDocText, JSDocThisTag, JSDocThrowsTag, JSDocTypedefTag, JSDocTypeExpression, JSDocTypeLiteral, JSDocTypeTag, JSDocUnknownTag, JSDocVariadicType, JsxAttribute, JsxAttributeLike, JsxAttributeName, JsxAttributes, JsxAttributeValue, JsxChild, JsxClosingElement, JsxClosingFragment, JsxElement, JsxExpression, JsxFragment, JsxNamespacedName, JsxOpeningElement, JsxOpeningFragment, JsxOpeningLikeElement, JsxSelfClosingElement, JsxSpreadAttribute, JsxText, JsxTokenSyntaxKind, KeywordExpression, KeywordExpressionSyntaxKind, KeywordTypeNode, KeywordTypeSyntaxKind, LabeledStatement, LiteralExpression, LiteralLikeNode, LiteralToken, LiteralTypeNode, LogicalOperator, LogicalOperatorOrHigher, LogicalOrCoalescingAssignmentOperator, MappedTypeNode, MemberName, MetaProperty, MethodDeclaration, MethodSignatureDeclaration, MinusToken, MissingDeclaration, Modifier, ModifierLike, ModifierSyntaxKind, ModuleBlock, ModuleBody, ModuleDeclaration, ModuleExportName, ModuleName, ModuleReference, MultiplicativeOperator, MultiplicativeOperatorOrHigher, NamedExportBindings, NamedExports, NamedImportBindings, NamedImports, NamedImportsOrExports, NamedTupleMember, NamespaceExport, NamespaceExportDeclaration, NamespaceImport, NewExpression, Node, NonNullExpression, NoSubstitutionTemplateLiteral, NotEmittedStatement, NotEmittedTypeElement, NullLiteral, NumericLiteral, NumericOrStringLikeLiteral, ObjectBindingPattern, ObjectDestructuringAssignment, ObjectLiteralElementLike, ObjectLiteralExpression, ObjectLiteralLikeNode, ObjectTypeDeclaration, OmittedExpression, OptionalTypeNode, OutKeyword, OverrideKeyword, ParameterDeclaration, ParenthesizedExpression, ParenthesizedTypeNode, PartiallyEmittedExpression, PlusToken, PostfixUnaryExpression, PostfixUnaryOperator, PrefixUnaryExpression, PrefixUnaryOperator, PrivateIdentifier, PrivateKeyword, PropertyAccessExpression, PropertyAssignment, PropertyDeclaration, PropertyName, PropertyNameLiteral, PropertySignatureDeclaration, ProtectedKeyword, PseudoLiteralSyntaxKind, PseudoLiteralToken, PublicKeyword, QualifiedName, QuestionDotToken, QuestionToken, ReadonlyKeyword, RegularExpressionLiteral, RelationalOperator, RelationalOperatorOrHigher, RestTypeNode, ReturnStatement, SatisfiesExpression, SemicolonClassElement, SetAccessorDeclaration, ShiftOperator, ShiftOperatorOrHigher, ShorthandPropertyAssignment, SignatureDeclaration, SourceFile, SpreadAssignment, SpreadElement, StaticKeyword, StringLiteral, StringLiteralLikeNode, SuperExpression, SwitchStatement, SyntaxList, SyntheticExpression, SyntheticReferenceExpression, TaggedTemplateExpression, TemplateExpression, TemplateHead, TemplateLiteral, TemplateLiteralLikeNode, TemplateLiteralToken, TemplateLiteralTypeNode, TemplateLiteralTypeSpan, TemplateMiddle, TemplateMiddleOrTail, TemplateSpan, TemplateTail, ThisExpression, ThisTypeNode, ThrowStatement, Token, TriviaSyntaxKind, TrueLiteral, TryStatement, TupleTypeNode, TypeAliasDeclaration, TypeAssertion, TypeLiteralNode, TypeOfExpression, TypeOperatorNode, TypeParameterDeclaration, TypePredicateNode, TypePredicateParameterName, TypeQueryNode, TypeReferenceNode, UnionOrIntersectionTypeNode, UnionTypeNode, VariableDeclaration, VariableDeclarationList, VariableOrParameterDeclaration, VariableOrPropertyDeclaration, VariableStatement, VoidExpression, WhileStatement, WithStatement, YieldExpression } from "./ast.ts"; +export declare function isToken(node: Node): node is Token; +export declare function isIdentifier(node: Node): node is Identifier; +export declare function isPrivateIdentifier(node: Node): node is PrivateIdentifier; +export declare function isQualifiedName(node: Node): node is QualifiedName; +export declare function isComputedPropertyName(node: Node): node is ComputedPropertyName; +export declare function isDecorator(node: Node): node is Decorator; +export declare function isEmptyStatement(node: Node): node is EmptyStatement; +export declare function isIfStatement(node: Node): node is IfStatement; +export declare function isDoStatement(node: Node): node is DoStatement; +export declare function isWhileStatement(node: Node): node is WhileStatement; +export declare function isForStatement(node: Node): node is ForStatement; +export declare function isBreakStatement(node: Node): node is BreakStatement; +export declare function isContinueStatement(node: Node): node is ContinueStatement; +export declare function isReturnStatement(node: Node): node is ReturnStatement; +export declare function isWithStatement(node: Node): node is WithStatement; +export declare function isSwitchStatement(node: Node): node is SwitchStatement; +export declare function isCaseBlock(node: Node): node is CaseBlock; +export declare function isThrowStatement(node: Node): node is ThrowStatement; +export declare function isTryStatement(node: Node): node is TryStatement; +export declare function isCatchClause(node: Node): node is CatchClause; +export declare function isDebuggerStatement(node: Node): node is DebuggerStatement; +export declare function isLabeledStatement(node: Node): node is LabeledStatement; +export declare function isExpressionStatement(node: Node): node is ExpressionStatement; +export declare function isBlock(node: Node): node is Block; +export declare function isVariableStatement(node: Node): node is VariableStatement; +export declare function isVariableDeclaration(node: Node): node is VariableDeclaration; +export declare function isVariableDeclarationList(node: Node): node is VariableDeclarationList; +export declare function isParameterDeclaration(node: Node): node is ParameterDeclaration; +export declare function isBindingElement(node: Node): node is BindingElement; +export declare function isMissingDeclaration(node: Node): node is MissingDeclaration; +export declare function isFunctionDeclaration(node: Node): node is FunctionDeclaration; +export declare function isClassDeclaration(node: Node): node is ClassDeclaration; +export declare function isClassExpression(node: Node): node is ClassExpression; +export declare function isHeritageClause(node: Node): node is HeritageClause; +export declare function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration; +export declare function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration; +export declare function isEnumMember(node: Node): node is EnumMember; +export declare function isEnumDeclaration(node: Node): node is EnumDeclaration; +export declare function isModuleBlock(node: Node): node is ModuleBlock; +export declare function isNotEmittedStatement(node: Node): node is NotEmittedStatement; +export declare function isNotEmittedTypeElement(node: Node): node is NotEmittedTypeElement; +export declare function isImportDeclaration(node: Node): node is ImportDeclaration; +export declare function isExternalModuleReference(node: Node): node is ExternalModuleReference; +export declare function isNamespaceImport(node: Node): node is NamespaceImport; +export declare function isNamedImports(node: Node): node is NamedImports; +export declare function isExportAssignment(node: Node): node is ExportAssignment; +export declare function isNamespaceExportDeclaration(node: Node): node is NamespaceExportDeclaration; +export declare function isNamespaceExport(node: Node): node is NamespaceExport; +export declare function isNamedExports(node: Node): node is NamedExports; +export declare function isExportSpecifier(node: Node): node is ExportSpecifier; +export declare function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration; +export declare function isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration; +export declare function isConstructorDeclaration(node: Node): node is ConstructorDeclaration; +export declare function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration; +export declare function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration; +export declare function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration; +export declare function isMethodSignatureDeclaration(node: Node): node is MethodSignatureDeclaration; +export declare function isMethodDeclaration(node: Node): node is MethodDeclaration; +export declare function isPropertySignatureDeclaration(node: Node): node is PropertySignatureDeclaration; +export declare function isPropertyDeclaration(node: Node): node is PropertyDeclaration; +export declare function isSemicolonClassElement(node: Node): node is SemicolonClassElement; +export declare function isClassStaticBlockDeclaration(node: Node): node is ClassStaticBlockDeclaration; +export declare function isOmittedExpression(node: Node): node is OmittedExpression; +export declare function isKeywordExpression(node: Node): node is KeywordExpression; +export declare function isStringLiteral(node: Node): node is StringLiteral; +export declare function isNumericLiteral(node: Node): node is NumericLiteral; +export declare function isBigIntLiteral(node: Node): node is BigIntLiteral; +export declare function isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral; +export declare function isNoSubstitutionTemplateLiteral(node: Node): node is NoSubstitutionTemplateLiteral; +export declare function isBinaryExpression(node: Node): node is BinaryExpression; +export declare function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression; +export declare function isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression; +export declare function isYieldExpression(node: Node): node is YieldExpression; +export declare function isArrowFunction(node: Node): node is ArrowFunction; +export declare function isFunctionExpression(node: Node): node is FunctionExpression; +export declare function isAsExpression(node: Node): node is AsExpression; +export declare function isSatisfiesExpression(node: Node): node is SatisfiesExpression; +export declare function isConditionalExpression(node: Node): node is ConditionalExpression; +export declare function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression; +export declare function isElementAccessExpression(node: Node): node is ElementAccessExpression; +export declare function isCallExpression(node: Node): node is CallExpression; +export declare function isNewExpression(node: Node): node is NewExpression; +export declare function isMetaProperty(node: Node): node is MetaProperty; +export declare function isNonNullExpression(node: Node): node is NonNullExpression; +export declare function isSpreadElement(node: Node): node is SpreadElement; +export declare function isTemplateExpression(node: Node): node is TemplateExpression; +export declare function isTemplateSpan(node: Node): node is TemplateSpan; +export declare function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression; +export declare function isParenthesizedExpression(node: Node): node is ParenthesizedExpression; +export declare function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression; +export declare function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression; +export declare function isSpreadAssignment(node: Node): node is SpreadAssignment; +export declare function isPropertyAssignment(node: Node): node is PropertyAssignment; +export declare function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment; +export declare function isDeleteExpression(node: Node): node is DeleteExpression; +export declare function isTypeOfExpression(node: Node): node is TypeOfExpression; +export declare function isVoidExpression(node: Node): node is VoidExpression; +export declare function isAwaitExpression(node: Node): node is AwaitExpression; +export declare function isTypeAssertion(node: Node): node is TypeAssertion; +export declare function isKeywordTypeNode(node: Node): node is KeywordTypeNode; +export declare function isUnionTypeNode(node: Node): node is UnionTypeNode; +export declare function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode; +export declare function isConditionalTypeNode(node: Node): node is ConditionalTypeNode; +export declare function isTypeOperatorNode(node: Node): node is TypeOperatorNode; +export declare function isInferTypeNode(node: Node): node is InferTypeNode; +export declare function isArrayTypeNode(node: Node): node is ArrayTypeNode; +export declare function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode; +export declare function isTypeReferenceNode(node: Node): node is TypeReferenceNode; +export declare function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments; +export declare function isLiteralTypeNode(node: Node): node is LiteralTypeNode; +export declare function isThisTypeNode(node: Node): node is ThisTypeNode; +export declare function isTypePredicateNode(node: Node): node is TypePredicateNode; +export declare function isImportAttribute(node: Node): node is ImportAttribute; +export declare function isImportAttributes(node: Node): node is ImportAttributes; +export declare function isTypeQueryNode(node: Node): node is TypeQueryNode; +export declare function isMappedTypeNode(node: Node): node is MappedTypeNode; +export declare function isTypeLiteralNode(node: Node): node is TypeLiteralNode; +export declare function isTupleTypeNode(node: Node): node is TupleTypeNode; +export declare function isNamedTupleMember(node: Node): node is NamedTupleMember; +export declare function isOptionalTypeNode(node: Node): node is OptionalTypeNode; +export declare function isRestTypeNode(node: Node): node is RestTypeNode; +export declare function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode; +export declare function isFunctionTypeNode(node: Node): node is FunctionTypeNode; +export declare function isConstructorTypeNode(node: Node): node is ConstructorTypeNode; +export declare function isTemplateHead(node: Node): node is TemplateHead; +export declare function isTemplateMiddle(node: Node): node is TemplateMiddle; +export declare function isTemplateTail(node: Node): node is TemplateTail; +export declare function isTemplateLiteralTypeNode(node: Node): node is TemplateLiteralTypeNode; +export declare function isTemplateLiteralTypeSpan(node: Node): node is TemplateLiteralTypeSpan; +export declare function isSyntheticExpression(node: Node): node is SyntheticExpression; +export declare function isPartiallyEmittedExpression(node: Node): node is PartiallyEmittedExpression; +export declare function isJsxElement(node: Node): node is JsxElement; +export declare function isJsxAttributes(node: Node): node is JsxAttributes; +export declare function isJsxNamespacedName(node: Node): node is JsxNamespacedName; +export declare function isJsxOpeningElement(node: Node): node is JsxOpeningElement; +export declare function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement; +export declare function isJsxFragment(node: Node): node is JsxFragment; +export declare function isJsxOpeningFragment(node: Node): node is JsxOpeningFragment; +export declare function isJsxClosingFragment(node: Node): node is JsxClosingFragment; +export declare function isJsxAttribute(node: Node): node is JsxAttribute; +export declare function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute; +export declare function isJsxClosingElement(node: Node): node is JsxClosingElement; +export declare function isJsxExpression(node: Node): node is JsxExpression; +export declare function isJsxText(node: Node): node is JsxText; +export declare function isSyntaxList(node: Node): node is SyntaxList; +export declare function isJSDoc(node: Node): node is JSDoc; +export declare function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression; +export declare function isJSDocNonNullableType(node: Node): node is JSDocNonNullableType; +export declare function isJSDocNullableType(node: Node): node is JSDocNullableType; +export declare function isJSDocAllType(node: Node): node is JSDocAllType; +export declare function isJSDocVariadicType(node: Node): node is JSDocVariadicType; +export declare function isJSDocOptionalType(node: Node): node is JSDocOptionalType; +export declare function isJSDocTypeTag(node: Node): node is JSDocTypeTag; +export declare function isJSDocUnknownTag(node: Node): node is JSDocUnknownTag; +export declare function isJSDocTemplateTag(node: Node): node is JSDocTemplateTag; +export declare function isJSDocReturnTag(node: Node): node is JSDocReturnTag; +export declare function isJSDocPublicTag(node: Node): node is JSDocPublicTag; +export declare function isJSDocPrivateTag(node: Node): node is JSDocPrivateTag; +export declare function isJSDocProtectedTag(node: Node): node is JSDocProtectedTag; +export declare function isJSDocReadonlyTag(node: Node): node is JSDocReadonlyTag; +export declare function isJSDocOverrideTag(node: Node): node is JSDocOverrideTag; +export declare function isJSDocDeprecatedTag(node: Node): node is JSDocDeprecatedTag; +export declare function isJSDocSeeTag(node: Node): node is JSDocSeeTag; +export declare function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag; +export declare function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag; +export declare function isJSDocSatisfiesTag(node: Node): node is JSDocSatisfiesTag; +export declare function isJSDocThrowsTag(node: Node): node is JSDocThrowsTag; +export declare function isJSDocThisTag(node: Node): node is JSDocThisTag; +export declare function isJSDocImportTag(node: Node): node is JSDocImportTag; +export declare function isJSDocCallbackTag(node: Node): node is JSDocCallbackTag; +export declare function isJSDocOverloadTag(node: Node): node is JSDocOverloadTag; +export declare function isJSDocTypedefTag(node: Node): node is JSDocTypedefTag; +export declare function isJSDocSignature(node: Node): node is JSDocSignature; +export declare function isJSDocNameReference(node: Node): node is JSDocNameReference; +export declare function isSourceFile(node: Node): node is SourceFile; +export declare function isModuleDeclaration(node: Node): node is ModuleDeclaration; +export declare function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration; +export declare function isExportDeclaration(node: Node): node is ExportDeclaration; +export declare function isImportTypeNode(node: Node): node is ImportTypeNode; +export declare function isImportClause(node: Node): node is ImportClause; +export declare function isImportSpecifier(node: Node): node is ImportSpecifier; +export declare function isJSDocText(node: Node): node is JSDocText; +export declare function isJSDocLink(node: Node): node is JSDocLink; +export declare function isJSDocLinkPlain(node: Node): node is JSDocLinkPlain; +export declare function isJSDocLinkCode(node: Node): node is JSDocLinkCode; +export declare function isTypeParameterDeclaration(node: Node): node is TypeParameterDeclaration; +export declare function isSyntheticReferenceExpression(node: Node): node is SyntheticReferenceExpression; +export declare function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral; +export declare function isForInStatement(node: Node): node is ForInStatement; +export declare function isForOfStatement(node: Node): node is ForOfStatement; +export declare function isCaseClause(node: Node): node is CaseClause; +export declare function isDefaultClause(node: Node): node is DefaultClause; +export declare function isObjectBindingPattern(node: Node): node is ObjectBindingPattern; +export declare function isArrayBindingPattern(node: Node): node is ArrayBindingPattern; +export declare function isJSDocParameterTag(node: Node): node is JSDocParameterTag; +export declare function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag; +export declare function isAccessExpression(node: Node): node is AccessExpression; +export declare function isDeclarationName(node: Node): node is DeclarationName; +export declare function isModuleName(node: Node): node is ModuleName; +export declare function isModuleExportName(node: Node): node is ModuleExportName; +export declare function isPropertyName(node: Node): node is PropertyName; +export declare function isModuleBody(node: Node): node is ModuleBody; +export declare function isJSDocFullName(node: Node): node is JSDocFullName; +export declare function isModuleReference(node: Node): node is ModuleReference; +export declare function isNamedImportBindings(node: Node): node is NamedImportBindings; +export declare function isNamedExportBindings(node: Node): node is NamedExportBindings; +export declare function isMemberName(node: Node): node is MemberName; +export declare function isEntityName(node: Node): node is EntityName; +export declare function isBindingName(node: Node): node is BindingName; +export declare function isModifierLike(node: Node): node is ModifierLike; +export declare function isJsxChild(node: Node): node is JsxChild; +export declare function isJsxAttributeLike(node: Node): node is JsxAttributeLike; +export declare function isJsxAttributeName(node: Node): node is JsxAttributeName; +export declare function isJsxAttributeValue(node: Node): node is JsxAttributeValue; +export declare function isClassLikeDeclaration(node: Node): node is ClassLikeDeclaration; +export declare function isAccessorDeclaration(node: Node): node is AccessorDeclaration; +export declare function isLiteralLikeNode(node: Node): node is LiteralLikeNode; +export declare function isLiteralExpression(node: Node): node is LiteralExpression; +export declare function isUnionOrIntersectionTypeNode(node: Node): node is UnionOrIntersectionTypeNode; +export declare function isTemplateLiteralLikeNode(node: Node): node is TemplateLiteralLikeNode; +export declare function isTemplateMiddleOrTail(node: Node): node is TemplateMiddleOrTail; +export declare function isTemplateLiteral(node: Node): node is TemplateLiteral; +export declare function isTypePredicateParameterName(node: Node): node is TypePredicateParameterName; +export declare function isImportAttributeName(node: Node): node is ImportAttributeName; +export declare function isJSDocComment(node: Node): node is JSDocComment; +export declare function isSignatureDeclaration(node: Node): node is SignatureDeclaration; +export declare function isStringLiteralLikeNode(node: Node): node is StringLiteralLikeNode; +export declare function isNumericOrStringLikeLiteral(node: Node): node is NumericOrStringLikeLiteral; +export declare function isObjectLiteralLikeNode(node: Node): node is ObjectLiteralLikeNode; +export declare function isObjectTypeDeclaration(node: Node): node is ObjectTypeDeclaration; +export declare function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement; +export declare function isNamedImportsOrExports(node: Node): node is NamedImportsOrExports; +export declare function isBreakOrContinueStatement(node: Node): node is BreakOrContinueStatement; +export declare function isCallLikeExpression(node: Node): node is CallLikeExpression; +export declare function isFunctionLikeDeclaration(node: Node): node is FunctionLikeDeclaration; +export declare function isVariableOrParameterDeclaration(node: Node): node is VariableOrParameterDeclaration; +export declare function isVariableOrPropertyDeclaration(node: Node): node is VariableOrPropertyDeclaration; +export declare function isCallOrNewExpression(node: Node): node is CallOrNewExpression; +export declare function isImportClauseOrBindingPattern(node: Node): node is ImportClauseOrBindingPattern; +export declare function isAnyImportSyntax(node: Node): node is AnyImportSyntax; +export declare function isArrayBindingElement(node: Node): node is ArrayBindingElement; +export declare function isAssertionExpression(node: Node): node is AssertionExpression; +export declare function isBooleanLiteral(node: Node): node is BooleanLiteral; +export declare function isDestructuringAssignment(node: Node): node is DestructuringAssignment; +export declare function isLiteralToken(node: Node): node is LiteralToken; +export declare function isModifier(node: Node): node is Modifier; +export declare function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike; +export declare function isPropertyNameLiteral(node: Node): node is PropertyNameLiteral; +export declare function isPseudoLiteralToken(node: Node): node is PseudoLiteralToken; +export declare function isTemplateLiteralToken(node: Node): node is TemplateLiteralToken; +export declare function isArrayDestructuringAssignment(node: Node): node is ArrayDestructuringAssignment; +export declare function isObjectDestructuringAssignment(node: Node): node is ObjectDestructuringAssignment; +export declare function isFunctionBody(node: Node): node is FunctionBody; +export declare function isTriviaKind(kind: SyntaxKind): kind is TriviaSyntaxKind; +export declare function isPseudoLiteralKind(kind: SyntaxKind): kind is PseudoLiteralSyntaxKind; +export declare function isModifierKind(kind: SyntaxKind): kind is ModifierSyntaxKind; +export declare function isKeywordTypeKind(kind: SyntaxKind): kind is KeywordTypeSyntaxKind; +export declare function isKeywordExpressionKind(kind: SyntaxKind): kind is KeywordExpressionSyntaxKind; +export declare function isJsxTokenKind(kind: SyntaxKind): kind is JsxTokenSyntaxKind; +export declare function isImportPhaseModifierKind(kind: SyntaxKind): kind is ImportPhaseModifierSyntaxKind; +export declare function isPostfixUnaryOperator(kind: SyntaxKind): kind is PostfixUnaryOperator; +export declare function isPrefixUnaryOperator(kind: SyntaxKind): kind is PrefixUnaryOperator; +export declare function isAssignmentOperator(kind: SyntaxKind): kind is AssignmentOperator; +export declare function isBinaryOperator(kind: SyntaxKind): kind is BinaryOperator; +export declare function isExponentiationOperator(kind: SyntaxKind): kind is ExponentiationOperator; +export declare function isMultiplicativeOperator(kind: SyntaxKind): kind is MultiplicativeOperator; +export declare function isMultiplicativeOperatorOrHigher(kind: SyntaxKind): kind is MultiplicativeOperatorOrHigher; +export declare function isAdditiveOperator(kind: SyntaxKind): kind is AdditiveOperator; +export declare function isAdditiveOperatorOrHigher(kind: SyntaxKind): kind is AdditiveOperatorOrHigher; +export declare function isShiftOperator(kind: SyntaxKind): kind is ShiftOperator; +export declare function isShiftOperatorOrHigher(kind: SyntaxKind): kind is ShiftOperatorOrHigher; +export declare function isRelationalOperator(kind: SyntaxKind): kind is RelationalOperator; +export declare function isRelationalOperatorOrHigher(kind: SyntaxKind): kind is RelationalOperatorOrHigher; +export declare function isEqualityOperator(kind: SyntaxKind): kind is EqualityOperator; +export declare function isEqualityOperatorOrHigher(kind: SyntaxKind): kind is EqualityOperatorOrHigher; +export declare function isBitwiseOperator(kind: SyntaxKind): kind is BitwiseOperator; +export declare function isBitwiseOperatorOrHigher(kind: SyntaxKind): kind is BitwiseOperatorOrHigher; +export declare function isLogicalOperator(kind: SyntaxKind): kind is LogicalOperator; +export declare function isLogicalOperatorOrHigher(kind: SyntaxKind): kind is LogicalOperatorOrHigher; +export declare function isCompoundAssignmentOperator(kind: SyntaxKind): kind is CompoundAssignmentOperator; +export declare function isAssignmentOperatorOrHigher(kind: SyntaxKind): kind is AssignmentOperatorOrHigher; +export declare function isLogicalOrCoalescingAssignmentOperator(kind: SyntaxKind): kind is LogicalOrCoalescingAssignmentOperator; +export declare function isLiteralKind(kind: SyntaxKind): boolean; +export declare function isPunctuationKind(kind: SyntaxKind): boolean; +export declare function isKeywordKind(kind: SyntaxKind): boolean; +export declare function isTokenKind(kind: SyntaxKind): boolean; +export declare function isJSDocNodeKind(kind: SyntaxKind): boolean; +export declare function isEndOfFile(node: Node): node is EndOfFile; +export declare function isDotToken(node: Node): node is DotToken; +export declare function isDotDotDotToken(node: Node): node is DotDotDotToken; +export declare function isQuestionToken(node: Node): node is QuestionToken; +export declare function isExclamationToken(node: Node): node is ExclamationToken; +export declare function isColonToken(node: Node): node is ColonToken; +export declare function isEqualsToken(node: Node): node is EqualsToken; +export declare function isAsteriskToken(node: Node): node is AsteriskToken; +export declare function isEqualsGreaterThanToken(node: Node): node is EqualsGreaterThanToken; +export declare function isPlusToken(node: Node): node is PlusToken; +export declare function isMinusToken(node: Node): node is MinusToken; +export declare function isQuestionDotToken(node: Node): node is QuestionDotToken; +export declare function isAssertsKeyword(node: Node): node is AssertsKeyword; +export declare function isAssertKeyword(node: Node): node is AssertKeyword; +export declare function isAwaitKeyword(node: Node): node is AwaitKeyword; +export declare function isCaseKeyword(node: Node): node is CaseKeyword; +export declare function isAbstractKeyword(node: Node): node is AbstractKeyword; +export declare function isAccessorKeyword(node: Node): node is AccessorKeyword; +export declare function isAsyncKeyword(node: Node): node is AsyncKeyword; +export declare function isConstKeyword(node: Node): node is ConstKeyword; +export declare function isDeclareKeyword(node: Node): node is DeclareKeyword; +export declare function isDefaultKeyword(node: Node): node is DefaultKeyword; +export declare function isExportKeyword(node: Node): node is ExportKeyword; +export declare function isInKeyword(node: Node): node is InKeyword; +export declare function isPrivateKeyword(node: Node): node is PrivateKeyword; +export declare function isProtectedKeyword(node: Node): node is ProtectedKeyword; +export declare function isPublicKeyword(node: Node): node is PublicKeyword; +export declare function isReadonlyKeyword(node: Node): node is ReadonlyKeyword; +export declare function isOutKeyword(node: Node): node is OutKeyword; +export declare function isOverrideKeyword(node: Node): node is OverrideKeyword; +export declare function isStaticKeyword(node: Node): node is StaticKeyword; +export declare function isBinaryOperatorToken(node: Node): node is BinaryOperatorToken; +export declare function isAssignmentOperatorToken(node: Node): node is AssignmentOperatorToken; +export declare function isNullLiteral(node: Node): node is NullLiteral; +export declare function isTrueLiteral(node: Node): node is TrueLiteral; +export declare function isFalseLiteral(node: Node): node is FalseLiteral; +export declare function isThisExpression(node: Node): node is ThisExpression; +export declare function isSuperExpression(node: Node): node is SuperExpression; +export declare function isImportExpression(node: Node): node is ImportExpression; +//# sourceMappingURL=is.generated.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/is.generated.d.ts.map b/node_modules/typescript/dist/ast/is.generated.d.ts.map new file mode 100644 index 0000000..6346fa0 --- /dev/null +++ b/node_modules/typescript/dist/ast/is.generated.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"is.generated.d.ts","sourceRoot":"","sources":["../../src/ast/is.generated.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EACR,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,4BAA4B,EAC5B,sBAAsB,EACtB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,0BAA0B,EAC1B,uBAAuB,EACvB,aAAa,EACb,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,KAAK,EACL,cAAc,EACd,wBAAwB,EACxB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EACxB,SAAS,EACT,UAAU,EACV,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,2BAA2B,EAC3B,UAAU,EACV,0BAA0B,EAC1B,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACZ,sBAAsB,EACtB,mBAAmB,EACnB,6BAA6B,EAC7B,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,SAAS,EACT,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,uBAAuB,EACvB,WAAW,EACX,cAAc,EACd,QAAQ,EACR,uBAAuB,EACvB,cAAc,EACd,SAAS,EACT,UAAU,EACV,eAAe,EACf,UAAU,EACV,g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EAAE,IAAI,GAAG,IAAI,IAAI,eAAe,CAErE;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,gBAAgB,CAEvE"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/is.generated.js b/node_modules/typescript/dist/ast/is.generated.js new file mode 100644 index 0000000..d4204f9 --- /dev/null +++ b/node_modules/typescript/dist/ast/is.generated.js @@ -0,0 +1,1103 @@ +// Code generated by _scripts/generate-ts-ast.ts. DO NOT EDIT. +import { SyntaxKind } from "#enums/syntaxKind"; +export function isToken(node) { + return isTokenKind(node.kind); +} +export function isIdentifier(node) { + return node.kind === SyntaxKind.Identifier; +} +export function isPrivateIdentifier(node) { + return node.kind === SyntaxKind.PrivateIdentifier; +} +export function isQualifiedName(node) { + return node.kind === SyntaxKind.QualifiedName; +} +export function isComputedPropertyName(node) { + return node.kind === SyntaxKind.ComputedPropertyName; +} +export function isDecorator(node) { + return node.kind === SyntaxKind.Decorator; +} +export function isEmptyStatement(node) { + return node.kind === SyntaxKind.EmptyStatement; +} +export function isIfStatement(node) { + return node.kind === SyntaxKind.IfStatement; +} +export function isDoStatement(node) { + return node.kind === SyntaxKind.DoStatement; +} +export function isWhileStatement(node) { + return node.kind === SyntaxKind.WhileStatement; +} +export function isForStatement(node) { + return node.kind === SyntaxKind.ForStatement; +} +export function isBreakStatement(node) { + return node.kind === SyntaxKind.BreakStatement; +} +export function isContinueStatement(node) { + return node.kind === SyntaxKind.ContinueStatement; +} +export function isReturnStatement(node) { + return node.kind === SyntaxKind.ReturnStatement; +} +export function isWithStatement(node) { + return node.kind === SyntaxKind.WithStatement; +} +export function isSwitchStatement(node) { + return node.kind === SyntaxKind.SwitchStatement; +} +export function isCaseBlock(node) { + return node.kind === SyntaxKind.CaseBlock; +} +export function isThrowStatement(node) { + return node.kind === SyntaxKind.ThrowStatement; +} +export function isTryStatement(node) { + return node.kind === SyntaxKind.TryStatement; +} +export function isCatchClause(node) { + return node.kind === SyntaxKind.CatchClause; +} +export function isDebuggerStatement(node) { + return node.kind === SyntaxKind.DebuggerStatement; +} +export function isLabeledStatement(node) { + return node.kind === SyntaxKind.LabeledStatement; +} +export function isExpressionStatement(node) { + return node.kind === SyntaxKind.ExpressionStatement; +} +export function isBlock(node) { + return node.kind === SyntaxKind.Block; +} +export function isVariableStatement(node) { + return node.kind === SyntaxKind.VariableStatement; +} +export function isVariableDeclaration(node) { + return node.kind === SyntaxKind.VariableDeclaration; +} +export function isVariableDeclarationList(node) { + return node.kind === SyntaxKind.VariableDeclarationList; +} +export function isParameterDeclaration(node) { + return node.kind === SyntaxKind.Parameter; +} +export function isBindingElement(node) { + return node.kind === SyntaxKind.BindingElement; +} +export function isMissingDeclaration(node) { + return node.kind === SyntaxKind.MissingDeclaration; +} +export function isFunctionDeclaration(node) { + return node.kind === SyntaxKind.FunctionDeclaration; +} +export function isClassDeclaration(node) { + return node.kind === SyntaxKind.ClassDeclaration; +} +export function isClassExpression(node) { + return node.kind === SyntaxKind.ClassExpression; +} +export function isHeritageClause(node) { + return node.kind === SyntaxKind.HeritageClause; +} +export function isInterfaceDeclaration(node) { + return node.kind === SyntaxKind.InterfaceDeclaration; +} +export function isTypeAliasDeclaration(node) { + switch (node.kind) { + case SyntaxKind.TypeAliasDeclaration: + case SyntaxKind.JSTypeAliasDeclaration: + return true; + default: + return false; + } +} +export function isEnumMember(node) { + return node.kind === SyntaxKind.EnumMember; +} +export function isEnumDeclaration(node) { + return node.kind === SyntaxKind.EnumDeclaration; +} +export function isModuleBlock(node) { + return node.kind === SyntaxKind.ModuleBlock; +} +export function isNotEmittedStatement(node) { + return node.kind === SyntaxKind.NotEmittedStatement; +} +export function isNotEmittedTypeElement(node) { + return node.kind === SyntaxKind.NotEmittedTypeElement; +} +export function isImportDeclaration(node) { + switch (node.kind) { + case SyntaxKind.ImportDeclaration: + case SyntaxKind.JSImportDeclaration: + return true; + default: + return false; + } +} +export function isExternalModuleReference(node) { + return node.kind === SyntaxKind.ExternalModuleReference; +} +export function isNamespaceImport(node) { + return node.kind === SyntaxKind.NamespaceImport; +} +export function isNamedImports(node) { + return node.kind === SyntaxKind.NamedImports; +} +export function isExportAssignment(node) { + return node.kind === SyntaxKind.ExportAssignment; +} +export function isNamespaceExportDeclaration(node) { + return node.kind === SyntaxKind.NamespaceExportDeclaration; +} +export function isNamespaceExport(node) { + return node.kind === SyntaxKind.NamespaceExport; +} +export function isNamedExports(node) { + return node.kind === SyntaxKind.NamedExports; +} +export function isExportSpecifier(node) { + return node.kind === SyntaxKind.ExportSpecifier; +} +export function isCallSignatureDeclaration(node) { + return node.kind === SyntaxKind.CallSignature; +} +export function isConstructSignatureDeclaration(node) { + return node.kind === SyntaxKind.ConstructSignature; +} +export function isConstructorDeclaration(node) { + return node.kind === SyntaxKind.Constructor; +} +export function isGetAccessorDeclaration(node) { + return node.kind === SyntaxKind.GetAccessor; +} +export function isSetAccessorDeclaration(node) { + return node.kind === SyntaxKind.SetAccessor; +} +export function isIndexSignatureDeclaration(node) { + return node.kind === SyntaxKind.IndexSignature; +} +export function isMethodSignatureDeclaration(node) { + return node.kind === SyntaxKind.MethodSignature; +} +export function isMethodDeclaration(node) { + return node.kind === SyntaxKind.MethodDeclaration; +} +export function isPropertySignatureDeclaration(node) { + return node.kind === SyntaxKind.PropertySignature; +} +export function isPropertyDeclaration(node) { + return node.kind === SyntaxKind.PropertyDeclaration; +} +export function isSemicolonClassElement(node) { + return node.kind === SyntaxKind.SemicolonClassElement; +} +export function isClassStaticBlockDeclaration(node) { + return node.kind === SyntaxKind.ClassStaticBlockDeclaration; +} +export function isOmittedExpression(node) { + return node.kind === SyntaxKind.OmittedExpression; +} +export function isKeywordExpression(node) { + return isKeywordExpressionKind(node.kind); +} +export function isStringLiteral(node) { + return node.kind === SyntaxKind.StringLiteral; +} +export function isNumericLiteral(node) { + return node.kind === SyntaxKind.NumericLiteral; +} +export function isBigIntLiteral(node) { + return node.kind === SyntaxKind.BigIntLiteral; +} +export function isRegularExpressionLiteral(node) { + return node.kind === SyntaxKind.RegularExpressionLiteral; +} +export function isNoSubstitutionTemplateLiteral(node) { + return node.kind === SyntaxKind.NoSubstitutionTemplateLiteral; +} +export function isBinaryExpression(node) { + return node.kind === SyntaxKind.BinaryExpression; +} +export function isPrefixUnaryExpression(node) { + return node.kind === SyntaxKind.PrefixUnaryExpression; +} +export function isPostfixUnaryExpression(node) { + return node.kind === SyntaxKind.PostfixUnaryExpression; +} +export function isYieldExpression(node) { + return node.kind === SyntaxKind.YieldExpression; +} +export function isArrowFunction(node) { + return node.kind === SyntaxKind.ArrowFunction; +} +export function isFunctionExpression(node) { + return node.kind === SyntaxKind.FunctionExpression; +} +export function isAsExpression(node) { + return node.kind === SyntaxKind.AsExpression; +} +export function isSatisfiesExpression(node) { + return node.kind === SyntaxKind.SatisfiesExpression; +} +export function isConditionalExpression(node) { + return node.kind === SyntaxKind.ConditionalExpression; +} +export function isPropertyAccessExpression(node) { + return node.kind === SyntaxKind.PropertyAccessExpression; +} +export function isElementAccessExpression(node) { + return node.kind === SyntaxKind.ElementAccessExpression; +} +export function isCallExpression(node) { + return node.kind === SyntaxKind.CallExpression; +} +export function isNewExpression(node) { + return node.kind === SyntaxKind.NewExpression; +} +export function isMetaProperty(node) { + return node.kind === SyntaxKind.MetaProperty; +} +export function isNonNullExpression(node) { + return node.kind === SyntaxKind.NonNullExpression; +} +export function isSpreadElement(node) { + return node.kind === SyntaxKind.SpreadElement; +} +export function isTemplateExpression(node) { + return node.kind === SyntaxKind.TemplateExpression; +} +export function isTemplateSpan(node) { + return node.kind === SyntaxKind.TemplateSpan; +} +export function isTaggedTemplateExpression(node) { + return node.kind === SyntaxKind.TaggedTemplateExpression; +} +export function isParenthesizedExpression(node) { + return node.kind === SyntaxKind.ParenthesizedExpression; +} +export function isArrayLiteralExpression(node) { + return node.kind === SyntaxKind.ArrayLiteralExpression; +} +export function isObjectLiteralExpression(node) { + return node.kind === SyntaxKind.ObjectLiteralExpression; +} +export function isSpreadAssignment(node) { + return node.kind === SyntaxKind.SpreadAssignment; +} +export function isPropertyAssignment(node) { + return node.kind === SyntaxKind.PropertyAssignment; +} +export function isShorthandPropertyAssignment(node) { + return node.kind === SyntaxKind.ShorthandPropertyAssignment; +} +export function isDeleteExpression(node) { + return node.kind === SyntaxKind.DeleteExpression; +} +export function isTypeOfExpression(node) { + return node.kind === SyntaxKind.TypeOfExpression; +} +export function isVoidExpression(node) { + return node.kind === SyntaxKind.VoidExpression; +} +export function isAwaitExpression(node) { + return node.kind === SyntaxKind.AwaitExpression; +} +export function isTypeAssertion(node) { + return node.kind === SyntaxKind.TypeAssertionExpression; +} +export function isKeywordTypeNode(node) { + return isKeywordTypeKind(node.kind); +} +export function isUnionTypeNode(node) { + return node.kind === SyntaxKind.UnionType; +} +export function isIntersectionTypeNode(node) { + return node.kind === SyntaxKind.IntersectionType; +} +export function isConditionalTypeNode(node) { + return node.kind === SyntaxKind.ConditionalType; +} +export function isTypeOperatorNode(node) { + return node.kind === SyntaxKind.TypeOperator; +} +export function isInferTypeNode(node) { + return node.kind === SyntaxKind.InferType; +} +export function isArrayTypeNode(node) { + return node.kind === SyntaxKind.ArrayType; +} +export function isIndexedAccessTypeNode(node) { + return node.kind === SyntaxKind.IndexedAccessType; +} +export function isTypeReferenceNode(node) { + return node.kind === SyntaxKind.TypeReference; +} +export function isExpressionWithTypeArguments(node) { + return node.kind === SyntaxKind.ExpressionWithTypeArguments; +} +export function isLiteralTypeNode(node) { + return node.kind === SyntaxKind.LiteralType; +} +export function isThisTypeNode(node) { + return node.kind === SyntaxKind.ThisType; +} +export function isTypePredicateNode(node) { + return node.kind === SyntaxKind.TypePredicate; +} +export function isImportAttribute(node) { + return node.kind === SyntaxKind.ImportAttribute; +} +export function isImportAttributes(node) { + return node.kind === SyntaxKind.ImportAttributes; +} +export function isTypeQueryNode(node) { + return node.kind === SyntaxKind.TypeQuery; +} +export function isMappedTypeNode(node) { + return node.kind === SyntaxKind.MappedType; +} +export function isTypeLiteralNode(node) { + return node.kind === SyntaxKind.TypeLiteral; +} +export function isTupleTypeNode(node) { + return node.kind === SyntaxKind.TupleType; +} +export function isNamedTupleMember(node) { + return node.kind === SyntaxKind.NamedTupleMember; +} +export function isOptionalTypeNode(node) { + return node.kind === SyntaxKind.OptionalType; +} +export function isRestTypeNode(node) { + return node.kind === SyntaxKind.RestType; +} +export function isParenthesizedTypeNode(node) { + return node.kind === SyntaxKind.ParenthesizedType; +} +export function isFunctionTypeNode(node) { + return node.kind === SyntaxKind.FunctionType; +} +export function isConstructorTypeNode(node) { + return node.kind === SyntaxKind.ConstructorType; +} +export function isTemplateHead(node) { + return node.kind === SyntaxKind.TemplateHead; +} +export function isTemplateMiddle(node) { + return node.kind === SyntaxKind.TemplateMiddle; +} +export function isTemplateTail(node) { + return node.kind === SyntaxKind.TemplateTail; +} +export function isTemplateLiteralTypeNode(node) { + return node.kind === SyntaxKind.TemplateLiteralType; +} +export function isTemplateLiteralTypeSpan(node) { + return node.kind === SyntaxKind.TemplateLiteralTypeSpan; +} +export function isSyntheticExpression(node) { + return node.kind === SyntaxKind.SyntheticExpression; +} +export function isPartiallyEmittedExpression(node) { + return node.kind === SyntaxKind.PartiallyEmittedExpression; +} +export function isJsxElement(node) { + return node.kind === SyntaxKind.JsxElement; +} +export function isJsxAttributes(node) { + return node.kind === SyntaxKind.JsxAttributes; +} +export function isJsxNamespacedName(node) { + return node.kind === SyntaxKind.JsxNamespacedName; +} +export function isJsxOpeningElement(node) { + return node.kind === SyntaxKind.JsxOpeningElement; +} +export function isJsxSelfClosingElement(node) { + return node.kind === SyntaxKind.JsxSelfClosingElement; +} +export function isJsxFragment(node) { + return node.kind === SyntaxKind.JsxFragment; +} +export function isJsxOpeningFragment(node) { + return node.kind === SyntaxKind.JsxOpeningFragment; +} +export function isJsxClosingFragment(node) { + return node.kind === SyntaxKind.JsxClosingFragment; +} +export function isJsxAttribute(node) { + return node.kind === SyntaxKind.JsxAttribute; +} +export function isJsxSpreadAttribute(node) { + return node.kind === SyntaxKind.JsxSpreadAttribute; +} +export function isJsxClosingElement(node) { + return node.kind === SyntaxKind.JsxClosingElement; +} +export function isJsxExpression(node) { + return node.kind === SyntaxKind.JsxExpression; +} +export function isJsxText(node) { + return node.kind === SyntaxKind.JsxText; +} +export function isSyntaxList(node) { + return node.kind === SyntaxKind.SyntaxList; +} +export function isJSDoc(node) { + return node.kind === SyntaxKind.JSDoc; +} +export function isJSDocTypeExpression(node) { + return node.kind === SyntaxKind.JSDocTypeExpression; +} +export function isJSDocNonNullableType(node) { + return node.kind === SyntaxKind.JSDocNonNullableType; +} +export function isJSDocNullableType(node) { + return node.kind === SyntaxKind.JSDocNullableType; +} +export function isJSDocAllType(node) { + return node.kind === SyntaxKind.JSDocAllType; +} +export function isJSDocVariadicType(node) { + return node.kind === SyntaxKind.JSDocVariadicType; +} +export function isJSDocOptionalType(node) { + return node.kind === SyntaxKind.JSDocOptionalType; +} +export function isJSDocTypeTag(node) { + return node.kind === SyntaxKind.JSDocTypeTag; +} +export function isJSDocUnknownTag(node) { + return node.kind === SyntaxKind.JSDocUnknownTag; +} +export function isJSDocTemplateTag(node) { + return node.kind === SyntaxKind.JSDocTemplateTag; +} +export function isJSDocReturnTag(node) { + return node.kind === SyntaxKind.JSDocReturnTag; +} +export function isJSDocPublicTag(node) { + return node.kind === SyntaxKind.JSDocPublicTag; +} +export function isJSDocPrivateTag(node) { + return node.kind === SyntaxKind.JSDocPrivateTag; +} +export function isJSDocProtectedTag(node) { + return node.kind === SyntaxKind.JSDocProtectedTag; +} +export function isJSDocReadonlyTag(node) { + return node.kind === SyntaxKind.JSDocReadonlyTag; +} +export function isJSDocOverrideTag(node) { + return node.kind === SyntaxKind.JSDocOverrideTag; +} +export function isJSDocDeprecatedTag(node) { + return node.kind === SyntaxKind.JSDocDeprecatedTag; +} +export function isJSDocSeeTag(node) { + return node.kind === SyntaxKind.JSDocSeeTag; +} +export function isJSDocImplementsTag(node) { + return node.kind === SyntaxKind.JSDocImplementsTag; +} +export function isJSDocAugmentsTag(node) { + return node.kind === SyntaxKind.JSDocAugmentsTag; +} +export function isJSDocSatisfiesTag(node) { + return node.kind === SyntaxKind.JSDocSatisfiesTag; +} +export function isJSDocThrowsTag(node) { + return node.kind === SyntaxKind.JSDocThrowsTag; +} +export function isJSDocThisTag(node) { + return node.kind === SyntaxKind.JSDocThisTag; +} +export function isJSDocImportTag(node) { + return node.kind === SyntaxKind.JSDocImportTag; +} +export function isJSDocCallbackTag(node) { + return node.kind === SyntaxKind.JSDocCallbackTag; +} +export function isJSDocOverloadTag(node) { + return node.kind === SyntaxKind.JSDocOverloadTag; +} +export function isJSDocTypedefTag(node) { + return node.kind === SyntaxKind.JSDocTypedefTag; +} +export function isJSDocSignature(node) { + return node.kind === SyntaxKind.JSDocSignature; +} +export function isJSDocNameReference(node) { + return node.kind === SyntaxKind.JSDocNameReference; +} +export function isSourceFile(node) { + return node.kind === SyntaxKind.SourceFile; +} +export function isModuleDeclaration(node) { + return node.kind === SyntaxKind.ModuleDeclaration; +} +export function isImportEqualsDeclaration(node) { + return node.kind === SyntaxKind.ImportEqualsDeclaration; +} +export function isExportDeclaration(node) { + return node.kind === SyntaxKind.ExportDeclaration; +} +export function isImportTypeNode(node) { + return node.kind === SyntaxKind.ImportType; +} +export function isImportClause(node) { + return node.kind === SyntaxKind.ImportClause; +} +export function isImportSpecifier(node) { + return node.kind === SyntaxKind.ImportSpecifier; +} +export function isJSDocText(node) { + return node.kind === SyntaxKind.JSDocText; +} +export function isJSDocLink(node) { + return node.kind === SyntaxKind.JSDocLink; +} +export function isJSDocLinkPlain(node) { + return node.kind === SyntaxKind.JSDocLinkPlain; +} +export function isJSDocLinkCode(node) { + return node.kind === SyntaxKind.JSDocLinkCode; +} +export function isTypeParameterDeclaration(node) { + return node.kind === SyntaxKind.TypeParameter; +} +export function isSyntheticReferenceExpression(node) { + return node.kind === SyntaxKind.SyntheticReferenceExpression; +} +export function isJSDocTypeLiteral(node) { + return node.kind === SyntaxKind.JSDocTypeLiteral; +} +export function isForInStatement(node) { + return node.kind === SyntaxKind.ForInStatement; +} +export function isForOfStatement(node) { + return node.kind === SyntaxKind.ForOfStatement; +} +export function isCaseClause(node) { + return node.kind === SyntaxKind.CaseClause; +} +export function isDefaultClause(node) { + return node.kind === SyntaxKind.DefaultClause; +} +export function isObjectBindingPattern(node) { + return node.kind === SyntaxKind.ObjectBindingPattern; +} +export function isArrayBindingPattern(node) { + return node.kind === SyntaxKind.ArrayBindingPattern; +} +export function isJSDocParameterTag(node) { + return node.kind === SyntaxKind.JSDocParameterTag; +} +export function isJSDocPropertyTag(node) { + return node.kind === SyntaxKind.JSDocPropertyTag; +} +export function isAccessExpression(node) { + return node.kind === SyntaxKind.PropertyAccessExpression || node.kind === SyntaxKind.ElementAccessExpression; +} +export function isDeclarationName(node) { + const kind = node.kind; + return kind === SyntaxKind.Identifier || kind === SyntaxKind.PrivateIdentifier || kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.BigIntLiteral || kind === SyntaxKind.NoSubstitutionTemplateLiteral || kind === SyntaxKind.ComputedPropertyName || kind === SyntaxKind.ObjectBindingPattern || kind === SyntaxKind.ArrayBindingPattern || kind === SyntaxKind.ElementAccessExpression; +} +export function isModuleName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.StringLiteral; +} +export function isModuleExportName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.StringLiteral; +} +export function isPropertyName(node) { + const kind = node.kind; + return kind === SyntaxKind.Identifier || kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NoSubstitutionTemplateLiteral || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.ComputedPropertyName || kind === SyntaxKind.PrivateIdentifier || kind === SyntaxKind.BigIntLiteral; +} +export function isModuleBody(node) { + return node.kind === SyntaxKind.ModuleBlock || node.kind === SyntaxKind.ModuleDeclaration; +} +export function isJSDocFullName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ModuleDeclaration; +} +export function isModuleReference(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName || node.kind === SyntaxKind.ExternalModuleReference; +} +export function isNamedImportBindings(node) { + return node.kind === SyntaxKind.NamespaceImport || node.kind === SyntaxKind.NamedImports; +} +export function isNamedExportBindings(node) { + return node.kind === SyntaxKind.NamespaceExport || node.kind === SyntaxKind.NamedExports; +} +export function isMemberName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.PrivateIdentifier; +} +export function isEntityName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName; +} +export function isBindingName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ObjectBindingPattern || node.kind === SyntaxKind.ArrayBindingPattern; +} +export function isModifierLike(node) { + const kind = node.kind; + return kind === SyntaxKind.AbstractKeyword || kind === SyntaxKind.AccessorKeyword || kind === SyntaxKind.AsyncKeyword || kind === SyntaxKind.ConstKeyword || kind === SyntaxKind.DeclareKeyword || kind === SyntaxKind.DefaultKeyword || kind === SyntaxKind.ExportKeyword || kind === SyntaxKind.InKeyword || kind === SyntaxKind.PrivateKeyword || kind === SyntaxKind.ProtectedKeyword || kind === SyntaxKind.PublicKeyword || kind === SyntaxKind.ReadonlyKeyword || kind === SyntaxKind.OutKeyword || kind === SyntaxKind.OverrideKeyword || kind === SyntaxKind.StaticKeyword || kind === SyntaxKind.Decorator; +} +export function isJsxChild(node) { + const kind = node.kind; + return kind === SyntaxKind.JsxText || kind === SyntaxKind.JsxExpression || kind === SyntaxKind.JsxElement || kind === SyntaxKind.JsxSelfClosingElement || kind === SyntaxKind.JsxFragment; +} +export function isJsxAttributeLike(node) { + return node.kind === SyntaxKind.JsxAttribute || node.kind === SyntaxKind.JsxSpreadAttribute; +} +export function isJsxAttributeName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.JsxNamespacedName; +} +export function isJsxAttributeValue(node) { + const kind = node.kind; + return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.JsxExpression || kind === SyntaxKind.JsxElement || kind === SyntaxKind.JsxSelfClosingElement || kind === SyntaxKind.JsxFragment; +} +export function isClassLikeDeclaration(node) { + return node.kind === SyntaxKind.ClassDeclaration || node.kind === SyntaxKind.ClassExpression; +} +export function isAccessorDeclaration(node) { + return node.kind === SyntaxKind.GetAccessor || node.kind === SyntaxKind.SetAccessor; +} +export function isLiteralLikeNode(node) { + const kind = node.kind; + return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.BigIntLiteral || kind === SyntaxKind.RegularExpressionLiteral || kind === SyntaxKind.TemplateHead || kind === SyntaxKind.TemplateMiddle || kind === SyntaxKind.TemplateTail || kind === SyntaxKind.JsxText; +} +export function isLiteralExpression(node) { + const kind = node.kind; + return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.BigIntLiteral || kind === SyntaxKind.RegularExpressionLiteral || kind === SyntaxKind.NoSubstitutionTemplateLiteral; +} +export function isUnionOrIntersectionTypeNode(node) { + return node.kind === SyntaxKind.UnionType || node.kind === SyntaxKind.IntersectionType; +} +export function isTemplateLiteralLikeNode(node) { + const kind = node.kind; + return isPseudoLiteralKind(kind); +} +export function isTemplateMiddleOrTail(node) { + return node.kind === SyntaxKind.TemplateMiddle || node.kind === SyntaxKind.TemplateTail; +} +export function isTemplateLiteral(node) { + return node.kind === SyntaxKind.TemplateExpression || node.kind === SyntaxKind.NoSubstitutionTemplateLiteral; +} +export function isTypePredicateParameterName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ThisType; +} +export function isImportAttributeName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.StringLiteral; +} +export function isJSDocComment(node) { + const kind = node.kind; + return kind === SyntaxKind.JSDocText || kind === SyntaxKind.JSDocLink || kind === SyntaxKind.JSDocLinkCode || kind === SyntaxKind.JSDocLinkPlain; +} +export function isSignatureDeclaration(node) { + const kind = node.kind; + return kind === SyntaxKind.CallSignature || kind === SyntaxKind.ConstructSignature || kind === SyntaxKind.MethodSignature || kind === SyntaxKind.IndexSignature || kind === SyntaxKind.FunctionType || kind === SyntaxKind.ConstructorType || kind === SyntaxKind.FunctionDeclaration || kind === SyntaxKind.MethodDeclaration || kind === SyntaxKind.Constructor || kind === SyntaxKind.GetAccessor || kind === SyntaxKind.SetAccessor || kind === SyntaxKind.FunctionExpression || kind === SyntaxKind.ArrowFunction; +} +export function isStringLiteralLikeNode(node) { + return node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NoSubstitutionTemplateLiteral; +} +export function isNumericOrStringLikeLiteral(node) { + return node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NoSubstitutionTemplateLiteral || node.kind === SyntaxKind.NumericLiteral; +} +export function isObjectLiteralLikeNode(node) { + return node.kind === SyntaxKind.ObjectLiteralExpression || node.kind === SyntaxKind.ObjectBindingPattern; +} +export function isObjectTypeDeclaration(node) { + const kind = node.kind; + return kind === SyntaxKind.ClassDeclaration || kind === SyntaxKind.ClassExpression || kind === SyntaxKind.InterfaceDeclaration || kind === SyntaxKind.TypeLiteral; +} +export function isJsxOpeningLikeElement(node) { + return node.kind === SyntaxKind.JsxOpeningElement || node.kind === SyntaxKind.JsxSelfClosingElement; +} +export function isNamedImportsOrExports(node) { + return node.kind === SyntaxKind.NamedImports || node.kind === SyntaxKind.NamedExports; +} +export function isBreakOrContinueStatement(node) { + return node.kind === SyntaxKind.BreakStatement || node.kind === SyntaxKind.ContinueStatement; +} +export function isCallLikeExpression(node) { + const kind = node.kind; + return kind === SyntaxKind.CallExpression || kind === SyntaxKind.NewExpression || kind === SyntaxKind.TaggedTemplateExpression || kind === SyntaxKind.Decorator || kind === SyntaxKind.JsxOpeningElement || kind === SyntaxKind.JsxSelfClosingElement || kind === SyntaxKind.BinaryExpression; +} +export function isFunctionLikeDeclaration(node) { + const kind = node.kind; + return kind === SyntaxKind.FunctionDeclaration || kind === SyntaxKind.MethodDeclaration || kind === SyntaxKind.GetAccessor || kind === SyntaxKind.SetAccessor || kind === SyntaxKind.Constructor || kind === SyntaxKind.FunctionExpression || kind === SyntaxKind.ArrowFunction; +} +export function isVariableOrParameterDeclaration(node) { + return node.kind === SyntaxKind.VariableDeclaration || node.kind === SyntaxKind.Parameter; +} +export function isVariableOrPropertyDeclaration(node) { + return node.kind === SyntaxKind.VariableDeclaration || node.kind === SyntaxKind.PropertyDeclaration; +} +export function isCallOrNewExpression(node) { + return node.kind === SyntaxKind.CallExpression || node.kind === SyntaxKind.NewExpression; +} +export function isImportClauseOrBindingPattern(node) { + return node.kind === SyntaxKind.ImportClause || node.kind === SyntaxKind.ObjectBindingPattern || node.kind === SyntaxKind.ArrayBindingPattern; +} +export function isAnyImportSyntax(node) { + return node.kind === SyntaxKind.ImportDeclaration || node.kind === SyntaxKind.JSImportDeclaration || node.kind === SyntaxKind.ImportEqualsDeclaration; +} +export function isArrayBindingElement(node) { + return node.kind === SyntaxKind.BindingElement || node.kind === SyntaxKind.OmittedExpression; +} +export function isAssertionExpression(node) { + return node.kind === SyntaxKind.TypeAssertionExpression || node.kind === SyntaxKind.AsExpression; +} +export function isBooleanLiteral(node) { + return node.kind === SyntaxKind.TrueKeyword || node.kind === SyntaxKind.FalseKeyword; +} +export function isDestructuringAssignment(node) { + return node.kind === SyntaxKind.BinaryExpression; +} +export function isLiteralToken(node) { + const kind = node.kind; + return kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.BigIntLiteral || kind === SyntaxKind.StringLiteral || kind === SyntaxKind.JsxText || kind === SyntaxKind.RegularExpressionLiteral || kind === SyntaxKind.NoSubstitutionTemplateLiteral; +} +export function isModifier(node) { + const kind = node.kind; + return isModifierKind(kind); +} +export function isObjectLiteralElementLike(node) { + const kind = node.kind; + return kind === SyntaxKind.PropertyAssignment || kind === SyntaxKind.ShorthandPropertyAssignment || kind === SyntaxKind.SpreadAssignment || kind === SyntaxKind.MethodDeclaration || kind === SyntaxKind.GetAccessor || kind === SyntaxKind.SetAccessor; +} +export function isPropertyNameLiteral(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NumericLiteral; +} +export function isPseudoLiteralToken(node) { + const kind = node.kind; + return isPseudoLiteralKind(kind); +} +export function isTemplateLiteralToken(node) { + const kind = node.kind; + return kind === SyntaxKind.NoSubstitutionTemplateLiteral || kind === SyntaxKind.TemplateHead || kind === SyntaxKind.TemplateMiddle || kind === SyntaxKind.TemplateTail; +} +export function isArrayDestructuringAssignment(node) { + return node.kind === SyntaxKind.BinaryExpression; +} +export function isObjectDestructuringAssignment(node) { + return node.kind === SyntaxKind.BinaryExpression; +} +export function isFunctionBody(node) { + return node.kind === SyntaxKind.Block; +} +export function isTriviaKind(kind) { + return kind === SyntaxKind.SingleLineCommentTrivia + || kind === SyntaxKind.MultiLineCommentTrivia + || kind === SyntaxKind.NewLineTrivia + || kind === SyntaxKind.WhitespaceTrivia + || kind === SyntaxKind.ConflictMarkerTrivia; +} +export function isPseudoLiteralKind(kind) { + return kind === SyntaxKind.TemplateHead + || kind === SyntaxKind.TemplateMiddle + || kind === SyntaxKind.TemplateTail; +} +export function isModifierKind(kind) { + return kind === SyntaxKind.AbstractKeyword + || kind === SyntaxKind.AccessorKeyword + || kind === SyntaxKind.AsyncKeyword + || kind === SyntaxKind.ConstKeyword + || kind === SyntaxKind.DeclareKeyword + || kind === SyntaxKind.DefaultKeyword + || kind === SyntaxKind.ExportKeyword + || kind === SyntaxKind.InKeyword + || kind === SyntaxKind.PrivateKeyword + || kind === SyntaxKind.ProtectedKeyword + || kind === SyntaxKind.PublicKeyword + || kind === SyntaxKind.ReadonlyKeyword + || kind === SyntaxKind.OutKeyword + || kind === SyntaxKind.OverrideKeyword + || kind === SyntaxKind.StaticKeyword; +} +export function isKeywordTypeKind(kind) { + return kind === SyntaxKind.AnyKeyword + || kind === SyntaxKind.BigIntKeyword + || kind === SyntaxKind.BooleanKeyword + || kind === SyntaxKind.IntrinsicKeyword + || kind === SyntaxKind.NeverKeyword + || kind === SyntaxKind.NumberKeyword + || kind === SyntaxKind.ObjectKeyword + || kind === SyntaxKind.StringKeyword + || kind === SyntaxKind.SymbolKeyword + || kind === SyntaxKind.UndefinedKeyword + || kind === SyntaxKind.UnknownKeyword + || kind === SyntaxKind.VoidKeyword; +} +export function isKeywordExpressionKind(kind) { + return kind === SyntaxKind.NullKeyword + || kind === SyntaxKind.TrueKeyword + || kind === SyntaxKind.FalseKeyword + || kind === SyntaxKind.ThisKeyword + || kind === SyntaxKind.SuperKeyword + || kind === SyntaxKind.ImportKeyword; +} +export function isJsxTokenKind(kind) { + return kind === SyntaxKind.LessThanSlashToken + || kind === SyntaxKind.EndOfFile + || kind === SyntaxKind.ConflictMarkerTrivia + || kind === SyntaxKind.JsxText + || kind === SyntaxKind.JsxTextAllWhiteSpaces + || kind === SyntaxKind.OpenBraceToken + || kind === SyntaxKind.LessThanToken; +} +export function isImportPhaseModifierKind(kind) { + return kind === SyntaxKind.TypeKeyword + || kind === SyntaxKind.DeferKeyword; +} +export function isPostfixUnaryOperator(kind) { + return kind === SyntaxKind.PlusPlusToken + || kind === SyntaxKind.MinusMinusToken; +} +export function isPrefixUnaryOperator(kind) { + return kind === SyntaxKind.PlusToken + || kind === SyntaxKind.MinusToken + || kind === SyntaxKind.TildeToken + || kind === SyntaxKind.ExclamationToken + || kind === SyntaxKind.PlusPlusToken + || kind === SyntaxKind.MinusMinusToken; +} +export function isAssignmentOperator(kind) { + return kind === SyntaxKind.EqualsToken + || isCompoundAssignmentOperator(kind); +} +export function isBinaryOperator(kind) { + return isAssignmentOperatorOrHigher(kind) + || kind === SyntaxKind.CommaToken; +} +export function isExponentiationOperator(kind) { + return kind === SyntaxKind.AsteriskAsteriskToken; +} +export function isMultiplicativeOperator(kind) { + return kind === SyntaxKind.AsteriskToken + || kind === SyntaxKind.SlashToken + || kind === SyntaxKind.PercentToken; +} +export function isMultiplicativeOperatorOrHigher(kind) { + return isExponentiationOperator(kind) + || isMultiplicativeOperator(kind); +} +export function isAdditiveOperator(kind) { + return kind === SyntaxKind.PlusToken + || kind === SyntaxKind.MinusToken; +} +export function isAdditiveOperatorOrHigher(kind) { + return isMultiplicativeOperatorOrHigher(kind) + || isAdditiveOperator(kind); +} +export function isShiftOperator(kind) { + return kind === SyntaxKind.LessThanLessThanToken + || kind === SyntaxKind.GreaterThanGreaterThanToken + || kind === SyntaxKind.GreaterThanGreaterThanGreaterThanToken; +} +export function isShiftOperatorOrHigher(kind) { + return isAdditiveOperatorOrHigher(kind) + || isShiftOperator(kind); +} +export function isRelationalOperator(kind) { + return kind === SyntaxKind.LessThanToken + || kind === SyntaxKind.LessThanEqualsToken + || kind === SyntaxKind.GreaterThanToken + || kind === SyntaxKind.GreaterThanEqualsToken + || kind === SyntaxKind.InstanceOfKeyword + || kind === SyntaxKind.InKeyword; +} +export function isRelationalOperatorOrHigher(kind) { + return isShiftOperatorOrHigher(kind) + || isRelationalOperator(kind); +} +export function isEqualityOperator(kind) { + return kind === SyntaxKind.EqualsEqualsToken + || kind === SyntaxKind.EqualsEqualsEqualsToken + || kind === SyntaxKind.ExclamationEqualsEqualsToken + || kind === SyntaxKind.ExclamationEqualsToken; +} +export function isEqualityOperatorOrHigher(kind) { + return isRelationalOperatorOrHigher(kind) + || isEqualityOperator(kind); +} +export function isBitwiseOperator(kind) { + return kind === SyntaxKind.AmpersandToken + || kind === SyntaxKind.BarToken + || kind === SyntaxKind.CaretToken; +} +export function isBitwiseOperatorOrHigher(kind) { + return isEqualityOperatorOrHigher(kind) + || isBitwiseOperator(kind); +} +export function isLogicalOperator(kind) { + return kind === SyntaxKind.AmpersandAmpersandToken + || kind === SyntaxKind.BarBarToken; +} +export function isLogicalOperatorOrHigher(kind) { + return isBitwiseOperatorOrHigher(kind) + || isLogicalOperator(kind); +} +export function isCompoundAssignmentOperator(kind) { + return kind === SyntaxKind.PlusEqualsToken + || kind === SyntaxKind.MinusEqualsToken + || kind === SyntaxKind.AsteriskAsteriskEqualsToken + || kind === SyntaxKind.AsteriskEqualsToken + || kind === SyntaxKind.SlashEqualsToken + || kind === SyntaxKind.PercentEqualsToken + || kind === SyntaxKind.AmpersandEqualsToken + || kind === SyntaxKind.BarEqualsToken + || kind === SyntaxKind.CaretEqualsToken + || kind === SyntaxKind.LessThanLessThanEqualsToken + || kind === SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken + || kind === SyntaxKind.GreaterThanGreaterThanEqualsToken + || kind === SyntaxKind.BarBarEqualsToken + || kind === SyntaxKind.AmpersandAmpersandEqualsToken + || kind === SyntaxKind.QuestionQuestionEqualsToken; +} +export function isAssignmentOperatorOrHigher(kind) { + return kind === SyntaxKind.QuestionQuestionToken + || isLogicalOperatorOrHigher(kind) + || isAssignmentOperator(kind); +} +export function isLogicalOrCoalescingAssignmentOperator(kind) { + return kind === SyntaxKind.AmpersandAmpersandEqualsToken + || kind === SyntaxKind.BarBarEqualsToken + || kind === SyntaxKind.QuestionQuestionEqualsToken; +} +export function isLiteralKind(kind) { + return kind >= SyntaxKind.FirstLiteralToken && kind <= SyntaxKind.LastLiteralToken; +} +export function isPunctuationKind(kind) { + return kind >= SyntaxKind.FirstPunctuation && kind <= SyntaxKind.LastPunctuation; +} +export function isKeywordKind(kind) { + return kind >= SyntaxKind.FirstKeyword && kind <= SyntaxKind.LastKeyword; +} +export function isTokenKind(kind) { + return kind >= SyntaxKind.FirstToken && kind <= SyntaxKind.LastToken; +} +export function isJSDocNodeKind(kind) { + return kind >= SyntaxKind.FirstJSDocNode && kind <= SyntaxKind.LastJSDocNode; +} +export function isEndOfFile(node) { + return node.kind === SyntaxKind.EndOfFile; +} +export function isDotToken(node) { + return node.kind === SyntaxKind.DotToken; +} +export function isDotDotDotToken(node) { + return node.kind === SyntaxKind.DotDotDotToken; +} +export function isQuestionToken(node) { + return node.kind === SyntaxKind.QuestionToken; +} +export function isExclamationToken(node) { + return node.kind === SyntaxKind.ExclamationToken; +} +export function isColonToken(node) { + return node.kind === SyntaxKind.ColonToken; +} +export function isEqualsToken(node) { + return node.kind === SyntaxKind.EqualsToken; +} +export function isAsteriskToken(node) { + return node.kind === SyntaxKind.AsteriskToken; +} +export function isEqualsGreaterThanToken(node) { + return node.kind === SyntaxKind.EqualsGreaterThanToken; +} +export function isPlusToken(node) { + return node.kind === SyntaxKind.PlusToken; +} +export function isMinusToken(node) { + return node.kind === SyntaxKind.MinusToken; +} +export function isQuestionDotToken(node) { + return node.kind === SyntaxKind.QuestionDotToken; +} +export function isAssertsKeyword(node) { + return node.kind === SyntaxKind.AssertsKeyword; +} +export function isAssertKeyword(node) { + return node.kind === SyntaxKind.AssertKeyword; +} +export function isAwaitKeyword(node) { + return node.kind === SyntaxKind.AwaitKeyword; +} +export function isCaseKeyword(node) { + return node.kind === SyntaxKind.CaseKeyword; +} +export function isAbstractKeyword(node) { + return node.kind === SyntaxKind.AbstractKeyword; +} +export function isAccessorKeyword(node) { + return node.kind === SyntaxKind.AccessorKeyword; +} +export function isAsyncKeyword(node) { + return node.kind === SyntaxKind.AsyncKeyword; +} +export function isConstKeyword(node) { + return node.kind === SyntaxKind.ConstKeyword; +} +export function isDeclareKeyword(node) { + return node.kind === SyntaxKind.DeclareKeyword; +} +export function isDefaultKeyword(node) { + return node.kind === SyntaxKind.DefaultKeyword; +} +export function isExportKeyword(node) { + return node.kind === SyntaxKind.ExportKeyword; +} +export function isInKeyword(node) { + return node.kind === SyntaxKind.InKeyword; +} +export function isPrivateKeyword(node) { + return node.kind === SyntaxKind.PrivateKeyword; +} +export function isProtectedKeyword(node) { + return node.kind === SyntaxKind.ProtectedKeyword; +} +export function isPublicKeyword(node) { + return node.kind === SyntaxKind.PublicKeyword; +} +export function isReadonlyKeyword(node) { + return node.kind === SyntaxKind.ReadonlyKeyword; +} +export function isOutKeyword(node) { + return node.kind === SyntaxKind.OutKeyword; +} +export function isOverrideKeyword(node) { + return node.kind === SyntaxKind.OverrideKeyword; +} +export function isStaticKeyword(node) { + return node.kind === SyntaxKind.StaticKeyword; +} +export function isBinaryOperatorToken(node) { + return isBinaryOperator(node.kind); +} +export function isAssignmentOperatorToken(node) { + return isAssignmentOperator(node.kind); +} +export function isNullLiteral(node) { + return node.kind === SyntaxKind.NullKeyword; +} +export function isTrueLiteral(node) { + return node.kind === SyntaxKind.TrueKeyword; +} +export function isFalseLiteral(node) { + return node.kind === SyntaxKind.FalseKeyword; +} +export function isThisExpression(node) { + return node.kind === SyntaxKind.ThisKeyword; +} +export function isSuperExpression(node) { + return node.kind === SyntaxKind.SuperKeyword; +} +export function isImportExpression(node) { + return node.kind === SyntaxKind.ImportKeyword; +} +//# sourceMappingURL=is.generated.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/is.generated.js.map b/node_modules/typescript/dist/ast/is.generated.js.map new file mode 100644 index 0000000..ad137f8 --- /dev/null +++ b/node_modules/typescript/dist/ast/is.generated.js.map @@ -0,0 +1 @@ +{"version":3,"file":"is.generated.js","sourceRoot":"","sources":["../../src/ast/is.generated.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAsU/C,MAAM,UAAU,OAAO,CAAC,IAAU;IAC9B,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAU;IACnC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,UAAU,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAAU;IAC1C,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,iBAAiB,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAU;IACtC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,aAAa,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,IAAU;IAC7C,OAAO,IAAI,CA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C,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,WAAW,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAU;IACpC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,WAAW,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAAU;IACrC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,YAAY,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAU;IACvC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,WAAW,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAU;IACxC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,YAAY,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAU;IACzC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,aAAa,CAAC;AAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/is.js b/node_modules/typescript/dist/ast/is.js new file mode 100644 index 0000000..10fd05c --- /dev/null +++ b/node_modules/typescript/dist/ast/is.js @@ -0,0 +1,233 @@ +// is.ts — Hand-written type guard functions +// Generated guards are in is.generated.ts +import { NodeFlags } from "#enums/nodeFlags"; +import { OuterExpressionKinds } from "#enums/outerExpressionKinds"; +import { ScriptKind } from "#enums/scriptKind"; +import { SyntaxKind } from "#enums/syntaxKind"; +import { isLiteralExpression } from "./is.generated.js"; +export * from "./is.generated.js"; +export function isTypeNode(node) { + return isTypeNodeKind(node.kind); +} +function isTypeNodeKind(kind) { + return kind >= SyntaxKind.FirstTypeNode && kind <= SyntaxKind.LastTypeNode + || kind === SyntaxKind.AnyKeyword + || kind === SyntaxKind.UnknownKeyword + || kind === SyntaxKind.NumberKeyword + || kind === SyntaxKind.BigIntKeyword + || kind === SyntaxKind.ObjectKeyword + || kind === SyntaxKind.BooleanKeyword + || kind === SyntaxKind.StringKeyword + || kind === SyntaxKind.SymbolKeyword + || kind === SyntaxKind.VoidKeyword + || kind === SyntaxKind.UndefinedKeyword + || kind === SyntaxKind.NeverKeyword + || kind === SyntaxKind.IntrinsicKeyword + || kind === SyntaxKind.ExpressionWithTypeArguments + || kind === SyntaxKind.JSDocAllType + || kind === SyntaxKind.JSDocNullableType + || kind === SyntaxKind.JSDocNonNullableType + || kind === SyntaxKind.JSDocOptionalType + || kind === SyntaxKind.JSDocVariadicType + || kind === SyntaxKind.JSDocTypeExpression + || kind === SyntaxKind.JSDocTypeLiteral + || kind === SyntaxKind.JSDocSignature; +} +export function isStatement(node) { + const kind = node.kind; + return kind === SyntaxKind.VariableStatement || kind === SyntaxKind.EmptyStatement + || kind === SyntaxKind.ExpressionStatement || kind === SyntaxKind.IfStatement + || kind === SyntaxKind.DoStatement || kind === SyntaxKind.WhileStatement + || kind === SyntaxKind.ForStatement || kind === SyntaxKind.ForInStatement + || kind === SyntaxKind.ForOfStatement || kind === SyntaxKind.ContinueStatement + || kind === SyntaxKind.BreakStatement || kind === SyntaxKind.ReturnStatement + || kind === SyntaxKind.WithStatement || kind === SyntaxKind.SwitchStatement + || kind === SyntaxKind.LabeledStatement || kind === SyntaxKind.ThrowStatement + || kind === SyntaxKind.TryStatement || kind === SyntaxKind.DebuggerStatement + || kind === SyntaxKind.InterfaceDeclaration || kind === SyntaxKind.TypeAliasDeclaration + || kind === SyntaxKind.EnumDeclaration || kind === SyntaxKind.ModuleDeclaration + || kind === SyntaxKind.ImportDeclaration || kind === SyntaxKind.ImportEqualsDeclaration + || kind === SyntaxKind.ExportDeclaration || kind === SyntaxKind.ExportAssignment + || kind === SyntaxKind.NamespaceExportDeclaration || kind === SyntaxKind.FunctionDeclaration + || kind === SyntaxKind.ClassDeclaration || kind === SyntaxKind.MissingDeclaration + || kind === SyntaxKind.NotEmittedStatement || kind === SyntaxKind.Block; +} +export function isExpression(node) { + const kind = node.kind; + return kind === SyntaxKind.ConditionalExpression || kind === SyntaxKind.YieldExpression + || kind === SyntaxKind.ArrowFunction || kind === SyntaxKind.BinaryExpression + || kind === SyntaxKind.SpreadElement || kind === SyntaxKind.AsExpression + || kind === SyntaxKind.OmittedExpression + || kind === SyntaxKind.SatisfiesExpression + || kind === SyntaxKind.PrefixUnaryExpression || kind === SyntaxKind.PostfixUnaryExpression + || kind === SyntaxKind.DeleteExpression || kind === SyntaxKind.TypeOfExpression + || kind === SyntaxKind.VoidExpression || kind === SyntaxKind.AwaitExpression + || kind === SyntaxKind.TypeAssertionExpression + || kind === SyntaxKind.CallExpression || kind === SyntaxKind.NewExpression + || kind === SyntaxKind.TaggedTemplateExpression || kind === SyntaxKind.NonNullExpression + || kind === SyntaxKind.MetaProperty || kind === SyntaxKind.JsxExpression + || kind === SyntaxKind.PropertyAccessExpression || kind === SyntaxKind.ElementAccessExpression + || kind === SyntaxKind.FunctionExpression || kind === SyntaxKind.ClassExpression + || kind === SyntaxKind.ParenthesizedExpression || kind === SyntaxKind.ArrayLiteralExpression + || kind === SyntaxKind.ObjectLiteralExpression || kind === SyntaxKind.TemplateExpression + || kind === SyntaxKind.Identifier + || kind === SyntaxKind.PrivateIdentifier + || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.BigIntLiteral + || kind === SyntaxKind.StringLiteral || kind === SyntaxKind.RegularExpressionLiteral + || kind === SyntaxKind.NoSubstitutionTemplateLiteral || kind === SyntaxKind.JsxElement + || kind === SyntaxKind.JsxSelfClosingElement || kind === SyntaxKind.JsxFragment + || kind === SyntaxKind.NullKeyword || kind === SyntaxKind.TrueKeyword + || kind === SyntaxKind.FalseKeyword || kind === SyntaxKind.ThisKeyword + || kind === SyntaxKind.SuperKeyword || kind === SyntaxKind.ImportKeyword + || kind === SyntaxKind.ExpressionWithTypeArguments; +} +export function isBlockOrExpression(node) { + return node.kind === SyntaxKind.Block || isExpression(node); +} +export function isLeftHandSideExpression(node) { + return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); +} +export function skipPartiallyEmittedExpressions(node) { + return skipOuterExpressions(node, OuterExpressionKinds.PartiallyEmittedExpressions); +} +function isLeftHandSideExpressionKind(kind) { + switch (kind) { + case SyntaxKind.PropertyAccessExpression: + case SyntaxKind.ElementAccessExpression: + case SyntaxKind.NewExpression: + case SyntaxKind.CallExpression: + case SyntaxKind.JsxElement: + case SyntaxKind.JsxSelfClosingElement: + case SyntaxKind.JsxFragment: + case SyntaxKind.TaggedTemplateExpression: + case SyntaxKind.ArrayLiteralExpression: + case SyntaxKind.ParenthesizedExpression: + case SyntaxKind.ObjectLiteralExpression: + case SyntaxKind.ClassExpression: + case SyntaxKind.FunctionExpression: + case SyntaxKind.Identifier: + case SyntaxKind.PrivateIdentifier: // technically this is only an Expression if it's in a `#field in expr` BinaryExpression + case SyntaxKind.RegularExpressionLiteral: + case SyntaxKind.NumericLiteral: + case SyntaxKind.BigIntLiteral: + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateExpression: + case SyntaxKind.FalseKeyword: + case SyntaxKind.NullKeyword: + case SyntaxKind.ThisKeyword: + case SyntaxKind.TrueKeyword: + case SyntaxKind.SuperKeyword: + case SyntaxKind.NonNullExpression: + case SyntaxKind.ExpressionWithTypeArguments: + case SyntaxKind.MetaProperty: + case SyntaxKind.ImportKeyword: // technically this is only an Expression if it's in a CallExpression + case SyntaxKind.MissingDeclaration: + return true; + default: + return false; + } +} +export function isUnaryExpression(node) { + return isUnaryExpressionKind(skipPartiallyEmittedExpressions(node).kind); +} +function isUnaryExpressionKind(kind) { + switch (kind) { + case SyntaxKind.PrefixUnaryExpression: + case SyntaxKind.PostfixUnaryExpression: + case SyntaxKind.DeleteExpression: + case SyntaxKind.TypeOfExpression: + case SyntaxKind.VoidExpression: + case SyntaxKind.AwaitExpression: + case SyntaxKind.TypeAssertionExpression: + return true; + default: + return isLeftHandSideExpressionKind(kind); + } +} +/** @internal */ +export function isOuterExpression(node, kinds = OuterExpressionKinds.All) { + switch (node.kind) { + case SyntaxKind.ParenthesizedExpression: + if (kinds & OuterExpressionKinds.ExcludeJSDocTypeAssertion && isJSDocTypeAssertion(node)) { + return false; + } + return (kinds & OuterExpressionKinds.Parentheses) !== 0; + case SyntaxKind.TypeAssertionExpression: + case SyntaxKind.AsExpression: + return (kinds & OuterExpressionKinds.TypeAssertions) !== 0; + case SyntaxKind.SatisfiesExpression: + return (kinds & (OuterExpressionKinds.ExpressionsWithTypeArguments | OuterExpressionKinds.Satisfies)) !== 0; + case SyntaxKind.ExpressionWithTypeArguments: + return (kinds & OuterExpressionKinds.ExpressionsWithTypeArguments) !== 0; + case SyntaxKind.NonNullExpression: + return (kinds & OuterExpressionKinds.NonNullAssertions) !== 0; + case SyntaxKind.PartiallyEmittedExpression: + return (kinds & OuterExpressionKinds.PartiallyEmittedExpressions) !== 0; + } + return false; +} +/** @internal */ +export function skipOuterExpressions(node, kinds = OuterExpressionKinds.All) { + while (isOuterExpression(node, kinds)) { + node = node.expression; + } + return node; +} +function isJSDocTypeAssertion(node) { + const sourceFile = node.getSourceFile(); + if (sourceFile.scriptKind !== ScriptKind.JS && sourceFile.scriptKind !== ScriptKind.JSX) { + return false; + } + const expression = node.expression; + if (expression.kind !== SyntaxKind.AsExpression) { + return false; + } + const asExpression = expression; + return !!asExpression.type + && (asExpression.type.flags & NodeFlags.Reparsed) !== 0; +} +export function isBindingPattern(node) { + return node.kind === SyntaxKind.ObjectBindingPattern || node.kind === SyntaxKind.ArrayBindingPattern; +} +export function isConciseBody(node) { + return node.kind === SyntaxKind.Block || isExpression(node); +} +export function isForInitializer(node) { + return node.kind === SyntaxKind.VariableDeclarationList || isExpression(node); +} +export function isQuestionOrExclamationToken(node) { + return node.kind === SyntaxKind.QuestionToken || node.kind === SyntaxKind.ExclamationToken; +} +export function isIdentifierOrThisTypeNode(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ThisType; +} +export function isReadonlyKeywordOrPlusOrMinusToken(node) { + return node.kind === SyntaxKind.ReadonlyKeyword || node.kind === SyntaxKind.PlusToken || node.kind === SyntaxKind.MinusToken; +} +export function isQuestionOrPlusOrMinusToken(node) { + return node.kind === SyntaxKind.QuestionToken || node.kind === SyntaxKind.PlusToken || node.kind === SyntaxKind.MinusToken; +} +export function isTemplateMiddleOrTemplateTail(node) { + return node.kind === SyntaxKind.TemplateMiddle || node.kind === SyntaxKind.TemplateTail; +} +export function isLiteralTypeLiteral(node) { + const kind = node.kind; + return kind === SyntaxKind.NullKeyword || kind === SyntaxKind.TrueKeyword + || kind === SyntaxKind.FalseKeyword || kind === SyntaxKind.PrefixUnaryExpression + || isLiteralExpression(node); +} +export function isIdentifierOrJSDocNamespaceDeclaration(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ModuleDeclaration; +} +export function isJSDocTypeExpressionOrJSDocTypeLiteral(node) { + return node.kind === SyntaxKind.JSDocTypeExpression || node.kind === SyntaxKind.JSDocTypeLiteral; +} +export function isJsxTagNameExpression(node) { + const kind = node.kind; + return kind === SyntaxKind.ThisKeyword + || kind === SyntaxKind.Identifier + || kind === SyntaxKind.PropertyAccessExpression + || kind === SyntaxKind.JsxNamespacedName; +} +//# sourceMappingURL=is.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/is.js.map b/node_modules/typescript/dist/ast/is.js.map new file mode 100644 index 0000000..d72de8b --- /dev/null +++ b/node_modules/typescript/dist/ast/is.js.map @@ -0,0 +1 @@ +{"version":3,"file":"is.js","sourceRoot":"","sources":["../../src/ast/is.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,0CAA0C;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAqC/C,OAAO,EAAE,mBAA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,UAAU,CAAC,YAAY,IAAI,IAAI,KAAK,UAAU,CAAC,qBAAqB;WAC7E,mBAAmB,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,uCAAuC,CAAC,IAAU;IAC9D,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,iBAAiB,CAAC;AAC7F,CAAC;AAED,MAAM,UAAU,uCAAuC,CAAC,IAAU;IAC9D,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,mBAAmB,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,gBAAgB,CAAC;AACrG,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,IAAU;IAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IACvB,OAAO,IAAI,KAAK,UAAU,CAAC,WAAW;WAC/B,IAAI,KAAK,UAAU,CAAC,UAAU;WAC9B,IAAI,KAAK,UAAU,CAAC,wBAAwB;WAC5C,IAAI,KAAK,UAAU,CAAC,iBAAiB,CAAC;AACjD,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/jsdoc.d.ts b/node_modules/typescript/dist/ast/jsdoc.d.ts new file mode 100644 index 0000000..81247a4 --- /dev/null +++ b/node_modules/typescript/dist/ast/jsdoc.d.ts @@ -0,0 +1,11 @@ +import type { JSDocComment, JSDocTag } from "./ast.generated.ts"; +import { type Node, type NodeArray, SyntaxKind } from "./ast.ts"; +/** Get all JSDoc tags related to a node, including those on parent nodes. */ +export declare function getJSDocTags(node: Node): readonly JSDocTag[]; +/** Gets all JSDoc tags that match a specified predicate */ +export declare function getAllJSDocTags(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[]; +/** Gets all JSDoc tags of a specified kind */ +export declare function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[]; +/** Gets the text of a jsdoc comment, flattening links to their text. */ +export declare function getTextOfJSDocComment(comment?: string | NodeArray): string | undefined; +//# sourceMappingURL=jsdoc.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/jsdoc.d.ts.map b/node_modules/typescript/dist/ast/jsdoc.d.ts.map new file mode 100644 index 0000000..378820d --- /dev/null +++ b/node_modules/typescript/dist/ast/jsdoc.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"jsdoc.d.ts","sourceRoot":"","sources":["../../src/ast/jsdoc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAER,YAAY,EAKZ,QAAQ,EAOX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEH,KAAK,IAAI,EACT,KAAK,SAAS,EACd,UAAU,EACb,MAAM,UAAU,CAAC;AAalB,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,QAAQ,EAAE,CAE5D;AAED,2DAA2D;AAC3D,wBAAgB,eAAe,CAAC,CAAC,SAAS,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,QAAQ,KAAK,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC,EAAE,CAEpH;AAED,8CAA8C;AAC9C,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,GAAG,SAAS,QAAQ,EAAE,CAEvF;AAED,wEAAwE;AACxE,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,YAAY,CAAC,GAAG,MAAM,GAAG,SAAS,CAGpG"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/jsdoc.js b/node_modules/typescript/dist/ast/jsdoc.js new file mode 100644 index 0000000..ae6b7a6 --- /dev/null +++ b/node_modules/typescript/dist/ast/jsdoc.js @@ -0,0 +1,202 @@ +import { assertNever } from "../internal/utils.js"; +import { SyntaxKind, } from "./ast.js"; +import { isIdentifier, isJSDoc, isJSDocOverloadTag, isJSDocParameterTag, isJSDocSatisfiesTag, isJSDocTemplateTag, isJSDocTypeTag, isParenthesizedExpression, isPrivateIdentifier, } from "./is.generated.js"; +/** Get all JSDoc tags related to a node, including those on parent nodes. */ +export function getJSDocTags(node) { + return getJSDocCommentsAndTags(node); +} +/** Gets all JSDoc tags that match a specified predicate */ +export function getAllJSDocTags(node, predicate) { + return getJSDocTags(node).filter(predicate); +} +/** Gets all JSDoc tags of a specified kind */ +export function getAllJSDocTagsOfKind(node, kind) { + return getJSDocTags(node).filter(doc => doc.kind === kind); +} +/** Gets the text of a jsdoc comment, flattening links to their text. */ +export function getTextOfJSDocComment(comment) { + return typeof comment === "string" ? comment + : comment?.map(c => c.kind === SyntaxKind.JSDocText ? c.text : formatJSDocLink(c)).join(""); +} +function isVariableLike(node) { + switch (node.kind) { + case SyntaxKind.BindingElement: + case SyntaxKind.EnumMember: + case SyntaxKind.Parameter: + case SyntaxKind.PropertyAssignment: + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.PropertySignature: + case SyntaxKind.ShorthandPropertyAssignment: + case SyntaxKind.VariableDeclaration: + return true; + } + return false; +} +function getJSDocNodes(node) { + const jsDoc = node.jsDoc; + if (!jsDoc || jsDoc.length === 0) { + return []; + } + const result = []; + for (const j of jsDoc) { + if (isJSDoc(j)) { + result.push(j); + } + } + return result; +} +/** + * Determines whether a host node owns a JSDoc tag. A `@type` / `@satisfies` tag + * attached to a parenthesized expression belongs only to that expression. + */ +function ownsJSDocTag(hostNode, tag) { + return !(isJSDocTypeTag(tag) || isJSDocSatisfiesTag(tag)) + || !tag.parent + || !isJSDoc(tag.parent) + || !tag.parent.parent + || !isParenthesizedExpression(tag.parent.parent) + || tag.parent.parent === hostNode; +} +function filterOwnedJSDocTags(hostNode, comments) { + const result = []; + const lastJSDoc = comments[comments.length - 1]; + for (const jsDoc of comments) { + if (!jsDoc.tags) { + continue; + } + if (jsDoc === lastJSDoc) { + for (const tag of jsDoc.tags) { + if (ownsJSDocTag(hostNode, tag)) { + result.push(tag); + } + } + } + else { + // Tags from earlier comments only contribute their `@overload` tags. + for (const tag of jsDoc.tags) { + if (isJSDocOverloadTag(tag)) { + result.push(tag); + } + } + } + } + return result; +} +function getJSDocParameterTags(param) { + const result = []; + const name = param.name; + const parentTags = getJSDocTags(param.parent); + if (name && isIdentifier(name)) { + for (const tag of parentTags) { + if (isJSDocParameterTag(tag) && isIdentifier(tag.name) && tag.name.text === name.text) { + result.push(tag); + } + } + } + else if (name) { + // Binding patterns and JSDoc function syntax match parameter tags by position. + const parameters = param.parent.parameters; + const i = parameters ? [...parameters].indexOf(param) : -1; + if (i > -1) { + const paramTags = parentTags.filter(isJSDocParameterTag); + if (i < paramTags.length) { + result.push(paramTags[i]); + } + } + } + return result; +} +function getJSDocTypeParameterTags(typeParam) { + const result = []; + const name = typeParam.name.text; + for (const tag of getJSDocTags(typeParam.parent)) { + if (isJSDocTemplateTag(tag) && [...tag.typeParameters].some(tp => tp.name.text === name)) { + result.push(tag); + } + } + return result; +} +// Keep in sync with ast.GetNextJSDocCommentLocation. +function getNextJSDocCommentLocation(node) { + const parent = node.parent; + if (parent) { + switch (parent.kind) { + case SyntaxKind.PropertyAssignment: + case SyntaxKind.ExportAssignment: + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.VariableDeclaration: + case SyntaxKind.SatisfiesExpression: + case SyntaxKind.ReturnStatement: + case SyntaxKind.VariableStatement: + case SyntaxKind.ExpressionStatement: + return parent; + case SyntaxKind.VariableDeclarationList: + if (parent.declarations[0] === node) { + return parent; + } + break; + } + } + return undefined; +} +function getJSDocCommentsAndTags(hostNode) { + const result = []; + // Pull parameter comments from a declaring initializer (e.g. `var x = function () {}`). + if (isVariableLike(hostNode)) { + const initializer = hostNode.initializer; + if (initializer) { + const initJSDoc = getJSDocNodes(initializer); + if (initJSDoc.length) { + result.push(...filterOwnedJSDocTags(hostNode, initJSDoc)); + } + } + } + let node = hostNode; + while (node && node.parent) { + const jsDocNodes = getJSDocNodes(node); + if (jsDocNodes.length) { + result.push(...filterOwnedJSDocTags(hostNode, jsDocNodes)); + } + if (node.kind === SyntaxKind.Parameter) { + result.push(...getJSDocParameterTags(node)); + break; + } + if (node.kind === SyntaxKind.TypeParameter) { + result.push(...getJSDocTypeParameterTags(node)); + break; + } + node = getNextJSDocCommentLocation(node); + } + return result; +} +function formatJSDocLink(link) { + const kind = link.kind === SyntaxKind.JSDocLink ? "link" + : link.kind === SyntaxKind.JSDocLinkCode ? "linkcode" + : "linkplain"; + const name = link.name ? entityNameToString(link.name) : ""; + const space = link.name && (link.text === "" || link.text.startsWith("://")) ? "" : " "; + return `{@${kind} ${name}${space}${link.text}}`; +} +function entityNameToString(name) { + switch (name.kind) { + case SyntaxKind.ThisKeyword: + return "this"; + case SyntaxKind.PrivateIdentifier: + case SyntaxKind.Identifier: + return name.getFullWidth() === 0 ? name.text : name.getText(); + case SyntaxKind.QualifiedName: + return entityNameToString(name.left) + "." + entityNameToString(name.right); + case SyntaxKind.PropertyAccessExpression: + if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { + return entityNameToString(name.expression) + "." + entityNameToString(name.name); + } + else { + return assertNever(name.name); + } + case SyntaxKind.JsxNamespacedName: + return entityNameToString(name.namespace) + ":" + entityNameToString(name.name); + default: + return assertNever(name); + } +} +//# sourceMappingURL=jsdoc.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/jsdoc.js.map b/node_modules/typescript/dist/ast/jsdoc.js.map new file mode 100644 index 0000000..87f71d7 --- /dev/null +++ b/node_modules/typescript/dist/ast/jsdoc.js.map @@ -0,0 +1 @@ +{"version":3,"file":"jsdoc.js","sourceRoot":"","sources":["../../src/ast/jsdoc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAgBnD,OAAO,EAIH,UAAU,GACb,MAAM,UAAU,CAAC;AAClB,OAAO,EACH,YAAY,EACZ,OAAO,EACP,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,kBAA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,UAAU,CAAC,aAAa;YACzB,OAAO,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChF,KAAK,UAAU,CAAC,wBAAwB;YACpC,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC5D,OAAO,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrF,CAAC;iBACI,CAAC;gBACF,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAClC,CAAC;QACL,KAAK,UAAU,CAAC,iBAAiB;YAC7B,OAAO,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpF;YACI,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/scanner.d.ts b/node_modules/typescript/dist/ast/scanner.d.ts new file mode 100644 index 0000000..49d87ce --- /dev/null +++ b/node_modules/typescript/dist/ast/scanner.d.ts @@ -0,0 +1,97 @@ +import { CommentDirectiveType } from "#enums/commentDirectiveType"; +import { LanguageVariant } from "#enums/languageVariant"; +import { RegularExpressionFlags } from "#enums/regularExpressionFlags"; +import { ScriptTarget } from "#enums/scriptTarget"; +import { SyntaxKind } from "#enums/syntaxKind"; +import { TokenFlags } from "#enums/tokenFlags"; +import type { JsxTokenSyntaxKind, KeywordSyntaxKind } from "./ast.ts"; +export type JSDocTokenKind = SyntaxKind.EndOfFile | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.Unknown | KeywordSyntaxKind; +export interface CommentDirective { + range: { + pos: number; + end: number; + }; + type: CommentDirectiveType; +} +export declare function tokenIsIdentifierOrKeyword(token: SyntaxKind): boolean; +export declare function tokenIsIdentifierOrKeywordOrGreaterThan(token: SyntaxKind): boolean; +export interface Scanner { + getTokenFullStart(): number; + getToken(): SyntaxKind; + getTokenStart(): number; + getTokenEnd(): number; + getTokenText(): string; + getTokenValue(): string; + hasUnicodeEscape(): boolean; + hasExtendedUnicodeEscape(): boolean; + hasPrecedingLineBreak(): boolean; + hasPrecedingJSDocComment(): boolean; + hasPrecedingJSDocLeadingAsterisks(): boolean; + hasPrecedingJSDocWithDeprecatedTag(): boolean; + hasPrecedingJSDocWithSeeOrLink(): boolean; + isIdentifier(): boolean; + isReservedWord(): boolean; + isUnterminated(): boolean; + getNumericLiteralFlags(): TokenFlags; + getCommentDirectives(): CommentDirective[] | undefined; + getTokenFlags(): TokenFlags; + reScanGreaterToken(): SyntaxKind; + reScanSlashToken(): SyntaxKind; + reScanAsteriskEqualsToken(): SyntaxKind; + reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind; + reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind; + scanJsxIdentifier(): SyntaxKind; + scanJsxAttributeValue(): SyntaxKind; + reScanJsxAttributeValue(): SyntaxKind; + reScanJsxToken(allowMultilineJsxText?: boolean): JsxTokenSyntaxKind; + reScanLessThanToken(): SyntaxKind; + reScanHashToken(): SyntaxKind; + reScanQuestionToken(): SyntaxKind; + reScanInvalidIdentifier(): SyntaxKind; + scanJsxToken(): JsxTokenSyntaxKind; + scanJsDocToken(): JSDocTokenKind; + scanJSDocCommentTextToken(inBackticks: boolean): JSDocTokenKind | SyntaxKind.JSDocCommentTextToken; + scan(): SyntaxKind; + getText(): string; + clearCommentDirectives(): void; + setText(text: string | undefined, start?: number, length?: number): void; + setLanguageVariant(variant: LanguageVariant): void; + resetTokenState(pos: number): void; + setSkipJsDocLeadingAsterisks(skip: boolean): void; + lookAhead(callback: () => T): T; + scanRange(start: number, length: number, callback: () => T): T; + tryScan(callback: () => T): T; +} +export declare const textToKeywordObj: Record; +export declare function isUnicodeIdentifierStart(code: number): boolean; +export declare function tokenToString(t: SyntaxKind): string | undefined; +export declare function stringToToken(s: string): SyntaxKind | undefined; +export declare function characterCodeToRegularExpressionFlag(ch: number): RegularExpressionFlags | undefined; +export declare function computeLineStarts(text: string): number[]; +export declare function isWhiteSpaceLike(ch: number): boolean; +export declare function isWhiteSpaceSingleLine(ch: number): boolean; +export declare function isLineBreak(ch: number): boolean; +export declare function couldStartTrivia(text: string, pos: number): boolean; +export declare function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean, stopAtComments?: boolean, inJSDoc?: boolean): number; +export type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia; +export interface CommentRange { + pos: number; + end: number; + hasTrailingNewLine?: boolean; + kind: CommentKind; +} +export declare function forEachLeadingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined; +export declare function forEachLeadingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined; +export declare function forEachTrailingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined; +export declare function forEachTrailingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined; +export declare function reduceEachLeadingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T, initial: U): U | undefined; +export declare function reduceEachTrailingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T, initial: U): U | undefined; +export declare function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined; +export declare function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined; +export declare function getShebang(text: string): string | undefined; +export declare function isIdentifierStart(ch: number, _languageVersion?: ScriptTarget): boolean; +export declare function isIdentifierPart(ch: number, _languageVersion?: ScriptTarget, identifierVariant?: LanguageVariant): boolean; +export declare function isIdentifierText(name: string, _languageVersion?: ScriptTarget, identifierVariant?: LanguageVariant): boolean; +export declare function utf16EncodeAsString(codePoint: number): string; +export declare function createScanner(skipTrivia: boolean, languageVariant?: LanguageVariant, textInitial?: string, start?: number, length?: number): Scanner; +//# sourceMappingURL=scanner.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/scanner.d.ts.map b/node_modules/typescript/dist/ast/scanner.d.ts.map new file mode 100644 index 0000000..3c3142e --- /dev/null +++ b/node_modules/typescript/dist/ast/scanner.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../src/ast/scanner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EACR,kBAAkB,EAClB,iBAAiB,EACpB,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,cAAc,GA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,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,YAAY,EAAE,iBAAiB,CAAC,EAAE,eAAe,GAAG,OAAO,CAa5H;AAgBD,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7D;AAuED,wBAAgB,aAAa,CACzB,UAAU,EAAE,OAAO,EACnB,eAAe,GAAE,eAA0C,EAC3D,WAAW,CAAC,EAAE,MAAM,EACpB,KAAK,CAAC,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,GAChB,OAAO,CAumDT"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/scanner.js b/node_modules/typescript/dist/ast/scanner.js new file mode 100644 index 0000000..eec847f --- /dev/null +++ b/node_modules/typescript/dist/ast/scanner.js @@ -0,0 +1,2230 @@ +import { CharacterCodes } from "#enums/characterCodes"; +import { CommentDirectiveType } from "#enums/commentDirectiveType"; +import { LanguageVariant } from "#enums/languageVariant"; +import { RegularExpressionFlags } from "#enums/regularExpressionFlags"; +import { ScriptTarget } from "#enums/scriptTarget"; +import { SyntaxKind } from "#enums/syntaxKind"; +import { TokenFlags } from "#enums/tokenFlags"; +// Internal-only, not exported +const EscapeSequenceScanningFlags = { + String: 1 << 0, + ReportErrors: 1 << 1, + RegularExpression: 1 << 2, + AnnexB: 1 << 3, + AnyUnicodeMode: 1 << 4, + AtomEscape: 1 << 5, + ReportInvalidEscapeErrors: (1 << 2) | (1 << 1), + AllowExtendedUnicodeEscape: (1 << 0) | (1 << 4), +}; +export function tokenIsIdentifierOrKeyword(token) { + return token >= SyntaxKind.Identifier; +} +export function tokenIsIdentifierOrKeywordOrGreaterThan(token) { + return token === SyntaxKind.GreaterThanToken || tokenIsIdentifierOrKeyword(token); +} +export const textToKeywordObj = { + abstract: SyntaxKind.AbstractKeyword, + accessor: SyntaxKind.AccessorKeyword, + any: SyntaxKind.AnyKeyword, + as: SyntaxKind.AsKeyword, + asserts: SyntaxKind.AssertsKeyword, + assert: SyntaxKind.AssertKeyword, + bigint: SyntaxKind.BigIntKeyword, + boolean: SyntaxKind.BooleanKeyword, + break: SyntaxKind.BreakKeyword, + case: SyntaxKind.CaseKeyword, + catch: SyntaxKind.CatchKeyword, + class: SyntaxKind.ClassKeyword, + continue: SyntaxKind.ContinueKeyword, + const: SyntaxKind.ConstKeyword, + ["" + "constructor"]: SyntaxKind.ConstructorKeyword, + debugger: SyntaxKind.DebuggerKeyword, + declare: SyntaxKind.DeclareKeyword, + default: SyntaxKind.DefaultKeyword, + defer: SyntaxKind.DeferKeyword, + delete: SyntaxKind.DeleteKeyword, + do: SyntaxKind.DoKeyword, + else: SyntaxKind.ElseKeyword, + enum: SyntaxKind.EnumKeyword, + export: SyntaxKind.ExportKeyword, + extends: SyntaxKind.ExtendsKeyword, + false: SyntaxKind.FalseKeyword, + finally: SyntaxKind.FinallyKeyword, + for: SyntaxKind.ForKeyword, + from: SyntaxKind.FromKeyword, + function: SyntaxKind.FunctionKeyword, + get: SyntaxKind.GetKeyword, + if: SyntaxKind.IfKeyword, + implements: SyntaxKind.ImplementsKeyword, + import: SyntaxKind.ImportKeyword, + in: SyntaxKind.InKeyword, + infer: SyntaxKind.InferKeyword, + instanceof: SyntaxKind.InstanceOfKeyword, + interface: SyntaxKind.InterfaceKeyword, + intrinsic: SyntaxKind.IntrinsicKeyword, + is: SyntaxKind.IsKeyword, + keyof: SyntaxKind.KeyOfKeyword, + let: SyntaxKind.LetKeyword, + module: SyntaxKind.ModuleKeyword, + namespace: SyntaxKind.NamespaceKeyword, + never: SyntaxKind.NeverKeyword, + new: SyntaxKind.NewKeyword, + null: SyntaxKind.NullKeyword, + number: SyntaxKind.NumberKeyword, + object: SyntaxKind.ObjectKeyword, + package: SyntaxKind.PackageKeyword, + private: SyntaxKind.PrivateKeyword, + protected: SyntaxKind.ProtectedKeyword, + public: SyntaxKind.PublicKeyword, + override: SyntaxKind.OverrideKeyword, + out: SyntaxKind.OutKeyword, + readonly: SyntaxKind.ReadonlyKeyword, + require: SyntaxKind.RequireKeyword, + global: SyntaxKind.GlobalKeyword, + return: SyntaxKind.ReturnKeyword, + satisfies: SyntaxKind.SatisfiesKeyword, + set: SyntaxKind.SetKeyword, + static: SyntaxKind.StaticKeyword, + string: SyntaxKind.StringKeyword, + super: SyntaxKind.SuperKeyword, + switch: SyntaxKind.SwitchKeyword, + symbol: SyntaxKind.SymbolKeyword, + this: SyntaxKind.ThisKeyword, + throw: SyntaxKind.ThrowKeyword, + true: SyntaxKind.TrueKeyword, + try: SyntaxKind.TryKeyword, + type: SyntaxKind.TypeKeyword, + typeof: SyntaxKind.TypeOfKeyword, + undefined: SyntaxKind.UndefinedKeyword, + unique: SyntaxKind.UniqueKeyword, + unknown: SyntaxKind.UnknownKeyword, + using: SyntaxKind.UsingKeyword, + var: SyntaxKind.VarKeyword, + void: SyntaxKind.VoidKeyword, + while: SyntaxKind.WhileKeyword, + with: SyntaxKind.WithKeyword, + yield: SyntaxKind.YieldKeyword, + async: SyntaxKind.AsyncKeyword, + await: SyntaxKind.AwaitKeyword, + of: SyntaxKind.OfKeyword, +}; +const textToKeyword = new Map(Object.entries(textToKeywordObj)); +const textToToken = new Map(Object.entries({ + ...textToKeywordObj, + "{": SyntaxKind.OpenBraceToken, + "}": SyntaxKind.CloseBraceToken, + "(": SyntaxKind.OpenParenToken, + ")": SyntaxKind.CloseParenToken, + "[": SyntaxKind.OpenBracketToken, + "]": SyntaxKind.CloseBracketToken, + ".": SyntaxKind.DotToken, + "...": SyntaxKind.DotDotDotToken, + ";": SyntaxKind.SemicolonToken, + ",": SyntaxKind.CommaToken, + "<": SyntaxKind.LessThanToken, + ">": SyntaxKind.GreaterThanToken, + "<=": SyntaxKind.LessThanEqualsToken, + ">=": SyntaxKind.GreaterThanEqualsToken, + "==": SyntaxKind.EqualsEqualsToken, + "!=": SyntaxKind.ExclamationEqualsToken, + "===": SyntaxKind.EqualsEqualsEqualsToken, + "!==": SyntaxKind.ExclamationEqualsEqualsToken, + "=>": SyntaxKind.EqualsGreaterThanToken, + "+": SyntaxKind.PlusToken, + "-": SyntaxKind.MinusToken, + "**": SyntaxKind.AsteriskAsteriskToken, + "*": SyntaxKind.AsteriskToken, + "/": SyntaxKind.SlashToken, + "%": SyntaxKind.PercentToken, + "++": SyntaxKind.PlusPlusToken, + "--": SyntaxKind.MinusMinusToken, + "<<": SyntaxKind.LessThanLessThanToken, + ">": SyntaxKind.GreaterThanGreaterThanToken, + ">>>": SyntaxKind.GreaterThanGreaterThanGreaterThanToken, + "&": SyntaxKind.AmpersandToken, + "|": SyntaxKind.BarToken, + "^": SyntaxKind.CaretToken, + "!": SyntaxKind.ExclamationToken, + "~": SyntaxKind.TildeToken, + "&&": SyntaxKind.AmpersandAmpersandToken, + "||": SyntaxKind.BarBarToken, + "?": SyntaxKind.QuestionToken, + "??": SyntaxKind.QuestionQuestionToken, + "?.": SyntaxKind.QuestionDotToken, + ":": SyntaxKind.ColonToken, + "=": SyntaxKind.EqualsToken, + "+=": SyntaxKind.PlusEqualsToken, + "-=": SyntaxKind.MinusEqualsToken, + "*=": SyntaxKind.AsteriskEqualsToken, + "**=": SyntaxKind.AsteriskAsteriskEqualsToken, + "/=": SyntaxKind.SlashEqualsToken, + "%=": SyntaxKind.PercentEqualsToken, + "<<=": SyntaxKind.LessThanLessThanEqualsToken, + ">>=": SyntaxKind.GreaterThanGreaterThanEqualsToken, + ">>>=": SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken, + "&=": SyntaxKind.AmpersandEqualsToken, + "|=": SyntaxKind.BarEqualsToken, + "^=": SyntaxKind.CaretEqualsToken, + "||=": SyntaxKind.BarBarEqualsToken, + "&&=": SyntaxKind.AmpersandAmpersandEqualsToken, + "??=": SyntaxKind.QuestionQuestionEqualsToken, + "@": SyntaxKind.AtToken, + "#": SyntaxKind.HashToken, + "`": SyntaxKind.BacktickToken, +})); +const charCodeToRegExpFlag = new Map([ + [CharacterCodes.d, RegularExpressionFlags.HasIndices], + [CharacterCodes.g, RegularExpressionFlags.Global], + [CharacterCodes.i, RegularExpressionFlags.IgnoreCase], + [CharacterCodes.m, RegularExpressionFlags.Multiline], + [CharacterCodes.s, RegularExpressionFlags.DotAll], + [CharacterCodes.u, RegularExpressionFlags.Unicode], + [CharacterCodes.v, RegularExpressionFlags.UnicodeSets], + [CharacterCodes.y, RegularExpressionFlags.Sticky], +]); +/** + * Generated by scripts/regenerate-unicode-identifier-parts.mjs on node v22.1.0 with unicode 15.1 + * based on http://www.unicode.org/reports/tr31/ and https://www.ecma-international.org/ecma-262/6.0/#sec-names-and-keywords + * unicodeESNextIdentifierStart corresponds to the ID_Start and Other_ID_Start property, and + * unicodeESNextIdentifierPart corresponds to ID_Continue, Other_ID_Continue, plus ID_Start and Other_ID_Start + */ +// dprint-ignore +const unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 895, 895, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1488, 1514, 1519, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2144, 2154, 2160, 2183, 2185, 2190, 2208, 2249, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2432, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2556, 2556, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2809, 2809, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3133, 3160, 3162, 3165, 3165, 3168, 3169, 3200, 3200, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3293, 3294, 3296, 3297, 3313, 3314, 3332, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3412, 3414, 3423, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5905, 5919, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6264, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6430, 6480, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6988, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7401, 7404, 7406, 7411, 7413, 7414, 7418, 7418, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12443, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12735, 12784, 12799, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42653, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43261, 43262, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43488, 43492, 43494, 43503, 43514, 43518, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43646, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43881, 43888, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66349, 66378, 66384, 66421, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68096, 68112, 68115, 68117, 68119, 68121, 68149, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68899, 69248, 69289, 69296, 69297, 69376, 69404, 69415, 69415, 69424, 69445, 69488, 69505, 69552, 69572, 69600, 69622, 69635, 69687, 69745, 69746, 69749, 69749, 69763, 69807, 69840, 69864, 69891, 69926, 69956, 69956, 69959, 69959, 69968, 70002, 70006, 70006, 70019, 70066, 70081, 70084, 70106, 70106, 70108, 70108, 70144, 70161, 70163, 70187, 70207, 70208, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70461, 70461, 70480, 70480, 70493, 70497, 70656, 70708, 70727, 70730, 70751, 70753, 70784, 70831, 70852, 70853, 70855, 70855, 71040, 71086, 71128, 71131, 71168, 71215, 71236, 71236, 71296, 71338, 71352, 71352, 71424, 71450, 71488, 71494, 71680, 71723, 71840, 71903, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71983, 71999, 71999, 72001, 72001, 72096, 72103, 72106, 72144, 72161, 72161, 72163, 72163, 72192, 72192, 72203, 72242, 72250, 72250, 72272, 72272, 72284, 72329, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72750, 72768, 72768, 72818, 72847, 72960, 72966, 72968, 72969, 72971, 73008, 73030, 73030, 73056, 73061, 73063, 73064, 73066, 73097, 73112, 73112, 73440, 73458, 73474, 73474, 73476, 73488, 73490, 73523, 73648, 73648, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78895, 78913, 78918, 82944, 83526, 92160, 92728, 92736, 92766, 92784, 92862, 92880, 92909, 92928, 92975, 92992, 92995, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94032, 94032, 94099, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 122624, 122654, 122661, 122666, 122928, 122989, 123136, 123180, 123191, 123197, 123214, 123214, 123536, 123565, 123584, 123627, 124112, 124139, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125184, 125251, 125259, 125259, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173791, 173824, 177977, 177984, 178205, 178208, 183969, 183984, 191456, 191472, 192093, 194560, 195101, 196608, 201546, 201552, 205743]; +// dprint-ignore +const unicodeESNextIdentifierPart = [48, 57, 65, 90, 95, 95, 97, 122, 170, 170, 181, 181, 183, 183, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 895, 895, 902, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1519, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2045, 2045, 2048, 2093, 2112, 2139, 2144, 2154, 2160, 2183, 2185, 2190, 2200, 2273, 2275, 2403, 2406, 2415, 2417, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2556, 2556, 2558, 2558, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2809, 2815, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2901, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3072, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3132, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3165, 3165, 3168, 3171, 3174, 3183, 3200, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3293, 3294, 3296, 3299, 3302, 3311, 3313, 3315, 3328, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3406, 3412, 3415, 3423, 3427, 3430, 3439, 3450, 3455, 3457, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3558, 3567, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3773, 3776, 3780, 3782, 3782, 3784, 3790, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4969, 4977, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5909, 5919, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6159, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6832, 6845, 6847, 6862, 6912, 6988, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7376, 7378, 7380, 7418, 7424, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12447, 12449, 12543, 12549, 12591, 12593, 12686, 12704, 12735, 12784, 12799, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42737, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43047, 43052, 43052, 43072, 43123, 43136, 43205, 43216, 43225, 43232, 43255, 43259, 43259, 43261, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43488, 43518, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43881, 43888, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66045, 66045, 66176, 66204, 66208, 66256, 66272, 66272, 66304, 66335, 66349, 66378, 66384, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68149, 68152, 68154, 68159, 68159, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68903, 68912, 68921, 69248, 69289, 69291, 69292, 69296, 69297, 69373, 69404, 69415, 69415, 69424, 69456, 69488, 69509, 69552, 69572, 69600, 69622, 69632, 69702, 69734, 69749, 69759, 69818, 69826, 69826, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69951, 69956, 69959, 69968, 70003, 70006, 70006, 70016, 70084, 70089, 70092, 70094, 70106, 70108, 70108, 70144, 70161, 70163, 70199, 70206, 70209, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70459, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70730, 70736, 70745, 70750, 70753, 70784, 70853, 70855, 70855, 70864, 70873, 71040, 71093, 71096, 71104, 71128, 71133, 71168, 71232, 71236, 71236, 71248, 71257, 71296, 71352, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71481, 71488, 71494, 71680, 71738, 71840, 71913, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71989, 71991, 71992, 71995, 72003, 72016, 72025, 72096, 72103, 72106, 72151, 72154, 72161, 72163, 72164, 72192, 72254, 72263, 72263, 72272, 72345, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72758, 72760, 72768, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 72960, 72966, 72968, 72969, 72971, 73014, 73018, 73018, 73020, 73021, 73023, 73031, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73102, 73104, 73105, 73107, 73112, 73120, 73129, 73440, 73462, 73472, 73488, 73490, 73530, 73534, 73538, 73552, 73561, 73648, 73648, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78895, 78912, 78933, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92784, 92862, 92864, 92873, 92880, 92909, 92912, 92916, 92928, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94177, 94179, 94180, 94192, 94193, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 118528, 118573, 118576, 118598, 119141, 119145, 119149, 119154, 119163, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121461, 121461, 121476, 121476, 121499, 121503, 121505, 121519, 122624, 122654, 122661, 122666, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 122928, 122989, 123023, 123023, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123214, 123536, 123566, 123584, 123641, 124112, 124153, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125136, 125142, 125184, 125259, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 130032, 130041, 131072, 173791, 173824, 177977, 177984, 178205, 178208, 183969, 183984, 191456, 191472, 192093, 194560, 195101, 196608, 201546, 201552, 205743, 917760, 917999]; +const commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/; +const commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/; +const jsDocTagTerminators = new Set([" ", "\t", "\n", "\r", "}", "*"]); +function hasJSDocTag(text, offset, ...tags) { + for (const tag of tags) { + if (text.startsWith(tag, offset)) { + if (offset + tag.length === text.length) { + return true; + } + if (jsDocTagTerminators.has(text[offset + tag.length])) { + return true; + } + } + } + return false; +} +function scanJSDocCommentForTags(text, tokenFlags) { + let offset = 0; + while (true) { + const i = text.indexOf("@", offset); + if (i < 0) { + return tokenFlags; + } + offset = i + 1; + if (!(tokenFlags & TokenFlags.PrecedingJSDocWithDeprecated) && hasJSDocTag(text, offset, "deprecated")) { + tokenFlags |= TokenFlags.PrecedingJSDocWithDeprecated; + } + if (!(tokenFlags & TokenFlags.PrecedingJSDocWithSeeOrLink) && hasJSDocTag(text, offset, "see", "link", "linkcode", "linkplain")) { + tokenFlags |= TokenFlags.PrecedingJSDocWithSeeOrLink; + } + if ((tokenFlags & (TokenFlags.PrecedingJSDocWithDeprecated | TokenFlags.PrecedingJSDocWithSeeOrLink)) === + (TokenFlags.PrecedingJSDocWithDeprecated | TokenFlags.PrecedingJSDocWithSeeOrLink)) { + return tokenFlags; + } + } +} +function lookupInUnicodeMap(code, map) { + if (code < map[0]) { + return false; + } + let lo = 0; + let hi = map.length; + let mid; + while (lo + 1 < hi) { + mid = lo + (hi - lo) / 2; + mid -= mid % 2; + if (map[mid] <= code && code <= map[mid + 1]) { + return true; + } + if (code < map[mid]) { + hi = mid; + } + else { + lo = mid + 2; + } + } + return false; +} +export function isUnicodeIdentifierStart(code) { + return lookupInUnicodeMap(code, unicodeESNextIdentifierStart); +} +function isUnicodeIdentifierPart(code) { + return lookupInUnicodeMap(code, unicodeESNextIdentifierPart); +} +function makeReverseMap(source) { + const result = []; + source.forEach((value, name) => { + result[value] = name; + }); + return result; +} +const tokenStrings = makeReverseMap(textToToken); +export function tokenToString(t) { + return tokenStrings[t]; +} +export function stringToToken(s) { + return textToToken.get(s); +} +export function characterCodeToRegularExpressionFlag(ch) { + return charCodeToRegExpFlag.get(ch); +} +export function computeLineStarts(text) { + const result = []; + let pos = 0; + let lineStart = 0; + while (pos < text.length) { + const ch = text.charCodeAt(pos); + pos++; + switch (ch) { + case CharacterCodes.carriageReturn: + if (text.charCodeAt(pos) === CharacterCodes.lineFeed) { + pos++; + } + // falls through + case CharacterCodes.lineFeed: + result.push(lineStart); + lineStart = pos; + break; + default: + if (ch > CharacterCodes.maxAsciiCharacter && isLineBreak(ch)) { + result.push(lineStart); + lineStart = pos; + } + break; + } + } + result.push(lineStart); + return result; +} +export function isWhiteSpaceLike(ch) { + return isWhiteSpaceSingleLine(ch) || isLineBreak(ch); +} +export function isWhiteSpaceSingleLine(ch) { + return ch === CharacterCodes.space || + ch === CharacterCodes.tab || + ch === CharacterCodes.verticalTab || + ch === CharacterCodes.formFeed || + ch === CharacterCodes.nonBreakingSpace || + ch === CharacterCodes.nextLine || + ch === CharacterCodes.ogham || + ch >= CharacterCodes.enQuad && ch <= CharacterCodes.zeroWidthSpace || + ch === CharacterCodes.narrowNoBreakSpace || + ch === CharacterCodes.mathematicalSpace || + ch === CharacterCodes.ideographicSpace || + ch === CharacterCodes.byteOrderMark; +} +export function isLineBreak(ch) { + return ch === CharacterCodes.lineFeed || + ch === CharacterCodes.carriageReturn || + ch === CharacterCodes.lineSeparator || + ch === CharacterCodes.paragraphSeparator; +} +function isDigit(ch) { + return ch >= CharacterCodes._0 && ch <= CharacterCodes._9; +} +function isHexDigit(ch) { + return isDigit(ch) || ch >= CharacterCodes.A && ch <= CharacterCodes.F || ch >= CharacterCodes.a && ch <= CharacterCodes.f; +} +function isOctalDigit(ch) { + return ch >= CharacterCodes._0 && ch <= CharacterCodes._7; +} +export function couldStartTrivia(text, pos) { + const ch = text.charCodeAt(pos); + switch (ch) { + case CharacterCodes.carriageReturn: + case CharacterCodes.lineFeed: + case CharacterCodes.tab: + case CharacterCodes.verticalTab: + case CharacterCodes.formFeed: + case CharacterCodes.space: + case CharacterCodes.slash: + case CharacterCodes.lessThan: + case CharacterCodes.bar: + case CharacterCodes.equals: + case CharacterCodes.greaterThan: + return true; + case CharacterCodes.hash: + return pos === 0; + default: + return ch > CharacterCodes.maxAsciiCharacter; + } +} +export function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments, inJSDoc) { + if (pos < 0) { + return pos; + } + let canConsumeStar = false; + while (true) { + const ch = text.charCodeAt(pos); + switch (ch) { + case CharacterCodes.carriageReturn: + if (text.charCodeAt(pos + 1) === CharacterCodes.lineFeed) { + pos++; + } + // falls through + case CharacterCodes.lineFeed: + pos++; + if (stopAfterLineBreak) { + return pos; + } + canConsumeStar = !!inJSDoc; + continue; + case CharacterCodes.tab: + case CharacterCodes.verticalTab: + case CharacterCodes.formFeed: + case CharacterCodes.space: + pos++; + continue; + case CharacterCodes.slash: + if (stopAtComments) { + break; + } + if (text.charCodeAt(pos + 1) === CharacterCodes.slash) { + pos += 2; + while (pos < text.length) { + if (isLineBreak(text.charCodeAt(pos))) { + break; + } + pos++; + } + canConsumeStar = false; + continue; + } + if (text.charCodeAt(pos + 1) === CharacterCodes.asterisk) { + pos += 2; + while (pos < text.length) { + if (text.charCodeAt(pos) === CharacterCodes.asterisk && text.charCodeAt(pos + 1) === CharacterCodes.slash) { + pos += 2; + break; + } + pos++; + } + canConsumeStar = false; + continue; + } + break; + case CharacterCodes.lessThan: + case CharacterCodes.bar: + case CharacterCodes.equals: + case CharacterCodes.greaterThan: + if (isConflictMarkerTrivia(text, pos)) { + pos = scanConflictMarkerTrivia(text, pos); + canConsumeStar = false; + continue; + } + break; + case CharacterCodes.hash: + if (pos === 0 && isShebangTrivia(text, pos)) { + pos = scanShebangTrivia(text, pos); + continue; + } + break; + case CharacterCodes.asterisk: + if (canConsumeStar) { + pos++; + canConsumeStar = false; + continue; + } + break; + default: + if (ch > CharacterCodes.maxAsciiCharacter && (isWhiteSpaceLike(ch))) { + pos++; + continue; + } + break; + } + return pos; + } +} +function isConflictMarkerTrivia(text, pos) { + if (pos >= text.length) { + return false; + } + const ch = text.charCodeAt(pos); + if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) { + if (ch === CharacterCodes.lessThan || ch === CharacterCodes.greaterThan || ch === CharacterCodes.equals) { + if (pos + 6 < text.length && text.charCodeAt(pos + 1) === ch && text.charCodeAt(pos + 2) === ch && text.charCodeAt(pos + 3) === ch && text.charCodeAt(pos + 4) === ch && text.charCodeAt(pos + 5) === ch && text.charCodeAt(pos + 6) === ch) { + return ch === CharacterCodes.equals || text.charCodeAt(pos + 7) === CharacterCodes.space; + } + } + if (ch === CharacterCodes.bar && pos + 6 < text.length && text.charCodeAt(pos + 1) === ch && text.charCodeAt(pos + 2) === ch && text.charCodeAt(pos + 3) === ch && text.charCodeAt(pos + 4) === ch && text.charCodeAt(pos + 5) === ch && text.charCodeAt(pos + 6) === ch) { + return true; + } + } + return false; +} +function scanConflictMarkerTrivia(text, pos) { + const ch = text.charCodeAt(pos); + const len = text.length; + if (ch === CharacterCodes.lessThan || ch === CharacterCodes.greaterThan) { + while (pos < len && !isLineBreak(text.charCodeAt(pos))) { + pos++; + } + } + else { + // Consume everything from the start of a ||||||| or ======= marker to the start + // of the next ======= or >>>>>>> marker. + pos += 7; // skip marker + while (pos < len) { + const currentChar = text.charCodeAt(pos); + if ((currentChar === CharacterCodes.equals || currentChar === CharacterCodes.greaterThan) && isConflictMarkerTrivia(text, pos)) { + break; + } + pos++; + } + } + return pos; +} +function isShebangTrivia(text, pos) { + return pos === 0 && text.charCodeAt(0) === CharacterCodes.hash && text.charCodeAt(1) === CharacterCodes.exclamation; +} +function scanShebangTrivia(text, pos) { + pos += 2; + while (pos < text.length) { + if (isLineBreak(text.charCodeAt(pos))) { + break; + } + pos++; + } + return pos; +} +function iterateCommentRanges(reduce, text, pos, trailing, cb, state, initial) { + let pendingPos; + let pendingEnd; + let pendingKind; + let pendingHasTrailingNewLine; + let hasPendingCommentRange = false; + let collecting = trailing; + let accumulator = initial; + if (pos === 0) { + collecting = true; + const shebang = getShebang(text); + if (shebang) { + pos = shebang.length; + } + } + scan: while (pos >= 0 && pos < text.length) { + const ch = text.charCodeAt(pos); + switch (ch) { + case CharacterCodes.carriageReturn: + if (text.charCodeAt(pos + 1) === CharacterCodes.lineFeed) { + pos++; + } + // falls through + case CharacterCodes.lineFeed: + pos++; + if (trailing) { + break scan; + } + collecting = true; + if (hasPendingCommentRange) { + pendingHasTrailingNewLine = true; + } + continue; + case CharacterCodes.tab: + case CharacterCodes.verticalTab: + case CharacterCodes.formFeed: + case CharacterCodes.space: + pos++; + continue; + case CharacterCodes.slash: + const nextChar = text.charCodeAt(pos + 1); + let hasTrailingNewLine = false; + if (nextChar === CharacterCodes.slash || nextChar === CharacterCodes.asterisk) { + const kind = nextChar === CharacterCodes.slash ? SyntaxKind.SingleLineCommentTrivia : SyntaxKind.MultiLineCommentTrivia; + const startPos = pos; + pos += 2; + if (nextChar === CharacterCodes.slash) { + while (pos < text.length) { + if (isLineBreak(text.charCodeAt(pos))) { + hasTrailingNewLine = true; + break; + } + pos++; + } + } + else { + while (pos < text.length) { + if (text.charCodeAt(pos) === CharacterCodes.asterisk && text.charCodeAt(pos + 1) === CharacterCodes.slash) { + pos += 2; + break; + } + pos++; + } + } + if (collecting) { + if (hasPendingCommentRange) { + accumulator = cb(pendingPos, pendingEnd, pendingKind, pendingHasTrailingNewLine, state, accumulator); + if (!reduce && accumulator) { + return accumulator; + } + } + pendingPos = startPos; + pendingEnd = pos; + pendingKind = kind; + pendingHasTrailingNewLine = hasTrailingNewLine; + hasPendingCommentRange = true; + } + continue; + } + break scan; + default: + if (ch > CharacterCodes.maxAsciiCharacter && (isWhiteSpaceLike(ch))) { + if (hasPendingCommentRange && isLineBreak(ch)) { + pendingHasTrailingNewLine = true; + } + pos++; + continue; + } + break scan; + } + } + if (hasPendingCommentRange) { + accumulator = cb(pendingPos, pendingEnd, pendingKind, pendingHasTrailingNewLine, state, accumulator); + } + return accumulator; +} +function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments = []) { + comments.push({ kind, pos, end, hasTrailingNewLine }); + return comments; +} +export function forEachLeadingCommentRange(text, pos, cb, state) { + return iterateCommentRanges(/*reduce*/ false, text, pos, /*trailing*/ false, cb, state, /*initial*/ undefined); +} +export function forEachTrailingCommentRange(text, pos, cb, state) { + return iterateCommentRanges(/*reduce*/ false, text, pos, /*trailing*/ true, cb, state, /*initial*/ undefined); +} +export function reduceEachLeadingCommentRange(text, pos, cb, state, initial) { + return iterateCommentRanges(/*reduce*/ true, text, pos, /*trailing*/ false, cb, state, initial); +} +export function reduceEachTrailingCommentRange(text, pos, cb, state, initial) { + return iterateCommentRanges(/*reduce*/ true, text, pos, /*trailing*/ true, cb, state, initial); +} +export function getLeadingCommentRanges(text, pos) { + return reduceEachLeadingCommentRange(text, pos, appendCommentRange, /*state*/ undefined, /*initial*/ undefined); +} +export function getTrailingCommentRanges(text, pos) { + return reduceEachTrailingCommentRange(text, pos, appendCommentRange, /*state*/ undefined, /*initial*/ undefined); +} +export function getShebang(text) { + const shebang = /^#!.*/; + if (isShebangTrivia(text, 0)) { + const match = shebang.exec(text); + if (match) { + return match[0]; + } + } + return undefined; +} +export function isIdentifierStart(ch, _languageVersion) { + return ch >= CharacterCodes.A && ch <= CharacterCodes.Z || ch >= CharacterCodes.a && ch <= CharacterCodes.z || + ch === CharacterCodes.$ || ch === CharacterCodes._ || + ch > CharacterCodes.maxAsciiCharacter && isUnicodeIdentifierStart(ch); +} +export function isIdentifierPart(ch, _languageVersion, identifierVariant) { + return ch >= CharacterCodes.A && ch <= CharacterCodes.Z || ch >= CharacterCodes.a && ch <= CharacterCodes.z || + ch >= CharacterCodes._0 && ch <= CharacterCodes._9 || ch === CharacterCodes.$ || ch === CharacterCodes._ || + // "-" and ":" are valid in JSX Identifiers + (identifierVariant === LanguageVariant.JSX ? (ch === CharacterCodes.minus || ch === CharacterCodes.colon) : false) || + ch > CharacterCodes.maxAsciiCharacter && isUnicodeIdentifierPart(ch); +} +export function isIdentifierText(name, _languageVersion, identifierVariant) { + let ch = name.codePointAt(0); + if (!isIdentifierStart(ch)) { + return false; + } + for (let i = charSize(ch); i < name.length; i += charSize(ch)) { + if (!isIdentifierPart(ch = name.codePointAt(i), undefined, identifierVariant)) { + return false; + } + } + return true; +} +function codePointAt(s, i) { + return s.codePointAt(i); +} +function charSize(ch) { + if (ch >= 0x10000) { + return 2; + } + if (ch === CharacterCodes.EOF) { + return 0; + } + return 1; +} +export function utf16EncodeAsString(codePoint) { + return String.fromCodePoint(codePoint); +} +function parsePseudoBigInt(stringValue) { + let log2Base; + switch (stringValue.charCodeAt(1)) { + case CharacterCodes.b: + case CharacterCodes.B: + log2Base = 1; + break; + case CharacterCodes.o: + case CharacterCodes.O: + log2Base = 3; + break; + case CharacterCodes.x: + case CharacterCodes.X: + log2Base = 4; + break; + default: + // decimals for now just peel the trailing "n" and return + const nIndex = stringValue.length - 1; + let nonZeroStart = 0; + while (stringValue.charCodeAt(nonZeroStart) === CharacterCodes._0) { + nonZeroStart++; + } + return stringValue.slice(nonZeroStart, nIndex) || "0"; + } + // exit early for zero + const startIndex = 2; + const endIndex = stringValue.length - 1; + const bitsNeeded = (endIndex - startIndex) * log2Base; + // Stores the value specified by the string as a LE array of 16-bit integers + // using Uint16 instead of Uint32 so combining steps can use bitwise operators + const segments = new Uint16Array((bitsNeeded >>> 4) + (bitsNeeded & 15 ? 1 : 0)); + // Add the digits, one at a time + for (let i = endIndex - 1, bitOffset = 0; i >= startIndex; i--, bitOffset += log2Base) { + const segment = bitOffset >>> 4; + const digitChar = stringValue.charCodeAt(i); + // Find character value + const digit = digitChar <= CharacterCodes._9 + ? digitChar - CharacterCodes._0 + : 10 + digitChar - (digitChar <= CharacterCodes.F ? CharacterCodes.A : CharacterCodes.a); + // Add bits into segment + const shiftedDigit = digit << (bitOffset & 15); + segments[segment] |= shiftedDigit; + // overflow to next segment + const residual = shiftedDigit >>> 16; + if (residual) + segments[segment + 1] |= residual; + } + // Repeatedly divide by 10 to find each decimal digit + let base10Value = ""; + let firstNonzeroSegment = segments.length - 1; + let segmentsRemaining = true; + while (segmentsRemaining) { + let mod10 = 0; + segmentsRemaining = false; + for (let segment = firstNonzeroSegment; segment >= 0; segment--) { + const newSegment = mod10 << 16 | segments[segment]; + const segmentValue = (newSegment / 10) | 0; + segments[segment] = segmentValue; + mod10 = newSegment - segmentValue * 10; + if (segmentValue && !segmentsRemaining) { + firstNonzeroSegment = segment; + segmentsRemaining = true; + } + } + base10Value = mod10 + base10Value; + } + return base10Value; +} +// Creates a scanner over a (possibly unspecified) range of a piece of text. +export function createScanner(skipTrivia, languageVariant = LanguageVariant.Standard, textInitial, start, length) { + // Why var? It avoids TDZ checks in the runtime which can be costly. + // See: https://github.com/microsoft/TypeScript/issues/52924 + /* eslint-disable no-var */ + var text = textInitial; + // Current position (end position of text of current token) + var pos; + // end of text + var end; + // Start position of whitespace before current token + var fullStartPos; + // Start position of text of current token + var tokenStart; + var token; + var tokenValue; + var tokenFlags; + var commentDirectives; + var skipJsDocLeadingAsterisks = 0; + setText(text, start, length); + var scanner = { + getTokenFullStart: () => fullStartPos, + getTokenEnd: () => pos, + getToken: () => token, + getTokenStart: () => tokenStart, + getTokenText: () => text.substring(tokenStart, pos), + getTokenValue: () => tokenValue, + hasUnicodeEscape: () => (tokenFlags & TokenFlags.UnicodeEscape) !== 0, + hasExtendedUnicodeEscape: () => (tokenFlags & TokenFlags.ExtendedUnicodeEscape) !== 0, + hasPrecedingLineBreak: () => (tokenFlags & TokenFlags.PrecedingLineBreak) !== 0, + hasPrecedingJSDocComment: () => (tokenFlags & TokenFlags.PrecedingJSDocComment) !== 0, + hasPrecedingJSDocLeadingAsterisks: () => (tokenFlags & TokenFlags.PrecedingJSDocLeadingAsterisks) !== 0, + hasPrecedingJSDocWithDeprecatedTag: () => (tokenFlags & TokenFlags.PrecedingJSDocWithDeprecated) !== 0, + hasPrecedingJSDocWithSeeOrLink: () => (tokenFlags & TokenFlags.PrecedingJSDocWithSeeOrLink) !== 0, + isIdentifier: () => token === SyntaxKind.Identifier || token > SyntaxKind.LastReservedWord, + isReservedWord: () => token >= SyntaxKind.FirstReservedWord && token <= SyntaxKind.LastReservedWord, + isUnterminated: () => (tokenFlags & TokenFlags.Unterminated) !== 0, + getCommentDirectives: () => commentDirectives, + getNumericLiteralFlags: () => tokenFlags & TokenFlags.NumericLiteralFlags, + getTokenFlags: () => tokenFlags, + reScanGreaterToken, + reScanAsteriskEqualsToken, + reScanSlashToken, + reScanTemplateToken, + reScanTemplateHeadOrNoSubstitutionTemplate, + scanJsxIdentifier, + scanJsxAttributeValue, + reScanJsxAttributeValue, + reScanJsxToken, + reScanLessThanToken, + reScanHashToken, + reScanQuestionToken, + reScanInvalidIdentifier, + scanJsxToken, + scanJsDocToken, + scanJSDocCommentTextToken, + scan, + getText, + clearCommentDirectives, + setText, + setLanguageVariant, + resetTokenState, + setSkipJsDocLeadingAsterisks, + tryScan, + lookAhead, + scanRange, + }; + /* eslint-enable no-var */ + return scanner; + function codePointUnchecked(pos) { + return codePointAt(text, pos); + } + function codePointChecked(pos) { + return pos >= 0 && pos < end ? codePointUnchecked(pos) : CharacterCodes.EOF; + } + function charCodeUnchecked(pos) { + return text.charCodeAt(pos); + } + function charCodeChecked(pos) { + return pos >= 0 && pos < end ? charCodeUnchecked(pos) : CharacterCodes.EOF; + } + function scanNumberFragment() { + let start = pos; + let allowSeparator = false; + let isPreviousTokenSeparator = false; + let result = ""; + while (true) { + const ch = charCodeUnchecked(pos); + if (ch === CharacterCodes._) { + tokenFlags |= TokenFlags.ContainsSeparator; + if (allowSeparator) { + allowSeparator = false; + isPreviousTokenSeparator = true; + result += text.substring(start, pos); + } + else { + tokenFlags |= TokenFlags.ContainsInvalidSeparator; + } + pos++; + start = pos; + continue; + } + if (isDigit(ch)) { + allowSeparator = true; + isPreviousTokenSeparator = false; + pos++; + continue; + } + break; + } + if (charCodeUnchecked(pos - 1) === CharacterCodes._) { + tokenFlags |= TokenFlags.ContainsInvalidSeparator; + } + return result + text.substring(start, pos); + } + function scanNumber() { + let start = pos; + let mainFragment; + if (charCodeUnchecked(pos) === CharacterCodes._0) { + pos++; + if (charCodeUnchecked(pos) === CharacterCodes._) { + tokenFlags |= TokenFlags.ContainsSeparator | TokenFlags.ContainsInvalidSeparator; + pos--; + mainFragment = scanNumberFragment(); + } + else if (!scanDigits()) { + tokenFlags |= TokenFlags.ContainsLeadingZero; + mainFragment = "" + +tokenValue; + } + else if (!tokenValue) { + mainFragment = "0"; + } + else { + tokenValue = "" + parseInt(tokenValue, 8); + tokenFlags |= TokenFlags.Octal; + const withMinus = token === SyntaxKind.MinusToken; + const literal = (withMinus ? "-" : "") + "0o" + (+tokenValue).toString(8); + if (withMinus) + start--; + return SyntaxKind.NumericLiteral; + } + } + else { + mainFragment = scanNumberFragment(); + } + let decimalFragment; + let scientificFragment; + if (charCodeUnchecked(pos) === CharacterCodes.dot) { + pos++; + decimalFragment = scanNumberFragment(); + } + let end = pos; + if (charCodeUnchecked(pos) === CharacterCodes.E || charCodeUnchecked(pos) === CharacterCodes.e) { + pos++; + tokenFlags |= TokenFlags.Scientific; + if (charCodeUnchecked(pos) === CharacterCodes.plus || charCodeUnchecked(pos) === CharacterCodes.minus) + pos++; + const preNumericPart = pos; + const finalFragment = scanNumberFragment(); + if (finalFragment) { + scientificFragment = text.substring(end, preNumericPart) + finalFragment; + end = pos; + } + } + let result; + if (tokenFlags & TokenFlags.ContainsSeparator) { + result = mainFragment; + if (decimalFragment) { + result += "." + decimalFragment; + } + if (scientificFragment) { + result += scientificFragment; + } + } + else { + result = text.substring(start, end); + } + if (tokenFlags & TokenFlags.ContainsLeadingZero) { + tokenValue = "" + +result; + return SyntaxKind.NumericLiteral; + } + if (decimalFragment !== undefined || tokenFlags & TokenFlags.Scientific) { + checkForIdentifierStartAfterNumericLiteral(); + tokenValue = "" + +result; + return SyntaxKind.NumericLiteral; + } + else { + tokenValue = result; + const type = checkBigIntSuffix(); + checkForIdentifierStartAfterNumericLiteral(); + return type; + } + } + function checkForIdentifierStartAfterNumericLiteral() { + if (!isIdentifierStart(codePointUnchecked(pos))) { + return; + } + const identifierStart = pos; + const { length } = scanIdentifierParts(); + if (!(length === 1 && text[identifierStart] === "n")) { + pos = identifierStart; + } + } + function scanDigits() { + const start = pos; + let isOctal = true; + while (isDigit(charCodeChecked(pos))) { + if (!isOctalDigit(charCodeUnchecked(pos))) { + isOctal = false; + } + pos++; + } + tokenValue = text.substring(start, pos); + return isOctal; + } + function scanExactNumberOfHexDigits(count, canHaveSeparators) { + const valueString = scanHexDigits(count, /*scanAsManyAsPossible*/ false, canHaveSeparators); + return valueString ? parseInt(valueString, 16) : -1; + } + function scanMinimumNumberOfHexDigits(count, canHaveSeparators) { + return scanHexDigits(count, /*scanAsManyAsPossible*/ true, canHaveSeparators); + } + function scanHexDigits(minCount, scanAsManyAsPossible, canHaveSeparators) { + let valueChars = []; + let allowSeparator = false; + while (valueChars.length < minCount || scanAsManyAsPossible) { + let ch = charCodeUnchecked(pos); + if (canHaveSeparators && ch === CharacterCodes._) { + tokenFlags |= TokenFlags.ContainsSeparator; + if (allowSeparator) { + allowSeparator = false; + } + pos++; + continue; + } + allowSeparator = canHaveSeparators; + if (ch >= CharacterCodes.A && ch <= CharacterCodes.F) { + ch += CharacterCodes.a - CharacterCodes.A; + } + else if (!((ch >= CharacterCodes._0 && ch <= CharacterCodes._9) || + (ch >= CharacterCodes.a && ch <= CharacterCodes.f))) { + break; + } + valueChars.push(ch); + pos++; + } + if (valueChars.length < minCount) { + valueChars = []; + } + return String.fromCharCode(...valueChars); + } + function scanString(jsxAttributeString = false) { + const quote = charCodeUnchecked(pos); + pos++; + let result = ""; + let start = pos; + while (true) { + if (pos >= end) { + result += text.substring(start, pos); + tokenFlags |= TokenFlags.Unterminated; + break; + } + const ch = charCodeUnchecked(pos); + if (ch === quote) { + result += text.substring(start, pos); + pos++; + break; + } + if (ch === CharacterCodes.backslash && !jsxAttributeString) { + result += text.substring(start, pos); + result += scanEscapeSequence(EscapeSequenceScanningFlags.String | EscapeSequenceScanningFlags.ReportErrors); + start = pos; + continue; + } + if ((ch === CharacterCodes.lineFeed || ch === CharacterCodes.carriageReturn) && !jsxAttributeString) { + result += text.substring(start, pos); + tokenFlags |= TokenFlags.Unterminated; + break; + } + pos++; + } + return result; + } + function scanTemplateAndSetTokenValue(shouldEmitInvalidEscapeError) { + const startedWithBacktick = charCodeUnchecked(pos) === CharacterCodes.backtick; + pos++; + let start = pos; + let contents = ""; + let resultingToken; + while (true) { + if (pos >= end) { + contents += text.substring(start, pos); + tokenFlags |= TokenFlags.Unterminated; + resultingToken = startedWithBacktick ? SyntaxKind.NoSubstitutionTemplateLiteral : SyntaxKind.TemplateTail; + break; + } + const currChar = charCodeUnchecked(pos); + if (currChar === CharacterCodes.backtick) { + contents += text.substring(start, pos); + pos++; + resultingToken = startedWithBacktick ? SyntaxKind.NoSubstitutionTemplateLiteral : SyntaxKind.TemplateTail; + break; + } + if (currChar === CharacterCodes.$ && pos + 1 < end && charCodeUnchecked(pos + 1) === CharacterCodes.openBrace) { + contents += text.substring(start, pos); + pos += 2; + resultingToken = startedWithBacktick ? SyntaxKind.TemplateHead : SyntaxKind.TemplateMiddle; + break; + } + if (currChar === CharacterCodes.backslash) { + contents += text.substring(start, pos); + contents += scanEscapeSequence(EscapeSequenceScanningFlags.String | (shouldEmitInvalidEscapeError ? EscapeSequenceScanningFlags.ReportErrors : 0)); + start = pos; + continue; + } + if (currChar === CharacterCodes.carriageReturn) { + contents += text.substring(start, pos); + pos++; + if (pos < end && charCodeUnchecked(pos) === CharacterCodes.lineFeed) { + pos++; + } + contents += "\n"; + start = pos; + continue; + } + pos++; + } + tokenValue = contents; + return resultingToken; + } + function scanEscapeSequence(flags) { + const start = pos; + pos++; + if (pos >= end) { + return ""; + } + const ch = charCodeUnchecked(pos); + pos++; + switch (ch) { + case CharacterCodes._0: + if (pos >= end || !isDigit(charCodeUnchecked(pos))) { + return "\0"; + } + // falls through + case CharacterCodes._1: + case CharacterCodes._2: + case CharacterCodes._3: + if (pos < end && isOctalDigit(charCodeUnchecked(pos))) { + pos++; + } + // falls through + case CharacterCodes._4: + case CharacterCodes._5: + case CharacterCodes._6: + case CharacterCodes._7: + if (pos < end && isOctalDigit(charCodeUnchecked(pos))) { + pos++; + } + tokenFlags |= TokenFlags.ContainsInvalidEscape; + if (flags & EscapeSequenceScanningFlags.ReportInvalidEscapeErrors) { + const code = parseInt(text.substring(start + 1, pos), 8); + return String.fromCharCode(code); + } + return text.substring(start, pos); + case CharacterCodes._8: + case CharacterCodes._9: + tokenFlags |= TokenFlags.ContainsInvalidEscape; + if (flags & EscapeSequenceScanningFlags.ReportInvalidEscapeErrors) { + return String.fromCharCode(ch); + } + return text.substring(start, pos); + case CharacterCodes.b: + return "\b"; + case CharacterCodes.t: + return "\t"; + case CharacterCodes.n: + return "\n"; + case CharacterCodes.v: + return "\v"; + case CharacterCodes.f: + return "\f"; + case CharacterCodes.r: + return "\r"; + case CharacterCodes.singleQuote: + return "'"; + case CharacterCodes.doubleQuote: + return '"'; + case CharacterCodes.u: + if (pos < end && charCodeUnchecked(pos) === CharacterCodes.openBrace) { + pos -= 2; + const result = scanExtendedUnicodeEscape(); + if (!(flags & EscapeSequenceScanningFlags.AllowExtendedUnicodeEscape)) { + tokenFlags |= TokenFlags.ContainsInvalidEscape; + } + return result; + } + // '\uDDDD' + for (; pos < start + 6; pos++) { + if (!(pos < end && isHexDigit(charCodeUnchecked(pos)))) { + tokenFlags |= TokenFlags.ContainsInvalidEscape; + return text.substring(start, pos); + } + } + tokenFlags |= TokenFlags.UnicodeEscape; + { + const escapedValue = parseInt(text.substring(start + 2, pos), 16); + const escapedValueString = String.fromCharCode(escapedValue); + if (flags & EscapeSequenceScanningFlags.AnyUnicodeMode && escapedValue >= 0xD800 && escapedValue <= 0xDBFF && + pos + 6 < end && text.substring(pos, pos + 2) === "\\u" && charCodeUnchecked(pos + 2) !== CharacterCodes.openBrace) { + const nextStart = pos; + let nextPos = pos + 2; + for (; nextPos < nextStart + 6; nextPos++) { + if (!isHexDigit(charCodeUnchecked(nextPos))) { + return escapedValueString; + } + } + const nextEscapedValue = parseInt(text.substring(nextStart + 2, nextPos), 16); + if (nextEscapedValue >= 0xDC00 && nextEscapedValue <= 0xDFFF) { + pos = nextPos; + return escapedValueString + String.fromCharCode(nextEscapedValue); + } + } + return escapedValueString; + } + case CharacterCodes.x: + for (; pos < start + 4; pos++) { + if (!(pos < end && isHexDigit(charCodeUnchecked(pos)))) { + tokenFlags |= TokenFlags.ContainsInvalidEscape; + return text.substring(start, pos); + } + } + tokenFlags |= TokenFlags.HexEscape; + return String.fromCharCode(parseInt(text.substring(start + 2, pos), 16)); + case CharacterCodes.carriageReturn: + if (pos < end && charCodeUnchecked(pos) === CharacterCodes.lineFeed) { + pos++; + } + // falls through + case CharacterCodes.lineFeed: + case CharacterCodes.lineSeparator: + case CharacterCodes.paragraphSeparator: + return ""; + default: + return String.fromCharCode(ch); + } + } + function scanExtendedUnicodeEscape() { + const start = pos; + pos += 3; + const escapedValueString = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ false); + const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; + let isInvalidExtendedEscape = false; + if (escapedValue < 0) { + isInvalidExtendedEscape = true; + } + else if (escapedValue > 0x10FFFF) { + isInvalidExtendedEscape = true; + } + if (pos >= end) { + isInvalidExtendedEscape = true; + } + else if (charCodeUnchecked(pos) === CharacterCodes.closeBrace) { + pos++; + } + else { + isInvalidExtendedEscape = true; + } + if (isInvalidExtendedEscape) { + tokenFlags |= TokenFlags.ContainsInvalidEscape; + return text.substring(start, pos); + } + tokenFlags |= TokenFlags.ExtendedUnicodeEscape; + return utf16EncodeAsString(escapedValue); + } + function peekUnicodeEscape() { + if (pos + 5 < end && charCodeUnchecked(pos + 1) === CharacterCodes.u) { + const start = pos; + pos += 2; + const value = scanExactNumberOfHexDigits(4, /*canHaveSeparators*/ false); + pos = start; + return value; + } + return -1; + } + function peekExtendedUnicodeEscape() { + if (codePointUnchecked(pos + 1) === CharacterCodes.u && codePointUnchecked(pos + 2) === CharacterCodes.openBrace) { + const start = pos; + pos += 3; + const escapedValueString = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ false); + const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; + pos = start; + return escapedValue; + } + return -1; + } + function scanIdentifierParts() { + let result = ""; + let start = pos; + while (pos < end) { + let ch = codePointUnchecked(pos); + if (isIdentifierPart(ch)) { + pos += charSize(ch); + } + else if (ch === CharacterCodes.backslash) { + ch = peekExtendedUnicodeEscape(); + if (ch >= 0 && isIdentifierPart(ch)) { + result += scanExtendedUnicodeEscape(); + start = pos; + continue; + } + ch = peekUnicodeEscape(); + if (!(ch >= 0 && isIdentifierPart(ch))) { + break; + } + tokenFlags |= TokenFlags.UnicodeEscape; + result += text.substring(start, pos); + result += utf16EncodeAsString(ch); + pos += 6; + start = pos; + } + else { + break; + } + } + result += text.substring(start, pos); + return result; + } + function getIdentifierToken() { + const len = tokenValue.length; + if (len >= 2 && len <= 12) { + const ch = tokenValue.charCodeAt(0); + if (ch >= CharacterCodes.a && ch <= CharacterCodes.z) { + const keyword = textToKeyword.get(tokenValue); + if (keyword !== undefined) { + return token = keyword; + } + } + } + return token = SyntaxKind.Identifier; + } + function scanBinaryOrOctalDigits(base) { + let value = ""; + let separatorAllowed = false; + let isPreviousTokenSeparator = false; + while (true) { + const ch = charCodeUnchecked(pos); + if (ch === CharacterCodes._) { + tokenFlags |= TokenFlags.ContainsSeparator; + if (separatorAllowed) { + separatorAllowed = false; + isPreviousTokenSeparator = true; + } + pos++; + continue; + } + separatorAllowed = true; + if (!isDigit(ch) || ch - CharacterCodes._0 >= base) { + break; + } + value += text[pos]; + pos++; + isPreviousTokenSeparator = false; + } + return value; + } + function checkBigIntSuffix() { + if (charCodeUnchecked(pos) === CharacterCodes.n) { + tokenValue += "n"; + if (tokenFlags & TokenFlags.BinaryOrOctalSpecifier) { + tokenValue = parsePseudoBigInt(tokenValue) + "n"; + } + pos++; + return SyntaxKind.BigIntLiteral; + } + else { + const numericValue = tokenFlags & TokenFlags.BinarySpecifier + ? parseInt(tokenValue.slice(2), 2) + : tokenFlags & TokenFlags.OctalSpecifier + ? parseInt(tokenValue.slice(2), 8) + : +tokenValue; + tokenValue = "" + numericValue; + return SyntaxKind.NumericLiteral; + } + } + function scan() { + fullStartPos = pos; + tokenFlags = TokenFlags.None; + while (true) { + tokenStart = pos; + if (pos >= end) { + return token = SyntaxKind.EndOfFile; + } + const ch = codePointUnchecked(pos); + if (pos === 0) { + if (ch === CharacterCodes.hash && isShebangTrivia(text, pos)) { + pos = scanShebangTrivia(text, pos); + if (skipTrivia) { + continue; + } + else { + return token = SyntaxKind.Unknown; + } + } + } + switch (ch) { + case CharacterCodes.lineFeed: + case CharacterCodes.carriageReturn: + tokenFlags |= TokenFlags.PrecedingLineBreak; + if (skipTrivia) { + pos++; + continue; + } + else { + if (ch === CharacterCodes.carriageReturn && pos + 1 < end && charCodeUnchecked(pos + 1) === CharacterCodes.lineFeed) { + pos += 2; + } + else { + pos++; + } + return token = SyntaxKind.NewLineTrivia; + } + case CharacterCodes.tab: + case CharacterCodes.verticalTab: + case CharacterCodes.formFeed: + case CharacterCodes.space: + case CharacterCodes.nonBreakingSpace: + case CharacterCodes.ogham: + case CharacterCodes.enQuad: + case CharacterCodes.emQuad: + case CharacterCodes.enSpace: + case CharacterCodes.emSpace: + case CharacterCodes.threePerEmSpace: + case CharacterCodes.fourPerEmSpace: + case CharacterCodes.sixPerEmSpace: + case CharacterCodes.figureSpace: + case CharacterCodes.punctuationSpace: + case CharacterCodes.thinSpace: + case CharacterCodes.hairSpace: + case CharacterCodes.zeroWidthSpace: + case CharacterCodes.narrowNoBreakSpace: + case CharacterCodes.mathematicalSpace: + case CharacterCodes.ideographicSpace: + case CharacterCodes.byteOrderMark: + if (skipTrivia) { + pos++; + continue; + } + else { + while (pos < end && isWhiteSpaceSingleLine(charCodeUnchecked(pos))) { + pos++; + } + return token = SyntaxKind.WhitespaceTrivia; + } + case CharacterCodes.exclamation: + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.ExclamationEqualsEqualsToken; + } + return pos += 2, token = SyntaxKind.ExclamationEqualsToken; + } + pos++; + return token = SyntaxKind.ExclamationToken; + case CharacterCodes.doubleQuote: + case CharacterCodes.singleQuote: + tokenValue = scanString(); + return token = SyntaxKind.StringLiteral; + case CharacterCodes.backtick: + return token = scanTemplateAndSetTokenValue(/*shouldEmitInvalidEscapeError*/ false); + case CharacterCodes.percent: + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.PercentEqualsToken; + } + pos++; + return token = SyntaxKind.PercentToken; + case CharacterCodes.ampersand: + if (charCodeUnchecked(pos + 1) === CharacterCodes.ampersand) { + if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.AmpersandAmpersandEqualsToken; + } + return pos += 2, token = SyntaxKind.AmpersandAmpersandToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.AmpersandEqualsToken; + } + pos++; + return token = SyntaxKind.AmpersandToken; + case CharacterCodes.openParen: + pos++; + return token = SyntaxKind.OpenParenToken; + case CharacterCodes.closeParen: + pos++; + return token = SyntaxKind.CloseParenToken; + case CharacterCodes.asterisk: + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.AsteriskEqualsToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.asterisk) { + if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.AsteriskAsteriskEqualsToken; + } + return pos += 2, token = SyntaxKind.AsteriskAsteriskToken; + } + pos++; + if (skipJsDocLeadingAsterisks && + (tokenFlags & TokenFlags.PrecedingJSDocLeadingAsterisks) === 0 && + (tokenFlags & TokenFlags.PrecedingLineBreak)) { + tokenFlags |= TokenFlags.PrecedingJSDocLeadingAsterisks; + continue; + } + return token = SyntaxKind.AsteriskToken; + case CharacterCodes.plus: + if (charCodeUnchecked(pos + 1) === CharacterCodes.plus) { + return pos += 2, token = SyntaxKind.PlusPlusToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.PlusEqualsToken; + } + pos++; + return token = SyntaxKind.PlusToken; + case CharacterCodes.comma: + pos++; + return token = SyntaxKind.CommaToken; + case CharacterCodes.minus: + if (charCodeUnchecked(pos + 1) === CharacterCodes.minus) { + return pos += 2, token = SyntaxKind.MinusMinusToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.MinusEqualsToken; + } + pos++; + return token = SyntaxKind.MinusToken; + case CharacterCodes.dot: + if (isDigit(charCodeUnchecked(pos + 1))) { + scanNumber(); + return token = SyntaxKind.NumericLiteral; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.dot && charCodeUnchecked(pos + 2) === CharacterCodes.dot) { + return pos += 3, token = SyntaxKind.DotDotDotToken; + } + pos++; + return token = SyntaxKind.DotToken; + case CharacterCodes.slash: + // Single-line comment + if (charCodeUnchecked(pos + 1) === CharacterCodes.slash) { + pos += 2; + while (pos < end) { + if (isLineBreak(charCodeUnchecked(pos))) { + break; + } + pos++; + } + commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(tokenStart, pos), commentDirectiveRegExSingleLine, tokenStart); + if (skipTrivia) { + continue; + } + else { + return token = SyntaxKind.SingleLineCommentTrivia; + } + } + // Multi-line comment + if (charCodeUnchecked(pos + 1) === CharacterCodes.asterisk) { + pos += 2; + const isJSDoc = charCodeUnchecked(pos) === CharacterCodes.asterisk && charCodeUnchecked(pos + 1) !== CharacterCodes.slash; + let commentClosed = false; + let lastLineStart = tokenStart; + while (pos < end) { + const ch = charCodeUnchecked(pos); + if (ch === CharacterCodes.asterisk && charCodeUnchecked(pos + 1) === CharacterCodes.slash) { + pos += 2; + commentClosed = true; + break; + } + pos++; + if (isLineBreak(ch)) { + lastLineStart = pos; + tokenFlags |= TokenFlags.PrecedingLineBreak; + } + } + if (isJSDoc) { + tokenFlags |= TokenFlags.PrecedingJSDocComment; + tokenFlags = scanJSDocCommentForTags(text.slice(tokenStart, pos), tokenFlags); + } + commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart); + if (skipTrivia) { + continue; + } + else { + if (!commentClosed) { + tokenFlags |= TokenFlags.Unterminated; + } + return token = SyntaxKind.MultiLineCommentTrivia; + } + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.SlashEqualsToken; + } + pos++; + return token = SyntaxKind.SlashToken; + case CharacterCodes._0: + if (pos + 2 < end && (charCodeUnchecked(pos + 1) === CharacterCodes.X || charCodeUnchecked(pos + 1) === CharacterCodes.x)) { + pos += 2; + tokenValue = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ true); + if (!tokenValue) { + tokenValue = "0"; + } + tokenValue = "0x" + tokenValue; + tokenFlags |= TokenFlags.HexSpecifier; + return token = checkBigIntSuffix(); + } + else if (pos + 2 < end && (charCodeUnchecked(pos + 1) === CharacterCodes.B || charCodeUnchecked(pos + 1) === CharacterCodes.b)) { + pos += 2; + tokenValue = scanBinaryOrOctalDigits(2); + if (!tokenValue) { + tokenValue = "0"; + } + tokenValue = "0b" + tokenValue; + tokenFlags |= TokenFlags.BinarySpecifier; + return token = checkBigIntSuffix(); + } + else if (pos + 2 < end && (charCodeUnchecked(pos + 1) === CharacterCodes.O || charCodeUnchecked(pos + 1) === CharacterCodes.o)) { + pos += 2; + tokenValue = scanBinaryOrOctalDigits(8); + if (!tokenValue) { + tokenValue = "0"; + } + tokenValue = "0o" + tokenValue; + tokenFlags |= TokenFlags.OctalSpecifier; + return token = checkBigIntSuffix(); + } + // falls through + case CharacterCodes._1: + case CharacterCodes._2: + case CharacterCodes._3: + case CharacterCodes._4: + case CharacterCodes._5: + case CharacterCodes._6: + case CharacterCodes._7: + case CharacterCodes._8: + case CharacterCodes._9: + return token = scanNumber(); + case CharacterCodes.colon: + pos++; + return token = SyntaxKind.ColonToken; + case CharacterCodes.semicolon: + pos++; + return token = SyntaxKind.SemicolonToken; + case CharacterCodes.lessThan: + if (isConflictMarkerTrivia(text, pos)) { + pos = scanConflictMarkerTrivia(text, pos); + if (skipTrivia) { + continue; + } + else { + return token = SyntaxKind.ConflictMarkerTrivia; + } + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.lessThan) { + if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.LessThanLessThanEqualsToken; + } + return pos += 2, token = SyntaxKind.LessThanLessThanToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.LessThanEqualsToken; + } + if (languageVariant === LanguageVariant.JSX && + charCodeUnchecked(pos + 1) === CharacterCodes.slash && + charCodeUnchecked(pos + 2) !== CharacterCodes.asterisk) { + return pos += 2, token = SyntaxKind.LessThanSlashToken; + } + pos++; + return token = SyntaxKind.LessThanToken; + case CharacterCodes.equals: + if (isConflictMarkerTrivia(text, pos)) { + pos = scanConflictMarkerTrivia(text, pos); + if (skipTrivia) { + continue; + } + else { + return token = SyntaxKind.ConflictMarkerTrivia; + } + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.EqualsEqualsEqualsToken; + } + return pos += 2, token = SyntaxKind.EqualsEqualsToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.greaterThan) { + return pos += 2, token = SyntaxKind.EqualsGreaterThanToken; + } + pos++; + return token = SyntaxKind.EqualsToken; + case CharacterCodes.greaterThan: + if (isConflictMarkerTrivia(text, pos)) { + pos = scanConflictMarkerTrivia(text, pos); + if (skipTrivia) { + continue; + } + else { + return token = SyntaxKind.ConflictMarkerTrivia; + } + } + pos++; + return token = SyntaxKind.GreaterThanToken; + case CharacterCodes.question: + if (charCodeUnchecked(pos + 1) === CharacterCodes.dot && !isDigit(charCodeUnchecked(pos + 2))) { + return pos += 2, token = SyntaxKind.QuestionDotToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.question) { + if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.QuestionQuestionEqualsToken; + } + return pos += 2, token = SyntaxKind.QuestionQuestionToken; + } + pos++; + return token = SyntaxKind.QuestionToken; + case CharacterCodes.openBracket: + pos++; + return token = SyntaxKind.OpenBracketToken; + case CharacterCodes.closeBracket: + pos++; + return token = SyntaxKind.CloseBracketToken; + case CharacterCodes.caret: + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.CaretEqualsToken; + } + pos++; + return token = SyntaxKind.CaretToken; + case CharacterCodes.openBrace: + pos++; + return token = SyntaxKind.OpenBraceToken; + case CharacterCodes.bar: + if (isConflictMarkerTrivia(text, pos)) { + pos = scanConflictMarkerTrivia(text, pos); + if (skipTrivia) { + continue; + } + else { + return token = SyntaxKind.ConflictMarkerTrivia; + } + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.bar) { + if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.BarBarEqualsToken; + } + return pos += 2, token = SyntaxKind.BarBarToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.BarEqualsToken; + } + pos++; + return token = SyntaxKind.BarToken; + case CharacterCodes.closeBrace: + pos++; + return token = SyntaxKind.CloseBraceToken; + case CharacterCodes.tilde: + pos++; + return token = SyntaxKind.TildeToken; + case CharacterCodes.at: + pos++; + return token = SyntaxKind.AtToken; + case CharacterCodes.backslash: { + const extendedCookedChar = peekExtendedUnicodeEscape(); + if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar)) { + tokenValue = scanExtendedUnicodeEscape() + scanIdentifierParts(); + return token = getIdentifierToken(); + } + const cookedChar = peekUnicodeEscape(); + if (cookedChar >= 0 && isIdentifierStart(cookedChar)) { + pos += 6; + tokenFlags |= TokenFlags.UnicodeEscape; + tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); + return token = getIdentifierToken(); + } + pos++; + return token = SyntaxKind.Unknown; + } + case CharacterCodes.hash: + if (pos !== 0 && text[pos + 1] === "!") { + pos++; + return token = SyntaxKind.Unknown; + } + { + const charAfterHash = codePointUnchecked(pos + 1); + if (charAfterHash === CharacterCodes.backslash) { + pos++; + const extendedCookedChar = peekExtendedUnicodeEscape(); + if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar)) { + tokenValue = "#" + scanExtendedUnicodeEscape() + scanIdentifierParts(); + return token = SyntaxKind.PrivateIdentifier; + } + const cookedChar = peekUnicodeEscape(); + if (cookedChar >= 0 && isIdentifierStart(cookedChar)) { + pos += 6; + tokenFlags |= TokenFlags.UnicodeEscape; + tokenValue = "#" + String.fromCharCode(cookedChar) + scanIdentifierParts(); + return token = SyntaxKind.PrivateIdentifier; + } + pos--; + } + if (isIdentifierStart(charAfterHash)) { + pos++; + scanIdentifier(charAfterHash); + } + else { + tokenValue = "#"; + } + return token = SyntaxKind.PrivateIdentifier; + } + case CharacterCodes.replacementCharacter: + pos = end; + return token = SyntaxKind.NonTextFileMarkerTrivia; + default: { + const identifierKind = scanIdentifier(ch); + if (identifierKind) { + return token = identifierKind; + } + else if (isWhiteSpaceSingleLine(ch)) { + pos += charSize(ch); + continue; + } + else if (isLineBreak(ch)) { + tokenFlags |= TokenFlags.PrecedingLineBreak; + pos += charSize(ch); + continue; + } + const size = charSize(ch); + pos += size; + return token = SyntaxKind.Unknown; + } + } + } + } + function reScanInvalidIdentifier() { + pos = tokenStart = fullStartPos; + tokenFlags = 0; + const ch = codePointUnchecked(pos); + const identifierKind = scanIdentifier(ch); + if (identifierKind) { + return token = identifierKind; + } + pos += charSize(ch); + return token; // Still `SyntaxKind.Unknown` + } + function scanIdentifier(startCharacter) { + let ch = startCharacter; + if (isIdentifierStart(ch)) { + pos += charSize(ch); + while (pos < end && isIdentifierPart(ch = codePointUnchecked(pos))) + pos += charSize(ch); + tokenValue = text.substring(tokenStart, pos); + if (ch === CharacterCodes.backslash) { + tokenValue += scanIdentifierParts(); + } + return getIdentifierToken(); + } + } + function reScanGreaterToken() { + if (token === SyntaxKind.GreaterThanToken) { + if (charCodeUnchecked(pos) === CharacterCodes.greaterThan) { + if (charCodeUnchecked(pos + 1) === CharacterCodes.greaterThan) { + if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken; + } + return pos += 2, token = SyntaxKind.GreaterThanGreaterThanGreaterThanToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.GreaterThanGreaterThanEqualsToken; + } + pos++; + return token = SyntaxKind.GreaterThanGreaterThanToken; + } + if (charCodeUnchecked(pos) === CharacterCodes.equals) { + pos++; + return token = SyntaxKind.GreaterThanEqualsToken; + } + } + return token; + } + function reScanAsteriskEqualsToken() { + pos = tokenStart + 1; + return token = SyntaxKind.EqualsToken; + } + function reScanSlashToken() { + if (token === SyntaxKind.SlashToken || token === SyntaxKind.SlashEqualsToken) { + const startOfRegExpBody = tokenStart + 1; + pos = startOfRegExpBody; + let inEscape = false; + let inCharacterClass = false; + while (true) { + const ch = charCodeChecked(pos); + if (ch === CharacterCodes.EOF || isLineBreak(ch)) { + tokenFlags |= TokenFlags.Unterminated; + break; + } + if (inEscape) { + inEscape = false; + } + else if (ch === CharacterCodes.slash && !inCharacterClass) { + break; + } + else if (ch === CharacterCodes.openBracket) { + inCharacterClass = true; + } + else if (ch === CharacterCodes.backslash) { + inEscape = true; + } + else if (ch === CharacterCodes.closeBracket) { + inCharacterClass = false; + } + pos++; + } + if (tokenFlags & TokenFlags.Unterminated) { + // Find best recovery position + pos = startOfRegExpBody; + inEscape = false; + let characterClassDepth = 0; + let inDecimalQuantifier = false; + let groupDepth = 0; + while (pos < end && !isLineBreak(charCodeUnchecked(pos))) { + const ch = charCodeUnchecked(pos); + if (inEscape) { + inEscape = false; + } + else if (ch === CharacterCodes.backslash) { + inEscape = true; + } + else if (ch === CharacterCodes.openBracket) { + characterClassDepth++; + } + else if (ch === CharacterCodes.closeBracket && characterClassDepth) { + characterClassDepth--; + } + else if (!characterClassDepth) { + if (ch === CharacterCodes.openBrace) { + inDecimalQuantifier = true; + } + else if (ch === CharacterCodes.closeBrace && inDecimalQuantifier) { + inDecimalQuantifier = false; + } + else if (!inDecimalQuantifier) { + if (ch === CharacterCodes.openParen) { + groupDepth++; + } + else if (ch === CharacterCodes.closeParen && groupDepth) { + groupDepth--; + } + else if (ch === CharacterCodes.closeParen || ch === CharacterCodes.closeBracket || ch === CharacterCodes.closeBrace) { + break; + } + } + } + pos++; + } + while (isWhiteSpaceLike(charCodeChecked(pos - 1)) || charCodeChecked(pos - 1) === CharacterCodes.semicolon) + pos--; + } + else { + pos++; + let regExpFlags = RegularExpressionFlags.None; + while (true) { + const ch = codePointChecked(pos); + if (ch === CharacterCodes.EOF || !isIdentifierPart(ch)) { + break; + } + const size = charSize(ch); + const flag = characterCodeToRegularExpressionFlag(ch); + if (flag !== undefined) { + regExpFlags |= flag; + } + pos += size; + } + } + tokenValue = text.substring(tokenStart, pos); + token = SyntaxKind.RegularExpressionLiteral; + } + return token; + } + function appendIfCommentDirective(commentDirectives, text, commentDirectiveRegEx, lineStart) { + const type = getDirectiveFromComment(text.trimStart(), commentDirectiveRegEx); + if (type === undefined) { + return commentDirectives; + } + if (!commentDirectives) { + commentDirectives = []; + } + commentDirectives.push({ + range: { pos: lineStart, end: pos }, + type, + }); + return commentDirectives; + } + function getDirectiveFromComment(text, commentDirectiveRegEx) { + const match = commentDirectiveRegEx.exec(text); + if (!match) { + return undefined; + } + switch (match[1]) { + case "ts-expect-error": + return CommentDirectiveType.ExpectError; + case "ts-ignore": + return CommentDirectiveType.Ignore; + } + return undefined; + } + function reScanTemplateToken(isTaggedTemplate) { + pos = tokenStart; + return token = scanTemplateAndSetTokenValue(!isTaggedTemplate); + } + function reScanTemplateHeadOrNoSubstitutionTemplate() { + pos = tokenStart; + return token = scanTemplateAndSetTokenValue(/*shouldEmitInvalidEscapeError*/ true); + } + function reScanJsxToken(allowMultilineJsxText = true) { + pos = tokenStart = fullStartPos; + return token = scanJsxToken(allowMultilineJsxText); + } + function reScanLessThanToken() { + if (token === SyntaxKind.LessThanLessThanToken) { + pos = tokenStart + 1; + return token = SyntaxKind.LessThanToken; + } + return token; + } + function reScanHashToken() { + if (token === SyntaxKind.PrivateIdentifier) { + pos = tokenStart + 1; + return token = SyntaxKind.HashToken; + } + return token; + } + function reScanQuestionToken() { + pos = tokenStart + 1; + return token = SyntaxKind.QuestionToken; + } + function scanJsxToken(allowMultilineJsxText = true) { + fullStartPos = tokenStart = pos; + if (pos >= end) { + return token = SyntaxKind.EndOfFile; + } + let char = charCodeUnchecked(pos); + if (char === CharacterCodes.lessThan) { + if (charCodeUnchecked(pos + 1) === CharacterCodes.slash) { + pos += 2; + return token = SyntaxKind.LessThanSlashToken; + } + pos++; + return token = SyntaxKind.LessThanToken; + } + if (char === CharacterCodes.openBrace) { + pos++; + return token = SyntaxKind.OpenBraceToken; + } + let firstNonWhitespace = 0; + while (pos < end) { + char = charCodeUnchecked(pos); + if (char === CharacterCodes.openBrace) { + break; + } + if (char === CharacterCodes.lessThan) { + if (isConflictMarkerTrivia(text, pos)) { + pos = scanConflictMarkerTrivia(text, pos); + return token = SyntaxKind.ConflictMarkerTrivia; + } + break; + } + if (isLineBreak(char) && firstNonWhitespace === 0) { + firstNonWhitespace = -1; + } + else if (!allowMultilineJsxText && isLineBreak(char) && firstNonWhitespace > 0) { + break; + } + else if (!isWhiteSpaceLike(char)) { + firstNonWhitespace = pos; + } + pos++; + } + tokenValue = text.substring(fullStartPos, pos); + return firstNonWhitespace === -1 ? SyntaxKind.JsxTextAllWhiteSpaces : SyntaxKind.JsxText; + } + function scanJsxIdentifier() { + if (tokenIsIdentifierOrKeyword(token)) { + while (pos < end) { + const ch = charCodeUnchecked(pos); + if (ch === CharacterCodes.minus) { + tokenValue += "-"; + pos++; + continue; + } + const oldPos = pos; + tokenValue += scanIdentifierParts(); + if (pos === oldPos) { + break; + } + } + return getIdentifierToken(); + } + return token; + } + function scanJsxAttributeValue() { + fullStartPos = pos; + switch (charCodeUnchecked(pos)) { + case CharacterCodes.doubleQuote: + case CharacterCodes.singleQuote: + tokenValue = scanString(/*jsxAttributeString*/ true); + return token = SyntaxKind.StringLiteral; + default: + return scan(); + } + } + function reScanJsxAttributeValue() { + pos = tokenStart = fullStartPos; + return scanJsxAttributeValue(); + } + function scanJSDocCommentTextToken(inBackticks) { + fullStartPos = tokenStart = pos; + tokenFlags = TokenFlags.None; + if (pos >= end) { + return token = SyntaxKind.EndOfFile; + } + for (let ch = charCodeUnchecked(pos); pos < end && (!isLineBreak(ch) && ch !== CharacterCodes.backtick); ch = codePointUnchecked(++pos)) { + if (!inBackticks) { + if (ch === CharacterCodes.openBrace) { + break; + } + else if (ch === CharacterCodes.at + && pos - 1 >= 0 && isWhiteSpaceSingleLine(charCodeUnchecked(pos - 1)) + && pos + 1 < end && isIdentifierStart(charCodeUnchecked(pos + 1))) { + break; + } + } + } + if (pos === tokenStart) { + return scanJsDocToken(); + } + tokenValue = text.substring(tokenStart, pos); + return token = SyntaxKind.JSDocCommentTextToken; + } + function scanJsDocToken() { + fullStartPos = tokenStart = pos; + tokenFlags = TokenFlags.None; + if (pos >= end) { + return token = SyntaxKind.EndOfFile; + } + const ch = codePointUnchecked(pos); + pos += charSize(ch); + switch (ch) { + case CharacterCodes.tab: + case CharacterCodes.verticalTab: + case CharacterCodes.formFeed: + case CharacterCodes.space: + while (pos < end && isWhiteSpaceSingleLine(charCodeUnchecked(pos))) { + pos++; + } + return token = SyntaxKind.WhitespaceTrivia; + case CharacterCodes.at: + return token = SyntaxKind.AtToken; + case CharacterCodes.carriageReturn: + if (charCodeUnchecked(pos) === CharacterCodes.lineFeed) { + pos++; + } + // falls through + case CharacterCodes.lineFeed: + tokenFlags |= TokenFlags.PrecedingLineBreak; + return token = SyntaxKind.NewLineTrivia; + case CharacterCodes.asterisk: + return token = SyntaxKind.AsteriskToken; + case CharacterCodes.openBrace: + return token = SyntaxKind.OpenBraceToken; + case CharacterCodes.closeBrace: + return token = SyntaxKind.CloseBraceToken; + case CharacterCodes.openBracket: + return token = SyntaxKind.OpenBracketToken; + case CharacterCodes.closeBracket: + return token = SyntaxKind.CloseBracketToken; + case CharacterCodes.openParen: + return token = SyntaxKind.OpenParenToken; + case CharacterCodes.closeParen: + return token = SyntaxKind.CloseParenToken; + case CharacterCodes.lessThan: + return token = SyntaxKind.LessThanToken; + case CharacterCodes.greaterThan: + return token = SyntaxKind.GreaterThanToken; + case CharacterCodes.equals: + return token = SyntaxKind.EqualsToken; + case CharacterCodes.comma: + return token = SyntaxKind.CommaToken; + case CharacterCodes.dot: + return token = SyntaxKind.DotToken; + case CharacterCodes.backtick: + return token = SyntaxKind.BacktickToken; + case CharacterCodes.hash: + return token = SyntaxKind.HashToken; + case CharacterCodes.backslash: + pos--; + { + const extendedCookedChar = peekExtendedUnicodeEscape(); + if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar)) { + tokenValue = scanExtendedUnicodeEscape() + scanIdentifierParts(); + return token = getIdentifierToken(); + } + const cookedChar = peekUnicodeEscape(); + if (cookedChar >= 0 && isIdentifierStart(cookedChar)) { + pos += 6; + tokenFlags |= TokenFlags.UnicodeEscape; + tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); + return token = getIdentifierToken(); + } + } + pos++; + return token = SyntaxKind.Unknown; + } + if (isIdentifierStart(ch)) { + let char = ch; + while (pos < end && isIdentifierPart(char = codePointUnchecked(pos)) || char === CharacterCodes.minus) + pos += charSize(char); + tokenValue = text.substring(tokenStart, pos); + if (char === CharacterCodes.backslash) { + tokenValue += scanIdentifierParts(); + } + return token = getIdentifierToken(); + } + else { + return token = SyntaxKind.Unknown; + } + } + function speculationHelper(callback, isLookahead) { + const savePos = pos; + const saveStartPos = fullStartPos; + const saveTokenPos = tokenStart; + const saveToken = token; + const saveTokenValue = tokenValue; + const saveTokenFlags = tokenFlags; + const result = callback(); + if (!result || isLookahead) { + pos = savePos; + fullStartPos = saveStartPos; + tokenStart = saveTokenPos; + token = saveToken; + tokenValue = saveTokenValue; + tokenFlags = saveTokenFlags; + } + return result; + } + function scanRange(start, length, callback) { + const saveEnd = end; + const savePos = pos; + const saveStartPos = fullStartPos; + const saveTokenPos = tokenStart; + const saveToken = token; + const saveTokenValue = tokenValue; + const saveTokenFlags = tokenFlags; + const saveErrorExpectations = commentDirectives; + setText(text, start, length); + const result = callback(); + end = saveEnd; + pos = savePos; + fullStartPos = saveStartPos; + tokenStart = saveTokenPos; + token = saveToken; + tokenValue = saveTokenValue; + tokenFlags = saveTokenFlags; + commentDirectives = saveErrorExpectations; + return result; + } + function lookAhead(callback) { + return speculationHelper(callback, /*isLookahead*/ true); + } + function tryScan(callback) { + return speculationHelper(callback, /*isLookahead*/ false); + } + function getText() { + return text; + } + function clearCommentDirectives() { + commentDirectives = undefined; + } + function setText(newText, start, length) { + text = newText || ""; + end = length === undefined ? text.length : start + length; + resetTokenState(start || 0); + } + function setLanguageVariant(variant) { + languageVariant = variant; + } + function resetTokenState(position) { + pos = position; + fullStartPos = position; + tokenStart = position; + token = SyntaxKind.Unknown; + tokenValue = undefined; + tokenFlags = TokenFlags.None; + } + function setSkipJsDocLeadingAsterisks(skip) { + skipJsDocLeadingAsterisks += skip ? 1 : -1; + } +} +//# sourceMappingURL=scanner.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/scanner.js.map b/node_modules/typescript/dist/ast/scanner.js.map new file mode 100644 index 0000000..cbb1999 --- /dev/null +++ b/node_modules/typescript/dist/ast/scanner.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scanner.js","sourceRoot":"","sources":["../../src/ast/scanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB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kBAAkB,CAAC,OAAwB;QAChD,eAAe,GAAG,OAAO,CAAC;IAC9B,CAAC;IAED,SAAS,eAAe,CAAC,QAAgB;QACrC,GAAG,GAAG,QAAQ,CAAC;QACf,YAAY,GAAG,QAAQ,CAAC;QACxB,UAAU,GAAG,QAAQ,CAAC;QACtB,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC;QAC3B,UAAU,GAAG,SAAU,CAAC;QACxB,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC;IACjC,CAAC;IAED,SAAS,4BAA4B,CAAC,IAAa;QAC/C,yBAAyB,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/utils.d.ts b/node_modules/typescript/dist/ast/utils.d.ts new file mode 100644 index 0000000..75e4cab --- /dev/null +++ b/node_modules/typescript/dist/ast/utils.d.ts @@ -0,0 +1,17 @@ +import { SyntaxKind } from "#enums/syntaxKind"; +import type { __String, SourceFile } from "./ast.ts"; +export declare function formatSyntaxKind(kind: SyntaxKind): string; +/** + * Remove one extra leading underscore from an identifier name, recovering the + * display form from its escaped {@link __String} key. + */ +export declare function unescapeLeadingUnderscores(identifier: __String): string; +/** + * Add an extra leading underscore to a display name that already begins with + * `__`, producing its escaped {@link __String} key. + */ +export declare function escapeLeadingUnderscores(identifier: string): __String; +export declare function tryCast(value: TIn | undefined, test: (value: TIn) => value is TOut): TOut | undefined; +export declare function cast(value: TIn | undefined, test: (value: TIn) => value is TOut): TOut; +export declare function cloneSourceFileData(sourceFile: SourceFile): Record; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/utils.d.ts.map b/node_modules/typescript/dist/ast/utils.d.ts.map new file mode 100644 index 0000000..875319b --- /dev/null +++ b/node_modules/typescript/dist/ast/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/ast/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EACR,QAAQ,EACR,UAAU,EACb,MAAM,UAAU,CAAC;AAiBlB,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAEzD;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,QAAQ,GAAG,MAAM,CAKvE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,CAIrE;AAED,wBAAgB,OAAO,CAAC,IAAI,SAAS,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,SAAS,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,SAAS,CAElI;AAED,wBAAgB,IAAI,CAAC,IAAI,SAAS,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,SAAS,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,KAAK,IAAI,IAAI,GAAG,IAAI,CAInH;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmBnF"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/utils.js b/node_modules/typescript/dist/ast/utils.js new file mode 100644 index 0000000..e0bd1ea --- /dev/null +++ b/node_modules/typescript/dist/ast/utils.js @@ -0,0 +1,67 @@ +import { CharacterCodes } from "#enums/characterCodes"; +import { SyntaxKind } from "#enums/syntaxKind"; +let syntaxKindNames; +function getSyntaxKindNames() { + if (!syntaxKindNames) { + syntaxKindNames = new Map(); + for (const name of Object.keys(SyntaxKind)) { + const val = SyntaxKind[name]; + if (typeof val === "number" && !syntaxKindNames.has(val)) { + syntaxKindNames.set(val, name); + } + } + syntaxKindNames.set(SyntaxKind.EndOfFile, "EndOfFileToken"); + } + return syntaxKindNames; +} +export function formatSyntaxKind(kind) { + return getSyntaxKindNames().get(kind) ?? `Unknown(${kind})`; +} +/** + * Remove one extra leading underscore from an identifier name, recovering the + * display form from its escaped {@link __String} key. + */ +export function unescapeLeadingUnderscores(identifier) { + const id = identifier; + return id.length >= 3 && id.charCodeAt(0) === CharacterCodes._ && id.charCodeAt(1) === CharacterCodes._ && id.charCodeAt(2) === CharacterCodes._ + ? id.slice(1) + : id; +} +/** + * Add an extra leading underscore to a display name that already begins with + * `__`, producing its escaped {@link __String} key. + */ +export function escapeLeadingUnderscores(identifier) { + return (identifier.length >= 2 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ + ? "_" + identifier + : identifier); +} +export function tryCast(value, test) { + return value !== undefined && test(value) ? value : undefined; +} +export function cast(value, test) { + if (value !== undefined && test(value)) + return value; + throw new Error(`Invalid cast. The supplied value ${value} did not pass the test '${test.name}'.`); +} +export function cloneSourceFileData(sourceFile) { + return { + statements: sourceFile.statements, + endOfFileToken: sourceFile.endOfFileToken, + text: sourceFile.text, + fileName: sourceFile.fileName, + path: sourceFile.path, + languageVariant: sourceFile.languageVariant, + scriptKind: sourceFile.scriptKind, + isDeclarationFile: sourceFile.isDeclarationFile, + referencedFiles: sourceFile.referencedFiles, + typeReferenceDirectives: sourceFile.typeReferenceDirectives, + libReferenceDirectives: sourceFile.libReferenceDirectives, + imports: sourceFile.imports, + moduleAugmentations: sourceFile.moduleAugmentations, + ambientModuleNames: sourceFile.ambientModuleNames, + externalModuleIndicator: sourceFile.externalModuleIndicator, + tokenCache: undefined, + }; +} +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/utils.js.map b/node_modules/typescript/dist/ast/utils.js.map new file mode 100644 index 0000000..0206293 --- /dev/null +++ b/node_modules/typescript/dist/ast/utils.js.map @@ -0,0 +1 @@ +{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B,EAAE,UAAU,CAAC,sBAAsB;QACzD,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,mBAAmB,EAAE,UAAU,CAAC,mBAAmB;QACnD,kBAAkB,EAAE,UAAU,CAAC,kBAAkB;QACjD,uBAAuB,EAAE,UAAU,CAAC,uBAAuB;QAC3D,UAAU,EAAE,SAAS;KACxB,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/visitor.d.ts b/node_modules/typescript/dist/ast/visitor.d.ts new file mode 100644 index 0000000..4f8f351 --- /dev/null +++ b/node_modules/typescript/dist/ast/visitor.d.ts @@ -0,0 +1,14 @@ +/** + * Hand-written visitor implementations for nodes with runtime-dependent + * child ordering. Generated code in visitor.generated.ts and factory.generated.ts + * delegates to these functions. + */ +import type { JSDocParameterOrPropertyTag, Node, NodeArray } from "./ast.ts"; +import type { Visitor } from "./visitor.generated.ts"; +export type { Visitor }; +export { visitEachChild, visitNode, visitNodes, visitNodesArray } from "./visitor.generated.ts"; +declare function forEachChildOfJSDocParameterOrPropertyTag(data: any, cbNode: (node: Node) => T, cbNodes: ((nodes: NodeArray) => T) | undefined): T | undefined; +export { forEachChildOfJSDocParameterOrPropertyTag as forEachChildOfJSDocParameterTag, forEachChildOfJSDocParameterOrPropertyTag as forEachChildOfJSDocPropertyTag }; +declare function visitEachChildOfJSDocParameterOrPropertyTag(node: JSDocParameterOrPropertyTag, visitor: Visitor): JSDocParameterOrPropertyTag; +export { visitEachChildOfJSDocParameterOrPropertyTag as visitEachChildOfJSDocParameterTag, visitEachChildOfJSDocParameterOrPropertyTag as visitEachChildOfJSDocPropertyTag }; +//# sourceMappingURL=visitor.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/visitor.d.ts.map b/node_modules/typescript/dist/ast/visitor.d.ts.map new file mode 100644 index 0000000..05cba32 --- /dev/null +++ b/node_modules/typescript/dist/ast/visitor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"visitor.d.ts","sourceRoot":"","sources":["../../src/ast/visitor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAER,2BAA2B,EAG3B,IAAI,EACJ,SAAS,EACZ,MAAM,UAAU,CAAC;AAUlB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAMtD,YAAY,EAAE,OAAO,EAAE,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAoBhG,iBAAS,yCAAyC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,SAAS,GAAG,CAAC,GAAG,SAAS,CAM/J;AAED,OAAO,EAAE,yCAAyC,IAAI,+BAA+B,EAAE,yCAAyC,IAAI,8BAA8B,EAAE,CAAC;AAIrK,iBAAS,2CAA2C,CAAC,IAAI,EAAE,2BAA2B,EAAE,OAAO,EAAE,OAAO,GAAG,2BAA2B,CAQrI;AAED,OAAO,EAAE,2CAA2C,IAAI,iCAAiC,EAAE,2CAA2C,IAAI,gCAAgC,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/visitor.generated.d.ts b/node_modules/typescript/dist/ast/visitor.generated.d.ts new file mode 100644 index 0000000..67313e5 --- /dev/null +++ b/node_modules/typescript/dist/ast/visitor.generated.d.ts @@ -0,0 +1,50 @@ +import type { Node, NodeArray } from "./ast.ts"; +/** + * A callback that receives a node and returns a visited node (or undefined to remove it). + */ +export type Visitor = (node: Node) => Node | undefined; +/** + * Visits a Node using the supplied visitor, possibly returning a new Node in its place. + * + * - If the input node is undefined, then the output is undefined. + * - If the visitor returns undefined, then the output is undefined. + * - If the output node is not undefined, then it will satisfy the test function. + * - In order to obtain a return type that is more specific than `Node`, a test + * function must be provided, and that function must be a type predicate. + * + * @param node The Node to visit. + * @param visitor The callback used to visit the Node. + * @param test A callback to execute to verify the Node is valid. + */ +export declare function visitNode(node: TIn, visitor: Visitor, test: (node: Node) => node is TOut): TOut | (TIn & undefined); +/** + * Visits a Node using the supplied visitor, possibly returning a new Node in its place. + * + * - If the input node is undefined, then the output is undefined. + * - If the visitor returns undefined, then the output is undefined. + * + * @param node The Node to visit. + * @param visitor The callback used to visit the Node. + * @param test An optional callback to execute to verify the Node is valid. + */ +export declare function visitNode(node: TIn, visitor: Visitor, test?: (node: Node) => boolean): Node | (TIn & undefined); +/** + * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. + * + * - If the input node array is undefined, the output is undefined. + * - If the visitor returns undefined for a node, that node is dropped from the result. + */ +export declare function visitNodes(nodes: NodeArray, visitor: Visitor): NodeArray; +export declare function visitNodes(nodes: NodeArray | undefined, visitor: Visitor): NodeArray | undefined; +export declare function visitNodesArray(nodes: readonly T[], visitor: Visitor): readonly T[]; +export declare function visitNodesArray(nodes: readonly T[] | undefined, visitor: Visitor): readonly T[] | undefined; +/** + * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. + * + * @param node The Node whose children will be visited. + * @param visitor The callback used to visit each child. + * @returns The original node if no children changed, or a new node with visited children. + */ +export declare function visitEachChild(node: T, visitor: Visitor): T; +export declare function visitEachChild(node: T | undefined, visitor: Visitor): T | undefined; +//# sourceMappingURL=visitor.generated.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/visitor.generated.d.ts.map b/node_modules/typescript/dist/ast/visitor.generated.d.ts.map new file mode 100644 index 0000000..d7f4d44 --- /dev/null +++ b/node_modules/typescript/dist/ast/visitor.generated.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"visitor.generated.d.ts","sourceRoot":"","sources":["../../src/ast/visitor.generated.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAwHR,IAAI,EACJ,SAAS,EAqDZ,MAAM,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E,GAAG,SAAS,CAAC;AAmB7H;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,CAAC,CAAC;AAC7E,wBAAgB,cAAc,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,CAAC,GAAG,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/visitor.generated.js b/node_modules/typescript/dist/ast/visitor.generated.js new file mode 100644 index 0000000..ad6528f --- /dev/null +++ b/node_modules/typescript/dist/ast/visitor.generated.js @@ -0,0 +1,978 @@ +// Code generated by _scripts/generate-ts-ast.ts. DO NOT EDIT. +import { SyntaxKind } from "#enums/syntaxKind"; +import { createNodeArray, updateArrayBindingPattern, updateArrayLiteralExpression, updateArrayTypeNode, updateArrowFunction, updateAsExpression, updateAwaitExpression, updateBinaryExpression, updateBindingElement, updateBlock, updateBreakStatement, updateCallExpression, updateCallSignatureDeclaration, updateCaseBlock, updateCaseClause, updateCatchClause, updateClassDeclaration, updateClassExpression, updateClassStaticBlockDeclaration, updateComputedPropertyName, updateConditionalExpression, updateConditionalTypeNode, updateConstructorDeclaration, updateConstructorTypeNode, updateConstructSignatureDeclaration, updateContinueStatement, updateDecorator, updateDefaultClause, updateDeleteExpression, updateDoStatement, updateElementAccessExpression, updateEnumDeclaration, updateEnumMember, updateExportAssignment, updateExportDeclaration, updateExportSpecifier, updateExpressionStatement, updateExpressionWithTypeArguments, updateExternalModuleReference, updateForInStatement, updateForOfStatement, updateForStatement, updateFunctionDeclaration, updateFunctionExpression, updateFunctionTypeNode, updateGetAccessorDeclaration, updateHeritageClause, updateIfStatement, updateImportAttribute, updateImportAttributes, updateImportClause, updateImportDeclaration, updateImportEqualsDeclaration, updateImportSpecifier, updateImportTypeNode, updateIndexedAccessTypeNode, updateIndexSignatureDeclaration, updateInferTypeNode, updateInterfaceDeclaration, updateIntersectionTypeNode, updateJSDoc, updateJSDocAugmentsTag, updateJSDocCallbackTag, updateJSDocDeprecatedTag, updateJSDocImplementsTag, updateJSDocImportTag, updateJSDocLink, updateJSDocLinkCode, updateJSDocLinkPlain, updateJSDocNameReference, updateJSDocNonNullableType, updateJSDocNullableType, updateJSDocOptionalType, updateJSDocOverloadTag, updateJSDocOverrideTag, updateJSDocPrivateTag, updateJSDocProtectedTag, updateJSDocPublicTag, updateJSDocReadonlyTag, updateJSDocReturnTag, updateJSDocSatisfiesTag, updateJSDocSeeTag, updateJSDocSignature, updateJSDocTemplateTag, updateJSDocThisTag, updateJSDocThrowsTag, updateJSDocTypedefTag, updateJSDocTypeExpression, updateJSDocTypeLiteral, updateJSDocTypeTag, updateJSDocUnknownTag, updateJSDocVariadicType, updateJsxAttribute, updateJsxAttributes, updateJsxClosingElement, updateJsxElement, updateJsxExpression, updateJsxFragment, updateJsxNamespacedName, updateJsxOpeningElement, updateJsxSelfClosingElement, updateJsxSpreadAttribute, updateLabeledStatement, updateLiteralTypeNode, updateMappedTypeNode, updateMetaProperty, updateMethodDeclaration, updateMethodSignatureDeclaration, updateMissingDeclaration, updateModuleBlock, updateModuleDeclaration, updateNamedExports, updateNamedImports, updateNamedTupleMember, updateNamespaceExport, updateNamespaceExportDeclaration, updateNamespaceImport, updateNewExpression, updateNonNullExpression, updateObjectBindingPattern, updateObjectLiteralExpression, updateOptionalTypeNode, updateParameterDeclaration, updateParenthesizedExpression, updateParenthesizedTypeNode, updatePartiallyEmittedExpression, updatePostfixUnaryExpression, updatePrefixUnaryExpression, updatePropertyAccessExpression, updatePropertyAssignment, updatePropertyDeclaration, updatePropertySignatureDeclaration, updateQualifiedName, updateRestTypeNode, updateReturnStatement, updateSatisfiesExpression, updateSetAccessorDeclaration, updateShorthandPropertyAssignment, updateSourceFile, updateSpreadAssignment, updateSpreadElement, updateSwitchStatement, updateSyntaxList, updateSyntheticExpression, updateSyntheticReferenceExpression, updateTaggedTemplateExpression, updateTemplateExpression, updateTemplateLiteralTypeNode, updateTemplateLiteralTypeSpan, updateTemplateSpan, updateThrowStatement, updateTryStatement, updateTupleTypeNode, updateTypeAliasDeclaration, updateTypeAssertion, updateTypeLiteralNode, updateTypeOfExpression, updateTypeOperatorNode, updateTypeParameterDeclaration, updateTypePredicateNode, updateTypeQueryNode, updateTypeReferenceNode, updateUnionTypeNode, updateVariableDeclaration, updateVariableDeclarationList, updateVariableStatement, updateVoidExpression, updateWhileStatement, updateWithStatement, updateYieldExpression, } from "./factory.generated.js"; +import { isAssertsKeyword, isAsteriskToken, isAwaitKeyword, isBinaryOperatorToken, isBindingName, isBlock, isCaseBlock, isCatchClause, isColonToken, isConciseBody, isDotDotDotToken, isEndOfFile, isEntityName, isEqualsGreaterThanToken, isEqualsToken, isExclamationToken, isExpression, isExpressionWithTypeArguments, isForInitializer, isFunctionBody, isIdentifier, isImportAttributeName, isImportAttributes, isImportClause, isJSDocFullName, isJsxAttributeName, isJsxAttributes, isJsxAttributeValue, isJsxClosingElement, isJsxClosingFragment, isJsxOpeningElement, isJsxOpeningFragment, isJsxTagNameExpression, isLeftHandSideExpression, isMemberName, isModuleBody, isModuleExportName, isModuleName, isModuleReference, isNamedExportBindings, isNamedImportBindings, isPropertyName, isQuestionDotToken, isQuestionOrExclamationToken, isQuestionOrPlusOrMinusToken, isQuestionToken, isReadonlyKeywordOrPlusOrMinusToken, isStatement, isTemplateHead, isTemplateLiteral, isTemplateMiddleOrTail, isTypeNode, isTypeParameterDeclaration, isTypePredicateParameterName, isVariableDeclaration, isVariableDeclarationList, } from "./is.js"; +import { visitEachChildOfJSDocParameterTag, visitEachChildOfJSDocPropertyTag, } from "./visitor.js"; +export function visitNode(node, visitor, test) { + if (node === undefined) + return undefined; + const visited = visitor(node); + if (visited !== undefined && test !== undefined && !test(visited)) { + throw new Error("Visited node failed test assertion."); + } + return visited; +} +export function visitNodes(nodes, visitor) { + if (nodes === undefined) + return undefined; + const updated = visitNodesArray(nodes, visitor); + if (updated === nodes) { + return nodes; + } + return createNodeArray(updated, nodes.pos, nodes.end); +} +export function visitNodesArray(nodes, visitor) { + if (nodes === undefined) + return undefined; + let updated; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + const visited = visitor(node); + if (updated) { + if (visited) + updated.push(visited); + } + else if (visited !== node) { + updated = []; + for (let j = 0; j < i; j++) + updated.push(nodes[j]); + if (visited) + updated.push(visited); + } + } + return updated ?? nodes; +} +export function visitEachChild(node, visitor) { + if (node === undefined) + return undefined; + const fn = visitEachChildTable[node.kind]; + return fn ? fn(node, visitor) : node; +} +const visitEachChildTable = { + [SyntaxKind.QualifiedName]: (node, visitor) => { + const _left = visitNode(node.left, visitor, isEntityName); + const _right = visitNode(node.right, visitor, isIdentifier); + return updateQualifiedName(node, _left, _right); + }, + [SyntaxKind.ComputedPropertyName]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateComputedPropertyName(node, _expression); + }, + [SyntaxKind.Decorator]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isLeftHandSideExpression); + return updateDecorator(node, _expression); + }, + [SyntaxKind.IfStatement]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _thenStatement = visitNode(node.thenStatement, visitor, isStatement); + const _elseStatement = visitNode(node.elseStatement, visitor, isStatement); + return updateIfStatement(node, _expression, _thenStatement, _elseStatement); + }, + [SyntaxKind.DoStatement]: (node, visitor) => { + const _statement = visitNode(node.statement, visitor, isStatement); + const _expression = visitNode(node.expression, visitor, isExpression); + return updateDoStatement(node, _statement, _expression); + }, + [SyntaxKind.WhileStatement]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _statement = visitNode(node.statement, visitor, isStatement); + return updateWhileStatement(node, _expression, _statement); + }, + [SyntaxKind.ForStatement]: (node, visitor) => { + const _initializer = visitNode(node.initializer, visitor, isForInitializer); + const _condition = visitNode(node.condition, visitor, isExpression); + const _incrementor = visitNode(node.incrementor, visitor, isExpression); + const _statement = visitNode(node.statement, visitor, isStatement); + return updateForStatement(node, _initializer, _condition, _incrementor, _statement); + }, + [SyntaxKind.BreakStatement]: (node, visitor) => { + const _label = visitNode(node.label, visitor, isIdentifier); + return updateBreakStatement(node, _label); + }, + [SyntaxKind.ContinueStatement]: (node, visitor) => { + const _label = visitNode(node.label, visitor, isIdentifier); + return updateContinueStatement(node, _label); + }, + [SyntaxKind.ReturnStatement]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateReturnStatement(node, _expression); + }, + [SyntaxKind.WithStatement]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _statement = visitNode(node.statement, visitor, isStatement); + return updateWithStatement(node, _expression, _statement); + }, + [SyntaxKind.SwitchStatement]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _caseBlock = visitNode(node.caseBlock, visitor, isCaseBlock); + return updateSwitchStatement(node, _expression, _caseBlock); + }, + [SyntaxKind.CaseBlock]: (node, visitor) => { + const _clauses = visitNodes(node.clauses, visitor); + return updateCaseBlock(node, _clauses); + }, + [SyntaxKind.ThrowStatement]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateThrowStatement(node, _expression); + }, + [SyntaxKind.TryStatement]: (node, visitor) => { + const _tryBlock = visitNode(node.tryBlock, visitor, isBlock); + const _catchClause = visitNode(node.catchClause, visitor, isCatchClause); + const _finallyBlock = visitNode(node.finallyBlock, visitor, isBlock); + return updateTryStatement(node, _tryBlock, _catchClause, _finallyBlock); + }, + [SyntaxKind.CatchClause]: (node, visitor) => { + const _variableDeclaration = visitNode(node.variableDeclaration, visitor, isVariableDeclaration); + const _block = visitNode(node.block, visitor, isBlock); + return updateCatchClause(node, _variableDeclaration, _block); + }, + [SyntaxKind.LabeledStatement]: (node, visitor) => { + const _label = visitNode(node.label, visitor, isIdentifier); + const _statement = visitNode(node.statement, visitor, isStatement); + return updateLabeledStatement(node, _label, _statement); + }, + [SyntaxKind.ExpressionStatement]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateExpressionStatement(node, _expression); + }, + [SyntaxKind.Block]: (node, visitor) => { + const _statements = visitNodes(node.statements, visitor); + return updateBlock(node, _statements); + }, + [SyntaxKind.VariableStatement]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _declarationList = visitNode(node.declarationList, visitor, isVariableDeclarationList); + return updateVariableStatement(node, _modifiers, _declarationList); + }, + [SyntaxKind.VariableDeclaration]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isBindingName); + const _exclamationToken = visitNode(node.exclamationToken, visitor, isExclamationToken); + const _type = visitNode(node.type, visitor, isTypeNode); + const _initializer = visitNode(node.initializer, visitor, isExpression); + return updateVariableDeclaration(node, _name, _exclamationToken, _type, _initializer); + }, + [SyntaxKind.VariableDeclarationList]: (node, visitor) => { + const _declarations = visitNodes(node.declarations, visitor); + return updateVariableDeclarationList(node, _declarations); + }, + [SyntaxKind.Parameter]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _dotDotDotToken = visitNode(node.dotDotDotToken, visitor, isDotDotDotToken); + const _name = visitNode(node.name, visitor, isBindingName); + const _questionToken = visitNode(node.questionToken, visitor, isQuestionToken); + const _type = visitNode(node.type, visitor, isTypeNode); + const _initializer = visitNode(node.initializer, visitor, isExpression); + return updateParameterDeclaration(node, _modifiers, _dotDotDotToken, _name, _questionToken, _type, _initializer); + }, + [SyntaxKind.BindingElement]: (node, visitor) => { + const _dotDotDotToken = visitNode(node.dotDotDotToken, visitor, isDotDotDotToken); + const _propertyName = visitNode(node.propertyName, visitor, isPropertyName); + const _name = visitNode(node.name, visitor, isBindingName); + const _initializer = visitNode(node.initializer, visitor, isExpression); + return updateBindingElement(node, _dotDotDotToken, _propertyName, _name, _initializer); + }, + [SyntaxKind.MissingDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + return updateMissingDeclaration(node, _modifiers); + }, + [SyntaxKind.FunctionDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _asteriskToken = visitNode(node.asteriskToken, visitor, isAsteriskToken); + const _name = visitNode(node.name, visitor, isIdentifier); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + const _body = visitNode(node.body, visitor, isFunctionBody); + return updateFunctionDeclaration(node, _modifiers, _asteriskToken, _name, _typeParameters, _parameters, _type, _body); + }, + [SyntaxKind.ClassDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isIdentifier); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _heritageClauses = visitNodes(node.heritageClauses, visitor); + const _members = visitNodes(node.members, visitor); + return updateClassDeclaration(node, _modifiers, _name, _typeParameters, _heritageClauses, _members); + }, + [SyntaxKind.ClassExpression]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isIdentifier); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _heritageClauses = visitNodes(node.heritageClauses, visitor); + const _members = visitNodes(node.members, visitor); + return updateClassExpression(node, _modifiers, _name, _typeParameters, _heritageClauses, _members); + }, + [SyntaxKind.HeritageClause]: (node, visitor) => { + const _types = visitNodes(node.types, visitor); + return updateHeritageClause(node, _types); + }, + [SyntaxKind.InterfaceDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isIdentifier); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _heritageClauses = visitNodes(node.heritageClauses, visitor); + const _members = visitNodes(node.members, visitor); + return updateInterfaceDeclaration(node, _modifiers, _name, _typeParameters, _heritageClauses, _members); + }, + [SyntaxKind.TypeAliasDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isIdentifier); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateTypeAliasDeclaration(node, _modifiers, _name, _typeParameters, _type); + }, + [SyntaxKind.EnumMember]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isPropertyName); + const _initializer = visitNode(node.initializer, visitor, isExpression); + return updateEnumMember(node, _name, _initializer); + }, + [SyntaxKind.EnumDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isIdentifier); + const _members = visitNodes(node.members, visitor); + return updateEnumDeclaration(node, _modifiers, _name, _members); + }, + [SyntaxKind.ModuleBlock]: (node, visitor) => { + const _statements = visitNodes(node.statements, visitor); + return updateModuleBlock(node, _statements); + }, + [SyntaxKind.ImportDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _importClause = visitNode(node.importClause, visitor, isImportClause); + const _moduleSpecifier = visitNode(node.moduleSpecifier, visitor, isExpression); + const _attributes = visitNode(node.attributes, visitor, isImportAttributes); + return updateImportDeclaration(node, _modifiers, _importClause, _moduleSpecifier, _attributes); + }, + [SyntaxKind.ExternalModuleReference]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateExternalModuleReference(node, _expression); + }, + [SyntaxKind.NamespaceImport]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isIdentifier); + return updateNamespaceImport(node, _name); + }, + [SyntaxKind.NamedImports]: (node, visitor) => { + const _elements = visitNodes(node.elements, visitor); + return updateNamedImports(node, _elements); + }, + [SyntaxKind.ExportAssignment]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + const _expression = visitNode(node.expression, visitor, isExpression); + return updateExportAssignment(node, _modifiers, _type, _expression); + }, + [SyntaxKind.NamespaceExportDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isIdentifier); + return updateNamespaceExportDeclaration(node, _modifiers, _name); + }, + [SyntaxKind.NamespaceExport]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isModuleExportName); + return updateNamespaceExport(node, _name); + }, + [SyntaxKind.NamedExports]: (node, visitor) => { + const _elements = visitNodes(node.elements, visitor); + return updateNamedExports(node, _elements); + }, + [SyntaxKind.ExportSpecifier]: (node, visitor) => { + const _propertyName = visitNode(node.propertyName, visitor, isModuleExportName); + const _name = visitNode(node.name, visitor, isModuleExportName); + return updateExportSpecifier(node, _propertyName, _name); + }, + [SyntaxKind.CallSignature]: (node, visitor) => { + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateCallSignatureDeclaration(node, _typeParameters, _parameters, _type); + }, + [SyntaxKind.ConstructSignature]: (node, visitor) => { + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateConstructSignatureDeclaration(node, _typeParameters, _parameters, _type); + }, + [SyntaxKind.Constructor]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + const _body = visitNode(node.body, visitor, isFunctionBody); + return updateConstructorDeclaration(node, _modifiers, _typeParameters, _parameters, _type, _body); + }, + [SyntaxKind.GetAccessor]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isPropertyName); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + const _body = visitNode(node.body, visitor, isFunctionBody); + return updateGetAccessorDeclaration(node, _modifiers, _name, _typeParameters, _parameters, _type, _body); + }, + [SyntaxKind.SetAccessor]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isPropertyName); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + const _body = visitNode(node.body, visitor, isFunctionBody); + return updateSetAccessorDeclaration(node, _modifiers, _name, _typeParameters, _parameters, _type, _body); + }, + [SyntaxKind.IndexSignature]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateIndexSignatureDeclaration(node, _modifiers, _parameters, _type); + }, + [SyntaxKind.MethodSignature]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isPropertyName); + const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateMethodSignatureDeclaration(node, _modifiers, _name, _postfixToken, _typeParameters, _parameters, _type); + }, + [SyntaxKind.MethodDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _asteriskToken = visitNode(node.asteriskToken, visitor, isAsteriskToken); + const _name = visitNode(node.name, visitor, isPropertyName); + const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + const _body = visitNode(node.body, visitor, isFunctionBody); + return updateMethodDeclaration(node, _modifiers, _asteriskToken, _name, _postfixToken, _typeParameters, _parameters, _type, _body); + }, + [SyntaxKind.PropertySignature]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isPropertyName); + const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken); + const _type = visitNode(node.type, visitor, isTypeNode); + const _initializer = visitNode(node.initializer, visitor, isExpression); + return updatePropertySignatureDeclaration(node, _modifiers, _name, _postfixToken, _type, _initializer); + }, + [SyntaxKind.PropertyDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isPropertyName); + const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken); + const _type = visitNode(node.type, visitor, isTypeNode); + const _initializer = visitNode(node.initializer, visitor, isExpression); + return updatePropertyDeclaration(node, _modifiers, _name, _postfixToken, _type, _initializer); + }, + [SyntaxKind.ClassStaticBlockDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _body = visitNode(node.body, visitor, isBlock); + return updateClassStaticBlockDeclaration(node, _modifiers, _body); + }, + [SyntaxKind.BinaryExpression]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _left = visitNode(node.left, visitor, isExpression); + const _type = visitNode(node.type, visitor, isTypeNode); + const _operatorToken = visitNode(node.operatorToken, visitor, isBinaryOperatorToken); + const _right = visitNode(node.right, visitor, isExpression); + return updateBinaryExpression(node, _modifiers, _left, _type, _operatorToken, _right); + }, + [SyntaxKind.PrefixUnaryExpression]: (node, visitor) => { + const _operand = visitNode(node.operand, visitor, isExpression); + return updatePrefixUnaryExpression(node, _operand); + }, + [SyntaxKind.PostfixUnaryExpression]: (node, visitor) => { + const _operand = visitNode(node.operand, visitor, isExpression); + return updatePostfixUnaryExpression(node, _operand); + }, + [SyntaxKind.YieldExpression]: (node, visitor) => { + const _asteriskToken = visitNode(node.asteriskToken, visitor, isAsteriskToken); + const _expression = visitNode(node.expression, visitor, isExpression); + return updateYieldExpression(node, _asteriskToken, _expression); + }, + [SyntaxKind.ArrowFunction]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + const _equalsGreaterThanToken = visitNode(node.equalsGreaterThanToken, visitor, isEqualsGreaterThanToken); + const _body = visitNode(node.body, visitor, isConciseBody); + return updateArrowFunction(node, _modifiers, _typeParameters, _parameters, _type, _equalsGreaterThanToken, _body); + }, + [SyntaxKind.FunctionExpression]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _asteriskToken = visitNode(node.asteriskToken, visitor, isAsteriskToken); + const _name = visitNode(node.name, visitor, isIdentifier); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + const _body = visitNode(node.body, visitor, isFunctionBody); + return updateFunctionExpression(node, _modifiers, _asteriskToken, _name, _typeParameters, _parameters, _type, _body); + }, + [SyntaxKind.AsExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateAsExpression(node, _expression, _type); + }, + [SyntaxKind.SatisfiesExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateSatisfiesExpression(node, _expression, _type); + }, + [SyntaxKind.ConditionalExpression]: (node, visitor) => { + const _condition = visitNode(node.condition, visitor, isExpression); + const _questionToken = visitNode(node.questionToken, visitor, isQuestionToken); + const _whenTrue = visitNode(node.whenTrue, visitor, isExpression); + const _colonToken = visitNode(node.colonToken, visitor, isColonToken); + const _whenFalse = visitNode(node.whenFalse, visitor, isExpression); + return updateConditionalExpression(node, _condition, _questionToken, _whenTrue, _colonToken, _whenFalse); + }, + [SyntaxKind.PropertyAccessExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _questionDotToken = visitNode(node.questionDotToken, visitor, isQuestionDotToken); + const _name = visitNode(node.name, visitor, isMemberName); + return updatePropertyAccessExpression(node, _expression, _questionDotToken, _name); + }, + [SyntaxKind.ElementAccessExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _questionDotToken = visitNode(node.questionDotToken, visitor, isQuestionDotToken); + const _argumentExpression = visitNode(node.argumentExpression, visitor, isExpression); + return updateElementAccessExpression(node, _expression, _questionDotToken, _argumentExpression); + }, + [SyntaxKind.CallExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _questionDotToken = visitNode(node.questionDotToken, visitor, isQuestionDotToken); + const _typeArguments = visitNodes(node.typeArguments, visitor); + const _arguments = visitNodes(node.arguments, visitor); + return updateCallExpression(node, _expression, _questionDotToken, _typeArguments, _arguments); + }, + [SyntaxKind.NewExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _typeArguments = visitNodes(node.typeArguments, visitor); + const _arguments = visitNodes(node.arguments, visitor); + return updateNewExpression(node, _expression, _typeArguments, _arguments); + }, + [SyntaxKind.MetaProperty]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isIdentifier); + return updateMetaProperty(node, _name); + }, + [SyntaxKind.NonNullExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateNonNullExpression(node, _expression); + }, + [SyntaxKind.SpreadElement]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateSpreadElement(node, _expression); + }, + [SyntaxKind.TemplateExpression]: (node, visitor) => { + const _head = visitNode(node.head, visitor, isTemplateHead); + const _templateSpans = visitNodes(node.templateSpans, visitor); + return updateTemplateExpression(node, _head, _templateSpans); + }, + [SyntaxKind.TemplateSpan]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _literal = visitNode(node.literal, visitor, isTemplateMiddleOrTail); + return updateTemplateSpan(node, _expression, _literal); + }, + [SyntaxKind.TaggedTemplateExpression]: (node, visitor) => { + const _tag = visitNode(node.tag, visitor, isExpression); + const _questionDotToken = visitNode(node.questionDotToken, visitor, isQuestionDotToken); + const _typeArguments = visitNodes(node.typeArguments, visitor); + const _template = visitNode(node.template, visitor, isTemplateLiteral); + return updateTaggedTemplateExpression(node, _tag, _questionDotToken, _typeArguments, _template); + }, + [SyntaxKind.ParenthesizedExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateParenthesizedExpression(node, _expression); + }, + [SyntaxKind.ArrayLiteralExpression]: (node, visitor) => { + const _elements = visitNodes(node.elements, visitor); + return updateArrayLiteralExpression(node, _elements); + }, + [SyntaxKind.ObjectLiteralExpression]: (node, visitor) => { + const _properties = visitNodes(node.properties, visitor); + return updateObjectLiteralExpression(node, _properties); + }, + [SyntaxKind.SpreadAssignment]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateSpreadAssignment(node, _expression); + }, + [SyntaxKind.PropertyAssignment]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isPropertyName); + const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken); + const _type = visitNode(node.type, visitor, isTypeNode); + const _initializer = visitNode(node.initializer, visitor, isExpression); + return updatePropertyAssignment(node, _modifiers, _name, _postfixToken, _type, _initializer); + }, + [SyntaxKind.ShorthandPropertyAssignment]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isPropertyName); + const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken); + const _type = visitNode(node.type, visitor, isTypeNode); + const _equalsToken = visitNode(node.equalsToken, visitor, isEqualsToken); + const _objectAssignmentInitializer = visitNode(node.objectAssignmentInitializer, visitor, isExpression); + return updateShorthandPropertyAssignment(node, _modifiers, _name, _postfixToken, _type, _equalsToken, _objectAssignmentInitializer); + }, + [SyntaxKind.DeleteExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateDeleteExpression(node, _expression); + }, + [SyntaxKind.TypeOfExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateTypeOfExpression(node, _expression); + }, + [SyntaxKind.VoidExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateVoidExpression(node, _expression); + }, + [SyntaxKind.AwaitExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateAwaitExpression(node, _expression); + }, + [SyntaxKind.TypeAssertionExpression]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + const _expression = visitNode(node.expression, visitor, isExpression); + return updateTypeAssertion(node, _type, _expression); + }, + [SyntaxKind.UnionType]: (node, visitor) => { + const _types = visitNodes(node.types, visitor); + return updateUnionTypeNode(node, _types); + }, + [SyntaxKind.IntersectionType]: (node, visitor) => { + const _types = visitNodes(node.types, visitor); + return updateIntersectionTypeNode(node, _types); + }, + [SyntaxKind.ConditionalType]: (node, visitor) => { + const _checkType = visitNode(node.checkType, visitor, isTypeNode); + const _extendsType = visitNode(node.extendsType, visitor, isTypeNode); + const _trueType = visitNode(node.trueType, visitor, isTypeNode); + const _falseType = visitNode(node.falseType, visitor, isTypeNode); + return updateConditionalTypeNode(node, _checkType, _extendsType, _trueType, _falseType); + }, + [SyntaxKind.TypeOperator]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateTypeOperatorNode(node, _type); + }, + [SyntaxKind.InferType]: (node, visitor) => { + const _typeParameter = visitNode(node.typeParameter, visitor, isTypeParameterDeclaration); + return updateInferTypeNode(node, _typeParameter); + }, + [SyntaxKind.ArrayType]: (node, visitor) => { + const _elementType = visitNode(node.elementType, visitor, isTypeNode); + return updateArrayTypeNode(node, _elementType); + }, + [SyntaxKind.IndexedAccessType]: (node, visitor) => { + const _objectType = visitNode(node.objectType, visitor, isTypeNode); + const _indexType = visitNode(node.indexType, visitor, isTypeNode); + return updateIndexedAccessTypeNode(node, _objectType, _indexType); + }, + [SyntaxKind.TypeReference]: (node, visitor) => { + const _typeName = visitNode(node.typeName, visitor, isEntityName); + const _typeArguments = visitNodes(node.typeArguments, visitor); + return updateTypeReferenceNode(node, _typeName, _typeArguments); + }, + [SyntaxKind.ExpressionWithTypeArguments]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _typeArguments = visitNodes(node.typeArguments, visitor); + return updateExpressionWithTypeArguments(node, _expression, _typeArguments); + }, + [SyntaxKind.LiteralType]: (node, visitor) => { + const _literal = visitNode(node.literal, visitor); + return updateLiteralTypeNode(node, _literal); + }, + [SyntaxKind.TypePredicate]: (node, visitor) => { + const _assertsModifier = visitNode(node.assertsModifier, visitor, isAssertsKeyword); + const _parameterName = visitNode(node.parameterName, visitor, isTypePredicateParameterName); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateTypePredicateNode(node, _assertsModifier, _parameterName, _type); + }, + [SyntaxKind.ImportAttribute]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isImportAttributeName); + const _value = visitNode(node.value, visitor, isExpression); + return updateImportAttribute(node, _name, _value); + }, + [SyntaxKind.ImportAttributes]: (node, visitor) => { + const _attributes = visitNodes(node.attributes, visitor); + return updateImportAttributes(node, _attributes); + }, + [SyntaxKind.TypeQuery]: (node, visitor) => { + const _exprName = visitNode(node.exprName, visitor, isEntityName); + const _typeArguments = visitNodes(node.typeArguments, visitor); + return updateTypeQueryNode(node, _exprName, _typeArguments); + }, + [SyntaxKind.MappedType]: (node, visitor) => { + const _readonlyToken = visitNode(node.readonlyToken, visitor, isReadonlyKeywordOrPlusOrMinusToken); + const _typeParameter = visitNode(node.typeParameter, visitor, isTypeParameterDeclaration); + const _nameType = visitNode(node.nameType, visitor, isTypeNode); + const _questionToken = visitNode(node.questionToken, visitor, isQuestionOrPlusOrMinusToken); + const _type = visitNode(node.type, visitor, isTypeNode); + const _members = visitNodes(node.members, visitor); + return updateMappedTypeNode(node, _readonlyToken, _typeParameter, _nameType, _questionToken, _type, _members); + }, + [SyntaxKind.TypeLiteral]: (node, visitor) => { + const _members = visitNodes(node.members, visitor); + return updateTypeLiteralNode(node, _members); + }, + [SyntaxKind.TupleType]: (node, visitor) => { + const _elements = visitNodes(node.elements, visitor); + return updateTupleTypeNode(node, _elements); + }, + [SyntaxKind.NamedTupleMember]: (node, visitor) => { + const _dotDotDotToken = visitNode(node.dotDotDotToken, visitor, isDotDotDotToken); + const _name = visitNode(node.name, visitor, isIdentifier); + const _questionToken = visitNode(node.questionToken, visitor, isQuestionToken); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateNamedTupleMember(node, _dotDotDotToken, _name, _questionToken, _type); + }, + [SyntaxKind.OptionalType]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateOptionalTypeNode(node, _type); + }, + [SyntaxKind.RestType]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateRestTypeNode(node, _type); + }, + [SyntaxKind.ParenthesizedType]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateParenthesizedTypeNode(node, _type); + }, + [SyntaxKind.FunctionType]: (node, visitor) => { + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateFunctionTypeNode(node, _typeParameters, _parameters, _type); + }, + [SyntaxKind.ConstructorType]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateConstructorTypeNode(node, _modifiers, _typeParameters, _parameters, _type); + }, + [SyntaxKind.TemplateLiteralType]: (node, visitor) => { + const _head = visitNode(node.head, visitor, isTemplateHead); + const _templateSpans = visitNodes(node.templateSpans, visitor); + return updateTemplateLiteralTypeNode(node, _head, _templateSpans); + }, + [SyntaxKind.TemplateLiteralTypeSpan]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + const _literal = visitNode(node.literal, visitor, isTemplateMiddleOrTail); + return updateTemplateLiteralTypeSpan(node, _type, _literal); + }, + [SyntaxKind.SyntheticExpression]: (node, visitor) => { + const _tupleNameSource = visitNode(node.tupleNameSource, visitor); + return updateSyntheticExpression(node, _tupleNameSource); + }, + [SyntaxKind.PartiallyEmittedExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updatePartiallyEmittedExpression(node, _expression); + }, + [SyntaxKind.JsxElement]: (node, visitor) => { + const _openingElement = visitNode(node.openingElement, visitor, isJsxOpeningElement); + const _children = visitNodes(node.children, visitor); + const _closingElement = visitNode(node.closingElement, visitor, isJsxClosingElement); + return updateJsxElement(node, _openingElement, _children, _closingElement); + }, + [SyntaxKind.JsxAttributes]: (node, visitor) => { + const _properties = visitNodes(node.properties, visitor); + return updateJsxAttributes(node, _properties); + }, + [SyntaxKind.JsxNamespacedName]: (node, visitor) => { + const _namespace = visitNode(node.namespace, visitor, isIdentifier); + const _name = visitNode(node.name, visitor, isIdentifier); + return updateJsxNamespacedName(node, _namespace, _name); + }, + [SyntaxKind.JsxOpeningElement]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isJsxTagNameExpression); + const _typeArguments = visitNodes(node.typeArguments, visitor); + const _attributes = visitNode(node.attributes, visitor, isJsxAttributes); + return updateJsxOpeningElement(node, _tagName, _typeArguments, _attributes); + }, + [SyntaxKind.JsxSelfClosingElement]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isJsxTagNameExpression); + const _typeArguments = visitNodes(node.typeArguments, visitor); + const _attributes = visitNode(node.attributes, visitor, isJsxAttributes); + return updateJsxSelfClosingElement(node, _tagName, _typeArguments, _attributes); + }, + [SyntaxKind.JsxFragment]: (node, visitor) => { + const _openingFragment = visitNode(node.openingFragment, visitor, isJsxOpeningFragment); + const _children = visitNodes(node.children, visitor); + const _closingFragment = visitNode(node.closingFragment, visitor, isJsxClosingFragment); + return updateJsxFragment(node, _openingFragment, _children, _closingFragment); + }, + [SyntaxKind.JsxAttribute]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isJsxAttributeName); + const _initializer = visitNode(node.initializer, visitor, isJsxAttributeValue); + return updateJsxAttribute(node, _name, _initializer); + }, + [SyntaxKind.JsxSpreadAttribute]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateJsxSpreadAttribute(node, _expression); + }, + [SyntaxKind.JsxClosingElement]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isJsxTagNameExpression); + return updateJsxClosingElement(node, _tagName); + }, + [SyntaxKind.JsxExpression]: (node, visitor) => { + const _dotDotDotToken = visitNode(node.dotDotDotToken, visitor, isDotDotDotToken); + const _expression = visitNode(node.expression, visitor, isExpression); + return updateJsxExpression(node, _dotDotDotToken, _expression); + }, + [SyntaxKind.SyntaxList]: (node, visitor) => { + const _children = visitNodesArray(node.children, visitor); + return updateSyntaxList(node, _children); + }, + [SyntaxKind.JSDoc]: (node, visitor) => { + const _comment = visitNodes(node.comment, visitor); + const _tags = visitNodes(node.tags, visitor); + return updateJSDoc(node, _comment, _tags); + }, + [SyntaxKind.JSDocTypeExpression]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateJSDocTypeExpression(node, _type); + }, + [SyntaxKind.JSDocNonNullableType]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateJSDocNonNullableType(node, _type); + }, + [SyntaxKind.JSDocNullableType]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateJSDocNullableType(node, _type); + }, + [SyntaxKind.JSDocVariadicType]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateJSDocVariadicType(node, _type); + }, + [SyntaxKind.JSDocOptionalType]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateJSDocOptionalType(node, _type); + }, + [SyntaxKind.JSDocTypeTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _typeExpression = visitNode(node.typeExpression, visitor); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocTypeTag(node, _tagName, _typeExpression, _comment); + }, + [SyntaxKind.JSDocUnknownTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocUnknownTag(node, _tagName, _comment); + }, + [SyntaxKind.JSDocTemplateTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _constraint = visitNode(node.constraint, visitor); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocTemplateTag(node, _tagName, _constraint, _typeParameters, _comment); + }, + [SyntaxKind.JSDocReturnTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocReturnTag(node, _tagName, _typeExpression, _comment); + }, + [SyntaxKind.JSDocPublicTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocPublicTag(node, _tagName, _comment); + }, + [SyntaxKind.JSDocPrivateTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocPrivateTag(node, _tagName, _comment); + }, + [SyntaxKind.JSDocProtectedTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocProtectedTag(node, _tagName, _comment); + }, + [SyntaxKind.JSDocReadonlyTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocReadonlyTag(node, _tagName, _comment); + }, + [SyntaxKind.JSDocOverrideTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocOverrideTag(node, _tagName, _comment); + }, + [SyntaxKind.JSDocDeprecatedTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocDeprecatedTag(node, _tagName, _comment); + }, + [SyntaxKind.JSDocSeeTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _nameExpression = visitNode(node.nameExpression, visitor, isTypeNode); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocSeeTag(node, _tagName, _nameExpression, _comment); + }, + [SyntaxKind.JSDocImplementsTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _className = visitNode(node.className, visitor, isExpressionWithTypeArguments); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocImplementsTag(node, _tagName, _className, _comment); + }, + [SyntaxKind.JSDocAugmentsTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _className = visitNode(node.className, visitor, isExpressionWithTypeArguments); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocAugmentsTag(node, _tagName, _className, _comment); + }, + [SyntaxKind.JSDocSatisfiesTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocSatisfiesTag(node, _tagName, _typeExpression, _comment); + }, + [SyntaxKind.JSDocThrowsTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocThrowsTag(node, _tagName, _typeExpression, _comment); + }, + [SyntaxKind.JSDocThisTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocThisTag(node, _tagName, _typeExpression, _comment); + }, + [SyntaxKind.JSDocImportTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _importClause = visitNode(node.importClause, visitor, isImportClause); + const _moduleSpecifier = visitNode(node.moduleSpecifier, visitor, isExpression); + const _attributes = visitNode(node.attributes, visitor, isImportAttributes); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocImportTag(node, _tagName, _importClause, _moduleSpecifier, _attributes, _comment); + }, + [SyntaxKind.JSDocCallbackTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode); + const _name = visitNode(node.name, visitor, isJSDocFullName); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocCallbackTag(node, _tagName, _typeExpression, _name, _comment); + }, + [SyntaxKind.JSDocOverloadTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocOverloadTag(node, _tagName, _typeExpression, _comment); + }, + [SyntaxKind.JSDocTypedefTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _typeExpression = visitNode(node.typeExpression, visitor); + const _name = visitNode(node.name, visitor, isJSDocFullName); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocTypedefTag(node, _tagName, _typeExpression, _name, _comment); + }, + [SyntaxKind.JSDocSignature]: (node, visitor) => { + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateJSDocSignature(node, _typeParameters, _parameters, _type); + }, + [SyntaxKind.JSDocNameReference]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isEntityName); + return updateJSDocNameReference(node, _name); + }, + [SyntaxKind.SourceFile]: (node, visitor) => { + const _statements = visitNodes(node.statements, visitor); + const _endOfFileToken = visitNode(node.endOfFileToken, visitor, isEndOfFile); + return updateSourceFile(node, _statements, _endOfFileToken); + }, + [SyntaxKind.ModuleDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isModuleName); + const _body = visitNode(node.body, visitor, isModuleBody); + return updateModuleDeclaration(node, _modifiers, _name, _body); + }, + [SyntaxKind.ImportEqualsDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isIdentifier); + const _moduleReference = visitNode(node.moduleReference, visitor, isModuleReference); + return updateImportEqualsDeclaration(node, _modifiers, _name, _moduleReference); + }, + [SyntaxKind.ExportDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _exportClause = visitNode(node.exportClause, visitor, isNamedExportBindings); + const _moduleSpecifier = visitNode(node.moduleSpecifier, visitor, isExpression); + const _attributes = visitNode(node.attributes, visitor, isImportAttributes); + return updateExportDeclaration(node, _modifiers, _exportClause, _moduleSpecifier, _attributes); + }, + [SyntaxKind.ImportType]: (node, visitor) => { + const _argument = visitNode(node.argument, visitor, isTypeNode); + const _attributes = visitNode(node.attributes, visitor, isImportAttributes); + const _qualifier = visitNode(node.qualifier, visitor, isEntityName); + const _typeArguments = visitNodes(node.typeArguments, visitor); + return updateImportTypeNode(node, _argument, _attributes, _qualifier, _typeArguments); + }, + [SyntaxKind.ImportClause]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isIdentifier); + const _namedBindings = visitNode(node.namedBindings, visitor, isNamedImportBindings); + return updateImportClause(node, _name, _namedBindings); + }, + [SyntaxKind.ImportSpecifier]: (node, visitor) => { + const _propertyName = visitNode(node.propertyName, visitor, isModuleExportName); + const _name = visitNode(node.name, visitor, isIdentifier); + return updateImportSpecifier(node, _propertyName, _name); + }, + [SyntaxKind.JSDocLink]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isEntityName); + return updateJSDocLink(node, _name); + }, + [SyntaxKind.JSDocLinkPlain]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isEntityName); + return updateJSDocLinkPlain(node, _name); + }, + [SyntaxKind.JSDocLinkCode]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isEntityName); + return updateJSDocLinkCode(node, _name); + }, + [SyntaxKind.TypeParameter]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isIdentifier); + const _constraint = visitNode(node.constraint, visitor, isTypeNode); + const _expression = visitNode(node.expression, visitor, isExpression); + const _defaultType = visitNode(node.defaultType, visitor, isTypeNode); + return updateTypeParameterDeclaration(node, _modifiers, _name, _constraint, _expression, _defaultType); + }, + [SyntaxKind.SyntheticReferenceExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _thisArg = visitNode(node.thisArg, visitor, isExpression); + return updateSyntheticReferenceExpression(node, _expression, _thisArg); + }, + [SyntaxKind.JSDocTypeLiteral]: (node, visitor) => { + const _jsdocPropertyTags = visitNodesArray(node.jsdocPropertyTags, visitor); + return updateJSDocTypeLiteral(node, _jsdocPropertyTags); + }, + [SyntaxKind.ForInStatement]: (node, visitor) => { + const _awaitModifier = visitNode(node.awaitModifier, visitor, isAwaitKeyword); + const _initializer = visitNode(node.initializer, visitor, isForInitializer); + const _expression = visitNode(node.expression, visitor, isExpression); + const _statement = visitNode(node.statement, visitor, isStatement); + return updateForInStatement(node, _awaitModifier, _initializer, _expression, _statement); + }, + [SyntaxKind.ForOfStatement]: (node, visitor) => { + const _awaitModifier = visitNode(node.awaitModifier, visitor, isAwaitKeyword); + const _initializer = visitNode(node.initializer, visitor, isForInitializer); + const _expression = visitNode(node.expression, visitor, isExpression); + const _statement = visitNode(node.statement, visitor, isStatement); + return updateForOfStatement(node, _awaitModifier, _initializer, _expression, _statement); + }, + [SyntaxKind.CaseClause]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _statements = visitNodes(node.statements, visitor); + return updateCaseClause(node, _expression, _statements); + }, + [SyntaxKind.DefaultClause]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _statements = visitNodes(node.statements, visitor); + return updateDefaultClause(node, _expression, _statements); + }, + [SyntaxKind.ObjectBindingPattern]: (node, visitor) => { + const _elements = visitNodes(node.elements, visitor); + return updateObjectBindingPattern(node, _elements); + }, + [SyntaxKind.ArrayBindingPattern]: (node, visitor) => { + const _elements = visitNodes(node.elements, visitor); + return updateArrayBindingPattern(node, _elements); + }, + [SyntaxKind.JSDocParameterTag]: visitEachChildOfJSDocParameterTag, + [SyntaxKind.JSDocPropertyTag]: visitEachChildOfJSDocPropertyTag, +}; +//# sourceMappingURL=visitor.generated.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/visitor.generated.js.map b/node_modules/typescript/dist/ast/visitor.generated.js.map new file mode 100644 index 0000000..708004b --- /dev/null +++ b/node_modules/typescript/dist/ast/visitor.generated.js.map @@ -0,0 +1 @@ +{"version":3,"file":"visitor.generated.js","sourceRoot":"","sources":["../../src/ast/visitor.generated.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAgL/C,OAAO,EACH,eAAe,EACf,yBAAyB,EACzB,4BAA4B,EAC5B,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,8BAA8B,EAC9B,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,iCAAiC,EACjC,0BAA0B,EAC1B,2BAA2B,EAC3B,yBAAyB,EACzB,4BAA4B,EAC5B,yBAAyB,EACzB,mCAAmC,EACnC,uBAAuB,EACvB,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,6BAA6B,EAC7B,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,iCAAiC,EACjC,6BAA6B,EAC7B,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,EACtB,4BAA4B,EAC5B,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,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;IAC/D,CAAC;IACD,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE,CAAC,IAA0B,EAAE,OAAgB,EAAwB,EAAE;QACtG,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACrD,OAAO,0BAA0B,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACvD,CAAC;IACD,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,CAAC,IAAyB,EAAE,OAAgB,EAAuB,EAAE;QACnG,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACrD,OAAO,yBAAyB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACtD,CAAC;IACD,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,iCAAiC;IACjE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,gCAAgC;CAClE,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/visitor.js b/node_modules/typescript/dist/ast/visitor.js new file mode 100644 index 0000000..f1495d5 --- /dev/null +++ b/node_modules/typescript/dist/ast/visitor.js @@ -0,0 +1,47 @@ +/** + * Hand-written visitor implementations for nodes with runtime-dependent + * child ordering. Generated code in visitor.generated.ts and factory.generated.ts + * delegates to these functions. + */ +import { SyntaxKind } from "#enums/syntaxKind"; +import { updateJSDocParameterTag, updateJSDocPropertyTag, } from "./factory.generated.js"; +import { isEntityName, isIdentifier, isTypeNode, } from "./is.js"; +import { visitNode, visitNodes, } from "./visitor.generated.js"; +export { visitEachChild, visitNode, visitNodes, visitNodesArray } from "./visitor.generated.js"; +// ── forEachChild helpers (same signature as forEachChildTable entries) ── +function visitNodeForEachChild(cbNode, node) { + return node ? cbNode(node) : undefined; +} +function visitNodesForEachChild(cbNode, cbNodes, nodes) { + if (!nodes) + return undefined; + if (cbNodes) + return cbNodes(nodes); + for (const node of nodes) { + const result = cbNode(node); + if (result) + return result; + } + return undefined; +} +// ── forEachChild implementations ── +function forEachChildOfJSDocParameterOrPropertyTag(data, cbNode, cbNodes) { + return visitNodeForEachChild(cbNode, data.tagName) || + (data.isNameFirst + ? visitNodeForEachChild(cbNode, data.name) || visitNodeForEachChild(cbNode, data.typeExpression) + : visitNodeForEachChild(cbNode, data.typeExpression) || visitNodeForEachChild(cbNode, data.name)) || + visitNodesForEachChild(cbNode, cbNodes, data.comment); +} +export { forEachChildOfJSDocParameterOrPropertyTag as forEachChildOfJSDocParameterTag, forEachChildOfJSDocParameterOrPropertyTag as forEachChildOfJSDocPropertyTag }; +// ── visitEachChild implementations ── +function visitEachChildOfJSDocParameterOrPropertyTag(node, visitor) { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _name = visitNode(node.name, visitor, isEntityName); + const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode); + const _comment = visitNodes(node.comment, visitor); + return node.kind === SyntaxKind.JSDocParameterTag + ? updateJSDocParameterTag(node, _tagName, _name, _typeExpression, _comment) + : updateJSDocPropertyTag(node, _tagName, _name, _typeExpression, _comment); +} +export { visitEachChildOfJSDocParameterOrPropertyTag as visitEachChildOfJSDocParameterTag, visitEachChildOfJSDocParameterOrPropertyTag as visitEachChildOfJSDocPropertyTag }; +//# sourceMappingURL=visitor.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/visitor.js.map b/node_modules/typescript/dist/ast/visitor.js.map new file mode 100644 index 0000000..37a7f9a --- /dev/null +++ b/node_modules/typescript/dist/ast/visitor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"visitor.js","sourceRoot":"","sources":["../../src/ast/visitor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAS/C,OAAO,EACH,uBAAuB,EACvB,sBAAsB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACH,YAAY,EACZ,YAAY,EACZ,UAAU,GACb,MAAM,SAAS,CAAC;A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E,yCAAyC,IAAI,8BAA8B,EAAE,CAAC;AAErK,uCAAuC;AAEvC,SAAS,2CAA2C,CAAC,IAAiC,EAAE,OAAgB;IACpG,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;IAChE,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;IAC1D,MAAM,eAAe,GAAG,SAAS,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IAC5E,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACnD,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,iBAAiB;QAC7C,CAAC,CAAC,uBAAuB,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ,CAAC;QAC3E,CAAC,CAAC,sBAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC;AACnF,CAAC;AAED,OAAO,EAAE,2CAA2C,IAAI,iCAAiC,EAAE,2CAA2C,IAAI,gCAAgC,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/characterCodes.d.ts b/node_modules/typescript/dist/enums/characterCodes.d.ts new file mode 100644 index 0000000..d6208f2 --- /dev/null +++ b/node_modules/typescript/dist/enums/characterCodes.d.ts @@ -0,0 +1,2 @@ +export declare var CharacterCodes: any; +//# sourceMappingURL=characterCodes.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/characterCodes.d.ts.map b/node_modules/typescript/dist/enums/characterCodes.d.ts.map new file mode 100644 index 0000000..9f6c5ea --- /dev/null +++ b/node_modules/typescript/dist/enums/characterCodes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"characterCodes.d.ts","sourceRoot":"","sources":["../../src/enums/characterCodes.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,cAAc,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/characterCodes.enum.d.ts b/node_modules/typescript/dist/enums/characterCodes.enum.d.ts new file mode 100644 index 0000000..85577ef --- /dev/null +++ b/node_modules/typescript/dist/enums/characterCodes.enum.d.ts @@ -0,0 +1,129 @@ +export declare enum CharacterCodes { + EOF = -1, + nullCharacter = 0, + maxAsciiCharacter = 127, + lineFeed = 10,// \n + carriageReturn = 13,// \r + lineSeparator = 8232, + paragraphSeparator = 8233, + nextLine = 133, + space = 32,// " " + nonBreakingSpace = 160,// + enQuad = 8192, + emQuad = 8193, + enSpace = 8194, + emSpace = 8195, + threePerEmSpace = 8196, + fourPerEmSpace = 8197, + sixPerEmSpace = 8198, + figureSpace = 8199, + punctuationSpace = 8200, + thinSpace = 8201, + hairSpace = 8202, + zeroWidthSpace = 8203, + narrowNoBreakSpace = 8239, + ideographicSpace = 12288, + mathematicalSpace = 8287, + ogham = 5760, + replacementCharacter = 65533, + _ = 95, + $ = 36, + _0 = 48, + _1 = 49, + _2 = 50, + _3 = 51, + _4 = 52, + _5 = 53, + _6 = 54, + _7 = 55, + _8 = 56, + _9 = 57, + a = 97, + b = 98, + c = 99, + d = 100, + e = 101, + f = 102, + g = 103, + h = 104, + i = 105, + j = 106, + k = 107, + l = 108, + m = 109, + n = 110, + o = 111, + p = 112, + q = 113, + r = 114, + s = 115, + t = 116, + u = 117, + v = 118, + w = 119, + x = 120, + y = 121, + z = 122, + A = 65, + B = 66, + C = 67, + D = 68, + E = 69, + F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + ampersand = 38,// & + asterisk = 42,// * + at = 64,// @ + backslash = 92,// \ + backtick = 96,// ` + bar = 124,// | + caret = 94,// ^ + closeBrace = 125,// } + closeBracket = 93,// ] + closeParen = 41,// ) + colon = 58,// : + comma = 44,// , + dot = 46,// . + doubleQuote = 34,// " + equals = 61,// = + exclamation = 33,// ! + greaterThan = 62,// > + hash = 35,// # + lessThan = 60,// < + minus = 45,// - + openBrace = 123,// { + openBracket = 91,// [ + openParen = 40,// ( + percent = 37,// % + plus = 43,// + + question = 63,// ? + semicolon = 59,// ; + singleQuote = 39,// ' + slash = 47,// / + tilde = 126,// ~ + backspace = 8,// \b + formFeed = 12,// \f + byteOrderMark = 65279, + tab = 9,// \t + verticalTab = 11 +} +//# sourceMappingURL=characterCodes.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map b/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map new file mode 100644 index 0000000..969d1ef --- /dev/null +++ b/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"characterCodes.enum.d.ts","sourceRoot":"","sources":["../../src/enums/characterCodes.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACtB,GAAG,KAAK;IACR,aAAa,IAAI;IACjB,iBAAiB,MAAO;IAExB,QAAQ,KAAO,CAAE,KAAK;IACtB,cAAc,KAAO,CAAE,KAAK;IAC5B,aAAa,OAAS;IACtB,kBAAkB,OAAS;IAC3B,QAAQ,MAAS;IAGjB,KAAK,KAAS,CAAE,MAAM;IACtB,gBAAgB,MAAS,CAAE,EAAE;IAC7B,MAAM,OAAS;IACf,MAAM,OAAS;IACf,OAAO,OAAS;IAChB,OAAO,OAAS;IAChB,eAAe,OAAS;IACxB,cAAc,OAAS;IACvB,aAAa,OAAS;IACtB,WAAW,OAAS;IACpB,gBAAgB,OAAS;IACzB,SAAS,OAAS;IAClB,SAAS,OAAS;IAClB,cAAc,OAAS;IACvB,kBAAkB,OAAS;IAC3B,gBAAgB,QAAS;IACzB,iBAAiB,OAAS;IAC1B,K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ACtB,QAAQ,KAAO,CAAE,IAAI;IACrB,GAAG,MAAO,CAAE,IAAI;IAChB,KAAK,KAAO,CAAE,IAAI;IAClB,UAAU,MAAO,CAAE,IAAI;IACvB,YAAY,KAAO,CAAE,IAAI;IACzB,UAAU,KAAO,CAAE,IAAI;IACvB,KAAK,KAAO,CAAE,IAAI;IAClB,KAAK,KAAO,CAAE,IAAI;IAClB,GAAG,KAAO,CAAE,IAAI;IAChB,WAAW,KAAO,CAAE,IAAI;IACxB,MAAM,KAAO,CAAE,IAAI;IACnB,WAAW,KAAO,CAAE,IAAI;IACxB,WAAW,KAAO,CAAE,IAAI;IACxB,IAAI,KAAO,CAAE,IAAI;IACjB,QAAQ,KAAO,CAAE,IAAI;IACrB,KAAK,KAAO,CAAE,IAAI;IAClB,SAAS,MAAO,CAAE,IAAI;IACtB,WAAW,KAAO,CAAE,IAAI;IACxB,SAAS,KAAO,CAAE,IAAI;IACtB,OAAO,KAAO,CAAE,IAAI;IACpB,IAAI,KAAO,CAAE,IAAI;IACjB,QAAQ,KAAO,CAAE,IAAI;IACrB,SAAS,KAAO,CAAE,IAAI;IACtB,WAAW,KAAO,CAAE,IAAI;IACxB,KAAK,KAAO,CAAE,IAAI;IAClB,KAAK,MAAO,CAAE,IAAI;IAElB,SAAS,IAAO,CAAE,KAAK;IACvB,QAAQ,KAAO,CAAE,KAAK;IACtB,aAAa,QAAS;IACtB,GAAG,IAAO,CAAE,KAAK;IACjB,WAAW,KAAO;CACrB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/characterCodes.enum.js b/node_modules/typescript/dist/enums/characterCodes.enum.js new file mode 100644 index 0000000..dad58f2 --- /dev/null +++ b/node_modules/typescript/dist/enums/characterCodes.enum.js @@ -0,0 +1,132 @@ +export var CharacterCodes; +(function (CharacterCodes) { + CharacterCodes[CharacterCodes["EOF"] = -1] = "EOF"; + CharacterCodes[CharacterCodes["nullCharacter"] = 0] = "nullCharacter"; + CharacterCodes[CharacterCodes["maxAsciiCharacter"] = 127] = "maxAsciiCharacter"; + CharacterCodes[CharacterCodes["lineFeed"] = 10] = "lineFeed"; + CharacterCodes[CharacterCodes["carriageReturn"] = 13] = "carriageReturn"; + CharacterCodes[CharacterCodes["lineSeparator"] = 8232] = "lineSeparator"; + CharacterCodes[CharacterCodes["paragraphSeparator"] = 8233] = "paragraphSeparator"; + CharacterCodes[CharacterCodes["nextLine"] = 133] = "nextLine"; + // Unicode 3.0 space characters + CharacterCodes[CharacterCodes["space"] = 32] = "space"; + CharacterCodes[CharacterCodes["nonBreakingSpace"] = 160] = "nonBreakingSpace"; + CharacterCodes[CharacterCodes["enQuad"] = 8192] = "enQuad"; + CharacterCodes[CharacterCodes["emQuad"] = 8193] = "emQuad"; + CharacterCodes[CharacterCodes["enSpace"] = 8194] = "enSpace"; + CharacterCodes[CharacterCodes["emSpace"] = 8195] = "emSpace"; + CharacterCodes[CharacterCodes["threePerEmSpace"] = 8196] = "threePerEmSpace"; + CharacterCodes[CharacterCodes["fourPerEmSpace"] = 8197] = "fourPerEmSpace"; + CharacterCodes[CharacterCodes["sixPerEmSpace"] = 8198] = "sixPerEmSpace"; + CharacterCodes[CharacterCodes["figureSpace"] = 8199] = "figureSpace"; + CharacterCodes[CharacterCodes["punctuationSpace"] = 8200] = "punctuationSpace"; + CharacterCodes[CharacterCodes["thinSpace"] = 8201] = "thinSpace"; + CharacterCodes[CharacterCodes["hairSpace"] = 8202] = "hairSpace"; + CharacterCodes[CharacterCodes["zeroWidthSpace"] = 8203] = "zeroWidthSpace"; + CharacterCodes[CharacterCodes["narrowNoBreakSpace"] = 8239] = "narrowNoBreakSpace"; + CharacterCodes[CharacterCodes["ideographicSpace"] = 12288] = "ideographicSpace"; + CharacterCodes[CharacterCodes["mathematicalSpace"] = 8287] = "mathematicalSpace"; + CharacterCodes[CharacterCodes["ogham"] = 5760] = "ogham"; + // Unicode replacement character produced when a byte sequence is invalid + CharacterCodes[CharacterCodes["replacementCharacter"] = 65533] = "replacementCharacter"; + CharacterCodes[CharacterCodes["_"] = 95] = "_"; + CharacterCodes[CharacterCodes["$"] = 36] = "$"; + CharacterCodes[CharacterCodes["_0"] = 48] = "_0"; + CharacterCodes[CharacterCodes["_1"] = 49] = "_1"; + CharacterCodes[CharacterCodes["_2"] = 50] = "_2"; + CharacterCodes[CharacterCodes["_3"] = 51] = "_3"; + CharacterCodes[CharacterCodes["_4"] = 52] = "_4"; + CharacterCodes[CharacterCodes["_5"] = 53] = "_5"; + CharacterCodes[CharacterCodes["_6"] = 54] = "_6"; + CharacterCodes[CharacterCodes["_7"] = 55] = "_7"; + CharacterCodes[CharacterCodes["_8"] = 56] = "_8"; + CharacterCodes[CharacterCodes["_9"] = 57] = "_9"; + CharacterCodes[CharacterCodes["a"] = 97] = "a"; + CharacterCodes[CharacterCodes["b"] = 98] = "b"; + CharacterCodes[CharacterCodes["c"] = 99] = "c"; + CharacterCodes[CharacterCodes["d"] = 100] = "d"; + CharacterCodes[CharacterCodes["e"] = 101] = "e"; + CharacterCodes[CharacterCodes["f"] = 102] = "f"; + CharacterCodes[CharacterCodes["g"] = 103] = "g"; + CharacterCodes[CharacterCodes["h"] = 104] = "h"; + CharacterCodes[CharacterCodes["i"] = 105] = "i"; + CharacterCodes[CharacterCodes["j"] = 106] = "j"; + CharacterCodes[CharacterCodes["k"] = 107] = "k"; + CharacterCodes[CharacterCodes["l"] = 108] = "l"; + CharacterCodes[CharacterCodes["m"] = 109] = "m"; + CharacterCodes[CharacterCodes["n"] = 110] = "n"; + CharacterCodes[CharacterCodes["o"] = 111] = "o"; + CharacterCodes[CharacterCodes["p"] = 112] = "p"; + CharacterCodes[CharacterCodes["q"] = 113] = "q"; + CharacterCodes[CharacterCodes["r"] = 114] = "r"; + CharacterCodes[CharacterCodes["s"] = 115] = "s"; + CharacterCodes[CharacterCodes["t"] = 116] = "t"; + CharacterCodes[CharacterCodes["u"] = 117] = "u"; + CharacterCodes[CharacterCodes["v"] = 118] = "v"; + CharacterCodes[CharacterCodes["w"] = 119] = "w"; + CharacterCodes[CharacterCodes["x"] = 120] = "x"; + CharacterCodes[CharacterCodes["y"] = 121] = "y"; + CharacterCodes[CharacterCodes["z"] = 122] = "z"; + CharacterCodes[CharacterCodes["A"] = 65] = "A"; + CharacterCodes[CharacterCodes["B"] = 66] = "B"; + CharacterCodes[CharacterCodes["C"] = 67] = "C"; + CharacterCodes[CharacterCodes["D"] = 68] = "D"; + CharacterCodes[CharacterCodes["E"] = 69] = "E"; + CharacterCodes[CharacterCodes["F"] = 70] = "F"; + CharacterCodes[CharacterCodes["G"] = 71] = "G"; + CharacterCodes[CharacterCodes["H"] = 72] = "H"; + CharacterCodes[CharacterCodes["I"] = 73] = "I"; + CharacterCodes[CharacterCodes["J"] = 74] = "J"; + CharacterCodes[CharacterCodes["K"] = 75] = "K"; + CharacterCodes[CharacterCodes["L"] = 76] = "L"; + CharacterCodes[CharacterCodes["M"] = 77] = "M"; + CharacterCodes[CharacterCodes["N"] = 78] = "N"; + CharacterCodes[CharacterCodes["O"] = 79] = "O"; + CharacterCodes[CharacterCodes["P"] = 80] = "P"; + CharacterCodes[CharacterCodes["Q"] = 81] = "Q"; + CharacterCodes[CharacterCodes["R"] = 82] = "R"; + CharacterCodes[CharacterCodes["S"] = 83] = "S"; + CharacterCodes[CharacterCodes["T"] = 84] = "T"; + CharacterCodes[CharacterCodes["U"] = 85] = "U"; + CharacterCodes[CharacterCodes["V"] = 86] = "V"; + CharacterCodes[CharacterCodes["W"] = 87] = "W"; + CharacterCodes[CharacterCodes["X"] = 88] = "X"; + CharacterCodes[CharacterCodes["Y"] = 89] = "Y"; + CharacterCodes[CharacterCodes["Z"] = 90] = "Z"; + CharacterCodes[CharacterCodes["ampersand"] = 38] = "ampersand"; + CharacterCodes[CharacterCodes["asterisk"] = 42] = "asterisk"; + CharacterCodes[CharacterCodes["at"] = 64] = "at"; + CharacterCodes[CharacterCodes["backslash"] = 92] = "backslash"; + CharacterCodes[CharacterCodes["backtick"] = 96] = "backtick"; + CharacterCodes[CharacterCodes["bar"] = 124] = "bar"; + CharacterCodes[CharacterCodes["caret"] = 94] = "caret"; + CharacterCodes[CharacterCodes["closeBrace"] = 125] = "closeBrace"; + CharacterCodes[CharacterCodes["closeBracket"] = 93] = "closeBracket"; + CharacterCodes[CharacterCodes["closeParen"] = 41] = "closeParen"; + CharacterCodes[CharacterCodes["colon"] = 58] = "colon"; + CharacterCodes[CharacterCodes["comma"] = 44] = "comma"; + CharacterCodes[CharacterCodes["dot"] = 46] = "dot"; + CharacterCodes[CharacterCodes["doubleQuote"] = 34] = "doubleQuote"; + CharacterCodes[CharacterCodes["equals"] = 61] = "equals"; + CharacterCodes[CharacterCodes["exclamation"] = 33] = "exclamation"; + CharacterCodes[CharacterCodes["greaterThan"] = 62] = "greaterThan"; + CharacterCodes[CharacterCodes["hash"] = 35] = "hash"; + CharacterCodes[CharacterCodes["lessThan"] = 60] = "lessThan"; + CharacterCodes[CharacterCodes["minus"] = 45] = "minus"; + CharacterCodes[CharacterCodes["openBrace"] = 123] = "openBrace"; + CharacterCodes[CharacterCodes["openBracket"] = 91] = "openBracket"; + CharacterCodes[CharacterCodes["openParen"] = 40] = "openParen"; + CharacterCodes[CharacterCodes["percent"] = 37] = "percent"; + CharacterCodes[CharacterCodes["plus"] = 43] = "plus"; + CharacterCodes[CharacterCodes["question"] = 63] = "question"; + CharacterCodes[CharacterCodes["semicolon"] = 59] = "semicolon"; + CharacterCodes[CharacterCodes["singleQuote"] = 39] = "singleQuote"; + CharacterCodes[CharacterCodes["slash"] = 47] = "slash"; + CharacterCodes[CharacterCodes["tilde"] = 126] = "tilde"; + CharacterCodes[CharacterCodes["backspace"] = 8] = "backspace"; + CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed"; + CharacterCodes[CharacterCodes["byteOrderMark"] = 65279] = "byteOrderMark"; + CharacterCodes[CharacterCodes["tab"] = 9] = "tab"; + CharacterCodes[CharacterCodes["verticalTab"] = 11] = "verticalTab"; +})(CharacterCodes || (CharacterCodes = {})); +//# sourceMappingURL=characterCodes.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/characterCodes.enum.js.map b/node_modules/typescript/dist/enums/characterCodes.enum.js.map new file mode 100644 index 0000000..4801bfe --- /dev/null +++ b/node_modules/typescript/dist/enums/characterCodes.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"characterCodes.enum.js","sourceRoot":"","sources":["../../src/enums/characterCodes.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,cA0IX;AA1ID,WAAY,cAAc;IACtB,kDAAQ,CAAA;IACR,qEAAiB,CAAA;IACjB,+EAAwB,CAAA;IAExB,4DAAe,CAAA;IACf,wEAAqB,CAAA;IACrB,wEAAsB,CAAA;IACtB,kFAA2B,CAAA;IAC3B,6DAAiB,CAAA;IAEjB,+BAA+B;IAC/B,sDAAc,CAAA;IACd,6EAAyB,CAAA;IACzB,0DAAe,CAAA;IACf,0DAAe,CAAA;IACf,4DAAgB,CAAA;IAChB,4DAAgB,CAAA;IAChB,4EAAwB,CAAA;IACxB,0EAAuB,CAAA;IACvB,wEAAsB,CAAA;IACtB,oEAAoB,CAAA;IACpB,8EAAyB,CAAA;IACzB,gEAAkB,CAAA;IAClB,gEAAkB,CAAA;IAClB,0EAAuB,CAAA;IACvB,kFAA2B,CAAA;IAC3B,+EAAyB,CAAA;IACzB,gFAA0B,CAAA;IAC1B,wDAAc,CAAA;IAEd,yEAAyE;IACzE,uFAA6B,CAAA;IAE7B,8CAAQ,CAAA;IACR,8CAAQ,CAAA;IAER,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IAET,8CAAQ,CAAA;IACR,8CAAQ,CAAA;IACR,8CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA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A;IAClB,oDAAW,CAAA;IACX,4DAAe,CAAA;IACf,sDAAY,CAAA;IACZ,+DAAgB,CAAA;IAChB,kEAAkB,CAAA;IAClB,8DAAgB,CAAA;IAChB,0DAAc,CAAA;IACd,oDAAW,CAAA;IACX,4DAAe,CAAA;IACf,8DAAgB,CAAA;IAChB,kEAAkB,CAAA;IAClB,sDAAY,CAAA;IACZ,uDAAY,CAAA;IAEZ,6DAAgB,CAAA;IAChB,4DAAe,CAAA;IACf,yEAAsB,CAAA;IACtB,iDAAU,CAAA;IACV,kEAAkB,CAAA;AACtB,CAAC,EA1IW,cAAc,KAAd,cAAc,QA0IzB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/characterCodes.js b/node_modules/typescript/dist/enums/characterCodes.js new file mode 100644 index 0000000..10b2244 --- /dev/null +++ b/node_modules/typescript/dist/enums/characterCodes.js @@ -0,0 +1,130 @@ +export var CharacterCodes; +(function (CharacterCodes) { + CharacterCodes[CharacterCodes["EOF"] = -1] = "EOF"; + CharacterCodes[CharacterCodes["nullCharacter"] = 0] = "nullCharacter"; + CharacterCodes[CharacterCodes["maxAsciiCharacter"] = 127] = "maxAsciiCharacter"; + CharacterCodes[CharacterCodes["lineFeed"] = 10] = "lineFeed"; + CharacterCodes[CharacterCodes["carriageReturn"] = 13] = "carriageReturn"; + CharacterCodes[CharacterCodes["lineSeparator"] = 8232] = "lineSeparator"; + CharacterCodes[CharacterCodes["paragraphSeparator"] = 8233] = "paragraphSeparator"; + CharacterCodes[CharacterCodes["nextLine"] = 133] = "nextLine"; + CharacterCodes[CharacterCodes["space"] = 32] = "space"; + CharacterCodes[CharacterCodes["nonBreakingSpace"] = 160] = "nonBreakingSpace"; + CharacterCodes[CharacterCodes["enQuad"] = 8192] = "enQuad"; + CharacterCodes[CharacterCodes["emQuad"] = 8193] = "emQuad"; + CharacterCodes[CharacterCodes["enSpace"] = 8194] = "enSpace"; + CharacterCodes[CharacterCodes["emSpace"] = 8195] = "emSpace"; + CharacterCodes[CharacterCodes["threePerEmSpace"] = 8196] = "threePerEmSpace"; + CharacterCodes[CharacterCodes["fourPerEmSpace"] = 8197] = "fourPerEmSpace"; + CharacterCodes[CharacterCodes["sixPerEmSpace"] = 8198] = "sixPerEmSpace"; + CharacterCodes[CharacterCodes["figureSpace"] = 8199] = "figureSpace"; + CharacterCodes[CharacterCodes["punctuationSpace"] = 8200] = "punctuationSpace"; + CharacterCodes[CharacterCodes["thinSpace"] = 8201] = "thinSpace"; + CharacterCodes[CharacterCodes["hairSpace"] = 8202] = "hairSpace"; + CharacterCodes[CharacterCodes["zeroWidthSpace"] = 8203] = "zeroWidthSpace"; + CharacterCodes[CharacterCodes["narrowNoBreakSpace"] = 8239] = "narrowNoBreakSpace"; + CharacterCodes[CharacterCodes["ideographicSpace"] = 12288] = "ideographicSpace"; + CharacterCodes[CharacterCodes["mathematicalSpace"] = 8287] = "mathematicalSpace"; + CharacterCodes[CharacterCodes["ogham"] = 5765] = "ogham"; + CharacterCodes[CharacterCodes["replacementCharacter"] = 65533] = "replacementCharacter"; + CharacterCodes[CharacterCodes["_"] = 95] = "_"; + CharacterCodes[CharacterCodes["$"] = 36] = "$"; + CharacterCodes[CharacterCodes["_0"] = 48] = "_0"; + CharacterCodes[CharacterCodes["_1"] = 49] = "_1"; + CharacterCodes[CharacterCodes["_2"] = 50] = "_2"; + CharacterCodes[CharacterCodes["_3"] = 51] = "_3"; + CharacterCodes[CharacterCodes["_4"] = 52] = "_4"; + CharacterCodes[CharacterCodes["_5"] = 53] = "_5"; + CharacterCodes[CharacterCodes["_6"] = 54] = "_6"; + CharacterCodes[CharacterCodes["_7"] = 55] = "_7"; + CharacterCodes[CharacterCodes["_8"] = 56] = "_8"; + CharacterCodes[CharacterCodes["_9"] = 57] = "_9"; + CharacterCodes[CharacterCodes["a"] = 97] = "a"; + CharacterCodes[CharacterCodes["b"] = 98] = "b"; + CharacterCodes[CharacterCodes["c"] = 99] = "c"; + CharacterCodes[CharacterCodes["d"] = 100] = "d"; + CharacterCodes[CharacterCodes["e"] = 101] = "e"; + CharacterCodes[CharacterCodes["f"] = 102] = "f"; + CharacterCodes[CharacterCodes["g"] = 103] = "g"; + CharacterCodes[CharacterCodes["h"] = 104] = "h"; + CharacterCodes[CharacterCodes["i"] = 105] = "i"; + CharacterCodes[CharacterCodes["j"] = 106] = "j"; + CharacterCodes[CharacterCodes["k"] = 107] = "k"; + CharacterCodes[CharacterCodes["l"] = 108] = "l"; + CharacterCodes[CharacterCodes["m"] = 109] = "m"; + CharacterCodes[CharacterCodes["n"] = 110] = "n"; + CharacterCodes[CharacterCodes["o"] = 111] = "o"; + CharacterCodes[CharacterCodes["p"] = 112] = "p"; + CharacterCodes[CharacterCodes["q"] = 113] = "q"; + CharacterCodes[CharacterCodes["r"] = 114] = "r"; + CharacterCodes[CharacterCodes["s"] = 115] = "s"; + CharacterCodes[CharacterCodes["t"] = 116] = "t"; + CharacterCodes[CharacterCodes["u"] = 117] = "u"; + CharacterCodes[CharacterCodes["v"] = 118] = "v"; + CharacterCodes[CharacterCodes["w"] = 119] = "w"; + CharacterCodes[CharacterCodes["x"] = 120] = "x"; + CharacterCodes[CharacterCodes["y"] = 121] = "y"; + CharacterCodes[CharacterCodes["z"] = 122] = "z"; + CharacterCodes[CharacterCodes["A"] = 65] = "A"; + CharacterCodes[CharacterCodes["B"] = 66] = "B"; + CharacterCodes[CharacterCodes["C"] = 67] = "C"; + CharacterCodes[CharacterCodes["D"] = 68] = "D"; + CharacterCodes[CharacterCodes["E"] = 69] = "E"; + CharacterCodes[CharacterCodes["F"] = 70] = "F"; + CharacterCodes[CharacterCodes["G"] = 71] = "G"; + CharacterCodes[CharacterCodes["H"] = 72] = "H"; + CharacterCodes[CharacterCodes["I"] = 73] = "I"; + CharacterCodes[CharacterCodes["J"] = 74] = "J"; + CharacterCodes[CharacterCodes["K"] = 75] = "K"; + CharacterCodes[CharacterCodes["L"] = 76] = "L"; + CharacterCodes[CharacterCodes["M"] = 77] = "M"; + CharacterCodes[CharacterCodes["N"] = 78] = "N"; + CharacterCodes[CharacterCodes["O"] = 79] = "O"; + CharacterCodes[CharacterCodes["P"] = 80] = "P"; + CharacterCodes[CharacterCodes["Q"] = 81] = "Q"; + CharacterCodes[CharacterCodes["R"] = 82] = "R"; + CharacterCodes[CharacterCodes["S"] = 83] = "S"; + CharacterCodes[CharacterCodes["T"] = 84] = "T"; + CharacterCodes[CharacterCodes["U"] = 85] = "U"; + CharacterCodes[CharacterCodes["V"] = 86] = "V"; + CharacterCodes[CharacterCodes["W"] = 87] = "W"; + CharacterCodes[CharacterCodes["X"] = 88] = "X"; + CharacterCodes[CharacterCodes["Y"] = 89] = "Y"; + CharacterCodes[CharacterCodes["Z"] = 90] = "Z"; + CharacterCodes[CharacterCodes["ampersand"] = 38] = "ampersand"; + CharacterCodes[CharacterCodes["asterisk"] = 42] = "asterisk"; + CharacterCodes[CharacterCodes["at"] = 64] = "at"; + CharacterCodes[CharacterCodes["backslash"] = 92] = "backslash"; + CharacterCodes[CharacterCodes["backtick"] = 96] = "backtick"; + CharacterCodes[CharacterCodes["bar"] = 124] = "bar"; + CharacterCodes[CharacterCodes["caret"] = 94] = "caret"; + CharacterCodes[CharacterCodes["closeBrace"] = 125] = "closeBrace"; + CharacterCodes[CharacterCodes["closeBracket"] = 93] = "closeBracket"; + CharacterCodes[CharacterCodes["closeParen"] = 41] = "closeParen"; + CharacterCodes[CharacterCodes["colon"] = 58] = "colon"; + CharacterCodes[CharacterCodes["comma"] = 44] = "comma"; + CharacterCodes[CharacterCodes["dot"] = 46] = "dot"; + CharacterCodes[CharacterCodes["doubleQuote"] = 34] = "doubleQuote"; + CharacterCodes[CharacterCodes["equals"] = 61] = "equals"; + CharacterCodes[CharacterCodes["exclamation"] = 33] = "exclamation"; + CharacterCodes[CharacterCodes["greaterThan"] = 62] = "greaterThan"; + CharacterCodes[CharacterCodes["hash"] = 35] = "hash"; + CharacterCodes[CharacterCodes["lessThan"] = 60] = "lessThan"; + CharacterCodes[CharacterCodes["minus"] = 45] = "minus"; + CharacterCodes[CharacterCodes["openBrace"] = 123] = "openBrace"; + CharacterCodes[CharacterCodes["openBracket"] = 91] = "openBracket"; + CharacterCodes[CharacterCodes["openParen"] = 40] = "openParen"; + CharacterCodes[CharacterCodes["percent"] = 37] = "percent"; + CharacterCodes[CharacterCodes["plus"] = 43] = "plus"; + CharacterCodes[CharacterCodes["question"] = 63] = "question"; + CharacterCodes[CharacterCodes["semicolon"] = 59] = "semicolon"; + CharacterCodes[CharacterCodes["singleQuote"] = 39] = "singleQuote"; + CharacterCodes[CharacterCodes["slash"] = 47] = "slash"; + CharacterCodes[CharacterCodes["tilde"] = 126] = "tilde"; + CharacterCodes[CharacterCodes["backspace"] = 8] = "backspace"; + CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed"; + CharacterCodes[CharacterCodes["byteOrderMark"] = 65279] = "byteOrderMark"; + CharacterCodes[CharacterCodes["tab"] = 9] = "tab"; + CharacterCodes[CharacterCodes["verticalTab"] = 11] = "verticalTab"; +})(CharacterCodes || (CharacterCodes = {})); +//# sourceMappingURL=characterCodes.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/characterCodes.js.map b/node_modules/typescript/dist/enums/characterCodes.js.map new file mode 100644 index 0000000..dd3a523 --- /dev/null +++ b/node_modules/typescript/dist/enums/characterCodes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"characterCodes.js","sourceRoot":"","sources":["../../src/enums/characterCodes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,cAAmB,CAAC;AAC/B,CAAC,UAAU,cAAc;IACrB,cAAc,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IACnD,cAAc,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC;IACtE,cAAc,CAAC,cAAc,CAAC,mBAAmB,CAAC,GAAG,GAAG,CAAC,GAAG,mBAAmB,CAAC;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enums/commentDirectiveType.d.ts b/node_modules/typescript/dist/enums/commentDirectiveType.d.ts new file mode 100644 index 0000000..475efc5 --- /dev/null +++ b/node_modules/typescript/dist/enums/commentDirectiveType.d.ts @@ -0,0 +1,2 @@ +export declare var CommentDirectiveType: any; +//# sourceMappingURL=commentDirectiveType.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map b/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map new file mode 100644 index 0000000..32233c5 --- /dev/null +++ b/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"commentDirectiveType.d.ts","sourceRoot":"","sources":["../../src/enums/commentDirectiveType.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,oBAAoB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts b/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts new file mode 100644 index 0000000..7b18e5d --- /dev/null +++ b/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts @@ -0,0 +1,5 @@ +export declare enum CommentDirectiveType { + ExpectError = 0, + Ignore = 1 +} +//# sourceMappingURL=commentDirectiveType.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map b/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map new file mode 100644 index 0000000..f4af3f4 --- /dev/null +++ b/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"commentDirectiveType.enum.d.ts","sourceRoot":"","sources":["../../src/enums/commentDirectiveType.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC5B,WAAW,IAAI;IACf,MAAM,IAAI;CACb"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.enum.js b/node_modules/typescript/dist/enums/commentDirectiveType.enum.js new file mode 100644 index 0000000..445c026 --- /dev/null +++ b/node_modules/typescript/dist/enums/commentDirectiveType.enum.js @@ -0,0 +1,6 @@ +export var CommentDirectiveType; +(function (CommentDirectiveType) { + CommentDirectiveType[CommentDirectiveType["ExpectError"] = 0] = "ExpectError"; + CommentDirectiveType[CommentDirectiveType["Ignore"] = 1] = "Ignore"; +})(CommentDirectiveType || (CommentDirectiveType = {})); +//# sourceMappingURL=commentDirectiveType.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map b/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map new file mode 100644 index 0000000..f9a5336 --- /dev/null +++ b/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"commentDirectiveType.enum.js","sourceRoot":"","sources":["../../src/enums/commentDirectiveType.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC5B,6EAAe,CAAA;IACf,mEAAU,CAAA;AACd,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.js b/node_modules/typescript/dist/enums/commentDirectiveType.js new file mode 100644 index 0000000..1c3aa78 --- /dev/null +++ b/node_modules/typescript/dist/enums/commentDirectiveType.js @@ -0,0 +1,6 @@ +export var CommentDirectiveType; +(function (CommentDirectiveType) { + CommentDirectiveType[CommentDirectiveType["ExpectError"] = 0] = "ExpectError"; + CommentDirectiveType[CommentDirectiveType["Ignore"] = 1] = "Ignore"; +})(CommentDirectiveType || (CommentDirectiveType = {})); +//# sourceMappingURL=commentDirectiveType.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.js.map b/node_modules/typescript/dist/enums/commentDirectiveType.js.map new file mode 100644 index 0000000..909b27c --- /dev/null +++ b/node_modules/typescript/dist/enums/commentDirectiveType.js.map @@ -0,0 +1 @@ +{"version":3,"file":"commentDirectiveType.js","sourceRoot":"","sources":["../../src/enums/commentDirectiveType.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,oBAAyB,CAAC;AACrC,CAAC,UAAU,oBAAoB;IAC3B,oBAAoB,CAAC,oBAAoB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;IAC9E,oBAAoB,CAAC,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;AACxE,CAAC,CAAC,CAAC,oBAAoB,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/completionItemKind.d.ts b/node_modules/typescript/dist/enums/completionItemKind.d.ts new file mode 100644 index 0000000..5952449 --- /dev/null +++ b/node_modules/typescript/dist/enums/completionItemKind.d.ts @@ -0,0 +1,2 @@ +export declare var CompletionItemKind: any; +//# sourceMappingURL=completionItemKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/completionItemKind.d.ts.map b/node_modules/typescript/dist/enums/completionItemKind.d.ts.map new file mode 100644 index 0000000..6073415 --- /dev/null +++ b/node_modules/typescript/dist/enums/completionItemKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"completionItemKind.d.ts","sourceRoot":"","sources":["../../src/enums/completionItemKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,kBAAkB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts b/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts new file mode 100644 index 0000000..ab697c6 --- /dev/null +++ b/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts @@ -0,0 +1,28 @@ +export declare enum CompletionItemKind { + Text = 1, + Method = 2, + Function = 3, + Constructor = 4, + Field = 5, + Variable = 6, + Class = 7, + Interface = 8, + Module = 9, + Property = 10, + Unit = 11, + Value = 12, + Enum = 13, + Keyword = 14, + Snippet = 15, + Color = 16, + File = 17, + Reference = 18, + Folder = 19, + EnumMember = 20, + Constant = 21, + Struct = 22, + Event = 23, + Operator = 24, + TypeParameter = 25 +} +//# sourceMappingURL=completionItemKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map b/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map new file mode 100644 index 0000000..e3a2fda --- /dev/null +++ b/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"completionItemKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/completionItemKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,kBAAkB;IAC1B,IAAI,IAAI;IACR,MAAM,IAAI;IACV,QAAQ,IAAI;IACZ,WAAW,IAAI;IACf,KAAK,IAAI;IACT,QAAQ,IAAI;IACZ,KAAK,IAAI;IACT,SAAS,IAAI;IACb,MAAM,IAAI;IACV,QAAQ,KAAK;IACb,IAAI,KAAK;IACT,KAAK,KAAK;IACV,IAAI,KAAK;IACT,OAAO,KAAK;IACZ,OAAO,KAAK;IACZ,KAAK,KAAK;IACV,IAAI,KAAK;IACT,SAAS,KAAK;IACd,MAAM,KAAK;IACX,UAAU,KAAK;IACf,QAAQ,KAAK;IACb,MAAM,KAAK;IACX,KAAK,KAAK;IACV,QAAQ,KAAK;IACb,aAAa,KAAK;CACrB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/completionItemKind.enum.js b/node_modules/typescript/dist/enums/completionItemKind.enum.js new file mode 100644 index 0000000..ad281d5 --- /dev/null +++ b/node_modules/typescript/dist/enums/completionItemKind.enum.js @@ -0,0 +1,30 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/lsp/lsproto/lsp_generated.go. DO NOT EDIT. +export var CompletionItemKind; +(function (CompletionItemKind) { + CompletionItemKind[CompletionItemKind["Text"] = 1] = "Text"; + CompletionItemKind[CompletionItemKind["Method"] = 2] = "Method"; + CompletionItemKind[CompletionItemKind["Function"] = 3] = "Function"; + CompletionItemKind[CompletionItemKind["Constructor"] = 4] = "Constructor"; + CompletionItemKind[CompletionItemKind["Field"] = 5] = "Field"; + CompletionItemKind[CompletionItemKind["Variable"] = 6] = "Variable"; + CompletionItemKind[CompletionItemKind["Class"] = 7] = "Class"; + CompletionItemKind[CompletionItemKind["Interface"] = 8] = "Interface"; + CompletionItemKind[CompletionItemKind["Module"] = 9] = "Module"; + CompletionItemKind[CompletionItemKind["Property"] = 10] = "Property"; + CompletionItemKind[CompletionItemKind["Unit"] = 11] = "Unit"; + CompletionItemKind[CompletionItemKind["Value"] = 12] = "Value"; + CompletionItemKind[CompletionItemKind["Enum"] = 13] = "Enum"; + CompletionItemKind[CompletionItemKind["Keyword"] = 14] = "Keyword"; + CompletionItemKind[CompletionItemKind["Snippet"] = 15] = "Snippet"; + CompletionItemKind[CompletionItemKind["Color"] = 16] = "Color"; + CompletionItemKind[CompletionItemKind["File"] = 17] = "File"; + CompletionItemKind[CompletionItemKind["Reference"] = 18] = "Reference"; + CompletionItemKind[CompletionItemKind["Folder"] = 19] = "Folder"; + CompletionItemKind[CompletionItemKind["EnumMember"] = 20] = "EnumMember"; + CompletionItemKind[CompletionItemKind["Constant"] = 21] = "Constant"; + CompletionItemKind[CompletionItemKind["Struct"] = 22] = "Struct"; + CompletionItemKind[CompletionItemKind["Event"] = 23] = "Event"; + CompletionItemKind[CompletionItemKind["Operator"] = 24] = "Operator"; + CompletionItemKind[CompletionItemKind["TypeParameter"] = 25] = "TypeParameter"; +})(CompletionItemKind || (CompletionItemKind = {})); +//# sourceMappingURL=completionItemKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/completionItemKind.enum.js.map b/node_modules/typescript/dist/enums/completionItemKind.enum.js.map new file mode 100644 index 0000000..3309d93 --- /dev/null +++ b/node_modules/typescript/dist/enums/completionItemKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"completionItemKind.enum.js","sourceRoot":"","sources":["../../src/enums/completionItemKind.enum.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAE3G,MAAM,CAAN,IAAY,kBA0BX;AA1BD,WAAY,kBAAkB;IAC1B,2DAAQ,CAAA;IACR,+DAAU,CAAA;IACV,mEAAY,CAAA;IACZ,yEAAe,CAAA;IACf,6DAAS,CAAA;IACT,mEAAY,CAAA;IACZ,6DAAS,CAAA;IACT,qEAAa,CAAA;IACb,+DAAU,CAAA;IACV,oEAAa,CAAA;IACb,4DAAS,CAAA;IACT,8DAAU,CAAA;IACV,4DAAS,CAAA;IACT,kEAAY,CAAA;IACZ,kEAAY,CAAA;IACZ,8DAAU,CAAA;IACV,4DAAS,CAAA;IACT,sEAAc,CAAA;IACd,gEAAW,CAAA;IACX,wEAAe,CAAA;IACf,oEAAa,CAAA;IACb,gEAAW,CAAA;IACX,8DAAU,CAAA;IACV,oEAAa,CAAA;IACb,8EAAkB,CAAA;AACtB,CAAC,EA1BW,kBAAkB,KAAlB,kBAAkB,QA0B7B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/completionItemKind.js b/node_modules/typescript/dist/enums/completionItemKind.js new file mode 100644 index 0000000..dc2c3c1 --- /dev/null +++ b/node_modules/typescript/dist/enums/completionItemKind.js @@ -0,0 +1,30 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/lsp/lsproto/lsp_generated.go. DO NOT EDIT. +export var CompletionItemKind; +(function (CompletionItemKind) { + CompletionItemKind[CompletionItemKind["Text"] = 1] = "Text"; + CompletionItemKind[CompletionItemKind["Method"] = 2] = "Method"; + CompletionItemKind[CompletionItemKind["Function"] = 3] = "Function"; + CompletionItemKind[CompletionItemKind["Constructor"] = 4] = "Constructor"; + CompletionItemKind[CompletionItemKind["Field"] = 5] = "Field"; + CompletionItemKind[CompletionItemKind["Variable"] = 6] = "Variable"; + CompletionItemKind[CompletionItemKind["Class"] = 7] = "Class"; + CompletionItemKind[CompletionItemKind["Interface"] = 8] = "Interface"; + CompletionItemKind[CompletionItemKind["Module"] = 9] = "Module"; + CompletionItemKind[CompletionItemKind["Property"] = 10] = "Property"; + CompletionItemKind[CompletionItemKind["Unit"] = 11] = "Unit"; + CompletionItemKind[CompletionItemKind["Value"] = 12] = "Value"; + CompletionItemKind[CompletionItemKind["Enum"] = 13] = "Enum"; + CompletionItemKind[CompletionItemKind["Keyword"] = 14] = "Keyword"; + CompletionItemKind[CompletionItemKind["Snippet"] = 15] = "Snippet"; + CompletionItemKind[CompletionItemKind["Color"] = 16] = "Color"; + CompletionItemKind[CompletionItemKind["File"] = 17] = "File"; + CompletionItemKind[CompletionItemKind["Reference"] = 18] = "Reference"; + CompletionItemKind[CompletionItemKind["Folder"] = 19] = "Folder"; + CompletionItemKind[CompletionItemKind["EnumMember"] = 20] = "EnumMember"; + CompletionItemKind[CompletionItemKind["Constant"] = 21] = "Constant"; + CompletionItemKind[CompletionItemKind["Struct"] = 22] = "Struct"; + CompletionItemKind[CompletionItemKind["Event"] = 23] = "Event"; + CompletionItemKind[CompletionItemKind["Operator"] = 24] = "Operator"; + CompletionItemKind[CompletionItemKind["TypeParameter"] = 25] = "TypeParameter"; +})(CompletionItemKind || (CompletionItemKind = {})); +//# sourceMappingURL=completionItemKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/completionItemKind.js.map b/node_modules/typescript/dist/enums/completionItemKind.js.map new file mode 100644 index 0000000..8c12628 --- /dev/null +++ b/node_modules/typescript/dist/enums/completionItemKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"completionItemKind.js","sourceRoot":"","sources":["../../src/enums/completionItemKind.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,MAAM,CAAC,IAAI,kBAAuB,CAAC;AACnC,CAAC,UAAU,kBAAkB;IACzB,kBAAkB,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC5D,kBAAkB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,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EAAE,CAAC,GAAG,MAAM,CAAC;IAC7D,kBAAkB,CAAC,kBAAkB,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,GAAG,WAAW,CAAC;IACvE,kBAAkB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC;IACjE,kBAAkB,CAAC,kBAAkB,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,GAAG,YAAY,CAAC;IACzE,kBAAkB,CAAC,kBAAkB,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IACrE,kBAAkB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC;IACjE,kBAAkB,CAAC,kBAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC;IAC/D,kBAAkB,CAAC,kBAAkB,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IACrE,kBAAkB,CAAC,kBAAkB,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC,GAAG,eAAe,CAAC;AACnF,CAAC,CAAC,CAAC,kBAAkB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.d.ts b/node_modules/typescript/dist/enums/diagnosticCategory.d.ts new file mode 100644 index 0000000..aa70359 --- /dev/null +++ b/node_modules/typescript/dist/enums/diagnosticCategory.d.ts @@ -0,0 +1,2 @@ +export declare var DiagnosticCategory: any; +//# sourceMappingURL=diagnosticCategory.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map b/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map new file mode 100644 index 0000000..4856f52 --- /dev/null +++ b/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"diagnosticCategory.d.ts","sourceRoot":"","sources":["../../src/enums/diagnosticCategory.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,kBAAkB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts b/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts new file mode 100644 index 0000000..8b99b68 --- /dev/null +++ b/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts @@ -0,0 +1,7 @@ +export declare enum DiagnosticCategory { + Warning = 0, + Error = 1, + Suggestion = 2, + Message = 3 +} +//# sourceMappingURL=diagnosticCategory.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map b/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map new file mode 100644 index 0000000..c55fc24 --- /dev/null +++ b/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"diagnosticCategory.enum.d.ts","sourceRoot":"","sources":["../../src/enums/diagnosticCategory.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,kBAAkB;IAC1B,OAAO,IAAI;IACX,KAAK,IAAI;IACT,UAAU,IAAI;IACd,OAAO,IAAI;CACd"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.enum.js b/node_modules/typescript/dist/enums/diagnosticCategory.enum.js new file mode 100644 index 0000000..91229a7 --- /dev/null +++ b/node_modules/typescript/dist/enums/diagnosticCategory.enum.js @@ -0,0 +1,9 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/diagnostics/diagnostics.go. DO NOT EDIT. +export var DiagnosticCategory; +(function (DiagnosticCategory) { + DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning"; + DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error"; + DiagnosticCategory[DiagnosticCategory["Suggestion"] = 2] = "Suggestion"; + DiagnosticCategory[DiagnosticCategory["Message"] = 3] = "Message"; +})(DiagnosticCategory || (DiagnosticCategory = {})); +//# sourceMappingURL=diagnosticCategory.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map b/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map new file mode 100644 index 0000000..8a802fd --- /dev/null +++ b/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"diagnosticCategory.enum.js","sourceRoot":"","sources":["../../src/enums/diagnosticCategory.enum.ts"],"names":[],"mappings":"AAAA,yGAAyG;AAEzG,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC1B,iEAAW,CAAA;IACX,6DAAS,CAAA;IACT,uEAAc,CAAA;IACd,iEAAW,CAAA;AACf,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.js b/node_modules/typescript/dist/enums/diagnosticCategory.js new file mode 100644 index 0000000..2a1d761 --- /dev/null +++ b/node_modules/typescript/dist/enums/diagnosticCategory.js @@ -0,0 +1,9 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/diagnostics/diagnostics.go. DO NOT EDIT. +export var DiagnosticCategory; +(function (DiagnosticCategory) { + DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning"; + DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error"; + DiagnosticCategory[DiagnosticCategory["Suggestion"] = 2] = "Suggestion"; + DiagnosticCategory[DiagnosticCategory["Message"] = 3] = "Message"; +})(DiagnosticCategory || (DiagnosticCategory = {})); +//# sourceMappingURL=diagnosticCategory.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.js.map b/node_modules/typescript/dist/enums/diagnosticCategory.js.map new file mode 100644 index 0000000..8ab4746 --- /dev/null +++ b/node_modules/typescript/dist/enums/diagnosticCategory.js.map @@ -0,0 +1 @@ +{"version":3,"file":"diagnosticCategory.js","sourceRoot":"","sources":["../../src/enums/diagnosticCategory.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,MAAM,CAAC,IAAI,kBAAuB,CAAC;AACnC,CAAC,UAAU,kBAAkB;IACzB,kBAAkB,CAAC,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IAClE,kBAAkB,CAAC,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAC9D,kBAAkB,CAAC,kBAAkB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC;IACxE,kBAAkB,CAAC,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;AACtE,CAAC,CAAC,CAAC,kBAAkB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/elementFlags.d.ts b/node_modules/typescript/dist/enums/elementFlags.d.ts new file mode 100644 index 0000000..7412931 --- /dev/null +++ b/node_modules/typescript/dist/enums/elementFlags.d.ts @@ -0,0 +1,2 @@ +export declare var ElementFlags: any; +//# sourceMappingURL=elementFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/elementFlags.d.ts.map b/node_modules/typescript/dist/enums/elementFlags.d.ts.map new file mode 100644 index 0000000..2660426 --- /dev/null +++ b/node_modules/typescript/dist/enums/elementFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"elementFlags.d.ts","sourceRoot":"","sources":["../../src/enums/elementFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,YAAY,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/elementFlags.enum.d.ts b/node_modules/typescript/dist/enums/elementFlags.enum.d.ts new file mode 100644 index 0000000..0f826d7 --- /dev/null +++ b/node_modules/typescript/dist/enums/elementFlags.enum.d.ts @@ -0,0 +1,12 @@ +export declare enum ElementFlags { + None = 0, + Required = 1, + Optional = 2, + Rest = 4, + Variadic = 8, + Fixed = 3, + Variable = 12, + NonRequired = 14, + NonRest = 11 +} +//# sourceMappingURL=elementFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map new file mode 100644 index 0000000..97c34e3 --- /dev/null +++ b/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"elementFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/elementFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,YAAY;IACpB,IAAI,IAAI;IACR,QAAQ,IAAS;IACjB,QAAQ,IAAS;IACjB,IAAI,IAAS;IACb,QAAQ,IAAS;IACjB,KAAK,IAAsB;IAC3B,QAAQ,KAAkB;IAC1B,WAAW,KAA6B;IACxC,OAAO,KAAiC;CAC3C"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/elementFlags.enum.js b/node_modules/typescript/dist/enums/elementFlags.enum.js new file mode 100644 index 0000000..3ecab24 --- /dev/null +++ b/node_modules/typescript/dist/enums/elementFlags.enum.js @@ -0,0 +1,14 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var ElementFlags; +(function (ElementFlags) { + ElementFlags[ElementFlags["None"] = 0] = "None"; + ElementFlags[ElementFlags["Required"] = 1] = "Required"; + ElementFlags[ElementFlags["Optional"] = 2] = "Optional"; + ElementFlags[ElementFlags["Rest"] = 4] = "Rest"; + ElementFlags[ElementFlags["Variadic"] = 8] = "Variadic"; + ElementFlags[ElementFlags["Fixed"] = 3] = "Fixed"; + ElementFlags[ElementFlags["Variable"] = 12] = "Variable"; + ElementFlags[ElementFlags["NonRequired"] = 14] = "NonRequired"; + ElementFlags[ElementFlags["NonRest"] = 11] = "NonRest"; +})(ElementFlags || (ElementFlags = {})); +//# sourceMappingURL=elementFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/elementFlags.enum.js.map b/node_modules/typescript/dist/enums/elementFlags.enum.js.map new file mode 100644 index 0000000..8e84d40 --- /dev/null +++ b/node_modules/typescript/dist/enums/elementFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"elementFlags.enum.js","sourceRoot":"","sources":["../../src/enums/elementFlags.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,YAUX;AAVD,WAAY,YAAY;IACpB,+CAAQ,CAAA;IACR,uDAAiB,CAAA;IACjB,uDAAiB,CAAA;IACjB,+CAAa,CAAA;IACb,uDAAiB,CAAA;IACjB,iDAA2B,CAAA;IAC3B,wDAA0B,CAAA;IAC1B,8DAAwC,CAAA;IACxC,sDAAwC,CAAA;AAC5C,CAAC,EAVW,YAAY,KAAZ,YAAY,QAUvB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/elementFlags.js b/node_modules/typescript/dist/enums/elementFlags.js new file mode 100644 index 0000000..ecf2e91 --- /dev/null +++ b/node_modules/typescript/dist/enums/elementFlags.js @@ -0,0 +1,14 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var ElementFlags; +(function (ElementFlags) { + ElementFlags[ElementFlags["None"] = 0] = "None"; + ElementFlags[ElementFlags["Required"] = 1] = "Required"; + ElementFlags[ElementFlags["Optional"] = 2] = "Optional"; + ElementFlags[ElementFlags["Rest"] = 4] = "Rest"; + ElementFlags[ElementFlags["Variadic"] = 8] = "Variadic"; + ElementFlags[ElementFlags["Fixed"] = 3] = "Fixed"; + ElementFlags[ElementFlags["Variable"] = 12] = "Variable"; + ElementFlags[ElementFlags["NonRequired"] = 14] = "NonRequired"; + ElementFlags[ElementFlags["NonRest"] = 11] = "NonRest"; +})(ElementFlags || (ElementFlags = {})); +//# sourceMappingURL=elementFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/elementFlags.js.map b/node_modules/typescript/dist/enums/elementFlags.js.map new file mode 100644 index 0000000..bc79085 --- /dev/null +++ b/node_modules/typescript/dist/enums/elementFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"elementFlags.js","sourceRoot":"","sources":["../../src/enums/elementFlags.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,YAAiB,CAAC;AAC7B,CAAC,UAAU,YAAY;IACnB,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAChD,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IACxD,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IACxD,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAChD,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IACxD,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAClD,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IACzD,YAAY,CAAC,YAAY,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,GAAG,aAAa,CAAC;IAC/D,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC;AAC3D,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/internalSymbolName.d.ts b/node_modules/typescript/dist/enums/internalSymbolName.d.ts new file mode 100644 index 0000000..d943a1d --- /dev/null +++ b/node_modules/typescript/dist/enums/internalSymbolName.d.ts @@ -0,0 +1,2 @@ +export declare var InternalSymbolName: any; +//# sourceMappingURL=internalSymbolName.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map b/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map new file mode 100644 index 0000000..6cb9e7e --- /dev/null +++ b/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"internalSymbolName.d.ts","sourceRoot":"","sources":["../../src/enums/internalSymbolName.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,kBAAkB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts b/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts new file mode 100644 index 0000000..e06ac09 --- /dev/null +++ b/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts @@ -0,0 +1,23 @@ +export declare enum InternalSymbolName { + Call = "__call", + Constructor = "__constructor", + New = "__new", + Index = "__index", + ExportStar = "__export", + Global = "__global", + Missing = "__missing", + Type = "__type", + Object = "__object", + JSXAttributes = "__jsxAttributes", + Class = "__class", + Function = "__function", + Computed = "__computed", + AssignmentDeclaration = "__assignment", + InstantiationExpression = "__instantiationExpression", + ImportAttributes = "__importAttributes", + ExportEquals = "export=", + Default = "default", + This = "this", + ModuleExports = "module.exports" +} +//# sourceMappingURL=internalSymbolName.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map b/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map new file mode 100644 index 0000000..873a94e --- /dev/null +++ b/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"internalSymbolName.enum.d.ts","sourceRoot":"","sources":["../../src/enums/internalSymbolName.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,kBAAkB;IAC1B,IAAI,WAAW;IACf,WAAW,kBAAkB;IAC7B,GAAG,UAAU;IACb,KAAK,YAAY;IACjB,UAAU,aAAa;IACvB,MAAM,aAAa;IACnB,OAAO,cAAc;IACrB,IAAI,WAAW;IACf,MAAM,aAAa;IACnB,aAAa,oBAAoB;IACjC,KAAK,YAAY;IACjB,QAAQ,eAAe;IACvB,QAAQ,eAAe;IACvB,qBAAqB,iBAAiB;IACtC,uBAAuB,8BAA8B;IACrD,gBAAgB,uBAAuB;IACvC,YAAY,YAAY;IACxB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,aAAa,mBAAmB;CACnC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/internalSymbolName.enum.js b/node_modules/typescript/dist/enums/internalSymbolName.enum.js new file mode 100644 index 0000000..cc412a5 --- /dev/null +++ b/node_modules/typescript/dist/enums/internalSymbolName.enum.js @@ -0,0 +1,25 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/symbol.go. DO NOT EDIT. +export var InternalSymbolName; +(function (InternalSymbolName) { + InternalSymbolName["Call"] = "__call"; + InternalSymbolName["Constructor"] = "__constructor"; + InternalSymbolName["New"] = "__new"; + InternalSymbolName["Index"] = "__index"; + InternalSymbolName["ExportStar"] = "__export"; + InternalSymbolName["Global"] = "__global"; + InternalSymbolName["Missing"] = "__missing"; + InternalSymbolName["Type"] = "__type"; + InternalSymbolName["Object"] = "__object"; + InternalSymbolName["JSXAttributes"] = "__jsxAttributes"; + InternalSymbolName["Class"] = "__class"; + InternalSymbolName["Function"] = "__function"; + InternalSymbolName["Computed"] = "__computed"; + InternalSymbolName["AssignmentDeclaration"] = "__assignment"; + InternalSymbolName["InstantiationExpression"] = "__instantiationExpression"; + InternalSymbolName["ImportAttributes"] = "__importAttributes"; + InternalSymbolName["ExportEquals"] = "export="; + InternalSymbolName["Default"] = "default"; + InternalSymbolName["This"] = "this"; + InternalSymbolName["ModuleExports"] = "module.exports"; +})(InternalSymbolName || (InternalSymbolName = {})); +//# sourceMappingURL=internalSymbolName.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map b/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map new file mode 100644 index 0000000..75cdb19 --- /dev/null +++ b/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internalSymbolName.enum.js","sourceRoot":"","sources":["../../src/enums/internalSymbolName.enum.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAE5F,MAAM,CAAN,IAAY,kBAqBX;AArBD,WAAY,kBAAkB;IAC1B,qCAAe,CAAA;IACf,mDAA6B,CAAA;IAC7B,mCAAa,CAAA;IACb,uCAAiB,CAAA;IACjB,6CAAuB,CAAA;IACvB,yCAAmB,CAAA;IACnB,2CAAqB,CAAA;IACrB,qCAAe,CAAA;IACf,yCAAmB,CAAA;IACnB,uDAAiC,CAAA;IACjC,uCAAiB,CAAA;IACjB,6CAAuB,CAAA;IACvB,6CAAuB,CAAA;IACvB,4DAAsC,CAAA;IACtC,2EAAqD,CAAA;IACrD,6DAAuC,CAAA;IACvC,8CAAwB,CAAA;IACxB,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,sDAAgC,CAAA;AACpC,CAAC,EArBW,kBAAkB,KAAlB,kBAAkB,QAqB7B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/internalSymbolName.js b/node_modules/typescript/dist/enums/internalSymbolName.js new file mode 100644 index 0000000..b4254d7 --- /dev/null +++ b/node_modules/typescript/dist/enums/internalSymbolName.js @@ -0,0 +1,25 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/symbol.go. DO NOT EDIT. +export var InternalSymbolName; +(function (InternalSymbolName) { + InternalSymbolName["Call"] = "__call"; + InternalSymbolName["Constructor"] = "__constructor"; + InternalSymbolName["New"] = "__new"; + InternalSymbolName["Index"] = "__index"; + InternalSymbolName["ExportStar"] = "__export"; + InternalSymbolName["Global"] = "__global"; + InternalSymbolName["Missing"] = "__missing"; + InternalSymbolName["Type"] = "__type"; + InternalSymbolName["Object"] = "__object"; + InternalSymbolName["JSXAttributes"] = "__jsxAttributes"; + InternalSymbolName["Class"] = "__class"; + InternalSymbolName["Function"] = "__function"; + InternalSymbolName["Computed"] = "__computed"; + InternalSymbolName["AssignmentDeclaration"] = "__assignment"; + InternalSymbolName["InstantiationExpression"] = "__instantiationExpression"; + InternalSymbolName["ImportAttributes"] = "__importAttributes"; + InternalSymbolName["ExportEquals"] = "export="; + InternalSymbolName["Default"] = "default"; + InternalSymbolName["This"] = "this"; + InternalSymbolName["ModuleExports"] = "module.exports"; +})(InternalSymbolName || (InternalSymbolName = {})); +//# sourceMappingURL=internalSymbolName.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/internalSymbolName.js.map b/node_modules/typescript/dist/enums/internalSymbolName.js.map new file mode 100644 index 0000000..cdc60e0 --- /dev/null +++ b/node_modules/typescript/dist/enums/internalSymbolName.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internalSymbolName.js","sourceRoot":"","sources":["../../src/enums/internalSymbolName.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,MAAM,CAAC,IAAI,kBAAuB,CAAC;AACnC,CAAC,UAAU,kBAAkB;IACzB,kBAAkB,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC;IACtC,kBAAkB,CAAC,aAAa,CAAC,GAAG,eAAe,CAAC;IACpD,kBAAkB,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC;IACpC,kBAAkB,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;IACxC,kBAAkB,CAAC,YAAY,CAAC,GAAG,UAAU,CAAC;IAC9C,kBAAkB,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC;IAC1C,kBAAkB,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC;IAC5C,kBAAkB,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC;IACtC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC;IAC1C,kBAAkB,CAAC,eAAe,CAAC,GAAG,iBAAiB,CAAC;IACxD,kBAAkB,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;IACxC,kBAAkB,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC;IAC9C,kBAAkB,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC;IAC9C,kBAAkB,CAAC,uBAAuB,CAAC,GAAG,cAAc,CAAC;IAC7D,kBAAkB,CAAC,yBAAyB,CAAC,GAAG,2BAA2B,CAAC;IAC5E,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,oBAAoB,CAAC;IAC9D,kBAAkB,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC;IAC/C,kBAAkB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IAC1C,kBAAkB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IACpC,kBAAkB,CAAC,eAAe,CAAC,GAAG,gBAAgB,CAAC;AAC3D,CAAC,CAAC,CAAC,kBAAkB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/jsxEmit.d.ts b/node_modules/typescript/dist/enums/jsxEmit.d.ts new file mode 100644 index 0000000..30eb9f9 --- /dev/null +++ b/node_modules/typescript/dist/enums/jsxEmit.d.ts @@ -0,0 +1,2 @@ +export declare var JsxEmit: any; +//# sourceMappingURL=jsxEmit.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/jsxEmit.d.ts.map b/node_modules/typescript/dist/enums/jsxEmit.d.ts.map new file mode 100644 index 0000000..0e22a7e --- /dev/null +++ b/node_modules/typescript/dist/enums/jsxEmit.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"jsxEmit.d.ts","sourceRoot":"","sources":["../../src/enums/jsxEmit.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,OAAO,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts b/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts new file mode 100644 index 0000000..401ceba --- /dev/null +++ b/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts @@ -0,0 +1,9 @@ +export declare enum JsxEmit { + None = 0, + Preserve = 1, + ReactNative = 2, + React = 3, + ReactJSX = 4, + ReactJSXDev = 5 +} +//# sourceMappingURL=jsxEmit.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map b/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map new file mode 100644 index 0000000..27021a7 --- /dev/null +++ b/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"jsxEmit.enum.d.ts","sourceRoot":"","sources":["../../src/enums/jsxEmit.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,OAAO;IACf,IAAI,IAAI;IACR,QAAQ,IAAI;IACZ,WAAW,IAAI;IACf,KAAK,IAAI;IACT,QAAQ,IAAI;IACZ,WAAW,IAAI;CAClB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/jsxEmit.enum.js b/node_modules/typescript/dist/enums/jsxEmit.enum.js new file mode 100644 index 0000000..8da0e59 --- /dev/null +++ b/node_modules/typescript/dist/enums/jsxEmit.enum.js @@ -0,0 +1,11 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var JsxEmit; +(function (JsxEmit) { + JsxEmit[JsxEmit["None"] = 0] = "None"; + JsxEmit[JsxEmit["Preserve"] = 1] = "Preserve"; + JsxEmit[JsxEmit["ReactNative"] = 2] = "ReactNative"; + JsxEmit[JsxEmit["React"] = 3] = "React"; + JsxEmit[JsxEmit["ReactJSX"] = 4] = "ReactJSX"; + JsxEmit[JsxEmit["ReactJSXDev"] = 5] = "ReactJSXDev"; +})(JsxEmit || (JsxEmit = {})); +//# sourceMappingURL=jsxEmit.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/jsxEmit.enum.js.map b/node_modules/typescript/dist/enums/jsxEmit.enum.js.map new file mode 100644 index 0000000..ac916cd --- /dev/null +++ b/node_modules/typescript/dist/enums/jsxEmit.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"jsxEmit.enum.js","sourceRoot":"","sources":["../../src/enums/jsxEmit.enum.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,MAAM,CAAN,IAAY,OAOX;AAPD,WAAY,OAAO;IACf,qCAAQ,CAAA;IACR,6CAAY,CAAA;IACZ,mDAAe,CAAA;IACf,uCAAS,CAAA;IACT,6CAAY,CAAA;IACZ,mDAAe,CAAA;AACnB,CAAC,EAPW,OAAO,KAAP,OAAO,QAOlB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/jsxEmit.js b/node_modules/typescript/dist/enums/jsxEmit.js new file mode 100644 index 0000000..8189512 --- /dev/null +++ b/node_modules/typescript/dist/enums/jsxEmit.js @@ -0,0 +1,11 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var JsxEmit; +(function (JsxEmit) { + JsxEmit[JsxEmit["None"] = 0] = "None"; + JsxEmit[JsxEmit["Preserve"] = 1] = "Preserve"; + JsxEmit[JsxEmit["ReactNative"] = 2] = "ReactNative"; + JsxEmit[JsxEmit["React"] = 3] = "React"; + JsxEmit[JsxEmit["ReactJSX"] = 4] = "ReactJSX"; + JsxEmit[JsxEmit["ReactJSXDev"] = 5] = "ReactJSXDev"; +})(JsxEmit || (JsxEmit = {})); +//# sourceMappingURL=jsxEmit.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/jsxEmit.js.map b/node_modules/typescript/dist/enums/jsxEmit.js.map new file mode 100644 index 0000000..5f0fb6c --- /dev/null +++ b/node_modules/typescript/dist/enums/jsxEmit.js.map @@ -0,0 +1 @@ +{"version":3,"file":"jsxEmit.js","sourceRoot":"","sources":["../../src/enums/jsxEmit.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,CAAC,IAAI,OAAY,CAAC;AACxB,CAAC,UAAU,OAAO;IACd,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACtC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAC9C,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;IACpD,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IACxC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAC9C,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;AACxD,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/languageVariant.d.ts b/node_modules/typescript/dist/enums/languageVariant.d.ts new file mode 100644 index 0000000..2a62711 --- /dev/null +++ b/node_modules/typescript/dist/enums/languageVariant.d.ts @@ -0,0 +1,2 @@ +export declare var LanguageVariant: any; +//# sourceMappingURL=languageVariant.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/languageVariant.d.ts.map b/node_modules/typescript/dist/enums/languageVariant.d.ts.map new file mode 100644 index 0000000..2ddc035 --- /dev/null +++ b/node_modules/typescript/dist/enums/languageVariant.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"languageVariant.d.ts","sourceRoot":"","sources":["../../src/enums/languageVariant.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,eAAe,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/languageVariant.enum.d.ts b/node_modules/typescript/dist/enums/languageVariant.enum.d.ts new file mode 100644 index 0000000..88d53a0 --- /dev/null +++ b/node_modules/typescript/dist/enums/languageVariant.enum.d.ts @@ -0,0 +1,5 @@ +export declare enum LanguageVariant { + Standard = 0, + JSX = 1 +} +//# sourceMappingURL=languageVariant.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map b/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map new file mode 100644 index 0000000..371757b --- /dev/null +++ b/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"languageVariant.enum.d.ts","sourceRoot":"","sources":["../../src/enums/languageVariant.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACvB,QAAQ,IAAI;IACZ,GAAG,IAAI;CACV"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/languageVariant.enum.js b/node_modules/typescript/dist/enums/languageVariant.enum.js new file mode 100644 index 0000000..9c9734c --- /dev/null +++ b/node_modules/typescript/dist/enums/languageVariant.enum.js @@ -0,0 +1,6 @@ +export var LanguageVariant; +(function (LanguageVariant) { + LanguageVariant[LanguageVariant["Standard"] = 0] = "Standard"; + LanguageVariant[LanguageVariant["JSX"] = 1] = "JSX"; +})(LanguageVariant || (LanguageVariant = {})); +//# sourceMappingURL=languageVariant.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/languageVariant.enum.js.map b/node_modules/typescript/dist/enums/languageVariant.enum.js.map new file mode 100644 index 0000000..a586402 --- /dev/null +++ b/node_modules/typescript/dist/enums/languageVariant.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"languageVariant.enum.js","sourceRoot":"","sources":["../../src/enums/languageVariant.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,6DAAY,CAAA;IACZ,mDAAO,CAAA;AACX,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/languageVariant.js b/node_modules/typescript/dist/enums/languageVariant.js new file mode 100644 index 0000000..76dea7a --- /dev/null +++ b/node_modules/typescript/dist/enums/languageVariant.js @@ -0,0 +1,6 @@ +export var LanguageVariant; +(function (LanguageVariant) { + LanguageVariant[LanguageVariant["Standard"] = 0] = "Standard"; + LanguageVariant[LanguageVariant["JSX"] = 1] = "JSX"; +})(LanguageVariant || (LanguageVariant = {})); +//# sourceMappingURL=languageVariant.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/languageVariant.js.map b/node_modules/typescript/dist/enums/languageVariant.js.map new file mode 100644 index 0000000..f34cfb1 --- /dev/null +++ b/node_modules/typescript/dist/enums/languageVariant.js.map @@ -0,0 +1 @@ +{"version":3,"file":"languageVariant.js","sourceRoot":"","sources":["../../src/enums/languageVariant.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,eAAoB,CAAC;AAChC,CAAC,UAAU,eAAe;IACtB,eAAe,CAAC,eAAe,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAC9D,eAAe,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;AACxD,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/modifierFlags.d.ts b/node_modules/typescript/dist/enums/modifierFlags.d.ts new file mode 100644 index 0000000..bad24d1 --- /dev/null +++ b/node_modules/typescript/dist/enums/modifierFlags.d.ts @@ -0,0 +1,2 @@ +export declare var ModifierFlags: any; +//# sourceMappingURL=modifierFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/modifierFlags.d.ts.map b/node_modules/typescript/dist/enums/modifierFlags.d.ts.map new file mode 100644 index 0000000..7f508ac --- /dev/null +++ b/node_modules/typescript/dist/enums/modifierFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"modifierFlags.d.ts","sourceRoot":"","sources":["../../src/enums/modifierFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,aAAa,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts b/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts new file mode 100644 index 0000000..8663c7d --- /dev/null +++ b/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts @@ -0,0 +1,42 @@ +export declare enum ModifierFlags { + None = 0, + Public = 1, + Private = 2, + Protected = 4, + Readonly = 8, + Override = 16, + Export = 32, + Abstract = 64, + Ambient = 128, + Static = 256, + Accessor = 512, + Async = 1024, + Default = 2048, + Const = 4096, + In = 8192, + Out = 16384, + Decorator = 32768, + Deprecated = 65536, + JSDocPublic = 8388608, + JSDocPrivate = 16777216, + JSDocProtected = 33554432, + JSDocReadonly = 67108864, + JSDocOverride = 134217728, + HasComputedJSDocModifiers = 268435456, + HasComputedFlags = 536870912, + SyntacticOrJSDocModifiers = 31, + SyntacticOnlyModifiers = 65504, + SyntacticModifiers = 65535, + JSDocCacheOnlyModifiers = 260046848, + JSDocOnlyModifiers = 65536, + NonCacheOnlyModifiers = 131071, + AccessibilityModifier = 7, + ParameterPropertyModifier = 31, + NonPublicAccessibilityModifier = 6, + TypeScriptModifier = 28895, + ExportDefault = 2080, + All = 131071, + Modifier = 98303, + JavaScript = 3872 +} +//# sourceMappingURL=modifierFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map new file mode 100644 index 0000000..be734ff --- /dev/null +++ b/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"modifierFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/modifierFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,aAAa;IACrB,IAAI,IAAI;IACR,MAAM,IAAS;IACf,OAAO,IAAS;IAChB,SAAS,IAAS;IAClB,QAAQ,IAAS;IACjB,QAAQ,KAAS;IACjB,MAAM,KAAS;IACf,QAAQ,KAAS;IACjB,OAAO,MAAS;IAChB,MAAM,MAAS;IACf,QAAQ,MAAS;IACjB,KAAK,OAAU;IACf,OAAO,OAAU;IACjB,KAAK,OAAU;IACf,EAAE,OAAU;IACZ,GAAG,QAAU;IACb,SAAS,QAAU;IACnB,UAAU,QAAU;IACpB,WAAW,UAAU;IACrB,YAAY,WAAU;IACtB,cAAc,WAAU;IACxB,aAAa,WAAU;IACvB,aAAa,YAAU;IACvB,yBAAyB,YAAU;IACnC,gBAAgB,YAAU;IAC1B,yBAAyB,KAAqD;IAC9E,sBAAsB,QAAmG;IACzH,kBAAkB,QAAqD;IACvE,uBAAuB,YAA8E;IACrG,kBAAkB,QAAa;IAC/B,qBAAqB,SAA0E;IAC/F,qBAAqB,IAA+B;IACpD,yBAAyB,KAA8C;IACvE,8BAA8B,IAAsB;IACpD,kBAAkB,QAA6F;IAC/G,aAAa,OAAmB;IAChC,GAAG,SAAqK;IACxK,QAAQ,QAAmB;IAC3B,UAAU,OAA+C;CAC5D"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/modifierFlags.enum.js b/node_modules/typescript/dist/enums/modifierFlags.enum.js new file mode 100644 index 0000000..9eb81ad --- /dev/null +++ b/node_modules/typescript/dist/enums/modifierFlags.enum.js @@ -0,0 +1,44 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/modifierflags.go. DO NOT EDIT. +export var ModifierFlags; +(function (ModifierFlags) { + ModifierFlags[ModifierFlags["None"] = 0] = "None"; + ModifierFlags[ModifierFlags["Public"] = 1] = "Public"; + ModifierFlags[ModifierFlags["Private"] = 2] = "Private"; + ModifierFlags[ModifierFlags["Protected"] = 4] = "Protected"; + ModifierFlags[ModifierFlags["Readonly"] = 8] = "Readonly"; + ModifierFlags[ModifierFlags["Override"] = 16] = "Override"; + ModifierFlags[ModifierFlags["Export"] = 32] = "Export"; + ModifierFlags[ModifierFlags["Abstract"] = 64] = "Abstract"; + ModifierFlags[ModifierFlags["Ambient"] = 128] = "Ambient"; + ModifierFlags[ModifierFlags["Static"] = 256] = "Static"; + ModifierFlags[ModifierFlags["Accessor"] = 512] = "Accessor"; + ModifierFlags[ModifierFlags["Async"] = 1024] = "Async"; + ModifierFlags[ModifierFlags["Default"] = 2048] = "Default"; + ModifierFlags[ModifierFlags["Const"] = 4096] = "Const"; + ModifierFlags[ModifierFlags["In"] = 8192] = "In"; + ModifierFlags[ModifierFlags["Out"] = 16384] = "Out"; + ModifierFlags[ModifierFlags["Decorator"] = 32768] = "Decorator"; + ModifierFlags[ModifierFlags["Deprecated"] = 65536] = "Deprecated"; + ModifierFlags[ModifierFlags["JSDocPublic"] = 8388608] = "JSDocPublic"; + ModifierFlags[ModifierFlags["JSDocPrivate"] = 16777216] = "JSDocPrivate"; + ModifierFlags[ModifierFlags["JSDocProtected"] = 33554432] = "JSDocProtected"; + ModifierFlags[ModifierFlags["JSDocReadonly"] = 67108864] = "JSDocReadonly"; + ModifierFlags[ModifierFlags["JSDocOverride"] = 134217728] = "JSDocOverride"; + ModifierFlags[ModifierFlags["HasComputedJSDocModifiers"] = 268435456] = "HasComputedJSDocModifiers"; + ModifierFlags[ModifierFlags["HasComputedFlags"] = 536870912] = "HasComputedFlags"; + ModifierFlags[ModifierFlags["SyntacticOrJSDocModifiers"] = 31] = "SyntacticOrJSDocModifiers"; + ModifierFlags[ModifierFlags["SyntacticOnlyModifiers"] = 65504] = "SyntacticOnlyModifiers"; + ModifierFlags[ModifierFlags["SyntacticModifiers"] = 65535] = "SyntacticModifiers"; + ModifierFlags[ModifierFlags["JSDocCacheOnlyModifiers"] = 260046848] = "JSDocCacheOnlyModifiers"; + ModifierFlags[ModifierFlags["JSDocOnlyModifiers"] = 65536] = "JSDocOnlyModifiers"; + ModifierFlags[ModifierFlags["NonCacheOnlyModifiers"] = 131071] = "NonCacheOnlyModifiers"; + ModifierFlags[ModifierFlags["AccessibilityModifier"] = 7] = "AccessibilityModifier"; + ModifierFlags[ModifierFlags["ParameterPropertyModifier"] = 31] = "ParameterPropertyModifier"; + ModifierFlags[ModifierFlags["NonPublicAccessibilityModifier"] = 6] = "NonPublicAccessibilityModifier"; + ModifierFlags[ModifierFlags["TypeScriptModifier"] = 28895] = "TypeScriptModifier"; + ModifierFlags[ModifierFlags["ExportDefault"] = 2080] = "ExportDefault"; + ModifierFlags[ModifierFlags["All"] = 131071] = "All"; + ModifierFlags[ModifierFlags["Modifier"] = 98303] = "Modifier"; + ModifierFlags[ModifierFlags["JavaScript"] = 3872] = "JavaScript"; +})(ModifierFlags || (ModifierFlags = {})); +//# sourceMappingURL=modifierFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/modifierFlags.enum.js.map b/node_modules/typescript/dist/enums/modifierFlags.enum.js.map new file mode 100644 index 0000000..8c2d84f --- /dev/null +++ b/node_modules/typescript/dist/enums/modifierFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"modifierFlags.enum.js","sourceRoot":"","sources":["../../src/enums/modifierFlags.enum.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAEnG,MAAM,CAAN,IAAY,aAwCX;AAxCD,WAAY,aAAa;IACrB,iDAAQ,CAAA;IACR,qDAAe,CAAA;IACf,uDAAgB,CAAA;IAChB,2DAAkB,CAAA;IAClB,yDAAiB,CAAA;IACjB,0DAAiB,CAAA;IACjB,sDAAe,CAAA;IACf,0DAAiB,CAAA;IACjB,yDAAgB,CAAA;IAChB,uDAAe,CAAA;IACf,2DAAiB,CAAA;IACjB,sDAAe,CAAA;IACf,0DAAiB,CAAA;IACjB,sDAAe,CAAA;IACf,gDAAY,CAAA;IACZ,mDAAa,CAAA;IACb,+DAAmB,CAAA;IACnB,iEAAoB,CAAA;IACpB,qEAAqB,CAAA;IACrB,wEAAsB,CAAA;IACtB,4EAAwB,CAAA;IACxB,0EAAuB,CAAA;IACvB,2EAAuB,CAAA;IACvB,mGAAmC,CAAA;IACnC,iFAA0B,CAAA;IAC1B,4FAA8E,CAAA;IAC9E,yFAAyH,CAAA;IACzH,iFAAuE,CAAA;IACvE,+FAAqG,CAAA;IACrG,iFAA+B,CAAA;IAC/B,wFAA+F,CAAA;IAC/F,mFAAoD,CAAA;IACpD,4FAAuE,CAAA;IACvE,qGAAoD,CAAA;IACpD,iFAA+G,CAAA;IAC/G,sEAAgC,CAAA;IAChC,oDAAwK,CAAA;IACxK,6DAA2B,CAAA;IAC3B,gEAAyD,CAAA;AAC7D,CAAC,EAxCW,aAAa,KAAb,aAAa,QAwCxB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/modifierFlags.js b/node_modules/typescript/dist/enums/modifierFlags.js new file mode 100644 index 0000000..48d8d88 --- /dev/null +++ b/node_modules/typescript/dist/enums/modifierFlags.js @@ -0,0 +1,44 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/modifierflags.go. DO NOT EDIT. +export var ModifierFlags; +(function (ModifierFlags) { + ModifierFlags[ModifierFlags["None"] = 0] = "None"; + ModifierFlags[ModifierFlags["Public"] = 1] = "Public"; + ModifierFlags[ModifierFlags["Private"] = 2] = "Private"; + ModifierFlags[ModifierFlags["Protected"] = 4] = "Protected"; + ModifierFlags[ModifierFlags["Readonly"] = 8] = "Readonly"; + ModifierFlags[ModifierFlags["Override"] = 16] = "Override"; + ModifierFlags[ModifierFlags["Export"] = 32] = "Export"; + ModifierFlags[ModifierFlags["Abstract"] = 64] = "Abstract"; + ModifierFlags[ModifierFlags["Ambient"] = 128] = "Ambient"; + ModifierFlags[ModifierFlags["Static"] = 256] = "Static"; + ModifierFlags[ModifierFlags["Accessor"] = 512] = "Accessor"; + ModifierFlags[ModifierFlags["Async"] = 1024] = "Async"; + ModifierFlags[ModifierFlags["Default"] = 2048] = "Default"; + ModifierFlags[ModifierFlags["Const"] = 4096] = "Const"; + ModifierFlags[ModifierFlags["In"] = 8192] = "In"; + ModifierFlags[ModifierFlags["Out"] = 16384] = "Out"; + ModifierFlags[ModifierFlags["Decorator"] = 32768] = "Decorator"; + ModifierFlags[ModifierFlags["Deprecated"] = 65536] = "Deprecated"; + ModifierFlags[ModifierFlags["JSDocPublic"] = 8388608] = "JSDocPublic"; + ModifierFlags[ModifierFlags["JSDocPrivate"] = 16777216] = "JSDocPrivate"; + ModifierFlags[ModifierFlags["JSDocProtected"] = 33554432] = "JSDocProtected"; + ModifierFlags[ModifierFlags["JSDocReadonly"] = 67108864] = "JSDocReadonly"; + ModifierFlags[ModifierFlags["JSDocOverride"] = 134217728] = "JSDocOverride"; + ModifierFlags[ModifierFlags["HasComputedJSDocModifiers"] = 268435456] = "HasComputedJSDocModifiers"; + ModifierFlags[ModifierFlags["HasComputedFlags"] = 536870912] = "HasComputedFlags"; + ModifierFlags[ModifierFlags["SyntacticOrJSDocModifiers"] = 31] = "SyntacticOrJSDocModifiers"; + ModifierFlags[ModifierFlags["SyntacticOnlyModifiers"] = 65504] = "SyntacticOnlyModifiers"; + ModifierFlags[ModifierFlags["SyntacticModifiers"] = 65535] = "SyntacticModifiers"; + ModifierFlags[ModifierFlags["JSDocCacheOnlyModifiers"] = 260046848] = "JSDocCacheOnlyModifiers"; + ModifierFlags[ModifierFlags["JSDocOnlyModifiers"] = 65536] = "JSDocOnlyModifiers"; + ModifierFlags[ModifierFlags["NonCacheOnlyModifiers"] = 131071] = "NonCacheOnlyModifiers"; + ModifierFlags[ModifierFlags["AccessibilityModifier"] = 7] = "AccessibilityModifier"; + ModifierFlags[ModifierFlags["ParameterPropertyModifier"] = 31] = "ParameterPropertyModifier"; + ModifierFlags[ModifierFlags["NonPublicAccessibilityModifier"] = 6] = "NonPublicAccessibilityModifier"; + ModifierFlags[ModifierFlags["TypeScriptModifier"] = 28895] = "TypeScriptModifier"; + ModifierFlags[ModifierFlags["ExportDefault"] = 2080] = "ExportDefault"; + ModifierFlags[ModifierFlags["All"] = 131071] = "All"; + ModifierFlags[ModifierFlags["Modifier"] = 98303] = "Modifier"; + ModifierFlags[ModifierFlags["JavaScript"] = 3872] = "JavaScript"; +})(ModifierFlags || (ModifierFlags = {})); +//# sourceMappingURL=modifierFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/modifierFlags.js.map b/node_modules/typescript/dist/enums/modifierFlags.js.map new file mode 100644 index 0000000..67371ac --- /dev/null +++ b/node_modules/typescript/dist/enums/modifierFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"modifierFlags.js","sourceRoot":"","sources":["../../src/enums/modifierFlags.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,MAAM,CAAC,IAAI,aAAkB,CAAC;AAC9B,CAAC,UAAU,aAAa;IACpB,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAClD,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACtD,aAAa,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IACxD,aAAa,CAAC,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IAC5D,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAC1D,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IAC3D,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC;IACvD,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IAC3D,aAAa,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,GAAG,SAAS,CAAC;IAC1D,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC;IACxD,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,GAAG,UAAU,CAAC;IAC5D,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC,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AwB,CAAC;IAC1F,aAAa,CAAC,aAAa,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC;IAClF,aAAa,CAAC,aAAa,CAAC,yBAAyB,CAAC,GAAG,SAAS,CAAC,GAAG,yBAAyB,CAAC;IAChG,aAAa,CAAC,aAAa,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC;IAClF,aAAa,CAAC,aAAa,CAAC,uBAAuB,CAAC,GAAG,MAAM,CAAC,GAAG,uBAAuB,CAAC;IACzF,aAAa,CAAC,aAAa,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,GAAG,uBAAuB,CAAC;IACpF,aAAa,CAAC,aAAa,CAAC,2BAA2B,CAAC,GAAG,EAAE,CAAC,GAAG,2BAA2B,CAAC;IAC7F,aAAa,CAAC,aAAa,CAAC,gCAAgC,CAAC,GAAG,CAAC,CAAC,GAAG,gCAAgC,CAAC;IACtG,aAAa,CAAC,aAAa,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC;IAClF,aAAa,CAAC,aAAa,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,GAAG,eAAe,CAAC;IACvE,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC;IACrD,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,GAAG,UAAU,CAAC;IAC9D,aAAa,CAAC,aAAa,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,GAAG,YAAY,CAAC;AACrE,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts b/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts new file mode 100644 index 0000000..09e2bc4 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts @@ -0,0 +1,2 @@ +export declare var ModuleDetectionKind: any; +//# sourceMappingURL=moduleDetectionKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map b/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map new file mode 100644 index 0000000..2e30c20 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleDetectionKind.d.ts","sourceRoot":"","sources":["../../src/enums/moduleDetectionKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,mBAAmB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts new file mode 100644 index 0000000..a620bd0 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts @@ -0,0 +1,7 @@ +export declare enum ModuleDetectionKind { + None = 0, + Auto = 1, + Legacy = 2, + Force = 3 +} +//# sourceMappingURL=moduleDetectionKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map new file mode 100644 index 0000000..186e1f4 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleDetectionKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/moduleDetectionKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,mBAAmB;IAC3B,IAAI,IAAI;IACR,IAAI,IAAI;IACR,MAAM,IAAI;IACV,KAAK,IAAI;CACZ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js new file mode 100644 index 0000000..fb09242 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js @@ -0,0 +1,9 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var ModuleDetectionKind; +(function (ModuleDetectionKind) { + ModuleDetectionKind[ModuleDetectionKind["None"] = 0] = "None"; + ModuleDetectionKind[ModuleDetectionKind["Auto"] = 1] = "Auto"; + ModuleDetectionKind[ModuleDetectionKind["Legacy"] = 2] = "Legacy"; + ModuleDetectionKind[ModuleDetectionKind["Force"] = 3] = "Force"; +})(ModuleDetectionKind || (ModuleDetectionKind = {})); +//# sourceMappingURL=moduleDetectionKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map new file mode 100644 index 0000000..b7e10d9 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleDetectionKind.enum.js","sourceRoot":"","sources":["../../src/enums/moduleDetectionKind.enum.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,6DAAQ,CAAA;IACR,6DAAQ,CAAA;IACR,iEAAU,CAAA;IACV,+DAAS,CAAA;AACb,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.js b/node_modules/typescript/dist/enums/moduleDetectionKind.js new file mode 100644 index 0000000..61e7904 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleDetectionKind.js @@ -0,0 +1,9 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var ModuleDetectionKind; +(function (ModuleDetectionKind) { + ModuleDetectionKind[ModuleDetectionKind["None"] = 0] = "None"; + ModuleDetectionKind[ModuleDetectionKind["Auto"] = 1] = "Auto"; + ModuleDetectionKind[ModuleDetectionKind["Legacy"] = 2] = "Legacy"; + ModuleDetectionKind[ModuleDetectionKind["Force"] = 3] = "Force"; +})(ModuleDetectionKind || (ModuleDetectionKind = {})); +//# sourceMappingURL=moduleDetectionKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.js.map b/node_modules/typescript/dist/enums/moduleDetectionKind.js.map new file mode 100644 index 0000000..b29027f --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleDetectionKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleDetectionKind.js","sourceRoot":"","sources":["../../src/enums/moduleDetectionKind.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,CAAC,IAAI,mBAAwB,CAAC;AACpC,CAAC,UAAU,mBAAmB;IAC1B,mBAAmB,CAAC,mBAAmB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC9D,mBAAmB,CAAC,mBAAmB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC9D,mBAAmB,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IAClE,mBAAmB,CAAC,mBAAmB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;AACpE,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,mBAAmB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleKind.d.ts b/node_modules/typescript/dist/enums/moduleKind.d.ts new file mode 100644 index 0000000..7040651 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleKind.d.ts @@ -0,0 +1,2 @@ +export declare var ModuleKind: any; +//# sourceMappingURL=moduleKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleKind.d.ts.map b/node_modules/typescript/dist/enums/moduleKind.d.ts.map new file mode 100644 index 0000000..4dda4c1 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleKind.d.ts","sourceRoot":"","sources":["../../src/enums/moduleKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,UAAU,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleKind.enum.d.ts b/node_modules/typescript/dist/enums/moduleKind.enum.d.ts new file mode 100644 index 0000000..d1af5b7 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleKind.enum.d.ts @@ -0,0 +1,17 @@ +export declare enum ModuleKind { + None = 0, + CommonJS = 1, + AMD = 2, + UMD = 3, + System = 4, + ES2015 = 5, + ES2020 = 6, + ES2022 = 7, + ESNext = 99, + Node16 = 100, + Node18 = 101, + Node20 = 102, + NodeNext = 199, + Preserve = 200 +} +//# sourceMappingURL=moduleKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map b/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map new file mode 100644 index 0000000..5893dc5 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/moduleKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,UAAU;IAClB,IAAI,IAAI;IACR,QAAQ,IAAI;IACZ,GAAG,IAAI;IACP,GAAG,IAAI;IACP,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,KAAK;IACX,MAAM,MAAM;IACZ,MAAM,MAAM;IACZ,MAAM,MAAM;IACZ,QAAQ,MAAM;IACd,QAAQ,MAAM;CACjB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleKind.enum.js b/node_modules/typescript/dist/enums/moduleKind.enum.js new file mode 100644 index 0000000..d7d5346 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleKind.enum.js @@ -0,0 +1,19 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var ModuleKind; +(function (ModuleKind) { + ModuleKind[ModuleKind["None"] = 0] = "None"; + ModuleKind[ModuleKind["CommonJS"] = 1] = "CommonJS"; + ModuleKind[ModuleKind["AMD"] = 2] = "AMD"; + ModuleKind[ModuleKind["UMD"] = 3] = "UMD"; + ModuleKind[ModuleKind["System"] = 4] = "System"; + ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015"; + ModuleKind[ModuleKind["ES2020"] = 6] = "ES2020"; + ModuleKind[ModuleKind["ES2022"] = 7] = "ES2022"; + ModuleKind[ModuleKind["ESNext"] = 99] = "ESNext"; + ModuleKind[ModuleKind["Node16"] = 100] = "Node16"; + ModuleKind[ModuleKind["Node18"] = 101] = "Node18"; + ModuleKind[ModuleKind["Node20"] = 102] = "Node20"; + ModuleKind[ModuleKind["NodeNext"] = 199] = "NodeNext"; + ModuleKind[ModuleKind["Preserve"] = 200] = "Preserve"; +})(ModuleKind || (ModuleKind = {})); +//# sourceMappingURL=moduleKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleKind.enum.js.map b/node_modules/typescript/dist/enums/moduleKind.enum.js.map new file mode 100644 index 0000000..2b66cfc --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleKind.enum.js","sourceRoot":"","sources":["../../src/enums/moduleKind.enum.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,MAAM,CAAN,IAAY,UAeX;AAfD,WAAY,UAAU;IAClB,2CAAQ,CAAA;IACR,mDAAY,CAAA;IACZ,yCAAO,CAAA;IACP,yCAAO,CAAA;IACP,+CAAU,CAAA;IACV,+CAAU,CAAA;IACV,+CAAU,CAAA;IACV,+CAAU,CAAA;IACV,gDAAW,CAAA;IACX,iDAAY,CAAA;IACZ,iDAAY,CAAA;IACZ,iDAAY,CAAA;IACZ,qDAAc,CAAA;IACd,qDAAc,CAAA;AAClB,CAAC,EAfW,UAAU,KAAV,UAAU,QAerB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleKind.js b/node_modules/typescript/dist/enums/moduleKind.js new file mode 100644 index 0000000..7769937 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleKind.js @@ -0,0 +1,19 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var ModuleKind; +(function (ModuleKind) { + ModuleKind[ModuleKind["None"] = 0] = "None"; + ModuleKind[ModuleKind["CommonJS"] = 1] = "CommonJS"; + ModuleKind[ModuleKind["AMD"] = 2] = "AMD"; + ModuleKind[ModuleKind["UMD"] = 3] = "UMD"; + ModuleKind[ModuleKind["System"] = 4] = "System"; + ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015"; + ModuleKind[ModuleKind["ES2020"] = 6] = "ES2020"; + ModuleKind[ModuleKind["ES2022"] = 7] = "ES2022"; + ModuleKind[ModuleKind["ESNext"] = 99] = "ESNext"; + ModuleKind[ModuleKind["Node16"] = 100] = "Node16"; + ModuleKind[ModuleKind["Node18"] = 101] = "Node18"; + ModuleKind[ModuleKind["Node20"] = 102] = "Node20"; + ModuleKind[ModuleKind["NodeNext"] = 199] = "NodeNext"; + ModuleKind[ModuleKind["Preserve"] = 200] = "Preserve"; +})(ModuleKind || (ModuleKind = {})); +//# sourceMappingURL=moduleKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleKind.js.map b/node_modules/typescript/dist/enums/moduleKind.js.map new file mode 100644 index 0000000..3020dca --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleKind.js","sourceRoot":"","sources":["../../src/enums/moduleKind.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,CAAC,IAAI,UAAe,CAAC;AAC3B,CAAC,UAAU,UAAU;IACjB,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,GA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olutionKind.d.ts new file mode 100644 index 0000000..d9a16e3 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts @@ -0,0 +1,2 @@ +export declare var ModuleResolutionKind: any; +//# sourceMappingURL=moduleResolutionKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map b/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map new file mode 100644 index 0000000..26db07b --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleResolutionKind.d.ts","sourceRoot":"","sources":["../../src/enums/moduleResolutionKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,oBAAoB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts new file mode 100644 index 0000000..f3baec3 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts @@ -0,0 +1,9 @@ +export declare enum ModuleResolutionKind { + Unknown = 0, + Classic = 1, + Node10 = 2, + Node16 = 3, + NodeNext = 99, + Bundler = 100 +} +//# sourceMappingURL=moduleResolutionKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map new file mode 100644 index 0000000..f8f3aed --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleResolutionKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/moduleResolutionKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,oBAAoB;IAC5B,OAAO,IAAI;IACX,OAAO,IAAI;IACX,MAAM,IAAI;IACV,MAAM,IAAI;IACV,QAAQ,KAAK;IACb,OAAO,MAAM;CAChB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js new file mode 100644 index 0000000..1f22e9e --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js @@ -0,0 +1,11 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var ModuleResolutionKind; +(function (ModuleResolutionKind) { + ModuleResolutionKind[ModuleResolutionKind["Unknown"] = 0] = "Unknown"; + ModuleResolutionKind[ModuleResolutionKind["Classic"] = 1] = "Classic"; + ModuleResolutionKind[ModuleResolutionKind["Node10"] = 2] = "Node10"; + ModuleResolutionKind[ModuleResolutionKind["Node16"] = 3] = "Node16"; + ModuleResolutionKind[ModuleResolutionKind["NodeNext"] = 99] = "NodeNext"; + ModuleResolutionKind[ModuleResolutionKind["Bundler"] = 100] = "Bundler"; +})(ModuleResolutionKind || (ModuleResolutionKind = {})); +//# sourceMappingURL=moduleResolutionKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map new file mode 100644 index 0000000..4f3c073 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleResolutionKind.enum.js","sourceRoot":"","sources":["../../src/enums/moduleResolutionKind.enum.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,MAAM,CAAN,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC5B,qEAAW,CAAA;IACX,qEAAW,CAAA;IACX,mEAAU,CAAA;IACV,mEAAU,CAAA;IACV,wEAAa,CAAA;IACb,uEAAa,CAAA;AACjB,CAAC,EAPW,oBAAoB,KAApB,oBAAoB,QAO/B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.js b/node_modules/typescript/dist/enums/moduleResolutionKind.js new file mode 100644 index 0000000..a24922b --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleResolutionKind.js @@ -0,0 +1,11 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var ModuleResolutionKind; +(function (ModuleResolutionKind) { + ModuleResolutionKind[ModuleResolutionKind["Unknown"] = 0] = "Unknown"; + ModuleResolutionKind[ModuleResolutionKind["Classic"] = 1] = "Classic"; + ModuleResolutionKind[ModuleResolutionKind["Node10"] = 2] = "Node10"; + ModuleResolutionKind[ModuleResolutionKind["Node16"] = 3] = "Node16"; + ModuleResolutionKind[ModuleResolutionKind["NodeNext"] = 99] = "NodeNext"; + ModuleResolutionKind[ModuleResolutionKind["Bundler"] = 100] = "Bundler"; +})(ModuleResolutionKind || (ModuleResolutionKind = {})); +//# sourceMappingURL=moduleResolutionKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.js.map b/node_modules/typescript/dist/enums/moduleResolutionKind.js.map new file mode 100644 index 0000000..b4567a5 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleResolutionKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleResolutionKind.js","sourceRoot":"","sources":["../../src/enums/moduleResolutionKind.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,CAAC,IAAI,oBAAyB,CAAC;AACrC,CAAC,UAAU,oBAAoB;IAC3B,oBAAoB,CAAC,oBAAoB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IACtE,oBAAoB,CAAC,oBAAoB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IACtE,oBAAoB,CAAC,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACpE,oBAAoB,CAAC,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACpE,oBAAoB,CAAC,oBAAoB,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IACzE,oBAAoB,CAAC,oBAAoB,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,GAAG,SAAS,CAAC;AAC5E,CAAC,CAAC,CAAC,oBAAoB,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/newLineKind.d.ts b/node_modules/typescript/dist/enums/newLineKind.d.ts new file mode 100644 index 0000000..bab13b9 --- /dev/null +++ b/node_modules/typescript/dist/enums/newLineKind.d.ts @@ -0,0 +1,2 @@ +export declare var NewLineKind: any; +//# sourceMappingURL=newLineKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/newLineKind.d.ts.map b/node_modules/typescript/dist/enums/newLineKind.d.ts.map new file mode 100644 index 0000000..99aed21 --- /dev/null +++ b/node_modules/typescript/dist/enums/newLineKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"newLineKind.d.ts","sourceRoot":"","sources":["../../src/enums/newLineKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,WAAW,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/newLineKind.enum.d.ts b/node_modules/typescript/dist/enums/newLineKind.enum.d.ts new file mode 100644 index 0000000..a619044 --- /dev/null +++ b/node_modules/typescript/dist/enums/newLineKind.enum.d.ts @@ -0,0 +1,6 @@ +export declare enum NewLineKind { + None = 0, + CRLF = 1, + LF = 2 +} +//# sourceMappingURL=newLineKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map b/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map new file mode 100644 index 0000000..992d14e --- /dev/null +++ b/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"newLineKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/newLineKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACnB,IAAI,IAAI;IACR,IAAI,IAAI;IACR,EAAE,IAAI;CACT"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/newLineKind.enum.js b/node_modules/typescript/dist/enums/newLineKind.enum.js new file mode 100644 index 0000000..d4790e0 --- /dev/null +++ b/node_modules/typescript/dist/enums/newLineKind.enum.js @@ -0,0 +1,8 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var NewLineKind; +(function (NewLineKind) { + NewLineKind[NewLineKind["None"] = 0] = "None"; + NewLineKind[NewLineKind["CRLF"] = 1] = "CRLF"; + NewLineKind[NewLineKind["LF"] = 2] = "LF"; +})(NewLineKind || (NewLineKind = {})); +//# sourceMappingURL=newLineKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/newLineKind.enum.js.map b/node_modules/typescript/dist/enums/newLineKind.enum.js.map new file mode 100644 index 0000000..ce760ae --- /dev/null +++ b/node_modules/typescript/dist/enums/newLineKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"newLineKind.enum.js","sourceRoot":"","sources":["../../src/enums/newLineKind.enum.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACnB,6CAAQ,CAAA;IACR,6CAAQ,CAAA;IACR,yCAAM,CAAA;AACV,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/newLineKind.js b/node_modules/typescript/dist/enums/newLineKind.js new file mode 100644 index 0000000..c6679a9 --- /dev/null +++ b/node_modules/typescript/dist/enums/newLineKind.js @@ -0,0 +1,8 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var NewLineKind; +(function (NewLineKind) { + NewLineKind[NewLineKind["None"] = 0] = "None"; + NewLineKind[NewLineKind["CRLF"] = 1] = "CRLF"; + NewLineKind[NewLineKind["LF"] = 2] = "LF"; +})(NewLineKind || (NewLineKind = {})); +//# sourceMappingURL=newLineKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/newLineKind.js.map b/node_modules/typescript/dist/enums/newLineKind.js.map new file mode 100644 index 0000000..9de7078 --- /dev/null +++ b/node_modules/typescript/dist/enums/newLineKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"newLineKind.js","sourceRoot":"","sources":["../../src/enums/newLineKind.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,CAAC,IAAI,WAAgB,CAAC;AAC5B,CAAC,UAAU,WAAW;IAClB,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC9C,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC9C,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;AAC9C,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts b/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts new file mode 100644 index 0000000..26b893b --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts @@ -0,0 +1,2 @@ +export declare var NodeBuilderFlags: any; +//# sourceMappingURL=nodeBuilderFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map b/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map new file mode 100644 index 0000000..5f4b839 --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeBuilderFlags.d.ts","sourceRoot":"","sources":["../../src/enums/nodeBuilderFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,gBAAgB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts new file mode 100644 index 0000000..252840d --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts @@ -0,0 +1,36 @@ +export declare enum NodeBuilderFlags { + None = 0, + NoTruncation = 1, + WriteArrayAsGenericType = 2, + GenerateNamesForShadowedTypeParams = 4, + UseStructuralFallback = 8, + ForbidIndexedAccessSymbolReferences = 16, + WriteTypeArgumentsOfSignature = 32, + UseFullyQualifiedType = 64, + UseOnlyExternalAliasing = 128, + SuppressAnyReturnType = 256, + WriteTypeParametersInQualifiedName = 512, + MultilineObjectLiterals = 1024, + WriteClassExpressionAsTypeLiteral = 2048, + UseTypeOfFunction = 4096, + OmitParameterModifiers = 8192, + UseAliasDefinedOutsideCurrentScope = 16384, + UseSingleQuotesForStringLiteralType = 268435456, + NoTypeReduction = 536870912, + UseInstantiationExpressions = 1073741824, + OmitThisParameter = 33554432, + WriteCallStyleSignature = 134217728, + AllowThisInObjectLiteral = 32768, + AllowQualifiedNameInPlaceOfIdentifier = 65536, + AllowAnonymousIdentifier = 131072, + AllowEmptyUnionOrIntersection = 262144, + AllowEmptyTuple = 524288, + AllowUniqueESSymbolType = 1048576, + AllowEmptyIndexInfoType = 2097152, + AllowNodeModulesRelativePaths = 67108864, + IgnoreErrors = 70221824, + InObjectTypeLiteral = 4194304, + InTypeAlias = 8388608, + InInitialEntityName = 16777216 +} +//# sourceMappingURL=nodeBuilderFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map new file mode 100644 index 0000000..42c03ff --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeBuilderFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/nodeBuilderFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,gBAAgB;IACxB,IAAI,IAAI;IACR,YAAY,IAAS;IACrB,uBAAuB,IAAS;IAChC,kCAAkC,IAAS;IAC3C,qBAAqB,IAAS;IAC9B,mCAAmC,KAAS;IAC5C,6BAA6B,KAAS;IACtC,qBAAqB,KAAS;IAC9B,uBAAuB,MAAS;IAChC,qBAAqB,MAAS;IAC9B,kCAAkC,MAAS;IAC3C,uBAAuB,OAAU;IACjC,iCAAiC,OAAU;IAC3C,iBAAiB,OAAU;IAC3B,sBAAsB,OAAU;IAChC,kCAAkC,QAAU;IAC5C,mCAAmC,YAAU;IAC7C,eAAe,YAAU;IACzB,2BAA2B,aAAU;IACrC,iBAAiB,WAAU;IAC3B,uBAAuB,YAAU;IACjC,wBAAwB,QAAU;IAClC,qCAAqC,QAAU;IAC/C,wBAAwB,SAAU;IAClC,6BAA6B,SAAU;IACvC,eAAe,SAAU;IACzB,uBAAuB,UAAU;IACjC,uBAAuB,UAAU;IACjC,6BAA6B,WAAU;IACvC,YAAY,WAA0M;IACtN,mBAAmB,UAAU;IAC7B,WAAW,UAAU;IACrB,mBAAmB,WAAU;CAChC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js new file mode 100644 index 0000000..82092bd --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js @@ -0,0 +1,38 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/nodebuilder/types.go. DO NOT EDIT. +export var NodeBuilderFlags; +(function (NodeBuilderFlags) { + NodeBuilderFlags[NodeBuilderFlags["None"] = 0] = "None"; + NodeBuilderFlags[NodeBuilderFlags["NoTruncation"] = 1] = "NoTruncation"; + NodeBuilderFlags[NodeBuilderFlags["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType"; + NodeBuilderFlags[NodeBuilderFlags["GenerateNamesForShadowedTypeParams"] = 4] = "GenerateNamesForShadowedTypeParams"; + NodeBuilderFlags[NodeBuilderFlags["UseStructuralFallback"] = 8] = "UseStructuralFallback"; + NodeBuilderFlags[NodeBuilderFlags["ForbidIndexedAccessSymbolReferences"] = 16] = "ForbidIndexedAccessSymbolReferences"; + NodeBuilderFlags[NodeBuilderFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature"; + NodeBuilderFlags[NodeBuilderFlags["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType"; + NodeBuilderFlags[NodeBuilderFlags["UseOnlyExternalAliasing"] = 128] = "UseOnlyExternalAliasing"; + NodeBuilderFlags[NodeBuilderFlags["SuppressAnyReturnType"] = 256] = "SuppressAnyReturnType"; + NodeBuilderFlags[NodeBuilderFlags["WriteTypeParametersInQualifiedName"] = 512] = "WriteTypeParametersInQualifiedName"; + NodeBuilderFlags[NodeBuilderFlags["MultilineObjectLiterals"] = 1024] = "MultilineObjectLiterals"; + NodeBuilderFlags[NodeBuilderFlags["WriteClassExpressionAsTypeLiteral"] = 2048] = "WriteClassExpressionAsTypeLiteral"; + NodeBuilderFlags[NodeBuilderFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; + NodeBuilderFlags[NodeBuilderFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; + NodeBuilderFlags[NodeBuilderFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; + NodeBuilderFlags[NodeBuilderFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; + NodeBuilderFlags[NodeBuilderFlags["NoTypeReduction"] = 536870912] = "NoTypeReduction"; + NodeBuilderFlags[NodeBuilderFlags["UseInstantiationExpressions"] = 1073741824] = "UseInstantiationExpressions"; + NodeBuilderFlags[NodeBuilderFlags["OmitThisParameter"] = 33554432] = "OmitThisParameter"; + NodeBuilderFlags[NodeBuilderFlags["WriteCallStyleSignature"] = 134217728] = "WriteCallStyleSignature"; + NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 32768] = "AllowThisInObjectLiteral"; + NodeBuilderFlags[NodeBuilderFlags["AllowQualifiedNameInPlaceOfIdentifier"] = 65536] = "AllowQualifiedNameInPlaceOfIdentifier"; + NodeBuilderFlags[NodeBuilderFlags["AllowAnonymousIdentifier"] = 131072] = "AllowAnonymousIdentifier"; + NodeBuilderFlags[NodeBuilderFlags["AllowEmptyUnionOrIntersection"] = 262144] = "AllowEmptyUnionOrIntersection"; + NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 524288] = "AllowEmptyTuple"; + NodeBuilderFlags[NodeBuilderFlags["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType"; + NodeBuilderFlags[NodeBuilderFlags["AllowEmptyIndexInfoType"] = 2097152] = "AllowEmptyIndexInfoType"; + NodeBuilderFlags[NodeBuilderFlags["AllowNodeModulesRelativePaths"] = 67108864] = "AllowNodeModulesRelativePaths"; + NodeBuilderFlags[NodeBuilderFlags["IgnoreErrors"] = 70221824] = "IgnoreErrors"; + NodeBuilderFlags[NodeBuilderFlags["InObjectTypeLiteral"] = 4194304] = "InObjectTypeLiteral"; + NodeBuilderFlags[NodeBuilderFlags["InTypeAlias"] = 8388608] = "InTypeAlias"; + NodeBuilderFlags[NodeBuilderFlags["InInitialEntityName"] = 16777216] = "InInitialEntityName"; +})(NodeBuilderFlags || (NodeBuilderFlags = {})); +//# sourceMappingURL=nodeBuilderFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map new file mode 100644 index 0000000..5f2bbe3 --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeBuilderFlags.enum.js","sourceRoot":"","sources":["../../src/enums/nodeBuilderFlags.enum.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAEnG,MAAM,CAAN,IAAY,gBAkCX;AAlCD,WAAY,gBAAgB;IACxB,uDAAQ,CAAA;IACR,uEAAqB,CAAA;IACrB,6FAAgC,CAAA;IAChC,mHAA2C,CAAA;IAC3C,yFAA8B,CAAA;IAC9B,sHAA4C,CAAA;IAC5C,0GAAsC,CAAA;IACtC,0FAA8B,CAAA;IAC9B,+FAAgC,CAAA;IAChC,2FAA8B,CAAA;IAC9B,qHAA2C,CAAA;IAC3C,gGAAiC,CAAA;IACjC,oHAA2C,CAAA;IAC3C,oFAA2B,CAAA;IAC3B,8FAAgC,CAAA;IAChC,uHAA4C,CAAA;IAC5C,6HAA6C,CAAA;IAC7C,qFAAyB,CAAA;IACzB,8GAAqC,CAAA;IACrC,wFAA2B,CAAA;IAC3B,qGAAiC,CAAA;IACjC,mGAAkC,CAAA;IAClC,6HAA+C,CAAA;IAC/C,oGAAkC,CAAA;IAClC,8GAAuC,CAAA;IACvC,kFAAyB,CAAA;IACzB,mGAAiC,CAAA;IACjC,mGAAiC,CAAA;IACjC,gHAAuC,CAAA;IACvC,8EAAsN,CAAA;IACtN,2FAA6B,CAAA;IAC7B,2EAAqB,CAAA;IACrB,4FAA6B,CAAA;AACjC,CAAC,EAlCW,gBAAgB,KAAhB,gBAAgB,QAkC3B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.js b/node_modules/typescript/dist/enums/nodeBuilderFlags.js new file mode 100644 index 0000000..9e3cbaa --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.js @@ -0,0 +1,38 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/nodebuilder/types.go. DO NOT EDIT. +export var NodeBuilderFlags; +(function (NodeBuilderFlags) { + NodeBuilderFlags[NodeBuilderFlags["None"] = 0] = "None"; + NodeBuilderFlags[NodeBuilderFlags["NoTruncation"] = 1] = "NoTruncation"; + NodeBuilderFlags[NodeBuilderFlags["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType"; + NodeBuilderFlags[NodeBuilderFlags["GenerateNamesForShadowedTypeParams"] = 4] = "GenerateNamesForShadowedTypeParams"; + NodeBuilderFlags[NodeBuilderFlags["UseStructuralFallback"] = 8] = "UseStructuralFallback"; + NodeBuilderFlags[NodeBuilderFlags["ForbidIndexedAccessSymbolReferences"] = 16] = "ForbidIndexedAccessSymbolReferences"; + NodeBuilderFlags[NodeBuilderFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature"; + NodeBuilderFlags[NodeBuilderFlags["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType"; + NodeBuilderFlags[NodeBuilderFlags["UseOnlyExternalAliasing"] = 128] = "UseOnlyExternalAliasing"; + NodeBuilderFlags[NodeBuilderFlags["SuppressAnyReturnType"] = 256] = "SuppressAnyReturnType"; + NodeBuilderFlags[NodeBuilderFlags["WriteTypeParametersInQualifiedName"] = 512] = "WriteTypeParametersInQualifiedName"; + NodeBuilderFlags[NodeBuilderFlags["MultilineObjectLiterals"] = 1024] = "MultilineObjectLiterals"; + NodeBuilderFlags[NodeBuilderFlags["WriteClassExpressionAsTypeLiteral"] = 2048] = "WriteClassExpressionAsTypeLiteral"; + NodeBuilderFlags[NodeBuilderFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; + NodeBuilderFlags[NodeBuilderFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; + NodeBuilderFlags[NodeBuilderFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; + NodeBuilderFlags[NodeBuilderFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; + NodeBuilderFlags[NodeBuilderFlags["NoTypeReduction"] = 536870912] = "NoTypeReduction"; + NodeBuilderFlags[NodeBuilderFlags["UseInstantiationExpressions"] = 1073741824] = "UseInstantiationExpressions"; + NodeBuilderFlags[NodeBuilderFlags["OmitThisParameter"] = 33554432] = "OmitThisParameter"; + NodeBuilderFlags[NodeBuilderFlags["WriteCallStyleSignature"] = 134217728] = "WriteCallStyleSignature"; + NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 32768] = "AllowThisInObjectLiteral"; + NodeBuilderFlags[NodeBuilderFlags["AllowQualifiedNameInPlaceOfIdentifier"] = 65536] = "AllowQualifiedNameInPlaceOfIdentifier"; + NodeBuilderFlags[NodeBuilderFlags["AllowAnonymousIdentifier"] = 131072] = "AllowAnonymousIdentifier"; + NodeBuilderFlags[NodeBuilderFlags["AllowEmptyUnionOrIntersection"] = 262144] = "AllowEmptyUnionOrIntersection"; + NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 524288] = "AllowEmptyTuple"; + NodeBuilderFlags[NodeBuilderFlags["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType"; + NodeBuilderFlags[NodeBuilderFlags["AllowEmptyIndexInfoType"] = 2097152] = "AllowEmptyIndexInfoType"; + NodeBuilderFlags[NodeBuilderFlags["AllowNodeModulesRelativePaths"] = 67108864] = "AllowNodeModulesRelativePaths"; + NodeBuilderFlags[NodeBuilderFlags["IgnoreErrors"] = 70221824] = "IgnoreErrors"; + NodeBuilderFlags[NodeBuilderFlags["InObjectTypeLiteral"] = 4194304] = "InObjectTypeLiteral"; + NodeBuilderFlags[NodeBuilderFlags["InTypeAlias"] = 8388608] = "InTypeAlias"; + NodeBuilderFlags[NodeBuilderFlags["InInitialEntityName"] = 16777216] = "InInitialEntityName"; +})(NodeBuilderFlags || (NodeBuilderFlags = {})); +//# sourceMappingURL=nodeBuilderFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map b/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map new file mode 100644 index 0000000..08f20a9 --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":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gB,CAAC,yBAAyB,CAAC,GAAG,OAAO,CAAC,GAAG,yBAAyB,CAAC;IACpG,gBAAgB,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,GAAG,OAAO,CAAC,GAAG,yBAAyB,CAAC;IACpG,gBAAgB,CAAC,gBAAgB,CAAC,+BAA+B,CAAC,GAAG,QAAQ,CAAC,GAAG,+BAA+B,CAAC;IACjH,gBAAgB,CAAC,gBAAgB,CAAC,cAAc,CAAC,GAAG,QAAQ,CAAC,GAAG,cAAc,CAAC;IAC/E,gBAAgB,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,GAAG,qBAAqB,CAAC;IAC5F,gBAAgB,CAAC,gBAAgB,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,GAAG,aAAa,CAAC;IAC5E,gBAAgB,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,QAAQ,CAAC,GAAG,qBAAqB,CAAC;AACjG,CAAC,CAAC,CAAC,gBAAgB,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeFlags.d.ts b/node_modules/typescript/dist/enums/nodeFlags.d.ts new file mode 100644 index 0000000..63b27ee --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeFlags.d.ts @@ -0,0 +1,2 @@ +export declare var NodeFlags: any; +//# sourceMappingURL=nodeFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeFlags.d.ts.map b/node_modules/typescript/dist/enums/nodeFlags.d.ts.map new file mode 100644 index 0000000..d18921f --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeFlags.d.ts","sourceRoot":"","sources":["../../src/enums/nodeFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,SAAS,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts b/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts new file mode 100644 index 0000000..2ce097b --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts @@ -0,0 +1,44 @@ +export declare enum NodeFlags { + None = 0, + Let = 1, + Const = 2, + Using = 4, + Reparsed = 8, + Synthesized = 16, + OptionalChain = 32, + ExportContext = 64, + ContainsThis = 128, + HasImplicitReturn = 256, + HasExplicitReturn = 512, + DisallowInContext = 1024, + YieldContext = 2048, + DecoratorContext = 4096, + AwaitContext = 8192, + DisallowConditionalTypesContext = 16384, + ThisNodeHasError = 32768, + JavaScriptFile = 65536, + ThisNodeOrAnySubNodesHasError = 131072, + HasAsyncFunctions = 262144, + PossiblyContainsDynamicImport = 524288, + PossiblyContainsImportMeta = 1048576, + HasJSDoc = 2097152, + JSDoc = 4194304, + Ambient = 8388608, + InWithStatement = 16777216, + JsonFile = 33554432, + PossiblyContainsDeprecatedTag = 67108864, + Unreachable = 134217728, + ReparserTransformedLiteral = 268435456, + BlockScoped = 7, + Constant = 6, + AwaitUsing = 6, + ReachabilityCheckFlags = 768, + ReachabilityAndEmitFlags = 262912, + ContextFlags = 25263104, + TypeExcludesFlags = 10240, + PermanentlySetIncrementalFlags = 1572864, + IdentifierHasExtendedUnicodeEscape = 128, + IdentifierIsInJSDocNamespace = 262144, + NestedNamespace = 32 +} +//# sourceMappingURL=nodeFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map new file mode 100644 index 0000000..9af24d6 --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/nodeFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,SAAS;IACjB,IAAI,IAAI;IACR,GAAG,IAAS;IACZ,KAAK,IAAS;IACd,KAAK,IAAS;IACd,QAAQ,IAAS;IACjB,WAAW,KAAS;IACpB,aAAa,KAAS;IACtB,aAAa,KAAS;IACtB,YAAY,MAAS;IACrB,iBAAiB,MAAS;IAC1B,iBAAiB,MAAS;IAC1B,iBAAiB,OAAU;IAC3B,YAAY,OAAU;IACtB,gBAAgB,OAAU;IAC1B,YAAY,OAAU;IACtB,+BAA+B,QAAU;IACzC,gBAAgB,QAAU;IAC1B,cAAc,QAAU;IACxB,6BAA6B,SAAU;IACvC,iBAAiB,SAAU;IAC3B,6BAA6B,SAAU;IACvC,0BAA0B,UAAU;IACpC,QAAQ,UAAU;IAClB,KAAK,UAAU;IACf,OAAO,UAAU;IACjB,eAAe,WAAU;IACzB,QAAQ,WAAU;IAClB,6BAA6B,WAAU;IACvC,WAAW,YAAU;IACrB,0BAA0B,YAAU;IACpC,WAAW,IAAsB;IACjC,QAAQ,IAAgB;IACxB,UAAU,IAAgB;IAC1B,sBAAsB,MAAwC;IAC9D,wBAAwB,SAA6C;IACrE,YAAY,WAAoJ;IAChK,iBAAiB,QAA8B;IAC/C,8BAA8B,UAA6D;IAC3F,kCAAkC,MAAe;IACjD,4BAA4B,SAAoB;IAChD,eAAe,KAAgB;CAClC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeFlags.enum.js b/node_modules/typescript/dist/enums/nodeFlags.enum.js new file mode 100644 index 0000000..a54a2d7 --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeFlags.enum.js @@ -0,0 +1,46 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/nodeflags.go. DO NOT EDIT. +export var NodeFlags; +(function (NodeFlags) { + NodeFlags[NodeFlags["None"] = 0] = "None"; + NodeFlags[NodeFlags["Let"] = 1] = "Let"; + NodeFlags[NodeFlags["Const"] = 2] = "Const"; + NodeFlags[NodeFlags["Using"] = 4] = "Using"; + NodeFlags[NodeFlags["Reparsed"] = 8] = "Reparsed"; + NodeFlags[NodeFlags["Synthesized"] = 16] = "Synthesized"; + NodeFlags[NodeFlags["OptionalChain"] = 32] = "OptionalChain"; + NodeFlags[NodeFlags["ExportContext"] = 64] = "ExportContext"; + NodeFlags[NodeFlags["ContainsThis"] = 128] = "ContainsThis"; + NodeFlags[NodeFlags["HasImplicitReturn"] = 256] = "HasImplicitReturn"; + NodeFlags[NodeFlags["HasExplicitReturn"] = 512] = "HasExplicitReturn"; + NodeFlags[NodeFlags["DisallowInContext"] = 1024] = "DisallowInContext"; + NodeFlags[NodeFlags["YieldContext"] = 2048] = "YieldContext"; + NodeFlags[NodeFlags["DecoratorContext"] = 4096] = "DecoratorContext"; + NodeFlags[NodeFlags["AwaitContext"] = 8192] = "AwaitContext"; + NodeFlags[NodeFlags["DisallowConditionalTypesContext"] = 16384] = "DisallowConditionalTypesContext"; + NodeFlags[NodeFlags["ThisNodeHasError"] = 32768] = "ThisNodeHasError"; + NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile"; + NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError"; + NodeFlags[NodeFlags["HasAsyncFunctions"] = 262144] = "HasAsyncFunctions"; + NodeFlags[NodeFlags["PossiblyContainsDynamicImport"] = 524288] = "PossiblyContainsDynamicImport"; + NodeFlags[NodeFlags["PossiblyContainsImportMeta"] = 1048576] = "PossiblyContainsImportMeta"; + NodeFlags[NodeFlags["HasJSDoc"] = 2097152] = "HasJSDoc"; + NodeFlags[NodeFlags["JSDoc"] = 4194304] = "JSDoc"; + NodeFlags[NodeFlags["Ambient"] = 8388608] = "Ambient"; + NodeFlags[NodeFlags["InWithStatement"] = 16777216] = "InWithStatement"; + NodeFlags[NodeFlags["JsonFile"] = 33554432] = "JsonFile"; + NodeFlags[NodeFlags["PossiblyContainsDeprecatedTag"] = 67108864] = "PossiblyContainsDeprecatedTag"; + NodeFlags[NodeFlags["Unreachable"] = 134217728] = "Unreachable"; + NodeFlags[NodeFlags["ReparserTransformedLiteral"] = 268435456] = "ReparserTransformedLiteral"; + NodeFlags[NodeFlags["BlockScoped"] = 7] = "BlockScoped"; + NodeFlags[NodeFlags["Constant"] = 6] = "Constant"; + NodeFlags[NodeFlags["AwaitUsing"] = 6] = "AwaitUsing"; + NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 768] = "ReachabilityCheckFlags"; + NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 262912] = "ReachabilityAndEmitFlags"; + NodeFlags[NodeFlags["ContextFlags"] = 25263104] = "ContextFlags"; + NodeFlags[NodeFlags["TypeExcludesFlags"] = 10240] = "TypeExcludesFlags"; + NodeFlags[NodeFlags["PermanentlySetIncrementalFlags"] = 1572864] = "PermanentlySetIncrementalFlags"; + NodeFlags[NodeFlags["IdentifierHasExtendedUnicodeEscape"] = 128] = "IdentifierHasExtendedUnicodeEscape"; + NodeFlags[NodeFlags["IdentifierIsInJSDocNamespace"] = 262144] = "IdentifierIsInJSDocNamespace"; + NodeFlags[NodeFlags["NestedNamespace"] = 32] = "NestedNamespace"; +})(NodeFlags || (NodeFlags = {})); +//# sourceMappingURL=nodeFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeFlags.enum.js.map b/node_modules/typescript/dist/enums/nodeFlags.enum.js.map new file mode 100644 index 0000000..6516f16 --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeFlags.enum.js","sourceRoot":"","sources":["../../src/enums/nodeFlags.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,SA0CX;AA1CD,WAAY,SAAS;IACjB,yCAAQ,CAAA;IACR,uCAAY,CAAA;IACZ,2CAAc,CAAA;IACd,2CAAc,CAAA;IACd,iDAAiB,CAAA;IACjB,wDAAoB,CAAA;IACpB,4DAAsB,CAAA;IACtB,4DAAsB,CAAA;IACtB,2DAAqB,CAAA;IACrB,qEAA0B,CAAA;IAC1B,qEAA0B,CAAA;IAC1B,sEAA2B,CAAA;IAC3B,4DAAsB,CAAA;IACtB,oEAA0B,CAAA;IAC1B,4DAAsB,CAAA;IACtB,mGAAyC,CAAA;IACzC,qEAA0B,CAAA;IAC1B,iEAAwB,CAAA;IACxB,gGAAuC,CAAA;IACvC,wEAA2B,CAAA;IAC3B,gGAAuC,CAAA;IACvC,2FAAoC,CAAA;IACpC,uDAAkB,CAAA;IAClB,iDAAe,CAAA;IACf,qDAAiB,CAAA;IACjB,sEAAyB,CAAA;IACzB,wDAAkB,CAAA;IAClB,kGAAuC,CAAA;IACvC,+DAAqB,CAAA;IACrB,6FAAoC,CAAA;IACpC,uDAAiC,CAAA;IACjC,iDAAwB,CAAA;IACxB,qDAA0B,CAAA;IAC1B,+EAA8D,CAAA;IAC9D,sFAAqE,CAAA;IACrE,gEAAgK,CAAA;IAChK,uEAA+C,CAAA;IAC/C,mGAA2F,CAAA;IAC3F,uGAAiD,CAAA;IACjD,8FAAgD,CAAA;IAChD,gEAA+B,CAAA;AACnC,CAAC,EA1CW,SAAS,KAAT,SAAS,QA0CpB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeFlags.js b/node_modules/typescript/dist/enums/nodeFlags.js new file mode 100644 index 0000000..06c1688 --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeFlags.js @@ -0,0 +1,46 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/nodeflags.go. DO NOT EDIT. +export var NodeFlags; +(function (NodeFlags) { + NodeFlags[NodeFlags["None"] = 0] = "None"; + NodeFlags[NodeFlags["Let"] = 1] = "Let"; + NodeFlags[NodeFlags["Const"] = 2] = "Const"; + NodeFlags[NodeFlags["Using"] = 4] = "Using"; + NodeFlags[NodeFlags["Reparsed"] = 8] = "Reparsed"; + NodeFlags[NodeFlags["Synthesized"] = 16] = "Synthesized"; + NodeFlags[NodeFlags["OptionalChain"] = 32] = "OptionalChain"; + NodeFlags[NodeFlags["ExportContext"] = 64] = "ExportContext"; + NodeFlags[NodeFlags["ContainsThis"] = 128] = "ContainsThis"; + NodeFlags[NodeFlags["HasImplicitReturn"] = 256] = "HasImplicitReturn"; + NodeFlags[NodeFlags["HasExplicitReturn"] = 512] = "HasExplicitReturn"; + NodeFlags[NodeFlags["DisallowInContext"] = 1024] = "DisallowInContext"; + NodeFlags[NodeFlags["YieldContext"] = 2048] = "YieldContext"; + NodeFlags[NodeFlags["DecoratorContext"] = 4096] = "DecoratorContext"; + NodeFlags[NodeFlags["AwaitContext"] = 8192] = "AwaitContext"; + NodeFlags[NodeFlags["DisallowConditionalTypesContext"] = 16384] = "DisallowConditionalTypesContext"; + NodeFlags[NodeFlags["ThisNodeHasError"] = 32768] = "ThisNodeHasError"; + NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile"; + NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError"; + NodeFlags[NodeFlags["HasAsyncFunctions"] = 262144] = "HasAsyncFunctions"; + NodeFlags[NodeFlags["PossiblyContainsDynamicImport"] = 524288] = "PossiblyContainsDynamicImport"; + NodeFlags[NodeFlags["PossiblyContainsImportMeta"] = 1048576] = "PossiblyContainsImportMeta"; + NodeFlags[NodeFlags["HasJSDoc"] = 2097152] = "HasJSDoc"; + NodeFlags[NodeFlags["JSDoc"] = 4194304] = "JSDoc"; + NodeFlags[NodeFlags["Ambient"] = 8388608] = "Ambient"; + NodeFlags[NodeFlags["InWithStatement"] = 16777216] = "InWithStatement"; + NodeFlags[NodeFlags["JsonFile"] = 33554432] = "JsonFile"; + NodeFlags[NodeFlags["PossiblyContainsDeprecatedTag"] = 67108864] = "PossiblyContainsDeprecatedTag"; + NodeFlags[NodeFlags["Unreachable"] = 134217728] = "Unreachable"; + NodeFlags[NodeFlags["ReparserTransformedLiteral"] = 268435456] = "ReparserTransformedLiteral"; + NodeFlags[NodeFlags["BlockScoped"] = 7] = "BlockScoped"; + NodeFlags[NodeFlags["Constant"] = 6] = "Constant"; + NodeFlags[NodeFlags["AwaitUsing"] = 6] = "AwaitUsing"; + NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 768] = "ReachabilityCheckFlags"; + NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 262912] = "ReachabilityAndEmitFlags"; + NodeFlags[NodeFlags["ContextFlags"] = 25263104] = "ContextFlags"; + NodeFlags[NodeFlags["TypeExcludesFlags"] = 10240] = "TypeExcludesFlags"; + NodeFlags[NodeFlags["PermanentlySetIncrementalFlags"] = 1572864] = "PermanentlySetIncrementalFlags"; + NodeFlags[NodeFlags["IdentifierHasExtendedUnicodeEscape"] = 128] = "IdentifierHasExtendedUnicodeEscape"; + NodeFlags[NodeFlags["IdentifierIsInJSDocNamespace"] = 262144] = "IdentifierIsInJSDocNamespace"; + NodeFlags[NodeFlags["NestedNamespace"] = 32] = "NestedNamespace"; +})(NodeFlags || (NodeFlags = {})); +//# sourceMappingURL=nodeFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeFlags.js.map b/node_modules/typescript/dist/enums/nodeFlags.js.map new file mode 100644 index 0000000..8d2d11d --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeFlags.js","sourceRoot":"","sources":["../../src/enums/nodeFlags.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,SAAc,CAAC;AAC1B,CAAC,UAAU,SAAS;IAChB,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC1C,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IACxC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAC5C,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAC5C,SAAS,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AAG,MAAM,CAAC,GAAG,0BAA0B,CAAC;IACvF,SAAS,CAAC,SAAS,CAAC,cAAc,CAAC,GAAG,QAAQ,CAAC,GAAG,cAAc,CAAC;IACjE,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAAC,GAAG,KAAK,CAAC,GAAG,mBAAmB,CAAC;IACxE,SAAS,CAAC,SAAS,CAAC,gCAAgC,CAAC,GAAG,OAAO,CAAC,GAAG,gCAAgC,CAAC;IACpG,SAAS,CAAC,SAAS,CAAC,oCAAoC,CAAC,GAAG,GAAG,CAAC,GAAG,oCAAoC,CAAC;IACxG,SAAS,CAAC,SAAS,CAAC,8BAA8B,CAAC,GAAG,MAAM,CAAC,GAAG,8BAA8B,CAAC;IAC/F,SAAS,CAAC,SAAS,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC,GAAG,iBAAiB,CAAC;AACrE,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/objectFlags.d.ts b/node_modules/typescript/dist/enums/objectFlags.d.ts new file mode 100644 index 0000000..1abaea2 --- /dev/null +++ b/node_modules/typescript/dist/enums/objectFlags.d.ts @@ -0,0 +1,2 @@ +export declare var ObjectFlags: any; +//# sourceMappingURL=objectFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/objectFlags.d.ts.map b/node_modules/typescript/dist/enums/objectFlags.d.ts.map new file mode 100644 index 0000000..6958584 --- /dev/null +++ b/node_modules/typescript/dist/enums/objectFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"objectFlags.d.ts","sourceRoot":"","sources":["../../src/enums/objectFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,WAAW,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/objectFlags.enum.d.ts b/node_modules/typescript/dist/enums/objectFlags.enum.d.ts new file mode 100644 index 0000000..1339a6a --- /dev/null +++ b/node_modules/typescript/dist/enums/objectFlags.enum.d.ts @@ -0,0 +1,50 @@ +export declare enum ObjectFlags { + None = 0, + Class = 1, + Interface = 2, + Reference = 4, + Tuple = 8, + Anonymous = 16, + Mapped = 32, + Instantiated = 64, + ObjectLiteral = 128, + EvolvingArray = 256, + ObjectLiteralPatternWithComputedProperties = 512, + ReverseMapped = 1024, + JsxAttributes = 2048, + JSLiteral = 4096, + FreshLiteral = 8192, + ArrayLiteral = 16384, + PrimitiveUnion = 32768, + ContainsWideningType = 65536, + ContainsObjectOrArrayLiteral = 131072, + NonInferrableType = 262144, + CouldContainTypeVariablesComputed = 524288, + CouldContainTypeVariables = 1048576, + MembersResolved = 2097152, + ClassOrInterface = 3, + RequiresWidening = 196608, + PropagatingFlags = 458752, + InstantiatedMapped = 96, + InstantiationExpressionType = 16777216, + SingleSignatureType = 33554432, + ObjectTypeKindMask = 50332991, + ContainsSpread = 4194304, + ObjectRestType = 8388608, + IsClassInstanceClone = 67108864, + IdenticalBaseTypeCalculated = 134217728, + IdenticalBaseTypeExists = 268435456, + UnresolvedMembers = 536870912, + FromTypeNode = 1073741824, + IsGenericTypeComputed = 4194304, + IsGenericObjectType = 8388608, + IsGenericIndexType = 16777216, + IsGenericType = 25165824, + ContainsIntersections = 33554432, + IsUnknownLikeUnionComputed = 67108864, + IsUnknownLikeUnion = 134217728, + IsNeverIntersectionComputed = 33554432, + IsNeverIntersection = 67108864, + IsConstrainedTypeVariable = 134217728 +} +//# sourceMappingURL=objectFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map new file mode 100644 index 0000000..5c25831 --- /dev/null +++ b/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"objectFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/objectFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACnB,IAAI,IAAI;IACR,KAAK,IAAS;IACd,SAAS,IAAS;IAClB,SAAS,IAAS;IAClB,KAAK,IAAS;IACd,SAAS,KAAS;IAClB,MAAM,KAAS;IACf,YAAY,KAAS;IACrB,aAAa,MAAS;IACtB,aAAa,MAAS;IACtB,0CAA0C,MAAS;IACnD,aAAa,OAAU;IACvB,aAAa,OAAU;IACvB,SAAS,OAAU;IACnB,YAAY,OAAU;IACtB,YAAY,QAAU;IACtB,cAAc,QAAU;IACxB,oBAAoB,QAAU;IAC9B,4BAA4B,SAAU;IACtC,iBAAiB,SAAU;IAC3B,iCAAiC,SAAU;IAC3C,yBAAyB,UAAU;IACnC,eAAe,UAAU;IACzB,gBAAgB,IAAoB;IACpC,gBAAgB,SAAsD;IACtE,gBAAgB,SAA0E;IAC1F,kBAAkB,KAAwB;IAC1C,2BAA2B,WAAU;IACrC,mBAAmB,WAAU;IAC7B,kBAAkB,WAAgJ;IAClK,cAAc,UAAU;IACxB,cAAc,UAAU;IACxB,oBAAoB,WAAU;IAC9B,2BAA2B,YAAU;IACrC,uBAAuB,YAAU;IACjC,iBAAiB,YAAU;IAC3B,YAAY,aAAU;IACtB,qBAAqB,UAAU;IAC/B,mBAAmB,UAAU;IAC7B,kBAAkB,WAAU;IAC5B,aAAa,WAA2C;IACxD,qBAAqB,WAAU;IAC/B,0BAA0B,WAAU;IACpC,kBAAkB,YAAU;IAC5B,2BAA2B,WAAU;IACrC,mBAAmB,WAAU;IAC7B,yBAAyB,YAAU;CACtC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/objectFlags.enum.js b/node_modules/typescript/dist/enums/objectFlags.enum.js new file mode 100644 index 0000000..ee2b669 --- /dev/null +++ b/node_modules/typescript/dist/enums/objectFlags.enum.js @@ -0,0 +1,52 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var ObjectFlags; +(function (ObjectFlags) { + ObjectFlags[ObjectFlags["None"] = 0] = "None"; + ObjectFlags[ObjectFlags["Class"] = 1] = "Class"; + ObjectFlags[ObjectFlags["Interface"] = 2] = "Interface"; + ObjectFlags[ObjectFlags["Reference"] = 4] = "Reference"; + ObjectFlags[ObjectFlags["Tuple"] = 8] = "Tuple"; + ObjectFlags[ObjectFlags["Anonymous"] = 16] = "Anonymous"; + ObjectFlags[ObjectFlags["Mapped"] = 32] = "Mapped"; + ObjectFlags[ObjectFlags["Instantiated"] = 64] = "Instantiated"; + ObjectFlags[ObjectFlags["ObjectLiteral"] = 128] = "ObjectLiteral"; + ObjectFlags[ObjectFlags["EvolvingArray"] = 256] = "EvolvingArray"; + ObjectFlags[ObjectFlags["ObjectLiteralPatternWithComputedProperties"] = 512] = "ObjectLiteralPatternWithComputedProperties"; + ObjectFlags[ObjectFlags["ReverseMapped"] = 1024] = "ReverseMapped"; + ObjectFlags[ObjectFlags["JsxAttributes"] = 2048] = "JsxAttributes"; + ObjectFlags[ObjectFlags["JSLiteral"] = 4096] = "JSLiteral"; + ObjectFlags[ObjectFlags["FreshLiteral"] = 8192] = "FreshLiteral"; + ObjectFlags[ObjectFlags["ArrayLiteral"] = 16384] = "ArrayLiteral"; + ObjectFlags[ObjectFlags["PrimitiveUnion"] = 32768] = "PrimitiveUnion"; + ObjectFlags[ObjectFlags["ContainsWideningType"] = 65536] = "ContainsWideningType"; + ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 131072] = "ContainsObjectOrArrayLiteral"; + ObjectFlags[ObjectFlags["NonInferrableType"] = 262144] = "NonInferrableType"; + ObjectFlags[ObjectFlags["CouldContainTypeVariablesComputed"] = 524288] = "CouldContainTypeVariablesComputed"; + ObjectFlags[ObjectFlags["CouldContainTypeVariables"] = 1048576] = "CouldContainTypeVariables"; + ObjectFlags[ObjectFlags["MembersResolved"] = 2097152] = "MembersResolved"; + ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface"; + ObjectFlags[ObjectFlags["RequiresWidening"] = 196608] = "RequiresWidening"; + ObjectFlags[ObjectFlags["PropagatingFlags"] = 458752] = "PropagatingFlags"; + ObjectFlags[ObjectFlags["InstantiatedMapped"] = 96] = "InstantiatedMapped"; + ObjectFlags[ObjectFlags["InstantiationExpressionType"] = 16777216] = "InstantiationExpressionType"; + ObjectFlags[ObjectFlags["SingleSignatureType"] = 33554432] = "SingleSignatureType"; + ObjectFlags[ObjectFlags["ObjectTypeKindMask"] = 50332991] = "ObjectTypeKindMask"; + ObjectFlags[ObjectFlags["ContainsSpread"] = 4194304] = "ContainsSpread"; + ObjectFlags[ObjectFlags["ObjectRestType"] = 8388608] = "ObjectRestType"; + ObjectFlags[ObjectFlags["IsClassInstanceClone"] = 67108864] = "IsClassInstanceClone"; + ObjectFlags[ObjectFlags["IdenticalBaseTypeCalculated"] = 134217728] = "IdenticalBaseTypeCalculated"; + ObjectFlags[ObjectFlags["IdenticalBaseTypeExists"] = 268435456] = "IdenticalBaseTypeExists"; + ObjectFlags[ObjectFlags["UnresolvedMembers"] = 536870912] = "UnresolvedMembers"; + ObjectFlags[ObjectFlags["FromTypeNode"] = 1073741824] = "FromTypeNode"; + ObjectFlags[ObjectFlags["IsGenericTypeComputed"] = 4194304] = "IsGenericTypeComputed"; + ObjectFlags[ObjectFlags["IsGenericObjectType"] = 8388608] = "IsGenericObjectType"; + ObjectFlags[ObjectFlags["IsGenericIndexType"] = 16777216] = "IsGenericIndexType"; + ObjectFlags[ObjectFlags["IsGenericType"] = 25165824] = "IsGenericType"; + ObjectFlags[ObjectFlags["ContainsIntersections"] = 33554432] = "ContainsIntersections"; + ObjectFlags[ObjectFlags["IsUnknownLikeUnionComputed"] = 67108864] = "IsUnknownLikeUnionComputed"; + ObjectFlags[ObjectFlags["IsUnknownLikeUnion"] = 134217728] = "IsUnknownLikeUnion"; + ObjectFlags[ObjectFlags["IsNeverIntersectionComputed"] = 33554432] = "IsNeverIntersectionComputed"; + ObjectFlags[ObjectFlags["IsNeverIntersection"] = 67108864] = "IsNeverIntersection"; + ObjectFlags[ObjectFlags["IsConstrainedTypeVariable"] = 134217728] = "IsConstrainedTypeVariable"; +})(ObjectFlags || (ObjectFlags = {})); +//# sourceMappingURL=objectFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/objectFlags.enum.js.map b/node_modules/typescript/dist/enums/objectFlags.enum.js.map new file mode 100644 index 0000000..89871aa --- /dev/null +++ b/node_modules/typescript/dist/enums/objectFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"objectFlags.enum.js","sourceRoot":"","sources":["../../src/enums/objectFlags.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,WAgDX;AAhDD,WAAY,WAAW;IACnB,6CAAQ,CAAA;IACR,+CAAc,CAAA;IACd,uDAAkB,CAAA;IAClB,uDAAkB,CAAA;IAClB,+CAAc,CAAA;IACd,wDAAkB,CAAA;IAClB,kDAAe,CAAA;IACf,8DAAqB,CAAA;IACrB,iEAAsB,CAAA;IACtB,iEAAsB,CAAA;IACtB,2HAAmD,CAAA;IACnD,kEAAuB,CAAA;IACvB,kEAAuB,CAAA;IACvB,0DAAmB,CAAA;IACnB,gEAAsB,CAAA;IACtB,iEAAsB,CAAA;IACtB,qEAAwB,CAAA;IACxB,iFAA8B,CAAA;IAC9B,kGAAsC,CAAA;IACtC,4EAA2B,CAAA;IAC3B,4GAA2C,CAAA;IAC3C,6FAAmC,CAAA;IACnC,yEAAyB,CAAA;IACzB,qEAAoC,CAAA;IACpC,0EAAsE,CAAA;IACtE,0EAA0F,CAAA;IAC1F,0EAA0C,CAAA;IAC1C,kGAAqC,CAAA;IACrC,kFAA6B,CAAA;IAC7B,gFAAkK,CAAA;IAClK,uEAAwB,CAAA;IACxB,uEAAwB,CAAA;IACxB,oFAA8B,CAAA;IAC9B,mGAAqC,CAAA;IACrC,2FAAiC,CAAA;IACjC,+EAA2B,CAAA;IAC3B,sEAAsB,CAAA;IACtB,qFAA+B,CAAA;IAC/B,iFAA6B,CAAA;IAC7B,gFAA4B,CAAA;IAC5B,sEAAwD,CAAA;IACxD,sFAA+B,CAAA;IAC/B,gGAAoC,CAAA;IACpC,iFAA4B,CAAA;IAC5B,kGAAqC,CAAA;IACrC,kFAA6B,CAAA;IAC7B,+FAAmC,CAAA;AACvC,CAAC,EAhDW,WAAW,KAAX,WAAW,QAgDtB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/objectFlags.js b/node_modules/typescript/dist/enums/objectFlags.js new file mode 100644 index 0000000..09df289 --- /dev/null +++ b/node_modules/typescript/dist/enums/objectFlags.js @@ -0,0 +1,52 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var ObjectFlags; +(function (ObjectFlags) { + ObjectFlags[ObjectFlags["None"] = 0] = "None"; + ObjectFlags[ObjectFlags["Class"] = 1] = "Class"; + ObjectFlags[ObjectFlags["Interface"] = 2] = "Interface"; + ObjectFlags[ObjectFlags["Reference"] = 4] = "Reference"; + ObjectFlags[ObjectFlags["Tuple"] = 8] = "Tuple"; + ObjectFlags[ObjectFlags["Anonymous"] = 16] = "Anonymous"; + ObjectFlags[ObjectFlags["Mapped"] = 32] = "Mapped"; + ObjectFlags[ObjectFlags["Instantiated"] = 64] = "Instantiated"; + ObjectFlags[ObjectFlags["ObjectLiteral"] = 128] = "ObjectLiteral"; + ObjectFlags[ObjectFlags["EvolvingArray"] = 256] = "EvolvingArray"; + ObjectFlags[ObjectFlags["ObjectLiteralPatternWithComputedProperties"] = 512] = "ObjectLiteralPatternWithComputedProperties"; + ObjectFlags[ObjectFlags["ReverseMapped"] = 1024] = "ReverseMapped"; + ObjectFlags[ObjectFlags["JsxAttributes"] = 2048] = "JsxAttributes"; + ObjectFlags[ObjectFlags["JSLiteral"] = 4096] = "JSLiteral"; + ObjectFlags[ObjectFlags["FreshLiteral"] = 8192] = "FreshLiteral"; + ObjectFlags[ObjectFlags["ArrayLiteral"] = 16384] = "ArrayLiteral"; + ObjectFlags[ObjectFlags["PrimitiveUnion"] = 32768] = "PrimitiveUnion"; + ObjectFlags[ObjectFlags["ContainsWideningType"] = 65536] = "ContainsWideningType"; + ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 131072] = "ContainsObjectOrArrayLiteral"; + ObjectFlags[ObjectFlags["NonInferrableType"] = 262144] = "NonInferrableType"; + ObjectFlags[ObjectFlags["CouldContainTypeVariablesComputed"] = 524288] = "CouldContainTypeVariablesComputed"; + ObjectFlags[ObjectFlags["CouldContainTypeVariables"] = 1048576] = "CouldContainTypeVariables"; + ObjectFlags[ObjectFlags["MembersResolved"] = 2097152] = "MembersResolved"; + ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface"; + ObjectFlags[ObjectFlags["RequiresWidening"] = 196608] = "RequiresWidening"; + ObjectFlags[ObjectFlags["PropagatingFlags"] = 458752] = "PropagatingFlags"; + ObjectFlags[ObjectFlags["InstantiatedMapped"] = 96] = "InstantiatedMapped"; + ObjectFlags[ObjectFlags["InstantiationExpressionType"] = 16777216] = "InstantiationExpressionType"; + ObjectFlags[ObjectFlags["SingleSignatureType"] = 33554432] = "SingleSignatureType"; + ObjectFlags[ObjectFlags["ObjectTypeKindMask"] = 50332991] = "ObjectTypeKindMask"; + ObjectFlags[ObjectFlags["ContainsSpread"] = 4194304] = "ContainsSpread"; + ObjectFlags[ObjectFlags["ObjectRestType"] = 8388608] = "ObjectRestType"; + ObjectFlags[ObjectFlags["IsClassInstanceClone"] = 67108864] = "IsClassInstanceClone"; + ObjectFlags[ObjectFlags["IdenticalBaseTypeCalculated"] = 134217728] = "IdenticalBaseTypeCalculated"; + ObjectFlags[ObjectFlags["IdenticalBaseTypeExists"] = 268435456] = "IdenticalBaseTypeExists"; + ObjectFlags[ObjectFlags["UnresolvedMembers"] = 536870912] = "UnresolvedMembers"; + ObjectFlags[ObjectFlags["FromTypeNode"] = 1073741824] = "FromTypeNode"; + ObjectFlags[ObjectFlags["IsGenericTypeComputed"] = 4194304] = "IsGenericTypeComputed"; + ObjectFlags[ObjectFlags["IsGenericObjectType"] = 8388608] = "IsGenericObjectType"; + ObjectFlags[ObjectFlags["IsGenericIndexType"] = 16777216] = "IsGenericIndexType"; + ObjectFlags[ObjectFlags["IsGenericType"] = 25165824] = "IsGenericType"; + ObjectFlags[ObjectFlags["ContainsIntersections"] = 33554432] = "ContainsIntersections"; + ObjectFlags[ObjectFlags["IsUnknownLikeUnionComputed"] = 67108864] = "IsUnknownLikeUnionComputed"; + ObjectFlags[ObjectFlags["IsUnknownLikeUnion"] = 134217728] = "IsUnknownLikeUnion"; + ObjectFlags[ObjectFlags["IsNeverIntersectionComputed"] = 33554432] = "IsNeverIntersectionComputed"; + ObjectFlags[ObjectFlags["IsNeverIntersection"] = 67108864] = "IsNeverIntersection"; + ObjectFlags[ObjectFlags["IsConstrainedTypeVariable"] = 134217728] = "IsConstrainedTypeVariable"; +})(ObjectFlags || (ObjectFlags = {})); +//# sourceMappingURL=objectFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/objectFlags.js.map b/node_modules/typescript/dist/enums/objectFlags.js.map new file mode 100644 index 0000000..0dceb41 --- /dev/null +++ b/node_modules/typescript/dist/enums/objectFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"objectFlags.js","sourceRoot":"","sources":["../../src/enums/objectFlags.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,WAAgB,CAAC;AAC5B,CAAC,UAAU,WAAW;IAClB,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC9C,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAChD,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IACxD,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IACx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d.ts new file mode 100644 index 0000000..40792ee --- /dev/null +++ b/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts @@ -0,0 +1,2 @@ +export declare var OuterExpressionKinds: any; +//# sourceMappingURL=outerExpressionKinds.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map b/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map new file mode 100644 index 0000000..e37ad24 --- /dev/null +++ b/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"outerExpressionKinds.d.ts","sourceRoot":"","sources":["../../src/enums/outerExpressionKinds.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,oBAAoB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts new file mode 100644 index 0000000..744b8df --- /dev/null +++ b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts @@ -0,0 +1,16 @@ +export declare enum OuterExpressionKinds { + Parentheses = 1, + TypeAssertions = 2, + NonNullAssertions = 4, + PartiallyEmittedExpressions = 8, + ExpressionsWithTypeArguments = 16, + Satisfies = 32, + ExcludeJSDocTypeAssertion = 64, + Assignments = 128, + Comma = 256, + Assertions = 38, + All = 63, + AllExceptAssertionsOrExpressionsWithTypeArguments = 9, + ExpressionTypePassthrough = 385 +} +//# sourceMappingURL=outerExpressionKinds.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map new file mode 100644 index 0000000..e384e35 --- /dev/null +++ b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"outerExpressionKinds.enum.d.ts","sourceRoot":"","sources":["../../src/enums/outerExpressionKinds.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,oBAAoB;IAC5B,WAAW,IAAS;IACpB,cAAc,IAAS;IACvB,iBAAiB,IAAS;IAC1B,2BAA2B,IAAS;IACpC,4BAA4B,KAAS;IACrC,SAAS,KAAS;IAClB,yBAAyB,KAAS;IAClC,WAAW,MAAS;IACpB,KAAK,MAAS;IACd,UAAU,KAAiD;IAC3D,GAAG,KAAwF;IAC3F,iDAAiD,IAAoD;IACrG,yBAAyB,MAAoC;CAChE"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js new file mode 100644 index 0000000..38ee9af --- /dev/null +++ b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js @@ -0,0 +1,18 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/utilities.go. DO NOT EDIT. +export var OuterExpressionKinds; +(function (OuterExpressionKinds) { + OuterExpressionKinds[OuterExpressionKinds["Parentheses"] = 1] = "Parentheses"; + OuterExpressionKinds[OuterExpressionKinds["TypeAssertions"] = 2] = "TypeAssertions"; + OuterExpressionKinds[OuterExpressionKinds["NonNullAssertions"] = 4] = "NonNullAssertions"; + OuterExpressionKinds[OuterExpressionKinds["PartiallyEmittedExpressions"] = 8] = "PartiallyEmittedExpressions"; + OuterExpressionKinds[OuterExpressionKinds["ExpressionsWithTypeArguments"] = 16] = "ExpressionsWithTypeArguments"; + OuterExpressionKinds[OuterExpressionKinds["Satisfies"] = 32] = "Satisfies"; + OuterExpressionKinds[OuterExpressionKinds["ExcludeJSDocTypeAssertion"] = 64] = "ExcludeJSDocTypeAssertion"; + OuterExpressionKinds[OuterExpressionKinds["Assignments"] = 128] = "Assignments"; + OuterExpressionKinds[OuterExpressionKinds["Comma"] = 256] = "Comma"; + OuterExpressionKinds[OuterExpressionKinds["Assertions"] = 38] = "Assertions"; + OuterExpressionKinds[OuterExpressionKinds["All"] = 63] = "All"; + OuterExpressionKinds[OuterExpressionKinds["AllExceptAssertionsOrExpressionsWithTypeArguments"] = 9] = "AllExceptAssertionsOrExpressionsWithTypeArguments"; + OuterExpressionKinds[OuterExpressionKinds["ExpressionTypePassthrough"] = 385] = "ExpressionTypePassthrough"; +})(OuterExpressionKinds || (OuterExpressionKinds = {})); +//# sourceMappingURL=outerExpressionKinds.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map new file mode 100644 index 0000000..5a22619 --- /dev/null +++ b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"outerExpressionKinds.enum.js","sourceRoot":"","sources":["../../src/enums/outerExpressionKinds.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,oBAcX;AAdD,WAAY,oBAAoB;IAC5B,6EAAoB,CAAA;IACpB,mFAAuB,CAAA;IACvB,yFAA0B,CAAA;IAC1B,6GAAoC,CAAA;IACpC,gHAAqC,CAAA;IACrC,0EAAkB,CAAA;IAClB,0GAAkC,CAAA;IAClC,+EAAoB,CAAA;IACpB,mEAAc,CAAA;IACd,4EAA2D,CAAA;IAC3D,8DAA2F,CAAA;IAC3F,yJAAqG,CAAA;IACrG,2GAA6D,CAAA;AACjE,CAAC,EAdW,oBAAoB,KAApB,oBAAoB,QAc/B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.js b/node_modules/typescript/dist/enums/outerExpressionKinds.js new file mode 100644 index 0000000..ee02d82 --- /dev/null +++ b/node_modules/typescript/dist/enums/outerExpressionKinds.js @@ -0,0 +1,18 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/utilities.go. DO NOT EDIT. +export var OuterExpressionKinds; +(function (OuterExpressionKinds) { + OuterExpressionKinds[OuterExpressionKinds["Parentheses"] = 1] = "Parentheses"; + OuterExpressionKinds[OuterExpressionKinds["TypeAssertions"] = 2] = "TypeAssertions"; + OuterExpressionKinds[OuterExpressionKinds["NonNullAssertions"] = 4] = "NonNullAssertions"; + OuterExpressionKinds[OuterExpressionKinds["PartiallyEmittedExpressions"] = 8] = "PartiallyEmittedExpressions"; + OuterExpressionKinds[OuterExpressionKinds["ExpressionsWithTypeArguments"] = 16] = "ExpressionsWithTypeArguments"; + OuterExpressionKinds[OuterExpressionKinds["Satisfies"] = 32] = "Satisfies"; + OuterExpressionKinds[OuterExpressionKinds["ExcludeJSDocTypeAssertion"] = 64] = "ExcludeJSDocTypeAssertion"; + OuterExpressionKinds[OuterExpressionKinds["Assignments"] = 128] = "Assignments"; + OuterExpressionKinds[OuterExpressionKinds["Comma"] = 256] = "Comma"; + OuterExpressionKinds[OuterExpressionKinds["Assertions"] = 38] = "Assertions"; + OuterExpressionKinds[OuterExpressionKinds["All"] = 63] = "All"; + OuterExpressionKinds[OuterExpressionKinds["AllExceptAssertionsOrExpressionsWithTypeArguments"] = 9] = "AllExceptAssertionsOrExpressionsWithTypeArguments"; + OuterExpressionKinds[OuterExpressionKinds["ExpressionTypePassthrough"] = 385] = "ExpressionTypePassthrough"; +})(OuterExpressionKinds || (OuterExpressionKinds = {})); +//# sourceMappingURL=outerExpressionKinds.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.js.map b/node_modules/typescript/dist/enums/outerExpressionKinds.js.map new file mode 100644 index 0000000..79a9e89 --- /dev/null +++ b/node_modules/typescript/dist/enums/outerExpressionKinds.js.map @@ -0,0 +1 @@ +{"version":3,"file":"outerExpressionKinds.js","sourceRoot":"","sources":["../../src/enums/outerExpressionKinds.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,oBAAyB,CAAC;AACrC,CAAC,UAAU,oBAAoB;IAC3B,oBAAoB,CAAC,oBAAoB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;IAC9E,oBAAoB,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,gBAAgB,CAAC;IACpF,oBAAoB,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,GAAG,mBAAmB,CAAC;IAC1F,oBAAoB,CAAC,oBAAoB,CAAC,6BAA6B,CAAC,GAAG,CAAC,CAAC,GAAG,6BAA6B,CAAC;IAC9G,oBAAoB,CAAC,oBAAoB,CAAC,8BAA8B,CAAC,GAAG,EAAE,CAAC,GAAG,8BAA8B,CAAC;IACjH,oBAAoB,CAAC,oBAAoB,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,GAAG,WAAW,CAAC;IAC3E,oBAAoB,CAAC,oBAAoB,CAAC,2BAA2B,CAAC,GAAG,EAAE,CAAC,GAAG,2BAA2B,CAAC;IAC3G,oBAAoB,CAAC,oBAAoB,CAAC,aAAa,CAAC,GAAG,GAAG,CAAC,GAAG,aAAa,CAAC;IAChF,oBAAoB,CAAC,oBAAoB,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC,GAAG,OAAO,CAAC;IACpE,oBAAoB,CAAC,oBAAoB,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,GAAG,YAAY,CAAC;IAC7E,oBAAoB,CAAC,oBAAoB,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,GAAG,KAAK,CAAC;IAC/D,oBAAoB,CAAC,oBAAoB,CAAC,mDAAmD,CAAC,GAAG,CAAC,CAAC,GAAG,mDAAmD,CAAC;IAC1J,oBAAoB,CAAC,oBAAoB,CAAC,2BAA2B,CAAC,GAAG,GAAG,CAAC,GAAG,2BAA2B,CAAC;AAChH,CAAC,CAAC,CAAC,oBAAoB,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts b/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts new file mode 100644 index 0000000..bd90aa0 --- /dev/null +++ b/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts @@ -0,0 +1,2 @@ +export declare var RegularExpressionFlags: any; +//# sourceMappingURL=regularExpressionFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map b/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map new file mode 100644 index 0000000..cd0e2e8 --- /dev/null +++ b/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"regularExpressionFlags.d.ts","sourceRoot":"","sources":["../../src/enums/regularExpressionFlags.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,sBAAsB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts new file mode 100644 index 0000000..2245516 --- /dev/null +++ b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts @@ -0,0 +1,13 @@ +export declare enum RegularExpressionFlags { + None = 0, + HasIndices = 1, + Global = 2, + IgnoreCase = 4, + Multiline = 8, + DotAll = 16, + Unicode = 32, + UnicodeSets = 64, + Sticky = 128, + AnyUnicodeMode = 96 +} +//# sourceMappingURL=regularExpressionFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map new file mode 100644 index 0000000..78e5f52 --- /dev/null +++ b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"regularExpressionFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/regularExpressionFlags.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB;IAC9B,IAAI,IAAI;IACR,UAAU,IAAS;IACnB,MAAM,IAAS;IACf,UAAU,IAAS;IACnB,SAAS,IAAS;IAClB,MAAM,KAAS;IACf,OAAO,KAAS;IAChB,WAAW,KAAS;IACpB,MAAM,MAAS;IACf,cAAc,KAAwB;CACzC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js new file mode 100644 index 0000000..f0e40c6 --- /dev/null +++ b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js @@ -0,0 +1,14 @@ +export var RegularExpressionFlags; +(function (RegularExpressionFlags) { + RegularExpressionFlags[RegularExpressionFlags["None"] = 0] = "None"; + RegularExpressionFlags[RegularExpressionFlags["HasIndices"] = 1] = "HasIndices"; + RegularExpressionFlags[RegularExpressionFlags["Global"] = 2] = "Global"; + RegularExpressionFlags[RegularExpressionFlags["IgnoreCase"] = 4] = "IgnoreCase"; + RegularExpressionFlags[RegularExpressionFlags["Multiline"] = 8] = "Multiline"; + RegularExpressionFlags[RegularExpressionFlags["DotAll"] = 16] = "DotAll"; + RegularExpressionFlags[RegularExpressionFlags["Unicode"] = 32] = "Unicode"; + RegularExpressionFlags[RegularExpressionFlags["UnicodeSets"] = 64] = "UnicodeSets"; + RegularExpressionFlags[RegularExpressionFlags["Sticky"] = 128] = "Sticky"; + RegularExpressionFlags[RegularExpressionFlags["AnyUnicodeMode"] = 96] = "AnyUnicodeMode"; +})(RegularExpressionFlags || (RegularExpressionFlags = {})); +//# sourceMappingURL=regularExpressionFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map new file mode 100644 index 0000000..e8cbb91 --- /dev/null +++ b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"regularExpressionFlags.enum.js","sourceRoot":"","sources":["../../src/enums/regularExpressionFlags.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,sBAWX;AAXD,WAAY,sBAAsB;IAC9B,mEAAQ,CAAA;IACR,+EAAmB,CAAA;IACnB,uEAAe,CAAA;IACf,+EAAmB,CAAA;IACnB,6EAAkB,CAAA;IAClB,wEAAe,CAAA;IACf,0EAAgB,CAAA;IAChB,kFAAoB,CAAA;IACpB,yEAAe,CAAA;IACf,wFAAsC,CAAA;AAC1C,CAAC,EAXW,sBAAsB,KAAtB,sBAAsB,QAWjC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.js b/node_modules/typescript/dist/enums/regularExpressionFlags.js new file mode 100644 index 0000000..0a42b37 --- /dev/null +++ b/node_modules/typescript/dist/enums/regularExpressionFlags.js @@ -0,0 +1,14 @@ +export var RegularExpressionFlags; +(function (RegularExpressionFlags) { + RegularExpressionFlags[RegularExpressionFlags["None"] = 0] = "None"; + RegularExpressionFlags[RegularExpressionFlags["HasIndices"] = 1] = "HasIndices"; + RegularExpressionFlags[RegularExpressionFlags["Global"] = 2] = "Global"; + RegularExpressionFlags[RegularExpressionFlags["IgnoreCase"] = 4] = "IgnoreCase"; + RegularExpressionFlags[RegularExpressionFlags["Multiline"] = 8] = "Multiline"; + RegularExpressionFlags[RegularExpressionFlags["DotAll"] = 16] = "DotAll"; + RegularExpressionFlags[RegularExpressionFlags["Unicode"] = 32] = "Unicode"; + RegularExpressionFlags[RegularExpressionFlags["UnicodeSets"] = 64] = "UnicodeSets"; + RegularExpressionFlags[RegularExpressionFlags["Sticky"] = 128] = "Sticky"; + RegularExpressionFlags[RegularExpressionFlags["AnyUnicodeMode"] = 96] = "AnyUnicodeMode"; +})(RegularExpressionFlags || (RegularExpressionFlags = {})); +//# sourceMappingURL=regularExpressionFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.js.map b/node_modules/typescript/dist/enums/regularExpressionFlags.js.map new file mode 100644 index 0000000..2e0abc3 --- /dev/null +++ b/node_modules/typescript/dist/enums/regularExpressionFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"regularExpressionFlags.js","sourceRoot":"","sources":["../../src/enums/regularExpressionFlags.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,sBAA2B,CAAC;AACvC,CAAC,UAAU,sBAAsB;IAC7B,sBAAsB,CAAC,sBAAsB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACpE,sBAAsB,CAAC,sBAAsB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC;IAChF,sBAAsB,CAAC,sBAAsB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACxE,sBAAsB,CAAC,sBAAsB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC;IAChF,sBAAsB,CAAC,sBAAsB,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IAC9E,sBAAsB,CAAC,sBAAsB,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC;IACzE,sBAAsB,CAAC,sBAAsB,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC;IAC3E,sBAAsB,CAAC,sBAAsB,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,GAAG,aAAa,CAAC;IACnF,sBAAsB,CAAC,sBAAsB,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC;IAC1E,sBAAsB,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC,GAAG,gBAAgB,CAAC;AAC7F,CAAC,CAAC,CAAC,sBAAsB,IAAI,CAAC,sBAAsB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptKind.d.ts b/node_modules/typescript/dist/enums/scriptKind.d.ts new file mode 100644 index 0000000..d6e8066 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptKind.d.ts @@ -0,0 +1,2 @@ +export declare var ScriptKind: any; +//# sourceMappingURL=scriptKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptKind.d.ts.map b/node_modules/typescript/dist/enums/scriptKind.d.ts.map new file mode 100644 index 0000000..96a351d --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scriptKind.d.ts","sourceRoot":"","sources":["../../src/enums/scriptKind.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,UAAU,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptKind.enum.d.ts b/node_modules/typescript/dist/enums/scriptKind.enum.d.ts new file mode 100644 index 0000000..1619aa8 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptKind.enum.d.ts @@ -0,0 +1,11 @@ +export declare enum ScriptKind { + Unknown = 0, + JS = 1, + JSX = 2, + TS = 3, + TSX = 4, + External = 5, + JSON = 6, + Deferred = 7 +} +//# sourceMappingURL=scriptKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map b/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map new file mode 100644 index 0000000..f866236 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scriptKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/scriptKind.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IAClB,OAAO,IAAI;IACX,EAAE,IAAI;IACN,GAAG,IAAI;IACP,EAAE,IAAI;IACN,GAAG,IAAI;IACP,QAAQ,IAAI;IACZ,IAAI,IAAI;IACR,QAAQ,IAAI;CACf"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptKind.enum.js b/node_modules/typescript/dist/enums/scriptKind.enum.js new file mode 100644 index 0000000..508c364 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptKind.enum.js @@ -0,0 +1,12 @@ +export var ScriptKind; +(function (ScriptKind) { + ScriptKind[ScriptKind["Unknown"] = 0] = "Unknown"; + ScriptKind[ScriptKind["JS"] = 1] = "JS"; + ScriptKind[ScriptKind["JSX"] = 2] = "JSX"; + ScriptKind[ScriptKind["TS"] = 3] = "TS"; + ScriptKind[ScriptKind["TSX"] = 4] = "TSX"; + ScriptKind[ScriptKind["External"] = 5] = "External"; + ScriptKind[ScriptKind["JSON"] = 6] = "JSON"; + ScriptKind[ScriptKind["Deferred"] = 7] = "Deferred"; +})(ScriptKind || (ScriptKind = {})); +//# sourceMappingURL=scriptKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptKind.enum.js.map b/node_modules/typescript/dist/enums/scriptKind.enum.js.map new file mode 100644 index 0000000..d46698b --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scriptKind.enum.js","sourceRoot":"","sources":["../../src/enums/scriptKind.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,UASX;AATD,WAAY,UAAU;IAClB,iDAAW,CAAA;IACX,uCAAM,CAAA;IACN,yCAAO,CAAA;IACP,uCAAM,CAAA;IACN,yCAAO,CAAA;IACP,mDAAY,CAAA;IACZ,2CAAQ,CAAA;IACR,mDAAY,CAAA;AAChB,CAAC,EATW,UAAU,KAAV,UAAU,QASrB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptKind.js b/node_modules/typescript/dist/enums/scriptKind.js new file mode 100644 index 0000000..0ea80e1 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptKind.js @@ -0,0 +1,12 @@ +export var ScriptKind; +(function (ScriptKind) { + ScriptKind[ScriptKind["Unknown"] = 0] = "Unknown"; + ScriptKind[ScriptKind["JS"] = 1] = "JS"; + ScriptKind[ScriptKind["JSX"] = 2] = "JSX"; + ScriptKind[ScriptKind["TS"] = 3] = "TS"; + ScriptKind[ScriptKind["TSX"] = 4] = "TSX"; + ScriptKind[ScriptKind["External"] = 5] = "External"; + ScriptKind[ScriptKind["JSON"] = 6] = "JSON"; + ScriptKind[ScriptKind["Deferred"] = 7] = "Deferred"; +})(ScriptKind || (ScriptKind = {})); +//# sourceMappingURL=scriptKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptKind.js.map b/node_modules/typescript/dist/enums/scriptKind.js.map new file mode 100644 index 0000000..4b281cf --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scriptKind.js","sourceRoot":"","sources":["../../src/enums/scriptKind.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,UAAe,CAAC;AAC3B,CAAC,UAAU,UAAU;IACjB,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IAClD,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;IACxC,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IAC1C,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;IACxC,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IAC1C,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IACpD,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC5C,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;AACxD,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptTarget.d.ts b/node_modules/typescript/dist/enums/scriptTarget.d.ts new file mode 100644 index 0000000..79b7100 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptTarget.d.ts @@ -0,0 +1,2 @@ +export declare var ScriptTarget: any; +//# sourceMappingURL=scriptTarget.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptTarget.d.ts.map b/node_modules/typescript/dist/enums/scriptTarget.d.ts.map new file mode 100644 index 0000000..354fb54 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptTarget.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scriptTarget.d.ts","sourceRoot":"","sources":["../../src/enums/scriptTarget.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,YAAY,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts b/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts new file mode 100644 index 0000000..6f2620c --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts @@ -0,0 +1,17 @@ +export declare enum ScriptTarget { + ES2015 = 2, + ES2016 = 3, + ES2017 = 4, + ES2018 = 5, + ES2019 = 6, + ES2020 = 7, + ES2021 = 8, + ES2022 = 9, + ES2023 = 10, + ES2024 = 11, + ES2025 = 12, + ESNext = 99, + JSON = 100, + Latest = 99 +} +//# sourceMappingURL=scriptTarget.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map b/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map new file mode 100644 index 0000000..20ad986 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scriptTarget.enum.d.ts","sourceRoot":"","sources":["../../src/enums/scriptTarget.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACpB,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,KAAK;IACX,MAAM,KAAK;IACX,MAAM,KAAK;IACX,MAAM,KAAK;IACX,IAAI,MAAM;IACV,MAAM,KAAS;CAClB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptTarget.enum.js b/node_modules/typescript/dist/enums/scriptTarget.enum.js new file mode 100644 index 0000000..314ca02 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptTarget.enum.js @@ -0,0 +1,18 @@ +export var ScriptTarget; +(function (ScriptTarget) { + ScriptTarget[ScriptTarget["ES2015"] = 2] = "ES2015"; + ScriptTarget[ScriptTarget["ES2016"] = 3] = "ES2016"; + ScriptTarget[ScriptTarget["ES2017"] = 4] = "ES2017"; + ScriptTarget[ScriptTarget["ES2018"] = 5] = "ES2018"; + ScriptTarget[ScriptTarget["ES2019"] = 6] = "ES2019"; + ScriptTarget[ScriptTarget["ES2020"] = 7] = "ES2020"; + ScriptTarget[ScriptTarget["ES2021"] = 8] = "ES2021"; + ScriptTarget[ScriptTarget["ES2022"] = 9] = "ES2022"; + ScriptTarget[ScriptTarget["ES2023"] = 10] = "ES2023"; + ScriptTarget[ScriptTarget["ES2024"] = 11] = "ES2024"; + ScriptTarget[ScriptTarget["ES2025"] = 12] = "ES2025"; + ScriptTarget[ScriptTarget["ESNext"] = 99] = "ESNext"; + ScriptTarget[ScriptTarget["JSON"] = 100] = "JSON"; + ScriptTarget[ScriptTarget["Latest"] = 99] = "Latest"; +})(ScriptTarget || (ScriptTarget = {})); +//# sourceMappingURL=scriptTarget.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptTarget.enum.js.map b/node_modules/typescript/dist/enums/scriptTarget.enum.js.map new file mode 100644 index 0000000..a164740 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptTarget.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scriptTarget.enum.js","sourceRoot":"","sources":["../../src/enums/scriptTarget.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,YAeX;AAfD,WAAY,YAAY;IACpB,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,oDAAW,CAAA;IACX,oDAAW,CAAA;IACX,oDAAW,CAAA;IACX,oDAAW,CAAA;IACX,iDAAU,CAAA;IACV,oDAAe,CAAA;AACnB,CAAC,EAfW,YAAY,KAAZ,YAAY,QAevB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptTarget.js b/node_modules/typescript/dist/enums/scriptTarget.js new file mode 100644 index 0000000..8212a1d --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptTarget.js @@ -0,0 +1,18 @@ +export var ScriptTarget; +(function (ScriptTarget) { + ScriptTarget[ScriptTarget["ES2015"] = 2] = "ES2015"; + ScriptTarget[ScriptTarget["ES2016"] = 3] = "ES2016"; + ScriptTarget[ScriptTarget["ES2017"] = 4] = "ES2017"; + ScriptTarget[ScriptTarget["ES2018"] = 5] = "ES2018"; + ScriptTarget[ScriptTarget["ES2019"] = 6] = "ES2019"; + ScriptTarget[ScriptTarget["ES2020"] = 7] = "ES2020"; + ScriptTarget[ScriptTarget["ES2021"] = 8] = "ES2021"; + ScriptTarget[ScriptTarget["ES2022"] = 9] = "ES2022"; + ScriptTarget[ScriptTarget["ES2023"] = 10] = "ES2023"; + ScriptTarget[ScriptTarget["ES2024"] = 11] = "ES2024"; + ScriptTarget[ScriptTarget["ES2025"] = 12] = "ES2025"; + ScriptTarget[ScriptTarget["ESNext"] = 99] = "ESNext"; + ScriptTarget[ScriptTarget["JSON"] = 100] = "JSON"; + ScriptTarget[ScriptTarget["Latest"] = 99] = "Latest"; +})(ScriptTarget || (ScriptTarget = {})); +//# sourceMappingURL=scriptTarget.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptTarget.js.map b/node_modules/typescript/dist/enums/scriptTarget.js.map new file mode 100644 index 0000000..3ae3f5a --- /dev/null +++ b/node_modules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AAY,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC;AACzD,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureFlags.d.ts b/node_modules/typescript/dist/enums/signatureFlags.d.ts new file mode 100644 index 0000000..79a98f1 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureFlags.d.ts @@ -0,0 +1,2 @@ +export declare var SignatureFlags: any; +//# sourceMappingURL=signatureFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureFlags.d.ts.map b/node_modules/typescript/dist/enums/signatureFlags.d.ts.map new file mode 100644 index 0000000..467ac94 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"signatureFlags.d.ts","sourceRoot":"","sources":["../../src/enums/signatureFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,cAAc,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts b/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts new file mode 100644 index 0000000..def530a --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts @@ -0,0 +1,15 @@ +export declare enum SignatureFlags { + None = 0, + HasRestParameter = 1, + HasLiteralTypes = 2, + Construct = 4, + Abstract = 8, + IsInnerCallChain = 16, + IsOuterCallChain = 32, + IsUntypedSignatureInJSFile = 64, + IsNonInferrable = 128, + IsSignatureCandidateForOverloadFailure = 256, + PropagatingFlags = 335, + CallChainFlags = 48 +} +//# sourceMappingURL=signatureFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map new file mode 100644 index 0000000..8e2c092 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"signatureFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/signatureFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,cAAc;IACtB,IAAI,IAAI;IACR,gBAAgB,IAAS;IACzB,eAAe,IAAS;IACxB,SAAS,IAAS;IAClB,QAAQ,IAAS;IACjB,gBAAgB,KAAS;IACzB,gBAAgB,KAAS;IACzB,0BAA0B,KAAS;IACnC,eAAe,MAAS;IACxB,sCAAsC,MAAS;IAC/C,gBAAgB,MAAkI;IAClJ,cAAc,KAAsC;CACvD"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureFlags.enum.js b/node_modules/typescript/dist/enums/signatureFlags.enum.js new file mode 100644 index 0000000..83305ea --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureFlags.enum.js @@ -0,0 +1,17 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var SignatureFlags; +(function (SignatureFlags) { + SignatureFlags[SignatureFlags["None"] = 0] = "None"; + SignatureFlags[SignatureFlags["HasRestParameter"] = 1] = "HasRestParameter"; + SignatureFlags[SignatureFlags["HasLiteralTypes"] = 2] = "HasLiteralTypes"; + SignatureFlags[SignatureFlags["Construct"] = 4] = "Construct"; + SignatureFlags[SignatureFlags["Abstract"] = 8] = "Abstract"; + SignatureFlags[SignatureFlags["IsInnerCallChain"] = 16] = "IsInnerCallChain"; + SignatureFlags[SignatureFlags["IsOuterCallChain"] = 32] = "IsOuterCallChain"; + SignatureFlags[SignatureFlags["IsUntypedSignatureInJSFile"] = 64] = "IsUntypedSignatureInJSFile"; + SignatureFlags[SignatureFlags["IsNonInferrable"] = 128] = "IsNonInferrable"; + SignatureFlags[SignatureFlags["IsSignatureCandidateForOverloadFailure"] = 256] = "IsSignatureCandidateForOverloadFailure"; + SignatureFlags[SignatureFlags["PropagatingFlags"] = 335] = "PropagatingFlags"; + SignatureFlags[SignatureFlags["CallChainFlags"] = 48] = "CallChainFlags"; +})(SignatureFlags || (SignatureFlags = {})); +//# sourceMappingURL=signatureFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureFlags.enum.js.map b/node_modules/typescript/dist/enums/signatureFlags.enum.js.map new file mode 100644 index 0000000..20ff280 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signatureFlags.enum.js","sourceRoot":"","sources":["../../src/enums/signatureFlags.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,cAaX;AAbD,WAAY,cAAc;IACtB,mDAAQ,CAAA;IACR,2EAAyB,CAAA;IACzB,yEAAwB,CAAA;IACxB,6DAAkB,CAAA;IAClB,2DAAiB,CAAA;IACjB,4EAAyB,CAAA;IACzB,4EAAyB,CAAA;IACzB,gGAAmC,CAAA;IACnC,2EAAwB,CAAA;IACxB,yHAA+C,CAAA;IAC/C,6EAAkJ,CAAA;IAClJ,wEAAoD,CAAA;AACxD,CAAC,EAbW,cAAc,KAAd,cAAc,QAazB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureFlags.js b/node_modules/typescript/dist/enums/signatureFlags.js new file mode 100644 index 0000000..5cb7bc5 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureFlags.js @@ -0,0 +1,17 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var SignatureFlags; +(function (SignatureFlags) { + SignatureFlags[SignatureFlags["None"] = 0] = "None"; + SignatureFlags[SignatureFlags["HasRestParameter"] = 1] = "HasRestParameter"; + SignatureFlags[SignatureFlags["HasLiteralTypes"] = 2] = "HasLiteralTypes"; + SignatureFlags[SignatureFlags["Construct"] = 4] = "Construct"; + SignatureFlags[SignatureFlags["Abstract"] = 8] = "Abstract"; + SignatureFlags[SignatureFlags["IsInnerCallChain"] = 16] = "IsInnerCallChain"; + SignatureFlags[SignatureFlags["IsOuterCallChain"] = 32] = "IsOuterCallChain"; + SignatureFlags[SignatureFlags["IsUntypedSignatureInJSFile"] = 64] = "IsUntypedSignatureInJSFile"; + SignatureFlags[SignatureFlags["IsNonInferrable"] = 128] = "IsNonInferrable"; + SignatureFlags[SignatureFlags["IsSignatureCandidateForOverloadFailure"] = 256] = "IsSignatureCandidateForOverloadFailure"; + SignatureFlags[SignatureFlags["PropagatingFlags"] = 335] = "PropagatingFlags"; + SignatureFlags[SignatureFlags["CallChainFlags"] = 48] = "CallChainFlags"; +})(SignatureFlags || (SignatureFlags = {})); +//# sourceMappingURL=signatureFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureFlags.js.map b/node_modules/typescript/dist/enums/signatureFlags.js.map new file mode 100644 index 0000000..f9be5e5 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signatureFlags.js","sourceRoot":"","sources":["../../src/enums/signatureFlags.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,cAAmB,CAAC;AAC/B,CAAC,UAAU,cAAc;IACrB,cAAc,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACpD,cAAc,CAAC,cAAc,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,GAAG,kBAAkB,CAAC;IAC5E,cAAc,CAAC,cAAc,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,GAAG,iBAAiB,CAAC;IAC1E,cAAc,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IAC9D,cAAc,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAC5D,cAAc,CAAC,cAAc,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC,GAAG,kBAAkB,CAAC;IAC7E,cAAc,CAAC,cAAc,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC,GAAG,kBAAkB,CAAC;IAC7E,cAAc,CAAC,cAAc,CAAC,4BAA4B,CAAC,GAAG,EAAE,CAAC,GAAG,4BAA4B,CAAC;IACjG,cAAc,CAAC,cAAc,CAAC,iBAAiB,CAAC,GAAG,GAAG,CAAC,GAAG,iBAAiB,CAAC;IAC5E,cAAc,CAAC,cAAc,CAAC,wCAAwC,CAAC,GAAG,GAAG,CAAC,GAAG,wCAAwC,CAAC;IAC1H,cAAc,CAAC,cAAc,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAAC,GAAG,kBAAkB,CAAC;IAC9E,cAAc,CAAC,cAAc,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC,GAAG,gBAAgB,CAAC;AAC7E,CAAC,CAAC,CAAC,cAAc,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureKind.d.ts b/node_modules/typescript/dist/enums/signatureKind.d.ts new file mode 100644 index 0000000..9c0bded --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureKind.d.ts @@ -0,0 +1,2 @@ +export declare var SignatureKind: any; +//# sourceMappingURL=signatureKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureKind.d.ts.map b/node_modules/typescript/dist/enums/signatureKind.d.ts.map new file mode 100644 index 0000000..88e5112 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"signatureKind.d.ts","sourceRoot":"","sources":["../../src/enums/signatureKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,aAAa,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureKind.enum.d.ts b/node_modules/typescript/dist/enums/signatureKind.enum.d.ts new file mode 100644 index 0000000..e5ba5a5 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureKind.enum.d.ts @@ -0,0 +1,5 @@ +export declare enum SignatureKind { + Call = 0, + Construct = 1 +} +//# sourceMappingURL=signatureKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map b/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map new file mode 100644 index 0000000..2acb860 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"signatureKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/signatureKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,aAAa;IACrB,IAAI,IAAI;IACR,SAAS,IAAI;CAChB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureKind.enum.js b/node_modules/typescript/dist/enums/signatureKind.enum.js new file mode 100644 index 0000000..f99b0dd --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureKind.enum.js @@ -0,0 +1,7 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var SignatureKind; +(function (SignatureKind) { + SignatureKind[SignatureKind["Call"] = 0] = "Call"; + SignatureKind[SignatureKind["Construct"] = 1] = "Construct"; +})(SignatureKind || (SignatureKind = {})); +//# sourceMappingURL=signatureKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureKind.enum.js.map b/node_modules/typescript/dist/enums/signatureKind.enum.js.map new file mode 100644 index 0000000..9b28a34 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signatureKind.enum.js","sourceRoot":"","sources":["../../src/enums/signatureKind.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,iDAAQ,CAAA;IACR,2DAAa,CAAA;AACjB,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureKind.js b/node_modules/typescript/dist/enums/signatureKind.js new file mode 100644 index 0000000..c54dfb2 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureKind.js @@ -0,0 +1,7 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var SignatureKind; +(function (SignatureKind) { + SignatureKind[SignatureKind["Call"] = 0] = "Call"; + SignatureKind[SignatureKind["Construct"] = 1] = "Construct"; +})(SignatureKind || (SignatureKind = {})); +//# sourceMappingURL=signatureKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureKind.js.map b/node_modules/typescript/dist/enums/signatureKind.js.map new file mode 100644 index 0000000..77af56a --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signatureKind.js","sourceRoot":"","sources":["../../src/enums/signatureKind.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,aAAkB,CAAC;AAC9B,CAAC,UAAU,aAAa;IACpB,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAClD,aAAa,CAAC,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;AAChE,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/symbolFlags.d.ts b/node_modules/typescript/dist/enums/symbolFlags.d.ts new file mode 100644 index 0000000..4f828b7 --- /dev/null +++ b/node_modules/typescript/dist/enums/symbolFlags.d.ts @@ -0,0 +1,2 @@ +export declare var SymbolFlags: any; +//# sourceMappingURL=symbolFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/symbolFlags.d.ts.map b/node_modules/typescript/dist/enums/symbolFlags.d.ts.map new file mode 100644 index 0000000..1f12be9 --- /dev/null +++ b/node_modules/typescript/dist/enums/symbolFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"symbolFlags.d.ts","sourceRoot":"","sources":["../../src/enums/symbolFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,WAAW,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts b/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts new file mode 100644 index 0000000..275b5bc --- /dev/null +++ b/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts @@ -0,0 +1,71 @@ +export declare enum SymbolFlags { + None = 0, + FunctionScopedVariable = 1, + BlockScopedVariable = 2, + Property = 4, + EnumMember = 8, + Function = 16, + Class = 32, + Interface = 64, + ConstEnum = 128, + RegularEnum = 256, + ValueModule = 512, + NamespaceModule = 1024, + TypeLiteral = 2048, + ObjectLiteral = 4096, + Method = 8192, + Constructor = 16384, + GetAccessor = 32768, + SetAccessor = 65536, + Signature = 131072, + TypeParameter = 262144, + TypeAlias = 524288, + ExportValue = 1048576, + Alias = 2097152, + Prototype = 4194304, + ExportStar = 8388608, + Optional = 16777216, + Transient = 33554432, + Assignment = 67108864, + ModuleExports = 134217728, + ConstEnumOnlyModule = 268435456, + ReplaceableByMethod = 536870912, + GlobalLookup = 1073741824, + All = 536870912, + Enum = 384, + Variable = 3, + Value = 111551, + Type = 788968, + Namespace = 1920, + Module = 1536, + Accessor = 98304, + FunctionScopedVariableExcludes = 111550, + BlockScopedVariableExcludes = 111551, + ParameterExcludes = 111551, + PropertyExcludes = 13243, + EnumMemberExcludes = 900095, + FunctionExcludes = 110991, + ClassExcludes = 899503, + InterfaceExcludes = 788872, + RegularEnumExcludes = 899327, + ConstEnumExcludes = 899967, + ValueModuleExcludes = 110735, + NamespaceModuleExcludes = 0, + MethodExcludes = 103359, + GetAccessorExcludes = 46011, + SetAccessorExcludes = 78779, + AccessorExcludes = 111547, + TypeParameterExcludes = 526824, + TypeAliasExcludes = 788968, + AliasExcludes = 2097152, + ModuleMember = 2623475, + ExportHasLocal = 944, + BlockScoped = 418, + PropertyOrAccessor = 98308, + ClassMember = 106500, + ExportSupportsDefaultModifier = 112, + ExportDoesNotSupportDefaultModifier = -113, + Classifiable = 2885600, + LateBindingContainer = 6256 +} +//# sourceMappingURL=symbolFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map new file mode 100644 index 0000000..e21da46 --- /dev/null +++ b/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"symbolFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/symbolFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACnB,IAAI,IAAI;IACR,sBAAsB,IAAS;IAC/B,mBAAmB,IAAS;IAC5B,QAAQ,IAAS;IACjB,UAAU,IAAS;IACnB,QAAQ,KAAS;IACjB,KAAK,KAAS;IACd,SAAS,KAAS;IAClB,SAAS,MAAS;IAClB,WAAW,MAAS;IACpB,WAAW,MAAS;IACpB,eAAe,OAAU;IACzB,WAAW,OAAU;IACrB,aAAa,OAAU;IACvB,MAAM,OAAU;IAChB,WAAW,QAAU;IACrB,WAAW,QAAU;IACrB,WAAW,QAAU;IACrB,SAAS,SAAU;IACnB,aAAa,SAAU;IACvB,SAAS,SAAU;IACnB,WAAW,UAAU;IACrB,KAAK,UAAU;IACf,SAAS,UAAU;IACnB,UAAU,UAAU;IACpB,QAAQ,WAAU;IAClB,SAAS,WAAU;IACnB,UAAU,WAAU;IACpB,aAAa,YAAU;IACvB,mBAAmB,YAAU;IAC7B,mBAAmB,YAAU;IAC7B,YAAY,aAAU;IACtB,GAAG,YAAc;IACjB,IAAI,MAA0B;IAC9B,QAAQ,IAA+C;IACvD,KAAK,SAAgI;IACrI,IAAI,SAAkF;IACtF,SAAS,OAAuC;IAChD,MAAM,OAAgC;IACtC,QAAQ,QAA4B;IACpC,8BAA8B,SAAkC;IAChE,2BAA2B,SAAQ;IACnC,iBAAiB,SAAQ;IACzB,gBAAgB,QAAiC;IACjD,kBAAkB,SAAe;IACjC,gBAAgB,SAA4C;IAC5D,aAAa,SAAyD;IACtE,iBAAiB,SAA8B;IAC/C,mBAAmB,SAAgD;IACnE,iBAAiB,SAA8B;IAC/C,mBAAmB,SAA0D;IAC7E,uBAAuB,IAAO;IAC9B,cAAc,SAAkB;IAChC,mBAAmB,QAAoC;IACvD,mBAAmB,QAAoC;IACvD,gBAAgB,SAAoB;IACpC,qBAAqB,SAAwB;IAC7C,iBAAiB,SAAO;IACxB,aAAa,UAAQ;IACrB,YAAY,UAA8E;IAC1F,cAAc,MAAwC;IACtD,WAAW,MAAqC;IAChD,kBAAkB,QAAsB;IACxC,WAAW,SAA+B;IAC1C,6BAA6B,MAA+B;IAC5D,mCAAmC,OAAiC;IACpE,YAAY,UAAwE;IACpF,oBAAoB,OAA6D;CACpF"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/symbolFlags.enum.js b/node_modules/typescript/dist/enums/symbolFlags.enum.js new file mode 100644 index 0000000..12d2192 --- /dev/null +++ b/node_modules/typescript/dist/enums/symbolFlags.enum.js @@ -0,0 +1,73 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/symbolflags.go. DO NOT EDIT. +export var SymbolFlags; +(function (SymbolFlags) { + SymbolFlags[SymbolFlags["None"] = 0] = "None"; + SymbolFlags[SymbolFlags["FunctionScopedVariable"] = 1] = "FunctionScopedVariable"; + SymbolFlags[SymbolFlags["BlockScopedVariable"] = 2] = "BlockScopedVariable"; + SymbolFlags[SymbolFlags["Property"] = 4] = "Property"; + SymbolFlags[SymbolFlags["EnumMember"] = 8] = "EnumMember"; + SymbolFlags[SymbolFlags["Function"] = 16] = "Function"; + SymbolFlags[SymbolFlags["Class"] = 32] = "Class"; + SymbolFlags[SymbolFlags["Interface"] = 64] = "Interface"; + SymbolFlags[SymbolFlags["ConstEnum"] = 128] = "ConstEnum"; + SymbolFlags[SymbolFlags["RegularEnum"] = 256] = "RegularEnum"; + SymbolFlags[SymbolFlags["ValueModule"] = 512] = "ValueModule"; + SymbolFlags[SymbolFlags["NamespaceModule"] = 1024] = "NamespaceModule"; + SymbolFlags[SymbolFlags["TypeLiteral"] = 2048] = "TypeLiteral"; + SymbolFlags[SymbolFlags["ObjectLiteral"] = 4096] = "ObjectLiteral"; + SymbolFlags[SymbolFlags["Method"] = 8192] = "Method"; + SymbolFlags[SymbolFlags["Constructor"] = 16384] = "Constructor"; + SymbolFlags[SymbolFlags["GetAccessor"] = 32768] = "GetAccessor"; + SymbolFlags[SymbolFlags["SetAccessor"] = 65536] = "SetAccessor"; + SymbolFlags[SymbolFlags["Signature"] = 131072] = "Signature"; + SymbolFlags[SymbolFlags["TypeParameter"] = 262144] = "TypeParameter"; + SymbolFlags[SymbolFlags["TypeAlias"] = 524288] = "TypeAlias"; + SymbolFlags[SymbolFlags["ExportValue"] = 1048576] = "ExportValue"; + SymbolFlags[SymbolFlags["Alias"] = 2097152] = "Alias"; + SymbolFlags[SymbolFlags["Prototype"] = 4194304] = "Prototype"; + SymbolFlags[SymbolFlags["ExportStar"] = 8388608] = "ExportStar"; + SymbolFlags[SymbolFlags["Optional"] = 16777216] = "Optional"; + SymbolFlags[SymbolFlags["Transient"] = 33554432] = "Transient"; + SymbolFlags[SymbolFlags["Assignment"] = 67108864] = "Assignment"; + SymbolFlags[SymbolFlags["ModuleExports"] = 134217728] = "ModuleExports"; + SymbolFlags[SymbolFlags["ConstEnumOnlyModule"] = 268435456] = "ConstEnumOnlyModule"; + SymbolFlags[SymbolFlags["ReplaceableByMethod"] = 536870912] = "ReplaceableByMethod"; + SymbolFlags[SymbolFlags["GlobalLookup"] = 1073741824] = "GlobalLookup"; + SymbolFlags[SymbolFlags["All"] = 536870912] = "All"; + SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum"; + SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable"; + SymbolFlags[SymbolFlags["Value"] = 111551] = "Value"; + SymbolFlags[SymbolFlags["Type"] = 788968] = "Type"; + SymbolFlags[SymbolFlags["Namespace"] = 1920] = "Namespace"; + SymbolFlags[SymbolFlags["Module"] = 1536] = "Module"; + SymbolFlags[SymbolFlags["Accessor"] = 98304] = "Accessor"; + SymbolFlags[SymbolFlags["FunctionScopedVariableExcludes"] = 111550] = "FunctionScopedVariableExcludes"; + SymbolFlags[SymbolFlags["BlockScopedVariableExcludes"] = 111551] = "BlockScopedVariableExcludes"; + SymbolFlags[SymbolFlags["ParameterExcludes"] = 111551] = "ParameterExcludes"; + SymbolFlags[SymbolFlags["PropertyExcludes"] = 13243] = "PropertyExcludes"; + SymbolFlags[SymbolFlags["EnumMemberExcludes"] = 900095] = "EnumMemberExcludes"; + SymbolFlags[SymbolFlags["FunctionExcludes"] = 110991] = "FunctionExcludes"; + SymbolFlags[SymbolFlags["ClassExcludes"] = 899503] = "ClassExcludes"; + SymbolFlags[SymbolFlags["InterfaceExcludes"] = 788872] = "InterfaceExcludes"; + SymbolFlags[SymbolFlags["RegularEnumExcludes"] = 899327] = "RegularEnumExcludes"; + SymbolFlags[SymbolFlags["ConstEnumExcludes"] = 899967] = "ConstEnumExcludes"; + SymbolFlags[SymbolFlags["ValueModuleExcludes"] = 110735] = "ValueModuleExcludes"; + SymbolFlags[SymbolFlags["NamespaceModuleExcludes"] = 0] = "NamespaceModuleExcludes"; + SymbolFlags[SymbolFlags["MethodExcludes"] = 103359] = "MethodExcludes"; + SymbolFlags[SymbolFlags["GetAccessorExcludes"] = 46011] = "GetAccessorExcludes"; + SymbolFlags[SymbolFlags["SetAccessorExcludes"] = 78779] = "SetAccessorExcludes"; + SymbolFlags[SymbolFlags["AccessorExcludes"] = 111547] = "AccessorExcludes"; + SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 526824] = "TypeParameterExcludes"; + SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 788968] = "TypeAliasExcludes"; + SymbolFlags[SymbolFlags["AliasExcludes"] = 2097152] = "AliasExcludes"; + SymbolFlags[SymbolFlags["ModuleMember"] = 2623475] = "ModuleMember"; + SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal"; + SymbolFlags[SymbolFlags["BlockScoped"] = 418] = "BlockScoped"; + SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor"; + SymbolFlags[SymbolFlags["ClassMember"] = 106500] = "ClassMember"; + SymbolFlags[SymbolFlags["ExportSupportsDefaultModifier"] = 112] = "ExportSupportsDefaultModifier"; + SymbolFlags[SymbolFlags["ExportDoesNotSupportDefaultModifier"] = -113] = "ExportDoesNotSupportDefaultModifier"; + SymbolFlags[SymbolFlags["Classifiable"] = 2885600] = "Classifiable"; + SymbolFlags[SymbolFlags["LateBindingContainer"] = 6256] = "LateBindingContainer"; +})(SymbolFlags || (SymbolFlags = {})); +//# sourceMappingURL=symbolFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/symbolFlags.enum.js.map b/node_modules/typescript/dist/enums/symbolFlags.enum.js.map new file mode 100644 index 0000000..999ccc7 --- /dev/null +++ b/node_modules/typescript/dist/enums/symbolFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"symbolFlags.enum.js","sourceRoot":"","sources":["../../src/enums/symbolFlags.enum.ts"],"names":[],"mappings":"AAAA,iGAAiG;AAEjG,MAAM,CAAN,IAAY,WAqEX;AArED,WAAY,WAAW;IACnB,6CAAQ,CAAA;IACR,iFAA+B,CAAA;IAC/B,2EAA4B,CAAA;IAC5B,qDAAiB,CAAA;IACjB,yDAAmB,CAAA;IACnB,sDAAiB,CAAA;IACjB,gDAAc,CAAA;IACd,wDAAkB,CAAA;IAClB,yDAAkB,CAAA;IAClB,6DAAoB,CAAA;IACpB,6DAAoB,CAAA;IACpB,sEAAyB,CAAA;IACzB,8DAAqB,CAAA;IACrB,kEAAuB,CAAA;IACvB,oDAAgB,CAAA;IAChB,+DAAqB,CAAA;IACrB,+DAAqB,CAAA;IACrB,+DAAqB,CAAA;IACrB,4DAAmB,CAAA;IACnB,oEAAuB,CAAA;IACvB,4DAAmB,CAAA;IACnB,iEAAqB,CAAA;IACrB,qDAAe,CAAA;IACf,6DAAmB,CAAA;IACnB,+DAAoB,CAAA;IACpB,4DAAkB,CAAA;IAClB,8DAAmB,CAAA;IACnB,gEAAoB,CAAA;IACpB,uEAAuB,CAAA;IACvB,mFAA6B,CAAA;IAC7B,mFAA6B,CAAA;IAC7B,sEAAsB,CAAA;IACtB,mDAAiB,CAAA;IACjB,+CAA8B,CAAA;IAC9B,qDAAuD,CAAA;IACvD,oDAAqI,CAAA;IACrI,kDAAsF,CAAA;IACtF,0DAAgD,CAAA;IAChD,oDAAsC,CAAA;IACtC,yDAAoC,CAAA;IACpC,sGAAgE,CAAA;IAChE,gGAAmC,CAAA;IACnC,4EAAyB,CAAA;IACzB,yEAAiD,CAAA;IACjD,8EAAiC,CAAA;IACjC,0EAA4D,CAAA;IAC5D,oEAAsE,CAAA;IACtE,4EAA+C,CAAA;IAC/C,gFAAmE,CAAA;IACnE,4EAA+C,CAAA;IAC/C,gFAA6E,CAAA;IAC7E,mFAA8B,CAAA;IAC9B,sEAAgC,CAAA;IAChC,+EAAuD,CAAA;IACvD,+EAAuD,CAAA;IACvD,0EAAoC,CAAA;IACpC,oFAA6C,CAAA;IAC7C,4EAAwB,CAAA;IACxB,qEAAqB,CAAA;IACrB,mEAA0F,CAAA;IAC1F,mEAAsD,CAAA;IACtD,6DAAgD,CAAA;IAChD,6EAAwC,CAAA;IACxC,gEAA0C,CAAA;IAC1C,iGAA4D,CAAA;IAC5D,8GAAoE,CAAA;IACpE,mEAAoF,CAAA;IACpF,gFAAiF,CAAA;AACrF,CAAC,EArEW,WAAW,KAAX,WAAW,QAqEtB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/symbolFlags.js b/node_modules/typescript/dist/enums/symbolFlags.js new file mode 100644 index 0000000..ce1996d --- /dev/null +++ b/node_modules/typescript/dist/enums/symbolFlags.js @@ -0,0 +1,73 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/symbolflags.go. DO NOT EDIT. +export var SymbolFlags; +(function (SymbolFlags) { + SymbolFlags[SymbolFlags["None"] = 0] = "None"; + SymbolFlags[SymbolFlags["FunctionScopedVariable"] = 1] = "FunctionScopedVariable"; + SymbolFlags[SymbolFlags["BlockScopedVariable"] = 2] = "BlockScopedVariable"; + SymbolFlags[SymbolFlags["Property"] = 4] = "Property"; + SymbolFlags[SymbolFlags["EnumMember"] = 8] = "EnumMember"; + SymbolFlags[SymbolFlags["Function"] = 16] = "Function"; + SymbolFlags[SymbolFlags["Class"] = 32] = "Class"; + SymbolFlags[SymbolFlags["Interface"] = 64] = "Interface"; + SymbolFlags[SymbolFlags["ConstEnum"] = 128] = "ConstEnum"; + SymbolFlags[SymbolFlags["RegularEnum"] = 256] = "RegularEnum"; + SymbolFlags[SymbolFlags["ValueModule"] = 512] = "ValueModule"; + SymbolFlags[SymbolFlags["NamespaceModule"] = 1024] = "NamespaceModule"; + SymbolFlags[SymbolFlags["TypeLiteral"] = 2048] = "TypeLiteral"; + SymbolFlags[SymbolFlags["ObjectLiteral"] = 4096] = "ObjectLiteral"; + SymbolFlags[SymbolFlags["Method"] = 8192] = "Method"; + SymbolFlags[SymbolFlags["Constructor"] = 16384] = "Constructor"; + SymbolFlags[SymbolFlags["GetAccessor"] = 32768] = "GetAccessor"; + SymbolFlags[SymbolFlags["SetAccessor"] = 65536] = "SetAccessor"; + SymbolFlags[SymbolFlags["Signature"] = 131072] = "Signature"; + SymbolFlags[SymbolFlags["TypeParameter"] = 262144] = "TypeParameter"; + SymbolFlags[SymbolFlags["TypeAlias"] = 524288] = "TypeAlias"; + SymbolFlags[SymbolFlags["ExportValue"] = 1048576] = "ExportValue"; + SymbolFlags[SymbolFlags["Alias"] = 2097152] = "Alias"; + SymbolFlags[SymbolFlags["Prototype"] = 4194304] = "Prototype"; + SymbolFlags[SymbolFlags["ExportStar"] = 8388608] = "ExportStar"; + SymbolFlags[SymbolFlags["Optional"] = 16777216] = "Optional"; + SymbolFlags[SymbolFlags["Transient"] = 33554432] = "Transient"; + SymbolFlags[SymbolFlags["Assignment"] = 67108864] = "Assignment"; + SymbolFlags[SymbolFlags["ModuleExports"] = 134217728] = "ModuleExports"; + SymbolFlags[SymbolFlags["ConstEnumOnlyModule"] = 268435456] = "ConstEnumOnlyModule"; + SymbolFlags[SymbolFlags["ReplaceableByMethod"] = 536870912] = "ReplaceableByMethod"; + SymbolFlags[SymbolFlags["GlobalLookup"] = 1073741824] = "GlobalLookup"; + SymbolFlags[SymbolFlags["All"] = 536870912] = "All"; + SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum"; + SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable"; + SymbolFlags[SymbolFlags["Value"] = 111551] = "Value"; + SymbolFlags[SymbolFlags["Type"] = 788968] = "Type"; + SymbolFlags[SymbolFlags["Namespace"] = 1920] = "Namespace"; + SymbolFlags[SymbolFlags["Module"] = 1536] = "Module"; + SymbolFlags[SymbolFlags["Accessor"] = 98304] = "Accessor"; + SymbolFlags[SymbolFlags["FunctionScopedVariableExcludes"] = 111550] = "FunctionScopedVariableExcludes"; + SymbolFlags[SymbolFlags["BlockScopedVariableExcludes"] = 111551] = "BlockScopedVariableExcludes"; + SymbolFlags[SymbolFlags["ParameterExcludes"] = 111551] = "ParameterExcludes"; + SymbolFlags[SymbolFlags["PropertyExcludes"] = 13243] = "PropertyExcludes"; + SymbolFlags[SymbolFlags["EnumMemberExcludes"] = 900095] = "EnumMemberExcludes"; + SymbolFlags[SymbolFlags["FunctionExcludes"] = 110991] = "FunctionExcludes"; + SymbolFlags[SymbolFlags["ClassExcludes"] = 899503] = "ClassExcludes"; + SymbolFlags[SymbolFlags["InterfaceExcludes"] = 788872] = "InterfaceExcludes"; + SymbolFlags[SymbolFlags["RegularEnumExcludes"] = 899327] = "RegularEnumExcludes"; + SymbolFlags[SymbolFlags["ConstEnumExcludes"] = 899967] = "ConstEnumExcludes"; + SymbolFlags[SymbolFlags["ValueModuleExcludes"] = 110735] = "ValueModuleExcludes"; + SymbolFlags[SymbolFlags["NamespaceModuleExcludes"] = 0] = "NamespaceModuleExcludes"; + SymbolFlags[SymbolFlags["MethodExcludes"] = 103359] = "MethodExcludes"; + SymbolFlags[SymbolFlags["GetAccessorExcludes"] = 46011] = "GetAccessorExcludes"; + SymbolFlags[SymbolFlags["SetAccessorExcludes"] = 78779] = "SetAccessorExcludes"; + SymbolFlags[SymbolFlags["AccessorExcludes"] = 111547] = "AccessorExcludes"; + SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 526824] = "TypeParameterExcludes"; + SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 788968] = "TypeAliasExcludes"; + SymbolFlags[SymbolFlags["AliasExcludes"] = 2097152] = "AliasExcludes"; + SymbolFlags[SymbolFlags["ModuleMember"] = 2623475] = "ModuleMember"; + SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal"; + SymbolFlags[SymbolFlags["BlockScoped"] = 418] = "BlockScoped"; + SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor"; + SymbolFlags[SymbolFlags["ClassMember"] = 106500] = "ClassMember"; + SymbolFlags[SymbolFlags["ExportSupportsDefaultModifier"] = 112] = "ExportSupportsDefaultModifier"; + SymbolFlags[SymbolFlags["ExportDoesNotSupportDefaultModifier"] = -113] = "ExportDoesNotSupportDefaultModifier"; + SymbolFlags[SymbolFlags["Classifiable"] = 2885600] = "Classifiable"; + SymbolFlags[SymbolFlags["LateBindingContainer"] = 6256] = "LateBindingContainer"; +})(SymbolFlags || (SymbolFlags = {})); +//# sourceMappingURL=symbolFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/symbolFlags.js.map b/node_modules/typescript/dist/enums/symbolFlags.js.map new file mode 100644 index 0000000..1cff9dc --- /dev/null +++ b/node_modules/typescript/dist/enums/symbolFlags.js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tE,WAAW,CAAC,WAAW,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,GAAG,cAAc,CAAC;IACpE,WAAW,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,GAAG,CAAC,GAAG,gBAAgB,CAAC;IACpE,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,GAAG,GAAG,CAAC,GAAG,aAAa,CAAC;IAC9D,WAAW,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC;IAC9E,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,GAAG,aAAa,CAAC;IACjE,WAAW,CAAC,WAAW,CAAC,+BAA+B,CAAC,GAAG,GAAG,CAAC,GAAG,+BAA+B,CAAC;IAClG,WAAW,CAAC,WAAW,CAAC,qCAAqC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,qCAAqC,CAAC;IAC/G,WAAW,CAAC,WAAW,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,GAAG,cAAc,CAAC;IACpE,WAAW,CAAC,WAAW,CAAC,sBAAsB,CAAC,GAAG,IAAI,CAAC,GAAG,sBAAsB,CAAC;AACrF,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/syntaxKind.d.ts b/node_modules/typescript/dist/enums/syntaxKind.d.ts new file mode 100644 index 0000000..26fedb9 --- /dev/null +++ b/node_modules/typescript/dist/enums/syntaxKind.d.ts @@ -0,0 +1,2 @@ +export declare var SyntaxKind: any; +//# sourceMappingURL=syntaxKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/syntaxKind.d.ts.map b/node_modules/typescript/dist/enums/syntaxKind.d.ts.map new file mode 100644 index 0000000..fd18cc4 --- /dev/null +++ b/node_modules/typescript/dist/enums/syntaxKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"syntaxKind.d.ts","sourceRoot":"","sources":["../../src/enums/syntaxKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,UAAU,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts b/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts new file mode 100644 index 0000000..8756759 --- /dev/null +++ b/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts @@ -0,0 +1,389 @@ +export declare enum SyntaxKind { + Unknown = 0, + EndOfFile = 1, + SingleLineCommentTrivia = 2, + MultiLineCommentTrivia = 3, + NewLineTrivia = 4, + WhitespaceTrivia = 5, + ConflictMarkerTrivia = 6, + NonTextFileMarkerTrivia = 7, + NumericLiteral = 8, + BigIntLiteral = 9, + StringLiteral = 10, + JsxText = 11, + JsxTextAllWhiteSpaces = 12, + RegularExpressionLiteral = 13, + NoSubstitutionTemplateLiteral = 14, + TemplateHead = 15, + TemplateMiddle = 16, + TemplateTail = 17, + OpenBraceToken = 18, + CloseBraceToken = 19, + OpenParenToken = 20, + CloseParenToken = 21, + OpenBracketToken = 22, + CloseBracketToken = 23, + DotToken = 24, + DotDotDotToken = 25, + SemicolonToken = 26, + CommaToken = 27, + QuestionDotToken = 28, + LessThanToken = 29, + LessThanSlashToken = 30, + GreaterThanToken = 31, + LessThanEqualsToken = 32, + GreaterThanEqualsToken = 33, + EqualsEqualsToken = 34, + ExclamationEqualsToken = 35, + EqualsEqualsEqualsToken = 36, + ExclamationEqualsEqualsToken = 37, + EqualsGreaterThanToken = 38, + PlusToken = 39, + MinusToken = 40, + AsteriskToken = 41, + AsteriskAsteriskToken = 42, + SlashToken = 43, + PercentToken = 44, + PlusPlusToken = 45, + MinusMinusToken = 46, + LessThanLessThanToken = 47, + GreaterThanGreaterThanToken = 48, + GreaterThanGreaterThanGreaterThanToken = 49, + AmpersandToken = 50, + BarToken = 51, + CaretToken = 52, + ExclamationToken = 53, + TildeToken = 54, + AmpersandAmpersandToken = 55, + BarBarToken = 56, + QuestionToken = 57, + ColonToken = 58, + AtToken = 59, + QuestionQuestionToken = 60, + BacktickToken = 61, + HashToken = 62, + EqualsToken = 63, + PlusEqualsToken = 64, + MinusEqualsToken = 65, + AsteriskEqualsToken = 66, + AsteriskAsteriskEqualsToken = 67, + SlashEqualsToken = 68, + PercentEqualsToken = 69, + LessThanLessThanEqualsToken = 70, + GreaterThanGreaterThanEqualsToken = 71, + GreaterThanGreaterThanGreaterThanEqualsToken = 72, + AmpersandEqualsToken = 73, + BarEqualsToken = 74, + BarBarEqualsToken = 75, + AmpersandAmpersandEqualsToken = 76, + QuestionQuestionEqualsToken = 77, + CaretEqualsToken = 78, + Identifier = 79, + PrivateIdentifier = 80, + JSDocCommentTextToken = 81, + BreakKeyword = 82, + CaseKeyword = 83, + CatchKeyword = 84, + ClassKeyword = 85, + ConstKeyword = 86, + ContinueKeyword = 87, + DebuggerKeyword = 88, + DefaultKeyword = 89, + DeleteKeyword = 90, + DoKeyword = 91, + ElseKeyword = 92, + EnumKeyword = 93, + ExportKeyword = 94, + ExtendsKeyword = 95, + FalseKeyword = 96, + FinallyKeyword = 97, + ForKeyword = 98, + FunctionKeyword = 99, + IfKeyword = 100, + ImportKeyword = 101, + InKeyword = 102, + InstanceOfKeyword = 103, + NewKeyword = 104, + NullKeyword = 105, + ReturnKeyword = 106, + SuperKeyword = 107, + SwitchKeyword = 108, + ThisKeyword = 109, + ThrowKeyword = 110, + TrueKeyword = 111, + TryKeyword = 112, + TypeOfKeyword = 113, + VarKeyword = 114, + VoidKeyword = 115, + WhileKeyword = 116, + WithKeyword = 117, + ImplementsKeyword = 118, + InterfaceKeyword = 119, + LetKeyword = 120, + PackageKeyword = 121, + PrivateKeyword = 122, + ProtectedKeyword = 123, + PublicKeyword = 124, + StaticKeyword = 125, + YieldKeyword = 126, + AbstractKeyword = 127, + AccessorKeyword = 128, + AsKeyword = 129, + AssertsKeyword = 130, + AssertKeyword = 131, + AnyKeyword = 132, + AsyncKeyword = 133, + AwaitKeyword = 134, + BooleanKeyword = 135, + ConstructorKeyword = 136, + DeclareKeyword = 137, + GetKeyword = 138, + ImmediateKeyword = 139, + InferKeyword = 140, + IntrinsicKeyword = 141, + IsKeyword = 142, + KeyOfKeyword = 143, + ModuleKeyword = 144, + NamespaceKeyword = 145, + NeverKeyword = 146, + OutKeyword = 147, + ReadonlyKeyword = 148, + RequireKeyword = 149, + NumberKeyword = 150, + ObjectKeyword = 151, + SatisfiesKeyword = 152, + SetKeyword = 153, + StringKeyword = 154, + SymbolKeyword = 155, + TypeKeyword = 156, + UndefinedKeyword = 157, + UniqueKeyword = 158, + UnknownKeyword = 159, + UsingKeyword = 160, + FromKeyword = 161, + GlobalKeyword = 162, + BigIntKeyword = 163, + OverrideKeyword = 164, + OfKeyword = 165, + DeferKeyword = 166, + QualifiedName = 167, + ComputedPropertyName = 168, + TypeParameter = 169, + Parameter = 170, + Decorator = 171, + PropertySignature = 172, + PropertyDeclaration = 173, + MethodSignature = 174, + MethodDeclaration = 175, + ClassStaticBlockDeclaration = 176, + Constructor = 177, + GetAccessor = 178, + SetAccessor = 179, + CallSignature = 180, + ConstructSignature = 181, + IndexSignature = 182, + TypePredicate = 183, + TypeReference = 184, + FunctionType = 185, + ConstructorType = 186, + TypeQuery = 187, + TypeLiteral = 188, + ArrayType = 189, + TupleType = 190, + OptionalType = 191, + RestType = 192, + UnionType = 193, + IntersectionType = 194, + ConditionalType = 195, + InferType = 196, + ParenthesizedType = 197, + ThisType = 198, + TypeOperator = 199, + IndexedAccessType = 200, + MappedType = 201, + LiteralType = 202, + NamedTupleMember = 203, + TemplateLiteralType = 204, + TemplateLiteralTypeSpan = 205, + ImportType = 206, + ObjectBindingPattern = 207, + ArrayBindingPattern = 208, + BindingElement = 209, + ArrayLiteralExpression = 210, + ObjectLiteralExpression = 211, + PropertyAccessExpression = 212, + ElementAccessExpression = 213, + CallExpression = 214, + NewExpression = 215, + TaggedTemplateExpression = 216, + TypeAssertionExpression = 217, + ParenthesizedExpression = 218, + FunctionExpression = 219, + ArrowFunction = 220, + DeleteExpression = 221, + TypeOfExpression = 222, + VoidExpression = 223, + AwaitExpression = 224, + PrefixUnaryExpression = 225, + PostfixUnaryExpression = 226, + BinaryExpression = 227, + ConditionalExpression = 228, + TemplateExpression = 229, + YieldExpression = 230, + SpreadElement = 231, + ClassExpression = 232, + OmittedExpression = 233, + ExpressionWithTypeArguments = 234, + AsExpression = 235, + NonNullExpression = 236, + MetaProperty = 237, + SyntheticExpression = 238, + SatisfiesExpression = 239, + TemplateSpan = 240, + SemicolonClassElement = 241, + Block = 242, + EmptyStatement = 243, + VariableStatement = 244, + ExpressionStatement = 245, + IfStatement = 246, + DoStatement = 247, + WhileStatement = 248, + ForStatement = 249, + ForInStatement = 250, + ForOfStatement = 251, + ContinueStatement = 252, + BreakStatement = 253, + ReturnStatement = 254, + WithStatement = 255, + SwitchStatement = 256, + LabeledStatement = 257, + ThrowStatement = 258, + TryStatement = 259, + DebuggerStatement = 260, + VariableDeclaration = 261, + VariableDeclarationList = 262, + FunctionDeclaration = 263, + ClassDeclaration = 264, + InterfaceDeclaration = 265, + TypeAliasDeclaration = 266, + EnumDeclaration = 267, + ModuleDeclaration = 268, + ModuleBlock = 269, + CaseBlock = 270, + NamespaceExportDeclaration = 271, + ImportEqualsDeclaration = 272, + ImportDeclaration = 273, + ImportClause = 274, + NamespaceImport = 275, + NamedImports = 276, + ImportSpecifier = 277, + ExportAssignment = 278, + ExportDeclaration = 279, + NamedExports = 280, + NamespaceExport = 281, + ExportSpecifier = 282, + MissingDeclaration = 283, + ExternalModuleReference = 284, + JsxElement = 285, + JsxSelfClosingElement = 286, + JsxOpeningElement = 287, + JsxClosingElement = 288, + JsxFragment = 289, + JsxOpeningFragment = 290, + JsxClosingFragment = 291, + JsxAttribute = 292, + JsxAttributes = 293, + JsxSpreadAttribute = 294, + JsxExpression = 295, + JsxNamespacedName = 296, + CaseClause = 297, + DefaultClause = 298, + HeritageClause = 299, + CatchClause = 300, + ImportAttributes = 301, + ImportAttribute = 302, + PropertyAssignment = 303, + ShorthandPropertyAssignment = 304, + SpreadAssignment = 305, + EnumMember = 306, + SourceFile = 307, + JSDocTypeExpression = 308, + JSDocNameReference = 309, + JSDocAllType = 310, + JSDocNullableType = 311, + JSDocNonNullableType = 312, + JSDocOptionalType = 313, + JSDocVariadicType = 314, + JSDoc = 315, + JSDocText = 316, + JSDocTypeLiteral = 317, + JSDocSignature = 318, + JSDocLink = 319, + JSDocLinkCode = 320, + JSDocLinkPlain = 321, + JSDocUnknownTag = 322, + JSDocAugmentsTag = 323, + JSDocImplementsTag = 324, + JSDocDeprecatedTag = 325, + JSDocPublicTag = 326, + JSDocPrivateTag = 327, + JSDocProtectedTag = 328, + JSDocReadonlyTag = 329, + JSDocOverrideTag = 330, + JSDocCallbackTag = 331, + JSDocOverloadTag = 332, + JSDocParameterTag = 333, + JSDocReturnTag = 334, + JSDocThisTag = 335, + JSDocTypeTag = 336, + JSDocTemplateTag = 337, + JSDocTypedefTag = 338, + JSDocSeeTag = 339, + JSDocPropertyTag = 340, + JSDocThrowsTag = 341, + JSDocSatisfiesTag = 342, + JSDocImportTag = 343, + SyntaxList = 344, + JSTypeAliasDeclaration = 345, + JSImportDeclaration = 346, + NotEmittedStatement = 347, + PartiallyEmittedExpression = 348, + SyntheticReferenceExpression = 349, + NotEmittedTypeElement = 350, + Count = 351, + FirstAssignment = 63, + LastAssignment = 78, + FirstCompoundAssignment = 64, + LastCompoundAssignment = 78, + FirstReservedWord = 82, + LastReservedWord = 117, + FirstKeyword = 82, + LastKeyword = 166, + FirstFutureReservedWord = 118, + LastFutureReservedWord = 126, + FirstTypeNode = 183, + LastTypeNode = 206, + FirstPunctuation = 18, + LastPunctuation = 78, + FirstToken = 0, + LastToken = 166, + FirstLiteralToken = 8, + LastLiteralToken = 14, + FirstTemplateToken = 14, + LastTemplateToken = 17, + FirstBinaryOperator = 29, + LastBinaryOperator = 78, + FirstStatement = 244, + LastStatement = 260, + FirstNode = 167, + FirstJSDocNode = 308, + LastJSDocNode = 343, + FirstJSDocTagNode = 322, + LastJSDocTagNode = 343, + FirstContextualKeyword = 127, + LastContextualKeyword = 166, + LastUnaryOperator = 54, + FirstTriviaToken = 2, + LastTriviaToken = 6 +} +//# sourceMappingURL=syntaxKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map b/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map new file mode 100644 index 0000000..8252773 --- /dev/null +++ b/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"syntaxKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/syntaxKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,UAAU;IAClB,OAAO,IAAI;IACX,SAAS,IAAI;IACb,uBAAuB,IAAI;IAC3B,sBAAsB,IAAI;IAC1B,aAAa,IAAI;IACjB,gBAAgB,IAAI;IACpB,oBAAoB,IAAI;IACxB,uBAAuB,IAAI;IAC3B,cAAc,IAAI;IAClB,aAAa,IAAI;IACjB,aAAa,KAAK;IAClB,OAAO,KAAK;IACZ,qBAAqB,KAAK;IAC1B,wBAAwB,KAAK;IAC7B,6BAA6B,KAAK;IAClC,YAAY,KAAK;IACjB,cAAc,KAAK;IACnB,YAAY,KAAK;IACjB,cAAc,KAAK;IACnB,eAAe,KAAK;IACpB,cAAc,KAAK;IACnB,eAAe,KAAK;IACpB,gBAAgB,KAAK;IACrB,iBAAiB,KAAK;IACtB,QAAQ,KAAK;IACb,cAAc,KAAK;IACnB,cAAc,KAAK;IACnB,UAAU,KAAK;IACf,gBAAgB,KAAK;IACrB,aAAa,KAAK;IAClB,kBAAkB,KAAK;IACvB,gBAAgB,KAAK;IACrB,mBAAmB,KAAK;IACxB,sBAAsB,KAAK;IAC3B,iBAAiB,KAAK;IACtB,sBAAsB,KAAK;IAC3B,uBAAuB,KAAK;IAC5B,4BAA4B,KAAK;IACjC,sBAAsB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rC,aAAa,MAAgB;IAC7B,YAAY,MAAa;IACzB,gBAAgB,KAAiB;IACjC,eAAe,KAAmB;IAClC,UAAU,IAAU;IACpB,SAAS,MAAc;IACvB,iBAAiB,IAAiB;IAClC,gBAAgB,KAAgC;IAChD,kBAAkB,KAAgC;IAClD,iBAAiB,KAAe;IAChC,mBAAmB,KAAgB;IACnC,kBAAkB,KAAmB;IACrC,cAAc,MAAoB;IAClC,aAAa,MAAoB;IACjC,SAAS,MAAgB;IACzB,cAAc,MAAsB;IACpC,aAAa,MAAiB;IAC9B,iBAAiB,MAAkB;IACnC,gBAAgB,MAAiB;IACjC,sBAAsB,MAAkB;IACxC,qBAAqB,MAAe;IACpC,iBAAiB,KAAa;IAC9B,gBAAgB,IAA0B;IAC1C,eAAe,IAAuB;CACzC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/syntaxKind.enum.js b/node_modules/typescript/dist/enums/syntaxKind.enum.js new file mode 100644 index 0000000..cbde1c8 --- /dev/null +++ b/node_modules/typescript/dist/enums/syntaxKind.enum.js @@ -0,0 +1,391 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/kind_generated.go. DO NOT EDIT. +export var SyntaxKind; +(function (SyntaxKind) { + SyntaxKind[SyntaxKind["Unknown"] = 0] = "Unknown"; + SyntaxKind[SyntaxKind["EndOfFile"] = 1] = "EndOfFile"; + SyntaxKind[SyntaxKind["SingleLineCommentTrivia"] = 2] = "SingleLineCommentTrivia"; + SyntaxKind[SyntaxKind["MultiLineCommentTrivia"] = 3] = "MultiLineCommentTrivia"; + SyntaxKind[SyntaxKind["NewLineTrivia"] = 4] = "NewLineTrivia"; + SyntaxKind[SyntaxKind["WhitespaceTrivia"] = 5] = "WhitespaceTrivia"; + SyntaxKind[SyntaxKind["ConflictMarkerTrivia"] = 6] = "ConflictMarkerTrivia"; + SyntaxKind[SyntaxKind["NonTextFileMarkerTrivia"] = 7] = "NonTextFileMarkerTrivia"; + SyntaxKind[SyntaxKind["NumericLiteral"] = 8] = "NumericLiteral"; + SyntaxKind[SyntaxKind["BigIntLiteral"] = 9] = "BigIntLiteral"; + SyntaxKind[SyntaxKind["StringLiteral"] = 10] = "StringLiteral"; + SyntaxKind[SyntaxKind["JsxText"] = 11] = "JsxText"; + SyntaxKind[SyntaxKind["JsxTextAllWhiteSpaces"] = 12] = "JsxTextAllWhiteSpaces"; + SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 13] = "RegularExpressionLiteral"; + SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 14] = "NoSubstitutionTemplateLiteral"; + SyntaxKind[SyntaxKind["TemplateHead"] = 15] = "TemplateHead"; + SyntaxKind[SyntaxKind["TemplateMiddle"] = 16] = "TemplateMiddle"; + SyntaxKind[SyntaxKind["TemplateTail"] = 17] = "TemplateTail"; + SyntaxKind[SyntaxKind["OpenBraceToken"] = 18] = "OpenBraceToken"; + SyntaxKind[SyntaxKind["CloseBraceToken"] = 19] = "CloseBraceToken"; + SyntaxKind[SyntaxKind["OpenParenToken"] = 20] = "OpenParenToken"; + SyntaxKind[SyntaxKind["CloseParenToken"] = 21] = "CloseParenToken"; + SyntaxKind[SyntaxKind["OpenBracketToken"] = 22] = "OpenBracketToken"; + SyntaxKind[SyntaxKind["CloseBracketToken"] = 23] = "CloseBracketToken"; + SyntaxKind[SyntaxKind["DotToken"] = 24] = "DotToken"; + SyntaxKind[SyntaxKind["DotDotDotToken"] = 25] = "DotDotDotToken"; + SyntaxKind[SyntaxKind["SemicolonToken"] = 26] = "SemicolonToken"; + SyntaxKind[SyntaxKind["CommaToken"] = 27] = "CommaToken"; + SyntaxKind[SyntaxKind["QuestionDotToken"] = 28] = "QuestionDotToken"; + SyntaxKind[SyntaxKind["LessThanToken"] = 29] = "LessThanToken"; + SyntaxKind[SyntaxKind["LessThanSlashToken"] = 30] = "LessThanSlashToken"; + SyntaxKind[SyntaxKind["GreaterThanToken"] = 31] = "GreaterThanToken"; + SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 32] = "LessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 33] = "GreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 34] = "EqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 35] = "ExclamationEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 36] = "EqualsEqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 37] = "ExclamationEqualsEqualsToken"; + SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 38] = "EqualsGreaterThanToken"; + SyntaxKind[SyntaxKind["PlusToken"] = 39] = "PlusToken"; + SyntaxKind[SyntaxKind["MinusToken"] = 40] = "MinusToken"; + SyntaxKind[SyntaxKind["AsteriskToken"] = 41] = "AsteriskToken"; + SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 42] = "AsteriskAsteriskToken"; + SyntaxKind[SyntaxKind["SlashToken"] = 43] = "SlashToken"; + SyntaxKind[SyntaxKind["PercentToken"] = 44] = "PercentToken"; + SyntaxKind[SyntaxKind["PlusPlusToken"] = 45] = "PlusPlusToken"; + SyntaxKind[SyntaxKind["MinusMinusToken"] = 46] = "MinusMinusToken"; + SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 47] = "LessThanLessThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 48] = "GreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 49] = "GreaterThanGreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["AmpersandToken"] = 50] = "AmpersandToken"; + SyntaxKind[SyntaxKind["BarToken"] = 51] = "BarToken"; + SyntaxKind[SyntaxKind["CaretToken"] = 52] = "CaretToken"; + SyntaxKind[SyntaxKind["ExclamationToken"] = 53] = "ExclamationToken"; + SyntaxKind[SyntaxKind["TildeToken"] = 54] = "TildeToken"; + SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 55] = "AmpersandAmpersandToken"; + SyntaxKind[SyntaxKind["BarBarToken"] = 56] = "BarBarToken"; + SyntaxKind[SyntaxKind["QuestionToken"] = 57] = "QuestionToken"; + SyntaxKind[SyntaxKind["ColonToken"] = 58] = "ColonToken"; + SyntaxKind[SyntaxKind["AtToken"] = 59] = "AtToken"; + SyntaxKind[SyntaxKind["QuestionQuestionToken"] = 60] = "QuestionQuestionToken"; + SyntaxKind[SyntaxKind["BacktickToken"] = 61] = "BacktickToken"; + SyntaxKind[SyntaxKind["HashToken"] = 62] = "HashToken"; + SyntaxKind[SyntaxKind["EqualsToken"] = 63] = "EqualsToken"; + SyntaxKind[SyntaxKind["PlusEqualsToken"] = 64] = "PlusEqualsToken"; + SyntaxKind[SyntaxKind["MinusEqualsToken"] = 65] = "MinusEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 66] = "AsteriskEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 67] = "AsteriskAsteriskEqualsToken"; + SyntaxKind[SyntaxKind["SlashEqualsToken"] = 68] = "SlashEqualsToken"; + SyntaxKind[SyntaxKind["PercentEqualsToken"] = 69] = "PercentEqualsToken"; + SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 70] = "LessThanLessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 71] = "GreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 72] = "GreaterThanGreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 73] = "AmpersandEqualsToken"; + SyntaxKind[SyntaxKind["BarEqualsToken"] = 74] = "BarEqualsToken"; + SyntaxKind[SyntaxKind["BarBarEqualsToken"] = 75] = "BarBarEqualsToken"; + SyntaxKind[SyntaxKind["AmpersandAmpersandEqualsToken"] = 76] = "AmpersandAmpersandEqualsToken"; + SyntaxKind[SyntaxKind["QuestionQuestionEqualsToken"] = 77] = "QuestionQuestionEqualsToken"; + SyntaxKind[SyntaxKind["CaretEqualsToken"] = 78] = "CaretEqualsToken"; + SyntaxKind[SyntaxKind["Identifier"] = 79] = "Identifier"; + SyntaxKind[SyntaxKind["PrivateIdentifier"] = 80] = "PrivateIdentifier"; + SyntaxKind[SyntaxKind["JSDocCommentTextToken"] = 81] = "JSDocCommentTextToken"; + SyntaxKind[SyntaxKind["BreakKeyword"] = 82] = "BreakKeyword"; + SyntaxKind[SyntaxKind["CaseKeyword"] = 83] = "CaseKeyword"; + SyntaxKind[SyntaxKind["CatchKeyword"] = 84] = "CatchKeyword"; + SyntaxKind[SyntaxKind["ClassKeyword"] = 85] = "ClassKeyword"; + SyntaxKind[SyntaxKind["ConstKeyword"] = 86] = "ConstKeyword"; + SyntaxKind[SyntaxKind["ContinueKeyword"] = 87] = "ContinueKeyword"; + SyntaxKind[SyntaxKind["DebuggerKeyword"] = 88] = "DebuggerKeyword"; + SyntaxKind[SyntaxKind["DefaultKeyword"] = 89] = "DefaultKeyword"; + SyntaxKind[SyntaxKind["DeleteKeyword"] = 90] = "DeleteKeyword"; + SyntaxKind[SyntaxKind["DoKeyword"] = 91] = "DoKeyword"; + SyntaxKind[SyntaxKind["ElseKeyword"] = 92] = "ElseKeyword"; + SyntaxKind[SyntaxKind["EnumKeyword"] = 93] = "EnumKeyword"; + SyntaxKind[SyntaxKind["ExportKeyword"] = 94] = "ExportKeyword"; + SyntaxKind[SyntaxKind["ExtendsKeyword"] = 95] = "ExtendsKeyword"; + SyntaxKind[SyntaxKind["FalseKeyword"] = 96] = "FalseKeyword"; + SyntaxKind[SyntaxKind["FinallyKeyword"] = 97] = "FinallyKeyword"; + SyntaxKind[SyntaxKind["ForKeyword"] = 98] = "ForKeyword"; + SyntaxKind[SyntaxKind["FunctionKeyword"] = 99] = "FunctionKeyword"; + SyntaxKind[SyntaxKind["IfKeyword"] = 100] = "IfKeyword"; + SyntaxKind[SyntaxKind["ImportKeyword"] = 101] = "ImportKeyword"; + SyntaxKind[SyntaxKind["InKeyword"] = 102] = "InKeyword"; + SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 103] = "InstanceOfKeyword"; + SyntaxKind[SyntaxKind["NewKeyword"] = 104] = "NewKeyword"; + SyntaxKind[SyntaxKind["NullKeyword"] = 105] = "NullKeyword"; + SyntaxKind[SyntaxKind["ReturnKeyword"] = 106] = "ReturnKeyword"; + SyntaxKind[SyntaxKind["SuperKeyword"] = 107] = "SuperKeyword"; + SyntaxKind[SyntaxKind["SwitchKeyword"] = 108] = "SwitchKeyword"; + SyntaxKind[SyntaxKind["ThisKeyword"] = 109] = "ThisKeyword"; + SyntaxKind[SyntaxKind["ThrowKeyword"] = 110] = "ThrowKeyword"; + SyntaxKind[SyntaxKind["TrueKeyword"] = 111] = "TrueKeyword"; + SyntaxKind[SyntaxKind["TryKeyword"] = 112] = "TryKeyword"; + SyntaxKind[SyntaxKind["TypeOfKeyword"] = 113] = "TypeOfKeyword"; + SyntaxKind[SyntaxKind["VarKeyword"] = 114] = "VarKeyword"; + SyntaxKind[SyntaxKind["VoidKeyword"] = 115] = "VoidKeyword"; + SyntaxKind[SyntaxKind["WhileKeyword"] = 116] = "WhileKeyword"; + SyntaxKind[SyntaxKind["WithKeyword"] = 117] = "WithKeyword"; + SyntaxKind[SyntaxKind["ImplementsKeyword"] = 118] = "ImplementsKeyword"; + SyntaxKind[SyntaxKind["InterfaceKeyword"] = 119] = "InterfaceKeyword"; + SyntaxKind[SyntaxKind["LetKeyword"] = 120] = "LetKeyword"; + SyntaxKind[SyntaxKind["PackageKeyword"] = 121] = "PackageKeyword"; + SyntaxKind[SyntaxKind["PrivateKeyword"] = 122] = "PrivateKeyword"; + SyntaxKind[SyntaxKind["ProtectedKeyword"] = 123] = "ProtectedKeyword"; + SyntaxKind[SyntaxKind["PublicKeyword"] = 124] = "PublicKeyword"; + SyntaxKind[SyntaxKind["StaticKeyword"] = 125] = "StaticKeyword"; + SyntaxKind[SyntaxKind["YieldKeyword"] = 126] = "YieldKeyword"; + SyntaxKind[SyntaxKind["AbstractKeyword"] = 127] = "AbstractKeyword"; + SyntaxKind[SyntaxKind["AccessorKeyword"] = 128] = "AccessorKeyword"; + SyntaxKind[SyntaxKind["AsKeyword"] = 129] = "AsKeyword"; + SyntaxKind[SyntaxKind["AssertsKeyword"] = 130] = "AssertsKeyword"; + SyntaxKind[SyntaxKind["AssertKeyword"] = 131] = "AssertKeyword"; + SyntaxKind[SyntaxKind["AnyKeyword"] = 132] = "AnyKeyword"; + SyntaxKind[SyntaxKind["AsyncKeyword"] = 133] = "AsyncKeyword"; + SyntaxKind[SyntaxKind["AwaitKeyword"] = 134] = "AwaitKeyword"; + SyntaxKind[SyntaxKind["BooleanKeyword"] = 135] = "BooleanKeyword"; + SyntaxKind[SyntaxKind["ConstructorKeyword"] = 136] = "ConstructorKeyword"; + SyntaxKind[SyntaxKind["DeclareKeyword"] = 137] = "DeclareKeyword"; + SyntaxKind[SyntaxKind["GetKeyword"] = 138] = "GetKeyword"; + SyntaxKind[SyntaxKind["ImmediateKeyword"] = 139] = "ImmediateKeyword"; + SyntaxKind[SyntaxKind["InferKeyword"] = 140] = "InferKeyword"; + SyntaxKind[SyntaxKind["IntrinsicKeyword"] = 141] = "IntrinsicKeyword"; + SyntaxKind[SyntaxKind["IsKeyword"] = 142] = "IsKeyword"; + SyntaxKind[SyntaxKind["KeyOfKeyword"] = 143] = "KeyOfKeyword"; + SyntaxKind[SyntaxKind["ModuleKeyword"] = 144] = "ModuleKeyword"; + SyntaxKind[SyntaxKind["NamespaceKeyword"] = 145] = "NamespaceKeyword"; + SyntaxKind[SyntaxKind["NeverKeyword"] = 146] = "NeverKeyword"; + SyntaxKind[SyntaxKind["OutKeyword"] = 147] = "OutKeyword"; + SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 148] = "ReadonlyKeyword"; + SyntaxKind[SyntaxKind["RequireKeyword"] = 149] = "RequireKeyword"; + SyntaxKind[SyntaxKind["NumberKeyword"] = 150] = "NumberKeyword"; + SyntaxKind[SyntaxKind["ObjectKeyword"] = 151] = "ObjectKeyword"; + SyntaxKind[SyntaxKind["SatisfiesKeyword"] = 152] = "SatisfiesKeyword"; + SyntaxKind[SyntaxKind["SetKeyword"] = 153] = "SetKeyword"; + SyntaxKind[SyntaxKind["StringKeyword"] = 154] = "StringKeyword"; + SyntaxKind[SyntaxKind["SymbolKeyword"] = 155] = "SymbolKeyword"; + SyntaxKind[SyntaxKind["TypeKeyword"] = 156] = "TypeKeyword"; + SyntaxKind[SyntaxKind["UndefinedKeyword"] = 157] = "UndefinedKeyword"; + SyntaxKind[SyntaxKind["UniqueKeyword"] = 158] = "UniqueKeyword"; + SyntaxKind[SyntaxKind["UnknownKeyword"] = 159] = "UnknownKeyword"; + SyntaxKind[SyntaxKind["UsingKeyword"] = 160] = "UsingKeyword"; + SyntaxKind[SyntaxKind["FromKeyword"] = 161] = "FromKeyword"; + SyntaxKind[SyntaxKind["GlobalKeyword"] = 162] = "GlobalKeyword"; + SyntaxKind[SyntaxKind["BigIntKeyword"] = 163] = "BigIntKeyword"; + SyntaxKind[SyntaxKind["OverrideKeyword"] = 164] = "OverrideKeyword"; + SyntaxKind[SyntaxKind["OfKeyword"] = 165] = "OfKeyword"; + SyntaxKind[SyntaxKind["DeferKeyword"] = 166] = "DeferKeyword"; + SyntaxKind[SyntaxKind["QualifiedName"] = 167] = "QualifiedName"; + SyntaxKind[SyntaxKind["ComputedPropertyName"] = 168] = "ComputedPropertyName"; + SyntaxKind[SyntaxKind["TypeParameter"] = 169] = "TypeParameter"; + SyntaxKind[SyntaxKind["Parameter"] = 170] = "Parameter"; + SyntaxKind[SyntaxKind["Decorator"] = 171] = "Decorator"; + SyntaxKind[SyntaxKind["PropertySignature"] = 172] = "PropertySignature"; + SyntaxKind[SyntaxKind["PropertyDeclaration"] = 173] = "PropertyDeclaration"; + SyntaxKind[SyntaxKind["MethodSignature"] = 174] = "MethodSignature"; + SyntaxKind[SyntaxKind["MethodDeclaration"] = 175] = "MethodDeclaration"; + SyntaxKind[SyntaxKind["ClassStaticBlockDeclaration"] = 176] = "ClassStaticBlockDeclaration"; + SyntaxKind[SyntaxKind["Constructor"] = 177] = "Constructor"; + SyntaxKind[SyntaxKind["GetAccessor"] = 178] = "GetAccessor"; + SyntaxKind[SyntaxKind["SetAccessor"] = 179] = "SetAccessor"; + SyntaxKind[SyntaxKind["CallSignature"] = 180] = "CallSignature"; + SyntaxKind[SyntaxKind["ConstructSignature"] = 181] = "ConstructSignature"; + SyntaxKind[SyntaxKind["IndexSignature"] = 182] = "IndexSignature"; + SyntaxKind[SyntaxKind["TypePredicate"] = 183] = "TypePredicate"; + SyntaxKind[SyntaxKind["TypeReference"] = 184] = "TypeReference"; + SyntaxKind[SyntaxKind["FunctionType"] = 185] = "FunctionType"; + SyntaxKind[SyntaxKind["ConstructorType"] = 186] = "ConstructorType"; + SyntaxKind[SyntaxKind["TypeQuery"] = 187] = "TypeQuery"; + SyntaxKind[SyntaxKind["TypeLiteral"] = 188] = "TypeLiteral"; + SyntaxKind[SyntaxKind["ArrayType"] = 189] = "ArrayType"; + SyntaxKind[SyntaxKind["TupleType"] = 190] = "TupleType"; + SyntaxKind[SyntaxKind["OptionalType"] = 191] = "OptionalType"; + SyntaxKind[SyntaxKind["RestType"] = 192] = "RestType"; + SyntaxKind[SyntaxKind["UnionType"] = 193] = "UnionType"; + SyntaxKind[SyntaxKind["IntersectionType"] = 194] = "IntersectionType"; + SyntaxKind[SyntaxKind["ConditionalType"] = 195] = "ConditionalType"; + SyntaxKind[SyntaxKind["InferType"] = 196] = "InferType"; + SyntaxKind[SyntaxKind["ParenthesizedType"] = 197] = "ParenthesizedType"; + SyntaxKind[SyntaxKind["ThisType"] = 198] = "ThisType"; + SyntaxKind[SyntaxKind["TypeOperator"] = 199] = "TypeOperator"; + SyntaxKind[SyntaxKind["IndexedAccessType"] = 200] = "IndexedAccessType"; + SyntaxKind[SyntaxKind["MappedType"] = 201] = "MappedType"; + SyntaxKind[SyntaxKind["LiteralType"] = 202] = "LiteralType"; + SyntaxKind[SyntaxKind["NamedTupleMember"] = 203] = "NamedTupleMember"; + SyntaxKind[SyntaxKind["TemplateLiteralType"] = 204] = "TemplateLiteralType"; + SyntaxKind[SyntaxKind["TemplateLiteralTypeSpan"] = 205] = "TemplateLiteralTypeSpan"; + SyntaxKind[SyntaxKind["ImportType"] = 206] = "ImportType"; + SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 207] = "ObjectBindingPattern"; + SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 208] = "ArrayBindingPattern"; + SyntaxKind[SyntaxKind["BindingElement"] = 209] = "BindingElement"; + SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 210] = "ArrayLiteralExpression"; + SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 211] = "ObjectLiteralExpression"; + SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 212] = "PropertyAccessExpression"; + SyntaxKind[SyntaxKind["ElementAccessExpression"] = 213] = "ElementAccessExpression"; + SyntaxKind[SyntaxKind["CallExpression"] = 214] = "CallExpression"; + SyntaxKind[SyntaxKind["NewExpression"] = 215] = "NewExpression"; + SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 216] = "TaggedTemplateExpression"; + SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 217] = "TypeAssertionExpression"; + SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 218] = "ParenthesizedExpression"; + SyntaxKind[SyntaxKind["FunctionExpression"] = 219] = "FunctionExpression"; + SyntaxKind[SyntaxKind["ArrowFunction"] = 220] = "ArrowFunction"; + SyntaxKind[SyntaxKind["DeleteExpression"] = 221] = "DeleteExpression"; + SyntaxKind[SyntaxKind["TypeOfExpression"] = 222] = "TypeOfExpression"; + SyntaxKind[SyntaxKind["VoidExpression"] = 223] = "VoidExpression"; + SyntaxKind[SyntaxKind["AwaitExpression"] = 224] = "AwaitExpression"; + SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 225] = "PrefixUnaryExpression"; + SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 226] = "PostfixUnaryExpression"; + SyntaxKind[SyntaxKind["BinaryExpression"] = 227] = "BinaryExpression"; + SyntaxKind[SyntaxKind["ConditionalExpression"] = 228] = "ConditionalExpression"; + SyntaxKind[SyntaxKind["TemplateExpression"] = 229] = "TemplateExpression"; + SyntaxKind[SyntaxKind["YieldExpression"] = 230] = "YieldExpression"; + SyntaxKind[SyntaxKind["SpreadElement"] = 231] = "SpreadElement"; + SyntaxKind[SyntaxKind["ClassExpression"] = 232] = "ClassExpression"; + SyntaxKind[SyntaxKind["OmittedExpression"] = 233] = "OmittedExpression"; + SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 234] = "ExpressionWithTypeArguments"; + SyntaxKind[SyntaxKind["AsExpression"] = 235] = "AsExpression"; + SyntaxKind[SyntaxKind["NonNullExpression"] = 236] = "NonNullExpression"; + SyntaxKind[SyntaxKind["MetaProperty"] = 237] = "MetaProperty"; + SyntaxKind[SyntaxKind["SyntheticExpression"] = 238] = "SyntheticExpression"; + SyntaxKind[SyntaxKind["SatisfiesExpression"] = 239] = "SatisfiesExpression"; + SyntaxKind[SyntaxKind["TemplateSpan"] = 240] = "TemplateSpan"; + SyntaxKind[SyntaxKind["SemicolonClassElement"] = 241] = "SemicolonClassElement"; + SyntaxKind[SyntaxKind["Block"] = 242] = "Block"; + SyntaxKind[SyntaxKind["EmptyStatement"] = 243] = "EmptyStatement"; + SyntaxKind[SyntaxKind["VariableStatement"] = 244] = "VariableStatement"; + SyntaxKind[SyntaxKind["ExpressionStatement"] = 245] = "ExpressionStatement"; + SyntaxKind[SyntaxKind["IfStatement"] = 246] = "IfStatement"; + SyntaxKind[SyntaxKind["DoStatement"] = 247] = "DoStatement"; + SyntaxKind[SyntaxKind["WhileStatement"] = 248] = "WhileStatement"; + SyntaxKind[SyntaxKind["ForStatement"] = 249] = "ForStatement"; + SyntaxKind[SyntaxKind["ForInStatement"] = 250] = "ForInStatement"; + SyntaxKind[SyntaxKind["ForOfStatement"] = 251] = "ForOfStatement"; + SyntaxKind[SyntaxKind["ContinueStatement"] = 252] = "ContinueStatement"; + SyntaxKind[SyntaxKind["BreakStatement"] = 253] = "BreakStatement"; + SyntaxKind[SyntaxKind["ReturnStatement"] = 254] = "ReturnStatement"; + SyntaxKind[SyntaxKind["WithStatement"] = 255] = "WithStatement"; + SyntaxKind[SyntaxKind["SwitchStatement"] = 256] = "SwitchStatement"; + SyntaxKind[SyntaxKind["LabeledStatement"] = 257] = "LabeledStatement"; + SyntaxKind[SyntaxKind["ThrowStatement"] = 258] = "ThrowStatement"; + SyntaxKind[SyntaxKind["TryStatement"] = 259] = "TryStatement"; + SyntaxKind[SyntaxKind["DebuggerStatement"] = 260] = "DebuggerStatement"; + SyntaxKind[SyntaxKind["VariableDeclaration"] = 261] = "VariableDeclaration"; + SyntaxKind[SyntaxKind["VariableDeclarationList"] = 262] = "VariableDeclarationList"; + SyntaxKind[SyntaxKind["FunctionDeclaration"] = 263] = "FunctionDeclaration"; + SyntaxKind[SyntaxKind["ClassDeclaration"] = 264] = "ClassDeclaration"; + SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 265] = "InterfaceDeclaration"; + SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 266] = "TypeAliasDeclaration"; + SyntaxKind[SyntaxKind["EnumDeclaration"] = 267] = "EnumDeclaration"; + SyntaxKind[SyntaxKind["ModuleDeclaration"] = 268] = "ModuleDeclaration"; + SyntaxKind[SyntaxKind["ModuleBlock"] = 269] = "ModuleBlock"; + SyntaxKind[SyntaxKind["CaseBlock"] = 270] = "CaseBlock"; + SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 271] = "NamespaceExportDeclaration"; + SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 272] = "ImportEqualsDeclaration"; + SyntaxKind[SyntaxKind["ImportDeclaration"] = 273] = "ImportDeclaration"; + SyntaxKind[SyntaxKind["ImportClause"] = 274] = "ImportClause"; + SyntaxKind[SyntaxKind["NamespaceImport"] = 275] = "NamespaceImport"; + SyntaxKind[SyntaxKind["NamedImports"] = 276] = "NamedImports"; + SyntaxKind[SyntaxKind["ImportSpecifier"] = 277] = "ImportSpecifier"; + SyntaxKind[SyntaxKind["ExportAssignment"] = 278] = "ExportAssignment"; + SyntaxKind[SyntaxKind["ExportDeclaration"] = 279] = "ExportDeclaration"; + SyntaxKind[SyntaxKind["NamedExports"] = 280] = "NamedExports"; + SyntaxKind[SyntaxKind["NamespaceExport"] = 281] = "NamespaceExport"; + SyntaxKind[SyntaxKind["ExportSpecifier"] = 282] = "ExportSpecifier"; + SyntaxKind[SyntaxKind["MissingDeclaration"] = 283] = "MissingDeclaration"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 284] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["JsxElement"] = 285] = "JsxElement"; + SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 286] = "JsxSelfClosingElement"; + SyntaxKind[SyntaxKind["JsxOpeningElement"] = 287] = "JsxOpeningElement"; + SyntaxKind[SyntaxKind["JsxClosingElement"] = 288] = "JsxClosingElement"; + SyntaxKind[SyntaxKind["JsxFragment"] = 289] = "JsxFragment"; + SyntaxKind[SyntaxKind["JsxOpeningFragment"] = 290] = "JsxOpeningFragment"; + SyntaxKind[SyntaxKind["JsxClosingFragment"] = 291] = "JsxClosingFragment"; + SyntaxKind[SyntaxKind["JsxAttribute"] = 292] = "JsxAttribute"; + SyntaxKind[SyntaxKind["JsxAttributes"] = 293] = "JsxAttributes"; + SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 294] = "JsxSpreadAttribute"; + SyntaxKind[SyntaxKind["JsxExpression"] = 295] = "JsxExpression"; + SyntaxKind[SyntaxKind["JsxNamespacedName"] = 296] = "JsxNamespacedName"; + SyntaxKind[SyntaxKind["CaseClause"] = 297] = "CaseClause"; + SyntaxKind[SyntaxKind["DefaultClause"] = 298] = "DefaultClause"; + SyntaxKind[SyntaxKind["HeritageClause"] = 299] = "HeritageClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 300] = "CatchClause"; + SyntaxKind[SyntaxKind["ImportAttributes"] = 301] = "ImportAttributes"; + SyntaxKind[SyntaxKind["ImportAttribute"] = 302] = "ImportAttribute"; + SyntaxKind[SyntaxKind["PropertyAssignment"] = 303] = "PropertyAssignment"; + SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment"; + SyntaxKind[SyntaxKind["SpreadAssignment"] = 305] = "SpreadAssignment"; + SyntaxKind[SyntaxKind["EnumMember"] = 306] = "EnumMember"; + SyntaxKind[SyntaxKind["SourceFile"] = 307] = "SourceFile"; + SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 308] = "JSDocTypeExpression"; + SyntaxKind[SyntaxKind["JSDocNameReference"] = 309] = "JSDocNameReference"; + SyntaxKind[SyntaxKind["JSDocAllType"] = 310] = "JSDocAllType"; + SyntaxKind[SyntaxKind["JSDocNullableType"] = 311] = "JSDocNullableType"; + SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 312] = "JSDocNonNullableType"; + SyntaxKind[SyntaxKind["JSDocOptionalType"] = 313] = "JSDocOptionalType"; + SyntaxKind[SyntaxKind["JSDocVariadicType"] = 314] = "JSDocVariadicType"; + SyntaxKind[SyntaxKind["JSDoc"] = 315] = "JSDoc"; + SyntaxKind[SyntaxKind["JSDocText"] = 316] = "JSDocText"; + SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 317] = "JSDocTypeLiteral"; + SyntaxKind[SyntaxKind["JSDocSignature"] = 318] = "JSDocSignature"; + SyntaxKind[SyntaxKind["JSDocLink"] = 319] = "JSDocLink"; + SyntaxKind[SyntaxKind["JSDocLinkCode"] = 320] = "JSDocLinkCode"; + SyntaxKind[SyntaxKind["JSDocLinkPlain"] = 321] = "JSDocLinkPlain"; + SyntaxKind[SyntaxKind["JSDocUnknownTag"] = 322] = "JSDocUnknownTag"; + SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 323] = "JSDocAugmentsTag"; + SyntaxKind[SyntaxKind["JSDocImplementsTag"] = 324] = "JSDocImplementsTag"; + SyntaxKind[SyntaxKind["JSDocDeprecatedTag"] = 325] = "JSDocDeprecatedTag"; + SyntaxKind[SyntaxKind["JSDocPublicTag"] = 326] = "JSDocPublicTag"; + SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 327] = "JSDocPrivateTag"; + SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 328] = "JSDocProtectedTag"; + SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 329] = "JSDocReadonlyTag"; + SyntaxKind[SyntaxKind["JSDocOverrideTag"] = 330] = "JSDocOverrideTag"; + SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 331] = "JSDocCallbackTag"; + SyntaxKind[SyntaxKind["JSDocOverloadTag"] = 332] = "JSDocOverloadTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 333] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 334] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocThisTag"] = 335] = "JSDocThisTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 336] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 337] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 338] = "JSDocTypedefTag"; + SyntaxKind[SyntaxKind["JSDocSeeTag"] = 339] = "JSDocSeeTag"; + SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 340] = "JSDocPropertyTag"; + SyntaxKind[SyntaxKind["JSDocThrowsTag"] = 341] = "JSDocThrowsTag"; + SyntaxKind[SyntaxKind["JSDocSatisfiesTag"] = 342] = "JSDocSatisfiesTag"; + SyntaxKind[SyntaxKind["JSDocImportTag"] = 343] = "JSDocImportTag"; + SyntaxKind[SyntaxKind["SyntaxList"] = 344] = "SyntaxList"; + SyntaxKind[SyntaxKind["JSTypeAliasDeclaration"] = 345] = "JSTypeAliasDeclaration"; + SyntaxKind[SyntaxKind["JSImportDeclaration"] = 346] = "JSImportDeclaration"; + SyntaxKind[SyntaxKind["NotEmittedStatement"] = 347] = "NotEmittedStatement"; + SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 348] = "PartiallyEmittedExpression"; + SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 349] = "SyntheticReferenceExpression"; + SyntaxKind[SyntaxKind["NotEmittedTypeElement"] = 350] = "NotEmittedTypeElement"; + SyntaxKind[SyntaxKind["Count"] = 351] = "Count"; + SyntaxKind[SyntaxKind["FirstAssignment"] = 63] = "FirstAssignment"; + SyntaxKind[SyntaxKind["LastAssignment"] = 78] = "LastAssignment"; + SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 64] = "FirstCompoundAssignment"; + SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 78] = "LastCompoundAssignment"; + SyntaxKind[SyntaxKind["FirstReservedWord"] = 82] = "FirstReservedWord"; + SyntaxKind[SyntaxKind["LastReservedWord"] = 117] = "LastReservedWord"; + SyntaxKind[SyntaxKind["FirstKeyword"] = 82] = "FirstKeyword"; + SyntaxKind[SyntaxKind["LastKeyword"] = 166] = "LastKeyword"; + SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 118] = "FirstFutureReservedWord"; + SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 126] = "LastFutureReservedWord"; + SyntaxKind[SyntaxKind["FirstTypeNode"] = 183] = "FirstTypeNode"; + SyntaxKind[SyntaxKind["LastTypeNode"] = 206] = "LastTypeNode"; + SyntaxKind[SyntaxKind["FirstPunctuation"] = 18] = "FirstPunctuation"; + SyntaxKind[SyntaxKind["LastPunctuation"] = 78] = "LastPunctuation"; + SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken"; + SyntaxKind[SyntaxKind["LastToken"] = 166] = "LastToken"; + SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken"; + SyntaxKind[SyntaxKind["LastLiteralToken"] = 14] = "LastLiteralToken"; + SyntaxKind[SyntaxKind["FirstTemplateToken"] = 14] = "FirstTemplateToken"; + SyntaxKind[SyntaxKind["LastTemplateToken"] = 17] = "LastTemplateToken"; + SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 29] = "FirstBinaryOperator"; + SyntaxKind[SyntaxKind["LastBinaryOperator"] = 78] = "LastBinaryOperator"; + SyntaxKind[SyntaxKind["FirstStatement"] = 244] = "FirstStatement"; + SyntaxKind[SyntaxKind["LastStatement"] = 260] = "LastStatement"; + SyntaxKind[SyntaxKind["FirstNode"] = 167] = "FirstNode"; + SyntaxKind[SyntaxKind["FirstJSDocNode"] = 308] = "FirstJSDocNode"; + SyntaxKind[SyntaxKind["LastJSDocNode"] = 343] = "LastJSDocNode"; + SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 322] = "FirstJSDocTagNode"; + SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 343] = "LastJSDocTagNode"; + SyntaxKind[SyntaxKind["FirstContextualKeyword"] = 127] = "FirstContextualKeyword"; + SyntaxKind[SyntaxKind["LastContextualKeyword"] = 166] = "LastContextualKeyword"; + SyntaxKind[SyntaxKind["LastUnaryOperator"] = 54] = "LastUnaryOperator"; + SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken"; + SyntaxKind[SyntaxKind["LastTriviaToken"] = 6] = "LastTriviaToken"; +})(SyntaxKind || (SyntaxKind = {})); +//# sourceMappingURL=syntaxKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/syntaxKind.enum.js.map b/node_modules/typescript/dist/enums/syntaxKind.enum.js.map new file mode 100644 index 0000000..90ebb10 --- /dev/null +++ b/node_modules/typescript/dist/enums/syntaxKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"syntaxKind.enum.js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AA8B,CAAA;IAC9B,4DAA2B,CAAA;IAC3B,2DAA0B,CAAA;IAC1B,mFAA2C,CAAA;IAC3C,iFAAqC,CAAA;IACrC,+DAA6B,CAAA;IAC7B,6DAAyB,CAAA;IACzB,oEAAiC,CAAA;IACjC,kEAAkC,CAAA;IAClC,uDAAoB,CAAA;IACpB,uDAAuB,CAAA;IACvB,qEAAkC,CAAA;IAClC,oEAAgD,CAAA;IAChD,wEAAkD,CAAA;IAClD,sEAAgC,CAAA;IAChC,0EAAmC,CAAA;IACnC,wEAAqC,CAAA;IACrC,iEAAkC,CAAA;IAClC,+DAAiC,CAAA;IACjC,uDAAyB,CAAA;IACzB,iEAAoC,CAAA;IACpC,+DAA8B,CAAA;IAC9B,uEAAmC,CAAA;IACnC,qEAAiC,CAAA;IACjC,iFAAwC,CAAA;IACxC,+EAAoC,CAAA;IACpC,sEAA8B,CAAA;IAC9B,mEAA0C,CAAA;IAC1C,iEAAsC,CAAA;AAC1C,CAAC,EAnYW,UAAU,KAAV,UAAU,QAmYrB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/syntaxKind.js b/node_modules/typescript/dist/enums/syntaxKind.js new file mode 100644 index 0000000..1326dc0 --- /dev/null +++ b/node_modules/typescript/dist/enums/syntaxKind.js @@ -0,0 +1,391 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/kind_generated.go. DO NOT EDIT. +export var SyntaxKind; +(function (SyntaxKind) { + SyntaxKind[SyntaxKind["Unknown"] = 0] = "Unknown"; + SyntaxKind[SyntaxKind["EndOfFile"] = 1] = "EndOfFile"; + SyntaxKind[SyntaxKind["SingleLineCommentTrivia"] = 2] = "SingleLineCommentTrivia"; + SyntaxKind[SyntaxKind["MultiLineCommentTrivia"] = 3] = "MultiLineCommentTrivia"; + SyntaxKind[SyntaxKind["NewLineTrivia"] = 4] = "NewLineTrivia"; + SyntaxKind[SyntaxKind["WhitespaceTrivia"] = 5] = "WhitespaceTrivia"; + SyntaxKind[SyntaxKind["ConflictMarkerTrivia"] = 6] = "ConflictMarkerTrivia"; + SyntaxKind[SyntaxKind["NonTextFileMarkerTrivia"] = 7] = "NonTextFileMarkerTrivia"; + SyntaxKind[SyntaxKind["NumericLiteral"] = 8] = "NumericLiteral"; + SyntaxKind[SyntaxKind["BigIntLiteral"] = 9] = "BigIntLiteral"; + SyntaxKind[SyntaxKind["StringLiteral"] = 10] = "StringLiteral"; + SyntaxKind[SyntaxKind["JsxText"] = 11] = "JsxText"; + SyntaxKind[SyntaxKind["JsxTextAllWhiteSpaces"] = 12] = "JsxTextAllWhiteSpaces"; + SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 13] = "RegularExpressionLiteral"; + SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 14] = "NoSubstitutionTemplateLiteral"; + SyntaxKind[SyntaxKind["TemplateHead"] = 15] = "TemplateHead"; + SyntaxKind[SyntaxKind["TemplateMiddle"] = 16] = "TemplateMiddle"; + SyntaxKind[SyntaxKind["TemplateTail"] = 17] = "TemplateTail"; + SyntaxKind[SyntaxKind["OpenBraceToken"] = 18] = "OpenBraceToken"; + SyntaxKind[SyntaxKind["CloseBraceToken"] = 19] = "CloseBraceToken"; + SyntaxKind[SyntaxKind["OpenParenToken"] = 20] = "OpenParenToken"; + SyntaxKind[SyntaxKind["CloseParenToken"] = 21] = "CloseParenToken"; + SyntaxKind[SyntaxKind["OpenBracketToken"] = 22] = "OpenBracketToken"; + SyntaxKind[SyntaxKind["CloseBracketToken"] = 23] = "CloseBracketToken"; + SyntaxKind[SyntaxKind["DotToken"] = 24] = "DotToken"; + SyntaxKind[SyntaxKind["DotDotDotToken"] = 25] = "DotDotDotToken"; + SyntaxKind[SyntaxKind["SemicolonToken"] = 26] = "SemicolonToken"; + SyntaxKind[SyntaxKind["CommaToken"] = 27] = "CommaToken"; + SyntaxKind[SyntaxKind["QuestionDotToken"] = 28] = "QuestionDotToken"; + SyntaxKind[SyntaxKind["LessThanToken"] = 29] = "LessThanToken"; + SyntaxKind[SyntaxKind["LessThanSlashToken"] = 30] = "LessThanSlashToken"; + SyntaxKind[SyntaxKind["GreaterThanToken"] = 31] = "GreaterThanToken"; + SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 32] = "LessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 33] = "GreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 34] = "EqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 35] = "ExclamationEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 36] = "EqualsEqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 37] = "ExclamationEqualsEqualsToken"; + SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 38] = "EqualsGreaterThanToken"; + SyntaxKind[SyntaxKind["PlusToken"] = 39] = "PlusToken"; + SyntaxKind[SyntaxKind["MinusToken"] = 40] = "MinusToken"; + SyntaxKind[SyntaxKind["AsteriskToken"] = 41] = "AsteriskToken"; + SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 42] = "AsteriskAsteriskToken"; + SyntaxKind[SyntaxKind["SlashToken"] = 43] = "SlashToken"; + SyntaxKind[SyntaxKind["PercentToken"] = 44] = "PercentToken"; + SyntaxKind[SyntaxKind["PlusPlusToken"] = 45] = "PlusPlusToken"; + SyntaxKind[SyntaxKind["MinusMinusToken"] = 46] = "MinusMinusToken"; + SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 47] = "LessThanLessThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 48] = "GreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 49] = "GreaterThanGreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["AmpersandToken"] = 50] = "AmpersandToken"; + SyntaxKind[SyntaxKind["BarToken"] = 51] = "BarToken"; + SyntaxKind[SyntaxKind["CaretToken"] = 52] = "CaretToken"; + SyntaxKind[SyntaxKind["ExclamationToken"] = 53] = "ExclamationToken"; + SyntaxKind[SyntaxKind["TildeToken"] = 54] = "TildeToken"; + SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 55] = "AmpersandAmpersandToken"; + SyntaxKind[SyntaxKind["BarBarToken"] = 56] = "BarBarToken"; + SyntaxKind[SyntaxKind["QuestionToken"] = 57] = "QuestionToken"; + SyntaxKind[SyntaxKind["ColonToken"] = 58] = "ColonToken"; + SyntaxKind[SyntaxKind["AtToken"] = 59] = "AtToken"; + SyntaxKind[SyntaxKind["QuestionQuestionToken"] = 60] = "QuestionQuestionToken"; + SyntaxKind[SyntaxKind["BacktickToken"] = 61] = "BacktickToken"; + SyntaxKind[SyntaxKind["HashToken"] = 62] = "HashToken"; + SyntaxKind[SyntaxKind["EqualsToken"] = 63] = "EqualsToken"; + SyntaxKind[SyntaxKind["PlusEqualsToken"] = 64] = "PlusEqualsToken"; + SyntaxKind[SyntaxKind["MinusEqualsToken"] = 65] = "MinusEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 66] = "AsteriskEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 67] = "AsteriskAsteriskEqualsToken"; + SyntaxKind[SyntaxKind["SlashEqualsToken"] = 68] = "SlashEqualsToken"; + SyntaxKind[SyntaxKind["PercentEqualsToken"] = 69] = "PercentEqualsToken"; + SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 70] = "LessThanLessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 71] = "GreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 72] = "GreaterThanGreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 73] = "AmpersandEqualsToken"; + SyntaxKind[SyntaxKind["BarEqualsToken"] = 74] = "BarEqualsToken"; + SyntaxKind[SyntaxKind["BarBarEqualsToken"] = 75] = "BarBarEqualsToken"; + SyntaxKind[SyntaxKind["AmpersandAmpersandEqualsToken"] = 76] = "AmpersandAmpersandEqualsToken"; + SyntaxKind[SyntaxKind["QuestionQuestionEqualsToken"] = 77] = "QuestionQuestionEqualsToken"; + SyntaxKind[SyntaxKind["CaretEqualsToken"] = 78] = "CaretEqualsToken"; + SyntaxKind[SyntaxKind["Identifier"] = 79] = "Identifier"; + SyntaxKind[SyntaxKind["PrivateIdentifier"] = 80] = "PrivateIdentifier"; + SyntaxKind[SyntaxKind["JSDocCommentTextToken"] = 81] = "JSDocCommentTextToken"; + SyntaxKind[SyntaxKind["BreakKeyword"] = 82] = "BreakKeyword"; + SyntaxKind[SyntaxKind["CaseKeyword"] = 83] = "CaseKeyword"; + SyntaxKind[SyntaxKind["CatchKeyword"] = 84] = "CatchKeyword"; + SyntaxKind[SyntaxKind["ClassKeyword"] = 85] = "ClassKeyword"; + SyntaxKind[SyntaxKind["ConstKeyword"] = 86] = "ConstKeyword"; + SyntaxKind[SyntaxKind["ContinueKeyword"] = 87] = "ContinueKeyword"; + SyntaxKind[SyntaxKind["DebuggerKeyword"] = 88] = "DebuggerKeyword"; + SyntaxKind[SyntaxKind["DefaultKeyword"] = 89] = "DefaultKeyword"; + SyntaxKind[SyntaxKind["DeleteKeyword"] = 90] = "DeleteKeyword"; + SyntaxKind[SyntaxKind["DoKeyword"] = 91] = "DoKeyword"; + SyntaxKind[SyntaxKind["ElseKeyword"] = 92] = "ElseKeyword"; + SyntaxKind[SyntaxKind["EnumKeyword"] = 93] = "EnumKeyword"; + SyntaxKind[SyntaxKind["ExportKeyword"] = 94] = "ExportKeyword"; + SyntaxKind[SyntaxKind["ExtendsKeyword"] = 95] = "ExtendsKeyword"; + SyntaxKind[SyntaxKind["FalseKeyword"] = 96] = "FalseKeyword"; + SyntaxKind[SyntaxKind["FinallyKeyword"] = 97] = "FinallyKeyword"; + SyntaxKind[SyntaxKind["ForKeyword"] = 98] = "ForKeyword"; + SyntaxKind[SyntaxKind["FunctionKeyword"] = 99] = "FunctionKeyword"; + SyntaxKind[SyntaxKind["IfKeyword"] = 100] = "IfKeyword"; + SyntaxKind[SyntaxKind["ImportKeyword"] = 101] = "ImportKeyword"; + SyntaxKind[SyntaxKind["InKeyword"] = 102] = "InKeyword"; + SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 103] = "InstanceOfKeyword"; + SyntaxKind[SyntaxKind["NewKeyword"] = 104] = "NewKeyword"; + SyntaxKind[SyntaxKind["NullKeyword"] = 105] = "NullKeyword"; + SyntaxKind[SyntaxKind["ReturnKeyword"] = 106] = "ReturnKeyword"; + SyntaxKind[SyntaxKind["SuperKeyword"] = 107] = "SuperKeyword"; + SyntaxKind[SyntaxKind["SwitchKeyword"] = 108] = "SwitchKeyword"; + SyntaxKind[SyntaxKind["ThisKeyword"] = 109] = "ThisKeyword"; + SyntaxKind[SyntaxKind["ThrowKeyword"] = 110] = "ThrowKeyword"; + SyntaxKind[SyntaxKind["TrueKeyword"] = 111] = "TrueKeyword"; + SyntaxKind[SyntaxKind["TryKeyword"] = 112] = "TryKeyword"; + SyntaxKind[SyntaxKind["TypeOfKeyword"] = 113] = "TypeOfKeyword"; + SyntaxKind[SyntaxKind["VarKeyword"] = 114] = "VarKeyword"; + SyntaxKind[SyntaxKind["VoidKeyword"] = 115] = "VoidKeyword"; + SyntaxKind[SyntaxKind["WhileKeyword"] = 116] = "WhileKeyword"; + SyntaxKind[SyntaxKind["WithKeyword"] = 117] = "WithKeyword"; + SyntaxKind[SyntaxKind["ImplementsKeyword"] = 118] = "ImplementsKeyword"; + SyntaxKind[SyntaxKind["InterfaceKeyword"] = 119] = "InterfaceKeyword"; + SyntaxKind[SyntaxKind["LetKeyword"] = 120] = "LetKeyword"; + SyntaxKind[SyntaxKind["PackageKeyword"] = 121] = "PackageKeyword"; + SyntaxKind[SyntaxKind["PrivateKeyword"] = 122] = "PrivateKeyword"; + SyntaxKind[SyntaxKind["ProtectedKeyword"] = 123] = "ProtectedKeyword"; + SyntaxKind[SyntaxKind["PublicKeyword"] = 124] = "PublicKeyword"; + SyntaxKind[SyntaxKind["StaticKeyword"] = 125] = "StaticKeyword"; + SyntaxKind[SyntaxKind["YieldKeyword"] = 126] = "YieldKeyword"; + SyntaxKind[SyntaxKind["AbstractKeyword"] = 127] = "AbstractKeyword"; + SyntaxKind[SyntaxKind["AccessorKeyword"] = 128] = "AccessorKeyword"; + SyntaxKind[SyntaxKind["AsKeyword"] = 129] = "AsKeyword"; + SyntaxKind[SyntaxKind["AssertsKeyword"] = 130] = "AssertsKeyword"; + SyntaxKind[SyntaxKind["AssertKeyword"] = 131] = "AssertKeyword"; + SyntaxKind[SyntaxKind["AnyKeyword"] = 132] = "AnyKeyword"; + SyntaxKind[SyntaxKind["AsyncKeyword"] = 133] = "AsyncKeyword"; + SyntaxKind[SyntaxKind["AwaitKeyword"] = 134] = "AwaitKeyword"; + SyntaxKind[SyntaxKind["BooleanKeyword"] = 135] = "BooleanKeyword"; + SyntaxKind[SyntaxKind["ConstructorKeyword"] = 136] = "ConstructorKeyword"; + SyntaxKind[SyntaxKind["DeclareKeyword"] = 137] = "DeclareKeyword"; + SyntaxKind[SyntaxKind["GetKeyword"] = 138] = "GetKeyword"; + SyntaxKind[SyntaxKind["ImmediateKeyword"] = 139] = "ImmediateKeyword"; + SyntaxKind[SyntaxKind["InferKeyword"] = 140] = "InferKeyword"; + SyntaxKind[SyntaxKind["IntrinsicKeyword"] = 141] = "IntrinsicKeyword"; + SyntaxKind[SyntaxKind["IsKeyword"] = 142] = "IsKeyword"; + SyntaxKind[SyntaxKind["KeyOfKeyword"] = 143] = "KeyOfKeyword"; + SyntaxKind[SyntaxKind["ModuleKeyword"] = 144] = "ModuleKeyword"; + SyntaxKind[SyntaxKind["NamespaceKeyword"] = 145] = "NamespaceKeyword"; + SyntaxKind[SyntaxKind["NeverKeyword"] = 146] = "NeverKeyword"; + SyntaxKind[SyntaxKind["OutKeyword"] = 147] = "OutKeyword"; + SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 148] = "ReadonlyKeyword"; + SyntaxKind[SyntaxKind["RequireKeyword"] = 149] = "RequireKeyword"; + SyntaxKind[SyntaxKind["NumberKeyword"] = 150] = "NumberKeyword"; + SyntaxKind[SyntaxKind["ObjectKeyword"] = 151] = "ObjectKeyword"; + SyntaxKind[SyntaxKind["SatisfiesKeyword"] = 152] = "SatisfiesKeyword"; + SyntaxKind[SyntaxKind["SetKeyword"] = 153] = "SetKeyword"; + SyntaxKind[SyntaxKind["StringKeyword"] = 154] = "StringKeyword"; + SyntaxKind[SyntaxKind["SymbolKeyword"] = 155] = "SymbolKeyword"; + SyntaxKind[SyntaxKind["TypeKeyword"] = 156] = "TypeKeyword"; + SyntaxKind[SyntaxKind["UndefinedKeyword"] = 157] = "UndefinedKeyword"; + SyntaxKind[SyntaxKind["UniqueKeyword"] = 158] = "UniqueKeyword"; + SyntaxKind[SyntaxKind["UnknownKeyword"] = 159] = "UnknownKeyword"; + SyntaxKind[SyntaxKind["UsingKeyword"] = 160] = "UsingKeyword"; + SyntaxKind[SyntaxKind["FromKeyword"] = 161] = "FromKeyword"; + SyntaxKind[SyntaxKind["GlobalKeyword"] = 162] = "GlobalKeyword"; + SyntaxKind[SyntaxKind["BigIntKeyword"] = 163] = "BigIntKeyword"; + SyntaxKind[SyntaxKind["OverrideKeyword"] = 164] = "OverrideKeyword"; + SyntaxKind[SyntaxKind["OfKeyword"] = 165] = "OfKeyword"; + SyntaxKind[SyntaxKind["DeferKeyword"] = 166] = "DeferKeyword"; + SyntaxKind[SyntaxKind["QualifiedName"] = 167] = "QualifiedName"; + SyntaxKind[SyntaxKind["ComputedPropertyName"] = 168] = "ComputedPropertyName"; + SyntaxKind[SyntaxKind["TypeParameter"] = 169] = "TypeParameter"; + SyntaxKind[SyntaxKind["Parameter"] = 170] = "Parameter"; + SyntaxKind[SyntaxKind["Decorator"] = 171] = "Decorator"; + SyntaxKind[SyntaxKind["PropertySignature"] = 172] = "PropertySignature"; + SyntaxKind[SyntaxKind["PropertyDeclaration"] = 173] = "PropertyDeclaration"; + SyntaxKind[SyntaxKind["MethodSignature"] = 174] = "MethodSignature"; + SyntaxKind[SyntaxKind["MethodDeclaration"] = 175] = "MethodDeclaration"; + SyntaxKind[SyntaxKind["ClassStaticBlockDeclaration"] = 176] = "ClassStaticBlockDeclaration"; + SyntaxKind[SyntaxKind["Constructor"] = 177] = "Constructor"; + SyntaxKind[SyntaxKind["GetAccessor"] = 178] = "GetAccessor"; + SyntaxKind[SyntaxKind["SetAccessor"] = 179] = "SetAccessor"; + SyntaxKind[SyntaxKind["CallSignature"] = 180] = "CallSignature"; + SyntaxKind[SyntaxKind["ConstructSignature"] = 181] = "ConstructSignature"; + SyntaxKind[SyntaxKind["IndexSignature"] = 182] = "IndexSignature"; + SyntaxKind[SyntaxKind["TypePredicate"] = 183] = "TypePredicate"; + SyntaxKind[SyntaxKind["TypeReference"] = 184] = "TypeReference"; + SyntaxKind[SyntaxKind["FunctionType"] = 185] = "FunctionType"; + SyntaxKind[SyntaxKind["ConstructorType"] = 186] = "ConstructorType"; + SyntaxKind[SyntaxKind["TypeQuery"] = 187] = "TypeQuery"; + SyntaxKind[SyntaxKind["TypeLiteral"] = 188] = "TypeLiteral"; + SyntaxKind[SyntaxKind["ArrayType"] = 189] = "ArrayType"; + SyntaxKind[SyntaxKind["TupleType"] = 190] = "TupleType"; + SyntaxKind[SyntaxKind["OptionalType"] = 191] = "OptionalType"; + SyntaxKind[SyntaxKind["RestType"] = 192] = "RestType"; + SyntaxKind[SyntaxKind["UnionType"] = 193] = "UnionType"; + SyntaxKind[SyntaxKind["IntersectionType"] = 194] = "IntersectionType"; + SyntaxKind[SyntaxKind["ConditionalType"] = 195] = "ConditionalType"; + SyntaxKind[SyntaxKind["InferType"] = 196] = "InferType"; + SyntaxKind[SyntaxKind["ParenthesizedType"] = 197] = "ParenthesizedType"; + SyntaxKind[SyntaxKind["ThisType"] = 198] = "ThisType"; + SyntaxKind[SyntaxKind["TypeOperator"] = 199] = "TypeOperator"; + SyntaxKind[SyntaxKind["IndexedAccessType"] = 200] = "IndexedAccessType"; + SyntaxKind[SyntaxKind["MappedType"] = 201] = "MappedType"; + SyntaxKind[SyntaxKind["LiteralType"] = 202] = "LiteralType"; + SyntaxKind[SyntaxKind["NamedTupleMember"] = 203] = "NamedTupleMember"; + SyntaxKind[SyntaxKind["TemplateLiteralType"] = 204] = "TemplateLiteralType"; + SyntaxKind[SyntaxKind["TemplateLiteralTypeSpan"] = 205] = "TemplateLiteralTypeSpan"; + SyntaxKind[SyntaxKind["ImportType"] = 206] = "ImportType"; + SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 207] = "ObjectBindingPattern"; + SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 208] = "ArrayBindingPattern"; + SyntaxKind[SyntaxKind["BindingElement"] = 209] = "BindingElement"; + SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 210] = "ArrayLiteralExpression"; + SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 211] = "ObjectLiteralExpression"; + SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 212] = "PropertyAccessExpression"; + SyntaxKind[SyntaxKind["ElementAccessExpression"] = 213] = "ElementAccessExpression"; + SyntaxKind[SyntaxKind["CallExpression"] = 214] = "CallExpression"; + SyntaxKind[SyntaxKind["NewExpression"] = 215] = "NewExpression"; + SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 216] = "TaggedTemplateExpression"; + SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 217] = "TypeAssertionExpression"; + SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 218] = "ParenthesizedExpression"; + SyntaxKind[SyntaxKind["FunctionExpression"] = 219] = "FunctionExpression"; + SyntaxKind[SyntaxKind["ArrowFunction"] = 220] = "ArrowFunction"; + SyntaxKind[SyntaxKind["DeleteExpression"] = 221] = "DeleteExpression"; + SyntaxKind[SyntaxKind["TypeOfExpression"] = 222] = "TypeOfExpression"; + SyntaxKind[SyntaxKind["VoidExpression"] = 223] = "VoidExpression"; + SyntaxKind[SyntaxKind["AwaitExpression"] = 224] = "AwaitExpression"; + SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 225] = "PrefixUnaryExpression"; + SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 226] = "PostfixUnaryExpression"; + SyntaxKind[SyntaxKind["BinaryExpression"] = 227] = "BinaryExpression"; + SyntaxKind[SyntaxKind["ConditionalExpression"] = 228] = "ConditionalExpression"; + SyntaxKind[SyntaxKind["TemplateExpression"] = 229] = "TemplateExpression"; + SyntaxKind[SyntaxKind["YieldExpression"] = 230] = "YieldExpression"; + SyntaxKind[SyntaxKind["SpreadElement"] = 231] = "SpreadElement"; + SyntaxKind[SyntaxKind["ClassExpression"] = 232] = "ClassExpression"; + SyntaxKind[SyntaxKind["OmittedExpression"] = 233] = "OmittedExpression"; + SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 234] = "ExpressionWithTypeArguments"; + SyntaxKind[SyntaxKind["AsExpression"] = 235] = "AsExpression"; + SyntaxKind[SyntaxKind["NonNullExpression"] = 236] = "NonNullExpression"; + SyntaxKind[SyntaxKind["MetaProperty"] = 237] = "MetaProperty"; + SyntaxKind[SyntaxKind["SyntheticExpression"] = 238] = "SyntheticExpression"; + SyntaxKind[SyntaxKind["SatisfiesExpression"] = 239] = "SatisfiesExpression"; + SyntaxKind[SyntaxKind["TemplateSpan"] = 240] = "TemplateSpan"; + SyntaxKind[SyntaxKind["SemicolonClassElement"] = 241] = "SemicolonClassElement"; + SyntaxKind[SyntaxKind["Block"] = 242] = "Block"; + SyntaxKind[SyntaxKind["EmptyStatement"] = 243] = "EmptyStatement"; + SyntaxKind[SyntaxKind["VariableStatement"] = 244] = "VariableStatement"; + SyntaxKind[SyntaxKind["ExpressionStatement"] = 245] = "ExpressionStatement"; + SyntaxKind[SyntaxKind["IfStatement"] = 246] = "IfStatement"; + SyntaxKind[SyntaxKind["DoStatement"] = 247] = "DoStatement"; + SyntaxKind[SyntaxKind["WhileStatement"] = 248] = "WhileStatement"; + SyntaxKind[SyntaxKind["ForStatement"] = 249] = "ForStatement"; + SyntaxKind[SyntaxKind["ForInStatement"] = 250] = "ForInStatement"; + SyntaxKind[SyntaxKind["ForOfStatement"] = 251] = "ForOfStatement"; + SyntaxKind[SyntaxKind["ContinueStatement"] = 252] = "ContinueStatement"; + SyntaxKind[SyntaxKind["BreakStatement"] = 253] = "BreakStatement"; + SyntaxKind[SyntaxKind["ReturnStatement"] = 254] = "ReturnStatement"; + SyntaxKind[SyntaxKind["WithStatement"] = 255] = "WithStatement"; + SyntaxKind[SyntaxKind["SwitchStatement"] = 256] = "SwitchStatement"; + SyntaxKind[SyntaxKind["LabeledStatement"] = 257] = "LabeledStatement"; + SyntaxKind[SyntaxKind["ThrowStatement"] = 258] = "ThrowStatement"; + SyntaxKind[SyntaxKind["TryStatement"] = 259] = "TryStatement"; + SyntaxKind[SyntaxKind["DebuggerStatement"] = 260] = "DebuggerStatement"; + SyntaxKind[SyntaxKind["VariableDeclaration"] = 261] = "VariableDeclaration"; + SyntaxKind[SyntaxKind["VariableDeclarationList"] = 262] = "VariableDeclarationList"; + SyntaxKind[SyntaxKind["FunctionDeclaration"] = 263] = "FunctionDeclaration"; + SyntaxKind[SyntaxKind["ClassDeclaration"] = 264] = "ClassDeclaration"; + SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 265] = "InterfaceDeclaration"; + SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 266] = "TypeAliasDeclaration"; + SyntaxKind[SyntaxKind["EnumDeclaration"] = 267] = "EnumDeclaration"; + SyntaxKind[SyntaxKind["ModuleDeclaration"] = 268] = "ModuleDeclaration"; + SyntaxKind[SyntaxKind["ModuleBlock"] = 269] = "ModuleBlock"; + SyntaxKind[SyntaxKind["CaseBlock"] = 270] = "CaseBlock"; + SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 271] = "NamespaceExportDeclaration"; + SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 272] = "ImportEqualsDeclaration"; + SyntaxKind[SyntaxKind["ImportDeclaration"] = 273] = "ImportDeclaration"; + SyntaxKind[SyntaxKind["ImportClause"] = 274] = "ImportClause"; + SyntaxKind[SyntaxKind["NamespaceImport"] = 275] = "NamespaceImport"; + SyntaxKind[SyntaxKind["NamedImports"] = 276] = "NamedImports"; + SyntaxKind[SyntaxKind["ImportSpecifier"] = 277] = "ImportSpecifier"; + SyntaxKind[SyntaxKind["ExportAssignment"] = 278] = "ExportAssignment"; + SyntaxKind[SyntaxKind["ExportDeclaration"] = 279] = "ExportDeclaration"; + SyntaxKind[SyntaxKind["NamedExports"] = 280] = "NamedExports"; + SyntaxKind[SyntaxKind["NamespaceExport"] = 281] = "NamespaceExport"; + SyntaxKind[SyntaxKind["ExportSpecifier"] = 282] = "ExportSpecifier"; + SyntaxKind[SyntaxKind["MissingDeclaration"] = 283] = "MissingDeclaration"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 284] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["JsxElement"] = 285] = "JsxElement"; + SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 286] = "JsxSelfClosingElement"; + SyntaxKind[SyntaxKind["JsxOpeningElement"] = 287] = "JsxOpeningElement"; + SyntaxKind[SyntaxKind["JsxClosingElement"] = 288] = "JsxClosingElement"; + SyntaxKind[SyntaxKind["JsxFragment"] = 289] = "JsxFragment"; + SyntaxKind[SyntaxKind["JsxOpeningFragment"] = 290] = "JsxOpeningFragment"; + SyntaxKind[SyntaxKind["JsxClosingFragment"] = 291] = "JsxClosingFragment"; + SyntaxKind[SyntaxKind["JsxAttribute"] = 292] = "JsxAttribute"; + SyntaxKind[SyntaxKind["JsxAttributes"] = 293] = "JsxAttributes"; + SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 294] = "JsxSpreadAttribute"; + SyntaxKind[SyntaxKind["JsxExpression"] = 295] = "JsxExpression"; + SyntaxKind[SyntaxKind["JsxNamespacedName"] = 296] = "JsxNamespacedName"; + SyntaxKind[SyntaxKind["CaseClause"] = 297] = "CaseClause"; + SyntaxKind[SyntaxKind["DefaultClause"] = 298] = "DefaultClause"; + SyntaxKind[SyntaxKind["HeritageClause"] = 299] = "HeritageClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 300] = "CatchClause"; + SyntaxKind[SyntaxKind["ImportAttributes"] = 301] = "ImportAttributes"; + SyntaxKind[SyntaxKind["ImportAttribute"] = 302] = "ImportAttribute"; + SyntaxKind[SyntaxKind["PropertyAssignment"] = 303] = "PropertyAssignment"; + SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment"; + SyntaxKind[SyntaxKind["SpreadAssignment"] = 305] = "SpreadAssignment"; + SyntaxKind[SyntaxKind["EnumMember"] = 306] = "EnumMember"; + SyntaxKind[SyntaxKind["SourceFile"] = 307] = "SourceFile"; + SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 308] = "JSDocTypeExpression"; + SyntaxKind[SyntaxKind["JSDocNameReference"] = 309] = "JSDocNameReference"; + SyntaxKind[SyntaxKind["JSDocAllType"] = 310] = "JSDocAllType"; + SyntaxKind[SyntaxKind["JSDocNullableType"] = 311] = "JSDocNullableType"; + SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 312] = "JSDocNonNullableType"; + SyntaxKind[SyntaxKind["JSDocOptionalType"] = 313] = "JSDocOptionalType"; + SyntaxKind[SyntaxKind["JSDocVariadicType"] = 314] = "JSDocVariadicType"; + SyntaxKind[SyntaxKind["JSDoc"] = 315] = "JSDoc"; + SyntaxKind[SyntaxKind["JSDocText"] = 316] = "JSDocText"; + SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 317] = "JSDocTypeLiteral"; + SyntaxKind[SyntaxKind["JSDocSignature"] = 318] = "JSDocSignature"; + SyntaxKind[SyntaxKind["JSDocLink"] = 319] = "JSDocLink"; + SyntaxKind[SyntaxKind["JSDocLinkCode"] = 320] = "JSDocLinkCode"; + SyntaxKind[SyntaxKind["JSDocLinkPlain"] = 321] = "JSDocLinkPlain"; + SyntaxKind[SyntaxKind["JSDocUnknownTag"] = 322] = "JSDocUnknownTag"; + SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 323] = "JSDocAugmentsTag"; + SyntaxKind[SyntaxKind["JSDocImplementsTag"] = 324] = "JSDocImplementsTag"; + SyntaxKind[SyntaxKind["JSDocDeprecatedTag"] = 325] = "JSDocDeprecatedTag"; + SyntaxKind[SyntaxKind["JSDocPublicTag"] = 326] = "JSDocPublicTag"; + SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 327] = "JSDocPrivateTag"; + SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 328] = "JSDocProtectedTag"; + SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 329] = "JSDocReadonlyTag"; + SyntaxKind[SyntaxKind["JSDocOverrideTag"] = 330] = "JSDocOverrideTag"; + SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 331] = "JSDocCallbackTag"; + SyntaxKind[SyntaxKind["JSDocOverloadTag"] = 332] = "JSDocOverloadTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 333] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 334] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocThisTag"] = 335] = "JSDocThisTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 336] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 337] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 338] = "JSDocTypedefTag"; + SyntaxKind[SyntaxKind["JSDocSeeTag"] = 339] = "JSDocSeeTag"; + SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 340] = "JSDocPropertyTag"; + SyntaxKind[SyntaxKind["JSDocThrowsTag"] = 341] = "JSDocThrowsTag"; + SyntaxKind[SyntaxKind["JSDocSatisfiesTag"] = 342] = "JSDocSatisfiesTag"; + SyntaxKind[SyntaxKind["JSDocImportTag"] = 343] = "JSDocImportTag"; + SyntaxKind[SyntaxKind["SyntaxList"] = 344] = "SyntaxList"; + SyntaxKind[SyntaxKind["JSTypeAliasDeclaration"] = 345] = "JSTypeAliasDeclaration"; + SyntaxKind[SyntaxKind["JSImportDeclaration"] = 346] = "JSImportDeclaration"; + SyntaxKind[SyntaxKind["NotEmittedStatement"] = 347] = "NotEmittedStatement"; + SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 348] = "PartiallyEmittedExpression"; + SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 349] = "SyntheticReferenceExpression"; + SyntaxKind[SyntaxKind["NotEmittedTypeElement"] = 350] = "NotEmittedTypeElement"; + SyntaxKind[SyntaxKind["Count"] = 351] = "Count"; + SyntaxKind[SyntaxKind["FirstAssignment"] = 63] = "FirstAssignment"; + SyntaxKind[SyntaxKind["LastAssignment"] = 78] = "LastAssignment"; + SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 64] = "FirstCompoundAssignment"; + SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 78] = "LastCompoundAssignment"; + SyntaxKind[SyntaxKind["FirstReservedWord"] = 82] = "FirstReservedWord"; + SyntaxKind[SyntaxKind["LastReservedWord"] = 117] = "LastReservedWord"; + SyntaxKind[SyntaxKind["FirstKeyword"] = 82] = "FirstKeyword"; + SyntaxKind[SyntaxKind["LastKeyword"] = 166] = "LastKeyword"; + SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 118] = "FirstFutureReservedWord"; + SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 126] = "LastFutureReservedWord"; + SyntaxKind[SyntaxKind["FirstTypeNode"] = 183] = "FirstTypeNode"; + SyntaxKind[SyntaxKind["LastTypeNode"] = 206] = "LastTypeNode"; + SyntaxKind[SyntaxKind["FirstPunctuation"] = 18] = "FirstPunctuation"; + SyntaxKind[SyntaxKind["LastPunctuation"] = 78] = "LastPunctuation"; + SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken"; + SyntaxKind[SyntaxKind["LastToken"] = 166] = "LastToken"; + SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken"; + SyntaxKind[SyntaxKind["LastLiteralToken"] = 14] = "LastLiteralToken"; + SyntaxKind[SyntaxKind["FirstTemplateToken"] = 14] = "FirstTemplateToken"; + SyntaxKind[SyntaxKind["LastTemplateToken"] = 17] = "LastTemplateToken"; + SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 29] = "FirstBinaryOperator"; + SyntaxKind[SyntaxKind["LastBinaryOperator"] = 78] = "LastBinaryOperator"; + SyntaxKind[SyntaxKind["FirstStatement"] = 244] = "FirstStatement"; + SyntaxKind[SyntaxKind["LastStatement"] = 260] = "LastStatement"; + SyntaxKind[SyntaxKind["FirstNode"] = 167] = "FirstNode"; + SyntaxKind[SyntaxKind["FirstJSDocNode"] = 308] = "FirstJSDocNode"; + SyntaxKind[SyntaxKind["LastJSDocNode"] = 343] = "LastJSDocNode"; + SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 322] = "FirstJSDocTagNode"; + SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 343] = "LastJSDocTagNode"; + SyntaxKind[SyntaxKind["FirstContextualKeyword"] = 127] = "FirstContextualKeyword"; + SyntaxKind[SyntaxKind["LastContextualKeyword"] = 166] = "LastContextualKeyword"; + SyntaxKind[SyntaxKind["LastUnaryOperator"] = 54] = "LastUnaryOperator"; + SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken"; + SyntaxKind[SyntaxKind["LastTriviaToken"] = 6] = "LastTriviaToken"; +})(SyntaxKind || (SyntaxKind = {})); +//# sourceMappingURL=syntaxKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/syntaxKind.js.map b/node_modules/typescript/dist/enums/syntaxKind.js.map new file mode 100644 index 0000000..2494251 --- /dev/null +++ b/node_modules/typescript/dist/enums/syntaxKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"syntaxKind.js","sourceRoot":"","sources":["../../src/enums/syntaxKind.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,MAAM,CAAC,IAAI,UAAe,CAAC;AAC3B,CAAC,UAAU,UAAU;IACjB,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IAClD,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IACtD,UAAU,CAAC,UAAU,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,GAAG,yBAAyB,CAAC;IAClF,UAAU,CAAC,UAAU,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC,GAAG,wBAAwB,CAAC;IAChF,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC;IAC9D,UAAU,CAAC,UAAU,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,GAAG,kBAAkB,CAAC;IACpE,UAAU,CAAC,UAAU,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,GAAG,sBAAsB,CAAC;IAC5E,UAAU,CAAC,UAAU,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,GAAG,yBAAyB,CAAC;IAClF,UAAU,CAAC,UAAU,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,gBAAgB,CAAC;IAChE,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC;IAC9D,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC,GAAG,eAAe,CAAC;IAC/D,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC;IACnD,UAAU,CAAC,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;IAClE,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC,GAAG,eAAe,CAAC;IAChE,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,GAAG,CAAC,GAAG,WAAW,CAAC;IACxD,UAAU,CAAC,UAAU,CAAC,gBAAgB,CAAC,GAAG,GAAG,CAAC,GAAG,gBAAgB,CAAC;IAClE,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC,GAAG,eAAe,CAAC;IAChE,UAAU,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,GAAG,CAAC,GAAG,mBAAmB,CAAC;IACxE,UAAU,CAAC,UAAU,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAAC,GAAG,kBAAkB,CAAC;IACtE,UAAU,CAAC,UAAU,CAAC,wBAAwB,CAAC,GAAG,GAAG,CAAC,GAAG,wBAAwB,CAAC;IAClF,UAAU,CAAC,UAAU,CAAC,uBAAuB,CAAC,GAAG,GAAG,CAAC,GAAG,uBAAuB,CAAC;IAChF,UAAU,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC,GAAG,mBAAmB,CAAC;IACvE,UAAU,CAAC,UAAU,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,GAAG,kBAAkB,CAAC;IACpE,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,GAAG,iBAAiB,CAAC;AACtE,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/tokenFlags.d.ts b/node_modules/typescript/dist/enums/tokenFlags.d.ts new file mode 100644 index 0000000..30e711b --- /dev/null +++ b/node_modules/typescript/dist/enums/tokenFlags.d.ts @@ -0,0 +1,2 @@ +export declare var TokenFlags: any; +//# sourceMappingURL=tokenFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/tokenFlags.d.ts.map b/node_modules/typescript/dist/enums/tokenFlags.d.ts.map new file mode 100644 index 0000000..ca891ad --- /dev/null +++ b/node_modules/typescript/dist/enums/tokenFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"tokenFlags.d.ts","sourceRoot":"","sources":["../../src/enums/tokenFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,UAAU,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts b/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts new file mode 100644 index 0000000..66c1950 --- /dev/null +++ b/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts @@ -0,0 +1,30 @@ +export declare enum TokenFlags { + None = 0, + PrecedingLineBreak = 1, + PrecedingJSDocComment = 2, + Unterminated = 4, + ExtendedUnicodeEscape = 8, + Scientific = 16, + Octal = 32, + HexSpecifier = 64, + BinarySpecifier = 128, + OctalSpecifier = 256, + ContainsSeparator = 512, + UnicodeEscape = 1024, + ContainsInvalidEscape = 2048, + HexEscape = 4096, + ContainsLeadingZero = 8192, + ContainsInvalidSeparator = 16384, + PrecedingJSDocLeadingAsterisks = 32768, + SingleQuote = 65536, + PrecedingJSDocWithDeprecated = 131072, + PrecedingJSDocWithSeeOrLink = 262144, + BinaryOrOctalSpecifier = 384, + WithSpecifier = 448, + StringLiteralFlags = 72716, + NumericLiteralFlags = 25584, + TemplateLiteralLikeFlags = 7180, + RegularExpressionLiteralFlags = 4, + IsInvalid = 26656 +} +//# sourceMappingURL=tokenFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map new file mode 100644 index 0000000..9a4fed2 --- /dev/null +++ b/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"tokenFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/tokenFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,UAAU;IAClB,IAAI,IAAI;IACR,kBAAkB,IAAS;IAC3B,qBAAqB,IAAS;IAC9B,YAAY,IAAS;IACrB,qBAAqB,IAAS;IAC9B,UAAU,KAAS;IACnB,KAAK,KAAS;IACd,YAAY,KAAS;IACrB,eAAe,MAAS;IACxB,cAAc,MAAS;IACvB,iBAAiB,MAAS;IAC1B,aAAa,OAAU;IACvB,qBAAqB,OAAU;IAC/B,SAAS,OAAU;IACnB,mBAAmB,OAAU;IAC7B,wBAAwB,QAAU;IAClC,8BAA8B,QAAU;IACxC,WAAW,QAAU;IACrB,4BAA4B,SAAU;IACtC,2BAA2B,SAAU;IACrC,sBAAsB,MAAmC;IACzD,aAAa,MAAwC;IACrD,kBAAkB,QAAyG;IAC3H,mBAAmB,QAA0G;IAC7H,wBAAwB,OAA2F;IACnH,6BAA6B,IAAe;IAC5C,SAAS,QAAiF;CAC7F"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/tokenFlags.enum.js b/node_modules/typescript/dist/enums/tokenFlags.enum.js new file mode 100644 index 0000000..21874cf --- /dev/null +++ b/node_modules/typescript/dist/enums/tokenFlags.enum.js @@ -0,0 +1,32 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/tokenflags.go. DO NOT EDIT. +export var TokenFlags; +(function (TokenFlags) { + TokenFlags[TokenFlags["None"] = 0] = "None"; + TokenFlags[TokenFlags["PrecedingLineBreak"] = 1] = "PrecedingLineBreak"; + TokenFlags[TokenFlags["PrecedingJSDocComment"] = 2] = "PrecedingJSDocComment"; + TokenFlags[TokenFlags["Unterminated"] = 4] = "Unterminated"; + TokenFlags[TokenFlags["ExtendedUnicodeEscape"] = 8] = "ExtendedUnicodeEscape"; + TokenFlags[TokenFlags["Scientific"] = 16] = "Scientific"; + TokenFlags[TokenFlags["Octal"] = 32] = "Octal"; + TokenFlags[TokenFlags["HexSpecifier"] = 64] = "HexSpecifier"; + TokenFlags[TokenFlags["BinarySpecifier"] = 128] = "BinarySpecifier"; + TokenFlags[TokenFlags["OctalSpecifier"] = 256] = "OctalSpecifier"; + TokenFlags[TokenFlags["ContainsSeparator"] = 512] = "ContainsSeparator"; + TokenFlags[TokenFlags["UnicodeEscape"] = 1024] = "UnicodeEscape"; + TokenFlags[TokenFlags["ContainsInvalidEscape"] = 2048] = "ContainsInvalidEscape"; + TokenFlags[TokenFlags["HexEscape"] = 4096] = "HexEscape"; + TokenFlags[TokenFlags["ContainsLeadingZero"] = 8192] = "ContainsLeadingZero"; + TokenFlags[TokenFlags["ContainsInvalidSeparator"] = 16384] = "ContainsInvalidSeparator"; + TokenFlags[TokenFlags["PrecedingJSDocLeadingAsterisks"] = 32768] = "PrecedingJSDocLeadingAsterisks"; + TokenFlags[TokenFlags["SingleQuote"] = 65536] = "SingleQuote"; + TokenFlags[TokenFlags["PrecedingJSDocWithDeprecated"] = 131072] = "PrecedingJSDocWithDeprecated"; + TokenFlags[TokenFlags["PrecedingJSDocWithSeeOrLink"] = 262144] = "PrecedingJSDocWithSeeOrLink"; + TokenFlags[TokenFlags["BinaryOrOctalSpecifier"] = 384] = "BinaryOrOctalSpecifier"; + TokenFlags[TokenFlags["WithSpecifier"] = 448] = "WithSpecifier"; + TokenFlags[TokenFlags["StringLiteralFlags"] = 72716] = "StringLiteralFlags"; + TokenFlags[TokenFlags["NumericLiteralFlags"] = 25584] = "NumericLiteralFlags"; + TokenFlags[TokenFlags["TemplateLiteralLikeFlags"] = 7180] = "TemplateLiteralLikeFlags"; + TokenFlags[TokenFlags["RegularExpressionLiteralFlags"] = 4] = "RegularExpressionLiteralFlags"; + TokenFlags[TokenFlags["IsInvalid"] = 26656] = "IsInvalid"; +})(TokenFlags || (TokenFlags = {})); +//# sourceMappingURL=tokenFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/tokenFlags.enum.js.map b/node_modules/typescript/dist/enums/tokenFlags.enum.js.map new file mode 100644 index 0000000..782e208 --- /dev/null +++ b/node_modules/typescript/dist/enums/tokenFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tokenFlags.enum.js","sourceRoot":"","sources":["../../src/enums/tokenFlags.enum.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAEhG,MAAM,CAAN,IAAY,UA4BX;AA5BD,WAAY,UAAU;IAClB,2CAAQ,CAAA;IACR,uEAA2B,CAAA;IAC3B,6EAA8B,CAAA;IAC9B,2DAAqB,CAAA;IACrB,6EAA8B,CAAA;IAC9B,wDAAmB,CAAA;IACnB,8CAAc,CAAA;IACd,4DAAqB,CAAA;IACrB,mEAAwB,CAAA;IACxB,iEAAuB,CAAA;IACvB,uEAA0B,CAAA;IAC1B,gEAAuB,CAAA;IACvB,gFAA+B,CAAA;IAC/B,wDAAmB,CAAA;IACnB,4EAA6B,CAAA;IAC7B,uFAAkC,CAAA;IAClC,mGAAwC,CAAA;IACxC,6DAAqB,CAAA;IACrB,gGAAsC,CAAA;IACtC,8FAAqC,CAAA;IACrC,iFAAyD,CAAA;IACzD,+DAAqD,CAAA;IACrD,2EAA2H,CAAA;IAC3H,6EAA6H,CAAA;IAC7H,sFAAmH,CAAA;IACnH,6FAA4C,CAAA;IAC5C,yDAA0F,CAAA;AAC9F,CAAC,EA5BW,UAAU,KAAV,UAAU,QA4BrB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/tokenFlags.js b/node_modules/typescript/dist/enums/tokenFlags.js new file mode 100644 index 0000000..1cbe9ff --- /dev/null +++ b/node_modules/typescript/dist/enums/tokenFlags.js @@ -0,0 +1,32 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/tokenflags.go. DO NOT EDIT. +export var TokenFlags; +(function (TokenFlags) { + TokenFlags[TokenFlags["None"] = 0] = "None"; + TokenFlags[TokenFlags["PrecedingLineBreak"] = 1] = "PrecedingLineBreak"; + TokenFlags[TokenFlags["PrecedingJSDocComment"] = 2] = "PrecedingJSDocComment"; + TokenFlags[TokenFlags["Unterminated"] = 4] = "Unterminated"; + TokenFlags[TokenFlags["ExtendedUnicodeEscape"] = 8] = "ExtendedUnicodeEscape"; + TokenFlags[TokenFlags["Scientific"] = 16] = "Scientific"; + TokenFlags[TokenFlags["Octal"] = 32] = "Octal"; + TokenFlags[TokenFlags["HexSpecifier"] = 64] = "HexSpecifier"; + TokenFlags[TokenFlags["BinarySpecifier"] = 128] = "BinarySpecifier"; + TokenFlags[TokenFlags["OctalSpecifier"] = 256] = "OctalSpecifier"; + TokenFlags[TokenFlags["ContainsSeparator"] = 512] = "ContainsSeparator"; + TokenFlags[TokenFlags["UnicodeEscape"] = 1024] = "UnicodeEscape"; + TokenFlags[TokenFlags["ContainsInvalidEscape"] = 2048] = "ContainsInvalidEscape"; + TokenFlags[TokenFlags["HexEscape"] = 4096] = "HexEscape"; + TokenFlags[TokenFlags["ContainsLeadingZero"] = 8192] = "ContainsLeadingZero"; + TokenFlags[TokenFlags["ContainsInvalidSeparator"] = 16384] = "ContainsInvalidSeparator"; + TokenFlags[TokenFlags["PrecedingJSDocLeadingAsterisks"] = 32768] = "PrecedingJSDocLeadingAsterisks"; + TokenFlags[TokenFlags["SingleQuote"] = 65536] = "SingleQuote"; + TokenFlags[TokenFlags["PrecedingJSDocWithDeprecated"] = 131072] = "PrecedingJSDocWithDeprecated"; + TokenFlags[TokenFlags["PrecedingJSDocWithSeeOrLink"] = 262144] = "PrecedingJSDocWithSeeOrLink"; + TokenFlags[TokenFlags["BinaryOrOctalSpecifier"] = 384] = "BinaryOrOctalSpecifier"; + TokenFlags[TokenFlags["WithSpecifier"] = 448] = "WithSpecifier"; + TokenFlags[TokenFlags["StringLiteralFlags"] = 72716] = "StringLiteralFlags"; + TokenFlags[TokenFlags["NumericLiteralFlags"] = 25584] = "NumericLiteralFlags"; + TokenFlags[TokenFlags["TemplateLiteralLikeFlags"] = 7180] = "TemplateLiteralLikeFlags"; + TokenFlags[TokenFlags["RegularExpressionLiteralFlags"] = 4] = "RegularExpressionLiteralFlags"; + TokenFlags[TokenFlags["IsInvalid"] = 26656] = "IsInvalid"; +})(TokenFlags || (TokenFlags = {})); +//# sourceMappingURL=tokenFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/tokenFlags.js.map b/node_modules/typescript/dist/enums/tokenFlags.js.map new file mode 100644 index 0000000..7647565 --- /dev/null +++ b/node_modules/typescript/dist/enums/tokenFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tokenFlags.js","sourceRoot":"","sources":["../../src/enums/tokenFlags.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,MAAM,CAAC,IAAI,UAAe,CAAC;AAC3B,CAAC,UAAU,UAAU;IACjB,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC5C,UAAU,CAAC,UAAU,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,GAAG,oBAAoB,CAAC;IACxE,UAAU,CAAC,UAAU,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,GAAG,uBAAuB,CAAC;IAC9E,UAAU,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,GAAG,cAAc,CAAC;IAC5D,UAAU,CAAC,UAAU,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,GAAG,uBAAuB,CAAC;IAC9E,UAAU,CAAC,UAAU,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,GAAG,YAAY,CAAC;IACzD,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC;IAC/C,UAAU,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC,GAAG,cAAc,CAAC;IAC7D,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,GAAG,CAAC,GAAG,iBAAiB,CAAC;IACpE,UAAU,CAAC,UAAU,CAAC,gBAAgB,CAAC,GAAG,GAAG,CAAC,GAAG,gBAAgB,CAAC;IAClE,UAAU,CAAC,UAA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U,CAAC,+BAA+B,CAAC,GAAG,CAAC,CAAC,GAAG,+BAA+B,CAAC;IAC9F,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,GAAG,WAAW,CAAC;AAC9D,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typeFlags.d.ts b/node_modules/typescript/dist/enums/typeFlags.d.ts new file mode 100644 index 0000000..c1d6075 --- /dev/null +++ b/node_modules/typescript/dist/enums/typeFlags.d.ts @@ -0,0 +1,2 @@ +export declare var TypeFlags: any; +//# sourceMappingURL=typeFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typeFlags.d.ts.map b/node_modules/typescript/dist/enums/typeFlags.d.ts.map new file mode 100644 index 0000000..670f31d --- /dev/null +++ b/node_modules/typescript/dist/enums/typeFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"typeFlags.d.ts","sourceRoot":"","sources":["../../src/enums/typeFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,SAAS,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typeFlags.enum.d.ts b/node_modules/typescript/dist/enums/typeFlags.enum.d.ts new file mode 100644 index 0000000..79cbd06 --- /dev/null +++ b/node_modules/typescript/dist/enums/typeFlags.enum.d.ts @@ -0,0 +1,76 @@ +export declare enum TypeFlags { + None = 0, + Any = 1, + Unknown = 2, + Undefined = 4, + Null = 8, + Void = 16, + String = 32, + Number = 64, + BigInt = 128, + Boolean = 256, + ESSymbol = 512, + StringLiteral = 1024, + NumberLiteral = 2048, + BigIntLiteral = 4096, + BooleanLiteral = 8192, + UniqueESSymbol = 16384, + EnumLiteral = 32768, + Enum = 65536, + NonPrimitive = 131072, + Never = 262144, + TypeParameter = 524288, + Object = 1048576, + Index = 2097152, + TemplateLiteral = 4194304, + StringMapping = 8388608, + Substitution = 16777216, + IndexedAccess = 33554432, + Conditional = 67108864, + Union = 134217728, + Intersection = 268435456, + Reserved1 = 536870912, + Reserved2 = 1073741824, + Reserved3 = -2147483648, + AnyOrUnknown = 3, + Nullable = 12, + Literal = 15360, + Unit = 97292, + Freshable = 80896, + StringOrNumberLiteral = 3072, + StringOrNumberLiteralOrUnique = 19456, + DefinitelyFalsy = 15388, + PossiblyFalsy = 15868, + Intrinsic = 393983, + StringLike = 12583968, + NumberLike = 67648, + BigIntLike = 4224, + BooleanLike = 8448, + EnumLike = 98304, + ESSymbolLike = 16896, + VoidLike = 20, + Primitive = 12713980, + DefinitelyNonNullable = 13893600, + DisjointDomains = 12812284, + UnionOrIntersection = 402653184, + StructuredType = 403701760, + TypeVariable = 34078720, + InstantiableNonPrimitive = 117964800, + InstantiablePrimitive = 14680064, + Instantiable = 132644864, + StructuredOrInstantiable = 536346624, + ObjectFlagsType = 403963917, + Simplifiable = 102760448, + Singleton = 394239, + Narrowable = 536575971, + IncludesMask = 416808959, + IncludesMissingType = 524288, + IncludesNonWideningType = 2097152, + IncludesWildcard = 33554432, + IncludesEmptyObject = 67108864, + IncludesInstantiable = 16777216, + IncludesConstrainedTypeVariable = 536870912, + IncludesError = 1073741824, + NotPrimitiveUnion = 286523411 +} +//# sourceMappingURL=typeFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map new file mode 100644 index 0000000..7f4aae6 --- /dev/null +++ b/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"typeFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/typeFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,SAAS;IACjB,IAAI,IAAI;IACR,GAAG,IAAS;IACZ,OAAO,IAAS;IAChB,SAAS,IAAS;IAClB,IAAI,IAAS;IACb,IAAI,KAAS;IACb,MAAM,KAAS;IAC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AA+B,YAAY;IAC3C,aAAa,aAAY;IACzB,iBAAiB,YAA8E;CAClG"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typeFlags.enum.js b/node_modules/typescript/dist/enums/typeFlags.enum.js new file mode 100644 index 0000000..d6de1e0 --- /dev/null +++ b/node_modules/typescript/dist/enums/typeFlags.enum.js @@ -0,0 +1,78 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var TypeFlags; +(function (TypeFlags) { + TypeFlags[TypeFlags["None"] = 0] = "None"; + TypeFlags[TypeFlags["Any"] = 1] = "Any"; + TypeFlags[TypeFlags["Unknown"] = 2] = "Unknown"; + TypeFlags[TypeFlags["Undefined"] = 4] = "Undefined"; + TypeFlags[TypeFlags["Null"] = 8] = "Null"; + TypeFlags[TypeFlags["Void"] = 16] = "Void"; + TypeFlags[TypeFlags["String"] = 32] = "String"; + TypeFlags[TypeFlags["Number"] = 64] = "Number"; + TypeFlags[TypeFlags["BigInt"] = 128] = "BigInt"; + TypeFlags[TypeFlags["Boolean"] = 256] = "Boolean"; + TypeFlags[TypeFlags["ESSymbol"] = 512] = "ESSymbol"; + TypeFlags[TypeFlags["StringLiteral"] = 1024] = "StringLiteral"; + TypeFlags[TypeFlags["NumberLiteral"] = 2048] = "NumberLiteral"; + TypeFlags[TypeFlags["BigIntLiteral"] = 4096] = "BigIntLiteral"; + TypeFlags[TypeFlags["BooleanLiteral"] = 8192] = "BooleanLiteral"; + TypeFlags[TypeFlags["UniqueESSymbol"] = 16384] = "UniqueESSymbol"; + TypeFlags[TypeFlags["EnumLiteral"] = 32768] = "EnumLiteral"; + TypeFlags[TypeFlags["Enum"] = 65536] = "Enum"; + TypeFlags[TypeFlags["NonPrimitive"] = 131072] = "NonPrimitive"; + TypeFlags[TypeFlags["Never"] = 262144] = "Never"; + TypeFlags[TypeFlags["TypeParameter"] = 524288] = "TypeParameter"; + TypeFlags[TypeFlags["Object"] = 1048576] = "Object"; + TypeFlags[TypeFlags["Index"] = 2097152] = "Index"; + TypeFlags[TypeFlags["TemplateLiteral"] = 4194304] = "TemplateLiteral"; + TypeFlags[TypeFlags["StringMapping"] = 8388608] = "StringMapping"; + TypeFlags[TypeFlags["Substitution"] = 16777216] = "Substitution"; + TypeFlags[TypeFlags["IndexedAccess"] = 33554432] = "IndexedAccess"; + TypeFlags[TypeFlags["Conditional"] = 67108864] = "Conditional"; + TypeFlags[TypeFlags["Union"] = 134217728] = "Union"; + TypeFlags[TypeFlags["Intersection"] = 268435456] = "Intersection"; + TypeFlags[TypeFlags["Reserved1"] = 536870912] = "Reserved1"; + TypeFlags[TypeFlags["Reserved2"] = 1073741824] = "Reserved2"; + TypeFlags[TypeFlags["Reserved3"] = -2147483648] = "Reserved3"; + TypeFlags[TypeFlags["AnyOrUnknown"] = 3] = "AnyOrUnknown"; + TypeFlags[TypeFlags["Nullable"] = 12] = "Nullable"; + TypeFlags[TypeFlags["Literal"] = 15360] = "Literal"; + TypeFlags[TypeFlags["Unit"] = 97292] = "Unit"; + TypeFlags[TypeFlags["Freshable"] = 80896] = "Freshable"; + TypeFlags[TypeFlags["StringOrNumberLiteral"] = 3072] = "StringOrNumberLiteral"; + TypeFlags[TypeFlags["StringOrNumberLiteralOrUnique"] = 19456] = "StringOrNumberLiteralOrUnique"; + TypeFlags[TypeFlags["DefinitelyFalsy"] = 15388] = "DefinitelyFalsy"; + TypeFlags[TypeFlags["PossiblyFalsy"] = 15868] = "PossiblyFalsy"; + TypeFlags[TypeFlags["Intrinsic"] = 393983] = "Intrinsic"; + TypeFlags[TypeFlags["StringLike"] = 12583968] = "StringLike"; + TypeFlags[TypeFlags["NumberLike"] = 67648] = "NumberLike"; + TypeFlags[TypeFlags["BigIntLike"] = 4224] = "BigIntLike"; + TypeFlags[TypeFlags["BooleanLike"] = 8448] = "BooleanLike"; + TypeFlags[TypeFlags["EnumLike"] = 98304] = "EnumLike"; + TypeFlags[TypeFlags["ESSymbolLike"] = 16896] = "ESSymbolLike"; + TypeFlags[TypeFlags["VoidLike"] = 20] = "VoidLike"; + TypeFlags[TypeFlags["Primitive"] = 12713980] = "Primitive"; + TypeFlags[TypeFlags["DefinitelyNonNullable"] = 13893600] = "DefinitelyNonNullable"; + TypeFlags[TypeFlags["DisjointDomains"] = 12812284] = "DisjointDomains"; + TypeFlags[TypeFlags["UnionOrIntersection"] = 402653184] = "UnionOrIntersection"; + TypeFlags[TypeFlags["StructuredType"] = 403701760] = "StructuredType"; + TypeFlags[TypeFlags["TypeVariable"] = 34078720] = "TypeVariable"; + TypeFlags[TypeFlags["InstantiableNonPrimitive"] = 117964800] = "InstantiableNonPrimitive"; + TypeFlags[TypeFlags["InstantiablePrimitive"] = 14680064] = "InstantiablePrimitive"; + TypeFlags[TypeFlags["Instantiable"] = 132644864] = "Instantiable"; + TypeFlags[TypeFlags["StructuredOrInstantiable"] = 536346624] = "StructuredOrInstantiable"; + TypeFlags[TypeFlags["ObjectFlagsType"] = 403963917] = "ObjectFlagsType"; + TypeFlags[TypeFlags["Simplifiable"] = 102760448] = "Simplifiable"; + TypeFlags[TypeFlags["Singleton"] = 394239] = "Singleton"; + TypeFlags[TypeFlags["Narrowable"] = 536575971] = "Narrowable"; + TypeFlags[TypeFlags["IncludesMask"] = 416808959] = "IncludesMask"; + TypeFlags[TypeFlags["IncludesMissingType"] = 524288] = "IncludesMissingType"; + TypeFlags[TypeFlags["IncludesNonWideningType"] = 2097152] = "IncludesNonWideningType"; + TypeFlags[TypeFlags["IncludesWildcard"] = 33554432] = "IncludesWildcard"; + TypeFlags[TypeFlags["IncludesEmptyObject"] = 67108864] = "IncludesEmptyObject"; + TypeFlags[TypeFlags["IncludesInstantiable"] = 16777216] = "IncludesInstantiable"; + TypeFlags[TypeFlags["IncludesConstrainedTypeVariable"] = 536870912] = "IncludesConstrainedTypeVariable"; + TypeFlags[TypeFlags["IncludesError"] = 1073741824] = "IncludesError"; + TypeFlags[TypeFlags["NotPrimitiveUnion"] = 286523411] = "NotPrimitiveUnion"; +})(TypeFlags || (TypeFlags = {})); +//# sourceMappingURL=typeFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typeFlags.enum.js.map b/node_modules/typescript/dist/enums/typeFlags.enum.js.map new file mode 100644 index 0000000..3fbec3a --- /dev/null +++ b/node_modules/typescript/dist/enums/typeFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"typeFlags.enum.js","sourceRoot":"","sources":["../../src/enums/typeFlags.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,SA0EX;AA1ED,WAAY,SAAS;IACjB,yCAAQ,CAAA;IACR,uCAAY,CAAA;IACZ,+CAAgB,CAAA;IAChB,mDAAkB,CAAA;IAClB,yCAAa,CAAA;IACb,0CAAa,CAAA;IACb,8CAAe,CAAA;IACf,8CAAe,CAAA;IACf,+CAAe,CAAA;IACf,iDAAgB,CAAA;IAChB,mDAAiB,CAAA;IACjB,8DAAuB,CAAA;IACvB,8DAAuB,CAAA;IACvB,8DAAuB,CAAA;IACvB,gEAAwB,CAAA;IACxB,iEAAwB,CAAA;IACxB,2DAAqB,CAAA;IACrB,6CAAc,CAAA;IACd,8DAAsB,CAAA;IACtB,gDAAe,CAAA;IACf,gEAAuB,CAAA;IACvB,mDAAgB,CAAA;IAChB,iDAAe,CAAA;IACf,qEAAyB,CAAA;IACzB,iEAAuB,CAAA;IACvB,gEAAsB,CAAA;IACtB,kEAAuB,CAAA;IACvB,8DAAqB,CAAA;IACrB,mDAAe,CAAA;IACf,iEAAsB,CAAA;IACtB,2DAAmB,CAAA;IACnB,4DAAmB,CAAA;IACnB,6DAAmB,CAAA;IACnB,yDAA4B,CAAA;IAC5B,kDAA2B,CAAA;IAC3B,mDAAwE,CAAA;IACxE,6CAAiD,CAAA;IACjD,uDAA0B,CAAA;IAC1B,8EAAqD,CAAA;IACrD,+FAA8E,CAAA;IAC9E,mEAA0G,CAAA;IAC1G,+DAAoE,CAAA;IACpE,wDAAgH,CAAA;IAChH,4DAAqE,CAAA;IACrE,yDAA0C,CAAA;IAC1C,wDAAmC,CAAA;IACnC,0DAAsC,CAAA;IACtC,qDAA6B,CAAA;IAC7B,6DAAwC,CAAA;IACxC,kDAA2B,CAAA;IAC3B,0DAA0G,CAAA;IAC1G,kFAA4H,CAAA;IAC5H,sEAAoH,CAAA;IACpH,+EAA0C,CAAA;IAC1C,qEAA8C,CAAA;IAC9C,gEAA4C,CAAA;IAC5C,yFAAoE,CAAA;IACpE,kFAA+D,CAAA;IAC/D,iEAA+D,CAAA;IAC/D,yFAAwD,CAAA;IACxD,uEAAwE,CAAA;IACxE,iEAAkD,CAAA;IAClD,wDAA0H,CAAA;IAC1H,6DAAqJ,CAAA;IACrJ,iEAAiI,CAAA;IACjI,4EAAmC,CAAA;IACnC,qFAA+B,CAAA;IAC/B,wEAAgC,CAAA;IAChC,8EAAiC,CAAA;IACjC,gFAAmC,CAAA;IACnC,uGAA2C,CAAA;IAC3C,oEAAyB,CAAA;IACzB,2EAA+F,CAAA;AACnG,CAAC,EA1EW,SAAS,KAAT,SAAS,QA0EpB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typeFlags.js b/node_modules/typescript/dist/enums/typeFlags.js new file mode 100644 index 0000000..c032a1a --- /dev/null +++ b/node_modules/typescript/dist/enums/typeFlags.js @@ -0,0 +1,78 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var TypeFlags; +(function (TypeFlags) { + TypeFlags[TypeFlags["None"] = 0] = "None"; + TypeFlags[TypeFlags["Any"] = 1] = "Any"; + TypeFlags[TypeFlags["Unknown"] = 2] = "Unknown"; + TypeFlags[TypeFlags["Undefined"] = 4] = "Undefined"; + TypeFlags[TypeFlags["Null"] = 8] = "Null"; + TypeFlags[TypeFlags["Void"] = 16] = "Void"; + TypeFlags[TypeFlags["String"] = 32] = "String"; + TypeFlags[TypeFlags["Number"] = 64] = "Number"; + TypeFlags[TypeFlags["BigInt"] = 128] = "BigInt"; + TypeFlags[TypeFlags["Boolean"] = 256] = "Boolean"; + TypeFlags[TypeFlags["ESSymbol"] = 512] = "ESSymbol"; + TypeFlags[TypeFlags["StringLiteral"] = 1024] = "StringLiteral"; + TypeFlags[TypeFlags["NumberLiteral"] = 2048] = "NumberLiteral"; + TypeFlags[TypeFlags["BigIntLiteral"] = 4096] = "BigIntLiteral"; + TypeFlags[TypeFlags["BooleanLiteral"] = 8192] = "BooleanLiteral"; + TypeFlags[TypeFlags["UniqueESSymbol"] = 16384] = "UniqueESSymbol"; + TypeFlags[TypeFlags["EnumLiteral"] = 32768] = "EnumLiteral"; + TypeFlags[TypeFlags["Enum"] = 65536] = "Enum"; + TypeFlags[TypeFlags["NonPrimitive"] = 131072] = "NonPrimitive"; + TypeFlags[TypeFlags["Never"] = 262144] = "Never"; + TypeFlags[TypeFlags["TypeParameter"] = 524288] = "TypeParameter"; + TypeFlags[TypeFlags["Object"] = 1048576] = "Object"; + TypeFlags[TypeFlags["Index"] = 2097152] = "Index"; + TypeFlags[TypeFlags["TemplateLiteral"] = 4194304] = "TemplateLiteral"; + TypeFlags[TypeFlags["StringMapping"] = 8388608] = "StringMapping"; + TypeFlags[TypeFlags["Substitution"] = 16777216] = "Substitution"; + TypeFlags[TypeFlags["IndexedAccess"] = 33554432] = "IndexedAccess"; + TypeFlags[TypeFlags["Conditional"] = 67108864] = "Conditional"; + TypeFlags[TypeFlags["Union"] = 134217728] = "Union"; + TypeFlags[TypeFlags["Intersection"] = 268435456] = "Intersection"; + TypeFlags[TypeFlags["Reserved1"] = 536870912] = "Reserved1"; + TypeFlags[TypeFlags["Reserved2"] = 1073741824] = "Reserved2"; + TypeFlags[TypeFlags["Reserved3"] = -2147483648] = "Reserved3"; + TypeFlags[TypeFlags["AnyOrUnknown"] = 3] = "AnyOrUnknown"; + TypeFlags[TypeFlags["Nullable"] = 12] = "Nullable"; + TypeFlags[TypeFlags["Literal"] = 15360] = "Literal"; + TypeFlags[TypeFlags["Unit"] = 97292] = "Unit"; + TypeFlags[TypeFlags["Freshable"] = 80896] = "Freshable"; + TypeFlags[TypeFlags["StringOrNumberLiteral"] = 3072] = "StringOrNumberLiteral"; + TypeFlags[TypeFlags["StringOrNumberLiteralOrUnique"] = 19456] = "StringOrNumberLiteralOrUnique"; + TypeFlags[TypeFlags["DefinitelyFalsy"] = 15388] = "DefinitelyFalsy"; + TypeFlags[TypeFlags["PossiblyFalsy"] = 15868] = "PossiblyFalsy"; + TypeFlags[TypeFlags["Intrinsic"] = 393983] = "Intrinsic"; + TypeFlags[TypeFlags["StringLike"] = 12583968] = "StringLike"; + TypeFlags[TypeFlags["NumberLike"] = 67648] = "NumberLike"; + TypeFlags[TypeFlags["BigIntLike"] = 4224] = "BigIntLike"; + TypeFlags[TypeFlags["BooleanLike"] = 8448] = "BooleanLike"; + TypeFlags[TypeFlags["EnumLike"] = 98304] = "EnumLike"; + TypeFlags[TypeFlags["ESSymbolLike"] = 16896] = "ESSymbolLike"; + TypeFlags[TypeFlags["VoidLike"] = 20] = "VoidLike"; + TypeFlags[TypeFlags["Primitive"] = 12713980] = "Primitive"; + TypeFlags[TypeFlags["DefinitelyNonNullable"] = 13893600] = "DefinitelyNonNullable"; + TypeFlags[TypeFlags["DisjointDomains"] = 12812284] = "DisjointDomains"; + TypeFlags[TypeFlags["UnionOrIntersection"] = 402653184] = "UnionOrIntersection"; + TypeFlags[TypeFlags["StructuredType"] = 403701760] = "StructuredType"; + TypeFlags[TypeFlags["TypeVariable"] = 34078720] = "TypeVariable"; + TypeFlags[TypeFlags["InstantiableNonPrimitive"] = 117964800] = "InstantiableNonPrimitive"; + TypeFlags[TypeFlags["InstantiablePrimitive"] = 14680064] = "InstantiablePrimitive"; + TypeFlags[TypeFlags["Instantiable"] = 132644864] = "Instantiable"; + TypeFlags[TypeFlags["StructuredOrInstantiable"] = 536346624] = "StructuredOrInstantiable"; + TypeFlags[TypeFlags["ObjectFlagsType"] = 403963917] = "ObjectFlagsType"; + TypeFlags[TypeFlags["Simplifiable"] = 102760448] = "Simplifiable"; + TypeFlags[TypeFlags["Singleton"] = 394239] = "Singleton"; + TypeFlags[TypeFlags["Narrowable"] = 536575971] = "Narrowable"; + TypeFlags[TypeFlags["IncludesMask"] = 416808959] = "IncludesMask"; + TypeFlags[TypeFlags["IncludesMissingType"] = 524288] = "IncludesMissingType"; + TypeFlags[TypeFlags["IncludesNonWideningType"] = 2097152] = "IncludesNonWideningType"; + TypeFlags[TypeFlags["IncludesWildcard"] = 33554432] = "IncludesWildcard"; + TypeFlags[TypeFlags["IncludesEmptyObject"] = 67108864] = "IncludesEmptyObject"; + TypeFlags[TypeFlags["IncludesInstantiable"] = 16777216] = "IncludesInstantiable"; + TypeFlags[TypeFlags["IncludesConstrainedTypeVariable"] = 536870912] = "IncludesConstrainedTypeVariable"; + TypeFlags[TypeFlags["IncludesError"] = 1073741824] = "IncludesError"; + TypeFlags[TypeFlags["NotPrimitiveUnion"] = 286523411] = "NotPrimitiveUnion"; +})(TypeFlags || (TypeFlags = {})); +//# sourceMappingURL=typeFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typeFlags.js.map b/node_modules/typescript/dist/enums/typeFlags.js.map new file mode 100644 index 0000000..b88dd45 --- /dev/null +++ b/node_modules/typescript/dist/enums/typeFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"typeFlags.js","sourceRoot":"","sources":["../../src/enums/typeFlags.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,SAAc,CAAC;AAC1B,CAAC,UAAU,SAAS;IAChB,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC1C,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IACxC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IAChD,SAAS,CAAC,SAAS,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C,GAAG,cAAc,CAAC;IAClE,SAAS,CAAC,SAAS,CAAC,qBAAqB,CAAC,GAAG,MAAM,CAAC,GAAG,qBAAqB,CAAC;IAC7E,SAAS,CAAC,SAAS,CAAC,yBAAyB,CAAC,GAAG,OAAO,CAAC,GAAG,yBAAyB,CAAC;IACtF,SAAS,CAAC,SAAS,CAAC,kBAAkB,CAAC,GAAG,QAAQ,CAAC,GAAG,kBAAkB,CAAC;IACzE,SAAS,CAAC,SAAS,CAAC,qBAAqB,CAAC,GAAG,QAAQ,CAAC,GAAG,qBAAqB,CAAC;IAC/E,SAAS,CAAC,SAAS,CAAC,sBAAsB,CAAC,GAAG,QAAQ,CAAC,GAAG,sBAAsB,CAAC;IACjF,SAAS,CAAC,SAAS,CAAC,iCAAiC,CAAC,GAAG,SAAS,CAAC,GAAG,iCAAiC,CAAC;IACxG,SAAS,CAAC,SAAS,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC,GAAG,eAAe,CAAC;IACrE,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC,GAAG,mBAAmB,CAAC;AAChF,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typePredicateKind.d.ts b/node_modules/typescript/dist/enums/typePredicateKind.d.ts new file mode 100644 index 0000000..89e80ae --- /dev/null +++ b/node_modules/typescript/dist/enums/typePredicateKind.d.ts @@ -0,0 +1,2 @@ +export declare var TypePredicateKind: any; +//# sourceMappingURL=typePredicateKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map b/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map new file mode 100644 index 0000000..b1be557 --- /dev/null +++ b/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"typePredicateKind.d.ts","sourceRoot":"","sources":["../../src/enums/typePredicateKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,iBAAiB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts b/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts new file mode 100644 index 0000000..8948d4a --- /dev/null +++ b/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts @@ -0,0 +1,7 @@ +export declare enum TypePredicateKind { + This = 0, + Identifier = 1, + AssertsThis = 2, + AssertsIdentifier = 3 +} +//# sourceMappingURL=typePredicateKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map b/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map new file mode 100644 index 0000000..201098d --- /dev/null +++ b/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"typePredicateKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/typePredicateKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,iBAAiB;IACzB,IAAI,IAAI;IACR,UAAU,IAAI;IACd,WAAW,IAAI;IACf,iBAAiB,IAAI;CACxB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typePredicateKind.enum.js b/node_modules/typescript/dist/enums/typePredicateKind.enum.js new file mode 100644 index 0000000..3043831 --- /dev/null +++ b/node_modules/typescript/dist/enums/typePredicateKind.enum.js @@ -0,0 +1,9 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var TypePredicateKind; +(function (TypePredicateKind) { + TypePredicateKind[TypePredicateKind["This"] = 0] = "This"; + TypePredicateKind[TypePredicateKind["Identifier"] = 1] = "Identifier"; + TypePredicateKind[TypePredicateKind["AssertsThis"] = 2] = "AssertsThis"; + TypePredicateKind[TypePredicateKind["AssertsIdentifier"] = 3] = "AssertsIdentifier"; +})(TypePredicateKind || (TypePredicateKind = {})); +//# sourceMappingURL=typePredicateKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map b/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map new file mode 100644 index 0000000..55f4b23 --- /dev/null +++ b/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"typePredicateKind.enum.js","sourceRoot":"","sources":["../../src/enums/typePredicateKind.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IACzB,yDAAQ,CAAA;IACR,qEAAc,CAAA;IACd,uEAAe,CAAA;IACf,mFAAqB,CAAA;AACzB,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typePredicateKind.js b/node_modules/typescript/dist/enums/typePredicateKind.js new file mode 100644 index 0000000..c4012c7 --- /dev/null +++ b/node_modules/typescript/dist/enums/typePredicateKind.js @@ -0,0 +1,9 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var TypePredicateKind; +(function (TypePredicateKind) { + TypePredicateKind[TypePredicateKind["This"] = 0] = "This"; + TypePredicateKind[TypePredicateKind["Identifier"] = 1] = "Identifier"; + TypePredicateKind[TypePredicateKind["AssertsThis"] = 2] = "AssertsThis"; + TypePredicateKind[TypePredicateKind["AssertsIdentifier"] = 3] = "AssertsIdentifier"; +})(TypePredicateKind || (TypePredicateKind = {})); +//# sourceMappingURL=typePredicateKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typePredicateKind.js.map b/node_modules/typescript/dist/enums/typePredicateKind.js.map new file mode 100644 index 0000000..d87dfc8 --- /dev/null +++ b/node_modules/typescript/dist/enums/typePredicateKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"typePredicateKind.js","sourceRoot":"","sources":["../../src/enums/typePredicateKind.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,iBAAsB,CAAC;AAClC,CAAC,UAAU,iBAAiB;IACxB,iBAAiB,CAAC,iBAAiB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC1D,iBAAiB,CAAC,iBAAiB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC;IACtE,iBAAiB,CAAC,iBAAiB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;IACxE,iBAAiB,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,GAAG,mBAAmB,CAAC;AACxF,CAAC,CAAC,CAAC,iBAAiB,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/internal/utils.d.ts b/node_modules/typescript/dist/internal/utils.d.ts new file mode 100644 index 0000000..fbaf755 --- /dev/null +++ b/node_modules/typescript/dist/internal/utils.d.ts @@ -0,0 +1,23 @@ +/** + * Safer version of `Function` which should not be called. + * Every function should be assignable to this, but this should not be assignable to every function. + */ +export type AnyFunction = (...args: never[]) => void; +/** + * Type of objects whose values are all of the same type. + * The `in` and `for-in` operators can *not* be safely used, + * since `Object.prototype` may be modified by outside code. + */ +export interface MapLike { + [index: string]: T; +} +/** + * Indicates whether a map-like contains an own property with the specified key. + * + * @param map A map-like. + * @param key A property key. + */ +export declare function hasProperty(map: MapLike, key: string): boolean; +export declare function assertNever(member: never, message?: string, stackCrawlMark?: AnyFunction): never; +export declare function fail(message?: string, stackCrawlMark?: AnyFunction): never; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/internal/utils.d.ts.map b/node_modules/typescript/dist/internal/utils.d.ts.map new file mode 100644 index 0000000..e52d6d4 --- /dev/null +++ b/node_modules/typescript/dist/internal/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/internal/utils.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,IAAI,CAAC;AAErD;;;;GAIG;AACH,MAAM,WAAW,OAAO,CAAC,CAAC;IACtB,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,SAAmB,EAAE,cAAc,CAAC,EAAE,WAAW,GAAG,KAAK,CAG1G;AAED,wBAAgB,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,WAAW,GAAG,KAAK,CAQ1E"} \ No newline at end of file diff --git a/node_modules/typescript/dist/internal/utils.js b/node_modules/typescript/dist/internal/utils.js new file mode 100644 index 0000000..00899c5 --- /dev/null +++ b/node_modules/typescript/dist/internal/utils.js @@ -0,0 +1,25 @@ +import { formatSyntaxKind } from "../ast/utils.js"; +const hasOwnProperty = Object.prototype.hasOwnProperty; +/** + * Indicates whether a map-like contains an own property with the specified key. + * + * @param map A map-like. + * @param key A property key. + */ +export function hasProperty(map, key) { + return hasOwnProperty.call(map, key); +} +export function assertNever(member, message = "Illegal value:", stackCrawlMark) { + const detail = typeof member === "object" && hasProperty(member, "kind") && hasProperty(member, "pos") ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member); + return fail(`${message} ${detail}`, stackCrawlMark || assertNever); +} +export function fail(message, stackCrawlMark) { + // eslint-disable-next-line no-debugger + debugger; + const e = new Error(message ? `Debug Failure. ${message}` : "Debug Failure."); + if (Error.captureStackTrace) { + Error.captureStackTrace(e, stackCrawlMark || fail); + } + throw e; +} +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/internal/utils.js.map b/node_modules/typescript/dist/internal/utils.js.map new file mode 100644 index 0000000..b896aa3 --- /dev/null +++ b/node_modules/typescript/dist/internal/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/internal/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AAiBvD;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,GAAiB,EAAE,GAAW;IACtD,OAAO,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,MAAa,EAAE,OAAO,GAAG,gBAAgB,EAAE,cAA4B;IAC/F,MAAM,MAAM,GAAG,OAAO,MAAM,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,cAAc,GAAG,gBAAgB,CAAE,MAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC3L,OAAO,IAAI,CAAC,GAAG,OAAO,IAAI,MAAM,EAAE,EAAE,cAAc,IAAI,WAAW,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,OAAgB,EAAE,cAA4B;IAC/D,uCAAuC;IACvC,QAAQ,CAAC;IACT,MAAM,CAAC,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAkB,OAAO,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC9E,IAAK,KAAa,CAAC,iBAAiB,EAAE,CAAC;QAClC,KAAa,CAAC,iBAAiB,CAAC,CAAC,EAAE,cAAc,IAAI,IAAI,CAAC,CAAC;IAChE,CAAC;IACD,MAAM,CAAC,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/lib/getExePath.d.ts b/node_modules/typescript/lib/getExePath.d.ts new file mode 100644 index 0000000..bf33fb7 --- /dev/null +++ b/node_modules/typescript/lib/getExePath.d.ts @@ -0,0 +1,2 @@ +declare function getExePath(): string; +export default getExePath; diff --git a/node_modules/typescript/lib/getExePath.js b/node_modules/typescript/lib/getExePath.js new file mode 100644 index 0000000..ade3d7b --- /dev/null +++ b/node_modules/typescript/lib/getExePath.js @@ -0,0 +1,70 @@ +import fs from "node:fs"; +import module from "node:module"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +// NOTE: Keep VS Code extension's resolveTsdkPathToExe in sync with this function. +export default function getExePath() { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const normalizedDirname = __dirname.replace(/\\/g, "/"); + + const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf8")); + const pkgName = pkg.name; + const baseName = pkgName.startsWith("@") ? pkgName.split("/")[1] : pkgName; + const expectedBinName = baseName === "typescript" ? "tsc" : "tsgo"; + const binNames = pkg.bin && typeof pkg.bin === "object" ? Object.keys(pkg.bin) : []; + if (binNames.length !== 1 || binNames[0] !== expectedBinName) { + throw new Error(`Expected ${pkgName} to declare exactly one bin entry named ${expectedBinName}.`); + } + let binName = expectedBinName; + let exeDir; + + const expectedPackage = baseName + "-" + process.platform + "-" + process.arch; + + if (normalizedDirname.endsWith("/_packages/" + baseName + "/lib")) { + // We're running directly from source in the repo. + // The local repo build (`hereby build`) always produces `tsgo`, regardless + // of the published `bin` name, so don't use binName here. + exeDir = path.resolve(__dirname, "..", "..", "..", "built", "local"); + binName = "tsgo"; + } + else if (normalizedDirname.endsWith("/built/npm/" + baseName + "/lib")) { + // We're running from the built output. + exeDir = path.resolve(__dirname, "..", "..", expectedPackage, "lib"); + } + else { + // We're actually running from an installed package. + const platformPackageName = "@typescript/" + expectedPackage; + try { + if (typeof import.meta.resolve === "undefined") { + // v16.20.1 + const require = module.createRequire(import.meta.url); + const packageJson = require.resolve(platformPackageName + "/package.json"); + exeDir = path.join(path.dirname(packageJson), "lib"); + } + else { + // v20.6.0, v18.19.0 + const packageJson = import.meta.resolve(platformPackageName + "/package.json"); + const packageJsonPath = fileURLToPath(packageJson); + exeDir = path.join(path.dirname(packageJsonPath), "lib"); + } + } + catch (e) { + throw new Error("Unable to resolve " + platformPackageName + ". Either your platform is unsupported, or you are missing the package on disk."); + } + } + + let exe = path.join(exeDir, binName); + if (process.platform === "win32") { + exe += ".exe"; + if (exe.length >= 248) { + exe = "\\\\?\\" + exe; + } + } + + if (!fs.existsSync(exe)) { + throw new Error("Executable not found: " + exe); + } + + return exe; +} diff --git a/node_modules/typescript/lib/tsc.js b/node_modules/typescript/lib/tsc.js new file mode 100644 index 0000000..eb869b7 --- /dev/null +++ b/node_modules/typescript/lib/tsc.js @@ -0,0 +1,28 @@ +#!/usr/bin/env node + +import getExePath from "#getExePath"; +import { execFileSync } from "node:child_process"; + +const exe = getExePath(); + +if (process.platform !== "win32" && typeof process.execve === "function") { + // > v22.15.0 + try { + process.execve(exe, [exe, ...process.argv.slice(2)]); + } + catch { + // may not be available, ignore the error and fallback + } +} + +try { + execFileSync(exe, process.argv.slice(2), { stdio: "inherit" }); +} +catch (e) { + if (e.status) { + process.exitCode = e.status; + } + else { + throw e; + } +} diff --git a/node_modules/typescript/lib/version.cjs b/node_modules/typescript/lib/version.cjs new file mode 100644 index 0000000..5a2e8c8 --- /dev/null +++ b/node_modules/typescript/lib/version.cjs @@ -0,0 +1,3 @@ +const { version } = require("../package.json"); +exports.version = version; +exports.versionMajorMinor = "7.0"; diff --git a/node_modules/typescript/lib/version.d.cts b/node_modules/typescript/lib/version.d.cts new file mode 100644 index 0000000..b434811 --- /dev/null +++ b/node_modules/typescript/lib/version.d.cts @@ -0,0 +1,2 @@ +export declare const version: string; +export declare const versionMajorMinor = "7.0"; diff --git a/node_modules/typescript/package.json b/node_modules/typescript/package.json new file mode 100644 index 0000000..f4242a6 --- /dev/null +++ b/node_modules/typescript/package.json @@ -0,0 +1,87 @@ +{ + "name": "typescript", + "version": "7.0.2", + "license": "Apache-2.0", + "author": "Microsoft Corp.", + "homepage": "https://www.typescriptlang.org/", + "description": "TypeScript is a language for application scale JavaScript development", + "keywords": [ + "TypeScript", + "Microsoft", + "compiler", + "language", + "javascript" + ], + "bugs": { + "url": "https://github.com/microsoft/TypeScript/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/TypeScript.git" + }, + "type": "module", + "preferUnplugged": true, + "engines": { + "node": ">=16.20.0" + }, + "files": [ + "bin", + "lib", + "dist", + "vendor", + "NOTICE.txt" + ], + "bin": { + "tsc": "./bin/tsc" + }, + "exports": { + "./package.json": "./package.json", + ".": "./lib/version.cjs", + "./unstable/sync": "./dist/api/sync/api.js", + "./unstable/async": "./dist/api/async/api.js", + "./unstable/fs": "./dist/api/fs.js", + "./unstable/proto": "./dist/api/proto.js", + "./unstable/ast": "./dist/ast/index.js", + "./unstable/ast/is": "./dist/ast/is.js", + "./unstable/ast/factory": "./dist/ast/factory.generated.js", + "./unstable/ast/utils": "./dist/ast/utils.js", + "./unstable/ast/scanner": "./dist/ast/scanner.js", + "./unstable/ast/visitor": "./dist/ast/visitor.js", + "./unstable/ast/clone": "./dist/ast/clone.js" + }, + "imports": { + "#getExePath": "./lib/getExePath.js", + "#enums/*": { + "types": "./dist/enums/*.enum.d.ts", + "default": "./dist/enums/*.js" + }, + "#vscode-jsonrpc/node": "./vendor/vscode-jsonrpc/lib/node/main.js" + }, + "gitHead": "2bd066d87f5bafd315be9f40889d0a60b9e58e0b", + "publishConfig": { + "access": "public", + "tag": "latest" + }, + "optionalDependencies": { + "@typescript/typescript-win32-x64": "7.0.2", + "@typescript/typescript-win32-arm64": "7.0.2", + "@typescript/typescript-linux-x64": "7.0.2", + "@typescript/typescript-linux-arm": "7.0.2", + "@typescript/typescript-linux-arm64": "7.0.2", + "@typescript/typescript-darwin-x64": "7.0.2", + "@typescript/typescript-darwin-arm64": "7.0.2", + "@typescript/typescript-aix-ppc64": "7.0.2", + "@typescript/typescript-freebsd-arm64": "7.0.2", + "@typescript/typescript-freebsd-x64": "7.0.2", + "@typescript/typescript-linux-loong64": "7.0.2", + "@typescript/typescript-linux-mips64el": "7.0.2", + "@typescript/typescript-linux-ppc64": "7.0.2", + "@typescript/typescript-linux-riscv64": "7.0.2", + "@typescript/typescript-linux-s390x": "7.0.2", + "@typescript/typescript-netbsd-arm64": "7.0.2", + "@typescript/typescript-netbsd-x64": "7.0.2", + "@typescript/typescript-openbsd-arm64": "7.0.2", + "@typescript/typescript-openbsd-x64": "7.0.2", + "@typescript/typescript-sunos-x64": "7.0.2" + } +} \ No newline at end of file diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/License.txt b/node_modules/typescript/vendor/vscode-jsonrpc/License.txt new file mode 100644 index 0000000..a07e3ae --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/License.txt @@ -0,0 +1,11 @@ +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +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/typescript/vendor/vscode-jsonrpc/README.md b/node_modules/typescript/vendor/vscode-jsonrpc/README.md new file mode 100644 index 0000000..a3ddd91 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/README.md @@ -0,0 +1,54 @@ +# VSCode JSON RPC + +[![NPM Version](https://img.shields.io/npm/v/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc) +[![Build Status](https://dev.azure.com/vscode/vscode-languageserver-node/_apis/build/status%2Fvscode-languageserver-node?branchName=main)](https://dev.azure.com/vscode/vscode-languageserver-node/_build/latest?definitionId=52&branchName=main) + +This npm module implements the base messaging protocol spoken between a VSCode language server and a VSCode language client. + +The npm module can also be used standalone to establish a [JSON-RPC](http://www.jsonrpc.org/) channel between +a client and a server. Below an example how to setup a JSON-RPC connection. First the client side. + +```ts +import * as cp from 'child_process'; +import * as rpc from 'vscode-jsonrpc/node'; + +let childProcess = cp.spawn(...); + +// Use stdin and stdout for communication: +let connection = rpc.createMessageConnection( + new rpc.StreamMessageReader(childProcess.stdout), + new rpc.StreamMessageWriter(childProcess.stdin)); + +let notification = new rpc.NotificationType('testNotification'); + +connection.listen(); + +connection.sendNotification(notification, 'Hello World'); +``` + +The server side looks very symmetrical: + +```ts +import * as rpc from 'vscode-jsonrpc/node'; + + +let connection = rpc.createMessageConnection( + new rpc.StreamMessageReader(process.stdin), + new rpc.StreamMessageWriter(process.stdout)); + +let notification = new rpc.NotificationType('testNotification'); +connection.onNotification(notification, (param: string) => { + console.log(param); // This prints Hello World +}); + +connection.listen(); +``` + +# History + +For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md) + + +## License +[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt) diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts new file mode 100644 index 0000000..05d994f --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts @@ -0,0 +1,17 @@ +import { AbstractMessageReader, DataCallback, AbstractMessageWriter, Message, Disposable, ConnectionStrategy, ConnectionOptions, MessageReader, MessageWriter, Logger, MessageConnection } from '../common/api'; +export * from '../common/api'; +export declare class BrowserMessageReader extends AbstractMessageReader implements MessageReader { + private _onData; + private _messageListener; + constructor(port: MessagePort | Worker | DedicatedWorkerGlobalScope); + listen(callback: DataCallback): Disposable; +} +export declare class BrowserMessageWriter extends AbstractMessageWriter implements MessageWriter { + private port; + private errorCount; + constructor(port: MessagePort | Worker | DedicatedWorkerGlobalScope); + write(msg: Message): Promise; + private handleError; + end(): void; +} +export declare function createMessageConnection(reader: MessageReader, writer: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js new file mode 100644 index 0000000..11e51f8 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js @@ -0,0 +1,83 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BrowserMessageWriter = exports.BrowserMessageReader = void 0; +exports.createMessageConnection = createMessageConnection; +const ril_1 = __importDefault(require("./ril")); +// Install the browser runtime abstract. +ril_1.default.install(); +const api_1 = require("../common/api"); +__exportStar(require("../common/api"), exports); +class BrowserMessageReader extends api_1.AbstractMessageReader { + _onData; + _messageListener; + constructor(port) { + super(); + this._onData = new api_1.Emitter(); + this._messageListener = (event) => { + this._onData.fire(event.data); + }; + port.addEventListener('error', (event) => this.fireError(event)); + port.onmessage = this._messageListener; + } + listen(callback) { + return this._onData.event(callback); + } +} +exports.BrowserMessageReader = BrowserMessageReader; +class BrowserMessageWriter extends api_1.AbstractMessageWriter { + port; + errorCount; + constructor(port) { + super(); + this.port = port; + this.errorCount = 0; + port.addEventListener('error', (event) => this.fireError(event)); + } + write(msg) { + try { + this.port.postMessage(msg); + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.BrowserMessageWriter = BrowserMessageWriter; +function createMessageConnection(reader, writer, logger, options) { + if (logger === undefined) { + logger = api_1.NullLogger; + } + if (api_1.ConnectionStrategy.is(options)) { + options = { connectionStrategy: options }; + } + return (0, api_1.createMessageConnection)(reader, writer, logger, options); +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts new file mode 100644 index 0000000..78d42d8 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts @@ -0,0 +1,22 @@ +import { RAL, Disposable } from '../common/api'; +interface RIL extends RAL { + readonly stream: { + readonly asReadableStream: (stream: WebSocket) => RAL.ReadableStream; + readonly asWritableStream: (stream: WebSocket) => RAL.WritableStream; + }; +} +export declare class QueueMicrotaskImpl implements Disposable { + private isDisposed; + constructor(callback: (...args: any[]) => void, ...args: any[]); + dispose(): void; +} +export declare class PromiseImpl implements Disposable { + private isDisposed; + constructor(callback: (...args: any[]) => void, ...args: any[]); + dispose(): void; +} +declare function RIL(): RIL; +declare namespace RIL { + function install(): void; +} +export default RIL; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js new file mode 100644 index 0000000..04969b2 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js @@ -0,0 +1,210 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PromiseImpl = exports.QueueMicrotaskImpl = void 0; +const api_1 = require("../common/api"); +class MessageBuffer extends api_1.AbstractMessageBuffer { + static emptyBuffer = new Uint8Array(0); + asciiDecoder; + constructor(encoding = 'utf-8') { + super(encoding); + this.asciiDecoder = new TextDecoder('ascii'); + } + emptyBuffer() { + return MessageBuffer.emptyBuffer; + } + fromString(value, _encoding) { + return (new TextEncoder()).encode(value); + } + toString(value, encoding) { + if (encoding === 'ascii') { + return this.asciiDecoder.decode(value); + } + else { + return (new TextDecoder(encoding)).decode(value); + } + } + asNative(buffer, length) { + if (length === undefined) { + return buffer; + } + else { + return buffer.slice(0, length); + } + } + allocNative(length) { + return new Uint8Array(length); + } +} +class ReadableStreamWrapper { + socket; + _onData; + _messageListener; + constructor(socket) { + this.socket = socket; + this._onData = new api_1.Emitter(); + this._messageListener = (event) => { + const blob = event.data; + blob.arrayBuffer().then((buffer) => { + this._onData.fire(new Uint8Array(buffer)); + }, () => { + (0, api_1.RAL)().console.error(`Converting blob to array buffer failed.`); + }); + }; + this.socket.addEventListener('message', this._messageListener); + } + onClose(listener) { + this.socket.addEventListener('close', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('close', listener)); + } + onError(listener) { + this.socket.addEventListener('error', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('error', listener)); + } + onEnd(listener) { + this.socket.addEventListener('end', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('end', listener)); + } + onData(listener) { + return this._onData.event(listener); + } +} +class WritableStreamWrapper { + socket; + constructor(socket) { + this.socket = socket; + } + onClose(listener) { + this.socket.addEventListener('close', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('close', listener)); + } + onError(listener) { + this.socket.addEventListener('error', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('error', listener)); + } + onEnd(listener) { + this.socket.addEventListener('end', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('end', listener)); + } + write(data, encoding) { + if (typeof data === 'string') { + if (encoding !== undefined && encoding !== 'utf-8') { + throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${encoding}`); + } + this.socket.send(data); + } + else { + if (data.buffer instanceof ArrayBuffer) { + this.socket.send(data.buffer); + } + else { + // We can't send a shared array buffer directly, so we need to + // create a copy of it. + this.socket.send(new Uint8Array(data.buffer).slice().buffer); + } + } + return Promise.resolve(); + } + end() { + this.socket.close(); + } +} +class QueueMicrotaskImpl { + isDisposed; + constructor(callback, ...args) { + this.isDisposed = false; + queueMicrotask(() => { + if (!this.isDisposed) { + callback(...args); + } + }); + } + dispose() { + this.isDisposed = true; + } +} +exports.QueueMicrotaskImpl = QueueMicrotaskImpl; +class PromiseImpl { + isDisposed; + constructor(callback, ...args) { + this.isDisposed = false; + Promise.resolve().then(() => { + if (!this.isDisposed) { + callback(...args); + } + }, () => { + }); + } + dispose() { + this.isDisposed = true; + } +} +exports.PromiseImpl = PromiseImpl; +const _textEncoder = new TextEncoder(); +const _ril = Object.freeze({ + messageBuffer: Object.freeze({ + create: (encoding) => new MessageBuffer(encoding) + }), + applicationJson: Object.freeze({ + encoder: Object.freeze({ + name: 'application/json', + encode: (msg, options) => { + if (options.charset !== 'utf-8') { + throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${options.charset}`); + } + return Promise.resolve(_textEncoder.encode(JSON.stringify(msg, undefined, 0))); + } + }), + decoder: Object.freeze({ + name: 'application/json', + decode: (buffer, options) => { + if (!(buffer instanceof Uint8Array)) { + throw new Error(`In a Browser environments only Uint8Arrays are supported.`); + } + return Promise.resolve(JSON.parse(new TextDecoder(options.charset).decode(buffer))); + } + }) + }), + stream: Object.freeze({ + asReadableStream: (socket) => new ReadableStreamWrapper(socket), + asWritableStream: (socket) => new WritableStreamWrapper(socket) + }), + console: console, + timer: Object.freeze({ + setTimeout(callback, ms, ...args) { + const handle = setTimeout(callback, ms, ...args); + return { dispose: () => clearTimeout(handle) }; + }, + setImmediate(callback, ...args) { + // Browser don't have setImmediate and setTimeout with 0 delay of 0 can cause problems + // in webviews and similar environments due to throttling. + if (typeof globalThis.queueMicrotask === 'function') { + return new QueueMicrotaskImpl(callback, ...args); + } + else if (Promise !== undefined) { + return new PromiseImpl(callback, ...args); + } + else { + const handle = setTimeout(callback, 0, ...args); + return { dispose: () => clearTimeout(handle) }; + } + }, + setInterval(callback, ms, ...args) { + const handle = setInterval(callback, ms, ...args); + return { dispose: () => clearInterval(handle) }; + }, + }) +}); +function RIL() { + return _ril; +} +(function (RIL) { + function install() { + api_1.RAL.install(_ril); + } + RIL.install = install; +})(RIL || (RIL = {})); +exports.default = RIL; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts new file mode 100644 index 0000000..8250d53 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts @@ -0,0 +1,14 @@ +/// +import { Message, MessageSignature, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseError, ErrorCodes, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, ResponseMessage, ParameterStructures, _EM } from './messages'; +import { LinkedMap, LRUCache, Touch } from './linkedMap'; +import { Disposable } from './disposable'; +import { Event, Emitter } from './events'; +import { AbstractCancellationTokenSource, CancellationTokenSource, CancellationToken } from './cancellation'; +import { SharedArraySenderStrategy, SharedArrayReceiverStrategy } from './sharedArrayCancellation'; +import { MessageReader, AbstractMessageReader, ReadableStreamMessageReader, DataCallback, MessageReaderOptions, PartialMessageInfo } from './messageReader'; +import { MessageWriter, AbstractMessageWriter, WriteableStreamMessageWriter, MessageWriterOptions } from './messageWriter'; +import { AbstractMessageBuffer } from './messageBuffer'; +import { ContentTypeEncoderOptions, ContentEncoder, ContentTypeEncoder, ContentTypeDecoderOptions, ContentDecoder, ContentTypeDecoder } from './encoding'; +import { Logger, ConnectionStrategy, ConnectionOptions, MessageConnection, NullLogger, createMessageConnection, ProgressToken, ProgressType, RequestParam, HandlerResult, StarRequestHandler, GenericRequestHandler, RequestHandler0, RequestHandler, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, StarNotificationHandler, GenericNotificationHandler, NotificationHandler0, NotificationHandler, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, Trace, TraceValue, TraceFormat, TraceOptions, SetTraceParams, SetTraceNotification, LogTraceParams, LogTraceNotification, Tracer, ConnectionErrors, ConnectionError, CancellationId, CancellationReceiverStrategy, IdCancellationReceiverStrategy, RequestCancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy, MessageStrategy, TraceValues } from './connection'; +import RAL from './ral'; +export { RAL, Message, MessageSignature, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseError, ErrorCodes, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, ResponseMessage, ParameterStructures, _EM, LinkedMap, Touch, LRUCache, Disposable, Event, Emitter, AbstractCancellationTokenSource, CancellationTokenSource, CancellationToken, SharedArraySenderStrategy, SharedArrayReceiverStrategy, MessageReader, AbstractMessageReader, ReadableStreamMessageReader, DataCallback, MessageReaderOptions, PartialMessageInfo, MessageWriter, AbstractMessageWriter, WriteableStreamMessageWriter, MessageWriterOptions, AbstractMessageBuffer, ContentTypeEncoderOptions, ContentEncoder, ContentTypeEncoder, ContentTypeDecoderOptions, ContentDecoder, ContentTypeDecoder, Logger, ConnectionStrategy, ConnectionOptions, MessageConnection, NullLogger, createMessageConnection, ProgressToken, ProgressType, RequestParam, HandlerResult, StarRequestHandler, GenericRequestHandler, RequestHandler0, RequestHandler, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, StarNotificationHandler, GenericNotificationHandler, NotificationHandler0, NotificationHandler, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, Trace, TraceValue, TraceValues, TraceFormat, TraceOptions, SetTraceParams, SetTraceNotification, LogTraceParams, LogTraceNotification, Tracer, ConnectionErrors, ConnectionError, CancellationId, CancellationReceiverStrategy, IdCancellationReceiverStrategy, RequestCancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy, MessageStrategy }; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js new file mode 100644 index 0000000..ab7abd5 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js @@ -0,0 +1,87 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +/// +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProgressType = exports.ProgressToken = exports.createMessageConnection = exports.NullLogger = exports.ConnectionOptions = exports.ConnectionStrategy = exports.AbstractMessageBuffer = exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = exports.SharedArrayReceiverStrategy = exports.SharedArraySenderStrategy = exports.CancellationToken = exports.CancellationTokenSource = exports.Emitter = exports.Event = exports.Disposable = exports.LRUCache = exports.Touch = exports.LinkedMap = exports.ParameterStructures = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.ErrorCodes = exports.ResponseError = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType0 = exports.RequestType = exports.Message = exports.RAL = void 0; +exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.RequestCancellationReceiverStrategy = exports.IdCancellationReceiverStrategy = exports.CancellationReceiverStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.TraceValue = exports.Trace = void 0; +const messages_1 = require("./messages"); +Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return messages_1.Message; } }); +Object.defineProperty(exports, "RequestType", { enumerable: true, get: function () { return messages_1.RequestType; } }); +Object.defineProperty(exports, "RequestType0", { enumerable: true, get: function () { return messages_1.RequestType0; } }); +Object.defineProperty(exports, "RequestType1", { enumerable: true, get: function () { return messages_1.RequestType1; } }); +Object.defineProperty(exports, "RequestType2", { enumerable: true, get: function () { return messages_1.RequestType2; } }); +Object.defineProperty(exports, "RequestType3", { enumerable: true, get: function () { return messages_1.RequestType3; } }); +Object.defineProperty(exports, "RequestType4", { enumerable: true, get: function () { return messages_1.RequestType4; } }); +Object.defineProperty(exports, "RequestType5", { enumerable: true, get: function () { return messages_1.RequestType5; } }); +Object.defineProperty(exports, "RequestType6", { enumerable: true, get: function () { return messages_1.RequestType6; } }); +Object.defineProperty(exports, "RequestType7", { enumerable: true, get: function () { return messages_1.RequestType7; } }); +Object.defineProperty(exports, "RequestType8", { enumerable: true, get: function () { return messages_1.RequestType8; } }); +Object.defineProperty(exports, "RequestType9", { enumerable: true, get: function () { return messages_1.RequestType9; } }); +Object.defineProperty(exports, "ResponseError", { enumerable: true, get: function () { return messages_1.ResponseError; } }); +Object.defineProperty(exports, "ErrorCodes", { enumerable: true, get: function () { return messages_1.ErrorCodes; } }); +Object.defineProperty(exports, "NotificationType", { enumerable: true, get: function () { return messages_1.NotificationType; } }); +Object.defineProperty(exports, "NotificationType0", { enumerable: true, get: function () { return messages_1.NotificationType0; } }); +Object.defineProperty(exports, "NotificationType1", { enumerable: true, get: function () { return messages_1.NotificationType1; } }); +Object.defineProperty(exports, "NotificationType2", { enumerable: true, get: function () { return messages_1.NotificationType2; } }); +Object.defineProperty(exports, "NotificationType3", { enumerable: true, get: function () { return messages_1.NotificationType3; } }); +Object.defineProperty(exports, "NotificationType4", { enumerable: true, get: function () { return messages_1.NotificationType4; } }); +Object.defineProperty(exports, "NotificationType5", { enumerable: true, get: function () { return messages_1.NotificationType5; } }); +Object.defineProperty(exports, "NotificationType6", { enumerable: true, get: function () { return messages_1.NotificationType6; } }); +Object.defineProperty(exports, "NotificationType7", { enumerable: true, get: function () { return messages_1.NotificationType7; } }); +Object.defineProperty(exports, "NotificationType8", { enumerable: true, get: function () { return messages_1.NotificationType8; } }); +Object.defineProperty(exports, "NotificationType9", { enumerable: true, get: function () { return messages_1.NotificationType9; } }); +Object.defineProperty(exports, "ParameterStructures", { enumerable: true, get: function () { return messages_1.ParameterStructures; } }); +const linkedMap_1 = require("./linkedMap"); +Object.defineProperty(exports, "LinkedMap", { enumerable: true, get: function () { return linkedMap_1.LinkedMap; } }); +Object.defineProperty(exports, "LRUCache", { enumerable: true, get: function () { return linkedMap_1.LRUCache; } }); +Object.defineProperty(exports, "Touch", { enumerable: true, get: function () { return linkedMap_1.Touch; } }); +const disposable_1 = require("./disposable"); +Object.defineProperty(exports, "Disposable", { enumerable: true, get: function () { return disposable_1.Disposable; } }); +const events_1 = require("./events"); +Object.defineProperty(exports, "Event", { enumerable: true, get: function () { return events_1.Event; } }); +Object.defineProperty(exports, "Emitter", { enumerable: true, get: function () { return events_1.Emitter; } }); +const cancellation_1 = require("./cancellation"); +Object.defineProperty(exports, "CancellationTokenSource", { enumerable: true, get: function () { return cancellation_1.CancellationTokenSource; } }); +Object.defineProperty(exports, "CancellationToken", { enumerable: true, get: function () { return cancellation_1.CancellationToken; } }); +const sharedArrayCancellation_1 = require("./sharedArrayCancellation"); +Object.defineProperty(exports, "SharedArraySenderStrategy", { enumerable: true, get: function () { return sharedArrayCancellation_1.SharedArraySenderStrategy; } }); +Object.defineProperty(exports, "SharedArrayReceiverStrategy", { enumerable: true, get: function () { return sharedArrayCancellation_1.SharedArrayReceiverStrategy; } }); +const messageReader_1 = require("./messageReader"); +Object.defineProperty(exports, "MessageReader", { enumerable: true, get: function () { return messageReader_1.MessageReader; } }); +Object.defineProperty(exports, "AbstractMessageReader", { enumerable: true, get: function () { return messageReader_1.AbstractMessageReader; } }); +Object.defineProperty(exports, "ReadableStreamMessageReader", { enumerable: true, get: function () { return messageReader_1.ReadableStreamMessageReader; } }); +const messageWriter_1 = require("./messageWriter"); +Object.defineProperty(exports, "MessageWriter", { enumerable: true, get: function () { return messageWriter_1.MessageWriter; } }); +Object.defineProperty(exports, "AbstractMessageWriter", { enumerable: true, get: function () { return messageWriter_1.AbstractMessageWriter; } }); +Object.defineProperty(exports, "WriteableStreamMessageWriter", { enumerable: true, get: function () { return messageWriter_1.WriteableStreamMessageWriter; } }); +const messageBuffer_1 = require("./messageBuffer"); +Object.defineProperty(exports, "AbstractMessageBuffer", { enumerable: true, get: function () { return messageBuffer_1.AbstractMessageBuffer; } }); +const connection_1 = require("./connection"); +Object.defineProperty(exports, "ConnectionStrategy", { enumerable: true, get: function () { return connection_1.ConnectionStrategy; } }); +Object.defineProperty(exports, "ConnectionOptions", { enumerable: true, get: function () { return connection_1.ConnectionOptions; } }); +Object.defineProperty(exports, "NullLogger", { enumerable: true, get: function () { return connection_1.NullLogger; } }); +Object.defineProperty(exports, "createMessageConnection", { enumerable: true, get: function () { return connection_1.createMessageConnection; } }); +Object.defineProperty(exports, "ProgressToken", { enumerable: true, get: function () { return connection_1.ProgressToken; } }); +Object.defineProperty(exports, "ProgressType", { enumerable: true, get: function () { return connection_1.ProgressType; } }); +Object.defineProperty(exports, "Trace", { enumerable: true, get: function () { return connection_1.Trace; } }); +Object.defineProperty(exports, "TraceValue", { enumerable: true, get: function () { return connection_1.TraceValue; } }); +Object.defineProperty(exports, "TraceFormat", { enumerable: true, get: function () { return connection_1.TraceFormat; } }); +Object.defineProperty(exports, "SetTraceNotification", { enumerable: true, get: function () { return connection_1.SetTraceNotification; } }); +Object.defineProperty(exports, "LogTraceNotification", { enumerable: true, get: function () { return connection_1.LogTraceNotification; } }); +Object.defineProperty(exports, "ConnectionErrors", { enumerable: true, get: function () { return connection_1.ConnectionErrors; } }); +Object.defineProperty(exports, "ConnectionError", { enumerable: true, get: function () { return connection_1.ConnectionError; } }); +Object.defineProperty(exports, "CancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.CancellationReceiverStrategy; } }); +Object.defineProperty(exports, "IdCancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.IdCancellationReceiverStrategy; } }); +Object.defineProperty(exports, "RequestCancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.RequestCancellationReceiverStrategy; } }); +Object.defineProperty(exports, "CancellationSenderStrategy", { enumerable: true, get: function () { return connection_1.CancellationSenderStrategy; } }); +Object.defineProperty(exports, "CancellationStrategy", { enumerable: true, get: function () { return connection_1.CancellationStrategy; } }); +Object.defineProperty(exports, "MessageStrategy", { enumerable: true, get: function () { return connection_1.MessageStrategy; } }); +Object.defineProperty(exports, "TraceValues", { enumerable: true, get: function () { return connection_1.TraceValues; } }); +const ral_1 = __importDefault(require("./ral")); +exports.RAL = ral_1.default; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts new file mode 100644 index 0000000..4028512 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts @@ -0,0 +1,32 @@ +import { Event } from './events'; +import { Disposable } from './disposable'; +/** + * Defines a CancellationToken. This interface is not + * intended to be implemented. A CancellationToken must + * be created via a CancellationTokenSource. + */ +export interface CancellationToken { + /** + * Is `true` when the token has been cancelled, `false` otherwise. + */ + readonly isCancellationRequested: boolean; + /** + * An {@link Event event} which fires upon cancellation. + */ + readonly onCancellationRequested: Event; +} +export declare namespace CancellationToken { + const None: CancellationToken; + const Cancelled: CancellationToken; + function is(value: any): value is CancellationToken; +} +export interface AbstractCancellationTokenSource extends Disposable { + token: CancellationToken; + cancel(): void; +} +export declare class CancellationTokenSource implements AbstractCancellationTokenSource { + private _token; + get token(): CancellationToken; + cancel(): void; + dispose(): void; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js new file mode 100644 index 0000000..ec04640 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js @@ -0,0 +1,132 @@ +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CancellationTokenSource = exports.CancellationToken = void 0; +const ral_1 = __importDefault(require("./ral")); +const Is = __importStar(require("./is")); +const events_1 = require("./events"); +var CancellationToken; +(function (CancellationToken) { + CancellationToken.None = Object.freeze({ + isCancellationRequested: false, + onCancellationRequested: events_1.Event.None + }); + CancellationToken.Cancelled = Object.freeze({ + isCancellationRequested: true, + onCancellationRequested: events_1.Event.None + }); + function is(value) { + const candidate = value; + return candidate && (candidate === CancellationToken.None + || candidate === CancellationToken.Cancelled + || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested)); + } + CancellationToken.is = is; +})(CancellationToken || (exports.CancellationToken = CancellationToken = {})); +const shortcutEvent = Object.freeze(function (callback, context) { + const handle = (0, ral_1.default)().timer.setTimeout(callback.bind(context), 0); + return { dispose() { handle.dispose(); } }; +}); +class MutableToken { + _isCancelled = false; + _emitter; + cancel() { + if (!this._isCancelled) { + this._isCancelled = true; + if (this._emitter) { + this._emitter.fire(undefined); + this.dispose(); + } + } + } + get isCancellationRequested() { + return this._isCancelled; + } + get onCancellationRequested() { + if (this._isCancelled) { + return shortcutEvent; + } + if (!this._emitter) { + this._emitter = new events_1.Emitter(); + } + return this._emitter.event; + } + dispose() { + if (this._emitter) { + this._emitter.dispose(); + this._emitter = undefined; + } + } +} +class CancellationTokenSource { + _token; + get token() { + if (!this._token) { + // be lazy and create the token only when + // actually needed + this._token = new MutableToken(); + } + return this._token; + } + cancel() { + if (!this._token) { + // save an object by returning the default + // cancelled token when cancellation happens + // before someone asks for the token + this._token = CancellationToken.Cancelled; + } + else { + this._token.cancel(); + } + } + dispose() { + if (!this._token) { + // ensure to initialize with an empty token if we had none + this._token = CancellationToken.None; + } + else if (this._token instanceof MutableToken) { + // actually dispose + this._token.dispose(); + } + } +} +exports.CancellationTokenSource = CancellationTokenSource; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts new file mode 100644 index 0000000..b658ac1 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts @@ -0,0 +1,367 @@ +/// +import { Message, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseMessage, ResponseError, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, _EM, ParameterStructures } from './messages'; +import type { Disposable } from './disposable'; +import { Event } from './events'; +import { CancellationToken, AbstractCancellationTokenSource } from './cancellation'; +import { MessageReader } from './messageReader'; +import { MessageWriter } from './messageWriter'; +export type ProgressToken = number | string; +export declare namespace ProgressToken { + function is(value: any): value is number | string; +} +interface ProgressParams { + /** + * The progress token provided by the client or server. + */ + token: ProgressToken; + /** + * The progress data. + */ + value: T; +} +export declare class ProgressType { + /** + * Clients must not use these properties. They are here to ensure correct typing. + * in TypeScript + */ + readonly __: [PR, _EM] | undefined; + readonly _pr: PR | undefined; + constructor(); +} +export type RequestParam

= P extends null ? P | undefined : P; +export type HandlerResult = _R | ResponseError | Thenable<_R> | Thenable> | Thenable<_R | ResponseError>; +export interface StarRequestHandler { + (method: string, params: any[] | object | undefined, token: CancellationToken): HandlerResult; +} +export interface GenericRequestHandler { + (...params: any[]): HandlerResult; +} +export interface RequestHandler0 { + (token: CancellationToken): HandlerResult; +} +export interface RequestHandler { + (params: P, token: CancellationToken): HandlerResult; +} +export interface RequestHandler1 { + (p1: P1, token: CancellationToken): HandlerResult; +} +export interface RequestHandler2 { + (p1: P1, p2: P2, token: CancellationToken): HandlerResult; +} +export interface RequestHandler3 { + (p1: P1, p2: P2, p3: P3, token: CancellationToken): HandlerResult; +} +export interface RequestHandler4 { + (p1: P1, p2: P2, p3: P3, p4: P4, token: CancellationToken): HandlerResult; +} +export interface RequestHandler5 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, token: CancellationToken): HandlerResult; +} +export interface RequestHandler6 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, token: CancellationToken): HandlerResult; +} +export interface RequestHandler7 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, token: CancellationToken): HandlerResult; +} +export interface RequestHandler8 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, token: CancellationToken): HandlerResult; +} +export interface RequestHandler9 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, token: CancellationToken): HandlerResult; +} +export type NotificationResult = void | Promise; +export interface StarNotificationHandler { + (method: string, params: any[] | object | undefined): NotificationResult; +} +export interface GenericNotificationHandler { + (...params: any[]): NotificationResult; +} +export interface NotificationHandler0 { + (): NotificationResult; +} +export interface NotificationHandler

{ + (params: P): NotificationResult; +} +export interface NotificationHandler1 { + (p1: P1): NotificationResult; +} +export interface NotificationHandler2 { + (p1: P1, p2: P2): NotificationResult; +} +export interface NotificationHandler3 { + (p1: P1, p2: P2, p3: P3): NotificationResult; +} +export interface NotificationHandler4 { + (p1: P1, p2: P2, p3: P3, p4: P4): NotificationResult; +} +export interface NotificationHandler5 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5): NotificationResult; +} +export interface NotificationHandler6 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6): NotificationResult; +} +export interface NotificationHandler7 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7): NotificationResult; +} +export interface NotificationHandler8 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8): NotificationResult; +} +export interface NotificationHandler9 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9): NotificationResult; +} +export interface Logger { + error(message: string): void; + warn(message: string): void; + info(message: string): void; + log(message: string): void; +} +export declare const NullLogger: Logger; +export declare enum Trace { + Off = 0, + Messages = 1, + Compact = 2, + Verbose = 3 +} +export declare namespace TraceValue { + /** + * Turn tracing off. + */ + const Off: 'off'; + /** + * Trace messages only. + */ + const Messages: 'messages'; + /** + * Compact message tracing. + */ + const Compact: 'compact'; + /** + * Verbose message tracing. + */ + const Verbose: 'verbose'; +} +export type TraceValue = 'off' | 'messages' | 'compact' | 'verbose'; +/** + * @deprecated Use TraceValue instead + */ +export declare const TraceValues: typeof TraceValue; +export type TraceValues = TraceValue; +export declare namespace Trace { + function fromString(value: string): Trace; + function toString(value: Trace): TraceValue; +} +export declare enum TraceFormat { + Text = "text", + JSON = "json" +} +export declare namespace TraceFormat { + function fromString(value: string): TraceFormat; +} +export interface TraceOptions { + sendNotification?: boolean; + traceFormat?: TraceFormat; +} +export interface SetTraceParams { + value: TraceValue; +} +export declare namespace SetTraceNotification { + const type: NotificationType; +} +export interface LogTraceParams { + message: string; + verbose?: string; +} +export declare namespace LogTraceNotification { + const type: NotificationType; +} +export interface Tracer { + log(dataObject: any): void; + log(message: string, data?: string): void; +} +export declare enum ConnectionErrors { + /** + * The connection is closed. + */ + Closed = 1, + /** + * The connection got disposed. + */ + Disposed = 2, + /** + * The connection is already in listening mode. + */ + AlreadyListening = 3 +} +export declare class ConnectionError extends Error { + readonly code: ConnectionErrors; + constructor(code: ConnectionErrors, message: string); +} +export type ConnectionStrategy = { + cancelUndispatched?: (message: Message, next: (message: Message) => ResponseMessage | undefined) => ResponseMessage | undefined; +}; +export declare namespace ConnectionStrategy { + function is(value: any): value is ConnectionStrategy; +} +export type CancellationId = number | string; +export interface IdCancellationReceiverStrategy { + kind?: 'id'; + /** + * Creates a CancellationTokenSource from a cancellation id. + * + * @param id The cancellation id. + */ + createCancellationTokenSource(id: CancellationId): AbstractCancellationTokenSource; + /** + * An optional method to dispose the strategy. + */ + dispose?(): void; +} +export declare namespace IdCancellationReceiverStrategy { + function is(value: any): value is IdCancellationReceiverStrategy; +} +export interface RequestCancellationReceiverStrategy { + kind: 'request'; + /** + * Create a cancellation token source from a given request message. + * + * @param requestMessage The request message. + */ + createCancellationTokenSource(requestMessage: RequestMessage): AbstractCancellationTokenSource; + /** + * An optional method to dispose the strategy. + */ + dispose?(): void; +} +export declare namespace RequestCancellationReceiverStrategy { + function is(value: any): value is RequestCancellationReceiverStrategy; +} +export type CancellationReceiverStrategy = IdCancellationReceiverStrategy | RequestCancellationReceiverStrategy; +export declare namespace CancellationReceiverStrategy { + const Message: CancellationReceiverStrategy; + function is(value: any): value is CancellationReceiverStrategy; +} +export interface CancellationSenderStrategy { + /** + * Hook to enable cancellation for the given request. + * + * @param request The request to enable cancellation for. + */ + enableCancellation?(request: RequestMessage): void; + /** + * Send cancellation for the given cancellation id + * + * @param conn The connection used. + * @param id The cancellation id. + */ + sendCancellation(conn: MessageConnection, id: CancellationId): Promise; + /** + * Cleanup any cancellation state for the given cancellation id. After this + * method has been call no cancellation will be sent anymore for the given id. + * + * @param id The cancellation id. + */ + cleanup(id: CancellationId): void; + /** + * An optional method to dispose the strategy. + */ + dispose?(): void; +} +export declare namespace CancellationSenderStrategy { + const Message: CancellationSenderStrategy; + function is(value: any): value is CancellationSenderStrategy; +} +export interface CancellationStrategy { + receiver: CancellationReceiverStrategy | RequestCancellationReceiverStrategy; + sender: CancellationSenderStrategy; +} +export declare namespace CancellationStrategy { + const Message: CancellationStrategy; + function is(value: any): value is CancellationStrategy; +} +export interface MessageStrategy { + handleMessage(message: Message, next: (message: Message) => NotificationResult): NotificationResult; +} +export declare namespace MessageStrategy { + function is(value: any): value is MessageStrategy; +} +/** + * Connection options. A valid connection option must have at least a + * `CancellationStrategy` or a `MessageStrategy` or a `ConnectionStrategy`. + */ +export interface ConnectionOptions { + cancellationStrategy?: CancellationStrategy; + connectionStrategy?: ConnectionStrategy; + messageStrategy?: MessageStrategy; + maxParallelism?: number; +} +export declare namespace ConnectionOptions { + function is(value: any): value is ConnectionOptions; +} +export interface MessageConnection { + sendRequest(type: RequestType0, token?: CancellationToken): Promise; + sendRequest(type: RequestType, params: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType1, p1: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType2, p1: NoInfer>, p2: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType3, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType4, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType5, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType6, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType7, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType8, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>, p8: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType9, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>, p8: NoInfer>, p9: NoInfer>, token?: CancellationToken): Promise; + sendRequest(method: string, r0?: ParameterStructures | any, ...rest: any[]): Promise; + onRequest(type: RequestType0, handler: NoInfer>): Disposable; + onRequest(type: RequestType, handler: NoInfer>): Disposable; + onRequest(type: RequestType1, handler: NoInfer>): Disposable; + onRequest(type: RequestType2, handler: NoInfer>): Disposable; + onRequest(type: RequestType3, handler: NoInfer>): Disposable; + onRequest(type: RequestType4, handler: NoInfer>): Disposable; + onRequest(type: RequestType5, handler: NoInfer>): Disposable; + onRequest(type: RequestType6, handler: NoInfer>): Disposable; + onRequest(type: RequestType7, handler: NoInfer>): Disposable; + onRequest(type: RequestType8, handler: NoInfer>): Disposable; + onRequest(type: RequestType9, handler: NoInfer>): Disposable; + onRequest(method: string, handler: GenericRequestHandler): Disposable; + onRequest(handler: StarRequestHandler): Disposable; + hasPendingResponse(): boolean; + sendNotification(type: NotificationType0): Promise; + sendNotification

(type: NotificationType

, params?: NoInfer>): Promise; + sendNotification(type: NotificationType1, p1: NoInfer>): Promise; + sendNotification(type: NotificationType2, p1: NoInfer>, p2: NoInfer>): Promise; + sendNotification(type: NotificationType3, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>): Promise; + sendNotification(type: NotificationType4, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>): Promise; + sendNotification(type: NotificationType5, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>): Promise; + sendNotification(type: NotificationType6, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>): Promise; + sendNotification(type: NotificationType7, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>): Promise; + sendNotification(type: NotificationType8, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>, p8: NoInfer>): Promise; + sendNotification(type: NotificationType9, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>, p8: NoInfer>, p9: NoInfer>): Promise; + sendNotification(method: string, r0?: ParameterStructures | any, ...rest: any[]): Promise; + onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable; + onNotification

(type: NotificationType

, handler: NoInfer>): Disposable; + onNotification(type: NotificationType1, handler: NoInfer>): Disposable; + onNotification(type: NotificationType2, handler: NoInfer>): Disposable; + onNotification(type: NotificationType3, handler: NoInfer>): Disposable; + onNotification(type: NotificationType4, handler: NoInfer>): Disposable; + onNotification(type: NotificationType5, handler: NoInfer>): Disposable; + onNotification(type: NotificationType6, handler: NoInfer>): Disposable; + onNotification(type: NotificationType7, handler: NoInfer>): Disposable; + onNotification(type: NotificationType8, handler: NoInfer>): Disposable; + onNotification(type: NotificationType9, handler: NoInfer>): Disposable; + onNotification(method: string, handler: GenericNotificationHandler): Disposable; + onNotification(handler: StarNotificationHandler): Disposable; + onUnhandledNotification: Event; + onProgress

(type: ProgressType

, token: string | number, handler: NoInfer>): Disposable; + sendProgress

(type: ProgressType

, token: string | number, value: NoInfer>): Promise; + onUnhandledProgress: Event>; + trace(value: Trace, tracer: Tracer, sendNotification?: boolean): Promise; + trace(value: Trace, tracer: Tracer, traceOptions?: TraceOptions): Promise; + onError: Event<[Error, Message | undefined, number | undefined]>; + onClose: Event; + listen(): void; + end(): void; + onDispose: Event; + dispose(): void; + inspect(): void; +} +export declare function createMessageConnection(messageReader: MessageReader, messageWriter: MessageWriter, _logger?: Logger, options?: ConnectionOptions): MessageConnection; +export {}; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js new file mode 100644 index 0000000..7ea47c6 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js @@ -0,0 +1,1271 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +/// +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ConnectionOptions = exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.RequestCancellationReceiverStrategy = exports.IdCancellationReceiverStrategy = exports.ConnectionStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.TraceValue = exports.Trace = exports.NullLogger = exports.ProgressType = exports.ProgressToken = void 0; +exports.createMessageConnection = createMessageConnection; +const ral_1 = __importDefault(require("./ral")); +const Is = __importStar(require("./is")); +const messages_1 = require("./messages"); +const linkedMap_1 = require("./linkedMap"); +const events_1 = require("./events"); +const cancellation_1 = require("./cancellation"); +var CancelNotification; +(function (CancelNotification) { + CancelNotification.type = new messages_1.NotificationType('$/cancelRequest'); +})(CancelNotification || (CancelNotification = {})); +var ProgressToken; +(function (ProgressToken) { + function is(value) { + return typeof value === 'string' || typeof value === 'number'; + } + ProgressToken.is = is; +})(ProgressToken || (exports.ProgressToken = ProgressToken = {})); +var ProgressNotification; +(function (ProgressNotification) { + ProgressNotification.type = new messages_1.NotificationType('$/progress'); +})(ProgressNotification || (ProgressNotification = {})); +class ProgressType { + /** + * Clients must not use these properties. They are here to ensure correct typing. + * in TypeScript + */ + __; + _pr; + constructor() { + } +} +exports.ProgressType = ProgressType; +var StarRequestHandler; +(function (StarRequestHandler) { + function is(value) { + return Is.func(value); + } + StarRequestHandler.is = is; +})(StarRequestHandler || (StarRequestHandler = {})); +exports.NullLogger = Object.freeze({ + error: () => { }, + warn: () => { }, + info: () => { }, + log: () => { } +}); +var Trace; +(function (Trace) { + Trace[Trace["Off"] = 0] = "Off"; + Trace[Trace["Messages"] = 1] = "Messages"; + Trace[Trace["Compact"] = 2] = "Compact"; + Trace[Trace["Verbose"] = 3] = "Verbose"; +})(Trace || (exports.Trace = Trace = {})); +var TraceValue; +(function (TraceValue) { + /** + * Turn tracing off. + */ + TraceValue.Off = 'off'; + /** + * Trace messages only. + */ + TraceValue.Messages = 'messages'; + /** + * Compact message tracing. + */ + TraceValue.Compact = 'compact'; + /** + * Verbose message tracing. + */ + TraceValue.Verbose = 'verbose'; +})(TraceValue || (exports.TraceValue = TraceValue = {})); +/** + * @deprecated Use TraceValue instead + */ +exports.TraceValues = TraceValue; +(function (Trace) { + function fromString(value) { + if (!Is.string(value)) { + return Trace.Off; + } + value = value.toLowerCase(); + switch (value) { + case 'off': + return Trace.Off; + case 'messages': + return Trace.Messages; + case 'compact': + return Trace.Compact; + case 'verbose': + return Trace.Verbose; + default: + return Trace.Off; + } + } + Trace.fromString = fromString; + function toString(value) { + switch (value) { + case Trace.Off: + return 'off'; + case Trace.Messages: + return 'messages'; + case Trace.Compact: + return 'compact'; + case Trace.Verbose: + return 'verbose'; + default: + return 'off'; + } + } + Trace.toString = toString; +})(Trace || (exports.Trace = Trace = {})); +var TraceFormat; +(function (TraceFormat) { + TraceFormat["Text"] = "text"; + TraceFormat["JSON"] = "json"; +})(TraceFormat || (exports.TraceFormat = TraceFormat = {})); +(function (TraceFormat) { + function fromString(value) { + if (!Is.string(value)) { + return TraceFormat.Text; + } + value = value.toLowerCase(); + if (value === 'json') { + return TraceFormat.JSON; + } + else { + return TraceFormat.Text; + } + } + TraceFormat.fromString = fromString; +})(TraceFormat || (exports.TraceFormat = TraceFormat = {})); +var SetTraceNotification; +(function (SetTraceNotification) { + SetTraceNotification.type = new messages_1.NotificationType('$/setTrace'); +})(SetTraceNotification || (exports.SetTraceNotification = SetTraceNotification = {})); +var LogTraceNotification; +(function (LogTraceNotification) { + LogTraceNotification.type = new messages_1.NotificationType('$/logTrace'); +})(LogTraceNotification || (exports.LogTraceNotification = LogTraceNotification = {})); +var ConnectionErrors; +(function (ConnectionErrors) { + /** + * The connection is closed. + */ + ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed"; + /** + * The connection got disposed. + */ + ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed"; + /** + * The connection is already in listening mode. + */ + ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening"; +})(ConnectionErrors || (exports.ConnectionErrors = ConnectionErrors = {})); +class ConnectionError extends Error { + code; + constructor(code, message) { + super(message); + this.code = code; + Object.setPrototypeOf(this, ConnectionError.prototype); + } +} +exports.ConnectionError = ConnectionError; +var ConnectionStrategy; +(function (ConnectionStrategy) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.cancelUndispatched); + } + ConnectionStrategy.is = is; +})(ConnectionStrategy || (exports.ConnectionStrategy = ConnectionStrategy = {})); +var IdCancellationReceiverStrategy; +(function (IdCancellationReceiverStrategy) { + function is(value) { + const candidate = value; + return candidate && (candidate.kind === undefined || candidate.kind === 'id') && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === undefined || Is.func(candidate.dispose)); + } + IdCancellationReceiverStrategy.is = is; +})(IdCancellationReceiverStrategy || (exports.IdCancellationReceiverStrategy = IdCancellationReceiverStrategy = {})); +var RequestCancellationReceiverStrategy; +(function (RequestCancellationReceiverStrategy) { + function is(value) { + const candidate = value; + return candidate && candidate.kind === 'request' && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === undefined || Is.func(candidate.dispose)); + } + RequestCancellationReceiverStrategy.is = is; +})(RequestCancellationReceiverStrategy || (exports.RequestCancellationReceiverStrategy = RequestCancellationReceiverStrategy = {})); +var CancellationReceiverStrategy; +(function (CancellationReceiverStrategy) { + CancellationReceiverStrategy.Message = Object.freeze({ + createCancellationTokenSource(_) { + return new cancellation_1.CancellationTokenSource(); + } + }); + function is(value) { + return IdCancellationReceiverStrategy.is(value) || RequestCancellationReceiverStrategy.is(value); + } + CancellationReceiverStrategy.is = is; +})(CancellationReceiverStrategy || (exports.CancellationReceiverStrategy = CancellationReceiverStrategy = {})); +var CancellationSenderStrategy; +(function (CancellationSenderStrategy) { + CancellationSenderStrategy.Message = Object.freeze({ + sendCancellation(conn, id) { + return conn.sendNotification(CancelNotification.type, { id }); + }, + cleanup(_) { } + }); + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup); + } + CancellationSenderStrategy.is = is; +})(CancellationSenderStrategy || (exports.CancellationSenderStrategy = CancellationSenderStrategy = {})); +var CancellationStrategy; +(function (CancellationStrategy) { + CancellationStrategy.Message = Object.freeze({ + receiver: CancellationReceiverStrategy.Message, + sender: CancellationSenderStrategy.Message + }); + function is(value) { + const candidate = value; + return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender); + } + CancellationStrategy.is = is; +})(CancellationStrategy || (exports.CancellationStrategy = CancellationStrategy = {})); +var MessageStrategy; +(function (MessageStrategy) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.handleMessage); + } + MessageStrategy.is = is; +})(MessageStrategy || (exports.MessageStrategy = MessageStrategy = {})); +var ConnectionOptions; +(function (ConnectionOptions) { + function is(value) { + const candidate = value; + return candidate + && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy) || MessageStrategy.is(candidate.messageStrategy) || Is.number(candidate.maxParallelism)); + } + ConnectionOptions.is = is; +})(ConnectionOptions || (exports.ConnectionOptions = ConnectionOptions = {})); +var ConnectionState; +(function (ConnectionState) { + ConnectionState[ConnectionState["New"] = 1] = "New"; + ConnectionState[ConnectionState["Listening"] = 2] = "Listening"; + ConnectionState[ConnectionState["Closed"] = 3] = "Closed"; + ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed"; +})(ConnectionState || (ConnectionState = {})); +function createMessageConnection(messageReader, messageWriter, _logger, options) { + const logger = _logger !== undefined ? _logger : exports.NullLogger; + let sequenceNumber = 0; + let notificationSequenceNumber = 0; + let unknownResponseSequenceNumber = 0; + const version = '2.0'; + const maxParallelism = options?.maxParallelism ?? -1; + let inFlight = 0; + let starRequestHandler = undefined; + const requestHandlers = new Map(); + let starNotificationHandler = undefined; + const notificationHandlers = new Map(); + const progressHandlers = new Map(); + let timer; + let messageQueue = new linkedMap_1.LinkedMap(); + let responsePromises = new Map(); + let knownCanceledRequests = new Set(); + let requestTokens = new Map(); + let trace = Trace.Off; + let traceFormat = TraceFormat.Text; + let tracer; + let state = ConnectionState.New; + const errorEmitter = new events_1.Emitter(); + const closeEmitter = new events_1.Emitter(); + const unhandledNotificationEmitter = new events_1.Emitter(); + const unhandledProgressEmitter = new events_1.Emitter(); + const disposeEmitter = new events_1.Emitter(); + const cancellationStrategy = (options && options.cancellationStrategy) ? options.cancellationStrategy : CancellationStrategy.Message; + function cancelUndispatched(_message) { + return undefined; + } + function isListening() { + return state === ConnectionState.Listening; + } + function isClosed() { + return state === ConnectionState.Closed; + } + function isDisposed() { + return state === ConnectionState.Disposed; + } + function closeHandler() { + if (state === ConnectionState.New || state === ConnectionState.Listening) { + state = ConnectionState.Closed; + closeEmitter.fire(undefined); + } + // If the connection is disposed don't sent close events. + } + function readErrorHandler(error) { + errorEmitter.fire([error, undefined, undefined]); + } + function writeErrorHandler(data) { + errorEmitter.fire(data); + } + messageReader.onClose(closeHandler); + messageReader.onError(readErrorHandler); + messageWriter.onClose(closeHandler); + messageWriter.onError(writeErrorHandler); + function createRequestQueueKey(id) { + if (id === null) { + throw new Error(`Can't send requests with id null since the response can't be correlated.`); + } + return 'req-' + id.toString(); + } + function createResponseQueueKey(id) { + if (id === null) { + return 'res-unknown-' + (++unknownResponseSequenceNumber).toString(); + } + else { + return 'res-' + id.toString(); + } + } + function createNotificationQueueKey() { + return 'not-' + (++notificationSequenceNumber).toString(); + } + function addMessageToQueue(queue, message) { + if (messages_1.Message.isRequest(message)) { + queue.set(createRequestQueueKey(message.id), message); + } + else if (messages_1.Message.isResponse(message)) { + // If we have unlimited parallelism we queue the response to keep + // the previous semantics. + if (maxParallelism === -1) { + queue.set(createResponseQueueKey(message.id), message); + } + else { + // If we have limited parallelism we resolve responses to avoid + // dead locks. + handleResponse(message); + } + } + else { + queue.set(createNotificationQueueKey(), message); + } + } + function triggerMessageQueue() { + if (timer || messageQueue.size === 0) { + return; + } + if (maxParallelism !== -1 && inFlight >= maxParallelism) { + return; + } + timer = (0, ral_1.default)().timer.setImmediate(async () => { + timer = undefined; + if (messageQueue.size === 0) { + return; + } + if (maxParallelism !== -1 && inFlight >= maxParallelism) { + return; + } + const message = messageQueue.shift(); + let result; + try { + inFlight++; + const messageStrategy = options?.messageStrategy; + if (MessageStrategy.is(messageStrategy)) { + result = messageStrategy.handleMessage(message, handleMessage); + } + else { + result = handleMessage(message); + } + } + catch (error) { + logger.error(`Processing message queue failed: ${error.toString()}`); + } + finally { + if (result instanceof Promise) { + result.then(() => { + inFlight--; + triggerMessageQueue(); + }).catch((error) => { + logger.error(`Processing message queue failed: ${error.toString()}`); + }); + } + else { + inFlight--; + } + triggerMessageQueue(); + } + }); + } + async function handleMessage(message) { + if (messages_1.Message.isRequest(message)) { + return handleRequest(message); + } + else if (messages_1.Message.isNotification(message)) { + return handleNotification(message); + } + else if (messages_1.Message.isResponse(message)) { + return handleResponse(message); + } + else { + return handleInvalidMessage(message); + } + } + const callback = (message) => { + try { + // We have received a cancellation message. Check if the message is still in the queue + // and cancel it if allowed to do so. + if (messages_1.Message.isNotification(message) && message.method === CancelNotification.type.method) { + const cancelId = message.params.id; + const key = createRequestQueueKey(cancelId); + const toCancel = messageQueue.get(key); + if (messages_1.Message.isRequest(toCancel)) { + const strategy = options?.connectionStrategy; + const response = (strategy && strategy.cancelUndispatched) ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel); + if (response && (response.error !== undefined || response.result !== undefined)) { + messageQueue.delete(key); + requestTokens.delete(cancelId); + response.id = toCancel.id; + traceSendingResponse(response, message.method, Date.now()); + messageWriter.write(response).catch(() => logger.error(`Sending response for canceled message failed.`)); + return; + } + } + const cancellationToken = requestTokens.get(cancelId); + // The request is already running. Cancel the token + if (cancellationToken !== undefined) { + cancellationToken.cancel(); + traceReceivedNotification(message); + return; + } + else { + // Remember the cancel but still queue the message to + // clean up state in process message. + knownCanceledRequests.add(cancelId); + } + } + addMessageToQueue(messageQueue, message); + } + finally { + triggerMessageQueue(); + } + }; + async function handleRequest(requestMessage) { + if (isDisposed()) { + // we return here silently since we fired an event when the + // connection got disposed. + return Promise.resolve(); + } + function reply(resultOrError, method, startTime) { + const message = { + jsonrpc: version, + id: requestMessage.id + }; + if (resultOrError instanceof messages_1.ResponseError) { + message.error = resultOrError.toJson(); + } + else { + message.result = resultOrError === undefined ? null : resultOrError; + } + traceSendingResponse(message, method, startTime); + return messageWriter.write(message); + } + function replyError(error, method, startTime) { + const message = { + jsonrpc: version, + id: requestMessage.id, + error: error.toJson() + }; + traceSendingResponse(message, method, startTime); + return messageWriter.write(message); + } + traceReceivedRequest(requestMessage); + const element = requestHandlers.get(requestMessage.method); + let type; + let requestHandler; + if (element) { + type = element.type; + requestHandler = element.handler; + } + const startTime = Date.now(); + if (requestHandler || starRequestHandler) { + const tokenKey = requestMessage.id ?? String(Date.now()); // + const cancellationSource = IdCancellationReceiverStrategy.is(cancellationStrategy.receiver) + ? cancellationStrategy.receiver.createCancellationTokenSource(tokenKey) + : cancellationStrategy.receiver.createCancellationTokenSource(requestMessage); + if (requestMessage.id !== null && knownCanceledRequests.has(requestMessage.id)) { + cancellationSource.cancel(); + } + if (requestMessage.id !== null) { + requestTokens.set(tokenKey, cancellationSource); + } + try { + let handlerResult; + if (requestHandler) { + if (requestMessage.params === undefined) { + if (type !== undefined && type.numberOfParams !== 0) { + return replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines ${type.numberOfParams} params but received none.`), requestMessage.method, startTime); + } + handlerResult = requestHandler(cancellationSource.token); + } + else if (Array.isArray(requestMessage.params)) { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byName) { + return replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by name but received parameters by position`), requestMessage.method, startTime); + } + handlerResult = requestHandler(...requestMessage.params, cancellationSource.token); + } + else { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) { + return replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by position but received parameters by name`), requestMessage.method, startTime); + } + handlerResult = requestHandler(requestMessage.params, cancellationSource.token); + } + } + else if (starRequestHandler) { + handlerResult = starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token); + } + const resultOrError = await handlerResult; + await reply(resultOrError, requestMessage.method, startTime); + } + catch (error) { + if (error instanceof messages_1.ResponseError) { + await reply(error, requestMessage.method, startTime); + } + else if (error && Is.string(error.message)) { + await replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime); + } + else { + await replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime); + } + } + finally { + requestTokens.delete(tokenKey); + } + } + else { + await replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime); + } + } + function handleResponse(responseMessage) { + if (isDisposed()) { + // See handle request. + return; + } + if (responseMessage.id === null) { + if (responseMessage.error) { + logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`); + } + else { + logger.error(`Received response message without id. No further error information provided.`); + } + } + else { + const key = responseMessage.id; + const responsePromise = responsePromises.get(key); + traceReceivedResponse(responseMessage, responsePromise); + if (responsePromise !== undefined) { + responsePromises.delete(key); + try { + if (responseMessage.error) { + const error = responseMessage.error; + responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data)); + } + else if (responseMessage.result !== undefined) { + responsePromise.resolve(responseMessage.result); + } + else { + throw new Error('Should never happen.'); + } + } + catch (error) { + if (error.message) { + logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`); + } + else { + logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`); + } + } + } + } + } + async function handleNotification(message) { + if (isDisposed()) { + // See handle request. + return; + } + let type = undefined; + let notificationHandler; + if (message.method === CancelNotification.type.method) { + const cancelId = message.params.id; + knownCanceledRequests.delete(cancelId); + traceReceivedNotification(message); + return; + } + else { + const element = notificationHandlers.get(message.method); + if (element) { + notificationHandler = element.handler; + type = element.type; + } + } + if (notificationHandler || starNotificationHandler) { + try { + traceReceivedNotification(message); + if (notificationHandler) { + if (message.params === undefined) { + if (type !== undefined) { + if (type.numberOfParams !== 0 && type.parameterStructures !== messages_1.ParameterStructures.byName) { + logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received none.`); + } + } + await notificationHandler(); + } + else if (Array.isArray(message.params)) { + // There are JSON-RPC libraries that send progress message as positional params although + // specified as named. So convert them if this is the case. + const params = message.params; + if (message.method === ProgressNotification.type.method && params.length === 2 && ProgressToken.is(params[0])) { + await notificationHandler({ token: params[0], value: params[1] }); + } + else { + if (type !== undefined) { + if (type.parameterStructures === messages_1.ParameterStructures.byName) { + logger.error(`Notification ${message.method} defines parameters by name but received parameters by position`); + } + if (type.numberOfParams !== message.params.length) { + logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received ${params.length} arguments`); + } + } + await notificationHandler(...params); + } + } + else { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) { + logger.error(`Notification ${message.method} defines parameters by position but received parameters by name`); + } + await notificationHandler(message.params); + } + } + else if (starNotificationHandler) { + await starNotificationHandler(message.method, message.params); + } + } + catch (error) { + if (error.message) { + logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`); + } + else { + logger.error(`Notification handler '${message.method}' failed unexpectedly.`); + } + } + } + else { + unhandledNotificationEmitter.fire(message); + } + } + function handleInvalidMessage(message) { + if (!message) { + logger.error('Received empty message.'); + return; + } + logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`); + // Test whether we find an id to reject the promise + const responseMessage = message; + if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) { + const key = responseMessage.id; + const responseHandler = responsePromises.get(key); + if (responseHandler) { + responseHandler.reject(new Error('The received response has neither a result nor an error property.')); + } + } + } + function stringifyTrace(params) { + if (params === undefined || params === null) { + return undefined; + } + switch (trace) { + case Trace.Verbose: + return JSON.stringify(params, null, 4); + case Trace.Compact: + return JSON.stringify(params); + default: + return undefined; + } + } + function traceSendingRequest(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) { + data = `Params: ${stringifyTrace(message.params)}`; + } + tracer.log(`Sending request '${message.method} - (${message.id})'.`, data); + } + else { + logLSPMessage('send-request', message); + } + } + function traceSendingNotification(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.params) { + data = `Params: ${stringifyTrace(message.params)}`; + } + else { + data = 'No parameters provided.'; + } + } + tracer.log(`Sending notification '${message.method}'.`, data); + } + else { + logLSPMessage('send-notification', message); + } + } + function traceSendingResponse(message, method, startTime) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.error && message.error.data) { + data = `Error data: ${stringifyTrace(message.error.data)}`; + } + else { + if (message.result) { + data = `Result: ${stringifyTrace(message.result)}`; + } + else if (message.error === undefined) { + data = 'No result returned.'; + } + } + } + tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data); + } + else { + logLSPMessage('send-response', message); + } + } + function traceReceivedRequest(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) { + data = `Params: ${stringifyTrace(message.params)}`; + } + tracer.log(`Received request '${message.method} - (${message.id})'.`, data); + } + else { + logLSPMessage('receive-request', message); + } + } + function traceReceivedNotification(message) { + if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.params) { + data = `Params: ${stringifyTrace(message.params)}`; + } + else { + data = 'No parameters provided.'; + } + } + tracer.log(`Received notification '${message.method}'.`, data); + } + else { + logLSPMessage('receive-notification', message); + } + } + function traceReceivedResponse(message, responsePromise) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.error && message.error.data) { + data = `Error data: ${stringifyTrace(message.error.data)}`; + } + else { + if (message.result) { + data = `Result: ${stringifyTrace(message.result)}`; + } + else if (message.error === undefined) { + data = 'No result returned.'; + } + } + } + if (responsePromise) { + const error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : ''; + tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data); + } + else { + tracer.log(`Received response ${message.id} without active response promise.`, data); + } + } + else { + logLSPMessage('receive-response', message); + } + } + function logLSPMessage(type, message) { + if (!tracer || trace === Trace.Off) { + return; + } + const lspMessage = { + isLSPMessage: true, + type, + message, + timestamp: Date.now() + }; + tracer.log(lspMessage); + } + function throwIfClosedOrDisposed() { + if (isClosed()) { + throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.'); + } + if (isDisposed()) { + throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.'); + } + } + function throwIfListening() { + if (isListening()) { + throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening'); + } + } + function throwIfNotListening() { + if (!isListening()) { + throw new Error('Call listen() first.'); + } + } + function undefinedToNull(param) { + if (param === undefined) { + return null; + } + else { + return param; + } + } + function nullToUndefined(param) { + if (param === null) { + return undefined; + } + else { + return param; + } + } + function isNamedParam(param) { + return param !== undefined && param !== null && !Array.isArray(param) && typeof param === 'object'; + } + function computeSingleParam(parameterStructures, param) { + switch (parameterStructures) { + case messages_1.ParameterStructures.auto: + if (isNamedParam(param)) { + return nullToUndefined(param); + } + else { + return [undefinedToNull(param)]; + } + case messages_1.ParameterStructures.byName: + if (!isNamedParam(param)) { + throw new Error(`Received parameters by name but param is not an object literal.`); + } + return nullToUndefined(param); + case messages_1.ParameterStructures.byPosition: + return [undefinedToNull(param)]; + default: + throw new Error(`Unknown parameter structure ${parameterStructures.toString()}`); + } + } + function computeMessageParams(type, params) { + let result; + const numberOfParams = type.numberOfParams; + switch (numberOfParams) { + case 0: + result = undefined; + break; + case 1: + result = computeSingleParam(type.parameterStructures, params[0]); + break; + default: + result = []; + for (let i = 0; i < params.length && i < numberOfParams; i++) { + result.push(undefinedToNull(params[i])); + } + if (params.length < numberOfParams) { + for (let i = params.length; i < numberOfParams; i++) { + result.push(null); + } + } + break; + } + return result; + } + const connection = { + sendNotification: (type, ...args) => { + throwIfClosedOrDisposed(); + let method; + let messageParams; + if (Is.string(type)) { + method = type; + const first = args[0]; + let paramStart = 0; + let parameterStructures = messages_1.ParameterStructures.auto; + if (messages_1.ParameterStructures.is(first)) { + paramStart = 1; + parameterStructures = first; + } + const paramEnd = args.length; + const numberOfParams = paramEnd - paramStart; + switch (numberOfParams) { + case 0: + messageParams = undefined; + break; + case 1: + messageParams = computeSingleParam(parameterStructures, args[paramStart]); + break; + default: + if (parameterStructures === messages_1.ParameterStructures.byName) { + throw new Error(`Received ${numberOfParams} parameters for 'by Name' notification parameter structure.`); + } + messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value)); + break; + } + } + else { + const params = args; + method = type.method; + messageParams = computeMessageParams(type, params); + } + const notificationMessage = { + jsonrpc: version, + method: method, + params: messageParams + }; + traceSendingNotification(notificationMessage); + return messageWriter.write(notificationMessage).catch((error) => { + logger.error(`Sending notification failed.`); + throw error; + }); + }, + onNotification: (type, handler) => { + throwIfClosedOrDisposed(); + let method; + if (Is.func(type)) { + starNotificationHandler = type; + } + else if (handler) { + if (Is.string(type)) { + method = type; + notificationHandlers.set(type, { type: undefined, handler }); + } + else { + method = type.method; + notificationHandlers.set(type.method, { type, handler }); + } + } + return { + dispose: () => { + if (method !== undefined) { + if (notificationHandlers.get(method)?.handler === handler) { + notificationHandlers.delete(method); + } + } + else if (starNotificationHandler === type) { + starNotificationHandler = undefined; + } + } + }; + }, + onProgress: (_type, token, handler) => { + if (progressHandlers.has(token)) { + throw new Error(`Progress handler for token ${token} already registered`); + } + progressHandlers.set(token, handler); + return { + dispose: () => { + if (progressHandlers.get(token) === handler) { + progressHandlers.delete(token); + } + } + }; + }, + sendProgress: (_type, token, value) => { + // This should not await but simple return to ensure that we don't have another + // async scheduling. Otherwise one send could overtake another send. + return connection.sendNotification(ProgressNotification.type, { token, value }); + }, + onUnhandledProgress: unhandledProgressEmitter.event, + sendRequest: (type, ...args) => { + throwIfClosedOrDisposed(); + throwIfNotListening(); + function sendCancellation(connection, id) { + const p = cancellationStrategy.sender.sendCancellation(connection, id); + if (p === undefined) { + logger.log(`Received no promise from cancellation strategy when cancelling id ${id}`); + } + else { + p.catch(() => { + logger.log(`Sending cancellation messages for id ${id} failed.`); + }); + } + } + let method; + let messageParams; + let token = undefined; + if (Is.string(type)) { + method = type; + const first = args[0]; + const last = args[args.length - 1]; + let paramStart = 0; + let parameterStructures = messages_1.ParameterStructures.auto; + if (messages_1.ParameterStructures.is(first)) { + paramStart = 1; + parameterStructures = first; + } + let paramEnd = args.length; + if (cancellation_1.CancellationToken.is(last)) { + paramEnd = paramEnd - 1; + token = last; + } + const numberOfParams = paramEnd - paramStart; + switch (numberOfParams) { + case 0: + messageParams = undefined; + break; + case 1: + messageParams = computeSingleParam(parameterStructures, args[paramStart]); + break; + default: + if (parameterStructures === messages_1.ParameterStructures.byName) { + throw new Error(`Received ${numberOfParams} parameters for 'by Name' request parameter structure.`); + } + messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value)); + break; + } + } + else { + const params = args; + method = type.method; + messageParams = computeMessageParams(type, params); + const numberOfParams = type.numberOfParams; + token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined; + } + const id = sequenceNumber++; + let disposable; + let tokenWasCancelled = false; + if (token !== undefined) { + if (token.isCancellationRequested) { + tokenWasCancelled = true; + } + else { + disposable = token.onCancellationRequested(() => { + sendCancellation(connection, id); + }); + } + } + const requestMessage = { + jsonrpc: version, + id: id, + method: method, + params: messageParams + }; + traceSendingRequest(requestMessage); + if (typeof cancellationStrategy.sender.enableCancellation === 'function') { + cancellationStrategy.sender.enableCancellation(requestMessage); + } + // eslint-disable-next-line no-async-promise-executor + return new Promise(async (resolve, reject) => { + const resolveWithCleanup = (r) => { + resolve(r); + cancellationStrategy.sender.cleanup(id); + disposable?.dispose(); + }; + const rejectWithCleanup = (r) => { + reject(r); + cancellationStrategy.sender.cleanup(id); + disposable?.dispose(); + }; + const responsePromise = { method: method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup }; + try { + responsePromises.set(id, responsePromise); + await messageWriter.write(requestMessage); + if (tokenWasCancelled) { + sendCancellation(connection, id); + } + } + catch (error) { + // Writing the message failed. So we need to delete it from the response promises and + // reject it. + responsePromises.delete(id); + responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, error.message ? error.message : 'Unknown reason')); + logger.error(`Sending request failed.`); + throw error; + } + }); + }, + onRequest: (type, handler) => { + throwIfClosedOrDisposed(); + let method = null; + if (StarRequestHandler.is(type)) { + method = undefined; + starRequestHandler = type; + } + else if (Is.string(type)) { + method = null; + if (handler !== undefined) { + method = type; + requestHandlers.set(type, { handler: handler, type: undefined }); + } + } + else { + if (handler !== undefined) { + method = type.method; + requestHandlers.set(type.method, { type, handler }); + } + } + return { + dispose: () => { + if (method === null) { + return; + } + if (method !== undefined) { + if (requestHandlers.get(method)?.handler === handler) { + requestHandlers.delete(method); + } + } + else if (starRequestHandler === type) { + starRequestHandler = undefined; + } + } + }; + }, + hasPendingResponse: () => { + return responsePromises.size > 0; + }, + trace: async (_value, _tracer, sendNotificationOrTraceOptions) => { + let _sendNotification = false; + let _traceFormat = TraceFormat.Text; + if (sendNotificationOrTraceOptions !== undefined) { + if (Is.boolean(sendNotificationOrTraceOptions)) { + _sendNotification = sendNotificationOrTraceOptions; + } + else { + _sendNotification = sendNotificationOrTraceOptions.sendNotification || false; + _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text; + } + } + trace = _value; + traceFormat = _traceFormat; + if (trace === Trace.Off) { + tracer = undefined; + } + else { + tracer = _tracer; + } + if (_sendNotification && !isClosed() && !isDisposed()) { + await connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) }); + } + }, + onError: errorEmitter.event, + onClose: closeEmitter.event, + onUnhandledNotification: unhandledNotificationEmitter.event, + onDispose: disposeEmitter.event, + end: () => { + messageWriter.end(); + }, + dispose: () => { + if (isDisposed()) { + return; + } + state = ConnectionState.Disposed; + disposeEmitter.fire(undefined); + const error = new messages_1.ResponseError(messages_1.ErrorCodes.PendingResponseRejected, 'Pending response rejected since connection got disposed'); + for (const promise of responsePromises.values()) { + promise.reject(error); + } + responsePromises = new Map(); + requestTokens = new Map(); + knownCanceledRequests = new Set(); + messageQueue = new linkedMap_1.LinkedMap(); + // Test for backwards compatibility + if (Is.func(messageWriter.dispose)) { + messageWriter.dispose(); + } + if (Is.func(messageReader.dispose)) { + messageReader.dispose(); + } + }, + listen: () => { + throwIfClosedOrDisposed(); + throwIfListening(); + state = ConnectionState.Listening; + messageReader.listen(callback); + }, + inspect: () => { + (0, ral_1.default)().console.log('inspect'); + } + }; + connection.onNotification(LogTraceNotification.type, (params) => { + if (trace === Trace.Off || !tracer) { + return; + } + const verbose = trace === Trace.Verbose || trace === Trace.Compact; + tracer.log(params.message, verbose ? params.verbose : undefined); + }); + connection.onNotification(ProgressNotification.type, async (params) => { + const handler = progressHandlers.get(params.token); + if (handler) { + await handler(params.value); + } + else { + unhandledProgressEmitter.fire(params); + } + }); + return connection; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts new file mode 100644 index 0000000..99878bb --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts @@ -0,0 +1,9 @@ +export interface Disposable { + /** + * Dispose this object. + */ + dispose(): void; +} +export declare namespace Disposable { + function create(func: () => void): Disposable; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js new file mode 100644 index 0000000..b2800ad --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js @@ -0,0 +1,16 @@ +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Disposable = void 0; +var Disposable; +(function (Disposable) { + function create(func) { + return { + dispose: func + }; + } + Disposable.create = create; +})(Disposable || (exports.Disposable = Disposable = {})); diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts new file mode 100644 index 0000000..9bc7136 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts @@ -0,0 +1,52 @@ +import type RAL from './ral'; +import { Message } from './messages'; +export interface FunctionContentEncoder { + name: string; + encode(input: Uint8Array): Promise; +} +export interface StreamContentEncoder { + name: string; + create(): RAL.WritableStream; +} +export type ContentEncoder = FunctionContentEncoder | (FunctionContentEncoder & StreamContentEncoder); +export interface FunctionContentDecoder { + name: string; + decode(buffer: Uint8Array): Promise; +} +export interface StreamContentDecoder { + name: string; + create(): RAL.WritableStream; +} +export type ContentDecoder = FunctionContentDecoder | (FunctionContentDecoder & StreamContentDecoder); +export interface ContentTypeEncoderOptions { + charset: RAL.MessageBufferEncoding; +} +export interface FunctionContentTypeEncoder { + name: string; + encode(msg: Message, options: ContentTypeEncoderOptions): Promise; +} +export interface StreamContentTypeEncoder { + name: string; + create(options: ContentTypeEncoderOptions): RAL.WritableStream; +} +export type ContentTypeEncoder = FunctionContentTypeEncoder | (FunctionContentTypeEncoder & StreamContentTypeEncoder); +export interface ContentTypeDecoderOptions { + charset: RAL.MessageBufferEncoding; +} +export interface FunctionContentTypeDecoder { + name: string; + decode(buffer: Uint8Array, options: ContentTypeDecoderOptions): Promise; +} +export interface StreamContentTypeDecoder { + name: string; + create(options: ContentTypeDecoderOptions): RAL.WritableStream; +} +export type ContentTypeDecoder = FunctionContentTypeDecoder | (FunctionContentTypeDecoder & StreamContentTypeDecoder); +interface Named { + name: string; +} +export declare namespace Encodings { + function getEncodingHeaderValue(encodings: Named[]): string | undefined; + function parseEncodingHeaderValue(value: string): string[]; +} +export {}; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js new file mode 100644 index 0000000..914ce0a --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js @@ -0,0 +1,70 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Encodings = void 0; +var Encodings; +(function (Encodings) { + function getEncodingHeaderValue(encodings) { + if (encodings.length === 1) { + return encodings[0].name; + } + const distribute = encodings.length - 1; + if (distribute > 1000) { + throw new Error(`Quality value can only have three decimal digits but trying to distribute ${encodings.length} elements.`); + } + const digits = Math.ceil(Math.log10(distribute)); + const factor = Math.pow(10, digits); + const diff = Math.floor((1 / distribute) * factor) / factor; + const result = []; + let q = 1; + for (const encoding of encodings) { + result.push(`${encoding.name};q=${q === 1 || q === 0 ? q.toFixed(0) : q.toFixed(digits)}`); + q = q - diff; + } + return result.join(', '); + } + Encodings.getEncodingHeaderValue = getEncodingHeaderValue; + function parseEncodingHeaderValue(value) { + const map = new Map(); + const encodings = value.split(/\s*,\s*/); + for (const value of encodings) { + const [encoding, q] = parseEncoding(value); + if (encoding === '*') { + continue; + } + let values = map.get(q); + if (values === undefined) { + values = []; + map.set(q, values); + } + values.push(encoding); + } + const keys = Array.from(map.keys()); + keys.sort((a, b) => b - a); + const result = []; + for (const key of keys) { + result.push(...map.get(key)); + } + return result; + } + Encodings.parseEncodingHeaderValue = parseEncodingHeaderValue; + function parseEncoding(value) { + let q = 1; + let encoding; + const index = value.indexOf(';q='); + if (index !== -1) { + const parsed = parseFloat(value.substr(index)); + if (!Number.isNaN(parsed)) { + q = parsed; + } + encoding = value.substr(0, index); + } + else { + encoding = value; + } + return [encoding, q]; + } +})(Encodings || (exports.Encodings = Encodings = {})); diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts new file mode 100644 index 0000000..fe8f407 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts @@ -0,0 +1,39 @@ +import { Disposable } from './disposable'; +/** + * Represents a typed event. + */ +export interface Event { + /** + * + * @param listener The listener function will be called when the event happens. + * @param thisArgs The 'this' which will be used when calling the event listener. + * @param disposables An array to which a {{IDisposable}} will be added. + * @return + */ + (listener: (e: T) => any, thisArgs?: any, disposables?: Disposable[]): Disposable; +} +export declare namespace Event { + const None: Event; +} +export interface EmitterOptions { + onFirstListenerAdd?: Function; + onLastListenerRemove?: Function; +} +export declare class Emitter { + private _options?; + private static _noop; + private _event; + private _callbacks; + constructor(_options?: EmitterOptions | undefined); + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + get event(): Event; + /** + * To be kept private to fire an event to + * subscribers + */ + fire(event: T): any; + dispose(): void; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js new file mode 100644 index 0000000..fbf8d46 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js @@ -0,0 +1,135 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Emitter = exports.Event = void 0; +const ral_1 = __importDefault(require("./ral")); +var Event; +(function (Event) { + const _disposable = { dispose() { } }; + Event.None = function () { return _disposable; }; +})(Event || (exports.Event = Event = {})); +class CallbackList { + _callbacks; + _contexts; + add(callback, context = null, bucket) { + if (!this._callbacks) { + this._callbacks = []; + this._contexts = []; + } + this._callbacks.push(callback); + this._contexts.push(context); + if (Array.isArray(bucket)) { + bucket.push({ dispose: () => this.remove(callback, context) }); + } + } + remove(callback, context = null) { + if (!this._callbacks) { + return; + } + let foundCallbackWithDifferentContext = false; + for (let i = 0, len = this._callbacks.length; i < len; i++) { + if (this._callbacks[i] === callback) { + if (this._contexts[i] === context) { + // callback & context match => remove it + this._callbacks.splice(i, 1); + this._contexts.splice(i, 1); + return; + } + else { + foundCallbackWithDifferentContext = true; + } + } + } + if (foundCallbackWithDifferentContext) { + throw new Error('When adding a listener with a context, you should remove it with the same context'); + } + } + invoke(...args) { + if (!this._callbacks) { + return []; + } + const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0); + for (let i = 0, len = callbacks.length; i < len; i++) { + try { + ret.push(callbacks[i].apply(contexts[i], args)); + } + catch (e) { + (0, ral_1.default)().console.error(e); + } + } + return ret; + } + isEmpty() { + return !this._callbacks || this._callbacks.length === 0; + } + dispose() { + this._callbacks = undefined; + this._contexts = undefined; + } +} +class Emitter { + _options; + static _noop = function () { }; + _event; + _callbacks; + constructor(_options) { + this._options = _options; + } + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + get event() { + if (!this._event) { + this._event = (listener, thisArgs, disposables) => { + if (!this._callbacks) { + this._callbacks = new CallbackList(); + } + if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) { + this._options.onFirstListenerAdd(this); + } + this._callbacks.add(listener, thisArgs); + const result = { + dispose: () => { + if (!this._callbacks) { + // disposable is disposed after emitter is disposed. + return; + } + this._callbacks.remove(listener, thisArgs); + result.dispose = Emitter._noop; + if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) { + this._options.onLastListenerRemove(this); + } + } + }; + if (Array.isArray(disposables)) { + disposables.push(result); + } + return result; + }; + } + return this._event; + } + /** + * To be kept private to fire an event to + * subscribers + */ + fire(event) { + if (this._callbacks) { + this._callbacks.invoke.call(this._callbacks, event); + } + } + dispose() { + if (this._callbacks) { + this._callbacks.dispose(); + this._callbacks = undefined; + } + } +} +exports.Emitter = Emitter; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts new file mode 100644 index 0000000..9261a26 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts @@ -0,0 +1,7 @@ +export declare function boolean(value: any): value is boolean; +export declare function string(value: any): value is string; +export declare function number(value: any): value is number; +export declare function error(value: any): value is Error; +export declare function func(value: any): value is Function; +export declare function array(value: any): value is T[]; +export declare function stringArray(value: any): value is string[]; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js new file mode 100644 index 0000000..7506053 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js @@ -0,0 +1,34 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.boolean = boolean; +exports.string = string; +exports.number = number; +exports.error = error; +exports.func = func; +exports.array = array; +exports.stringArray = stringArray; +function boolean(value) { + return value === true || value === false; +} +function string(value) { + return typeof value === 'string' || value instanceof String; +} +function number(value) { + return typeof value === 'number' || value instanceof Number; +} +function error(value) { + return value instanceof Error; +} +function func(value) { + return typeof value === 'function'; +} +function array(value) { + return Array.isArray(value); +} +function stringArray(value) { + return array(value) && value.every(elem => string(elem)); +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts new file mode 100644 index 0000000..9ee2d1f --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts @@ -0,0 +1,55 @@ +export declare namespace Touch { + const None: 0; + const First: 1; + const AsOld: 1; + const Last: 2; + const AsNew: 2; +} +export type Touch = 0 | 1 | 2; +export declare class LinkedMap { + readonly [Symbol.toStringTag] = "LinkedMap"; + private _map; + private _head; + private _tail; + private _size; + private _state; + constructor(); + clear(): void; + isEmpty(): boolean; + get size(): number; + get first(): V | undefined; + get last(): V | undefined; + before(key: K): V | undefined; + after(key: K): V | undefined; + has(key: K): boolean; + get(key: K, touch?: Touch): V | undefined; + set(key: K, value: V, touch?: Touch): this; + delete(key: K): boolean; + remove(key: K): V | undefined; + shift(): V | undefined; + forEach(callbackfn: (value: V, key: K, map: LinkedMap) => void, thisArg?: any): void; + keys(): IterableIterator; + values(): IterableIterator; + entries(): IterableIterator<[K, V]>; + [Symbol.iterator](): IterableIterator<[K, V]>; + protected trimOld(newSize: number): void; + private addItemFirst; + private addItemLast; + private removeItem; + private touch; + toJSON(): [K, V][]; + fromJSON(data: [K, V][]): void; +} +export declare class LRUCache extends LinkedMap { + private _limit; + private _ratio; + constructor(limit: number, ratio?: number); + get limit(): number; + set limit(limit: number); + get ratio(): number; + set ratio(ratio: number); + get(key: K, touch?: Touch): V | undefined; + peek(key: K): V | undefined; + set(key: K, value: V): this; + private checkTrim; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js new file mode 100644 index 0000000..521079a --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js @@ -0,0 +1,412 @@ +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LRUCache = exports.LinkedMap = exports.Touch = void 0; +var Touch; +(function (Touch) { + Touch.None = 0; + Touch.First = 1; + Touch.AsOld = Touch.First; + Touch.Last = 2; + Touch.AsNew = Touch.Last; +})(Touch || (exports.Touch = Touch = {})); +class LinkedMap { + [Symbol.toStringTag] = 'LinkedMap'; + _map; + _head; + _tail; + _size; + _state; + constructor() { + this._map = new Map(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + this._state = 0; + } + clear() { + this._map.clear(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + this._state++; + } + isEmpty() { + return !this._head && !this._tail; + } + get size() { + return this._size; + } + get first() { + return this._head?.value; + } + get last() { + return this._tail?.value; + } + before(key) { + const item = this._map.get(key); + return item ? item.previous?.value : undefined; + } + after(key) { + const item = this._map.get(key); + return item ? item.next?.value : undefined; + } + has(key) { + return this._map.has(key); + } + get(key, touch = Touch.None) { + const item = this._map.get(key); + if (!item) { + return undefined; + } + if (touch !== Touch.None) { + this.touch(item, touch); + } + return item.value; + } + set(key, value, touch = Touch.None) { + let item = this._map.get(key); + if (item) { + item.value = value; + if (touch !== Touch.None) { + this.touch(item, touch); + } + } + else { + item = { key, value, next: undefined, previous: undefined }; + switch (touch) { + case Touch.None: + this.addItemLast(item); + break; + case Touch.First: + this.addItemFirst(item); + break; + case Touch.Last: + this.addItemLast(item); + break; + default: + this.addItemLast(item); + break; + } + this._map.set(key, item); + this._size++; + } + return this; + } + delete(key) { + return !!this.remove(key); + } + remove(key) { + const item = this._map.get(key); + if (!item) { + return undefined; + } + this._map.delete(key); + this.removeItem(item); + this._size--; + return item.value; + } + shift() { + if (!this._head && !this._tail) { + return undefined; + } + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + const item = this._head; + this._map.delete(item.key); + this.removeItem(item); + this._size--; + return item.value; + } + forEach(callbackfn, thisArg) { + const state = this._state; + let current = this._head; + while (current) { + if (thisArg) { + callbackfn.bind(thisArg)(current.value, current.key, this); + } + else { + callbackfn(current.value, current.key, this); + } + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + current = current.next; + } + } + keys() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: current.key, done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + values() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: current.value, done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + entries() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: [current.key, current.value], done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + [Symbol.iterator]() { + return this.entries(); + } + trimOld(newSize) { + if (newSize >= this.size) { + return; + } + if (newSize === 0) { + this.clear(); + return; + } + let current = this._head; + let currentSize = this.size; + while (current && currentSize > newSize) { + this._map.delete(current.key); + current = current.next; + currentSize--; + } + this._head = current; + this._size = currentSize; + if (current) { + current.previous = undefined; + } + this._state++; + } + addItemFirst(item) { + // First time Insert + if (!this._head && !this._tail) { + this._tail = item; + } + else if (!this._head) { + throw new Error('Invalid list'); + } + else { + item.next = this._head; + this._head.previous = item; + } + this._head = item; + this._state++; + } + addItemLast(item) { + // First time Insert + if (!this._head && !this._tail) { + this._head = item; + } + else if (!this._tail) { + throw new Error('Invalid list'); + } + else { + item.previous = this._tail; + this._tail.next = item; + } + this._tail = item; + this._state++; + } + removeItem(item) { + if (item === this._head && item === this._tail) { + this._head = undefined; + this._tail = undefined; + } + else if (item === this._head) { + // This can only happened if size === 1 which is handle + // by the case above. + if (!item.next) { + throw new Error('Invalid list'); + } + item.next.previous = undefined; + this._head = item.next; + } + else if (item === this._tail) { + // This can only happened if size === 1 which is handle + // by the case above. + if (!item.previous) { + throw new Error('Invalid list'); + } + item.previous.next = undefined; + this._tail = item.previous; + } + else { + const next = item.next; + const previous = item.previous; + if (!next || !previous) { + throw new Error('Invalid list'); + } + next.previous = previous; + previous.next = next; + } + item.next = undefined; + item.previous = undefined; + this._state++; + } + touch(item, touch) { + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + if ((touch !== Touch.First && touch !== Touch.Last)) { + return; + } + if (touch === Touch.First) { + if (item === this._head) { + return; + } + const next = item.next; + const previous = item.previous; + // Unlink the item + if (item === this._tail) { + // previous must be defined since item was not head but is tail + // So there are more than on item in the map + previous.next = undefined; + this._tail = previous; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next.previous = previous; + previous.next = next; + } + // Insert the node at head + item.previous = undefined; + item.next = this._head; + this._head.previous = item; + this._head = item; + this._state++; + } + else if (touch === Touch.Last) { + if (item === this._tail) { + return; + } + const next = item.next; + const previous = item.previous; + // Unlink the item. + if (item === this._head) { + // next must be defined since item was not tail but is head + // So there are more than on item in the map + next.previous = undefined; + this._head = next; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next.previous = previous; + previous.next = next; + } + item.next = undefined; + item.previous = this._tail; + this._tail.next = item; + this._tail = item; + this._state++; + } + } + toJSON() { + const data = []; + this.forEach((value, key) => { + data.push([key, value]); + }); + return data; + } + fromJSON(data) { + this.clear(); + for (const [key, value] of data) { + this.set(key, value); + } + } +} +exports.LinkedMap = LinkedMap; +class LRUCache extends LinkedMap { + _limit; + _ratio; + constructor(limit, ratio = 1) { + super(); + this._limit = limit; + this._ratio = Math.min(Math.max(0, ratio), 1); + } + get limit() { + return this._limit; + } + set limit(limit) { + this._limit = limit; + this.checkTrim(); + } + get ratio() { + return this._ratio; + } + set ratio(ratio) { + this._ratio = Math.min(Math.max(0, ratio), 1); + this.checkTrim(); + } + get(key, touch = Touch.AsNew) { + return super.get(key, touch); + } + peek(key) { + return super.get(key, Touch.None); + } + set(key, value) { + super.set(key, value, Touch.Last); + this.checkTrim(); + return this; + } + checkTrim() { + if (this.size > this._limit) { + this.trimOld(Math.round(this._limit * this._ratio)); + } + } +} +exports.LRUCache = LRUCache; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts new file mode 100644 index 0000000..354df8d --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts @@ -0,0 +1,18 @@ +import RAL from './ral'; +export declare abstract class AbstractMessageBuffer implements RAL.MessageBuffer { + private _encoding; + private _chunks; + private _totalLength; + constructor(encoding?: RAL.MessageBufferEncoding); + protected abstract emptyBuffer(): Uint8Array; + protected abstract fromString(value: string, encoding: RAL.MessageBufferEncoding): Uint8Array; + protected abstract toString(value: Uint8Array, encoding: RAL.MessageBufferEncoding): string; + protected abstract asNative(buffer: Uint8Array, length?: number): Uint8Array; + protected abstract allocNative(length: number): Uint8Array; + get encoding(): RAL.MessageBufferEncoding; + append(chunk: Uint8Array | string): void; + tryReadHeaders(lowerCaseKeys?: boolean): Map | undefined; + tryReadBody(length: number): Uint8Array | undefined; + get numberOfBytes(): number; + private _read; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js new file mode 100644 index 0000000..7875b0e --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js @@ -0,0 +1,155 @@ +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AbstractMessageBuffer = void 0; +const CR = 13; +const LF = 10; +const CRLF = '\r\n'; +class AbstractMessageBuffer { + _encoding; + _chunks; + _totalLength; + constructor(encoding = 'utf-8') { + this._encoding = encoding; + this._chunks = []; + this._totalLength = 0; + } + get encoding() { + return this._encoding; + } + append(chunk) { + const toAppend = typeof chunk === 'string' ? this.fromString(chunk, this._encoding) : chunk; + this._chunks.push(toAppend); + this._totalLength += toAppend.byteLength; + } + tryReadHeaders(lowerCaseKeys = false) { + if (this._chunks.length === 0) { + return undefined; + } + let state = 0; + let chunkIndex = 0; + let offset = 0; + let chunkBytesRead = 0; + row: while (chunkIndex < this._chunks.length) { + const chunk = this._chunks[chunkIndex]; + offset = 0; + while (offset < chunk.length) { + const value = chunk[offset]; + switch (value) { + case CR: + switch (state) { + case 0: + state = 1; + break; + case 2: + state = 3; + break; + default: + state = 0; + } + break; + case LF: + switch (state) { + case 1: + state = 2; + break; + case 3: + state = 4; + offset++; + break row; + default: + state = 0; + } + break; + default: + state = 0; + } + offset++; + } + chunkBytesRead += chunk.byteLength; + chunkIndex++; + } + if (state !== 4) { + return undefined; + } + // The buffer contains the two CRLF at the end. So we will + // have two empty lines after the split at the end as well. + const buffer = this._read(chunkBytesRead + offset); + const result = new Map(); + const headers = this.toString(buffer, 'ascii').split(CRLF); + if (headers.length < 2) { + return result; + } + for (let i = 0; i < headers.length - 2; i++) { + const header = headers[i]; + const index = header.indexOf(':'); + if (index === -1) { + throw new Error(`Message header must separate key and value using ':'\n${header}`); + } + const key = header.substr(0, index); + const value = header.substr(index + 1).trim(); + result.set(lowerCaseKeys ? key.toLowerCase() : key, value); + } + return result; + } + tryReadBody(length) { + if (this._totalLength < length) { + return undefined; + } + return this._read(length); + } + get numberOfBytes() { + return this._totalLength; + } + _read(byteCount) { + if (byteCount === 0) { + return this.emptyBuffer(); + } + if (byteCount > this._totalLength) { + throw new Error(`Cannot read so many bytes!`); + } + if (this._chunks[0].byteLength === byteCount) { + // super fast path, precisely first chunk must be returned + const chunk = this._chunks[0]; + this._chunks.shift(); + this._totalLength -= byteCount; + return this.asNative(chunk); + } + if (this._chunks[0].byteLength > byteCount) { + // fast path, the reading is entirely within the first chunk + const chunk = this._chunks[0]; + const result = this.asNative(chunk, byteCount); + this._chunks[0] = chunk.slice(byteCount); + this._totalLength -= byteCount; + return result; + } + const result = this.allocNative(byteCount); + let resultOffset = 0; + const chunkIndex = 0; + while (byteCount > 0) { + const chunk = this._chunks[chunkIndex]; + if (chunk.byteLength > byteCount) { + // this chunk will survive + const chunkPart = chunk.slice(0, byteCount); + result.set(chunkPart, resultOffset); + resultOffset += byteCount; + this._chunks[chunkIndex] = chunk.slice(byteCount); + this._totalLength -= byteCount; + byteCount -= byteCount; + } + else { + // this chunk will be entirely read + result.set(chunk, resultOffset); + resultOffset += chunk.byteLength; + this._chunks.shift(); + this._totalLength -= chunk.byteLength; + byteCount -= chunk.byteLength; + } + } + return result; + } +} +exports.AbstractMessageBuffer = AbstractMessageBuffer; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts new file mode 100644 index 0000000..d447d07 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts @@ -0,0 +1,77 @@ +import RAL from './ral'; +import { Event } from './events'; +import { Message } from './messages'; +import { ContentDecoder, ContentTypeDecoder } from './encoding'; +import { Disposable } from './api'; +/** + * A callback that receives each incoming JSON-RPC message. + */ +export interface DataCallback { + (data: Message): void; +} +export interface PartialMessageInfo { + readonly messageToken: number; + readonly waitingTime: number; +} +/** Reads JSON-RPC messages from some underlying transport. */ +export interface MessageReader { + /** Raised whenever an error occurs while reading a message. */ + readonly onError: Event; + /** An event raised when the end of the underlying transport has been reached. */ + readonly onClose: Event; + /** + * An event that *may* be raised to inform the owner that only part of a message has been received. + * A MessageReader implementation may choose to raise this event after a timeout elapses while waiting for more of a partially received message to be received. + */ + readonly onPartialMessage: Event; + /** + * Begins listening for incoming messages. To be called at most once. + * @param callback A callback for receiving decoded messages. + */ + listen(callback: DataCallback): Disposable; + /** Releases resources incurred from reading or raising events. Does NOT close the underlying transport, if any. */ + dispose(): void; +} +export declare namespace MessageReader { + function is(value: any): value is MessageReader; +} +export declare abstract class AbstractMessageReader implements MessageReader { + private errorEmitter; + private closeEmitter; + private partialMessageEmitter; + constructor(); + dispose(): void; + get onError(): Event; + protected fireError(error: any): void; + get onClose(): Event; + protected fireClose(): void; + get onPartialMessage(): Event; + protected firePartialMessage(info: PartialMessageInfo): void; + private asError; + abstract listen(callback: DataCallback): Disposable; +} +export interface MessageReaderOptions { + charset?: RAL.MessageBufferEncoding; + contentDecoder?: ContentDecoder; + contentDecoders?: ContentDecoder[]; + contentTypeDecoder?: ContentTypeDecoder; + contentTypeDecoders?: ContentTypeDecoder[]; +} +export declare class ReadableStreamMessageReader extends AbstractMessageReader { + private readable; + private options; + private callback; + private nextMessageLength; + private messageToken; + private buffer; + private partialMessageTimer; + private _partialMessageTimeout; + private readSemaphore; + constructor(readable: RAL.ReadableStream, options?: RAL.MessageBufferEncoding | MessageReaderOptions); + set partialMessageTimeout(timeout: number); + get partialMessageTimeout(): number; + listen(callback: DataCallback): Disposable; + private onData; + private clearPartialMessageTimer; + private setPartialMessageTimer; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js new file mode 100644 index 0000000..59c6ca6 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js @@ -0,0 +1,246 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = void 0; +const ral_1 = __importDefault(require("./ral")); +const Is = __importStar(require("./is")); +const events_1 = require("./events"); +const semaphore_1 = require("./semaphore"); +var MessageReader; +(function (MessageReader) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) && + Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage); + } + MessageReader.is = is; +})(MessageReader || (exports.MessageReader = MessageReader = {})); +class AbstractMessageReader { + errorEmitter; + closeEmitter; + partialMessageEmitter; + constructor() { + this.errorEmitter = new events_1.Emitter(); + this.closeEmitter = new events_1.Emitter(); + this.partialMessageEmitter = new events_1.Emitter(); + } + dispose() { + this.errorEmitter.dispose(); + this.closeEmitter.dispose(); + this.partialMessageEmitter.dispose(); + } + get onError() { + return this.errorEmitter.event; + } + fireError(error) { + this.errorEmitter.fire(this.asError(error)); + } + get onClose() { + return this.closeEmitter.event; + } + fireClose() { + this.closeEmitter.fire(undefined); + } + get onPartialMessage() { + return this.partialMessageEmitter.event; + } + firePartialMessage(info) { + this.partialMessageEmitter.fire(info); + } + asError(error) { + if (error instanceof Error) { + return error; + } + else { + return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`); + } + } +} +exports.AbstractMessageReader = AbstractMessageReader; +var ResolvedMessageReaderOptions; +(function (ResolvedMessageReaderOptions) { + function fromOptions(options) { + let charset; + let result; + let contentDecoder; + const contentDecoders = new Map(); + let contentTypeDecoder; + const contentTypeDecoders = new Map(); + if (options === undefined || typeof options === 'string') { + charset = options ?? 'utf-8'; + } + else { + charset = options.charset ?? 'utf-8'; + if (options.contentDecoder !== undefined) { + contentDecoder = options.contentDecoder; + contentDecoders.set(contentDecoder.name, contentDecoder); + } + if (options.contentDecoders !== undefined) { + for (const decoder of options.contentDecoders) { + contentDecoders.set(decoder.name, decoder); + } + } + if (options.contentTypeDecoder !== undefined) { + contentTypeDecoder = options.contentTypeDecoder; + contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder); + } + if (options.contentTypeDecoders !== undefined) { + for (const decoder of options.contentTypeDecoders) { + contentTypeDecoders.set(decoder.name, decoder); + } + } + } + if (contentTypeDecoder === undefined) { + contentTypeDecoder = (0, ral_1.default)().applicationJson.decoder; + contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder); + } + return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders }; + } + ResolvedMessageReaderOptions.fromOptions = fromOptions; +})(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {})); +class ReadableStreamMessageReader extends AbstractMessageReader { + readable; + options; + callback; + nextMessageLength; + messageToken; + buffer; + partialMessageTimer; + _partialMessageTimeout; + readSemaphore; + constructor(readable, options) { + super(); + this.readable = readable; + this.options = ResolvedMessageReaderOptions.fromOptions(options); + this.buffer = (0, ral_1.default)().messageBuffer.create(this.options.charset); + this._partialMessageTimeout = 10000; + this.nextMessageLength = -1; + this.messageToken = 0; + this.readSemaphore = new semaphore_1.Semaphore(1); + } + set partialMessageTimeout(timeout) { + this._partialMessageTimeout = timeout; + } + get partialMessageTimeout() { + return this._partialMessageTimeout; + } + listen(callback) { + this.nextMessageLength = -1; + this.messageToken = 0; + this.partialMessageTimer = undefined; + this.callback = callback; + const result = this.readable.onData((data) => { + this.onData(data); + }); + this.readable.onError((error) => this.fireError(error)); + this.readable.onClose(() => this.fireClose()); + return result; + } + onData(data) { + try { + this.buffer.append(data); + while (true) { + if (this.nextMessageLength === -1) { + const headers = this.buffer.tryReadHeaders(true); + if (!headers) { + return; + } + const contentLength = headers.get('content-length'); + if (!contentLength) { + this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(headers))}`)); + return; + } + const length = parseInt(contentLength); + if (isNaN(length)) { + this.fireError(new Error(`Content-Length value must be a number. Got ${contentLength}`)); + return; + } + this.nextMessageLength = length; + } + const body = this.buffer.tryReadBody(this.nextMessageLength); + if (body === undefined) { + /** We haven't received the full message yet. */ + this.setPartialMessageTimer(); + return; + } + this.clearPartialMessageTimer(); + this.nextMessageLength = -1; + // Make sure that we convert one received message after the + // other. Otherwise it could happen that a decoding of a second + // smaller message finished before the decoding of a first larger + // message and then we would deliver the second message first. + this.readSemaphore.lock(async () => { + const bytes = this.options.contentDecoder !== undefined + ? await this.options.contentDecoder.decode(body) + : body; + const message = await this.options.contentTypeDecoder.decode(bytes, this.options); + this.callback(message); + }).catch((error) => { + this.fireError(error); + }); + } + } + catch (error) { + this.fireError(error); + } + } + clearPartialMessageTimer() { + if (this.partialMessageTimer) { + this.partialMessageTimer.dispose(); + this.partialMessageTimer = undefined; + } + } + setPartialMessageTimer() { + this.clearPartialMessageTimer(); + if (this._partialMessageTimeout <= 0) { + return; + } + this.partialMessageTimer = (0, ral_1.default)().timer.setTimeout((token, timeout) => { + this.partialMessageTimer = undefined; + if (token === this.messageToken) { + this.firePartialMessage({ messageToken: token, waitingTime: timeout }); + this.setPartialMessageTimer(); + } + }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout); + } +} +exports.ReadableStreamMessageReader = ReadableStreamMessageReader; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts new file mode 100644 index 0000000..fd86488 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts @@ -0,0 +1,60 @@ +import RAL from './ral'; +import { Message } from './messages'; +import { Event } from './events'; +import { ContentEncoder, ContentTypeEncoder } from './encoding'; +/** + * Writes JSON-RPC messages to an underlying transport. + */ +export interface MessageWriter { + /** + * Raised whenever an error occurs while writing a message. + */ + readonly onError: Event<[Error, Message | undefined, number | undefined]>; + /** + * An event raised when the underlying transport has closed and writing is no longer possible. + */ + readonly onClose: Event; + /** + * Sends a JSON-RPC message. + * @param msg The JSON-RPC message to be sent. + * @description Implementations should guarantee messages are transmitted in the same order that they are received by this method. + */ + write(msg: Message): Promise; + /** + * Call when the connection using this message writer ends + * (e.g. MessageConnection.end() is called) + */ + end(): void; + /** Releases resources incurred from writing or raising events. Does NOT close the underlying transport, if any. */ + dispose(): void; +} +export declare namespace MessageWriter { + function is(value: any): value is MessageWriter; +} +export declare abstract class AbstractMessageWriter { + private errorEmitter; + private closeEmitter; + constructor(); + dispose(): void; + get onError(): Event<[Error, Message | undefined, number | undefined]>; + protected fireError(error: any, message?: Message, count?: number): void; + get onClose(): Event; + protected fireClose(): void; + private asError; +} +export interface MessageWriterOptions { + charset?: RAL.MessageBufferEncoding; + contentEncoder?: ContentEncoder; + contentTypeEncoder?: ContentTypeEncoder; +} +export declare class WriteableStreamMessageWriter extends AbstractMessageWriter implements MessageWriter { + private writable; + private options; + private errorCount; + private writeSemaphore; + constructor(writable: RAL.WritableStream, options?: RAL.MessageBufferEncoding | MessageWriterOptions); + write(msg: Message): Promise; + private doWrite; + private handleError; + end(): void; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js new file mode 100644 index 0000000..9db0e13 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js @@ -0,0 +1,157 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = void 0; +const ral_1 = __importDefault(require("./ral")); +const Is = __importStar(require("./is")); +const semaphore_1 = require("./semaphore"); +const events_1 = require("./events"); +const ContentLength = 'Content-Length: '; +const CRLF = '\r\n'; +var MessageWriter; +(function (MessageWriter) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) && + Is.func(candidate.onError) && Is.func(candidate.write); + } + MessageWriter.is = is; +})(MessageWriter || (exports.MessageWriter = MessageWriter = {})); +class AbstractMessageWriter { + errorEmitter; + closeEmitter; + constructor() { + this.errorEmitter = new events_1.Emitter(); + this.closeEmitter = new events_1.Emitter(); + } + dispose() { + this.errorEmitter.dispose(); + this.closeEmitter.dispose(); + } + get onError() { + return this.errorEmitter.event; + } + fireError(error, message, count) { + this.errorEmitter.fire([this.asError(error), message, count]); + } + get onClose() { + return this.closeEmitter.event; + } + fireClose() { + this.closeEmitter.fire(undefined); + } + asError(error) { + if (error instanceof Error) { + return error; + } + else { + return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`); + } + } +} +exports.AbstractMessageWriter = AbstractMessageWriter; +var ResolvedMessageWriterOptions; +(function (ResolvedMessageWriterOptions) { + function fromOptions(options) { + if (options === undefined || typeof options === 'string') { + return { charset: options ?? 'utf-8', contentTypeEncoder: (0, ral_1.default)().applicationJson.encoder }; + } + else { + return { charset: options.charset ?? 'utf-8', contentEncoder: options.contentEncoder, contentTypeEncoder: options.contentTypeEncoder ?? (0, ral_1.default)().applicationJson.encoder }; + } + } + ResolvedMessageWriterOptions.fromOptions = fromOptions; +})(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {})); +class WriteableStreamMessageWriter extends AbstractMessageWriter { + writable; + options; + errorCount; + writeSemaphore; + constructor(writable, options) { + super(); + this.writable = writable; + this.options = ResolvedMessageWriterOptions.fromOptions(options); + this.errorCount = 0; + this.writeSemaphore = new semaphore_1.Semaphore(1); + this.writable.onError((error) => this.fireError(error)); + this.writable.onClose(() => this.fireClose()); + } + async write(msg) { + return this.writeSemaphore.lock(async () => { + const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => { + if (this.options.contentEncoder !== undefined) { + return this.options.contentEncoder.encode(buffer); + } + else { + return buffer; + } + }); + return payload.then((buffer) => { + const headers = []; + headers.push(ContentLength, buffer.byteLength.toString(), CRLF); + headers.push(CRLF); + return this.doWrite(msg, headers, buffer); + }, (error) => { + this.fireError(error); + throw error; + }); + }); + } + async doWrite(msg, headers, data) { + try { + await this.writable.write(headers.join(''), 'ascii'); + return this.writable.write(data); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + this.writable.end(); + } +} +exports.WriteableStreamMessageWriter = WriteableStreamMessageWriter; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts new file mode 100644 index 0000000..4d9ab2b --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts @@ -0,0 +1,369 @@ +/** + * A language server message + */ +export interface Message { + jsonrpc: string; +} +/** + * Request message + */ +export interface RequestMessage extends Message { + /** + * The request id. + */ + id: number | string | null; + /** + * The method to be invoked. + */ + method: string; + /** + * The method's params. + */ + params?: any[] | object; +} +/** + * Predefined error codes. + */ +export declare namespace ErrorCodes { + const ParseError: -32700; + const InvalidRequest: -32600; + const MethodNotFound: -32601; + const InvalidParams: -32602; + const InternalError: -32603; + /** + * This is the start range of JSON RPC reserved error codes. + * It doesn't denote a real error code. No application error codes should + * be defined between the start and end range. For backwards + * compatibility the `ServerNotInitialized` and the `UnknownErrorCode` + * are left in the range. + * + * @since 3.16.0 + */ + const jsonrpcReservedErrorRangeStart: -32099; + /** @deprecated use jsonrpcReservedErrorRangeStart */ + const serverErrorStart: -32099; + /** + * An error occurred when write a message to the transport layer. + */ + const MessageWriteError: -32099; + /** + * An error occurred when reading a message from the transport layer. + */ + const MessageReadError: -32098; + /** + * The connection got disposed or lost and all pending responses got + * rejected. + */ + const PendingResponseRejected: -32097; + /** + * The connection is inactive and a use of it failed. + */ + const ConnectionInactive: -32096; + /** + * Error code indicating that a server received a notification or + * request before the server has received the `initialize` request. + */ + const ServerNotInitialized: -32002; + const UnknownErrorCode: -32001; + /** + * This is the end range of JSON RPC reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + const jsonrpcReservedErrorRangeEnd: -32000; + /** @deprecated use jsonrpcReservedErrorRangeEnd */ + const serverErrorEnd: -32000; +} +type integer = number; +export type ErrorCodes = integer; +export interface ResponseErrorLiteral { + /** + * A number indicating the error type that occurred. + */ + code: number; + /** + * A string providing a short description of the error. + */ + message: string; + /** + * A Primitive or Structured value that contains additional + * information about the error. Can be omitted. + */ + data?: D; +} +/** + * An error object return in a response in case a request + * has failed. + */ +export declare class ResponseError extends Error { + readonly code: number; + readonly data: D | undefined; + constructor(code: number, message: string, data?: D); + toJson(): ResponseErrorLiteral; +} +/** + * A response message. + */ +export interface ResponseMessage extends Message { + /** + * The request id. + */ + id: number | string | null; + /** + * The result of a request. This member is REQUIRED on success. + * This member MUST NOT exist if there was an error invoking the method. + */ + result?: string | number | boolean | object | any[] | null; + /** + * The error object in case a request fails. + */ + error?: ResponseErrorLiteral; +} +/** + * A LSP Log Entry. + */ +export type LSPMessageType = 'send-request' | 'receive-request' | 'send-response' | 'receive-response' | 'send-notification' | 'receive-notification'; +export interface LSPLogMessage { + type: LSPMessageType; + message: RequestMessage | ResponseMessage | NotificationMessage; + timestamp: number; +} +export declare class ParameterStructures { + private readonly kind; + /** + * The parameter structure is automatically inferred on the number of parameters + * and the parameter type in case of a single param. + */ + static readonly auto: ParameterStructures; + /** + * Forces `byPosition` parameter structure. This is useful if you have a single + * parameter which has a literal type. + */ + static readonly byPosition: ParameterStructures; + /** + * Forces `byName` parameter structure. This is only useful when having a single + * parameter. The library will report errors if used with a different number of + * parameters. + */ + static readonly byName: ParameterStructures; + private constructor(); + static is(value: any): value is ParameterStructures; + toString(): string; +} +/** + * An interface to type messages. + */ +export interface MessageSignature { + readonly method: string; + readonly numberOfParams: number; + readonly parameterStructures: ParameterStructures; +} +/** + * An abstract implementation of a MessageType. + */ +export declare abstract class AbstractMessageSignature implements MessageSignature { + readonly method: string; + readonly numberOfParams: number; + constructor(method: string, numberOfParams: number); + get parameterStructures(): ParameterStructures; +} +/** + * End marker interface for request and notification types. + */ +export interface _EM { + _$endMarker$_: number; +} +/** + * Classes to type request response pairs + */ +export declare class RequestType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P, R, E, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class RequestType1 extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, R, E, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class RequestType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, P9, R, E, _EM] | undefined; + constructor(method: string); +} +/** + * Notification Message + */ +export interface NotificationMessage extends Message { + /** + * The method to be invoked. + */ + method: string; + /** + * The notification's params. + */ + params?: any[] | object; +} +export declare class NotificationType

extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class NotificationType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [_EM] | undefined; + constructor(method: string); +} +export declare class NotificationType1 extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class NotificationType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, P9, _EM] | undefined; + constructor(method: string); +} +export declare namespace Message { + /** + * Tests if the given message is a request message + */ + function isRequest(message: Message | undefined): message is RequestMessage; + /** + * Tests if the given message is a notification message + */ + function isNotification(message: Message | undefined): message is NotificationMessage; + /** + * Tests if the given message is a response message + */ + function isResponse(message: Message | undefined): message is ResponseMessage; +} +export {}; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js new file mode 100644 index 0000000..5e4a720 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js @@ -0,0 +1,436 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Message = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType = exports.RequestType0 = exports.AbstractMessageSignature = exports.ParameterStructures = exports.ResponseError = exports.ErrorCodes = void 0; +const is = __importStar(require("./is")); +/** + * Predefined error codes. + */ +var ErrorCodes; +(function (ErrorCodes) { + // Defined by JSON RPC + ErrorCodes.ParseError = -32700; + ErrorCodes.InvalidRequest = -32600; + ErrorCodes.MethodNotFound = -32601; + ErrorCodes.InvalidParams = -32602; + ErrorCodes.InternalError = -32603; + /** + * This is the start range of JSON RPC reserved error codes. + * It doesn't denote a real error code. No application error codes should + * be defined between the start and end range. For backwards + * compatibility the `ServerNotInitialized` and the `UnknownErrorCode` + * are left in the range. + * + * @since 3.16.0 + */ + ErrorCodes.jsonrpcReservedErrorRangeStart = -32099; + /** @deprecated use jsonrpcReservedErrorRangeStart */ + ErrorCodes.serverErrorStart = -32099; + /** + * An error occurred when write a message to the transport layer. + */ + ErrorCodes.MessageWriteError = -32099; + /** + * An error occurred when reading a message from the transport layer. + */ + ErrorCodes.MessageReadError = -32098; + /** + * The connection got disposed or lost and all pending responses got + * rejected. + */ + ErrorCodes.PendingResponseRejected = -32097; + /** + * The connection is inactive and a use of it failed. + */ + ErrorCodes.ConnectionInactive = -32096; + /** + * Error code indicating that a server received a notification or + * request before the server has received the `initialize` request. + */ + ErrorCodes.ServerNotInitialized = -32002; + ErrorCodes.UnknownErrorCode = -32001; + /** + * This is the end range of JSON RPC reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + ErrorCodes.jsonrpcReservedErrorRangeEnd = -32000; + /** @deprecated use jsonrpcReservedErrorRangeEnd */ + ErrorCodes.serverErrorEnd = -32000; +})(ErrorCodes || (exports.ErrorCodes = ErrorCodes = {})); +/** + * An error object return in a response in case a request + * has failed. + */ +class ResponseError extends Error { + code; + data; + constructor(code, message, data) { + super(message); + this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode; + this.data = data; + Object.setPrototypeOf(this, ResponseError.prototype); + } + toJson() { + const result = { + code: this.code, + message: this.message + }; + if (this.data !== undefined) { + result.data = this.data; + } + return result; + } +} +exports.ResponseError = ResponseError; +class ParameterStructures { + kind; + /** + * The parameter structure is automatically inferred on the number of parameters + * and the parameter type in case of a single param. + */ + static auto = new ParameterStructures('auto'); + /** + * Forces `byPosition` parameter structure. This is useful if you have a single + * parameter which has a literal type. + */ + static byPosition = new ParameterStructures('byPosition'); + /** + * Forces `byName` parameter structure. This is only useful when having a single + * parameter. The library will report errors if used with a different number of + * parameters. + */ + static byName = new ParameterStructures('byName'); + constructor(kind) { + this.kind = kind; + } + static is(value) { + return value === ParameterStructures.auto || value === ParameterStructures.byName || value === ParameterStructures.byPosition; + } + toString() { + return this.kind; + } +} +exports.ParameterStructures = ParameterStructures; +/** + * An abstract implementation of a MessageType. + */ +class AbstractMessageSignature { + method; + numberOfParams; + constructor(method, numberOfParams) { + this.method = method; + this.numberOfParams = numberOfParams; + } + get parameterStructures() { + return ParameterStructures.auto; + } +} +exports.AbstractMessageSignature = AbstractMessageSignature; +/** + * Classes to type request response pairs + */ +class RequestType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 0); + } +} +exports.RequestType0 = RequestType0; +class RequestType extends AbstractMessageSignature { + _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.RequestType = RequestType; +class RequestType1 extends AbstractMessageSignature { + _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.RequestType1 = RequestType1; +class RequestType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 2); + } +} +exports.RequestType2 = RequestType2; +class RequestType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 3); + } +} +exports.RequestType3 = RequestType3; +class RequestType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 4); + } +} +exports.RequestType4 = RequestType4; +class RequestType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 5); + } +} +exports.RequestType5 = RequestType5; +class RequestType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 6); + } +} +exports.RequestType6 = RequestType6; +class RequestType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 7); + } +} +exports.RequestType7 = RequestType7; +class RequestType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 8); + } +} +exports.RequestType8 = RequestType8; +class RequestType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 9); + } +} +exports.RequestType9 = RequestType9; +class NotificationType extends AbstractMessageSignature { + _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.NotificationType = NotificationType; +class NotificationType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 0); + } +} +exports.NotificationType0 = NotificationType0; +class NotificationType1 extends AbstractMessageSignature { + _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.NotificationType1 = NotificationType1; +class NotificationType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 2); + } +} +exports.NotificationType2 = NotificationType2; +class NotificationType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 3); + } +} +exports.NotificationType3 = NotificationType3; +class NotificationType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 4); + } +} +exports.NotificationType4 = NotificationType4; +class NotificationType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 5); + } +} +exports.NotificationType5 = NotificationType5; +class NotificationType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 6); + } +} +exports.NotificationType6 = NotificationType6; +class NotificationType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 7); + } +} +exports.NotificationType7 = NotificationType7; +class NotificationType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 8); + } +} +exports.NotificationType8 = NotificationType8; +class NotificationType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 9); + } +} +exports.NotificationType9 = NotificationType9; +var Message; +(function (Message) { + /** + * Tests if the given message is a request message + */ + function isRequest(message) { + const candidate = message; + return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id)); + } + Message.isRequest = isRequest; + /** + * Tests if the given message is a notification message + */ + function isNotification(message) { + const candidate = message; + return candidate && is.string(candidate.method) && message.id === void 0; + } + Message.isNotification = isNotification; + /** + * Tests if the given message is a response message + */ + function isResponse(message) { + const candidate = message; + return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null); + } + Message.isResponse = isResponse; +})(Message || (exports.Message = Message = {})); diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts new file mode 100644 index 0000000..e14ec4a --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts @@ -0,0 +1,74 @@ +import type { Disposable } from './disposable'; +import type { ContentTypeEncoder, ContentTypeDecoder } from './encoding'; +interface _MessageBuffer { + readonly encoding: RAL.MessageBufferEncoding; + /** + * Append data to the message buffer. + * + * @param chunk the data to append. + */ + append(chunk: Uint8Array | string): void; + /** + * Tries to read the headers from the buffer + * + * @param lowerCaseKeys Whether the keys should be stored lower case. Doing + * so is recommended since HTTP headers are case insensitive. + * + * @returns the header properties or undefined in not enough data can be read. + */ + tryReadHeaders(lowerCaseKeys?: boolean): Map | undefined; + /** + * Tries to read the body of the given length. + * + * @param length the amount of bytes to read. + * @returns the data or undefined int less data is available. + */ + tryReadBody(length: number): Uint8Array | undefined; +} +type _MessageBufferEncoding = 'ascii' | 'utf-8'; +interface _ReadableStream { + onData(listener: (data: Uint8Array) => void): Disposable; + onClose(listener: () => void): Disposable; + onError(listener: (error: any) => void): Disposable; + onEnd(listener: () => void): Disposable; +} +interface _WritableStream { + onClose(listener: () => void): Disposable; + onError(listener: (error: any) => void): Disposable; + onEnd(listener: () => void): Disposable; + write(data: Uint8Array): Promise; + write(data: string, encoding: _MessageBufferEncoding): Promise; + end(): void; +} +interface _DuplexStream extends _ReadableStream, _WritableStream { +} +interface RAL { + readonly applicationJson: { + readonly encoder: ContentTypeEncoder; + readonly decoder: ContentTypeDecoder; + }; + readonly messageBuffer: { + create(encoding: RAL.MessageBufferEncoding): RAL.MessageBuffer; + }; + readonly console: { + info(message?: any, ...optionalParams: any[]): void; + log(message?: any, ...optionalParams: any[]): void; + warn(message?: any, ...optionalParams: any[]): void; + error(message?: any, ...optionalParams: any[]): void; + }; + readonly timer: { + setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable; + setImmediate(callback: (...args: any[]) => void, ...args: any[]): Disposable; + setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable; + }; +} +declare function RAL(): RAL; +declare namespace RAL { + type MessageBuffer = _MessageBuffer; + type MessageBufferEncoding = _MessageBufferEncoding; + type ReadableStream = _ReadableStream; + type WritableStream = _WritableStream; + type DuplexStream = _DuplexStream; + function install(ral: RAL): void; +} +export default RAL; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js new file mode 100644 index 0000000..ae335df --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js @@ -0,0 +1,23 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +let _ral; +function RAL() { + if (_ral === undefined) { + throw new Error(`No runtime abstraction layer installed`); + } + return _ral; +} +(function (RAL) { + function install(ral) { + if (ral === undefined) { + throw new Error(`No runtime abstraction layer provided`); + } + _ral = ral; + } + RAL.install = install; +})(RAL || (RAL = {})); +exports.default = RAL; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts new file mode 100644 index 0000000..1261daa --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts @@ -0,0 +1,10 @@ +export declare class Semaphore { + private _capacity; + private _active; + private _waiting; + constructor(capacity?: number); + lock(thunk: () => T | PromiseLike): Promise; + get active(): number; + private runNext; + private doRunNext; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js new file mode 100644 index 0000000..e1705cc --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js @@ -0,0 +1,74 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Semaphore = void 0; +const ral_1 = __importDefault(require("./ral")); +class Semaphore { + _capacity; + _active; + _waiting; + constructor(capacity = 1) { + if (capacity <= 0) { + throw new Error('Capacity must be greater than 0'); + } + this._capacity = capacity; + this._active = 0; + this._waiting = []; + } + lock(thunk) { + return new Promise((resolve, reject) => { + this._waiting.push({ thunk, resolve, reject }); + this.runNext(); + }); + } + get active() { + return this._active; + } + runNext() { + if (this._waiting.length === 0 || this._active === this._capacity) { + return; + } + (0, ral_1.default)().timer.setImmediate(() => this.doRunNext()); + } + doRunNext() { + if (this._waiting.length === 0 || this._active === this._capacity) { + return; + } + const next = this._waiting.shift(); + this._active++; + if (this._active > this._capacity) { + throw new Error(`Too many thunks active`); + } + try { + const result = next.thunk(); + if (result instanceof Promise) { + result.then((value) => { + this._active--; + next.resolve(value); + this.runNext(); + }, (err) => { + this._active--; + next.reject(err); + this.runNext(); + }); + } + else { + this._active--; + next.resolve(result); + this.runNext(); + } + } + catch (err) { + this._active--; + next.reject(err); + this.runNext(); + } + } +} +exports.Semaphore = Semaphore; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts new file mode 100644 index 0000000..c6e8d08 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts @@ -0,0 +1,15 @@ +import { RequestMessage } from './messages'; +import { AbstractCancellationTokenSource } from './cancellation'; +import { CancellationId, RequestCancellationReceiverStrategy, CancellationSenderStrategy, MessageConnection } from './connection'; +export declare class SharedArraySenderStrategy implements CancellationSenderStrategy { + private readonly buffers; + constructor(); + enableCancellation(request: RequestMessage): void; + sendCancellation(_conn: MessageConnection, id: CancellationId): Promise; + cleanup(id: CancellationId): void; + dispose(): void; +} +export declare class SharedArrayReceiverStrategy implements RequestCancellationReceiverStrategy { + readonly kind: "request"; + createCancellationTokenSource(request: RequestMessage): AbstractCancellationTokenSource; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js new file mode 100644 index 0000000..a931822 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js @@ -0,0 +1,77 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SharedArrayReceiverStrategy = exports.SharedArraySenderStrategy = void 0; +const cancellation_1 = require("./cancellation"); +var CancellationState; +(function (CancellationState) { + CancellationState.Continue = 0; + CancellationState.Cancelled = 1; +})(CancellationState || (CancellationState = {})); +class SharedArraySenderStrategy { + buffers; + constructor() { + this.buffers = new Map(); + } + enableCancellation(request) { + if (request.id === null) { + return; + } + const buffer = new SharedArrayBuffer(4); + const data = new Int32Array(buffer, 0, 1); + data[0] = CancellationState.Continue; + this.buffers.set(request.id, buffer); + request.$cancellationData = buffer; + } + async sendCancellation(_conn, id) { + const buffer = this.buffers.get(id); + if (buffer === undefined) { + return; + } + const data = new Int32Array(buffer, 0, 1); + Atomics.store(data, 0, CancellationState.Cancelled); + } + cleanup(id) { + this.buffers.delete(id); + } + dispose() { + this.buffers.clear(); + } +} +exports.SharedArraySenderStrategy = SharedArraySenderStrategy; +class SharedArrayBufferCancellationToken { + data; + constructor(buffer) { + this.data = new Int32Array(buffer, 0, 1); + } + get isCancellationRequested() { + return Atomics.load(this.data, 0) === CancellationState.Cancelled; + } + get onCancellationRequested() { + throw new Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`); + } +} +class SharedArrayBufferCancellationTokenSource { + token; + constructor(buffer) { + this.token = new SharedArrayBufferCancellationToken(buffer); + } + cancel() { + } + dispose() { + } +} +class SharedArrayReceiverStrategy { + kind = 'request'; + createCancellationTokenSource(request) { + const buffer = request.$cancellationData; + if (buffer === undefined) { + return new cancellation_1.CancellationTokenSource(); + } + return new SharedArrayBufferCancellationTokenSource(buffer); + } +} +exports.SharedArrayReceiverStrategy = SharedArrayReceiverStrategy; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts new file mode 100644 index 0000000..926a954 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts @@ -0,0 +1,58 @@ +import { ChildProcess } from 'child_process'; +import { Socket } from 'net'; +import { MessagePort, Worker } from 'worker_threads'; +import { RAL, AbstractMessageReader, DataCallback, AbstractMessageWriter, Message, ReadableStreamMessageReader, WriteableStreamMessageWriter, MessageWriterOptions, MessageReaderOptions, MessageReader, MessageWriter, ConnectionStrategy, ConnectionOptions, MessageConnection, Logger, Disposable } from '../common/api'; +export * from '../common/api'; +export declare class IPCMessageReader extends AbstractMessageReader { + private process; + constructor(process: NodeJS.Process | ChildProcess); + listen(callback: DataCallback): Disposable; +} +export declare class IPCMessageWriter extends AbstractMessageWriter implements MessageWriter { + private readonly process; + private errorCount; + constructor(process: NodeJS.Process | ChildProcess); + write(msg: Message): Promise; + private handleError; + end(): void; +} +export declare class PortMessageReader extends AbstractMessageReader implements MessageReader { + private onData; + constructor(port: MessagePort | Worker); + listen(callback: DataCallback): Disposable; +} +export declare class PortMessageWriter extends AbstractMessageWriter implements MessageWriter { + private readonly port; + private errorCount; + constructor(port: MessagePort | Worker); + write(msg: Message): Promise; + private handleError; + end(): void; +} +export declare class SocketMessageReader extends ReadableStreamMessageReader { + constructor(socket: Socket, encoding?: RAL.MessageBufferEncoding); +} +export declare class SocketMessageWriter extends WriteableStreamMessageWriter { + private socket; + constructor(socket: Socket, options?: RAL.MessageBufferEncoding | MessageWriterOptions); + dispose(): void; +} +export declare class StreamMessageReader extends ReadableStreamMessageReader { + constructor(readable: NodeJS.ReadableStream, encoding?: RAL.MessageBufferEncoding | MessageReaderOptions); +} +export declare class StreamMessageWriter extends WriteableStreamMessageWriter { + constructor(writable: NodeJS.WritableStream, options?: RAL.MessageBufferEncoding | MessageWriterOptions); +} +export declare function generateRandomPipeName(): string; +export interface PipeTransport { + onConnected(): Promise<[MessageReader, MessageWriter]>; +} +export declare function createClientPipeTransport(pipeName: string, encoding?: RAL.MessageBufferEncoding): Promise; +export declare function createServerPipeTransport(pipeName: string, encoding?: RAL.MessageBufferEncoding): [MessageReader, MessageWriter]; +export interface SocketTransport { + onConnected(): Promise<[MessageReader, MessageWriter]>; +} +export declare function createClientSocketTransport(port: number, encoding?: RAL.MessageBufferEncoding): Promise; +export declare function createServerSocketTransport(port: number, encoding?: RAL.MessageBufferEncoding): [MessageReader, MessageWriter]; +export declare function createMessageConnection(reader: MessageReader, writer: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; +export declare function createMessageConnection(inputStream: NodeJS.ReadableStream, outputStream: NodeJS.WritableStream, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js new file mode 100644 index 0000000..7166046 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js @@ -0,0 +1,289 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.StreamMessageWriter = exports.StreamMessageReader = exports.SocketMessageWriter = exports.SocketMessageReader = exports.PortMessageWriter = exports.PortMessageReader = exports.IPCMessageWriter = exports.IPCMessageReader = void 0; +exports.generateRandomPipeName = generateRandomPipeName; +exports.createClientPipeTransport = createClientPipeTransport; +exports.createServerPipeTransport = createServerPipeTransport; +exports.createClientSocketTransport = createClientSocketTransport; +exports.createServerSocketTransport = createServerSocketTransport; +exports.createMessageConnection = createMessageConnection; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +const ril_1 = __importDefault(require("./ril")); +// Install the node runtime abstract. +ril_1.default.install(); +const path = __importStar(require("path")); +const os = __importStar(require("os")); +const fs = __importStar(require("fs")); +const crypto_1 = require("crypto"); +const net_1 = require("net"); +const api_1 = require("../common/api"); +__exportStar(require("../common/api"), exports); +class IPCMessageReader extends api_1.AbstractMessageReader { + process; + constructor(process) { + super(); + this.process = process; + const eventEmitter = this.process; + eventEmitter.on('error', (error) => this.fireError(error)); + eventEmitter.on('close', () => this.fireClose()); + } + listen(callback) { + this.process.on('message', callback); + return api_1.Disposable.create(() => this.process.off('message', callback)); + } +} +exports.IPCMessageReader = IPCMessageReader; +class IPCMessageWriter extends api_1.AbstractMessageWriter { + process; + errorCount; + constructor(process) { + super(); + this.process = process; + this.errorCount = 0; + const eventEmitter = this.process; + eventEmitter.on('error', (error) => this.fireError(error)); + eventEmitter.on('close', () => this.fireClose); + } + write(msg) { + try { + if (typeof this.process.send === 'function') { + this.process.send(msg, undefined, undefined, (error) => { + if (error) { + this.errorCount++; + this.handleError(error, msg); + } + else { + this.errorCount = 0; + } + }); + } + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.IPCMessageWriter = IPCMessageWriter; +class PortMessageReader extends api_1.AbstractMessageReader { + onData; + constructor(port) { + super(); + this.onData = new api_1.Emitter; + port.on('close', () => this.fireClose); + port.on('error', (error) => this.fireError(error)); + port.on('message', (message) => { + this.onData.fire(message); + }); + } + listen(callback) { + return this.onData.event(callback); + } +} +exports.PortMessageReader = PortMessageReader; +class PortMessageWriter extends api_1.AbstractMessageWriter { + port; + errorCount; + constructor(port) { + super(); + this.port = port; + this.errorCount = 0; + port.on('close', () => this.fireClose()); + port.on('error', (error) => this.fireError(error)); + } + write(msg) { + try { + this.port.postMessage(msg); + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.PortMessageWriter = PortMessageWriter; +class SocketMessageReader extends api_1.ReadableStreamMessageReader { + constructor(socket, encoding = 'utf-8') { + super((0, ril_1.default)().stream.asReadableStream(socket), encoding); + } +} +exports.SocketMessageReader = SocketMessageReader; +class SocketMessageWriter extends api_1.WriteableStreamMessageWriter { + socket; + constructor(socket, options) { + super((0, ril_1.default)().stream.asWritableStream(socket), options); + this.socket = socket; + } + dispose() { + super.dispose(); + this.socket.destroy(); + } +} +exports.SocketMessageWriter = SocketMessageWriter; +class StreamMessageReader extends api_1.ReadableStreamMessageReader { + constructor(readable, encoding) { + super((0, ril_1.default)().stream.asReadableStream(readable), encoding); + } +} +exports.StreamMessageReader = StreamMessageReader; +class StreamMessageWriter extends api_1.WriteableStreamMessageWriter { + constructor(writable, options) { + super((0, ril_1.default)().stream.asWritableStream(writable), options); + } +} +exports.StreamMessageWriter = StreamMessageWriter; +const XDG_RUNTIME_DIR = process.env['XDG_RUNTIME_DIR']; +const safeIpcPathLengths = new Map([ + ['linux', 107], + ['darwin', 103] +]); +function generateRandomPipeName() { + if (process.platform === 'win32') { + return `\\\\.\\pipe\\lsp-${(0, crypto_1.randomBytes)(16).toString('hex')}-sock`; + } + let randomLength = 32; + const fixedLength = '/lsp-.sock'.length; + const tmpDir = fs.realpathSync(XDG_RUNTIME_DIR ?? os.tmpdir()); + const limit = safeIpcPathLengths.get(process.platform); + if (limit !== undefined) { + randomLength = Math.min(limit - tmpDir.length - fixedLength, randomLength); + } + if (randomLength < 16) { + throw new Error(`Unable to generate a random pipe name with ${randomLength} characters.`); + } + const randomSuffix = (0, crypto_1.randomBytes)(Math.floor(randomLength / 2)).toString('hex'); + return path.join(tmpDir, `lsp-${randomSuffix}.sock`); +} +function createClientPipeTransport(pipeName, encoding = 'utf-8') { + let connectResolve; + const connected = new Promise((resolve, _reject) => { + connectResolve = resolve; + }); + return new Promise((resolve, reject) => { + const server = (0, net_1.createServer)((socket) => { + server.close(); + connectResolve([ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]); + }); + server.on('error', reject); + server.listen(pipeName, () => { + server.removeListener('error', reject); + resolve({ + onConnected: () => { return connected; } + }); + }); + }); +} +function createServerPipeTransport(pipeName, encoding = 'utf-8') { + const socket = (0, net_1.createConnection)(pipeName); + return [ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]; +} +function createClientSocketTransport(port, encoding = 'utf-8') { + let connectResolve; + const connected = new Promise((resolve, _reject) => { + connectResolve = resolve; + }); + return new Promise((resolve, reject) => { + const server = (0, net_1.createServer)((socket) => { + server.close(); + connectResolve([ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]); + }); + server.on('error', reject); + server.listen(port, '127.0.0.1', () => { + server.removeListener('error', reject); + resolve({ + onConnected: () => { return connected; } + }); + }); + }); +} +function createServerSocketTransport(port, encoding = 'utf-8') { + const socket = (0, net_1.createConnection)(port, '127.0.0.1'); + return [ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]; +} +function isReadableStream(value) { + const candidate = value; + return candidate.read !== undefined && candidate.addListener !== undefined; +} +function isWritableStream(value) { + const candidate = value; + return candidate.write !== undefined && candidate.addListener !== undefined; +} +function createMessageConnection(input, output, logger, options) { + if (!logger) { + logger = api_1.NullLogger; + } + const reader = isReadableStream(input) ? new StreamMessageReader(input) : input; + const writer = isWritableStream(output) ? new StreamMessageWriter(output) : output; + if (api_1.ConnectionStrategy.is(options)) { + options = { connectionStrategy: options }; + } + return (0, api_1.createMessageConnection)(reader, writer, logger, options); +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts new file mode 100644 index 0000000..02202e0 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts @@ -0,0 +1,12 @@ +import { RAL } from '../common/api'; +interface RIL extends RAL { + readonly stream: { + readonly asReadableStream: (stream: NodeJS.ReadableStream) => RAL.ReadableStream; + readonly asWritableStream: (stream: NodeJS.WritableStream) => RAL.WritableStream; + }; +} +declare function RIL(): RIL; +declare namespace RIL { + function install(): void; +} +export default RIL; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js new file mode 100644 index 0000000..10bcc0a --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js @@ -0,0 +1,163 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +const util_1 = require("util"); +const api_1 = require("../common/api"); +class MessageBuffer extends api_1.AbstractMessageBuffer { + static emptyBuffer = Buffer.allocUnsafe(0); + constructor(encoding = 'utf-8') { + super(encoding); + } + emptyBuffer() { + return MessageBuffer.emptyBuffer; + } + fromString(value, encoding) { + return Buffer.from(value, encoding); + } + toString(value, encoding) { + if (value instanceof Buffer) { + return value.toString(encoding); + } + else { + return new util_1.TextDecoder(encoding).decode(value); + } + } + asNative(buffer, length) { + if (length === undefined) { + return buffer instanceof Buffer ? buffer : Buffer.from(buffer); + } + else { + return buffer instanceof Buffer ? buffer.slice(0, length) : Buffer.from(buffer, 0, length); + } + } + allocNative(length) { + return Buffer.allocUnsafe(length); + } +} +class ReadableStreamWrapper { + stream; + constructor(stream) { + this.stream = stream; + } + onClose(listener) { + this.stream.on('close', listener); + return api_1.Disposable.create(() => this.stream.off('close', listener)); + } + onError(listener) { + this.stream.on('error', listener); + return api_1.Disposable.create(() => this.stream.off('error', listener)); + } + onEnd(listener) { + this.stream.on('end', listener); + return api_1.Disposable.create(() => this.stream.off('end', listener)); + } + onData(listener) { + this.stream.on('data', listener); + return api_1.Disposable.create(() => this.stream.off('data', listener)); + } +} +class WritableStreamWrapper { + stream; + constructor(stream) { + this.stream = stream; + } + onClose(listener) { + this.stream.on('close', listener); + return api_1.Disposable.create(() => this.stream.off('close', listener)); + } + onError(listener) { + this.stream.on('error', listener); + return api_1.Disposable.create(() => this.stream.off('error', listener)); + } + onEnd(listener) { + this.stream.on('end', listener); + return api_1.Disposable.create(() => this.stream.off('end', listener)); + } + write(data, encoding) { + return new Promise((resolve, reject) => { + const callback = (error) => { + if (error === undefined || error === null) { + resolve(); + } + else { + reject(error); + } + }; + if (typeof data === 'string') { + this.stream.write(data, encoding, callback); + } + else { + this.stream.write(data, callback); + } + }); + } + end() { + this.stream.end(); + } +} +const _ril = Object.freeze({ + messageBuffer: Object.freeze({ + create: (encoding) => new MessageBuffer(encoding) + }), + applicationJson: Object.freeze({ + encoder: Object.freeze({ + name: 'application/json', + encode: (msg, options) => { + try { + return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset)); + } + catch (err) { + return Promise.reject(err); + } + } + }), + decoder: Object.freeze({ + name: 'application/json', + decode: (buffer, options) => { + try { + if (buffer instanceof Buffer) { + return Promise.resolve(JSON.parse(buffer.toString(options.charset))); + } + else { + return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer))); + } + } + catch (err) { + return Promise.reject(err); + } + } + }) + }), + stream: Object.freeze({ + asReadableStream: (stream) => new ReadableStreamWrapper(stream), + asWritableStream: (stream) => new WritableStreamWrapper(stream) + }), + console: console, + timer: Object.freeze({ + setTimeout(callback, ms, ...args) { + const handle = setTimeout(callback, ms, ...args); + return { dispose: () => clearTimeout(handle) }; + }, + setImmediate(callback, ...args) { + const handle = setImmediate(callback, ...args); + return { dispose: () => clearImmediate(handle) }; + }, + setInterval(callback, ms, ...args) { + const handle = setInterval(callback, ms, ...args); + return { dispose: () => clearInterval(handle) }; + } + }) +}); +function RIL() { + return _ril; +} +(function (RIL) { + function install() { + api_1.RAL.install(_ril); + } + RIL.install = install; +})(RIL || (RIL = {})); +exports.default = RIL; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/package.json b/node_modules/typescript/vendor/vscode-jsonrpc/package.json new file mode 100644 index 0000000..457b7ca --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/package.json @@ -0,0 +1,54 @@ +{ + "name": "vscode-jsonrpc", + "description": "A json rpc implementation over streams", + "version": "9.0.0", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-languageserver-node.git", + "directory": "jsonrpc" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "engines": { + "node": ">=14.0.0" + }, + "exports": { + ".": { + "types": "./lib/common/api.d.ts", + "default": "./lib/common/api.js" + }, + "./node": { + "types": "./lib/node/main.d.ts", + "node": "./lib/node/main.js" + }, + "./browser": { + "types": "./lib/browser/main.d.ts", + "browser": "./lib/browser/main.js" + } + }, + "devDependencies": { + "@types/msgpack-lite": "^0.1.12", + "msgpack-lite": "^0.1.26" + }, + "scripts": { + "prepublishOnly": "echo \"⛔ Can only publish from a secure pipeline ⛔\" && node ../build/npm/fail", + "prepack": "npm run all:publish", + "preversion": "npm test", + "compile": "tsc -b ./tsconfig.json", + "watch": "tsc -b ./tsconfig.watch.json -w", + "clean": "rimraf lib && rimraf dist", + "lint": "eslint src", + "test": "npm run test:node && npm run test:browser", + "test:node": "node ../node_modules/mocha/bin/_mocha", + "test:browser": "npm run webpack:test:silent && node ../build/bin/runBrowserTests.js http://127.0.0.1:8080/jsonrpc/src/browser/test/", + "webpack": "node ../build/bin/webpack --mode none --config ./webpack.config.js", + "webpack:test": "node ../build/bin/webpack --mode none --config ./src/browser/test/webpack.config.js", + "webpack:test:silent": "node ../build/bin/webpack --no-stats --mode none --config ./src/browser/test/webpack.config.js", + "all": "npm run clean && npm run compile && npm run lint && npm run test", + "compile:publish": "tsc -b ./tsconfig.publish.json", + "all:publish": "git clean -xfd . && npm install && npm run compile:publish && npm run lint && npm run test" + } +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts new file mode 100644 index 0000000..8c4d2ee --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts @@ -0,0 +1,5 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +interface Thenable extends PromiseLike { } \ No newline at end of file diff --git a/node_modules/undici-types/LICENSE b/node_modules/undici-types/LICENSE new file mode 100644 index 0000000..e7323bb --- /dev/null +++ b/node_modules/undici-types/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Matteo Collina and Undici 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/undici-types/README.md b/node_modules/undici-types/README.md new file mode 100644 index 0000000..20a721c --- /dev/null +++ b/node_modules/undici-types/README.md @@ -0,0 +1,6 @@ +# undici-types + +This package is a dual-publish of the [undici](https://www.npmjs.com/package/undici) library types. The `undici` package **still contains types**. This package is for users who _only_ need undici types (such as for `@types/node`). It is published alongside every release of `undici`, so you can always use the same version. + +- [GitHub nodejs/undici](https://github.com/nodejs/undici) +- [Undici Documentation](https://undici.nodejs.org/#/) diff --git a/node_modules/undici-types/agent.d.ts b/node_modules/undici-types/agent.d.ts new file mode 100644 index 0000000..3d41105 --- /dev/null +++ b/node_modules/undici-types/agent.d.ts @@ -0,0 +1,30 @@ +import { URL } from 'node:url' +import Pool from './pool' +import Dispatcher from './dispatcher' +import TClientStats from './client-stats' +import TPoolStats from './pool-stats' + +export default Agent + +declare class Agent extends Dispatcher { + constructor (opts?: Agent.Options) + /** `true` after `dispatcher.close()` has been called. */ + closed: boolean + /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */ + destroyed: boolean + /** Dispatches a request. */ + dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean + /** Aggregate stats for a Agent by origin. */ + readonly stats: Record +} + +declare namespace Agent { + export interface Options extends Pool.Options { + /** Default: `(origin, opts) => new Pool(origin, opts)`. */ + factory?(origin: string | URL, opts: Object): Dispatcher; + maxOrigins?: number + } + + export interface DispatchOptions extends Dispatcher.DispatchOptions { + } +} diff --git a/node_modules/undici-types/api.d.ts b/node_modules/undici-types/api.d.ts new file mode 100644 index 0000000..b362b14 --- /dev/null +++ b/node_modules/undici-types/api.d.ts @@ -0,0 +1,43 @@ +import { URL, UrlObject } from 'node:url' +import { Duplex } from 'node:stream' +import Dispatcher from './dispatcher' + +/** Performs an HTTP request. */ +declare function request ( + url: string | URL | UrlObject, + options?: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path' | 'method'> & Partial>, +): Promise> + +/** A faster version of `request`. */ +declare function stream ( + url: string | URL | UrlObject, + options: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path'>, + factory: Dispatcher.StreamFactory +): Promise> + +/** For easy use with `stream.pipeline`. */ +declare function pipeline ( + url: string | URL | UrlObject, + options: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path'>, + handler: Dispatcher.PipelineHandler +): Duplex + +/** Starts two-way communications with the requested resource. */ +declare function connect ( + url: string | URL | UrlObject, + options?: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path'> +): Promise> + +/** Upgrade to a different protocol. */ +declare function upgrade ( + url: string | URL | UrlObject, + options?: { dispatcher?: Dispatcher } & Omit +): Promise + +export { + request, + stream, + pipeline, + connect, + upgrade +} diff --git a/node_modules/undici-types/balanced-pool.d.ts b/node_modules/undici-types/balanced-pool.d.ts new file mode 100644 index 0000000..1813e0c --- /dev/null +++ b/node_modules/undici-types/balanced-pool.d.ts @@ -0,0 +1,30 @@ +import Pool from './pool' +import Dispatcher from './dispatcher' +import { URL } from 'node:url' + +export default BalancedPool + +type BalancedPoolConnectOptions = Omit + +declare class BalancedPool extends Dispatcher { + constructor (url: string | string[] | URL | URL[], options?: Pool.Options) + + addUpstream (upstream: string | URL): BalancedPool + removeUpstream (upstream: string | URL): BalancedPool + getUpstream (upstream: string | URL): Pool | undefined + upstreams: Array + + /** `true` after `pool.close()` has been called. */ + closed: boolean + /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ + destroyed: boolean + + // Override dispatcher APIs. + override connect ( + options: BalancedPoolConnectOptions + ): Promise + override connect ( + options: BalancedPoolConnectOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void +} diff --git a/node_modules/undici-types/cache-interceptor.d.ts b/node_modules/undici-types/cache-interceptor.d.ts new file mode 100644 index 0000000..8588ccd --- /dev/null +++ b/node_modules/undici-types/cache-interceptor.d.ts @@ -0,0 +1,179 @@ +import { Readable, Writable } from 'node:stream' + +export default CacheHandler + +declare namespace CacheHandler { + export type CacheMethods = 'GET' | 'HEAD' | 'OPTIONS' | 'TRACE' + + export interface CacheHandlerOptions { + store: CacheStore + + cacheByDefault?: number + + type?: CacheOptions['type'] + } + + export interface CacheOptions { + store?: CacheStore + + /** + * The methods to cache + * Note we can only cache safe methods. Unsafe methods (i.e. PUT, POST) + * invalidate the cache for a origin. + * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-invalidating-stored-respons + * @see https://www.rfc-editor.org/rfc/rfc9110#section-9.2.1 + */ + methods?: CacheMethods[] + + /** + * RFC9111 allows for caching responses that we aren't explicitly told to + * cache or to not cache. + * @see https://www.rfc-editor.org/rfc/rfc9111.html#section-3-5 + * @default undefined + */ + cacheByDefault?: number + + /** + * TODO docs + * @default 'shared' + */ + type?: 'shared' | 'private' + + /** + * Array of origins to cache. Only requests to these origins will be cached. + * Supports strings (case insensitive) and RegExp patterns. + * @default undefined (cache all origins) + */ + origins?: (string | RegExp)[] + } + + export interface CacheControlDirectives { + 'max-stale'?: number; + 'min-fresh'?: number; + 'max-age'?: number; + 's-maxage'?: number; + 'stale-while-revalidate'?: number; + 'stale-if-error'?: number; + public?: true; + private?: true | string[]; + 'no-store'?: true; + 'no-cache'?: true | string[]; + 'must-revalidate'?: true; + 'proxy-revalidate'?: true; + immutable?: true; + 'no-transform'?: true; + 'must-understand'?: true; + 'only-if-cached'?: true; + } + + export interface CacheKey { + origin: string + method: string + path: string + headers?: Record + } + + export interface CacheValue { + statusCode: number + statusMessage: string + headers: Record + vary?: Record + etag?: string + cacheControlDirectives?: CacheControlDirectives + cachedAt: number + staleAt: number + deleteAt: number + } + + export interface DeleteByUri { + origin: string + method: string + path: string + } + + type GetResult = { + statusCode: number + statusMessage: string + headers: Record + vary?: Record + etag?: string + body?: Readable | Iterable | AsyncIterable | Buffer | Iterable | AsyncIterable | string + cacheControlDirectives: CacheControlDirectives, + cachedAt: number + staleAt: number + deleteAt: number + } + + /** + * Underlying storage provider for cached responses + */ + export interface CacheStore { + get(key: CacheKey): GetResult | Promise | undefined + + createWriteStream(key: CacheKey, val: CacheValue): Writable | undefined + + delete(key: CacheKey): void | Promise + } + + export interface MemoryCacheStoreOpts { + /** + * @default Infinity + */ + maxCount?: number + + /** + * @default Infinity + */ + maxSize?: number + + /** + * @default Infinity + */ + maxEntrySize?: number + + errorCallback?: (err: Error) => void + } + + export class MemoryCacheStore implements CacheStore { + constructor (opts?: MemoryCacheStoreOpts) + + get (key: CacheKey): GetResult | Promise | undefined + + createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined + + delete (key: CacheKey): void | Promise + } + + export interface SqliteCacheStoreOpts { + /** + * Location of the database + * @default ':memory:' + */ + location?: string + + /** + * @default Infinity + */ + maxCount?: number + + /** + * @default Infinity + */ + maxEntrySize?: number + } + + export class SqliteCacheStore implements CacheStore { + constructor (opts?: SqliteCacheStoreOpts) + + /** + * Closes the connection to the database + */ + close (): void + + get (key: CacheKey): GetResult | Promise | undefined + + createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined + + delete (key: CacheKey): void | Promise + } +} diff --git a/node_modules/undici-types/cache.d.ts b/node_modules/undici-types/cache.d.ts new file mode 100644 index 0000000..4c33335 --- /dev/null +++ b/node_modules/undici-types/cache.d.ts @@ -0,0 +1,36 @@ +import type { RequestInfo, Response, Request } from './fetch' + +export interface CacheStorage { + match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise, + has (cacheName: string): Promise, + open (cacheName: string): Promise, + delete (cacheName: string): Promise, + keys (): Promise +} + +declare const CacheStorage: { + prototype: CacheStorage + new(): CacheStorage +} + +export interface Cache { + match (request: RequestInfo, options?: CacheQueryOptions): Promise, + matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise, + add (request: RequestInfo): Promise, + addAll (requests: RequestInfo[]): Promise, + put (request: RequestInfo, response: Response): Promise, + delete (request: RequestInfo, options?: CacheQueryOptions): Promise, + keys (request?: RequestInfo, options?: CacheQueryOptions): Promise +} + +export interface CacheQueryOptions { + ignoreSearch?: boolean, + ignoreMethod?: boolean, + ignoreVary?: boolean +} + +export interface MultiCacheQueryOptions extends CacheQueryOptions { + cacheName?: string +} + +export declare const caches: CacheStorage diff --git a/node_modules/undici-types/client-stats.d.ts b/node_modules/undici-types/client-stats.d.ts new file mode 100644 index 0000000..ad9bd84 --- /dev/null +++ b/node_modules/undici-types/client-stats.d.ts @@ -0,0 +1,15 @@ +import Client from './client' + +export default ClientStats + +declare class ClientStats { + constructor (pool: Client) + /** If socket has open connection. */ + connected: boolean + /** Number of open socket connections in this client that do not have an active request. */ + pending: number + /** Number of currently active requests of this client. */ + running: number + /** Number of active, pending, or queued requests of this client. */ + size: number +} diff --git a/node_modules/undici-types/client.d.ts b/node_modules/undici-types/client.d.ts new file mode 100644 index 0000000..e3b1219 --- /dev/null +++ b/node_modules/undici-types/client.d.ts @@ -0,0 +1,134 @@ +import { URL } from 'node:url' +import Dispatcher from './dispatcher' +import buildConnector from './connector' +import TClientStats from './client-stats' + +type ClientConnectOptions = Omit, 'origin'> + +/** + * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default. + */ +export class Client extends Dispatcher { + constructor (url: string | URL, options?: Client.Options) + /** Property to get and set the pipelining factor. */ + pipelining: number + /** `true` after `client.close()` has been called. */ + closed: boolean + /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */ + destroyed: boolean + /** Aggregate stats for a Client. */ + readonly stats: TClientStats + + // Override dispatcher APIs. + override connect ( + options: ClientConnectOptions + ): Promise> + override connect ( + options: ClientConnectOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void +} + +export declare namespace Client { + export interface Options { + /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */ + maxHeaderSize?: number; + /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */ + headersTimeout?: number; + /** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */ + socketTimeout?: never; + /** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */ + requestTimeout?: never; + /** The timeout for establishing a socket connection, in milliseconds. Use `0` to disable it entirely. Default: `10e3` milliseconds (10s). */ + connectTimeout?: number; + /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */ + bodyTimeout?: number; + /** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */ + idleTimeout?: never; + /** @deprecated unsupported keepAlive, use pipelining=0 instead */ + keepAlive?: never; + /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */ + keepAliveTimeout?: number; + /** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */ + maxKeepAliveTimeout?: never; + /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */ + keepAliveMaxTimeout?: number; + /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */ + keepAliveTimeoutThreshold?: number; + /** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */ + socketPath?: string; + /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Only enable values greater than `1` when the remote server is trusted. Default: `1`. */ + pipelining?: number; + /** @deprecated use the connect option instead */ + tls?: never; + /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */ + strictContentLength?: boolean; + /** Maximum number of TLS cached sessions used by the built-in connector. Use `0` to disable TLS session caching. Default: `100`. */ + maxCachedSessions?: number; + /** Connector options passed to `buildConnector`, or a custom connector function. Default: `null`. */ + connect?: Partial | buildConnector.connector; + /** The maximum number of requests to send over a single connection before it is reset. Use `0` to disable this limit. Default: `null`. */ + maxRequestsPerClient?: number; + /** Local IP address the socket should connect from. */ + localAddress?: string; + /** Max response body size in bytes, -1 is disabled */ + maxResponseSize?: number; + /** WebSocket-specific options */ + webSocket?: Client.WebSocketOptions; + /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */ + autoSelectFamily?: boolean; + /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */ + autoSelectFamilyAttemptTimeout?: number; + /** + * @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation. + * @default true + */ + allowH2?: boolean; + /** + * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. + * @default 100 + */ + maxConcurrentStreams?: number; + /** + * @description Sets the HTTP/2 stream-level flow-control window size (SETTINGS_INITIAL_WINDOW_SIZE). + * @default 262144 + */ + initialWindowSize?: number; + /** + * @description Sets the HTTP/2 connection-level flow-control window size (ClientHttp2Session.setLocalWindowSize). + * @default 524288 + */ + connectionWindowSize?: number; + /** + * @description Time interval between PING frames dispatch + * @default 60000 + */ + pingInterval?: number; + } + export interface SocketInfo { + localAddress?: string + localPort?: number + remoteAddress?: string + remotePort?: number + remoteFamily?: string + timeout?: number + bytesWritten?: number + bytesRead?: number + } + export interface WebSocketOptions { + /** + * Maximum number of fragments in a message. Set to 0 to disable the limit. + * @default 131072 + */ + maxFragments?: number; + /** + * Maximum allowed payload size in bytes for WebSocket messages. + * Applied to uncompressed messages, compressed frame payloads, and decompressed (permessage-deflate) messages. + * Set to 0 to disable the limit. + * @default 134217728 (128 MB) + */ + maxPayloadSize?: number; + } +} + +export default Client diff --git a/node_modules/undici-types/connector.d.ts b/node_modules/undici-types/connector.d.ts new file mode 100644 index 0000000..b089942 --- /dev/null +++ b/node_modules/undici-types/connector.d.ts @@ -0,0 +1,37 @@ +import { TLSSocket, ConnectionOptions } from 'node:tls' +import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from 'node:net' + +export default buildConnector +declare function buildConnector (options?: buildConnector.BuildOptions): buildConnector.connector + +declare namespace buildConnector { + export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & { + allowH2?: boolean; + preferH2?: boolean; + maxCachedSessions?: number | null; + socketPath?: string | null; + timeout?: number | null; + port?: number; + keepAlive?: boolean | null; + keepAliveInitialDelay?: number | null; + typeOfService?: number | null; + } + + export interface Options { + hostname: string + host?: string + protocol: string + port: string + servername?: string + localAddress?: string | null + socketPath?: string | null + httpSocket?: Socket + } + + export type Callback = (...args: CallbackArgs) => void + type CallbackArgs = [null, Socket | TLSSocket] | [Error, null] + + export interface connector { + (options: buildConnector.Options, callback: buildConnector.Callback): void + } +} diff --git a/node_modules/undici-types/content-type.d.ts b/node_modules/undici-types/content-type.d.ts new file mode 100644 index 0000000..f2a87f1 --- /dev/null +++ b/node_modules/undici-types/content-type.d.ts @@ -0,0 +1,21 @@ +/// + +interface MIMEType { + type: string + subtype: string + parameters: Map + essence: string +} + +/** + * Parse a string to a {@link MIMEType} object. Returns `failure` if the string + * couldn't be parsed. + * @see https://mimesniff.spec.whatwg.org/#parse-a-mime-type + */ +export function parseMIMEType (input: string): 'failure' | MIMEType + +/** + * Convert a MIMEType object to a string. + * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type + */ +export function serializeAMimeType (mimeType: MIMEType): string diff --git a/node_modules/undici-types/cookies.d.ts b/node_modules/undici-types/cookies.d.ts new file mode 100644 index 0000000..d8dc1f6 --- /dev/null +++ b/node_modules/undici-types/cookies.d.ts @@ -0,0 +1,30 @@ +/// + +import type { Headers } from './fetch' + +export interface Cookie { + name: string + value: string + expires?: Date | number + maxAge?: number + domain?: string + path?: string + secure?: boolean + httpOnly?: boolean + sameSite?: 'Strict' | 'Lax' | 'None' + unparsed?: string[] +} + +export function deleteCookie ( + headers: Headers, + name: string, + attributes?: { path?: string, domain?: string } +): void + +export function getCookies (headers: Headers): Record + +export function getSetCookies (headers: Headers): Cookie[] + +export function setCookie (headers: Headers, cookie: Cookie): void + +export function parseCookie (cookie: string): Cookie | null diff --git a/node_modules/undici-types/diagnostics-channel.d.ts b/node_modules/undici-types/diagnostics-channel.d.ts new file mode 100644 index 0000000..3c6a529 --- /dev/null +++ b/node_modules/undici-types/diagnostics-channel.d.ts @@ -0,0 +1,74 @@ +import { Socket } from 'node:net' +import { URL } from 'node:url' +import buildConnector from './connector' +import Dispatcher from './dispatcher' + +declare namespace DiagnosticsChannel { + interface Request { + origin?: string | URL; + completed: boolean; + method?: Dispatcher.HttpMethod; + path: string; + headers: any; + } + interface Response { + statusCode: number; + statusText: string; + headers: Array; + } + interface ConnectParams { + host: URL['host']; + hostname: URL['hostname']; + protocol: URL['protocol']; + port: URL['port']; + servername: string | null; + } + type Connector = buildConnector.connector + export interface RequestCreateMessage { + request: Request; + } + export interface RequestBodySentMessage { + request: Request; + } + + export interface RequestBodyChunkSentMessage { + request: Request; + chunk: Uint8Array | string; + } + export interface RequestBodyChunkReceivedMessage { + request: Request; + chunk: Buffer; + } + export interface RequestHeadersMessage { + request: Request; + response: Response; + } + export interface RequestTrailersMessage { + request: Request; + trailers: Array; + } + export interface RequestErrorMessage { + request: Request; + error: Error; + } + export interface ClientSendHeadersMessage { + request: Request; + headers: string; + socket: Socket; + } + export interface ClientBeforeConnectMessage { + connectParams: ConnectParams; + connector: Connector; + } + export interface ClientConnectedMessage { + socket: Socket; + connectParams: ConnectParams; + connector: Connector; + } + export interface ClientConnectErrorMessage { + error: Error; + socket: Socket; + connectParams: ConnectParams; + connector: Connector; + } +} diff --git a/node_modules/undici-types/dispatcher.d.ts b/node_modules/undici-types/dispatcher.d.ts new file mode 100644 index 0000000..1c2e335 --- /dev/null +++ b/node_modules/undici-types/dispatcher.d.ts @@ -0,0 +1,253 @@ +import { URL } from 'node:url' +import { Duplex, Readable, Writable } from 'node:stream' +import { EventEmitter } from 'node:events' +import { Blob } from 'node:buffer' +import { IncomingHttpHeaders, OutgoingHttpHeaders } from './header' +import BodyReadable from './readable' +import { FormData } from './formdata' +import Errors from './errors' +import { Autocomplete } from './utility' + +export default Dispatcher + +export type UndiciHeaders = OutgoingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null + +/** Dispatcher is the core API used to dispatch requests. */ +declare class Dispatcher extends EventEmitter { + /** Dispatches a request. This API is expected to evolve through semver-major versions and is less stable than the preceding higher level APIs. It is primarily intended for library developers who implement higher level APIs on top of this. */ + dispatch (options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean + /** Starts two-way communications with the requested resource. */ + connect(options: Dispatcher.ConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void + connect(options: Dispatcher.ConnectOptions): Promise> + /** Compose a chain of dispatchers */ + compose (dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher + compose (...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher + /** Performs an HTTP request. */ + request(options: Dispatcher.RequestOptions, callback: (err: Error | null, data: Dispatcher.ResponseData) => void): void + request(options: Dispatcher.RequestOptions): Promise> + /** For easy use with `stream.pipeline`. */ + pipeline(options: Dispatcher.PipelineOptions, handler: Dispatcher.PipelineHandler): Duplex + /** A faster version of `Dispatcher.request`. */ + stream(options: Dispatcher.RequestOptions, factory: Dispatcher.StreamFactory, callback: (err: Error | null, data: Dispatcher.StreamData) => void): void + stream(options: Dispatcher.RequestOptions, factory: Dispatcher.StreamFactory): Promise> + /** Upgrade to a different protocol. */ + upgrade (options: Dispatcher.UpgradeOptions, callback: (err: Error | null, data: Dispatcher.UpgradeData) => void): void + upgrade (options: Dispatcher.UpgradeOptions): Promise + /** Closes the client and gracefully waits for enqueued requests to complete before invoking the callback (or returning a promise if no callback is provided). */ + close (callback: () => void): void + close (): Promise + /** Destroy the client abruptly with the given err. All the pending and running requests will be asynchronously aborted and error. Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided). Since this operation is asynchronously dispatched there might still be some progress on dispatched requests. */ + destroy (err: Error | null, callback: () => void): void + destroy (callback: () => void): void + destroy (err: Error | null): Promise + destroy (): Promise + + on (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + on (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + on (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + on (eventName: 'drain', callback: (origin: URL) => void): this + + once (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + once (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + once (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + once (eventName: 'drain', callback: (origin: URL) => void): this + + off (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + off (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + off (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + off (eventName: 'drain', callback: (origin: URL) => void): this + + addListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + addListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + addListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + addListener (eventName: 'drain', callback: (origin: URL) => void): this + + removeListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + removeListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + removeListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + removeListener (eventName: 'drain', callback: (origin: URL) => void): this + + prependListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + prependListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + prependListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + prependListener (eventName: 'drain', callback: (origin: URL) => void): this + + prependOnceListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + prependOnceListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + prependOnceListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + prependOnceListener (eventName: 'drain', callback: (origin: URL) => void): this + + listeners (eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[] + listeners (eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] + listeners (eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] + listeners (eventName: 'drain'): ((origin: URL) => void)[] + + rawListeners (eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[] + rawListeners (eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] + rawListeners (eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] + rawListeners (eventName: 'drain'): ((origin: URL) => void)[] + + emit (eventName: 'connect', origin: URL, targets: readonly Dispatcher[]): boolean + emit (eventName: 'disconnect', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean + emit (eventName: 'connectionError', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean + emit (eventName: 'drain', origin: URL): boolean +} + +declare namespace Dispatcher { + export interface ComposedDispatcher extends Dispatcher { } + export type Dispatch = Dispatcher['dispatch'] + export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch + export interface DispatchOptions { + origin?: string | URL; + path: string; + method: HttpMethod; + /** Default: `null` */ + body?: string | Buffer | Uint8Array | Readable | null | FormData; + /** Default: `null` */ + headers?: UndiciHeaders; + /** Query string params to be embedded in the request URL. Default: `null` */ + query?: Record; + /** Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline have completed. Default: `true` if `method` is `HEAD` or `GET`. */ + idempotent?: boolean; + /** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. Defaults to `method !== 'HEAD'`. */ + blocking?: boolean; + /** The IP Type of Service (ToS) value for the request socket. Must be an integer between 0 and 255. */ + typeOfService?: number | null; + /** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */ + upgrade?: boolean | string | null; + /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */ + headersTimeout?: number | null; + /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 300 seconds. HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */ + bodyTimeout?: number | null; + /** Whether the request should stablish a keep-alive or not. Default `false` */ + reset?: boolean; + /** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server */ + expectContinue?: boolean; + } + export interface ConnectOptions { + origin: string | URL; + path: string; + /** Default: `null` */ + headers?: UndiciHeaders; + /** Default: `null` */ + signal?: AbortSignal | EventEmitter | null; + /** This argument parameter is passed through to `ConnectData` */ + opaque?: TOpaque; + /** Default: `null` */ + responseHeaders?: 'raw' | null; + } + export interface RequestOptions extends DispatchOptions { + /** Default: `null` */ + opaque?: TOpaque; + /** Default: `null` */ + signal?: AbortSignal | EventEmitter | null; + /** Default: `null` */ + onInfo?: (info: { statusCode: number, headers: Record }) => void; + /** Default: `null` */ + responseHeaders?: 'raw' | null; + /** Default: `64 KiB` */ + highWaterMark?: number; + } + export interface PipelineOptions extends RequestOptions { + /** `true` if the `handler` will return an object stream. Default: `false` */ + objectMode?: boolean; + } + export interface UpgradeOptions { + path: string; + /** Default: `'GET'` */ + method?: string; + /** Default: `null` */ + headers?: UndiciHeaders; + /** A string of comma separated protocols, in descending preference order. Default: `'Websocket'` */ + protocol?: string; + /** Default: `null` */ + signal?: AbortSignal | EventEmitter | null; + /** Default: `null` */ + responseHeaders?: 'raw' | null; + } + export interface ConnectData { + statusCode: number; + headers: IncomingHttpHeaders; + socket: Duplex; + opaque: TOpaque; + } + export interface ResponseData { + statusCode: number; + statusText: string; + headers: IncomingHttpHeaders; + body: BodyReadable & BodyMixin; + trailers: Record; + opaque: TOpaque; + context: object; + } + export interface PipelineHandlerData { + statusCode: number; + headers: IncomingHttpHeaders; + opaque: TOpaque; + body: BodyReadable; + context: object; + } + export interface StreamData { + opaque: TOpaque; + trailers: Record; + } + export interface UpgradeData { + headers: IncomingHttpHeaders; + socket: Duplex; + opaque: TOpaque; + } + export interface StreamFactoryData { + statusCode: number; + headers: IncomingHttpHeaders; + opaque: TOpaque; + context: object; + } + export type StreamFactory = (data: StreamFactoryData) => Writable + + export interface DispatchController { + get aborted(): boolean + get paused(): boolean + get reason(): Error | null + rawHeaders?: Buffer[] | string[] | IncomingHttpHeaders | null + rawTrailers?: Buffer[] | string[] | IncomingHttpHeaders | null + abort(reason: Error): void + pause(): void + resume(): void + } + + export interface DispatchHandler { + onRequestStart?(controller: DispatchController, context: any): void; + onRequestUpgrade?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, socket: Duplex): void; + onResponseStart?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, statusMessage?: string): void; + onResponseData?(controller: DispatchController, chunk: Buffer): void; + onResponseEnd?(controller: DispatchController, trailers: IncomingHttpHeaders): void; + onResponseError?(controller: DispatchController, error: Error): void; + + /** Invoked when response is received, before headers have been read. **/ + onResponseStarted?(): void; + /** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */ + onBodySent?(chunk: Buffer): void; + /** Invoked after the request body is fully sent. */ + onRequestSent?(): void; + } + export type PipelineHandler = (data: PipelineHandlerData) => Readable + export type HttpMethod = Autocomplete<'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'> + + /** + * @link https://fetch.spec.whatwg.org/#body-mixin + */ + interface BodyMixin { + readonly body?: never; + readonly bodyUsed: boolean; + arrayBuffer(): Promise; + blob(): Promise; + bytes(): Promise; + formData(): Promise; + json(): Promise; + text(): Promise; + } + + export interface DispatchInterceptor { + (dispatch: Dispatch): Dispatch + } +} diff --git a/node_modules/undici-types/dispatcher1-wrapper.d.ts b/node_modules/undici-types/dispatcher1-wrapper.d.ts new file mode 100644 index 0000000..f8a7d5e --- /dev/null +++ b/node_modules/undici-types/dispatcher1-wrapper.d.ts @@ -0,0 +1,7 @@ +import Dispatcher from './dispatcher' + +export default Dispatcher1Wrapper + +declare class Dispatcher1Wrapper extends Dispatcher { + constructor (dispatcher: Dispatcher) +} diff --git a/node_modules/undici-types/env-http-proxy-agent.d.ts b/node_modules/undici-types/env-http-proxy-agent.d.ts new file mode 100644 index 0000000..1733d7f --- /dev/null +++ b/node_modules/undici-types/env-http-proxy-agent.d.ts @@ -0,0 +1,22 @@ +import Agent from './agent' +import ProxyAgent from './proxy-agent' +import Dispatcher from './dispatcher' + +export default EnvHttpProxyAgent + +declare class EnvHttpProxyAgent extends Dispatcher { + constructor (opts?: EnvHttpProxyAgent.Options) + + dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean +} + +declare namespace EnvHttpProxyAgent { + export interface Options extends Omit { + /** Overrides the value of the HTTP_PROXY environment variable */ + httpProxy?: string; + /** Overrides the value of the HTTPS_PROXY environment variable */ + httpsProxy?: string; + /** Overrides the value of the NO_PROXY environment variable */ + noProxy?: string; + } +} diff --git a/node_modules/undici-types/errors.d.ts b/node_modules/undici-types/errors.d.ts new file mode 100644 index 0000000..7155b9c --- /dev/null +++ b/node_modules/undici-types/errors.d.ts @@ -0,0 +1,187 @@ +import { IncomingHttpHeaders } from './header' +import Client from './client' + +export default Errors + +declare namespace Errors { + export class UndiciError extends Error { + name: string + code: string + } + + /** Connect timeout error. */ + export class ConnectTimeoutError extends UndiciError { + name: 'ConnectTimeoutError' + code: 'UND_ERR_CONNECT_TIMEOUT' + } + + /** A header exceeds the `headersTimeout` option. */ + export class HeadersTimeoutError extends UndiciError { + name: 'HeadersTimeoutError' + code: 'UND_ERR_HEADERS_TIMEOUT' + } + + /** Headers overflow error. */ + export class HeadersOverflowError extends UndiciError { + name: 'HeadersOverflowError' + code: 'UND_ERR_HEADERS_OVERFLOW' + } + + /** A body exceeds the `bodyTimeout` option. */ + export class BodyTimeoutError extends UndiciError { + name: 'BodyTimeoutError' + code: 'UND_ERR_BODY_TIMEOUT' + } + + export class ResponseError extends UndiciError { + constructor ( + message: string, + code: number, + options: { + headers?: IncomingHttpHeaders | string[] | null, + body?: null | Record | string + } + ) + name: 'ResponseError' + code: 'UND_ERR_RESPONSE' + statusCode: number + body: null | Record | string + headers: IncomingHttpHeaders | string[] | null + } + + /** Passed an invalid argument. */ + export class InvalidArgumentError extends UndiciError { + name: 'InvalidArgumentError' + code: 'UND_ERR_INVALID_ARG' + } + + /** Returned an invalid value. */ + export class InvalidReturnValueError extends UndiciError { + name: 'InvalidReturnValueError' + code: 'UND_ERR_INVALID_RETURN_VALUE' + } + + /** The request has been aborted by the user. */ + export class RequestAbortedError extends UndiciError { + name: 'AbortError' + code: 'UND_ERR_ABORTED' + } + + /** Expected error with reason. */ + export class InformationalError extends UndiciError { + name: 'InformationalError' + code: 'UND_ERR_INFO' + } + + /** Request body length does not match content-length header. */ + export class RequestContentLengthMismatchError extends UndiciError { + name: 'RequestContentLengthMismatchError' + code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' + } + + /** Response body length does not match content-length header. */ + export class ResponseContentLengthMismatchError extends UndiciError { + name: 'ResponseContentLengthMismatchError' + code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' + } + + /** Trying to use a destroyed client. */ + export class ClientDestroyedError extends UndiciError { + name: 'ClientDestroyedError' + code: 'UND_ERR_DESTROYED' + } + + /** Trying to use a closed client. */ + export class ClientClosedError extends UndiciError { + name: 'ClientClosedError' + code: 'UND_ERR_CLOSED' + } + + /** There is an error with the socket. */ + export class SocketError extends UndiciError { + name: 'SocketError' + code: 'UND_ERR_SOCKET' + socket: Client.SocketInfo | null + } + + /** Encountered unsupported functionality. */ + export class NotSupportedError extends UndiciError { + name: 'NotSupportedError' + code: 'UND_ERR_NOT_SUPPORTED' + } + + /** No upstream has been added to the BalancedPool. */ + export class BalancedPoolMissingUpstreamError extends UndiciError { + name: 'MissingUpstreamError' + code: 'UND_ERR_BPL_MISSING_UPSTREAM' + } + + export class HTTPParserError extends UndiciError { + name: 'HTTPParserError' + code: string + } + + /** The response exceed the length allowed. */ + export class ResponseExceededMaxSizeError extends UndiciError { + name: 'ResponseExceededMaxSizeError' + code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE' + } + + export class RequestRetryError extends UndiciError { + constructor ( + message: string, + statusCode: number, + headers?: IncomingHttpHeaders | string[] | null, + body?: null | Record | string + ) + name: 'RequestRetryError' + code: 'UND_ERR_REQ_RETRY' + statusCode: number + data: { + count: number; + } + + headers: Record + } + + export class SecureProxyConnectionError extends UndiciError { + constructor ( + cause?: Error, + message?: string, + options?: Record + ) + name: 'SecureProxyConnectionError' + code: 'UND_ERR_PRX_TLS' + } + + export class ProxyConnectionError extends UndiciError { + constructor ( + cause?: Error, + message?: string, + options?: Record + ) + name: 'ProxyConnectionError' + code: 'UND_ERR_PRX_CONN' + } + + export class MaxOriginsReachedError extends UndiciError { + name: 'MaxOriginsReachedError' + code: 'UND_ERR_MAX_ORIGINS_REACHED' + } + + /** SOCKS5 proxy related error. */ + export class Socks5ProxyError extends UndiciError { + constructor ( + message?: string, + code?: string + ) + name: 'Socks5ProxyError' + code: string + } + + /** WebSocket decompressed message exceeded maximum size. */ + export class MessageSizeExceededError extends UndiciError { + name: 'MessageSizeExceededError' + code: 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED' + } +} diff --git a/node_modules/undici-types/eventsource.d.ts b/node_modules/undici-types/eventsource.d.ts new file mode 100644 index 0000000..081ca09 --- /dev/null +++ b/node_modules/undici-types/eventsource.d.ts @@ -0,0 +1,66 @@ +import { MessageEvent, ErrorEvent } from './websocket' +import Dispatcher from './dispatcher' + +import { + EventListenerOptions, + AddEventListenerOptions, + EventListenerOrEventListenerObject +} from './patch' + +interface EventSourceEventMap { + error: ErrorEvent + message: MessageEvent + open: Event +} + +interface EventSource extends EventTarget { + close(): void + readonly CLOSED: 2 + readonly CONNECTING: 0 + readonly OPEN: 1 + onerror: ((this: EventSource, ev: ErrorEvent) => any) | null + onmessage: ((this: EventSource, ev: MessageEvent) => any) | null + onopen: ((this: EventSource, ev: Event) => any) | null + readonly readyState: 0 | 1 | 2 + readonly url: string + readonly withCredentials: boolean + + addEventListener( + type: K, + listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, + options?: boolean | AddEventListenerOptions + ): void + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions + ): void + removeEventListener( + type: K, + listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, + options?: boolean | EventListenerOptions + ): void + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions + ): void +} + +export declare const EventSource: { + prototype: EventSource + new (url: string | URL, init?: EventSourceInit): EventSource + readonly CLOSED: 2 + readonly CONNECTING: 0 + readonly OPEN: 1 +} + +interface EventSourceInit { + withCredentials?: boolean + // @deprecated use `node.dispatcher` instead + dispatcher?: Dispatcher + node?: { + dispatcher?: Dispatcher + reconnectionTime?: number + } +} diff --git a/node_modules/undici-types/fetch.d.ts b/node_modules/undici-types/fetch.d.ts new file mode 100644 index 0000000..df9218a --- /dev/null +++ b/node_modules/undici-types/fetch.d.ts @@ -0,0 +1,235 @@ +// based on https://github.com/Ethan-Arrowood/undici-fetch/blob/249269714db874351589d2d364a0645d5160ae71/index.d.ts (MIT license) +// and https://github.com/node-fetch/node-fetch/blob/914ce6be5ec67a8bab63d68510aabf07cb818b6d/index.d.ts (MIT license) +/// + +import { Blob } from 'node:buffer' +import { URL, URLSearchParams } from 'node:url' +import { ReadableStream } from 'node:stream/web' +import { FormData } from './formdata' +import { HeaderRecord } from './header' +import Dispatcher from './dispatcher' + +export type RequestInfo = string | URL | Request + +export declare function fetch ( + input: RequestInfo, + init?: RequestInit +): Promise + +export type BodyInit = + | ArrayBuffer + | AsyncIterable + | Blob + | FormData + | Iterable + | NodeJS.ArrayBufferView + | URLSearchParams + | null + | string + +export class BodyMixin { + readonly body: ReadableStream | null + readonly bodyUsed: boolean + + readonly arrayBuffer: () => Promise + readonly blob: () => Promise + readonly bytes: () => Promise + /** + * @deprecated This method is not recommended for parsing multipart/form-data bodies in server environments. + * Calling body.formData() buffers and parses the entire body. Since this is dictated by the spec, + * this method must only be called on responses from trusted servers. + * For responses from untrusted or user-controlled servers, use a dedicated streaming parser such as + * [@fastify/busboy](https://www.npmjs.com/package/@fastify/busboy) and apply application-specific limits as follows: + * + * @example + * ```js + * import { Busboy } from '@fastify/busboy' + * import { Readable } from 'node:stream' + * + * const response = await fetch('...') + * const busboy = new Busboy({ headers: { 'content-type': response.headers.get('content-type') } }) + * + * // handle events emitted from `busboy` + * + * Readable.fromWeb(response.body).pipe(busboy) + * ``` + */ + readonly formData: () => Promise + readonly json: () => Promise + readonly text: () => Promise + readonly textStream: () => ReadableStream +} + +export interface SpecIterator { + next(...args: [] | [TNext]): IteratorResult; +} + +export interface SpecIteratorObject extends SpecIterator { + [Symbol.iterator](): SpecIteratorObject; + map(callbackfn: (value: T, index: number) => U): SpecIteratorObject; + filter(predicate: (value: T, index: number) => value is S): SpecIteratorObject; + filter(predicate: (value: T, index: number) => unknown): SpecIteratorObject; + take(limit: number): SpecIteratorObject; + drop(count: number): SpecIteratorObject; + flatMap(callbackfn: (value: T, index: number) => Iterator | Iterable): SpecIteratorObject; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => U, initialValue: U): U; + toArray(): T[]; + forEach(callbackfn: (value: T, index: number) => void): void; + some(predicate: (value: T, index: number) => unknown): boolean; + every(predicate: (value: T, index: number) => unknown): boolean; + find(predicate: (value: T, index: number) => value is S): S | undefined; + find(predicate: (value: T, index: number) => unknown): T | undefined; + readonly [Symbol.toStringTag]: string; +} + +export interface SpecIterableIterator extends SpecIteratorObject { + [Symbol.iterator](): SpecIterableIterator; +} + +export interface SpecIterable { + [Symbol.iterator](): SpecIterableIterator; +} + +export type HeadersInit = [string, string][] | HeaderRecord | Headers + +export declare class Headers implements SpecIterable<[string, string]> { + constructor (init?: HeadersInit) + readonly append: (name: string, value: string) => void + readonly delete: (name: string) => void + readonly get: (name: string) => string | null + readonly has: (name: string) => boolean + readonly set: (name: string, value: string) => void + readonly getSetCookie: () => string[] + readonly forEach: ( + callbackfn: (value: string, key: string, iterable: Headers) => void, + thisArg?: unknown + ) => void + + readonly keys: () => SpecIterableIterator + readonly values: () => SpecIterableIterator + readonly entries: () => SpecIterableIterator<[string, string]> + readonly [Symbol.iterator]: () => SpecIterableIterator<[string, string]> +} + +export type RequestCache = + | 'default' + | 'force-cache' + | 'no-cache' + | 'no-store' + | 'only-if-cached' + | 'reload' + +export type RequestCredentials = 'omit' | 'include' | 'same-origin' + +type RequestDestination = + | '' + | 'audio' + | 'audioworklet' + | 'document' + | 'embed' + | 'font' + | 'image' + | 'manifest' + | 'object' + | 'paintworklet' + | 'report' + | 'script' + | 'sharedworker' + | 'style' + | 'track' + | 'video' + | 'worker' + | 'xslt' + +export interface RequestInit { + body?: BodyInit | null + cache?: RequestCache + credentials?: RequestCredentials + dispatcher?: Dispatcher + duplex?: RequestDuplex + headers?: HeadersInit + integrity?: string + keepalive?: boolean + method?: string + mode?: RequestMode + redirect?: RequestRedirect + referrer?: string + referrerPolicy?: ReferrerPolicy + signal?: AbortSignal | null + window?: null +} + +export type ReferrerPolicy = + | '' + | 'no-referrer' + | 'no-referrer-when-downgrade' + | 'origin' + | 'origin-when-cross-origin' + | 'same-origin' + | 'strict-origin' + | 'strict-origin-when-cross-origin' + | 'unsafe-url' + +export type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin' + +export type RequestRedirect = 'error' | 'follow' | 'manual' + +export type RequestDuplex = 'half' + +export declare class Request extends BodyMixin { + constructor (input: RequestInfo, init?: RequestInit) + + readonly cache: RequestCache + readonly credentials: RequestCredentials + readonly destination: RequestDestination + readonly headers: Headers + readonly integrity: string + readonly method: string + readonly mode: RequestMode + readonly redirect: RequestRedirect + readonly referrer: string + readonly referrerPolicy: ReferrerPolicy + readonly url: string + + readonly keepalive: boolean + readonly signal: AbortSignal + readonly duplex: RequestDuplex + + public clone (): Request +} + +export interface ResponseInit { + readonly status?: number + readonly statusText?: string + readonly headers?: HeadersInit +} + +export type ResponseType = + | 'basic' + | 'cors' + | 'default' + | 'error' + | 'opaque' + | 'opaqueredirect' + +export type ResponseRedirectStatus = 301 | 302 | 303 | 307 | 308 + +export declare class Response extends BodyMixin { + constructor (body?: BodyInit, init?: ResponseInit) + + readonly headers: Headers + readonly ok: boolean + readonly status: number + readonly statusText: string + readonly type: ResponseType + readonly url: string + readonly redirected: boolean + + public clone (): Response + + static error (): Response + static json (data: any, init?: ResponseInit): Response + static redirect (url: string | URL, status?: ResponseRedirectStatus): Response +} diff --git a/node_modules/undici-types/formdata.d.ts b/node_modules/undici-types/formdata.d.ts new file mode 100644 index 0000000..b9819a7 --- /dev/null +++ b/node_modules/undici-types/formdata.d.ts @@ -0,0 +1,108 @@ +// Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/FormData.ts (MIT) +/// + +import { File } from 'node:buffer' +import { SpecIterableIterator } from './fetch' + +/** + * A `string` or `File` that represents a single value from a set of `FormData` key-value pairs. + */ +declare type FormDataEntryValue = string | File + +/** + * Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch(). + */ +export declare class FormData { + /** + * Appends a new value onto an existing key inside a FormData object, + * or adds the key if it does not already exist. + * + * The difference between `set()` and `append()` is that if the specified key already exists, `set()` will overwrite all existing values with the new one, whereas `append()` will append the new value onto the end of the existing set of values. + * + * @param name The name of the field whose data is contained in `value`. + * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) + or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string. + * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename. + */ + append (name: string, value: unknown, fileName?: string): void + + /** + * Set a new value for an existing key inside FormData, + * or add the new field if it does not already exist. + * + * @param name The name of the field whose data is contained in `value`. + * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) + or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string. + * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename. + * + */ + set (name: string, value: unknown, fileName?: string): void + + /** + * Returns the first value associated with a given key from within a `FormData` object. + * If you expect multiple values and want all of them, use the `getAll()` method instead. + * + * @param {string} name A name of the value you want to retrieve. + * + * @returns A `FormDataEntryValue` containing the value. If the key doesn't exist, the method returns null. + */ + get (name: string): FormDataEntryValue | null + + /** + * Returns all the values associated with a given key from within a `FormData` object. + * + * @param {string} name A name of the value you want to retrieve. + * + * @returns An array of `FormDataEntryValue` whose key matches the value passed in the `name` parameter. If the key doesn't exist, the method returns an empty list. + */ + getAll (name: string): FormDataEntryValue[] + + /** + * Returns a boolean stating whether a `FormData` object contains a certain key. + * + * @param name A string representing the name of the key you want to test for. + * + * @return A boolean value. + */ + has (name: string): boolean + + /** + * Deletes a key and its value(s) from a `FormData` object. + * + * @param name The name of the key you want to delete. + */ + delete (name: string): void + + /** + * Executes given callback function for each field of the FormData instance + */ + forEach: ( + callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData) => void, + thisArg?: unknown + ) => void + + /** + * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all keys contained in this `FormData` object. + * Each key is a `string`. + */ + keys: () => SpecIterableIterator + + /** + * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all values contained in this object `FormData` object. + * Each value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue). + */ + values: () => SpecIterableIterator + + /** + * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through the `FormData` key/value pairs. + * The key of each pair is a string; the value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue). + */ + entries: () => SpecIterableIterator<[string, FormDataEntryValue]> + + /** + * An alias for FormData#entries() + */ + [Symbol.iterator]: () => SpecIterableIterator<[string, FormDataEntryValue]> + + readonly [Symbol.toStringTag]: string +} diff --git a/node_modules/undici-types/global-dispatcher.d.ts b/node_modules/undici-types/global-dispatcher.d.ts new file mode 100644 index 0000000..2760e13 --- /dev/null +++ b/node_modules/undici-types/global-dispatcher.d.ts @@ -0,0 +1,9 @@ +import Dispatcher from './dispatcher' + +declare function setGlobalDispatcher (dispatcher: DispatcherImplementation): void +declare function getGlobalDispatcher (): Dispatcher + +export { + getGlobalDispatcher, + setGlobalDispatcher +} diff --git a/node_modules/undici-types/global-origin.d.ts b/node_modules/undici-types/global-origin.d.ts new file mode 100644 index 0000000..265769b --- /dev/null +++ b/node_modules/undici-types/global-origin.d.ts @@ -0,0 +1,7 @@ +declare function setGlobalOrigin (origin: string | URL | undefined): void +declare function getGlobalOrigin (): URL | undefined + +export { + setGlobalOrigin, + getGlobalOrigin +} diff --git a/node_modules/undici-types/h2c-client.d.ts b/node_modules/undici-types/h2c-client.d.ts new file mode 100644 index 0000000..b921a34 --- /dev/null +++ b/node_modules/undici-types/h2c-client.d.ts @@ -0,0 +1,73 @@ +import { URL } from 'node:url' +import Dispatcher from './dispatcher' +import buildConnector from './connector' + +type H2ClientOptions = Omit + +/** + * A basic H2C client, mapped on top a single TCP connection. Pipelining is disabled by default. + */ +export class H2CClient extends Dispatcher { + constructor (url: string | URL, options?: H2CClient.Options) + /** Property to get and set the pipelining factor. */ + pipelining: number + /** `true` after `client.close()` has been called. */ + closed: boolean + /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */ + destroyed: boolean + + // Override dispatcher APIs. + override connect ( + options: H2ClientOptions + ): Promise + override connect ( + options: H2ClientOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void +} + +export declare namespace H2CClient { + export interface Options { + /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */ + maxHeaderSize?: number; + /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */ + headersTimeout?: number; + /** The timeout for establishing a socket connection, in milliseconds. Use `0` to disable it entirely. Default: `10e3` milliseconds (10s). */ + connectTimeout?: number; + /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */ + bodyTimeout?: number; + /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */ + keepAliveTimeout?: number; + /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */ + keepAliveMaxTimeout?: number; + /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */ + keepAliveTimeoutThreshold?: number; + /** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */ + socketPath?: string; + /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */ + pipelining?: number; + /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */ + strictContentLength?: boolean; + /** Maximum number of TLS cached sessions used by the built-in connector. Use `0` to disable TLS session caching. Default: `100`. */ + maxCachedSessions?: number; + /** Connector options passed to `buildConnector`, or a custom connector function. Default: `null`. */ + connect?: Omit, 'allowH2'> | buildConnector.connector; + /** The maximum number of requests to send over a single connection before it is reset. Use `0` to disable this limit. Default: `null`. */ + maxRequestsPerClient?: number; + /** Local IP address the socket should connect from. */ + localAddress?: string; + /** Max response body size in bytes, -1 is disabled */ + maxResponseSize?: number; + /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */ + autoSelectFamily?: boolean; + /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */ + autoSelectFamilyAttemptTimeout?: number; + /** + * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. + * @default 100 + */ + maxConcurrentStreams?: number + } +} + +export default H2CClient diff --git a/node_modules/undici-types/handlers.d.ts b/node_modules/undici-types/handlers.d.ts new file mode 100644 index 0000000..343526b --- /dev/null +++ b/node_modules/undici-types/handlers.d.ts @@ -0,0 +1,16 @@ +import Dispatcher from './dispatcher' + +export declare class RedirectHandler implements Dispatcher.DispatchHandler { + static buildDispatch (dispatcher: Dispatcher, maxRedirections: number): Dispatcher.Dispatch + + constructor ( + dispatch: Dispatcher.Dispatch, + maxRedirections: number, + opts: Dispatcher.DispatchOptions, + handler: Dispatcher.DispatchHandler + ) +} + +export declare class DecoratorHandler implements Dispatcher.DispatchHandler { + constructor (handler: Dispatcher.DispatchHandler) +} diff --git a/node_modules/undici-types/header.d.ts b/node_modules/undici-types/header.d.ts new file mode 100644 index 0000000..17e7252 --- /dev/null +++ b/node_modules/undici-types/header.d.ts @@ -0,0 +1,165 @@ +import { Autocomplete } from './utility' + +/** + * The header type declaration of `undici`. + */ +export type IncomingHttpHeaders = Record + +/** + * The header type declaration of `undici` for outgoing requests. + */ +export type OutgoingHttpHeaders = Record + +type HeaderNames = Autocomplete< + | 'Accept' + | 'Accept-CH' + | 'Accept-Charset' + | 'Accept-Encoding' + | 'Accept-Language' + | 'Accept-Patch' + | 'Accept-Post' + | 'Accept-Ranges' + | 'Access-Control-Allow-Credentials' + | 'Access-Control-Allow-Headers' + | 'Access-Control-Allow-Methods' + | 'Access-Control-Allow-Origin' + | 'Access-Control-Expose-Headers' + | 'Access-Control-Max-Age' + | 'Access-Control-Request-Headers' + | 'Access-Control-Request-Method' + | 'Age' + | 'Allow' + | 'Alt-Svc' + | 'Alt-Used' + | 'Authorization' + | 'Cache-Control' + | 'Clear-Site-Data' + | 'Connection' + | 'Content-Disposition' + | 'Content-Encoding' + | 'Content-Language' + | 'Content-Length' + | 'Content-Location' + | 'Content-Range' + | 'Content-Security-Policy' + | 'Content-Security-Policy-Report-Only' + | 'Content-Type' + | 'Cookie' + | 'Cross-Origin-Embedder-Policy' + | 'Cross-Origin-Opener-Policy' + | 'Cross-Origin-Resource-Policy' + | 'Date' + | 'Device-Memory' + | 'ETag' + | 'Expect' + | 'Expect-CT' + | 'Expires' + | 'Forwarded' + | 'From' + | 'Host' + | 'If-Match' + | 'If-Modified-Since' + | 'If-None-Match' + | 'If-Range' + | 'If-Unmodified-Since' + | 'Keep-Alive' + | 'Last-Modified' + | 'Link' + | 'Location' + | 'Max-Forwards' + | 'Origin' + | 'Permissions-Policy' + | 'Priority' + | 'Proxy-Authenticate' + | 'Proxy-Authorization' + | 'Range' + | 'Referer' + | 'Referrer-Policy' + | 'Retry-After' + | 'Sec-Fetch-Dest' + | 'Sec-Fetch-Mode' + | 'Sec-Fetch-Site' + | 'Sec-Fetch-User' + | 'Sec-Purpose' + | 'Sec-WebSocket-Accept' + | 'Server' + | 'Server-Timing' + | 'Service-Worker-Navigation-Preload' + | 'Set-Cookie' + | 'SourceMap' + | 'Strict-Transport-Security' + | 'TE' + | 'Timing-Allow-Origin' + | 'Trailer' + | 'Transfer-Encoding' + | 'Upgrade' + | 'Upgrade-Insecure-Requests' + | 'User-Agent' + | 'Vary' + | 'Via' + | 'WWW-Authenticate' + | 'X-Content-Type-Options' + | 'X-Frame-Options' +> + +type IANARegisteredMimeType = Autocomplete< + | 'audio/aac' + | 'video/x-msvideo' + | 'image/avif' + | 'video/av1' + | 'application/octet-stream' + | 'image/bmp' + | 'text/css' + | 'text/csv' + | 'application/vnd.ms-fontobject' + | 'application/epub+zip' + | 'image/gif' + | 'application/gzip' + | 'text/html' + | 'image/x-icon' + | 'text/calendar' + | 'image/jpeg' + | 'text/javascript' + | 'application/json' + | 'application/ld+json' + | 'audio/x-midi' + | 'audio/mpeg' + | 'video/mp4' + | 'video/mpeg' + | 'audio/ogg' + | 'video/ogg' + | 'application/ogg' + | 'audio/opus' + | 'font/otf' + | 'application/pdf' + | 'image/png' + | 'application/rtf' + | 'image/svg+xml' + | 'image/tiff' + | 'video/mp2t' + | 'font/ttf' + | 'text/plain' + | 'application/wasm' + | 'video/webm' + | 'audio/webm' + | 'image/webp' + | 'font/woff' + | 'font/woff2' + | 'application/xhtml+xml' + | 'application/xml' + | 'application/zip' + | 'video/3gpp' + | 'video/3gpp2' + | 'model/gltf+json' + | 'model/gltf-binary' +> + +type KnownHeaderValues = { + 'content-type': IANARegisteredMimeType +} + +export type HeaderRecord = { + [K in HeaderNames | Lowercase]?: Lowercase extends keyof KnownHeaderValues + ? KnownHeaderValues[Lowercase] + : string +} diff --git a/node_modules/undici-types/index.d.ts b/node_modules/undici-types/index.d.ts new file mode 100644 index 0000000..891358f --- /dev/null +++ b/node_modules/undici-types/index.d.ts @@ -0,0 +1,93 @@ +import Dispatcher from './dispatcher' +import { setGlobalDispatcher, getGlobalDispatcher } from './global-dispatcher' +import { setGlobalOrigin, getGlobalOrigin } from './global-origin' +import Pool from './pool' +import { RedirectHandler, DecoratorHandler } from './handlers' + +import BalancedPool from './balanced-pool' +import RoundRobinPool from './round-robin-pool' +import Client from './client' +import H2CClient from './h2c-client' +import buildConnector from './connector' +import errors from './errors' +import Agent from './agent' +import Dispatcher1Wrapper from './dispatcher1-wrapper' +import MockClient from './mock-client' +import MockPool from './mock-pool' +import MockAgent from './mock-agent' +import { SnapshotAgent } from './snapshot-agent' +import { MockCallHistory, MockCallHistoryLog } from './mock-call-history' +import mockErrors from './mock-errors' +import ProxyAgent from './proxy-agent' +import Socks5ProxyAgent from './socks5-proxy-agent' +import EnvHttpProxyAgent from './env-http-proxy-agent' +import RetryHandler from './retry-handler' +import RetryAgent from './retry-agent' +import { request, pipeline, stream, connect, upgrade } from './api' +import interceptors from './interceptors' + +import CacheInterceptor from './cache-interceptor' +declare const cacheStores: { + MemoryCacheStore: typeof CacheInterceptor.MemoryCacheStore; + SqliteCacheStore: typeof CacheInterceptor.SqliteCacheStore; +} + +export * from './util' +export * from './cookies' +export * from './eventsource' +export * from './fetch' +export * from './formdata' +export * from './diagnostics-channel' +export * from './websocket' +export * from './content-type' +export * from './cache' +export { Interceptable } from './mock-interceptor' + +declare function globalThisInstall (): void + +export { Dispatcher, BalancedPool, RoundRobinPool, Pool, Client, buildConnector, errors, Agent, Dispatcher1Wrapper, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, cacheStores, MockClient, MockPool, MockAgent, SnapshotAgent, MockCallHistory, MockCallHistoryLog, mockErrors, ProxyAgent, Socks5ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient, globalThisInstall as install } +export default Undici + +declare namespace Undici { + const Dispatcher: typeof import('./dispatcher').default + const Pool: typeof import('./pool').default + const RedirectHandler: typeof import ('./handlers').RedirectHandler + const DecoratorHandler: typeof import ('./handlers').DecoratorHandler + const RetryHandler: typeof import ('./retry-handler').default + const BalancedPool: typeof import('./balanced-pool').default + const RoundRobinPool: typeof import('./round-robin-pool').default + const Client: typeof import('./client').default + const H2CClient: typeof import('./h2c-client').default + const buildConnector: typeof import('./connector').default + const errors: typeof import('./errors').default + const Agent: typeof import('./agent').default + const Dispatcher1Wrapper: typeof import('./dispatcher1-wrapper').default + const setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher + const getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher + const request: typeof import('./api').request + const stream: typeof import('./api').stream + const pipeline: typeof import('./api').pipeline + const connect: typeof import('./api').connect + const upgrade: typeof import('./api').upgrade + const MockClient: typeof import('./mock-client').default + const MockPool: typeof import('./mock-pool').default + const MockAgent: typeof import('./mock-agent').default + const SnapshotAgent: typeof import('./snapshot-agent').SnapshotAgent + const MockCallHistory: typeof import('./mock-call-history').MockCallHistory + const MockCallHistoryLog: typeof import('./mock-call-history').MockCallHistoryLog + const mockErrors: typeof import('./mock-errors').default + const ProxyAgent: typeof import('./proxy-agent').default + const Socks5ProxyAgent: typeof import('./socks5-proxy-agent').default + const fetch: typeof import('./fetch').fetch + const Headers: typeof import('./fetch').Headers + const Response: typeof import('./fetch').Response + const Request: typeof import('./fetch').Request + const FormData: typeof import('./formdata').FormData + const caches: typeof import('./cache').caches + const interceptors: typeof import('./interceptors').default + const cacheStores: { + MemoryCacheStore: typeof import('./cache-interceptor').default.MemoryCacheStore, + SqliteCacheStore: typeof import('./cache-interceptor').default.SqliteCacheStore + } + const install: typeof globalThisInstall +} diff --git a/node_modules/undici-types/interceptors.d.ts b/node_modules/undici-types/interceptors.d.ts new file mode 100644 index 0000000..d21d717 --- /dev/null +++ b/node_modules/undici-types/interceptors.d.ts @@ -0,0 +1,80 @@ +import CacheHandler from './cache-interceptor' +import Dispatcher from './dispatcher' +import RetryHandler from './retry-handler' +import { LookupOptions } from 'node:dns' + +export default Interceptors + +declare namespace Interceptors { + export type DumpInterceptorOpts = { maxSize?: number } + export type RetryInterceptorOpts = RetryHandler.RetryOptions + export type RedirectInterceptorOpts = { maxRedirections?: number, throwOnMaxRedirect?: boolean, stripHeadersOnRedirect?: string[], stripHeadersOnCrossOriginRedirect?: string[] } + export type DecompressInterceptorOpts = { + skipErrorResponses?: boolean + skipStatusCodes?: number[] + } + + export type ResponseErrorInterceptorOpts = { throwOnError: boolean } + export type CacheInterceptorOpts = CacheHandler.CacheOptions + + // DNS interceptor + export type DNSInterceptorRecord = { address: string, ttl: number, family: 4 | 6 } + export type DNSInterceptorOriginRecords = { records: { 4: { ips: DNSInterceptorRecord[] } | null, 6: { ips: DNSInterceptorRecord[] } | null } } + export type DNSStorage = { + size: number + get(origin: string): DNSInterceptorOriginRecords | null + set(origin: string, records: DNSInterceptorOriginRecords | null, options: { ttl: number }): void + delete(origin: string): void + full(): boolean + } + export type DNSInterceptorOpts = { + maxTTL?: number + maxItems?: number + lookup?: (origin: URL, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, addresses: DNSInterceptorRecord[]) => void) => void + pick?: (origin: URL, records: DNSInterceptorOriginRecords, affinity: 4 | 6) => DNSInterceptorRecord + dualStack?: boolean + affinity?: 4 | 6 + storage?: DNSStorage + } + + // Deduplicate interceptor + export type DeduplicateMethods = 'GET' | 'HEAD' | 'OPTIONS' | 'TRACE' + export type DeduplicateInterceptorOpts = { + /** + * The HTTP methods to deduplicate. + * Note: Only safe HTTP methods can be deduplicated. + * @default ['GET'] + */ + methods?: DeduplicateMethods[] + /** + * Header names that, if present in a request, will cause the request to skip deduplication. + * Header name matching is case-insensitive. + * @default [] + */ + skipHeaderNames?: string[] + /** + * Header names to exclude from the deduplication key. + * Requests with different values for these headers will still be deduplicated together. + * Useful for headers like `x-request-id` that vary per request but shouldn't affect deduplication. + * Header name matching is case-insensitive. + * @default [] + */ + excludeHeaderNames?: string[] + /** + * Maximum bytes buffered per paused waiting deduplicated handler. + * If a waiting handler remains paused and exceeds this threshold, + * it is failed with an abort error to prevent unbounded memory growth. + * @default 5 * 1024 * 1024 + */ + maxBufferSize?: number + } + + export function dump (opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function retry (opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function redirect (opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function decompress (opts?: DecompressInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function responseError (opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function dns (opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function cache (opts?: CacheInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function deduplicate (opts?: DeduplicateInterceptorOpts): Dispatcher.DispatcherComposeInterceptor +} diff --git a/node_modules/undici-types/mock-agent.d.ts b/node_modules/undici-types/mock-agent.d.ts new file mode 100644 index 0000000..330926b --- /dev/null +++ b/node_modules/undici-types/mock-agent.d.ts @@ -0,0 +1,68 @@ +import Agent from './agent' +import Dispatcher from './dispatcher' +import { Interceptable, MockInterceptor } from './mock-interceptor' +import MockDispatch = MockInterceptor.MockDispatch +import { MockCallHistory } from './mock-call-history' + +export default MockAgent + +interface PendingInterceptor extends MockDispatch { + origin: string; +} + +/** A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. */ +declare class MockAgent extends Dispatcher { + constructor (options?: TMockAgentOptions) + /** Creates and retrieves mock Dispatcher instances which can then be used to intercept HTTP requests. If the number of connections on the mock agent is set to 1, a MockClient instance is returned. Otherwise a MockPool instance is returned. */ + get(origin: string): TInterceptable + get(origin: RegExp): TInterceptable + get(origin: ((origin: string) => boolean)): TInterceptable + /** Dispatches a mocked request. */ + dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean + /** Closes the mock agent and waits for registered mock pools and clients to also close before resolving. */ + close (): Promise + /** Disables mocking in MockAgent. */ + deactivate (): void + /** Enables mocking in a MockAgent instance. When instantiated, a MockAgent is automatically activated. Therefore, this method is only effective after `MockAgent.deactivate` has been called. */ + activate (): void + /** Define host matchers so only matching requests that aren't intercepted by the mock dispatchers will be attempted. */ + enableNetConnect (): void + enableNetConnect (host: string): void + enableNetConnect (host: RegExp): void + enableNetConnect (host: ((host: string) => boolean)): void + /** Causes all requests to throw when requests are not matched in a MockAgent intercept. */ + disableNetConnect (): void + /** get call history. returns the MockAgent call history or undefined if the option is not enabled. */ + getCallHistory (): MockCallHistory | undefined + /** clear every call history. Any MockCallHistoryLog will be deleted on the MockCallHistory instance */ + clearCallHistory (): void + /** Enable call history. Any subsequence calls will then be registered. */ + enableCallHistory (): this + /** Disable call history. Any subsequence calls will then not be registered. */ + disableCallHistory (): this + pendingInterceptors (): PendingInterceptor[] + assertNoPendingInterceptors (options?: { + pendingInterceptorsFormatter?: PendingInterceptorsFormatter; + }): void +} + +interface PendingInterceptorsFormatter { + format(pendingInterceptors: readonly PendingInterceptor[]): string; +} + +declare namespace MockAgent { + /** MockAgent options. */ + export interface Options extends Agent.Options { + /** A custom agent to be encapsulated by the MockAgent. */ + agent?: Dispatcher; + + /** Ignore trailing slashes in the path */ + ignoreTrailingSlash?: boolean; + + /** Accept URLs with search parameters using non standard syntaxes. default false */ + acceptNonStandardSearchParameters?: boolean; + + /** Enable call history. you can either call MockAgent.enableCallHistory(). default false */ + enableCallHistory?: boolean + } +} diff --git a/node_modules/undici-types/mock-call-history.d.ts b/node_modules/undici-types/mock-call-history.d.ts new file mode 100644 index 0000000..df07fa0 --- /dev/null +++ b/node_modules/undici-types/mock-call-history.d.ts @@ -0,0 +1,111 @@ +import Dispatcher from './dispatcher' + +declare namespace MockCallHistoryLog { + /** request's configuration properties */ + export type MockCallHistoryLogProperties = 'protocol' | 'host' | 'port' | 'origin' | 'path' | 'hash' | 'fullUrl' | 'method' | 'searchParams' | 'body' | 'headers' +} + +/** a log reflecting request configuration */ +declare class MockCallHistoryLog { + constructor (requestInit: Dispatcher.DispatchOptions) + /** protocol used. ie. 'https:' or 'http:' etc... */ + protocol: string + /** request's host. */ + host: string + /** request's port. */ + port: string + /** request's origin. ie. https://localhost:3000. */ + origin: string + /** path. never contains searchParams. */ + path: string + /** request's hash. */ + hash: string + /** the full url requested. */ + fullUrl: string + /** request's method. */ + method: string + /** search params. */ + searchParams: Record + /** request's body */ + body: string | null | undefined + /** request's headers */ + headers: Record | null | undefined + + /** returns an Map of property / value pair */ + toMap (): Map | null | undefined> + + /** returns a string computed with all key value pair */ + toString (): string +} + +declare namespace MockCallHistory { + export type FilterCallsOperator = 'AND' | 'OR' + + /** modify the filtering behavior */ + export interface FilterCallsOptions { + /** the operator to apply when filtering. 'OR' will adds any MockCallHistoryLog matching any criteria given. 'AND' will adds only MockCallHistoryLog matching every criteria given. (default 'OR') */ + operator?: FilterCallsOperator | Lowercase + } + /** a function to be executed for filtering MockCallHistoryLog */ + export type FilterCallsFunctionCriteria = (log: MockCallHistoryLog) => boolean + + /** parameter to filter MockCallHistoryLog */ + export type FilterCallsParameter = string | RegExp | undefined | null + + /** an object to execute multiple filtering at once */ + export interface FilterCallsObjectCriteria extends Record { + /** filter by request protocol. ie https: */ + protocol?: FilterCallsParameter; + /** filter by request host. */ + host?: FilterCallsParameter; + /** filter by request port. */ + port?: FilterCallsParameter; + /** filter by request origin. */ + origin?: FilterCallsParameter; + /** filter by request path. */ + path?: FilterCallsParameter; + /** filter by request hash. */ + hash?: FilterCallsParameter; + /** filter by request fullUrl. */ + fullUrl?: FilterCallsParameter; + /** filter by request method. */ + method?: FilterCallsParameter; + } +} + +/** a call history to track requests configuration */ +declare class MockCallHistory { + constructor (name: string) + /** returns an array of MockCallHistoryLog. */ + calls (): Array + /** returns the first MockCallHistoryLog */ + firstCall (): MockCallHistoryLog | undefined + /** returns the last MockCallHistoryLog. */ + lastCall (): MockCallHistoryLog | undefined + /** returns the nth MockCallHistoryLog. */ + nthCall (position: number): MockCallHistoryLog | undefined + /** return all MockCallHistoryLog matching any of criteria given. if an object is used with multiple properties, you can change the operator to apply during filtering on options */ + filterCalls (criteria: MockCallHistory.FilterCallsFunctionCriteria | MockCallHistory.FilterCallsObjectCriteria | RegExp, options?: MockCallHistory.FilterCallsOptions): Array + /** return all MockCallHistoryLog matching the given protocol. if a string is given, it is matched with includes */ + filterCallsByProtocol (protocol: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given host. if a string is given, it is matched with includes */ + filterCallsByHost (host: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given port. if a string is given, it is matched with includes */ + filterCallsByPort (port: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given origin. if a string is given, it is matched with includes */ + filterCallsByOrigin (origin: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given path. if a string is given, it is matched with includes */ + filterCallsByPath (path: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given hash. if a string is given, it is matched with includes */ + filterCallsByHash (hash: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given fullUrl. if a string is given, it is matched with includes */ + filterCallsByFullUrl (fullUrl: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given method. if a string is given, it is matched with includes */ + filterCallsByMethod (method: MockCallHistory.FilterCallsParameter): Array + /** clear all MockCallHistoryLog on this MockCallHistory. */ + clear (): void + /** use it with for..of loop or spread operator */ + [Symbol.iterator]: () => Generator +} + +export { MockCallHistoryLog, MockCallHistory } diff --git a/node_modules/undici-types/mock-client.d.ts b/node_modules/undici-types/mock-client.d.ts new file mode 100644 index 0000000..702e824 --- /dev/null +++ b/node_modules/undici-types/mock-client.d.ts @@ -0,0 +1,27 @@ +import Client from './client' +import Dispatcher from './dispatcher' +import MockAgent from './mock-agent' +import { MockInterceptor, Interceptable } from './mock-interceptor' + +export default MockClient + +/** MockClient extends the Client API and allows one to mock requests. */ +declare class MockClient extends Client implements Interceptable { + constructor (origin: string, options: MockClient.Options) + /** Intercepts any matching requests that use the same origin as this mock client. */ + intercept (options: MockInterceptor.Options): MockInterceptor + /** Dispatches a mocked request. */ + dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean + /** Closes the mock client and gracefully waits for enqueued requests to complete. */ + close (): Promise + /** Clean up all the prepared mocks. */ + cleanMocks (): void +} + +declare namespace MockClient { + /** MockClient options. */ + export interface Options extends Client.Options { + /** The agent to associate this MockClient with. */ + agent: MockAgent; + } +} diff --git a/node_modules/undici-types/mock-errors.d.ts b/node_modules/undici-types/mock-errors.d.ts new file mode 100644 index 0000000..eefeecd --- /dev/null +++ b/node_modules/undici-types/mock-errors.d.ts @@ -0,0 +1,12 @@ +import Errors from './errors' + +export default MockErrors + +declare namespace MockErrors { + /** The request does not match any registered mock dispatches. */ + export class MockNotMatchedError extends Errors.UndiciError { + constructor (message?: string) + name: 'MockNotMatchedError' + code: 'UND_MOCK_ERR_MOCK_NOT_MATCHED' + } +} diff --git a/node_modules/undici-types/mock-interceptor.d.ts b/node_modules/undici-types/mock-interceptor.d.ts new file mode 100644 index 0000000..5904976 --- /dev/null +++ b/node_modules/undici-types/mock-interceptor.d.ts @@ -0,0 +1,98 @@ +import { IncomingHttpHeaders } from './header' +import Dispatcher from './dispatcher' +import { BodyInit, Headers } from './fetch' + +/** The scope associated with a mock dispatch. */ +declare class MockScope { + constructor (mockDispatch: MockInterceptor.MockDispatch) + /** Delay a reply by a set amount of time in ms. */ + delay (waitInMs: number): MockScope + /** Persist the defined mock data for the associated reply. It will return the defined mock data indefinitely. */ + persist (): MockScope + /** Define a reply for a set amount of matching requests. */ + times (repeatTimes: number): MockScope +} + +/** The interceptor for a Mock. */ +declare class MockInterceptor { + constructor (options: MockInterceptor.Options, mockDispatches: MockInterceptor.MockDispatch[]) + /** Mock an undici request with the defined reply. */ + reply(replyOptionsCallback: MockInterceptor.MockReplyOptionsCallback): MockScope + reply( + statusCode: number, + data?: TData | Buffer | string | MockInterceptor.MockResponseDataHandler, + responseOptions?: MockInterceptor.MockResponseOptions + ): MockScope + /** Mock an undici request by throwing the defined reply error. */ + replyWithError(error: TError): MockScope + /** Set default reply headers on the interceptor for subsequent mocked replies. */ + defaultReplyHeaders (headers: IncomingHttpHeaders): MockInterceptor + /** Set default reply trailers on the interceptor for subsequent mocked replies. */ + defaultReplyTrailers (trailers: Record): MockInterceptor + /** Set automatically calculated content-length header on subsequent mocked replies. */ + replyContentLength (): MockInterceptor +} + +declare namespace MockInterceptor { + /** MockInterceptor options. */ + export interface Options { + /** Path to intercept on. */ + path: string | RegExp | ((path: string) => boolean); + /** Method to intercept on. Defaults to GET. */ + method?: string | RegExp | ((method: string) => boolean); + /** Body to intercept on. */ + body?: string | RegExp | ((body: string) => boolean); + /** Headers to intercept on. */ + headers?: Record boolean)> | ((headers: Record) => boolean); + /** Query params to intercept on */ + query?: Record; + } + export interface MockDispatch extends Options { + times: number | null; + persist: boolean; + consumed: boolean; + data: MockDispatchData; + } + export interface MockDispatchData extends MockResponseOptions { + error: TError | null; + statusCode?: number; + data?: TData | string; + } + export interface MockResponseOptions { + headers?: IncomingHttpHeaders; + trailers?: Record; + } + + export interface MockResponseCallbackOptions { + path: string; + method: string; + headers?: Headers | Record; + origin?: string; + body?: BodyInit | Dispatcher.DispatchOptions['body'] | null; + } + + export type MockResponseDataHandler = ( + opts: MockResponseCallbackOptions + ) => TData | Buffer | string + + export type MockReplyOptions = { + statusCode: number, data?: TData | Buffer | string, responseOptions?: MockResponseOptions + } + + export type MockReplyOptionsCallback = ( + opts: MockResponseCallbackOptions + ) => MockReplyOptions | Promise> +} + +interface Interceptable extends Dispatcher { + /** Intercepts any matching requests that use the same origin as this mock client. */ + intercept(options: MockInterceptor.Options): MockInterceptor; + /** Clean up all the prepared mocks. */ + cleanMocks (): void +} + +export { + Interceptable, + MockInterceptor, + MockScope +} diff --git a/node_modules/undici-types/mock-pool.d.ts b/node_modules/undici-types/mock-pool.d.ts new file mode 100644 index 0000000..f35f357 --- /dev/null +++ b/node_modules/undici-types/mock-pool.d.ts @@ -0,0 +1,27 @@ +import Pool from './pool' +import MockAgent from './mock-agent' +import { Interceptable, MockInterceptor } from './mock-interceptor' +import Dispatcher from './dispatcher' + +export default MockPool + +/** MockPool extends the Pool API and allows one to mock requests. */ +declare class MockPool extends Pool implements Interceptable { + constructor (origin: string, options: MockPool.Options) + /** Intercepts any matching requests that use the same origin as this mock pool. */ + intercept (options: MockInterceptor.Options): MockInterceptor + /** Dispatches a mocked request. */ + dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean + /** Closes the mock pool and gracefully waits for enqueued requests to complete. */ + close (): Promise + /** Clean up all the prepared mocks. */ + cleanMocks (): void +} + +declare namespace MockPool { + /** MockPool options. */ + export interface Options extends Pool.Options { + /** The agent to associate this MockPool with. */ + agent: MockAgent; + } +} diff --git a/node_modules/undici-types/package.json b/node_modules/undici-types/package.json new file mode 100644 index 0000000..aba7c7c --- /dev/null +++ b/node_modules/undici-types/package.json @@ -0,0 +1,55 @@ +{ + "name": "undici-types", + "version": "8.9.0", + "description": "A stand-alone types package for Undici", + "homepage": "https://undici.nodejs.org", + "bugs": { + "url": "https://github.com/nodejs/undici/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/nodejs/undici.git" + }, + "license": "MIT", + "types": "index.d.ts", + "files": [ + "*.d.ts" + ], + "contributors": [ + { + "name": "Daniele Belardi", + "url": "https://github.com/dnlup", + "author": true + }, + { + "name": "Ethan Arrowood", + "url": "https://github.com/ethan-arrowood", + "author": true + }, + { + "name": "Matteo Collina", + "url": "https://github.com/mcollina", + "author": true + }, + { + "name": "Matthew Aitken", + "url": "https://github.com/KhafraDev", + "author": true + }, + { + "name": "Robert Nagy", + "url": "https://github.com/ronag", + "author": true + }, + { + "name": "Szymon Marczak", + "url": "https://github.com/szmarczak", + "author": true + }, + { + "name": "Tomas Della Vedova", + "url": "https://github.com/delvedor", + "author": true + } + ] +} \ No newline at end of file diff --git a/node_modules/undici-types/patch.d.ts b/node_modules/undici-types/patch.d.ts new file mode 100644 index 0000000..8f7acbb --- /dev/null +++ b/node_modules/undici-types/patch.d.ts @@ -0,0 +1,29 @@ +/// + +// See https://github.com/nodejs/undici/issues/1740 + +export interface EventInit { + bubbles?: boolean + cancelable?: boolean + composed?: boolean +} + +export interface EventListenerOptions { + capture?: boolean +} + +export interface AddEventListenerOptions extends EventListenerOptions { + once?: boolean + passive?: boolean + signal?: AbortSignal +} + +export type EventListenerOrEventListenerObject = EventListener | EventListenerObject + +export interface EventListenerObject { + handleEvent (object: Event): void +} + +export interface EventListener { + (evt: Event): void +} diff --git a/node_modules/undici-types/pool-stats.d.ts b/node_modules/undici-types/pool-stats.d.ts new file mode 100644 index 0000000..f76a5f6 --- /dev/null +++ b/node_modules/undici-types/pool-stats.d.ts @@ -0,0 +1,19 @@ +import Pool from './pool' + +export default PoolStats + +declare class PoolStats { + constructor (pool: Pool) + /** Number of open socket connections in this pool. */ + connected: number + /** Number of open socket connections in this pool that do not have an active request. */ + free: number + /** Number of pending requests across all clients in this pool. */ + pending: number + /** Number of queued requests across all clients in this pool. */ + queued: number + /** Number of currently active requests across all clients in this pool. */ + running: number + /** Number of active, pending, or queued requests across all clients in this pool. */ + size: number +} diff --git a/node_modules/undici-types/pool.d.ts b/node_modules/undici-types/pool.d.ts new file mode 100644 index 0000000..d1e1bcd --- /dev/null +++ b/node_modules/undici-types/pool.d.ts @@ -0,0 +1,39 @@ +import Client from './client' +import TPoolStats from './pool-stats' +import { URL } from 'node:url' +import Dispatcher from './dispatcher' + +export default Pool + +type PoolConnectOptions = Omit + +declare class Pool extends Dispatcher { + constructor (url: string | URL, options?: Pool.Options) + /** `true` after `pool.close()` has been called. */ + closed: boolean + /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ + destroyed: boolean + /** Aggregate stats for a Pool. */ + readonly stats: TPoolStats + + // Override dispatcher APIs. + override connect ( + options: PoolConnectOptions + ): Promise + override connect ( + options: PoolConnectOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void +} + +declare namespace Pool { + export type PoolStats = TPoolStats + export interface Options extends Client.Options { + /** Default: `(origin, opts) => new Client(origin, opts)`. */ + factory?(origin: URL, opts: object): Dispatcher; + /** The max number of clients to create. `null` if no limit. Default `null`. */ + connections?: number | null; + /** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */ + clientTtl?: number | null; + } +} diff --git a/node_modules/undici-types/proxy-agent.d.ts b/node_modules/undici-types/proxy-agent.d.ts new file mode 100644 index 0000000..e6672f7 --- /dev/null +++ b/node_modules/undici-types/proxy-agent.d.ts @@ -0,0 +1,36 @@ +import Agent from './agent' +import buildConnector from './connector' +import Dispatcher from './dispatcher' +import { OutgoingHttpHeaders } from './header' + +export default ProxyAgent + +declare class ProxyAgent extends Dispatcher { + constructor (options: ProxyAgent.Options | string) + + dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean + close (): Promise +} + +declare namespace ProxyAgent { + export interface Options extends Agent.Options { + uri: string; + /** + * @deprecated use opts.token + */ + auth?: string; + token?: string; + headers?: OutgoingHttpHeaders; + requestTls?: buildConnector.BuildOptions; + proxyTls?: buildConnector.BuildOptions; + clientFactory?(origin: URL, opts: object): Dispatcher; + /** + * Undici tunnels via CONNECT when the target endpoint uses HTTPS, and + * forwards (HTTP/1.1 absolute-form request-target, per RFC 9112 §3.2.2) + * otherwise, regardless of whether the proxy URL is HTTP or HTTPS. The + * non-tunneled forwarding path does not negotiate HTTP/2 with the proxy. + * Set to true to force tunneling for plain HTTP requests as well. + */ + proxyTunnel?: boolean; + } +} diff --git a/node_modules/undici-types/readable.d.ts b/node_modules/undici-types/readable.d.ts new file mode 100644 index 0000000..723ed1f --- /dev/null +++ b/node_modules/undici-types/readable.d.ts @@ -0,0 +1,68 @@ +import { Readable } from 'node:stream' +import { Blob } from 'node:buffer' + +export default BodyReadable + +declare class BodyReadable extends Readable { + constructor (opts: { + resume: (this: Readable, size: number) => void | null; + abort: () => void | null; + contentType?: string; + contentLength?: number; + highWaterMark?: number; + }) + + /** Consumes and returns the body as a string + * https://fetch.spec.whatwg.org/#dom-body-text + */ + text (): Promise + + /** Consumes and returns the body as a JavaScript Object + * https://fetch.spec.whatwg.org/#dom-body-json + */ + json (): Promise + + /** Consumes and returns the body as a Blob + * https://fetch.spec.whatwg.org/#dom-body-blob + */ + blob (): Promise + + /** Consumes and returns the body as an Uint8Array + * https://fetch.spec.whatwg.org/#dom-body-bytes + */ + bytes (): Promise + + /** Consumes and returns the body as an ArrayBuffer + * https://fetch.spec.whatwg.org/#dom-body-arraybuffer + */ + arrayBuffer (): Promise + + /** Not implemented + * + * https://fetch.spec.whatwg.org/#dom-body-formdata + */ + formData (): Promise + + /** Returns true if the body is not null and the body has been consumed + * + * Otherwise, returns false + * + * https://fetch.spec.whatwg.org/#dom-body-bodyused + */ + readonly bodyUsed: boolean + + /** + * If body is null, it should return null as the body + * + * If body is not null, should return the body as a ReadableStream + * + * https://fetch.spec.whatwg.org/#dom-body-body + */ + readonly body: never | undefined + + /** Dumps the response body by reading `limit` number of bytes. + * @param opts.limit Number of bytes to read (optional) - Default: 131072 + * @param opts.signal AbortSignal to cancel the operation (optional) + */ + dump (opts?: { limit: number; signal?: AbortSignal }): Promise +} diff --git a/node_modules/undici-types/retry-agent.d.ts b/node_modules/undici-types/retry-agent.d.ts new file mode 100644 index 0000000..82268c3 --- /dev/null +++ b/node_modules/undici-types/retry-agent.d.ts @@ -0,0 +1,8 @@ +import Dispatcher from './dispatcher' +import RetryHandler from './retry-handler' + +export default RetryAgent + +declare class RetryAgent extends Dispatcher { + constructor (dispatcher: Dispatcher, options?: RetryHandler.RetryOptions) +} diff --git a/node_modules/undici-types/retry-handler.d.ts b/node_modules/undici-types/retry-handler.d.ts new file mode 100644 index 0000000..3bc484b --- /dev/null +++ b/node_modules/undici-types/retry-handler.d.ts @@ -0,0 +1,125 @@ +import Dispatcher from './dispatcher' + +export default RetryHandler + +declare class RetryHandler implements Dispatcher.DispatchHandler { + constructor ( + options: Dispatcher.DispatchOptions & { + retryOptions?: RetryHandler.RetryOptions; + }, + retryHandlers: RetryHandler.RetryHandlers + ) +} + +declare namespace RetryHandler { + export type RetryState = { counter: number; } + + export type RetryContext = { + state: RetryState; + opts: Dispatcher.DispatchOptions & { + retryOptions?: RetryHandler.RetryOptions; + }; + } + + export type OnRetryCallback = (result?: Error | null) => void + + export type RetryCallback = ( + err: Error, + context: { + state: RetryState; + opts: Dispatcher.DispatchOptions & { + retryOptions?: RetryHandler.RetryOptions; + }; + }, + callback: OnRetryCallback + ) => void + + export interface RetryOptions { + /** + * If true, the retry handler will throw an error if the request fails, + * this will prevent the folling handlers from being called, and will destroy the socket. + * + * @type {boolean} + * @memberof RetryOptions + * @default true + */ + throwOnError?: boolean; + /** + * Callback to be invoked on every retry iteration. + * It receives the error, current state of the retry object and the options object + * passed when instantiating the retry handler. + * + * @type {RetryCallback} + * @memberof RetryOptions + */ + retry?: RetryCallback; + /** + * Maximum number of retries to allow. + * + * @type {number} + * @memberof RetryOptions + * @default 5 + */ + maxRetries?: number; + /** + * Max number of milliseconds allow between retries + * + * @type {number} + * @memberof RetryOptions + * @default 30000 + */ + maxTimeout?: number; + /** + * Initial number of milliseconds to wait before retrying for the first time. + * + * @type {number} + * @memberof RetryOptions + * @default 500 + */ + minTimeout?: number; + /** + * Factior to multiply the timeout factor between retries. + * + * @type {number} + * @memberof RetryOptions + * @default 2 + */ + timeoutFactor?: number; + /** + * It enables to automatically infer timeout between retries based on the `Retry-After` header. + * + * @type {boolean} + * @memberof RetryOptions + * @default true + */ + retryAfter?: boolean; + /** + * HTTP methods to retry. + * + * @type {Dispatcher.HttpMethod[]} + * @memberof RetryOptions + * @default ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], + */ + methods?: Dispatcher.HttpMethod[]; + /** + * Error codes to be retried. e.g. `ECONNRESET`, `ENOTFOUND`, `ETIMEDOUT`, `ECONNREFUSED`, etc. + * + * @type {string[]} + * @default ['ECONNRESET','ECONNREFUSED','ENOTFOUND','ENETDOWN','ENETUNREACH','EHOSTDOWN','EHOSTUNREACH','EPIPE'] + */ + errorCodes?: string[]; + /** + * HTTP status codes to be retried. + * + * @type {number[]} + * @memberof RetryOptions + * @default [500, 502, 503, 504, 429], + */ + statusCodes?: number[]; + } + + export interface RetryHandlers { + dispatch: Dispatcher['dispatch']; + handler: Dispatcher.DispatchHandler; + } +} diff --git a/node_modules/undici-types/round-robin-pool.d.ts b/node_modules/undici-types/round-robin-pool.d.ts new file mode 100644 index 0000000..5129d86 --- /dev/null +++ b/node_modules/undici-types/round-robin-pool.d.ts @@ -0,0 +1,39 @@ +import Client from './client' +import TPoolStats from './pool-stats' +import { URL } from 'node:url' +import Dispatcher from './dispatcher' + +export default RoundRobinPool + +type RoundRobinPoolConnectOptions = Omit + +declare class RoundRobinPool extends Dispatcher { + constructor (url: string | URL, options?: RoundRobinPool.Options) + /** `true` after `pool.close()` has been called. */ + closed: boolean + /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ + destroyed: boolean + /** Aggregate stats for a RoundRobinPool. */ + readonly stats: TPoolStats + + // Override dispatcher APIs. + override connect ( + options: RoundRobinPoolConnectOptions + ): Promise + override connect ( + options: RoundRobinPoolConnectOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void +} + +declare namespace RoundRobinPool { + export type RoundRobinPoolStats = TPoolStats + export interface Options extends Client.Options { + /** Default: `(origin, opts) => new Client(origin, opts)`. */ + factory?(origin: URL, opts: object): Dispatcher; + /** The max number of clients to create. `null` if no limit. Default `null`. */ + connections?: number | null; + /** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */ + clientTtl?: number | null; + } +} diff --git a/node_modules/undici-types/snapshot-agent.d.ts b/node_modules/undici-types/snapshot-agent.d.ts new file mode 100644 index 0000000..9696b60 --- /dev/null +++ b/node_modules/undici-types/snapshot-agent.d.ts @@ -0,0 +1,113 @@ +import MockAgent from './mock-agent' + +declare class SnapshotRecorder { + constructor (options?: SnapshotRecorder.Options) + + record (requestOpts: any, response: any): Promise + findSnapshot (requestOpts: any): SnapshotRecorder.Snapshot | undefined + loadSnapshots (filePath?: string): Promise + saveSnapshots (filePath?: string): Promise + clear (): void + getSnapshots (): SnapshotRecorder.Snapshot[] + size (): number + resetCallCounts (): void + deleteSnapshot (requestOpts: any): boolean + getSnapshotInfo (requestOpts: any): SnapshotRecorder.SnapshotInfo | null + replaceSnapshots (snapshotData: SnapshotRecorder.SnapshotData[]): void + destroy (): void +} + +declare namespace SnapshotRecorder { + type SnapshotRecorderMode = 'record' | 'playback' | 'update' + + export interface Options { + snapshotPath?: string + mode?: SnapshotRecorderMode + maxSnapshots?: number + autoFlush?: boolean + flushInterval?: number + matchHeaders?: string[] + ignoreHeaders?: string[] + excludeHeaders?: string[] + matchBody?: boolean + normalizeBody?: (body: string | Buffer | null | undefined) => string + matchQuery?: boolean + normalizeQuery?: (query: URLSearchParams) => string + caseSensitive?: boolean + shouldRecord?: (requestOpts: any) => boolean + shouldPlayback?: (requestOpts: any) => boolean + excludeUrls?: (string | RegExp)[] + } + + export interface Snapshot { + request: { + method: string + url: string + headers: Record + body?: string + } + responses: { + statusCode: number + headers: Record + body: string + trailers: Record + }[] + callCount: number + timestamp: string + } + + export interface SnapshotInfo { + hash: string + request: { + method: string + url: string + headers: Record + body?: string + } + responseCount: number + callCount: number + timestamp: string + } + + export interface SnapshotData { + hash: string + snapshot: Snapshot + } +} + +declare class SnapshotAgent extends MockAgent { + constructor (options?: SnapshotAgent.Options) + + saveSnapshots (filePath?: string): Promise + loadSnapshots (filePath?: string): Promise + getRecorder (): SnapshotRecorder + getMode (): SnapshotRecorder.SnapshotRecorderMode + clearSnapshots (): void + resetCallCounts (): void + deleteSnapshot (requestOpts: any): boolean + getSnapshotInfo (requestOpts: any): SnapshotRecorder.SnapshotInfo | null + replaceSnapshots (snapshotData: SnapshotRecorder.SnapshotData[]): void +} + +declare namespace SnapshotAgent { + export interface Options extends MockAgent.Options { + mode?: SnapshotRecorder.SnapshotRecorderMode + snapshotPath?: string + maxSnapshots?: number + autoFlush?: boolean + flushInterval?: number + matchHeaders?: string[] + ignoreHeaders?: string[] + excludeHeaders?: string[] + matchBody?: boolean + normalizeBody?: (body: string | Buffer | null | undefined) => string + matchQuery?: boolean + normalizeQuery?: (query: URLSearchParams) => string + caseSensitive?: boolean + shouldRecord?: (requestOpts: any) => boolean + shouldPlayback?: (requestOpts: any) => boolean + excludeUrls?: (string | RegExp)[] + } +} + +export { SnapshotAgent, SnapshotRecorder } diff --git a/node_modules/undici-types/socks5-proxy-agent.d.ts b/node_modules/undici-types/socks5-proxy-agent.d.ts new file mode 100644 index 0000000..05e4331 --- /dev/null +++ b/node_modules/undici-types/socks5-proxy-agent.d.ts @@ -0,0 +1,25 @@ +import Dispatcher from './dispatcher' +import buildConnector from './connector' +import { OutgoingHttpHeaders } from './header' +import Pool from './pool' + +export default Socks5ProxyAgent + +declare class Socks5ProxyAgent extends Dispatcher { + constructor (proxyUrl: string | URL, options?: Socks5ProxyAgent.Options) +} + +declare namespace Socks5ProxyAgent { + export interface Options extends Pool.Options { + /** Additional headers to send with the proxy connection */ + headers?: OutgoingHttpHeaders; + /** SOCKS5 proxy username for authentication */ + username?: string; + /** SOCKS5 proxy password for authentication */ + password?: string; + /** Custom connector function for proxy connection */ + connect?: buildConnector.connector; + /** TLS options for the proxy connection (for SOCKS5 over TLS) */ + proxyTls?: buildConnector.BuildOptions; + } +} diff --git a/node_modules/undici-types/util.d.ts b/node_modules/undici-types/util.d.ts new file mode 100644 index 0000000..8fc50cc --- /dev/null +++ b/node_modules/undici-types/util.d.ts @@ -0,0 +1,18 @@ +export namespace util { + /** + * Retrieves a header name and returns its lowercase value. + * @param value Header name + */ + export function headerNameToString (value: string | Buffer): string + + /** + * Receives a header object and returns the parsed value. + * @param headers Header object + * @param obj Object to specify a proxy object. Used to assign parsed values. + * @returns If `obj` is specified, it is equivalent to `obj`. + */ + export function parseHeaders ( + headers: (Buffer | string | (Buffer | string)[])[], + obj?: Record + ): Record +} diff --git a/node_modules/undici-types/utility.d.ts b/node_modules/undici-types/utility.d.ts new file mode 100644 index 0000000..bfb3ca7 --- /dev/null +++ b/node_modules/undici-types/utility.d.ts @@ -0,0 +1,7 @@ +type AutocompletePrimitiveBaseType = + T extends string ? string : + T extends number ? number : + T extends boolean ? boolean : + never + +export type Autocomplete = T | (AutocompletePrimitiveBaseType & Record) diff --git a/node_modules/undici-types/webidl.d.ts b/node_modules/undici-types/webidl.d.ts new file mode 100644 index 0000000..b1873b9 --- /dev/null +++ b/node_modules/undici-types/webidl.d.ts @@ -0,0 +1,346 @@ +// These types are not exported, and are only used internally +import { BufferSource } from 'node:stream/web' +import * as undici from './index' + +/** + * Take in an unknown value and return one that is of type T + */ +type Converter = (object: unknown) => T + +type SequenceConverter = (object: unknown, iterable?: IterableIterator) => T[] + +type RecordConverter = (object: unknown) => Record + +interface WebidlErrors { + /** + * @description Instantiate an error + */ + exception (opts: { header: string, message: string }): TypeError + /** + * @description Instantiate an error when conversion from one type to another has failed + */ + conversionFailed (opts: { + prefix: string + argument: string + types: string[] + }): TypeError + /** + * @description Throw an error when an invalid argument is provided + */ + invalidArgument (opts: { + prefix: string + value: string + type: string + }): TypeError +} + +interface WebIDLTypes { + UNDEFINED: 1, + BOOLEAN: 2, + STRING: 3, + SYMBOL: 4, + NUMBER: 5, + BIGINT: 6, + NULL: 7 + OBJECT: 8 +} + +interface WebidlUtil { + /** + * @see https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values + */ + Type (object: unknown): WebIDLTypes[keyof WebIDLTypes] + + TypeValueToString (o: unknown): + | 'Undefined' + | 'Boolean' + | 'String' + | 'Symbol' + | 'Number' + | 'BigInt' + | 'Null' + | 'Object' + + Types: WebIDLTypes + + /** + * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint + */ + ConvertToInt ( + V: unknown, + bitLength: number, + signedness: 'signed' | 'unsigned', + flags?: number + ): number + + /** + * @see https://webidl.spec.whatwg.org/#abstract-opdef-integerpart + */ + IntegerPart (N: number): number + + /** + * Stringifies {@param V} + */ + Stringify (V: any): string + + MakeTypeAssertion (I: I): (arg: any) => arg is I + + /** + * Mark a value as uncloneable for Node.js. + */ + markAsUncloneable (V: any): void + + IsResizableArrayBuffer (V: ArrayBufferLike): boolean + + HasFlag (flag: number, attributes: number): boolean + + /** + * @see https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy + */ + getCopyOfBytesHeldByBufferSource (bufferSource: BufferSource): Uint8Array +} + +interface WebidlConverters { + /** + * @see https://webidl.spec.whatwg.org/#es-DOMString + */ + DOMString (V: unknown, prefix: string, argument: string, flags?: number): string + + /** + * @see https://webidl.spec.whatwg.org/#es-ByteString + */ + ByteString (V: unknown, prefix: string, argument: string): string + + /** + * @see https://webidl.spec.whatwg.org/#es-USVString + */ + USVString (V: unknown): string + + /** + * @see https://webidl.spec.whatwg.org/#es-boolean + */ + boolean (V: unknown): boolean + + /** + * @see https://webidl.spec.whatwg.org/#es-any + */ + any (V: Value): Value + + /** + * @see https://webidl.spec.whatwg.org/#es-long-long + */ + ['long long'] (V: unknown): number + + /** + * @see https://webidl.spec.whatwg.org/#es-unsigned-long-long + */ + ['unsigned long long'] (V: unknown): number + + /** + * @see https://webidl.spec.whatwg.org/#es-unsigned-long + */ + ['unsigned long'] (V: unknown): number + + /** + * @see https://webidl.spec.whatwg.org/#es-unsigned-short + */ + ['unsigned short'] (V: unknown, flags?: number): number + + /** + * @see https://webidl.spec.whatwg.org/#idl-ArrayBuffer + */ + ArrayBuffer ( + V: unknown, + prefix: string, + argument: string, + options?: { allowResizable: boolean } + ): ArrayBuffer + + /** + * @see https://webidl.spec.whatwg.org/#idl-SharedArrayBuffer + */ + SharedArrayBuffer ( + V: unknown, + prefix: string, + argument: string, + options?: { allowResizable: boolean } + ): SharedArrayBuffer + + /** + * @see https://webidl.spec.whatwg.org/#es-buffer-source-types + */ + TypedArray ( + V: unknown, + T: new () => NodeJS.TypedArray, + prefix: string, + argument: string, + flags?: number + ): NodeJS.TypedArray + + /** + * @see https://webidl.spec.whatwg.org/#es-buffer-source-types + */ + DataView ( + V: unknown, + prefix: string, + argument: string, + flags?: number + ): DataView + + /** + * @see https://webidl.spec.whatwg.org/#es-buffer-source-types + */ + ArrayBufferView ( + V: unknown, + prefix: string, + argument: string, + flags?: number + ): NodeJS.ArrayBufferView + + /** + * @see https://webidl.spec.whatwg.org/#BufferSource + */ + BufferSource ( + V: unknown, + prefix: string, + argument: string, + flags?: number + ): ArrayBuffer | NodeJS.ArrayBufferView + + /** + * @see https://webidl.spec.whatwg.org/#AllowSharedBufferSource + */ + AllowSharedBufferSource ( + V: unknown, + prefix: string, + argument: string, + flags?: number + ): ArrayBuffer | SharedArrayBuffer | NodeJS.ArrayBufferView + + ['sequence']: SequenceConverter + + ['sequence>']: SequenceConverter + + ['record']: RecordConverter + + /** + * @see https://fetch.spec.whatwg.org/#requestinfo + */ + RequestInfo (V: unknown): undici.Request | string + + /** + * @see https://fetch.spec.whatwg.org/#requestinit + */ + RequestInit (V: unknown): undici.RequestInit + + /** + * @see https://html.spec.whatwg.org/multipage/webappapis.html#eventhandlernonnull + */ + EventHandlerNonNull (V: unknown): Function | null + + WebSocketStreamWrite (V: unknown): ArrayBuffer | NodeJS.TypedArray | string + + [Key: string]: (...args: any[]) => unknown +} + +type WebidlIsFunction = (arg: any) => arg is T + +interface WebidlIs { + Request: WebidlIsFunction + Response: WebidlIsFunction + ReadableStream: WebidlIsFunction + Blob: WebidlIsFunction + URLSearchParams: WebidlIsFunction + File: WebidlIsFunction + FormData: WebidlIsFunction + URL: WebidlIsFunction + WebSocketError: WebidlIsFunction + AbortSignal: WebidlIsFunction + MessagePort: WebidlIsFunction + USVString: WebidlIsFunction + /** + * @see https://webidl.spec.whatwg.org/#BufferSource + */ + BufferSource: WebidlIsFunction +} + +export interface Webidl { + errors: WebidlErrors + util: WebidlUtil + converters: WebidlConverters + is: WebidlIs + attributes: WebIDLExtendedAttributes + + /** + * @description Performs a brand-check on {@param V} to ensure it is a + * {@param cls} object. + */ + brandCheck unknown>(V: unknown, cls: Interface): asserts V is Interface + + brandCheckMultiple unknown)[]> (list: Interfaces): (V: any) => asserts V is Interfaces[number] + + /** + * @see https://webidl.spec.whatwg.org/#es-sequence + * @description Convert a value, V, to a WebIDL sequence type. + */ + sequenceConverter (C: Converter): SequenceConverter + + illegalConstructor (): never + + /** + * @see https://webidl.spec.whatwg.org/#es-to-record + * @description Convert a value, V, to a WebIDL record type. + */ + recordConverter ( + keyConverter: Converter, + valueConverter: Converter + ): RecordConverter + + /** + * Similar to {@link Webidl.brandCheck} but allows skipping the check if third party + * interfaces are allowed. + */ + interfaceConverter (typeCheck: WebidlIsFunction, name: string): ( + V: unknown, + prefix: string, + argument: string + ) => asserts V is Interface + + // TODO(@KhafraDev): a type could likely be implemented that can infer the return type + // from the converters given? + /** + * Converts a value, V, to a WebIDL dictionary types. Allows limiting which keys are + * allowed, values allowed, optional and required keys. Auto converts the value to + * a type given a converter. + */ + dictionaryConverter (converters: { + key: string, + defaultValue?: () => unknown, + required?: boolean, + converter: (...args: unknown[]) => unknown, + allowedValues?: unknown[] + }[]): (V: unknown) => Record + + /** + * @see https://webidl.spec.whatwg.org/#idl-nullable-type + * @description allows a type, V, to be null + */ + nullableConverter ( + converter: Converter + ): (V: unknown) => ReturnType | null + + argumentLengthCheck (args: { length: number }, min: number, context: string): void +} + +interface WebIDLExtendedAttributes { + /** https://webidl.spec.whatwg.org/#Clamp */ + Clamp: number + /** https://webidl.spec.whatwg.org/#EnforceRange */ + EnforceRange: number + /** https://webidl.spec.whatwg.org/#AllowShared */ + AllowShared: number + /** https://webidl.spec.whatwg.org/#AllowResizable */ + AllowResizable: number + /** https://webidl.spec.whatwg.org/#LegacyNullToEmptyString */ + LegacyNullToEmptyString: number +} diff --git a/node_modules/undici-types/websocket.d.ts b/node_modules/undici-types/websocket.d.ts new file mode 100644 index 0000000..d48b9da --- /dev/null +++ b/node_modules/undici-types/websocket.d.ts @@ -0,0 +1,188 @@ +/// + +import type { Blob } from 'node:buffer' +import type { ReadableStream, WritableStream } from 'node:stream/web' +import type { MessagePort } from 'node:worker_threads' +import { + EventInit, + EventListenerOptions, + AddEventListenerOptions, + EventListenerOrEventListenerObject +} from './patch' +import Dispatcher from './dispatcher' +import { HeadersInit } from './fetch' + +export type BinaryType = 'blob' | 'arraybuffer' + +interface WebSocketEventMap { + close: CloseEvent + error: ErrorEvent + message: MessageEvent + open: Event +} + +interface WebSocket extends EventTarget { + binaryType: BinaryType + + readonly bufferedAmount: number + readonly extensions: string + + onclose: ((this: WebSocket, ev: WebSocketEventMap['close']) => any) | null + onerror: ((this: WebSocket, ev: WebSocketEventMap['error']) => any) | null + onmessage: ((this: WebSocket, ev: WebSocketEventMap['message']) => any) | null + onopen: ((this: WebSocket, ev: WebSocketEventMap['open']) => any) | null + + readonly protocol: string + readonly readyState: number + readonly url: string + + close(code?: number, reason?: string): void + send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void + + readonly CLOSED: number + readonly CLOSING: number + readonly CONNECTING: number + readonly OPEN: number + + addEventListener( + type: K, + listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, + options?: boolean | AddEventListenerOptions + ): void + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions + ): void + removeEventListener( + type: K, + listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, + options?: boolean | EventListenerOptions + ): void + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions + ): void +} + +export declare const WebSocket: { + prototype: WebSocket + new (url: string | URL, protocols?: string | string[] | WebSocketInit): WebSocket + readonly CLOSED: number + readonly CLOSING: number + readonly CONNECTING: number + readonly OPEN: number +} + +interface CloseEventInit extends EventInit { + code?: number + reason?: string + wasClean?: boolean +} + +interface CloseEvent extends Event { + readonly code: number + readonly reason: string + readonly wasClean: boolean +} + +export declare const CloseEvent: { + prototype: CloseEvent + new (type: string, eventInitDict?: CloseEventInit): CloseEvent +} + +interface MessageEventInit extends EventInit { + data?: T + lastEventId?: string + origin?: string + ports?: MessagePort[] + source?: MessagePort | null +} + +interface MessageEvent extends Event { + readonly data: T + readonly lastEventId: string + readonly origin: string + readonly ports: readonly MessagePort[] + readonly source: MessagePort | null + initMessageEvent( + type: string, + bubbles?: boolean, + cancelable?: boolean, + data?: any, + origin?: string, + lastEventId?: string, + source?: MessagePort | null, + ports?: MessagePort[] + ): void; +} + +export declare const MessageEvent: { + prototype: MessageEvent + new(type: string, eventInitDict?: MessageEventInit): MessageEvent +} + +interface ErrorEventInit extends EventInit { + message?: string + filename?: string + lineno?: number + colno?: number + error?: any +} + +interface ErrorEvent extends Event { + readonly message: string + readonly filename: string + readonly lineno: number + readonly colno: number + readonly error: Error +} + +export declare const ErrorEvent: { + prototype: ErrorEvent + new (type: string, eventInitDict?: ErrorEventInit): ErrorEvent +} + +interface WebSocketInit { + protocols?: string | string[], + dispatcher?: Dispatcher, + headers?: HeadersInit +} + +interface WebSocketStreamOptions { + protocols?: string | string[] + signal?: AbortSignal +} + +interface WebSocketCloseInfo { + closeCode: number + reason: string +} + +interface WebSocketStream { + closed: Promise + opened: Promise<{ + extensions: string + protocol: string + readable: ReadableStream + writable: WritableStream + }> + url: string + + close(options?: Partial): void +} + +export declare const WebSocketStream: { + prototype: WebSocketStream + new (url: string | URL, options?: WebSocketStreamOptions): WebSocketStream +} + +interface WebSocketError extends Event, WebSocketCloseInfo {} + +export declare const WebSocketError: { + prototype: WebSocketError + new (type: string, init?: WebSocketCloseInfo): WebSocketError +} + +export declare const ping: (ws: WebSocket, body?: Buffer) => void diff --git a/node_modules/universalify/LICENSE b/node_modules/universalify/LICENSE new file mode 100644 index 0000000..514e84e --- /dev/null +++ b/node_modules/universalify/LICENSE @@ -0,0 +1,20 @@ +(The MIT License) + +Copyright (c) 2017, Ryan Zimmerman + +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/universalify/README.md b/node_modules/universalify/README.md new file mode 100644 index 0000000..1184939 --- /dev/null +++ b/node_modules/universalify/README.md @@ -0,0 +1,76 @@ +# universalify + +![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/RyanZim/universalify/ci.yml?branch=master) +![Coveralls github branch](https://img.shields.io/coveralls/github/RyanZim/universalify/master.svg) +![npm](https://img.shields.io/npm/dm/universalify.svg) +![npm](https://img.shields.io/npm/l/universalify.svg) + +Make a callback- or promise-based function support both promises and callbacks. + +Uses the native promise implementation. + +## Installation + +```bash +npm install universalify +``` + +## API + +### `universalify.fromCallback(fn)` + +Takes a callback-based function to universalify, and returns the universalified function. + +Function must take a callback as the last parameter that will be called with the signature `(error, result)`. `universalify` does not support calling the callback with three or more arguments, and does not ensure that the callback is only called once. + +```js +function callbackFn (n, cb) { + setTimeout(() => cb(null, n), 15) +} + +const fn = universalify.fromCallback(callbackFn) + +// Works with Promises: +fn('Hello World!') +.then(result => console.log(result)) // -> Hello World! +.catch(error => console.error(error)) + +// Works with Callbacks: +fn('Hi!', (error, result) => { + if (error) return console.error(error) + console.log(result) + // -> Hi! +}) +``` + +### `universalify.fromPromise(fn)` + +Takes a promise-based function to universalify, and returns the universalified function. + +Function must return a valid JS promise. `universalify` does not ensure that a valid promise is returned. + +```js +function promiseFn (n) { + return new Promise(resolve => { + setTimeout(() => resolve(n), 15) + }) +} + +const fn = universalify.fromPromise(promiseFn) + +// Works with Promises: +fn('Hello World!') +.then(result => console.log(result)) // -> Hello World! +.catch(error => console.error(error)) + +// Works with Callbacks: +fn('Hi!', (error, result) => { + if (error) return console.error(error) + console.log(result) + // -> Hi! +}) +``` + +## License + +MIT diff --git a/node_modules/universalify/index.js b/node_modules/universalify/index.js new file mode 100644 index 0000000..233beac --- /dev/null +++ b/node_modules/universalify/index.js @@ -0,0 +1,24 @@ +'use strict' + +exports.fromCallback = function (fn) { + return Object.defineProperty(function (...args) { + if (typeof args[args.length - 1] === 'function') fn.apply(this, args) + else { + return new Promise((resolve, reject) => { + args.push((err, res) => (err != null) ? reject(err) : resolve(res)) + fn.apply(this, args) + }) + } + }, 'name', { value: fn.name }) +} + +exports.fromPromise = function (fn) { + return Object.defineProperty(function (...args) { + const cb = args[args.length - 1] + if (typeof cb !== 'function') return fn.apply(this, args) + else { + args.pop() + fn.apply(this, args).then(r => cb(null, r), cb) + } + }, 'name', { value: fn.name }) +} diff --git a/node_modules/universalify/package.json b/node_modules/universalify/package.json new file mode 100644 index 0000000..d60fccb --- /dev/null +++ b/node_modules/universalify/package.json @@ -0,0 +1,34 @@ +{ + "name": "universalify", + "version": "2.0.1", + "description": "Make a callback- or promise-based function support both promises and callbacks.", + "keywords": [ + "callback", + "native", + "promise" + ], + "homepage": "https://github.com/RyanZim/universalify#readme", + "bugs": "https://github.com/RyanZim/universalify/issues", + "license": "MIT", + "author": "Ryan Zimmerman ", + "files": [ + "index.js" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/RyanZim/universalify.git" + }, + "scripts": { + "test": "standard && nyc --reporter text --reporter lcovonly tape test/*.js | colortape" + }, + "devDependencies": { + "colortape": "^0.1.2", + "coveralls": "^3.0.1", + "nyc": "^15.0.0", + "standard": "^14.3.1", + "tape": "^5.0.1" + }, + "engines": { + "node": ">= 10.0.0" + } +} diff --git a/node_modules/untildify/index.d.ts b/node_modules/untildify/index.d.ts new file mode 100644 index 0000000..8672d9f --- /dev/null +++ b/node_modules/untildify/index.d.ts @@ -0,0 +1,14 @@ +/** +Convert a tilde path to an absolute path: `~/dev` → `/Users/sindresorhus/dev`. + +@example +``` +import untildify = require('untildify'); + +untildify('~/dev'); +//=> '/Users/sindresorhus/dev' +``` +*/ +declare function untildify(pathWithTilde: string): string; + +export = untildify; diff --git a/node_modules/untildify/index.js b/node_modules/untildify/index.js new file mode 100644 index 0000000..c82d3c1 --- /dev/null +++ b/node_modules/untildify/index.js @@ -0,0 +1,12 @@ +'use strict'; +const os = require('os'); + +const homeDirectory = os.homedir(); + +module.exports = pathWithTilde => { + if (typeof pathWithTilde !== 'string') { + throw new TypeError(`Expected a string, got ${typeof pathWithTilde}`); + } + + return homeDirectory ? pathWithTilde.replace(/^~(?=$|\/|\\)/, homeDirectory) : pathWithTilde; +}; diff --git a/node_modules/untildify/license b/node_modules/untildify/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/untildify/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/untildify/package.json b/node_modules/untildify/package.json new file mode 100644 index 0000000..bc70c68 --- /dev/null +++ b/node_modules/untildify/package.json @@ -0,0 +1,43 @@ +{ + "name": "untildify", + "version": "4.0.0", + "description": "Convert a tilde path to an absolute path: `~/dev` → `/Users/sindresorhus/dev`", + "license": "MIT", + "repository": "sindresorhus/untildify", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "contributors": [ + "silverwind (https://silverwind.io)" + ], + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "tilde", + "expansion", + "expand", + "untildify", + "path", + "home", + "directory", + "user", + "shell", + "bash" + ], + "devDependencies": { + "ava": "^1.4.1", + "rewire": "^4.0.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/untildify/readme.md b/node_modules/untildify/readme.md new file mode 100644 index 0000000..5f38db2 --- /dev/null +++ b/node_modules/untildify/readme.md @@ -0,0 +1,30 @@ +# untildify [![Build Status](https://travis-ci.org/sindresorhus/untildify.svg?branch=master)](https://travis-ci.org/sindresorhus/untildify) + +> Convert a tilde path to an absolute path: `~/dev` → `/Users/sindresorhus/dev` + + +## Install + +``` +$ npm install untildify +``` + + +## Usage + +```js +const untildify = require('untildify'); + +untildify('~/dev'); +//=> '/Users/sindresorhus/dev' +``` + + +## Related + +See [tildify](https://github.com/sindresorhus/tildify) for the inverse. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/util-deprecate/History.md b/node_modules/util-deprecate/History.md new file mode 100644 index 0000000..acc8675 --- /dev/null +++ b/node_modules/util-deprecate/History.md @@ -0,0 +1,16 @@ + +1.0.2 / 2015-10-07 +================== + + * use try/catch when checking `localStorage` (#3, @kumavis) + +1.0.1 / 2014-11-25 +================== + + * browser: use `console.warn()` for deprecation calls + * browser: more jsdocs + +1.0.0 / 2014-04-30 +================== + + * initial commit diff --git a/node_modules/util-deprecate/LICENSE b/node_modules/util-deprecate/LICENSE new file mode 100644 index 0000000..6a60e8c --- /dev/null +++ b/node_modules/util-deprecate/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +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/util-deprecate/README.md b/node_modules/util-deprecate/README.md new file mode 100644 index 0000000..75622fa --- /dev/null +++ b/node_modules/util-deprecate/README.md @@ -0,0 +1,53 @@ +util-deprecate +============== +### The Node.js `util.deprecate()` function with browser support + +In Node.js, this module simply re-exports the `util.deprecate()` function. + +In the web browser (i.e. via browserify), a browser-specific implementation +of the `util.deprecate()` function is used. + + +## API + +A `deprecate()` function is the only thing exposed by this module. + +``` javascript +// setup: +exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); + + +// users see: +foo(); +// foo() is deprecated, use bar() instead +foo(); +foo(); +``` + + +## License + +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +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/util-deprecate/browser.js b/node_modules/util-deprecate/browser.js new file mode 100644 index 0000000..549ae2f --- /dev/null +++ b/node_modules/util-deprecate/browser.js @@ -0,0 +1,67 @@ + +/** + * Module exports. + */ + +module.exports = deprecate; + +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ + +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ + +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} diff --git a/node_modules/util-deprecate/node.js b/node_modules/util-deprecate/node.js new file mode 100644 index 0000000..5e6fcff --- /dev/null +++ b/node_modules/util-deprecate/node.js @@ -0,0 +1,6 @@ + +/** + * For Node.js, simply re-export the core `util.deprecate` function. + */ + +module.exports = require('util').deprecate; diff --git a/node_modules/util-deprecate/package.json b/node_modules/util-deprecate/package.json new file mode 100644 index 0000000..2e79f89 --- /dev/null +++ b/node_modules/util-deprecate/package.json @@ -0,0 +1,27 @@ +{ + "name": "util-deprecate", + "version": "1.0.2", + "description": "The Node.js `util.deprecate()` function with browser support", + "main": "node.js", + "browser": "browser.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/util-deprecate.git" + }, + "keywords": [ + "util", + "deprecate", + "browserify", + "browser", + "node" + ], + "author": "Nathan Rajlich (http://n8.io/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/TooTallNate/util-deprecate/issues" + }, + "homepage": "https://github.com/TooTallNate/util-deprecate" +} diff --git a/node_modules/which/CHANGELOG.md b/node_modules/which/CHANGELOG.md new file mode 100644 index 0000000..7fb1f20 --- /dev/null +++ b/node_modules/which/CHANGELOG.md @@ -0,0 +1,166 @@ +# Changes + + +## 2.0.2 + +* Rename bin to `node-which` + +## 2.0.1 + +* generate changelog and publish on version bump +* enforce 100% test coverage +* Promise interface + +## 2.0.0 + +* Parallel tests, modern JavaScript, and drop support for node < 8 + +## 1.3.1 + +* update deps +* update travis + +## v1.3.0 + +* Add nothrow option to which.sync +* update tap + +## v1.2.14 + +* appveyor: drop node 5 and 0.x +* travis-ci: add node 6, drop 0.x + +## v1.2.13 + +* test: Pass missing option to pass on windows +* update tap +* update isexe to 2.0.0 +* neveragain.tech pledge request + +## v1.2.12 + +* Removed unused require + +## v1.2.11 + +* Prevent changelog script from being included in package + +## v1.2.10 + +* Use env.PATH only, not env.Path + +## v1.2.9 + +* fix for paths starting with ../ +* Remove unused `is-absolute` module + +## v1.2.8 + +* bullet items in changelog that contain (but don't start with) # + +## v1.2.7 + +* strip 'update changelog' changelog entries out of changelog + +## v1.2.6 + +* make the changelog bulleted + +## v1.2.5 + +* make a changelog, and keep it up to date +* don't include tests in package +* Properly handle relative-path executables +* appveyor +* Attach error code to Not Found error +* Make tests pass on Windows + +## v1.2.4 + +* Fix typo + +## v1.2.3 + +* update isexe, fix regression in pathExt handling + +## v1.2.2 + +* update deps, use isexe module, test windows + +## v1.2.1 + +* Sometimes windows PATH entries are quoted +* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode. +* doc cli + +## v1.2.0 + +* Add support for opt.all and -as cli flags +* test the bin +* update travis +* Allow checking for multiple programs in bin/which +* tap 2 + +## v1.1.2 + +* travis +* Refactored and fixed undefined error on Windows +* Support strict mode + +## v1.1.1 + +* test +g exes against secondary groups, if available +* Use windows exe semantics on cygwin & msys +* cwd should be first in path on win32, not last +* Handle lower-case 'env.Path' on Windows +* Update docs +* use single-quotes + +## v1.1.0 + +* Add tests, depend on is-absolute + +## v1.0.9 + +* which.js: root is allowed to execute files owned by anyone + +## v1.0.8 + +* don't use graceful-fs + +## v1.0.7 + +* add license to package.json + +## v1.0.6 + +* isc license + +## 1.0.5 + +* Awful typo + +## 1.0.4 + +* Test for path absoluteness properly +* win: Allow '' as a pathext if cmd has a . in it + +## 1.0.3 + +* Remove references to execPath +* Make `which.sync()` work on Windows by honoring the PATHEXT variable. +* Make `isExe()` always return true on Windows. +* MIT + +## 1.0.2 + +* Only files can be exes + +## 1.0.1 + +* Respect the PATHEXT env for win32 support +* should 0755 the bin +* binary +* guts +* package +* 1st diff --git a/node_modules/which/LICENSE b/node_modules/which/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/which/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and 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/which/README.md b/node_modules/which/README.md new file mode 100644 index 0000000..cd83350 --- /dev/null +++ b/node_modules/which/README.md @@ -0,0 +1,54 @@ +# which + +Like the unix `which` utility. + +Finds the first instance of a specified executable in the PATH +environment variable. Does not cache the results, so `hash -r` is not +needed when the PATH changes. + +## USAGE + +```javascript +var which = require('which') + +// async usage +which('node', function (er, resolvedPath) { + // er is returned if no "node" is found on the PATH + // if it is found, then the absolute path to the exec is returned +}) + +// or promise +which('node').then(resolvedPath => { ... }).catch(er => { ... not found ... }) + +// sync usage +// throws if not found +var resolved = which.sync('node') + +// if nothrow option is used, returns null if not found +resolved = which.sync('node', {nothrow: true}) + +// Pass options to override the PATH and PATHEXT environment vars. +which('node', { path: someOtherPath }, function (er, resolved) { + if (er) + throw er + console.log('found at %j', resolved) +}) +``` + +## CLI USAGE + +Same as the BSD `which(1)` binary. + +``` +usage: which [-as] program ... +``` + +## OPTIONS + +You may pass an options object as the second argument. + +- `path`: Use instead of the `PATH` environment variable. +- `pathExt`: Use instead of the `PATHEXT` environment variable. +- `all`: Return all matches, instead of just the first one. Note that + this means the function returns an array of strings instead of a + single string. diff --git a/node_modules/which/bin/node-which b/node_modules/which/bin/node-which new file mode 100755 index 0000000..7cee372 --- /dev/null +++ b/node_modules/which/bin/node-which @@ -0,0 +1,52 @@ +#!/usr/bin/env node +var which = require("../") +if (process.argv.length < 3) + usage() + +function usage () { + console.error('usage: which [-as] program ...') + process.exit(1) +} + +var all = false +var silent = false +var dashdash = false +var args = process.argv.slice(2).filter(function (arg) { + if (dashdash || !/^-/.test(arg)) + return true + + if (arg === '--') { + dashdash = true + return false + } + + var flags = arg.substr(1).split('') + for (var f = 0; f < flags.length; f++) { + var flag = flags[f] + switch (flag) { + case 's': + silent = true + break + case 'a': + all = true + break + default: + console.error('which: illegal option -- ' + flag) + usage() + } + } + return false +}) + +process.exit(args.reduce(function (pv, current) { + try { + var f = which.sync(current, { all: all }) + if (all) + f = f.join('\n') + if (!silent) + console.log(f) + return pv; + } catch (e) { + return 1; + } +}, 0)) diff --git a/node_modules/which/package.json b/node_modules/which/package.json new file mode 100644 index 0000000..97ad7fb --- /dev/null +++ b/node_modules/which/package.json @@ -0,0 +1,43 @@ +{ + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "name": "which", + "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", + "version": "2.0.2", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-which.git" + }, + "main": "which.js", + "bin": { + "node-which": "./bin/node-which" + }, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.6.2", + "tap": "^14.6.9" + }, + "scripts": { + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "prepublish": "npm run changelog", + "prechangelog": "bash gen-changelog.sh", + "changelog": "git add CHANGELOG.md", + "postchangelog": "git commit -m 'update changelog - '${npm_package_version}", + "postpublish": "git push origin --follow-tags" + }, + "files": [ + "which.js", + "bin/node-which" + ], + "tap": { + "check-coverage": true + }, + "engines": { + "node": ">= 8" + } +} diff --git a/node_modules/which/which.js b/node_modules/which/which.js new file mode 100644 index 0000000..82afffd --- /dev/null +++ b/node_modules/which/which.js @@ -0,0 +1,125 @@ +const isWindows = process.platform === 'win32' || + process.env.OSTYPE === 'cygwin' || + process.env.OSTYPE === 'msys' + +const path = require('path') +const COLON = isWindows ? ';' : ':' +const isexe = require('isexe') + +const getNotFoundError = (cmd) => + Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' }) + +const getPathInfo = (cmd, opt) => { + const colon = opt.colon || COLON + + // If it has a slash, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [''] + : ( + [ + // windows always checks the cwd first + ...(isWindows ? [process.cwd()] : []), + ...(opt.path || process.env.PATH || + /* istanbul ignore next: very unusual */ '').split(colon), + ] + ) + const pathExtExe = isWindows + ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM' + : '' + const pathExt = isWindows ? pathExtExe.split(colon) : [''] + + if (isWindows) { + if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') + pathExt.unshift('') + } + + return { + pathEnv, + pathExt, + pathExtExe, + } +} + +const which = (cmd, opt, cb) => { + if (typeof opt === 'function') { + cb = opt + opt = {} + } + if (!opt) + opt = {} + + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) + const found = [] + + const step = i => new Promise((resolve, reject) => { + if (i === pathEnv.length) + return opt.all && found.length ? resolve(found) + : reject(getNotFoundError(cmd)) + + const ppRaw = pathEnv[i] + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw + + const pCmd = path.join(pathPart, cmd) + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd + : pCmd + + resolve(subStep(p, i, 0)) + }) + + const subStep = (p, i, ii) => new Promise((resolve, reject) => { + if (ii === pathExt.length) + return resolve(step(i + 1)) + const ext = pathExt[ii] + isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { + if (!er && is) { + if (opt.all) + found.push(p + ext) + else + return resolve(p + ext) + } + return resolve(subStep(p, i, ii + 1)) + }) + }) + + return cb ? step(0).then(res => cb(null, res), cb) : step(0) +} + +const whichSync = (cmd, opt) => { + opt = opt || {} + + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) + const found = [] + + for (let i = 0; i < pathEnv.length; i ++) { + const ppRaw = pathEnv[i] + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw + + const pCmd = path.join(pathPart, cmd) + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd + : pCmd + + for (let j = 0; j < pathExt.length; j ++) { + const cur = p + pathExt[j] + try { + const is = isexe.sync(cur, { pathExt: pathExtExe }) + if (is) { + if (opt.all) + found.push(cur) + else + return cur + } + } catch (ex) {} + } + } + + if (opt.all && found.length) + return found + + if (opt.nothrow) + return null + + throw getNotFoundError(cmd) +} + +module.exports = which +which.sync = whichSync diff --git a/node_modules/wrap-ansi/index.js b/node_modules/wrap-ansi/index.js new file mode 100755 index 0000000..d502255 --- /dev/null +++ b/node_modules/wrap-ansi/index.js @@ -0,0 +1,216 @@ +'use strict'; +const stringWidth = require('string-width'); +const stripAnsi = require('strip-ansi'); +const ansiStyles = require('ansi-styles'); + +const ESCAPES = new Set([ + '\u001B', + '\u009B' +]); + +const END_CODE = 39; + +const ANSI_ESCAPE_BELL = '\u0007'; +const ANSI_CSI = '['; +const ANSI_OSC = ']'; +const ANSI_SGR_TERMINATOR = 'm'; +const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`; + +const wrapAnsi = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`; +const wrapAnsiHyperlink = uri => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`; + +// Calculate the length of words split on ' ', ignoring +// the extra characters added by ansi escape codes +const wordLengths = string => string.split(' ').map(character => stringWidth(character)); + +// Wrap a long word across multiple rows +// Ansi escape codes do not count towards length +const wrapWord = (rows, word, columns) => { + const characters = [...word]; + + let isInsideEscape = false; + let isInsideLinkEscape = false; + let visible = stringWidth(stripAnsi(rows[rows.length - 1])); + + for (const [index, character] of characters.entries()) { + const characterLength = stringWidth(character); + + if (visible + characterLength <= columns) { + rows[rows.length - 1] += character; + } else { + rows.push(character); + visible = 0; + } + + if (ESCAPES.has(character)) { + isInsideEscape = true; + isInsideLinkEscape = characters.slice(index + 1).join('').startsWith(ANSI_ESCAPE_LINK); + } + + if (isInsideEscape) { + if (isInsideLinkEscape) { + if (character === ANSI_ESCAPE_BELL) { + isInsideEscape = false; + isInsideLinkEscape = false; + } + } else if (character === ANSI_SGR_TERMINATOR) { + isInsideEscape = false; + } + + continue; + } + + visible += characterLength; + + if (visible === columns && index < characters.length - 1) { + rows.push(''); + visible = 0; + } + } + + // It's possible that the last row we copy over is only + // ansi escape characters, handle this edge-case + if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { + rows[rows.length - 2] += rows.pop(); + } +}; + +// Trims spaces from a string ignoring invisible sequences +const stringVisibleTrimSpacesRight = string => { + const words = string.split(' '); + let last = words.length; + + while (last > 0) { + if (stringWidth(words[last - 1]) > 0) { + break; + } + + last--; + } + + if (last === words.length) { + return string; + } + + return words.slice(0, last).join(' ') + words.slice(last).join(''); +}; + +// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode +// +// 'hard' will never allow a string to take up more than columns characters +// +// 'soft' allows long words to expand past the column length +const exec = (string, columns, options = {}) => { + if (options.trim !== false && string.trim() === '') { + return ''; + } + + let returnValue = ''; + let escapeCode; + let escapeUrl; + + const lengths = wordLengths(string); + let rows = ['']; + + for (const [index, word] of string.split(' ').entries()) { + if (options.trim !== false) { + rows[rows.length - 1] = rows[rows.length - 1].trimStart(); + } + + let rowLength = stringWidth(rows[rows.length - 1]); + + if (index !== 0) { + if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) { + // If we start with a new word but the current row length equals the length of the columns, add a new row + rows.push(''); + rowLength = 0; + } + + if (rowLength > 0 || options.trim === false) { + rows[rows.length - 1] += ' '; + rowLength++; + } + } + + // In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns' + if (options.hard && lengths[index] > columns) { + const remainingColumns = (columns - rowLength); + const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); + const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); + if (breaksStartingNextLine < breaksStartingThisLine) { + rows.push(''); + } + + wrapWord(rows, word, columns); + continue; + } + + if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { + if (options.wordWrap === false && rowLength < columns) { + wrapWord(rows, word, columns); + continue; + } + + rows.push(''); + } + + if (rowLength + lengths[index] > columns && options.wordWrap === false) { + wrapWord(rows, word, columns); + continue; + } + + rows[rows.length - 1] += word; + } + + if (options.trim !== false) { + rows = rows.map(stringVisibleTrimSpacesRight); + } + + const pre = [...rows.join('\n')]; + + for (const [index, character] of pre.entries()) { + returnValue += character; + + if (ESCAPES.has(character)) { + const {groups} = new RegExp(`(?:\\${ANSI_CSI}(?\\d+)m|\\${ANSI_ESCAPE_LINK}(?.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join('')) || {groups: {}}; + if (groups.code !== undefined) { + const code = Number.parseFloat(groups.code); + escapeCode = code === END_CODE ? undefined : code; + } else if (groups.uri !== undefined) { + escapeUrl = groups.uri.length === 0 ? undefined : groups.uri; + } + } + + const code = ansiStyles.codes.get(Number(escapeCode)); + + if (pre[index + 1] === '\n') { + if (escapeUrl) { + returnValue += wrapAnsiHyperlink(''); + } + + if (escapeCode && code) { + returnValue += wrapAnsi(code); + } + } else if (character === '\n') { + if (escapeCode && code) { + returnValue += wrapAnsi(escapeCode); + } + + if (escapeUrl) { + returnValue += wrapAnsiHyperlink(escapeUrl); + } + } + } + + return returnValue; +}; + +// For each newline, invoke the method separately +module.exports = (string, columns, options) => { + return String(string) + .normalize() + .replace(/\r\n/g, '\n') + .split('\n') + .map(line => exec(line, columns, options)) + .join('\n'); +}; diff --git a/node_modules/wrap-ansi/license b/node_modules/wrap-ansi/license new file mode 100644 index 0000000..fa7ceba --- /dev/null +++ b/node_modules/wrap-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://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/wrap-ansi/package.json b/node_modules/wrap-ansi/package.json new file mode 100644 index 0000000..dfb2f4f --- /dev/null +++ b/node_modules/wrap-ansi/package.json @@ -0,0 +1,62 @@ +{ + "name": "wrap-ansi", + "version": "7.0.0", + "description": "Wordwrap a string with ANSI escape codes", + "license": "MIT", + "repository": "chalk/wrap-ansi", + "funding": "https://github.com/chalk/wrap-ansi?sponsor=1", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=10" + }, + "scripts": { + "test": "xo && nyc ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "wrap", + "break", + "wordwrap", + "wordbreak", + "linewrap", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "devDependencies": { + "ava": "^2.1.0", + "chalk": "^4.0.0", + "coveralls": "^3.0.3", + "has-ansi": "^4.0.0", + "nyc": "^15.0.1", + "xo": "^0.29.1" + } +} diff --git a/node_modules/wrap-ansi/readme.md b/node_modules/wrap-ansi/readme.md new file mode 100644 index 0000000..68779ba --- /dev/null +++ b/node_modules/wrap-ansi/readme.md @@ -0,0 +1,91 @@ +# wrap-ansi [![Build Status](https://travis-ci.com/chalk/wrap-ansi.svg?branch=master)](https://travis-ci.com/chalk/wrap-ansi) [![Coverage Status](https://coveralls.io/repos/github/chalk/wrap-ansi/badge.svg?branch=master)](https://coveralls.io/github/chalk/wrap-ansi?branch=master) + +> Wordwrap a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) + +## Install + +``` +$ npm install wrap-ansi +``` + +## Usage + +```js +const chalk = require('chalk'); +const wrapAnsi = require('wrap-ansi'); + +const input = 'The quick brown ' + chalk.red('fox jumped over ') + + 'the lazy ' + chalk.green('dog and then ran away with the unicorn.'); + +console.log(wrapAnsi(input, 20)); +``` + + + +## API + +### wrapAnsi(string, columns, options?) + +Wrap words to the specified column width. + +#### string + +Type: `string` + +String with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk). Newline characters will be normalized to `\n`. + +#### columns + +Type: `number` + +Number of columns to wrap the text to. + +#### options + +Type: `object` + +##### hard + +Type: `boolean`\ +Default: `false` + +By default the wrap is soft, meaning long words may extend past the column width. Setting this to `true` will make it hard wrap at the column width. + +##### wordWrap + +Type: `boolean`\ +Default: `true` + +By default, an attempt is made to split words at spaces, ensuring that they don't extend past the configured columns. If wordWrap is `false`, each column will instead be completely filled splitting words as necessary. + +##### trim + +Type: `boolean`\ +Default: `true` + +Whitespace on all lines is removed by default. Set this option to `false` if you don't want to trim. + +## Related + +- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes +- [cli-truncate](https://github.com/sindresorhus/cli-truncate) - Truncate a string to a specific width in the terminal +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right +- [jsesc](https://github.com/mathiasbynens/jsesc) - Generate ASCII-only output from Unicode strings. Useful for creating test fixtures. + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) +- [Benjamin Coe](https://github.com/bcoe) + +--- + +

+ + 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/xml2js/LICENSE b/node_modules/xml2js/LICENSE new file mode 100644 index 0000000..e3b4222 --- /dev/null +++ b/node_modules/xml2js/LICENSE @@ -0,0 +1,19 @@ +Copyright 2010, 2011, 2012, 2013. All rights reserved. + +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/xml2js/README.md b/node_modules/xml2js/README.md new file mode 100644 index 0000000..67f2104 --- /dev/null +++ b/node_modules/xml2js/README.md @@ -0,0 +1,507 @@ +node-xml2js +=========== + +Ever had the urge to parse XML? And wanted to access the data in some sane, +easy way? Don't want to compile a C parser, for whatever reason? Then xml2js is +what you're looking for! + +Description +=========== + +Simple XML to JavaScript object converter. It supports bi-directional conversion. +Uses [sax-js](https://github.com/isaacs/sax-js/) and +[xmlbuilder-js](https://github.com/oozcitak/xmlbuilder-js/). + +Note: If you're looking for a full DOM parser, you probably want +[JSDom](https://github.com/tmpvar/jsdom). + +Installation +============ + +Simplest way to install `xml2js` is to use [npm](http://npmjs.org), just `npm +install xml2js` which will download xml2js and all dependencies. + +xml2js is also available via [Bower](http://bower.io/), just `bower install +xml2js` which will download xml2js and all dependencies. + +Usage +===== + +No extensive tutorials required because you are a smart developer! The task of +parsing XML should be an easy one, so let's make it so! Here's some examples. + +Shoot-and-forget usage +---------------------- + +You want to parse XML as simple and easy as possible? It's dangerous to go +alone, take this: + +```javascript +var parseString = require('xml2js').parseString; +var xml = "Hello xml2js!" +parseString(xml, function (err, result) { + console.dir(result); +}); +``` + +Can't get easier than this, right? This works starting with `xml2js` 0.2.3. +With CoffeeScript it looks like this: + +```coffeescript +{parseString} = require 'xml2js' +xml = "Hello xml2js!" +parseString xml, (err, result) -> + console.dir result +``` + +If you need some special options, fear not, `xml2js` supports a number of +options (see below), you can specify these as second argument: + +```javascript +parseString(xml, {trim: true}, function (err, result) { +}); +``` + +Simple as pie usage +------------------- + +That's right, if you have been using xml-simple or a home-grown +wrapper, this was added in 0.1.11 just for you: + +```javascript +var fs = require('fs'), + xml2js = require('xml2js'); + +var parser = new xml2js.Parser(); +fs.readFile(__dirname + '/foo.xml', function(err, data) { + parser.parseString(data, function (err, result) { + console.dir(result); + console.log('Done'); + }); +}); +``` + +Look ma, no event listeners! + +You can also use `xml2js` from +[CoffeeScript](https://github.com/jashkenas/coffeescript), further reducing +the clutter: + +```coffeescript +fs = require 'fs', +xml2js = require 'xml2js' + +parser = new xml2js.Parser() +fs.readFile __dirname + '/foo.xml', (err, data) -> + parser.parseString data, (err, result) -> + console.dir result + console.log 'Done.' +``` + +But what happens if you forget the `new` keyword to create a new `Parser`? In +the middle of a nightly coding session, it might get lost, after all. Worry +not, we got you covered! Starting with 0.2.8 you can also leave it out, in +which case `xml2js` will helpfully add it for you, no bad surprises and +inexplicable bugs! + +Promise usage +------------- + +```javascript +var xml2js = require('xml2js'); +var xml = ''; + +// With parser +var parser = new xml2js.Parser(/* options */); +parser.parseStringPromise(xml).then(function (result) { + console.dir(result); + console.log('Done'); +}) +.catch(function (err) { + // Failed +}); + +// Without parser +xml2js.parseStringPromise(xml /*, options */).then(function (result) { + console.dir(result); + console.log('Done'); +}) +.catch(function (err) { + // Failed +}); +``` + +Parsing multiple files +---------------------- + +If you want to parse multiple files, you have multiple possibilities: + + * You can create one `xml2js.Parser` per file. That's the recommended one + and is promised to always *just work*. + * You can call `reset()` on your parser object. + * You can hope everything goes well anyway. This behaviour is not + guaranteed work always, if ever. Use option #1 if possible. Thanks! + +So you wanna some JSON? +----------------------- + +Just wrap the `result` object in a call to `JSON.stringify` like this +`JSON.stringify(result)`. You get a string containing the JSON representation +of the parsed object that you can feed to JSON-hungry consumers. + +Displaying results +------------------ + +You might wonder why, using `console.dir` or `console.log` the output at some +level is only `[Object]`. Don't worry, this is not because `xml2js` got lazy. +That's because Node uses `util.inspect` to convert the object into strings and +that function stops after `depth=2` which is a bit low for most XML. + +To display the whole deal, you can use `console.log(util.inspect(result, false, +null))`, which displays the whole result. + +So much for that, but what if you use +[eyes](https://github.com/cloudhead/eyes.js) for nice colored output and it +truncates the output with `…`? Don't fear, there's also a solution for that, +you just need to increase the `maxLength` limit by creating a custom inspector +`var inspect = require('eyes').inspector({maxLength: false})` and then you can +easily `inspect(result)`. + +XML builder usage +----------------- + +Since 0.4.0, objects can be also be used to build XML: + +```javascript +var xml2js = require('xml2js'); + +var obj = {name: "Super", Surname: "Man", age: 23}; + +var builder = new xml2js.Builder(); +var xml = builder.buildObject(obj); +``` +will result in: + +```xml + + + Super + Man + 23 + +``` + +At the moment, a one to one bi-directional conversion is guaranteed only for +default configuration, except for `attrkey`, `charkey` and `explicitArray` options +you can redefine to your taste. Writing CDATA is supported via setting the `cdata` +option to `true`. + +To specify attributes: +```javascript +var xml2js = require('xml2js'); + +var obj = {root: {$: {id: "my id"}, _: "my inner text"}}; + +var builder = new xml2js.Builder(); +var xml = builder.buildObject(obj); +``` +will result in: +```xml + +my inner text +``` + +### Adding xmlns attributes + +You can generate XML that declares XML namespace prefix / URI pairs with xmlns attributes. + +Example declaring a default namespace on the root element: + +```javascript +let obj = { + Foo: { + $: { + "xmlns": "http://foo.com" + } + } +}; +``` +Result of `buildObject(obj)`: +```xml + +``` +Example declaring non-default namespaces on non-root elements: +```javascript +let obj = { + 'foo:Foo': { + $: { + 'xmlns:foo': 'http://foo.com' + }, + 'bar:Bar': { + $: { + 'xmlns:bar': 'http://bar.com' + } + } + } +} +``` +Result of `buildObject(obj)`: +```xml + + + +``` + + +Processing attribute, tag names and values +------------------------------------------ + +Since 0.4.1 you can optionally provide the parser with attribute name and tag name processors as well as element value processors (Since 0.4.14, you can also optionally provide the parser with attribute value processors): + +```javascript + +function nameToUpperCase(name){ + return name.toUpperCase(); +} + +//transform all attribute and tag names and values to uppercase +parseString(xml, { + tagNameProcessors: [nameToUpperCase], + attrNameProcessors: [nameToUpperCase], + valueProcessors: [nameToUpperCase], + attrValueProcessors: [nameToUpperCase]}, + function (err, result) { + // processed data +}); +``` + +The `tagNameProcessors` and `attrNameProcessors` options +accept an `Array` of functions with the following signature: + +```javascript +function (name){ + //do something with `name` + return name +} +``` + +The `attrValueProcessors` and `valueProcessors` options +accept an `Array` of functions with the following signature: + +```javascript +function (value, name) { + //`name` will be the node name or attribute name + //do something with `value`, (optionally) dependent on the node/attr name + return value +} +``` + +Some processors are provided out-of-the-box and can be found in `lib/processors.js`: + +- `normalize`: transforms the name to lowercase. +(Automatically used when `options.normalize` is set to `true`) + +- `firstCharLowerCase`: transforms the first character to lower case. +E.g. 'MyTagName' becomes 'myTagName' + +- `stripPrefix`: strips the xml namespace prefix. E.g `` will become 'Bar'. +(N.B.: the `xmlns` prefix is NOT stripped.) + +- `parseNumbers`: parses integer-like strings as integers and float-like strings as floats +E.g. "0" becomes 0 and "15.56" becomes 15.56 + +- `parseBooleans`: parses boolean-like strings to booleans +E.g. "true" becomes true and "False" becomes false + +Options +======= + +Apart from the default settings, there are a number of options that can be +specified for the parser. Options are specified by ``new Parser({optionName: +value})``. Possible options are: + + * `attrkey` (default: `$`): Prefix that is used to access the attributes. + Version 0.1 default was `@`. + * `charkey` (default: `_`): Prefix that is used to access the character + content. Version 0.1 default was `#`. + * `explicitCharkey` (default: `false`) Determines whether or not to use + a `charkey` prefix for elements with no attributes. + * `trim` (default: `false`): Trim the whitespace at the beginning and end of + text nodes. + * `normalizeTags` (default: `false`): Normalize all tag names to lowercase. + * `normalize` (default: `false`): Trim whitespaces inside text nodes. + * `explicitRoot` (default: `true`): Set this if you want to get the root + node in the resulting object. + * `emptyTag` (default: `''`): what will the value of empty nodes be. In case + you want to use an empty object as a default value, it is better to provide a factory + function `() => ({})` instead. Without this function a plain object would + become a shared reference across all occurrences with unwanted behavior. + * `explicitArray` (default: `true`): Always put child nodes in an array if + true; otherwise an array is created only if there is more than one. + * `ignoreAttrs` (default: `false`): Ignore all XML attributes and only create + text nodes. + * `mergeAttrs` (default: `false`): Merge attributes and child elements as + properties of the parent, instead of keying attributes off a child + attribute object. This option is ignored if `ignoreAttrs` is `true`. + * `validator` (default `null`): You can specify a callable that validates + the resulting structure somehow, however you want. See unit tests + for an example. + * `xmlns` (default `false`): Give each element a field usually called '$ns' + (the first character is the same as attrkey) that contains its local name + and namespace URI. + * `explicitChildren` (default `false`): Put child elements to separate + property. Doesn't work with `mergeAttrs = true`. If element has no children + then "children" won't be created. Added in 0.2.5. + * `childkey` (default `$$`): Prefix that is used to access child elements if + `explicitChildren` is set to `true`. Added in 0.2.5. + * `preserveChildrenOrder` (default `false`): Modifies the behavior of + `explicitChildren` so that the value of the "children" property becomes an + ordered array. When this is `true`, every node will also get a `#name` field + whose value will correspond to the XML nodeName, so that you may iterate + the "children" array and still be able to determine node names. The named + (and potentially unordered) properties are also retained in this + configuration at the same level as the ordered "children" array. Added in + 0.4.9. + * `charsAsChildren` (default `false`): Determines whether chars should be + considered children if `explicitChildren` is on. Added in 0.2.5. + * `includeWhiteChars` (default `false`): Determines whether whitespace-only + text nodes should be included. Added in 0.4.17. + * `async` (default `false`): Should the callbacks be async? This *might* be + an incompatible change if your code depends on sync execution of callbacks. + Future versions of `xml2js` might change this default, so the recommendation + is to not depend on sync execution anyway. Added in 0.2.6. + * `strict` (default `true`): Set sax-js to strict or non-strict parsing mode. + Defaults to `true` which is *highly* recommended, since parsing HTML which + is not well-formed XML might yield just about anything. Added in 0.2.7. + * `attrNameProcessors` (default: `null`): Allows the addition of attribute + name processing functions. Accepts an `Array` of functions with following + signature: + ```javascript + function (name){ + //do something with `name` + return name + } + ``` + Added in 0.4.14 + * `attrValueProcessors` (default: `null`): Allows the addition of attribute + value processing functions. Accepts an `Array` of functions with following + signature: + ```javascript + function (value, name){ + //do something with `name` + return name + } + ``` + Added in 0.4.1 + * `tagNameProcessors` (default: `null`): Allows the addition of tag name + processing functions. Accepts an `Array` of functions with following + signature: + ```javascript + function (name){ + //do something with `name` + return name + } + ``` + Added in 0.4.1 + * `valueProcessors` (default: `null`): Allows the addition of element value + processing functions. Accepts an `Array` of functions with following + signature: + ```javascript + function (value, name){ + //do something with `name` + return name + } + ``` + Added in 0.4.6 + +Options for the `Builder` class +------------------------------- +These options are specified by ``new Builder({optionName: value})``. +Possible options are: + + * `attrkey` (default: `$`): Prefix that is used to access the attributes. + Version 0.1 default was `@`. + * `charkey` (default: `_`): Prefix that is used to access the character + content. Version 0.1 default was `#`. + * `rootName` (default `root` or the root key name): root element name to be used in case + `explicitRoot` is `false` or to override the root element name. + * `renderOpts` (default `{ 'pretty': true, 'indent': ' ', 'newline': '\n' }`): + Rendering options for xmlbuilder-js. + * pretty: prettify generated XML + * indent: whitespace for indentation (only when pretty) + * newline: newline char (only when pretty) + * `xmldec` (default `{ 'version': '1.0', 'encoding': 'UTF-8', 'standalone': true }`: + XML declaration attributes. + * `xmldec.version` A version number string, e.g. 1.0 + * `xmldec.encoding` Encoding declaration, e.g. UTF-8 + * `xmldec.standalone` standalone document declaration: true or false + * `doctype` (default `null`): optional DTD. Eg. `{'ext': 'hello.dtd'}` + * `headless` (default: `false`): omit the XML header. Added in 0.4.3. + * `allowSurrogateChars` (default: `false`): allows using characters from the Unicode + surrogate blocks. + * `cdata` (default: `false`): wrap text nodes in `` instead of + escaping when necessary. Does not add `` if it is not required. + Added in 0.4.5. + +`renderOpts`, `xmldec`,`doctype` and `headless` pass through to +[xmlbuilder-js](https://github.com/oozcitak/xmlbuilder-js). + +Updating to new version +======================= + +Version 0.2 changed the default parsing settings, but version 0.1.14 introduced +the default settings for version 0.2, so these settings can be tried before the +migration. + +```javascript +var xml2js = require('xml2js'); +var parser = new xml2js.Parser(xml2js.defaults["0.2"]); +``` + +To get the 0.1 defaults in version 0.2 you can just use +`xml2js.defaults["0.1"]` in the same place. This provides you with enough time +to migrate to the saner way of parsing in `xml2js` 0.2. We try to make the +migration as simple and gentle as possible, but some breakage cannot be +avoided. + +So, what exactly did change and why? In 0.2 we changed some defaults to parse +the XML in a more universal and sane way. So we disabled `normalize` and `trim` +so `xml2js` does not cut out any text content. You can reenable this at will of +course. A more important change is that we return the root tag in the resulting +JavaScript structure via the `explicitRoot` setting, so you need to access the +first element. This is useful for anybody who wants to know what the root node +is and preserves more information. The last major change was to enable +`explicitArray`, so everytime it is possible that one might embed more than one +sub-tag into a tag, xml2js >= 0.2 returns an array even if the array just +includes one element. This is useful when dealing with APIs that return +variable amounts of subtags. + +Running tests, development +========================== + +[![Build Status](https://travis-ci.org/Leonidas-from-XIV/node-xml2js.svg?branch=master)](https://travis-ci.org/Leonidas-from-XIV/node-xml2js) +[![Coverage Status](https://coveralls.io/repos/Leonidas-from-XIV/node-xml2js/badge.svg?branch=)](https://coveralls.io/r/Leonidas-from-XIV/node-xml2js?branch=master) +[![Dependency Status](https://david-dm.org/Leonidas-from-XIV/node-xml2js.svg)](https://david-dm.org/Leonidas-from-XIV/node-xml2js) + +The development requirements are handled by npm, you just need to install them. +We also have a number of unit tests, they can be run using `npm test` directly +from the project root. This runs zap to discover all the tests and execute +them. + +If you like to contribute, keep in mind that `xml2js` is written in +CoffeeScript, so don't develop on the JavaScript files that are checked into +the repository for convenience reasons. Also, please write some unit test to +check your behaviour and if it is some user-facing thing, add some +documentation to this README, so people will know it exists. Thanks in advance! + +Getting support +=============== + +Please, if you have a problem with the library, first make sure you read this +README. If you read this far, thanks, you're good. Then, please make sure your +problem really is with `xml2js`. It is? Okay, then I'll look at it. Send me a +mail and we can talk. Please don't open issues, as I don't think that is the +proper forum for support problems. Some problems might as well really be bugs +in `xml2js`, if so I'll let you know to open an issue instead :) + +But if you know you really found a bug, feel free to open an issue instead. diff --git a/node_modules/xml2js/lib/bom.js b/node_modules/xml2js/lib/bom.js new file mode 100644 index 0000000..7b8fb27 --- /dev/null +++ b/node_modules/xml2js/lib/bom.js @@ -0,0 +1,12 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + "use strict"; + exports.stripBOM = function(str) { + if (str[0] === '\uFEFF') { + return str.substring(1); + } else { + return str; + } + }; + +}).call(this); diff --git a/node_modules/xml2js/lib/builder.js b/node_modules/xml2js/lib/builder.js new file mode 100644 index 0000000..58f3638 --- /dev/null +++ b/node_modules/xml2js/lib/builder.js @@ -0,0 +1,127 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + "use strict"; + var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA, + hasProp = {}.hasOwnProperty; + + builder = require('xmlbuilder'); + + defaults = require('./defaults').defaults; + + requiresCDATA = function(entry) { + return typeof entry === "string" && (entry.indexOf('&') >= 0 || entry.indexOf('>') >= 0 || entry.indexOf('<') >= 0); + }; + + wrapCDATA = function(entry) { + return ""; + }; + + escapeCDATA = function(entry) { + return entry.replace(']]>', ']]]]>'); + }; + + exports.Builder = (function() { + function Builder(opts) { + var key, ref, value; + this.options = {}; + ref = defaults["0.2"]; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + value = ref[key]; + this.options[key] = value; + } + for (key in opts) { + if (!hasProp.call(opts, key)) continue; + value = opts[key]; + this.options[key] = value; + } + } + + Builder.prototype.buildObject = function(rootObj) { + var attrkey, charkey, render, rootElement, rootName; + attrkey = this.options.attrkey; + charkey = this.options.charkey; + if ((Object.keys(rootObj).length === 1) && (this.options.rootName === defaults['0.2'].rootName)) { + rootName = Object.keys(rootObj)[0]; + rootObj = rootObj[rootName]; + } else { + rootName = this.options.rootName; + } + render = (function(_this) { + return function(element, obj) { + var attr, child, entry, index, key, value; + if (typeof obj !== 'object') { + if (_this.options.cdata && requiresCDATA(obj)) { + element.raw(wrapCDATA(obj)); + } else { + element.txt(obj); + } + } else if (Array.isArray(obj)) { + for (index in obj) { + if (!hasProp.call(obj, index)) continue; + child = obj[index]; + for (key in child) { + entry = child[key]; + element = render(element.ele(key), entry).up(); + } + } + } else { + for (key in obj) { + if (!hasProp.call(obj, key)) continue; + child = obj[key]; + if (key === attrkey) { + if (typeof child === "object") { + for (attr in child) { + value = child[attr]; + element = element.att(attr, value); + } + } + } else if (key === charkey) { + if (_this.options.cdata && requiresCDATA(child)) { + element = element.raw(wrapCDATA(child)); + } else { + element = element.txt(child); + } + } else if (Array.isArray(child)) { + for (index in child) { + if (!hasProp.call(child, index)) continue; + entry = child[index]; + if (typeof entry === 'string') { + if (_this.options.cdata && requiresCDATA(entry)) { + element = element.ele(key).raw(wrapCDATA(entry)).up(); + } else { + element = element.ele(key, entry).up(); + } + } else { + element = render(element.ele(key), entry).up(); + } + } + } else if (typeof child === "object") { + element = render(element.ele(key), child).up(); + } else { + if (typeof child === 'string' && _this.options.cdata && requiresCDATA(child)) { + element = element.ele(key).raw(wrapCDATA(child)).up(); + } else { + if (child == null) { + child = ''; + } + element = element.ele(key, child.toString()).up(); + } + } + } + } + return element; + }; + })(this); + rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, { + headless: this.options.headless, + allowSurrogateChars: this.options.allowSurrogateChars + }); + return render(rootElement, rootObj).end(this.options.renderOpts); + }; + + return Builder; + + })(); + +}).call(this); diff --git a/node_modules/xml2js/lib/defaults.js b/node_modules/xml2js/lib/defaults.js new file mode 100644 index 0000000..0a21da0 --- /dev/null +++ b/node_modules/xml2js/lib/defaults.js @@ -0,0 +1,72 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + exports.defaults = { + "0.1": { + explicitCharkey: false, + trim: true, + normalize: true, + normalizeTags: false, + attrkey: "@", + charkey: "#", + explicitArray: false, + ignoreAttrs: false, + mergeAttrs: false, + explicitRoot: false, + validator: null, + xmlns: false, + explicitChildren: false, + childkey: '@@', + charsAsChildren: false, + includeWhiteChars: false, + async: false, + strict: true, + attrNameProcessors: null, + attrValueProcessors: null, + tagNameProcessors: null, + valueProcessors: null, + emptyTag: '' + }, + "0.2": { + explicitCharkey: false, + trim: false, + normalize: false, + normalizeTags: false, + attrkey: "$", + charkey: "_", + explicitArray: true, + ignoreAttrs: false, + mergeAttrs: false, + explicitRoot: true, + validator: null, + xmlns: false, + explicitChildren: false, + preserveChildrenOrder: false, + childkey: '$$', + charsAsChildren: false, + includeWhiteChars: false, + async: false, + strict: true, + attrNameProcessors: null, + attrValueProcessors: null, + tagNameProcessors: null, + valueProcessors: null, + rootName: 'root', + xmldec: { + 'version': '1.0', + 'encoding': 'UTF-8', + 'standalone': true + }, + doctype: null, + renderOpts: { + 'pretty': true, + 'indent': ' ', + 'newline': '\n' + }, + headless: false, + chunkSize: 10000, + emptyTag: '', + cdata: false + } + }; + +}).call(this); diff --git a/node_modules/xml2js/lib/parser.js b/node_modules/xml2js/lib/parser.js new file mode 100644 index 0000000..192382d --- /dev/null +++ b/node_modules/xml2js/lib/parser.js @@ -0,0 +1,385 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + "use strict"; + var bom, defaults, events, isEmpty, processItem, processors, sax, setImmediate, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + sax = require('sax'); + + events = require('events'); + + bom = require('./bom'); + + processors = require('./processors'); + + setImmediate = require('timers').setImmediate; + + defaults = require('./defaults').defaults; + + isEmpty = function(thing) { + return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0; + }; + + processItem = function(processors, item, key) { + var i, len, process; + for (i = 0, len = processors.length; i < len; i++) { + process = processors[i]; + item = process(item, key); + } + return item; + }; + + exports.Parser = (function(superClass) { + extend(Parser, superClass); + + function Parser(opts) { + this.parseStringPromise = bind(this.parseStringPromise, this); + this.parseString = bind(this.parseString, this); + this.reset = bind(this.reset, this); + this.assignOrPush = bind(this.assignOrPush, this); + this.processAsync = bind(this.processAsync, this); + var key, ref, value; + if (!(this instanceof exports.Parser)) { + return new exports.Parser(opts); + } + this.options = {}; + ref = defaults["0.2"]; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + value = ref[key]; + this.options[key] = value; + } + for (key in opts) { + if (!hasProp.call(opts, key)) continue; + value = opts[key]; + this.options[key] = value; + } + if (this.options.xmlns) { + this.options.xmlnskey = this.options.attrkey + "ns"; + } + if (this.options.normalizeTags) { + if (!this.options.tagNameProcessors) { + this.options.tagNameProcessors = []; + } + this.options.tagNameProcessors.unshift(processors.normalize); + } + this.reset(); + } + + Parser.prototype.processAsync = function() { + var chunk, err; + try { + if (this.remaining.length <= this.options.chunkSize) { + chunk = this.remaining; + this.remaining = ''; + this.saxParser = this.saxParser.write(chunk); + return this.saxParser.close(); + } else { + chunk = this.remaining.substr(0, this.options.chunkSize); + this.remaining = this.remaining.substr(this.options.chunkSize, this.remaining.length); + this.saxParser = this.saxParser.write(chunk); + return setImmediate(this.processAsync); + } + } catch (error1) { + err = error1; + if (!this.saxParser.errThrown) { + this.saxParser.errThrown = true; + return this.emit(err); + } + } + }; + + Parser.prototype.assignOrPush = function(obj, key, newValue) { + if (!(key in obj)) { + if (!this.options.explicitArray) { + return obj[key] = newValue; + } else { + return obj[key] = [newValue]; + } + } else { + if (!(obj[key] instanceof Array)) { + obj[key] = [obj[key]]; + } + return obj[key].push(newValue); + } + }; + + Parser.prototype.reset = function() { + var attrkey, charkey, ontext, stack; + this.removeAllListeners(); + this.saxParser = sax.parser(this.options.strict, { + trim: false, + normalize: false, + xmlns: this.options.xmlns + }); + this.saxParser.errThrown = false; + this.saxParser.onerror = (function(_this) { + return function(error) { + _this.saxParser.resume(); + if (!_this.saxParser.errThrown) { + _this.saxParser.errThrown = true; + return _this.emit("error", error); + } + }; + })(this); + this.saxParser.onend = (function(_this) { + return function() { + if (!_this.saxParser.ended) { + _this.saxParser.ended = true; + return _this.emit("end", _this.resultObject); + } + }; + })(this); + this.saxParser.ended = false; + this.EXPLICIT_CHARKEY = this.options.explicitCharkey; + this.resultObject = null; + stack = []; + attrkey = this.options.attrkey; + charkey = this.options.charkey; + this.saxParser.onopentag = (function(_this) { + return function(node) { + var key, newValue, obj, processedKey, ref; + obj = Object.create(null); + obj[charkey] = ""; + if (!_this.options.ignoreAttrs) { + ref = node.attributes; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + if (!(attrkey in obj) && !_this.options.mergeAttrs) { + obj[attrkey] = Object.create(null); + } + newValue = _this.options.attrValueProcessors ? processItem(_this.options.attrValueProcessors, node.attributes[key], key) : node.attributes[key]; + processedKey = _this.options.attrNameProcessors ? processItem(_this.options.attrNameProcessors, key) : key; + if (_this.options.mergeAttrs) { + _this.assignOrPush(obj, processedKey, newValue); + } else { + obj[attrkey][processedKey] = newValue; + } + } + } + obj["#name"] = _this.options.tagNameProcessors ? processItem(_this.options.tagNameProcessors, node.name) : node.name; + if (_this.options.xmlns) { + obj[_this.options.xmlnskey] = { + uri: node.uri, + local: node.local + }; + } + return stack.push(obj); + }; + })(this); + this.saxParser.onclosetag = (function(_this) { + return function() { + var cdata, emptyStr, key, node, nodeName, obj, objClone, old, s, xpath; + obj = stack.pop(); + nodeName = obj["#name"]; + if (!_this.options.explicitChildren || !_this.options.preserveChildrenOrder) { + delete obj["#name"]; + } + if (obj.cdata === true) { + cdata = obj.cdata; + delete obj.cdata; + } + s = stack[stack.length - 1]; + if (obj[charkey].match(/^\s*$/) && !cdata) { + emptyStr = obj[charkey]; + delete obj[charkey]; + } else { + if (_this.options.trim) { + obj[charkey] = obj[charkey].trim(); + } + if (_this.options.normalize) { + obj[charkey] = obj[charkey].replace(/\s{2,}/g, " ").trim(); + } + obj[charkey] = _this.options.valueProcessors ? processItem(_this.options.valueProcessors, obj[charkey], nodeName) : obj[charkey]; + if (Object.keys(obj).length === 1 && charkey in obj && !_this.EXPLICIT_CHARKEY) { + obj = obj[charkey]; + } + } + if (isEmpty(obj)) { + if (typeof _this.options.emptyTag === 'function') { + obj = _this.options.emptyTag(); + } else { + obj = _this.options.emptyTag !== '' ? _this.options.emptyTag : emptyStr; + } + } + if (_this.options.validator != null) { + xpath = "/" + ((function() { + var i, len, results; + results = []; + for (i = 0, len = stack.length; i < len; i++) { + node = stack[i]; + results.push(node["#name"]); + } + return results; + })()).concat(nodeName).join("/"); + (function() { + var err; + try { + return obj = _this.options.validator(xpath, s && s[nodeName], obj); + } catch (error1) { + err = error1; + return _this.emit("error", err); + } + })(); + } + if (_this.options.explicitChildren && !_this.options.mergeAttrs && typeof obj === 'object') { + if (!_this.options.preserveChildrenOrder) { + node = Object.create(null); + if (_this.options.attrkey in obj) { + node[_this.options.attrkey] = obj[_this.options.attrkey]; + delete obj[_this.options.attrkey]; + } + if (!_this.options.charsAsChildren && _this.options.charkey in obj) { + node[_this.options.charkey] = obj[_this.options.charkey]; + delete obj[_this.options.charkey]; + } + if (Object.getOwnPropertyNames(obj).length > 0) { + node[_this.options.childkey] = obj; + } + obj = node; + } else if (s) { + s[_this.options.childkey] = s[_this.options.childkey] || []; + objClone = Object.create(null); + for (key in obj) { + if (!hasProp.call(obj, key)) continue; + objClone[key] = obj[key]; + } + s[_this.options.childkey].push(objClone); + delete obj["#name"]; + if (Object.keys(obj).length === 1 && charkey in obj && !_this.EXPLICIT_CHARKEY) { + obj = obj[charkey]; + } + } + } + if (stack.length > 0) { + return _this.assignOrPush(s, nodeName, obj); + } else { + if (_this.options.explicitRoot) { + old = obj; + obj = Object.create(null); + obj[nodeName] = old; + } + _this.resultObject = obj; + _this.saxParser.ended = true; + return _this.emit("end", _this.resultObject); + } + }; + })(this); + ontext = (function(_this) { + return function(text) { + var charChild, s; + s = stack[stack.length - 1]; + if (s) { + s[charkey] += text; + if (_this.options.explicitChildren && _this.options.preserveChildrenOrder && _this.options.charsAsChildren && (_this.options.includeWhiteChars || text.replace(/\\n/g, '').trim() !== '')) { + s[_this.options.childkey] = s[_this.options.childkey] || []; + charChild = { + '#name': '__text__' + }; + charChild[charkey] = text; + if (_this.options.normalize) { + charChild[charkey] = charChild[charkey].replace(/\s{2,}/g, " ").trim(); + } + s[_this.options.childkey].push(charChild); + } + return s; + } + }; + })(this); + this.saxParser.ontext = ontext; + return this.saxParser.oncdata = (function(_this) { + return function(text) { + var s; + s = ontext(text); + if (s) { + return s.cdata = true; + } + }; + })(this); + }; + + Parser.prototype.parseString = function(str, cb) { + var err; + if ((cb != null) && typeof cb === "function") { + this.on("end", function(result) { + this.reset(); + return cb(null, result); + }); + this.on("error", function(err) { + this.reset(); + return cb(err); + }); + } + try { + str = str.toString(); + if (str.trim() === '') { + this.emit("end", null); + return true; + } + str = bom.stripBOM(str); + if (this.options.async) { + this.remaining = str; + setImmediate(this.processAsync); + return this.saxParser; + } + return this.saxParser.write(str).close(); + } catch (error1) { + err = error1; + if (!(this.saxParser.errThrown || this.saxParser.ended)) { + this.emit('error', err); + return this.saxParser.errThrown = true; + } else if (this.saxParser.ended) { + throw err; + } + } + }; + + Parser.prototype.parseStringPromise = function(str) { + return new Promise((function(_this) { + return function(resolve, reject) { + return _this.parseString(str, function(err, value) { + if (err) { + return reject(err); + } else { + return resolve(value); + } + }); + }; + })(this)); + }; + + return Parser; + + })(events); + + exports.parseString = function(str, a, b) { + var cb, options, parser; + if (b != null) { + if (typeof b === 'function') { + cb = b; + } + if (typeof a === 'object') { + options = a; + } + } else { + if (typeof a === 'function') { + cb = a; + } + options = {}; + } + parser = new exports.Parser(options); + return parser.parseString(str, cb); + }; + + exports.parseStringPromise = function(str, a) { + var options, parser; + if (typeof a === 'object') { + options = a; + } + parser = new exports.Parser(options); + return parser.parseStringPromise(str); + }; + +}).call(this); diff --git a/node_modules/xml2js/lib/processors.js b/node_modules/xml2js/lib/processors.js new file mode 100644 index 0000000..89aa85f --- /dev/null +++ b/node_modules/xml2js/lib/processors.js @@ -0,0 +1,34 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + "use strict"; + var prefixMatch; + + prefixMatch = new RegExp(/(?!xmlns)^.*:/); + + exports.normalize = function(str) { + return str.toLowerCase(); + }; + + exports.firstCharLowerCase = function(str) { + return str.charAt(0).toLowerCase() + str.slice(1); + }; + + exports.stripPrefix = function(str) { + return str.replace(prefixMatch, ''); + }; + + exports.parseNumbers = function(str) { + if (!isNaN(str)) { + str = str % 1 === 0 ? parseInt(str, 10) : parseFloat(str); + } + return str; + }; + + exports.parseBooleans = function(str) { + if (/^(?:true|false)$/i.test(str)) { + str = str.toLowerCase() === 'true'; + } + return str; + }; + +}).call(this); diff --git a/node_modules/xml2js/lib/xml2js.js b/node_modules/xml2js/lib/xml2js.js new file mode 100644 index 0000000..24b6e69 --- /dev/null +++ b/node_modules/xml2js/lib/xml2js.js @@ -0,0 +1,39 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + "use strict"; + var builder, defaults, parser, processors, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + defaults = require('./defaults'); + + builder = require('./builder'); + + parser = require('./parser'); + + processors = require('./processors'); + + exports.defaults = defaults.defaults; + + exports.processors = processors; + + exports.ValidationError = (function(superClass) { + extend(ValidationError, superClass); + + function ValidationError(message) { + this.message = message; + } + + return ValidationError; + + })(Error); + + exports.Builder = builder.Builder; + + exports.Parser = parser.Parser; + + exports.parseString = parser.parseString; + + exports.parseStringPromise = parser.parseStringPromise; + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/CHANGELOG.md b/node_modules/xml2js/node_modules/xmlbuilder/CHANGELOG.md new file mode 100644 index 0000000..610f412 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/CHANGELOG.md @@ -0,0 +1,470 @@ +# Change Log + +All notable changes to this project are documented in this file. This project adheres to [Semantic Versioning](http://semver.org/#semantic-versioning-200). + +## [11.0.0] - 2019-02-18 +- Calling `end()` with arguments no longer overwrites writer options. See [#120](https://github.com/oozcitak/xmlbuilder-js/issues/120). +- Added writer state and customizable space and endline functions to help customize writer behavior. Also added `openNode` and `closeNode` functions to writer. See [#193](https://github.com/oozcitak/xmlbuilder-js/issues/193). +- Fixed a bug where writer functions would not be called for nodes with a single child node in pretty print mode. See [#195](https://github.com/oozcitak/xmlbuilder-js/issues/195). +- Renamed `elEscape` to `textEscape` in `XMLStringifier`. +- Fixed a bug where empty arrays would produce child nodes. See [#190](https://github.com/oozcitak/xmlbuilder-js/issues/190). +- Removed the `skipNullAttributes` option. `null` attributes are now skipped by default. Added the `keepNullAttributes` option in case someone needs the old behavior. +- Removed the `skipNullNodes` option. `null` nodes are now skipped by default. Added the `keepNullNodes` option in case someone needs the old behavior. +- `undefined` values are now skipped when converting JS objects. +- Renamed stringify functions. See [#194](https://github.com/oozcitak/xmlbuilder-js/issues/194): + * `eleName` -> `name` + * `attName` -> `name` + * `eleText` -> `text` +- Fixed argument order for `attribute` function in the writer. See [#196](https://github.com/oozcitak/xmlbuilder-js/issues/196). +- Added `openAttribute` and `closeAttribute` functions to writer. See [#196](https://github.com/oozcitak/xmlbuilder-js/issues/196). +- Added node types to node objects. Node types and writer states are exported by the module with the `nodeType` and `writerState` properties. +- Fixed a bug where array items would not be correctly converted. See [#159](https://github.com/oozcitak/xmlbuilder-js/issues/159). +- Fixed a bug where mixed-content inside JS objects with `#text` decorator would not be correctly converted. See [#171](https://github.com/oozcitak/xmlbuilder-js/issues/171). +- Fixed a bug where JS objects would not be expanded in callback mode. See [#173](https://github.com/oozcitak/xmlbuilder-js/issues/173). +- Fixed a bug where character validation would not obey document's XML version. Added separate validation for XML 1.0 and XML 1.1 documents. See [#169](https://github.com/oozcitak/xmlbuilder-js/issues/169). +- Fixed a bug where names would not be validated according to the spec. See [#49](https://github.com/oozcitak/xmlbuilder-js/issues/49). +- Renamed `text` property to `value` in comment and cdata nodes to unify the API. +- Removed `doctype` function to prevent name clash with DOM implementation. Use the `dtd` function instead. +- Removed dummy nodes from the XML tree (Those were created while chain-building the tree). +- Renamed `attributes`property to `attribs` to prevent name clash with DOM property with the same name. +- Implemented the DOM standard (read-only) to support XPath lookups. XML namespaces are not currently supported. See [#122](https://github.com/oozcitak/xmlbuilder-js/issues/122). + +## [10.1.1] - 2018-10-24 +- Fixed an edge case where a null node at root level would be printed although `skipNullNodes` was set. See [#187](https://github.com/oozcitak/xmlbuilder-js/issues/187). + +## [10.1.0] - 2018-10-10 +- Added the `skipNullNodes` option to skip nodes with null values. See [#158](https://github.com/oozcitak/xmlbuilder-js/issues/158). + +## [10.0.0] - 2018-04-26 +- Added current indentation level as a parameter to the onData function when in callback mode. See [#125](https://github.com/oozcitak/xmlbuilder-js/issues/125). +- Added name of the current node and parent node to error messages where possible. See [#152](https://github.com/oozcitak/xmlbuilder-js/issues/152). This has the potential to break code depending on the content of error messages. +- Fixed an issue where objects created with Object.create(null) created an error. See [#176](https://github.com/oozcitak/xmlbuilder-js/issues/176). +- Added test builds for node.js v8 and v10. + +## [9.0.7] - 2018-02-09 +- Simplified regex used for validating encoding. + +## [9.0.4] - 2017-08-16 +- `spacebeforeslash` writer option accepts `true` as well as space char(s). + +## [9.0.3] - 2017-08-15 +- `spacebeforeslash` writer option can now be used with XML fragments. + +## [9.0.2] - 2017-08-15 +- Added the `spacebeforeslash` writer option to add a space character before closing tags of empty elements. See +[#157](https://github.com/oozcitak/xmlbuilder-js/issues/157). + +## [9.0.1] - 2017-06-19 +- Fixed character validity checks to work with node.js 4.0 and 5.0. See +[#161](https://github.com/oozcitak/xmlbuilder-js/issues/161). + +## [9.0.0] - 2017-05-05 +- Removed case conversion options. +- Removed support for node.js 4.0 and 5.0. Minimum required version is now 6.0. +- Fixed valid char filter to use XML 1.1 instead of 1.0. See +[#147](https://github.com/oozcitak/xmlbuilder-js/issues/147). +- Added options for negative indentation and suppressing pretty printing of text +nodes. See +[#145](https://github.com/oozcitak/xmlbuilder-js/issues/145). + +## [8.2.2] - 2016-04-08 +- Falsy values can now be used as a text node in callback mode. + +## [8.2.1] - 2016-04-07 +- Falsy values can now be used as a text node. See +[#117](https://github.com/oozcitak/xmlbuilder-js/issues/117). + +## [8.2.0] - 2016-04-01 +- Removed lodash dependency to keep the library small and simple. See +[#114](https://github.com/oozcitak/xmlbuilder-js/issues/114), +[#53](https://github.com/oozcitak/xmlbuilder-js/issues/53), +and [#43](https://github.com/oozcitak/xmlbuilder-js/issues/43). +- Added title case to name conversion options. + +## [8.1.0] - 2016-03-29 +- Added the callback option to the `begin` export function. When used with a +callback function, the XML document will be generated in chunks and each chunk +will be passed to the supplied function. In this mode, `begin` uses a different +code path and the builder should use much less memory since the entire XML tree +is not kept. There are a few drawbacks though. For example, traversing the document +tree or adding attributes to a node after it is written is not possible. It is +also not possible to remove nodes or attributes. + +``` js +var result = ''; + +builder.begin(function(chunk) { result += chunk; }) + .dec() + .ele('root') + .ele('xmlbuilder').up() + .end(); +``` + +- Replaced native `Object.assign` with `lodash.assign` to support old JS engines. See [#111](https://github.com/oozcitak/xmlbuilder-js/issues/111). + +## [8.0.0] - 2016-03-25 +- Added the `begin` export function. See the wiki for details. +- Added the ability to add comments and processing instructions before and after the root element. Added `commentBefore`, `commentAfter`, `instructionBefore` and `instructionAfter` functions for this purpose. +- Dropped support for old node.js releases. Minimum required node.js version is now 4.0. + +## [7.0.0] - 2016-03-21 +- Processing instructions are now created as regular nodes. This is a major breaking change if you are using processing instructions. Previously processing instructions were inserted before their parent node. After this change processing instructions are appended to the children of the parent node. Note that it is not currently possible to insert processing instructions before or after the root element. +```js +root.ele('node').ins('pi'); +// pre-v7 + +// v7 + +``` + +## [6.0.0] - 2016-03-20 +- Added custom XML writers. The default string conversion functions are now collected under the `XMLStringWriter` class which can be accessed by the `stringWriter(options)` function exported by the module. An `XMLStreamWriter` is also added which outputs the XML document to a writable stream. A stream writer can be created by calling the `streamWriter(stream, options)` function exported by the module. Both classes are heavily customizable and the details are added to the wiki. It is also possible to write an XML writer from scratch and use it when calling `end()` on the XML document. + +## [5.0.1] - 2016-03-08 +- Moved require statements for text case conversion to the top of files to reduce lazy requires. + +## [5.0.0] - 2016-03-05 +- Added text case option for element names and attribute names. Valid cases are `lower`, `upper`, `camel`, `kebab` and `snake`. +- Attribute and element values are escaped according to the [Canonical XML 1.0 specification](http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping). See [#54](https://github.com/oozcitak/xmlbuilder-js/issues/54) and [#86](https://github.com/oozcitak/xmlbuilder-js/issues/86). +- Added the `allowEmpty` option to `end()`. When this option is set, empty elements are not self-closed. +- Added support for [nested CDATA](https://en.wikipedia.org/wiki/CDATA#Nesting). The triad `]]>` in CDATA is now automatically replaced with `]]]]>`. + +## [4.2.1] - 2016-01-15 +- Updated lodash dependency to 4.0.0. + +## [4.2.0] - 2015-12-16 +- Added the `noDoubleEncoding` option to `create()` to control whether existing html entities are encoded. + +## [4.1.0] - 2015-11-11 +- Added the `separateArrayItems` option to `create()` to control how arrays are handled when converting from objects. e.g. + +```js +root.ele({ number: [ "one", "two" ]}); +// with separateArrayItems: true + + + + +// with separateArrayItems: false +one +two +``` + +## [4.0.0] - 2015-11-01 +- Removed the `#list` decorator. Array items are now created as child nodes by default. +- Fixed a bug where the XML encoding string was checked partially. + +## [3.1.0] - 2015-09-19 +- `#list` decorator ignores empty arrays. + +## [3.0.0] - 2015-09-10 +- Allow `\r`, `\n` and `\t` in attribute values without escaping. See [#86](https://github.com/oozcitak/xmlbuilder-js/issues/86). + +## [2.6.5] - 2015-09-09 +- Use native `isArray` instead of lodash. +- Indentation of processing instructions are set to the parent element's. + +## [2.6.4] - 2015-05-27 +- Updated lodash dependency to 3.5.0. + +## [2.6.3] - 2015-05-27 +- Bumped version because previous release was not published on npm. + +## [2.6.2] - 2015-03-10 +- Updated lodash dependency to 3.5.0. + +## [2.6.1] - 2015-02-20 +- Updated lodash dependency to 3.3.0. + +## [2.6.0] - 2015-02-20 +- Fixed a bug where the `XMLNode` constructor overwrote the super class parent. +- Removed document property from cloned nodes. +- Switched to mocha.js for testing. + +## [2.5.2] - 2015-02-16 +- Updated lodash dependency to 3.2.0. + +## [2.5.1] - 2015-02-09 +- Updated lodash dependency to 3.1.0. +- Support all node >= 0.8. + +## [2.5.0] - 2015-00-03 +- Updated lodash dependency to 3.0.0. + +## [2.4.6] - 2015-01-26 +- Show more information from attribute creation with null values. +- Added iojs as an engine. +- Self close elements with empty text. + +## [2.4.5] - 2014-11-15 +- Fixed prepublish script to run on windows. +- Fixed bug in XMLStringifier where an undefined value was used while reporting an invalid encoding value. +- Moved require statements to the top of files to reduce lazy requires. See [#62](https://github.com/oozcitak/xmlbuilder-js/issues/62). + +## [2.4.4] - 2014-09-08 +- Added the `offset` option to `toString()` for use in XML fragments. + +## [2.4.3] - 2014-08-13 +- Corrected license in package description. + +## [2.4.2] - 2014-08-13 +- Dropped performance test and memwatch dependency. + +## [2.4.1] - 2014-08-12 +- Fixed a bug where empty indent string was omitted when pretty printing. See [#59](https://github.com/oozcitak/xmlbuilder-js/issues/59). + +## [2.4.0] - 2014-08-04 +- Correct cases of pubID and sysID. +- Use single lodash instead of separate npm modules. See [#53](https://github.com/oozcitak/xmlbuilder-js/issues/53). +- Escape according to Canonical XML 1.0. See [#54](https://github.com/oozcitak/xmlbuilder-js/issues/54). + +## [2.3.0] - 2014-07-17 +- Convert objects to JS primitives while sanitizing user input. +- Object builder preserves items with null values. See [#44](https://github.com/oozcitak/xmlbuilder-js/issues/44). +- Use modularized lodash functions to cut down dependencies. +- Process empty objects when converting from objects so that we don't throw on empty child objects. + +## [2.2.1] - 2014-04-04 +- Bumped version because previous release was not published on npm. + +## [2.2.0] - 2014-04-04 +- Switch to lodash from underscore. +- Removed legacy `ext` option from `create()`. +- Drop old node versions: 0.4, 0.5, 0.6. 0.8 is the minimum requirement from now on. + +## [2.1.0] - 2013-12-30 +- Removed duplicate null checks from constructors. +- Fixed node count in performance test. +- Added option for skipping null attribute values. See [#26](https://github.com/oozcitak/xmlbuilder-js/issues/26). +- Allow multiple values in `att()` and `ins()`. +- Added ability to run individual performance tests. +- Added flag for ignoring decorator strings. + +## [2.0.1] - 2013-12-24 +- Removed performance tests from npm package. + +## [2.0.0] - 2013-12-24 +- Combined loops for speed up. +- Added support for the DTD and XML declaration. +- `clone` includes attributes. +- Added performance tests. +- Evaluate attribute value if function. +- Evaluate instruction value if function. + +## [1.1.2] - 2013-12-11 +- Changed processing instruction decorator to `?`. + +## [1.1.1] - 2013-12-11 +- Added processing instructions to JS object conversion. + +## [1.1.0] - 2013-12-10 +- Added license to package. +- `create()` and `element()` accept JS object to fully build the document. +- Added `nod()` and `n()` aliases for `node()`. +- Renamed `convertAttChar` decorator to `convertAttKey`. +- Ignore empty decorator strings when converting JS objects. + +## [1.0.2] - 2013-11-27 +- Removed temp file which was accidentally included in the package. + +## [1.0.1] - 2013-11-27 +- Custom stringify functions affect current instance only. + +## [1.0.0] - 2013-11-27 +- Added processing instructions. +- Added stringify functions to sanitize and convert input values. +- Added option for headless XML documents. +- Added vows tests. +- Removed Makefile. Using npm publish scripts instead. +- Removed the `begin()` function. `create()` begins the document by creating the root node. + +## [0.4.3] - 2013-11-08 +- Added option to include surrogate pairs in XML content. See [#29](https://github.com/oozcitak/xmlbuilder-js/issues/29). +- Fixed empty value string representation in pretty mode. +- Added pre and postpublish scripts to package.json. +- Filtered out prototype properties when appending attributes. See [#31](https://github.com/oozcitak/xmlbuilder-js/issues/31). + +## [0.4.2] - 2012-09-14 +- Removed README.md from `.npmignore`. + +## [0.4.1] - 2012-08-31 +- Removed `begin()` calls in favor of `XMLBuilder` constructor. +- Added the `end()` function. `end()` is a convenience over `doc().toString()`. + +## [0.4.0] - 2012-08-31 +- Added arguments to `XMLBuilder` constructor to allow the name of the root element and XML prolog to be defined in one line. +- Soft deprecated `begin()`. + +## [0.3.11] - 2012-08-13 +- Package keywords are fixed to be an array of values. + +## [0.3.10] - 2012-08-13 +- Brought back npm package contents which were lost due to incorrect configuration of `package.json` in previous releases. + +## [0.3.3] - 2012-07-27 +- Implemented `importXMLBuilder()`. + +## [0.3.2] - 2012-07-20 +- Fixed a duplicated escaping problem on `element()`. +- Fixed a problem with text node creation from empty string. +- Calling `root()` on the document element returns the root element. +- `XMLBuilder` no longer extends `XMLFragment`. + +## [0.3.1] - 2011-11-28 +- Added guards for document element so that nodes cannot be inserted at document level. + +## [0.3.0] - 2011-11-28 +- Added `doc()` to return the document element. + +## [0.2.2] - 2011-11-28 +- Prevent code relying on `up()`'s older behavior to break. + +## [0.2.1] - 2011-11-28 +- Added the `root()` function. + +## [0.2.0] - 2011-11-21 +- Added Travis-CI integration. +- Added coffee-script dependency. +- Added insert, traversal and delete functions. + +## [0.1.7] - 2011-10-25 +- No changes. Accidental release. + +## [0.1.6] - 2011-10-25 +- Corrected `package.json` bugs link to `url` from `web`. + +## [0.1.5] - 2011-08-08 +- Added missing npm package contents. + +## [0.1.4] - 2011-07-29 +- Text-only nodes are no longer indented. +- Added documentation for multiple instances. + +## [0.1.3] - 2011-07-27 +- Exported the `create()` function to return a new instance. This allows multiple builder instances to be constructed. +- Fixed `u()` function so that it now correctly calls `up()`. +- Fixed typo in `element()` so that `attributes` and `text` can be passed interchangeably. + +## [0.1.2] - 2011-06-03 +- `ele()` accepts element text. +- `attributes()` now overrides existing attributes if passed the same attribute name. + +## [0.1.1] - 2011-05-19 +- Added the raw output option. +- Removed most validity checks. + +## [0.1.0] - 2011-04-27 +- `text()` and `cdata()` now return parent element. +- Attribute values are escaped. + +## [0.0.7] - 2011-04-23 +- Coerced text values to string. + +## [0.0.6] - 2011-02-23 +- Added support for XML comments. +- Text nodes are checked against CharData. + +## [0.0.5] - 2010-12-31 +- Corrected the name of the main npm module in `package.json`. + +## [0.0.4] - 2010-12-28 +- Added `.npmignore`. + +## [0.0.3] - 2010-12-27 +- root element is now constructed in `begin()`. +- moved prolog to `begin()`. +- Added the ability to have CDATA in element text. +- Removed unused prolog aliases. +- Removed `builder()` function from main module. +- Added the name of the main npm module in `package.json`. + +## [0.0.2] - 2010-11-03 +- `element()` expands nested arrays. +- Added pretty printing. +- Added the `up()`, `build()` and `prolog()` functions. +- Added readme. + +## 0.0.1 - 2010-11-02 +- Initial release + +[11.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.1.1...v11.0.0 +[10.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.1.0...v10.1.1 +[10.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.0.0...v10.1.0 +[10.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.7...v10.0.0 +[9.0.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.4...v9.0.7 +[9.0.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.3...v9.0.4 +[9.0.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.2...v9.0.3 +[9.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.1...v9.0.2 +[9.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.0...v9.0.1 +[9.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.2...v9.0.0 +[8.2.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.1...v8.2.2 +[8.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.0...v8.2.1 +[8.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.1.0...v8.2.0 +[8.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.0.0...v8.1.0 +[8.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v7.0.0...v8.0.0 +[7.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v6.0.0...v7.0.0 +[6.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v5.0.1...v6.0.0 +[5.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v5.0.0...v5.0.1 +[5.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.2.1...v5.0.0 +[4.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.2.0...v4.2.1 +[4.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.1.0...v4.2.0 +[4.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.0.0...v4.1.0 +[4.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v3.1.0...v4.0.0 +[3.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v3.0.0...v3.1.0 +[3.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.5...v3.0.0 +[2.6.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.4...v2.6.5 +[2.6.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.3...v2.6.4 +[2.6.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.2...v2.6.3 +[2.6.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.1...v2.6.2 +[2.6.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.0...v2.6.1 +[2.6.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.2...v2.6.0 +[2.5.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.1...v2.5.2 +[2.5.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.0...v2.5.1 +[2.5.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.6...v2.5.0 +[2.4.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.5...v2.4.6 +[2.4.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.4...v2.4.5 +[2.4.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.3...v2.4.4 +[2.4.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.2...v2.4.3 +[2.4.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.1...v2.4.2 +[2.4.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.0...v2.4.1 +[2.4.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.3.0...v2.4.0 +[2.3.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.2.1...v2.3.0 +[2.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.2.0...v2.2.1 +[2.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.1.0...v2.2.0 +[2.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.0.1...v2.1.0 +[2.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.0.0...v2.0.1 +[2.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.2...v2.0.0 +[1.1.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.1...v1.1.2 +[1.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.0...v1.1.1 +[1.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.2...v1.1.0 +[1.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.1...v1.0.2 +[1.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.0...v1.0.1 +[1.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.3...v1.0.0 +[0.4.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.2...v0.4.3 +[0.4.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.1...v0.4.2 +[0.4.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.0...v0.4.1 +[0.4.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.11...v0.4.0 +[0.3.11]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.10...v0.3.11 +[0.3.10]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.3...v0.3.10 +[0.3.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.2...v0.3.3 +[0.3.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.1...v0.3.2 +[0.3.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.0...v0.3.1 +[0.3.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.2...v0.3.0 +[0.2.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.1...v0.2.2 +[0.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.0...v0.2.1 +[0.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.7...v0.2.0 +[0.1.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.6...v0.1.7 +[0.1.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.5...v0.1.6 +[0.1.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.4...v0.1.5 +[0.1.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.3...v0.1.4 +[0.1.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.2...v0.1.3 +[0.1.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.1...v0.1.2 +[0.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.0...v0.1.1 +[0.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.7...v0.1.0 +[0.0.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.6...v0.0.7 +[0.0.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.5...v0.0.6 +[0.0.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.4...v0.0.5 +[0.0.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.3...v0.0.4 +[0.0.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.2...v0.0.3 +[0.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.1...v0.0.2 + diff --git a/node_modules/xml2js/node_modules/xmlbuilder/LICENSE b/node_modules/xml2js/node_modules/xmlbuilder/LICENSE new file mode 100644 index 0000000..9fb9700 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Ozgur Ozcitak + +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/xml2js/node_modules/xmlbuilder/README.md b/node_modules/xml2js/node_modules/xmlbuilder/README.md new file mode 100644 index 0000000..1a96edb --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/README.md @@ -0,0 +1,86 @@ +# xmlbuilder-js + +An XML builder for [node.js](https://nodejs.org/) similar to +[java-xmlbuilder](https://github.com/jmurty/java-xmlbuilder). + +[![License](http://img.shields.io/npm/l/xmlbuilder.svg?style=flat-square)](http://opensource.org/licenses/MIT) +[![NPM Version](http://img.shields.io/npm/v/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder) +[![NPM Downloads](https://img.shields.io/npm/dm/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder) + +[![Travis Build Status](http://img.shields.io/travis/oozcitak/xmlbuilder-js.svg?style=flat-square)](http://travis-ci.org/oozcitak/xmlbuilder-js) +[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/bf7odb20hj77isry?svg=true)](https://ci.appveyor.com/project/oozcitak/xmlbuilder-js) +[![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js) +[![Code Coverage](https://img.shields.io/coveralls/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://coveralls.io/github/oozcitak/xmlbuilder-js) + +### Installation: + +``` sh +npm install xmlbuilder +``` + +### Usage: + +``` js +var builder = require('xmlbuilder'); +var xml = builder.create('root') + .ele('xmlbuilder') + .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git') + .end({ pretty: true}); + +console.log(xml); +``` + +will result in: + +``` xml + + + + git://github.com/oozcitak/xmlbuilder-js.git + + +``` + +It is also possible to convert objects into nodes: + +``` js +builder.create({ + root: { + xmlbuilder: { + repo: { + '@type': 'git', // attributes start with @ + '#text': 'git://github.com/oozcitak/xmlbuilder-js.git' // text node + } + } + } +}); +``` + +If you need to do some processing: + +``` js +var root = builder.create('squares'); +root.com('f(x) = x^2'); +for(var i = 1; i <= 5; i++) +{ + var item = root.ele('data'); + item.att('x', i); + item.att('y', i * i); +} +``` + +This will result in: + +``` xml + + + + + + + + + +``` + +See the [wiki](https://github.com/oozcitak/xmlbuilder-js/wiki) for details and [examples](https://github.com/oozcitak/xmlbuilder-js/wiki/Examples) for more complex examples. diff --git a/node_modules/xml2js/node_modules/xmlbuilder/appveyor.yml b/node_modules/xml2js/node_modules/xmlbuilder/appveyor.yml new file mode 100644 index 0000000..9604b78 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/appveyor.yml @@ -0,0 +1,20 @@ +environment: + matrix: + - nodejs_version: "4" + - nodejs_version: "5" + - nodejs_version: "6" + - nodejs_version: "8" + - nodejs_version: "10" + - nodejs_version: "" # latest + +install: + - ps: "Install-Product node $env:nodejs_version" + - "npm install" + +test_script: + - "node --version" + - "npm --version" + - "npm test" + +build: off + diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/Derivation.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/Derivation.js new file mode 100644 index 0000000..2abfd08 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/Derivation.js @@ -0,0 +1,10 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + module.exports = { + Restriction: 1, + Extension: 2, + Union: 4, + List: 8 + }; + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/DocumentPosition.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/DocumentPosition.js new file mode 100644 index 0000000..1cbd21c --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/DocumentPosition.js @@ -0,0 +1,12 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + module.exports = { + Disconnected: 1, + Preceding: 2, + Following: 4, + Contains: 8, + ContainedBy: 16, + ImplementationSpecific: 32 + }; + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/NodeType.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/NodeType.js new file mode 100644 index 0000000..4c200e3 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/NodeType.js @@ -0,0 +1,23 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + module.exports = { + Element: 1, + Attribute: 2, + Text: 3, + CData: 4, + EntityReference: 5, + EntityDeclaration: 6, + ProcessingInstruction: 7, + Comment: 8, + Document: 9, + DocType: 10, + DocumentFragment: 11, + NotationDeclaration: 12, + Declaration: 201, + Raw: 202, + AttributeDeclaration: 203, + ElementDeclaration: 204, + Dummy: 205 + }; + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/OperationType.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/OperationType.js new file mode 100644 index 0000000..29428f6 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/OperationType.js @@ -0,0 +1,11 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + module.exports = { + Clones: 1, + Imported: 2, + Deleted: 3, + Renamed: 4, + Adopted: 5 + }; + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/Utility.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/Utility.js new file mode 100644 index 0000000..1d42cfd --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/Utility.js @@ -0,0 +1,83 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject, + slice = [].slice, + hasProp = {}.hasOwnProperty; + + assign = function() { + var i, key, len, source, sources, target; + target = arguments[0], sources = 2 <= arguments.length ? slice.call(arguments, 1) : []; + if (isFunction(Object.assign)) { + Object.assign.apply(null, arguments); + } else { + for (i = 0, len = sources.length; i < len; i++) { + source = sources[i]; + if (source != null) { + for (key in source) { + if (!hasProp.call(source, key)) continue; + target[key] = source[key]; + } + } + } + } + return target; + }; + + isFunction = function(val) { + return !!val && Object.prototype.toString.call(val) === '[object Function]'; + }; + + isObject = function(val) { + var ref; + return !!val && ((ref = typeof val) === 'function' || ref === 'object'); + }; + + isArray = function(val) { + if (isFunction(Array.isArray)) { + return Array.isArray(val); + } else { + return Object.prototype.toString.call(val) === '[object Array]'; + } + }; + + isEmpty = function(val) { + var key; + if (isArray(val)) { + return !val.length; + } else { + for (key in val) { + if (!hasProp.call(val, key)) continue; + return false; + } + return true; + } + }; + + isPlainObject = function(val) { + var ctor, proto; + return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object)); + }; + + getValue = function(obj) { + if (isFunction(obj.valueOf)) { + return obj.valueOf(); + } else { + return obj; + } + }; + + module.exports.assign = assign; + + module.exports.isFunction = isFunction; + + module.exports.isObject = isObject; + + module.exports.isArray = isArray; + + module.exports.isEmpty = isEmpty; + + module.exports.isPlainObject = isPlainObject; + + module.exports.getValue = getValue; + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/WriterState.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/WriterState.js new file mode 100644 index 0000000..0923eec --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/WriterState.js @@ -0,0 +1,10 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + module.exports = { + None: 0, + OpenTag: 1, + InsideTag: 2, + CloseTag: 3 + }; + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLAttribute.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLAttribute.js new file mode 100644 index 0000000..c208566 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLAttribute.js @@ -0,0 +1,108 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLAttribute, XMLNode; + + NodeType = require('./NodeType'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLAttribute = (function() { + function XMLAttribute(parent, name, value) { + this.parent = parent; + if (this.parent) { + this.options = this.parent.options; + this.stringify = this.parent.stringify; + } + if (name == null) { + throw new Error("Missing attribute name. " + this.debugInfo(name)); + } + this.name = this.stringify.name(name); + this.value = this.stringify.attValue(value); + this.type = NodeType.Attribute; + this.isId = false; + this.schemaTypeInfo = null; + } + + Object.defineProperty(XMLAttribute.prototype, 'nodeType', { + get: function() { + return this.type; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'ownerElement', { + get: function() { + return this.parent; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'textContent', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'prefix', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'localName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'specified', { + get: function() { + return true; + } + }); + + XMLAttribute.prototype.clone = function() { + return Object.create(this); + }; + + XMLAttribute.prototype.toString = function(options) { + return this.options.writer.attribute(this, this.options.writer.filterOptions(options)); + }; + + XMLAttribute.prototype.debugInfo = function(name) { + name = name || this.name; + if (name == null) { + return "parent: <" + this.parent.name + ">"; + } else { + return "attribute: {" + name + "}, parent: <" + this.parent.name + ">"; + } + }; + + XMLAttribute.prototype.isEqualNode = function(node) { + if (node.namespaceURI !== this.namespaceURI) { + return false; + } + if (node.prefix !== this.prefix) { + return false; + } + if (node.localName !== this.localName) { + return false; + } + if (node.value !== this.value) { + return false; + } + return true; + }; + + return XMLAttribute; + + })(); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLCData.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLCData.js new file mode 100644 index 0000000..c732ec5 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLCData.js @@ -0,0 +1,36 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLCData, XMLCharacterData, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + NodeType = require('./NodeType'); + + XMLCharacterData = require('./XMLCharacterData'); + + module.exports = XMLCData = (function(superClass) { + extend(XMLCData, superClass); + + function XMLCData(parent, text) { + XMLCData.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing CDATA text. " + this.debugInfo()); + } + this.name = "#cdata-section"; + this.type = NodeType.CData; + this.value = this.stringify.cdata(text); + } + + XMLCData.prototype.clone = function() { + return Object.create(this); + }; + + XMLCData.prototype.toString = function(options) { + return this.options.writer.cdata(this, this.options.writer.filterOptions(options)); + }; + + return XMLCData; + + })(XMLCharacterData); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLCharacterData.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLCharacterData.js new file mode 100644 index 0000000..c007a18 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLCharacterData.js @@ -0,0 +1,79 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLCharacterData, XMLNode, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + XMLNode = require('./XMLNode'); + + module.exports = XMLCharacterData = (function(superClass) { + extend(XMLCharacterData, superClass); + + function XMLCharacterData(parent) { + XMLCharacterData.__super__.constructor.call(this, parent); + this.value = ''; + } + + Object.defineProperty(XMLCharacterData.prototype, 'data', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + Object.defineProperty(XMLCharacterData.prototype, 'length', { + get: function() { + return this.value.length; + } + }); + + Object.defineProperty(XMLCharacterData.prototype, 'textContent', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + XMLCharacterData.prototype.clone = function() { + return Object.create(this); + }; + + XMLCharacterData.prototype.substringData = function(offset, count) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLCharacterData.prototype.appendData = function(arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLCharacterData.prototype.insertData = function(offset, arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLCharacterData.prototype.deleteData = function(offset, count) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLCharacterData.prototype.replaceData = function(offset, count, arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLCharacterData.prototype.isEqualNode = function(node) { + if (!XMLCharacterData.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { + return false; + } + if (node.data !== this.data) { + return false; + } + return true; + }; + + return XMLCharacterData; + + })(XMLNode); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLComment.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLComment.js new file mode 100644 index 0000000..8287216 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLComment.js @@ -0,0 +1,36 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLCharacterData, XMLComment, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + NodeType = require('./NodeType'); + + XMLCharacterData = require('./XMLCharacterData'); + + module.exports = XMLComment = (function(superClass) { + extend(XMLComment, superClass); + + function XMLComment(parent, text) { + XMLComment.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing comment text. " + this.debugInfo()); + } + this.name = "#comment"; + this.type = NodeType.Comment; + this.value = this.stringify.comment(text); + } + + XMLComment.prototype.clone = function() { + return Object.create(this); + }; + + XMLComment.prototype.toString = function(options) { + return this.options.writer.comment(this, this.options.writer.filterOptions(options)); + }; + + return XMLComment; + + })(XMLCharacterData); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js new file mode 100644 index 0000000..b331b86 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js @@ -0,0 +1,64 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList; + + XMLDOMErrorHandler = require('./XMLDOMErrorHandler'); + + XMLDOMStringList = require('./XMLDOMStringList'); + + module.exports = XMLDOMConfiguration = (function() { + function XMLDOMConfiguration() { + var clonedSelf; + this.defaultParams = { + "canonical-form": false, + "cdata-sections": false, + "comments": false, + "datatype-normalization": false, + "element-content-whitespace": true, + "entities": true, + "error-handler": new XMLDOMErrorHandler(), + "infoset": true, + "validate-if-schema": false, + "namespaces": true, + "namespace-declarations": true, + "normalize-characters": false, + "schema-location": '', + "schema-type": '', + "split-cdata-sections": true, + "validate": false, + "well-formed": true + }; + this.params = clonedSelf = Object.create(this.defaultParams); + } + + Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', { + get: function() { + return new XMLDOMStringList(Object.keys(this.defaultParams)); + } + }); + + XMLDOMConfiguration.prototype.getParameter = function(name) { + if (this.params.hasOwnProperty(name)) { + return this.params[name]; + } else { + return null; + } + }; + + XMLDOMConfiguration.prototype.canSetParameter = function(name, value) { + return true; + }; + + XMLDOMConfiguration.prototype.setParameter = function(name, value) { + if (value != null) { + return this.params[name] = value; + } else { + return delete this.params[name]; + } + }; + + return XMLDOMConfiguration; + + })(); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js new file mode 100644 index 0000000..4a0446c --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js @@ -0,0 +1,16 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLDOMErrorHandler; + + module.exports = XMLDOMErrorHandler = (function() { + function XMLDOMErrorHandler() {} + + XMLDOMErrorHandler.prototype.handleError = function(error) { + throw new Error(error); + }; + + return XMLDOMErrorHandler; + + })(); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMImplementation.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMImplementation.js new file mode 100644 index 0000000..4f9f9db --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMImplementation.js @@ -0,0 +1,32 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLDOMImplementation; + + module.exports = XMLDOMImplementation = (function() { + function XMLDOMImplementation() {} + + XMLDOMImplementation.prototype.hasFeature = function(feature, version) { + return true; + }; + + XMLDOMImplementation.prototype.createDocumentType = function(qualifiedName, publicId, systemId) { + throw new Error("This DOM method is not implemented."); + }; + + XMLDOMImplementation.prototype.createDocument = function(namespaceURI, qualifiedName, doctype) { + throw new Error("This DOM method is not implemented."); + }; + + XMLDOMImplementation.prototype.createHTMLDocument = function(title) { + throw new Error("This DOM method is not implemented."); + }; + + XMLDOMImplementation.prototype.getFeature = function(feature, version) { + throw new Error("This DOM method is not implemented."); + }; + + return XMLDOMImplementation; + + })(); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMStringList.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMStringList.js new file mode 100644 index 0000000..ba558c5 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMStringList.js @@ -0,0 +1,28 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLDOMStringList; + + module.exports = XMLDOMStringList = (function() { + function XMLDOMStringList(arr) { + this.arr = arr || []; + } + + Object.defineProperty(XMLDOMStringList.prototype, 'length', { + get: function() { + return this.arr.length; + } + }); + + XMLDOMStringList.prototype.item = function(index) { + return this.arr[index] || null; + }; + + XMLDOMStringList.prototype.contains = function(str) { + return this.arr.indexOf(str) !== -1; + }; + + return XMLDOMStringList; + + })(); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDAttList.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDAttList.js new file mode 100644 index 0000000..aca9dbd --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDAttList.js @@ -0,0 +1,55 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDTDAttList, XMLNode, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + module.exports = XMLDTDAttList = (function(superClass) { + extend(XMLDTDAttList, superClass); + + function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { + XMLDTDAttList.__super__.constructor.call(this, parent); + if (elementName == null) { + throw new Error("Missing DTD element name. " + this.debugInfo()); + } + if (attributeName == null) { + throw new Error("Missing DTD attribute name. " + this.debugInfo(elementName)); + } + if (!attributeType) { + throw new Error("Missing DTD attribute type. " + this.debugInfo(elementName)); + } + if (!defaultValueType) { + throw new Error("Missing DTD attribute default. " + this.debugInfo(elementName)); + } + if (defaultValueType.indexOf('#') !== 0) { + defaultValueType = '#' + defaultValueType; + } + if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { + throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(elementName)); + } + if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { + throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(elementName)); + } + this.elementName = this.stringify.name(elementName); + this.type = NodeType.AttributeDeclaration; + this.attributeName = this.stringify.name(attributeName); + this.attributeType = this.stringify.dtdAttType(attributeType); + if (defaultValue) { + this.defaultValue = this.stringify.dtdAttDefault(defaultValue); + } + this.defaultValueType = defaultValueType; + } + + XMLDTDAttList.prototype.toString = function(options) { + return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options)); + }; + + return XMLDTDAttList; + + })(XMLNode); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDElement.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDElement.js new file mode 100644 index 0000000..f8f1ae7 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDElement.js @@ -0,0 +1,38 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDTDElement, XMLNode, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + module.exports = XMLDTDElement = (function(superClass) { + extend(XMLDTDElement, superClass); + + function XMLDTDElement(parent, name, value) { + XMLDTDElement.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing DTD element name. " + this.debugInfo()); + } + if (!value) { + value = '(#PCDATA)'; + } + if (Array.isArray(value)) { + value = '(' + value.join(',') + ')'; + } + this.name = this.stringify.name(name); + this.type = NodeType.ElementDeclaration; + this.value = this.stringify.dtdElementValue(value); + } + + XMLDTDElement.prototype.toString = function(options) { + return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options)); + }; + + return XMLDTDElement; + + })(XMLNode); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDEntity.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDEntity.js new file mode 100644 index 0000000..0a940d6 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDEntity.js @@ -0,0 +1,97 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDTDEntity, XMLNode, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + isObject = require('./Utility').isObject; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + module.exports = XMLDTDEntity = (function(superClass) { + extend(XMLDTDEntity, superClass); + + function XMLDTDEntity(parent, pe, name, value) { + XMLDTDEntity.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing DTD entity name. " + this.debugInfo(name)); + } + if (value == null) { + throw new Error("Missing DTD entity value. " + this.debugInfo(name)); + } + this.pe = !!pe; + this.name = this.stringify.name(name); + this.type = NodeType.EntityDeclaration; + if (!isObject(value)) { + this.value = this.stringify.dtdEntityValue(value); + this.internal = true; + } else { + if (!value.pubID && !value.sysID) { + throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name)); + } + if (value.pubID && !value.sysID) { + throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name)); + } + this.internal = false; + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + if (value.nData != null) { + this.nData = this.stringify.dtdNData(value.nData); + } + if (this.pe && this.nData) { + throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name)); + } + } + } + + Object.defineProperty(XMLDTDEntity.prototype, 'publicId', { + get: function() { + return this.pubID; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'systemId', { + get: function() { + return this.sysID; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'notationName', { + get: function() { + return this.nData || null; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', { + get: function() { + return null; + } + }); + + XMLDTDEntity.prototype.toString = function(options) { + return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options)); + }; + + return XMLDTDEntity; + + })(XMLNode); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDNotation.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDNotation.js new file mode 100644 index 0000000..57a119d --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDNotation.js @@ -0,0 +1,52 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDTDNotation, XMLNode, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + module.exports = XMLDTDNotation = (function(superClass) { + extend(XMLDTDNotation, superClass); + + function XMLDTDNotation(parent, name, value) { + XMLDTDNotation.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing DTD notation name. " + this.debugInfo(name)); + } + if (!value.pubID && !value.sysID) { + throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name)); + } + this.name = this.stringify.name(name); + this.type = NodeType.NotationDeclaration; + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + } + + Object.defineProperty(XMLDTDNotation.prototype, 'publicId', { + get: function() { + return this.pubID; + } + }); + + Object.defineProperty(XMLDTDNotation.prototype, 'systemId', { + get: function() { + return this.sysID; + } + }); + + XMLDTDNotation.prototype.toString = function(options) { + return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options)); + }; + + return XMLDTDNotation; + + })(XMLNode); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDeclaration.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDeclaration.js new file mode 100644 index 0000000..d4f7f44 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDeclaration.js @@ -0,0 +1,43 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDeclaration, XMLNode, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + isObject = require('./Utility').isObject; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + module.exports = XMLDeclaration = (function(superClass) { + extend(XMLDeclaration, superClass); + + function XMLDeclaration(parent, version, encoding, standalone) { + var ref; + XMLDeclaration.__super__.constructor.call(this, parent); + if (isObject(version)) { + ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone; + } + if (!version) { + version = '1.0'; + } + this.type = NodeType.Declaration; + this.version = this.stringify.xmlVersion(version); + if (encoding != null) { + this.encoding = this.stringify.xmlEncoding(encoding); + } + if (standalone != null) { + this.standalone = this.stringify.xmlStandalone(standalone); + } + } + + XMLDeclaration.prototype.toString = function(options) { + return this.options.writer.declaration(this, this.options.writer.filterOptions(options)); + }; + + return XMLDeclaration; + + })(XMLNode); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocType.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocType.js new file mode 100644 index 0000000..ef043f4 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocType.js @@ -0,0 +1,186 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + isObject = require('./Utility').isObject; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + XMLDTDAttList = require('./XMLDTDAttList'); + + XMLDTDEntity = require('./XMLDTDEntity'); + + XMLDTDElement = require('./XMLDTDElement'); + + XMLDTDNotation = require('./XMLDTDNotation'); + + XMLNamedNodeMap = require('./XMLNamedNodeMap'); + + module.exports = XMLDocType = (function(superClass) { + extend(XMLDocType, superClass); + + function XMLDocType(parent, pubID, sysID) { + var child, i, len, ref, ref1, ref2; + XMLDocType.__super__.constructor.call(this, parent); + this.type = NodeType.DocType; + if (parent.children) { + ref = parent.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.Element) { + this.name = child.name; + break; + } + } + } + this.documentObject = parent; + if (isObject(pubID)) { + ref1 = pubID, pubID = ref1.pubID, sysID = ref1.sysID; + } + if (sysID == null) { + ref2 = [pubID, sysID], sysID = ref2[0], pubID = ref2[1]; + } + if (pubID != null) { + this.pubID = this.stringify.dtdPubID(pubID); + } + if (sysID != null) { + this.sysID = this.stringify.dtdSysID(sysID); + } + } + + Object.defineProperty(XMLDocType.prototype, 'entities', { + get: function() { + var child, i, len, nodes, ref; + nodes = {}; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if ((child.type === NodeType.EntityDeclaration) && !child.pe) { + nodes[child.name] = child; + } + } + return new XMLNamedNodeMap(nodes); + } + }); + + Object.defineProperty(XMLDocType.prototype, 'notations', { + get: function() { + var child, i, len, nodes, ref; + nodes = {}; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.NotationDeclaration) { + nodes[child.name] = child; + } + } + return new XMLNamedNodeMap(nodes); + } + }); + + Object.defineProperty(XMLDocType.prototype, 'publicId', { + get: function() { + return this.pubID; + } + }); + + Object.defineProperty(XMLDocType.prototype, 'systemId', { + get: function() { + return this.sysID; + } + }); + + Object.defineProperty(XMLDocType.prototype, 'internalSubset', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + XMLDocType.prototype.element = function(name, value) { + var child; + child = new XMLDTDElement(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var child; + child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.entity = function(name, value) { + var child; + child = new XMLDTDEntity(this, false, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.pEntity = function(name, value) { + var child; + child = new XMLDTDEntity(this, true, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.notation = function(name, value) { + var child; + child = new XMLDTDNotation(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.toString = function(options) { + return this.options.writer.docType(this, this.options.writer.filterOptions(options)); + }; + + XMLDocType.prototype.ele = function(name, value) { + return this.element(name, value); + }; + + XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); + }; + + XMLDocType.prototype.ent = function(name, value) { + return this.entity(name, value); + }; + + XMLDocType.prototype.pent = function(name, value) { + return this.pEntity(name, value); + }; + + XMLDocType.prototype.not = function(name, value) { + return this.notation(name, value); + }; + + XMLDocType.prototype.up = function() { + return this.root() || this.documentObject; + }; + + XMLDocType.prototype.isEqualNode = function(node) { + if (!XMLDocType.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { + return false; + } + if (node.name !== this.name) { + return false; + } + if (node.publicId !== this.publicId) { + return false; + } + if (node.systemId !== this.systemId) { + return false; + } + return true; + }; + + return XMLDocType; + + })(XMLNode); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocument.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocument.js new file mode 100644 index 0000000..88df56c --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocument.js @@ -0,0 +1,242 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + isPlainObject = require('./Utility').isPlainObject; + + XMLDOMImplementation = require('./XMLDOMImplementation'); + + XMLDOMConfiguration = require('./XMLDOMConfiguration'); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + XMLStringifier = require('./XMLStringifier'); + + XMLStringWriter = require('./XMLStringWriter'); + + module.exports = XMLDocument = (function(superClass) { + extend(XMLDocument, superClass); + + function XMLDocument(options) { + XMLDocument.__super__.constructor.call(this, null); + this.name = "#document"; + this.type = NodeType.Document; + this.documentURI = null; + this.domConfig = new XMLDOMConfiguration(); + options || (options = {}); + if (!options.writer) { + options.writer = new XMLStringWriter(); + } + this.options = options; + this.stringify = new XMLStringifier(options); + } + + Object.defineProperty(XMLDocument.prototype, 'implementation', { + value: new XMLDOMImplementation() + }); + + Object.defineProperty(XMLDocument.prototype, 'doctype', { + get: function() { + var child, i, len, ref; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.DocType) { + return child; + } + } + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'documentElement', { + get: function() { + return this.rootObject || null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'inputEncoding', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', { + get: function() { + return false; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].encoding; + } else { + return null; + } + } + }); + + Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].standalone === 'yes'; + } else { + return false; + } + } + }); + + Object.defineProperty(XMLDocument.prototype, 'xmlVersion', { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].version; + } else { + return "1.0"; + } + } + }); + + Object.defineProperty(XMLDocument.prototype, 'URL', { + get: function() { + return this.documentURI; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'origin', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'compatMode', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'characterSet', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'contentType', { + get: function() { + return null; + } + }); + + XMLDocument.prototype.end = function(writer) { + var writerOptions; + writerOptions = {}; + if (!writer) { + writer = this.options.writer; + } else if (isPlainObject(writer)) { + writerOptions = writer; + writer = this.options.writer; + } + return writer.document(this, writer.filterOptions(writerOptions)); + }; + + XMLDocument.prototype.toString = function(options) { + return this.options.writer.document(this, this.options.writer.filterOptions(options)); + }; + + XMLDocument.prototype.createElement = function(tagName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createDocumentFragment = function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createTextNode = function(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createComment = function(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createCDATASection = function(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createProcessingInstruction = function(target, data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createAttribute = function(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createEntityReference = function(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.getElementsByTagName = function(tagname) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.importNode = function(importedNode, deep) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createElementNS = function(namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createAttributeNS = function(namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.getElementById = function(elementId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.adoptNode = function(source) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.normalizeDocument = function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.renameNode = function(node, namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.getElementsByClassName = function(classNames) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createEvent = function(eventInterface) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createRange = function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createNodeIterator = function(root, whatToShow, filter) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createTreeWalker = function(root, whatToShow, filter) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + return XMLDocument; + + })(XMLNode); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocumentCB.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocumentCB.js new file mode 100644 index 0000000..ca1aa1c --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocumentCB.js @@ -0,0 +1,528 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject, ref, + hasProp = {}.hasOwnProperty; + + ref = require('./Utility'), isObject = ref.isObject, isFunction = ref.isFunction, isPlainObject = ref.isPlainObject, getValue = ref.getValue; + + NodeType = require('./NodeType'); + + XMLDocument = require('./XMLDocument'); + + XMLElement = require('./XMLElement'); + + XMLCData = require('./XMLCData'); + + XMLComment = require('./XMLComment'); + + XMLRaw = require('./XMLRaw'); + + XMLText = require('./XMLText'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + XMLDeclaration = require('./XMLDeclaration'); + + XMLDocType = require('./XMLDocType'); + + XMLDTDAttList = require('./XMLDTDAttList'); + + XMLDTDEntity = require('./XMLDTDEntity'); + + XMLDTDElement = require('./XMLDTDElement'); + + XMLDTDNotation = require('./XMLDTDNotation'); + + XMLAttribute = require('./XMLAttribute'); + + XMLStringifier = require('./XMLStringifier'); + + XMLStringWriter = require('./XMLStringWriter'); + + WriterState = require('./WriterState'); + + module.exports = XMLDocumentCB = (function() { + function XMLDocumentCB(options, onData, onEnd) { + var writerOptions; + this.name = "?xml"; + this.type = NodeType.Document; + options || (options = {}); + writerOptions = {}; + if (!options.writer) { + options.writer = new XMLStringWriter(); + } else if (isPlainObject(options.writer)) { + writerOptions = options.writer; + options.writer = new XMLStringWriter(); + } + this.options = options; + this.writer = options.writer; + this.writerOptions = this.writer.filterOptions(writerOptions); + this.stringify = new XMLStringifier(options); + this.onDataCallback = onData || function() {}; + this.onEndCallback = onEnd || function() {}; + this.currentNode = null; + this.currentLevel = -1; + this.openTags = {}; + this.documentStarted = false; + this.documentCompleted = false; + this.root = null; + } + + XMLDocumentCB.prototype.createChildNode = function(node) { + var att, attName, attributes, child, i, len, ref1, ref2; + switch (node.type) { + case NodeType.CData: + this.cdata(node.value); + break; + case NodeType.Comment: + this.comment(node.value); + break; + case NodeType.Element: + attributes = {}; + ref1 = node.attribs; + for (attName in ref1) { + if (!hasProp.call(ref1, attName)) continue; + att = ref1[attName]; + attributes[attName] = att.value; + } + this.node(node.name, attributes); + break; + case NodeType.Dummy: + this.dummy(); + break; + case NodeType.Raw: + this.raw(node.value); + break; + case NodeType.Text: + this.text(node.value); + break; + case NodeType.ProcessingInstruction: + this.instruction(node.target, node.value); + break; + default: + throw new Error("This XML node type is not supported in a JS object: " + node.constructor.name); + } + ref2 = node.children; + for (i = 0, len = ref2.length; i < len; i++) { + child = ref2[i]; + this.createChildNode(child); + if (child.type === NodeType.Element) { + this.up(); + } + } + return this; + }; + + XMLDocumentCB.prototype.dummy = function() { + return this; + }; + + XMLDocumentCB.prototype.node = function(name, attributes, text) { + var ref1; + if (name == null) { + throw new Error("Missing node name."); + } + if (this.root && this.currentLevel === -1) { + throw new Error("Document can only have one root node. " + this.debugInfo(name)); + } + this.openCurrent(); + name = getValue(name); + if (attributes == null) { + attributes = {}; + } + attributes = getValue(attributes); + if (!isObject(attributes)) { + ref1 = [attributes, text], text = ref1[0], attributes = ref1[1]; + } + this.currentNode = new XMLElement(this, name, attributes); + this.currentNode.children = false; + this.currentLevel++; + this.openTags[this.currentLevel] = this.currentNode; + if (text != null) { + this.text(text); + } + return this; + }; + + XMLDocumentCB.prototype.element = function(name, attributes, text) { + var child, i, len, oldValidationFlag, ref1, root; + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + this.dtdElement.apply(this, arguments); + } else { + if (Array.isArray(name) || isObject(name) || isFunction(name)) { + oldValidationFlag = this.options.noValidation; + this.options.noValidation = true; + root = new XMLDocument(this.options).element('TEMP_ROOT'); + root.element(name); + this.options.noValidation = oldValidationFlag; + ref1 = root.children; + for (i = 0, len = ref1.length; i < len; i++) { + child = ref1[i]; + this.createChildNode(child); + if (child.type === NodeType.Element) { + this.up(); + } + } + } else { + this.node(name, attributes, text); + } + } + return this; + }; + + XMLDocumentCB.prototype.attribute = function(name, value) { + var attName, attValue; + if (!this.currentNode || this.currentNode.children) { + throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(name)); + } + if (name != null) { + name = getValue(name); + } + if (isObject(name)) { + for (attName in name) { + if (!hasProp.call(name, attName)) continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (this.options.keepNullAttributes && (value == null)) { + this.currentNode.attribs[name] = new XMLAttribute(this, name, ""); + } else if (value != null) { + this.currentNode.attribs[name] = new XMLAttribute(this, name, value); + } + } + return this; + }; + + XMLDocumentCB.prototype.text = function(value) { + var node; + this.openCurrent(); + node = new XMLText(this, value); + this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.cdata = function(value) { + var node; + this.openCurrent(); + node = new XMLCData(this, value); + this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.comment = function(value) { + var node; + this.openCurrent(); + node = new XMLComment(this, value); + this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.raw = function(value) { + var node; + this.openCurrent(); + node = new XMLRaw(this, value); + this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.instruction = function(target, value) { + var i, insTarget, insValue, len, node; + this.openCurrent(); + if (target != null) { + target = getValue(target); + } + if (value != null) { + value = getValue(value); + } + if (Array.isArray(target)) { + for (i = 0, len = target.length; i < len; i++) { + insTarget = target[i]; + this.instruction(insTarget); + } + } else if (isObject(target)) { + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + node = new XMLProcessingInstruction(this, target, value); + this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + } + return this; + }; + + XMLDocumentCB.prototype.declaration = function(version, encoding, standalone) { + var node; + this.openCurrent(); + if (this.documentStarted) { + throw new Error("declaration() must be the first node."); + } + node = new XMLDeclaration(this, version, encoding, standalone); + this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.doctype = function(root, pubID, sysID) { + this.openCurrent(); + if (root == null) { + throw new Error("Missing root node name."); + } + if (this.root) { + throw new Error("dtd() must come before the root node."); + } + this.currentNode = new XMLDocType(this, pubID, sysID); + this.currentNode.rootNodeName = root; + this.currentNode.children = false; + this.currentLevel++; + this.openTags[this.currentLevel] = this.currentNode; + return this; + }; + + XMLDocumentCB.prototype.dtdElement = function(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDElement(this, name, value); + this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var node; + this.openCurrent(); + node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.entity = function(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDEntity(this, false, name, value); + this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.pEntity = function(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDEntity(this, true, name, value); + this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.notation = function(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDNotation(this, name, value); + this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.up = function() { + if (this.currentLevel < 0) { + throw new Error("The document node has no parent."); + } + if (this.currentNode) { + if (this.currentNode.children) { + this.closeNode(this.currentNode); + } else { + this.openNode(this.currentNode); + } + this.currentNode = null; + } else { + this.closeNode(this.openTags[this.currentLevel]); + } + delete this.openTags[this.currentLevel]; + this.currentLevel--; + return this; + }; + + XMLDocumentCB.prototype.end = function() { + while (this.currentLevel >= 0) { + this.up(); + } + return this.onEnd(); + }; + + XMLDocumentCB.prototype.openCurrent = function() { + if (this.currentNode) { + this.currentNode.children = true; + return this.openNode(this.currentNode); + } + }; + + XMLDocumentCB.prototype.openNode = function(node) { + var att, chunk, name, ref1; + if (!node.isOpen) { + if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) { + this.root = node; + } + chunk = ''; + if (node.type === NodeType.Element) { + this.writerOptions.state = WriterState.OpenTag; + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name; + ref1 = node.attribs; + for (name in ref1) { + if (!hasProp.call(ref1, name)) continue; + att = ref1[name]; + chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel); + } + chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel); + this.writerOptions.state = WriterState.InsideTag; + } else { + this.writerOptions.state = WriterState.OpenTag; + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ''; + } + chunk += this.writer.endline(node, this.writerOptions, this.currentLevel); + } + this.onData(chunk, this.currentLevel); + return node.isOpen = true; + } + }; + + XMLDocumentCB.prototype.closeNode = function(node) { + var chunk; + if (!node.isClosed) { + chunk = ''; + this.writerOptions.state = WriterState.CloseTag; + if (node.type === NodeType.Element) { + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '' + this.writer.endline(node, this.writerOptions, this.currentLevel); + } else { + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel); + } + this.writerOptions.state = WriterState.None; + this.onData(chunk, this.currentLevel); + return node.isClosed = true; + } + }; + + XMLDocumentCB.prototype.onData = function(chunk, level) { + this.documentStarted = true; + return this.onDataCallback(chunk, level + 1); + }; + + XMLDocumentCB.prototype.onEnd = function() { + this.documentCompleted = true; + return this.onEndCallback(); + }; + + XMLDocumentCB.prototype.debugInfo = function(name) { + if (name == null) { + return ""; + } else { + return "node: <" + name + ">"; + } + }; + + XMLDocumentCB.prototype.ele = function() { + return this.element.apply(this, arguments); + }; + + XMLDocumentCB.prototype.nod = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLDocumentCB.prototype.txt = function(value) { + return this.text(value); + }; + + XMLDocumentCB.prototype.dat = function(value) { + return this.cdata(value); + }; + + XMLDocumentCB.prototype.com = function(value) { + return this.comment(value); + }; + + XMLDocumentCB.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + + XMLDocumentCB.prototype.dec = function(version, encoding, standalone) { + return this.declaration(version, encoding, standalone); + }; + + XMLDocumentCB.prototype.dtd = function(root, pubID, sysID) { + return this.doctype(root, pubID, sysID); + }; + + XMLDocumentCB.prototype.e = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLDocumentCB.prototype.n = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLDocumentCB.prototype.t = function(value) { + return this.text(value); + }; + + XMLDocumentCB.prototype.d = function(value) { + return this.cdata(value); + }; + + XMLDocumentCB.prototype.c = function(value) { + return this.comment(value); + }; + + XMLDocumentCB.prototype.r = function(value) { + return this.raw(value); + }; + + XMLDocumentCB.prototype.i = function(target, value) { + return this.instruction(target, value); + }; + + XMLDocumentCB.prototype.att = function() { + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + return this.attList.apply(this, arguments); + } else { + return this.attribute.apply(this, arguments); + } + }; + + XMLDocumentCB.prototype.a = function() { + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + return this.attList.apply(this, arguments); + } else { + return this.attribute.apply(this, arguments); + } + }; + + XMLDocumentCB.prototype.ent = function(name, value) { + return this.entity(name, value); + }; + + XMLDocumentCB.prototype.pent = function(name, value) { + return this.pEntity(name, value); + }; + + XMLDocumentCB.prototype.not = function(name, value) { + return this.notation(name, value); + }; + + return XMLDocumentCB; + + })(); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocumentFragment.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocumentFragment.js new file mode 100644 index 0000000..5d6039c --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocumentFragment.js @@ -0,0 +1,24 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDocumentFragment, XMLNode, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + module.exports = XMLDocumentFragment = (function(superClass) { + extend(XMLDocumentFragment, superClass); + + function XMLDocumentFragment() { + XMLDocumentFragment.__super__.constructor.call(this, null); + this.name = "#document-fragment"; + this.type = NodeType.DocumentFragment; + } + + return XMLDocumentFragment; + + })(XMLNode); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDummy.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDummy.js new file mode 100644 index 0000000..b26083a --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDummy.js @@ -0,0 +1,31 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDummy, XMLNode, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + module.exports = XMLDummy = (function(superClass) { + extend(XMLDummy, superClass); + + function XMLDummy(parent) { + XMLDummy.__super__.constructor.call(this, parent); + this.type = NodeType.Dummy; + } + + XMLDummy.prototype.clone = function() { + return Object.create(this); + }; + + XMLDummy.prototype.toString = function(options) { + return ''; + }; + + return XMLDummy; + + })(XMLNode); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLElement.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLElement.js new file mode 100644 index 0000000..c165729 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLElement.js @@ -0,0 +1,298 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, ref, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + ref = require('./Utility'), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + XMLAttribute = require('./XMLAttribute'); + + XMLNamedNodeMap = require('./XMLNamedNodeMap'); + + module.exports = XMLElement = (function(superClass) { + extend(XMLElement, superClass); + + function XMLElement(parent, name, attributes) { + var child, j, len, ref1; + XMLElement.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing element name. " + this.debugInfo()); + } + this.name = this.stringify.name(name); + this.type = NodeType.Element; + this.attribs = {}; + this.schemaTypeInfo = null; + if (attributes != null) { + this.attribute(attributes); + } + if (parent.type === NodeType.Document) { + this.isRoot = true; + this.documentObject = parent; + parent.rootObject = this; + if (parent.children) { + ref1 = parent.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + if (child.type === NodeType.DocType) { + child.name = this.name; + break; + } + } + } + } + } + + Object.defineProperty(XMLElement.prototype, 'tagName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLElement.prototype, 'namespaceURI', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLElement.prototype, 'prefix', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLElement.prototype, 'localName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLElement.prototype, 'id', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + Object.defineProperty(XMLElement.prototype, 'className', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + Object.defineProperty(XMLElement.prototype, 'classList', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + Object.defineProperty(XMLElement.prototype, 'attributes', { + get: function() { + if (!this.attributeMap || !this.attributeMap.nodes) { + this.attributeMap = new XMLNamedNodeMap(this.attribs); + } + return this.attributeMap; + } + }); + + XMLElement.prototype.clone = function() { + var att, attName, clonedSelf, ref1; + clonedSelf = Object.create(this); + if (clonedSelf.isRoot) { + clonedSelf.documentObject = null; + } + clonedSelf.attribs = {}; + ref1 = this.attribs; + for (attName in ref1) { + if (!hasProp.call(ref1, attName)) continue; + att = ref1[attName]; + clonedSelf.attribs[attName] = att.clone(); + } + clonedSelf.children = []; + this.children.forEach(function(child) { + var clonedChild; + clonedChild = child.clone(); + clonedChild.parent = clonedSelf; + return clonedSelf.children.push(clonedChild); + }); + return clonedSelf; + }; + + XMLElement.prototype.attribute = function(name, value) { + var attName, attValue; + if (name != null) { + name = getValue(name); + } + if (isObject(name)) { + for (attName in name) { + if (!hasProp.call(name, attName)) continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (this.options.keepNullAttributes && (value == null)) { + this.attribs[name] = new XMLAttribute(this, name, ""); + } else if (value != null) { + this.attribs[name] = new XMLAttribute(this, name, value); + } + } + return this; + }; + + XMLElement.prototype.removeAttribute = function(name) { + var attName, j, len; + if (name == null) { + throw new Error("Missing attribute name. " + this.debugInfo()); + } + name = getValue(name); + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + attName = name[j]; + delete this.attribs[attName]; + } + } else { + delete this.attribs[name]; + } + return this; + }; + + XMLElement.prototype.toString = function(options) { + return this.options.writer.element(this, this.options.writer.filterOptions(options)); + }; + + XMLElement.prototype.att = function(name, value) { + return this.attribute(name, value); + }; + + XMLElement.prototype.a = function(name, value) { + return this.attribute(name, value); + }; + + XMLElement.prototype.getAttribute = function(name) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name].value; + } else { + return null; + } + }; + + XMLElement.prototype.setAttribute = function(name, value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.getAttributeNode = function(name) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name]; + } else { + return null; + } + }; + + XMLElement.prototype.setAttributeNode = function(newAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.removeAttributeNode = function(oldAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.getElementsByTagName = function(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.getAttributeNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.setAttributeNS = function(namespaceURI, qualifiedName, value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.removeAttributeNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.getAttributeNodeNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.setAttributeNodeNS = function(newAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.hasAttribute = function(name) { + return this.attribs.hasOwnProperty(name); + }; + + XMLElement.prototype.hasAttributeNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.setIdAttribute = function(name, isId) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name].isId; + } else { + return isId; + } + }; + + XMLElement.prototype.setIdAttributeNS = function(namespaceURI, localName, isId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.setIdAttributeNode = function(idAttr, isId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.getElementsByTagName = function(tagname) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.getElementsByClassName = function(classNames) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.isEqualNode = function(node) { + var i, j, ref1; + if (!XMLElement.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { + return false; + } + if (node.namespaceURI !== this.namespaceURI) { + return false; + } + if (node.prefix !== this.prefix) { + return false; + } + if (node.localName !== this.localName) { + return false; + } + if (node.attribs.length !== this.attribs.length) { + return false; + } + for (i = j = 0, ref1 = this.attribs.length - 1; 0 <= ref1 ? j <= ref1 : j >= ref1; i = 0 <= ref1 ? ++j : --j) { + if (!this.attribs[i].isEqualNode(node.attribs[i])) { + return false; + } + } + return true; + }; + + return XMLElement; + + })(XMLNode); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js new file mode 100644 index 0000000..885402d --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js @@ -0,0 +1,58 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLNamedNodeMap; + + module.exports = XMLNamedNodeMap = (function() { + function XMLNamedNodeMap(nodes) { + this.nodes = nodes; + } + + Object.defineProperty(XMLNamedNodeMap.prototype, 'length', { + get: function() { + return Object.keys(this.nodes).length || 0; + } + }); + + XMLNamedNodeMap.prototype.clone = function() { + return this.nodes = null; + }; + + XMLNamedNodeMap.prototype.getNamedItem = function(name) { + return this.nodes[name]; + }; + + XMLNamedNodeMap.prototype.setNamedItem = function(node) { + var oldNode; + oldNode = this.nodes[node.nodeName]; + this.nodes[node.nodeName] = node; + return oldNode || null; + }; + + XMLNamedNodeMap.prototype.removeNamedItem = function(name) { + var oldNode; + oldNode = this.nodes[name]; + delete this.nodes[name]; + return oldNode || null; + }; + + XMLNamedNodeMap.prototype.item = function(index) { + return this.nodes[Object.keys(this.nodes)[index]] || null; + }; + + XMLNamedNodeMap.prototype.getNamedItemNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented."); + }; + + XMLNamedNodeMap.prototype.setNamedItemNS = function(node) { + throw new Error("This DOM method is not implemented."); + }; + + XMLNamedNodeMap.prototype.removeNamedItemNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented."); + }; + + return XMLNamedNodeMap; + + })(); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNode.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNode.js new file mode 100644 index 0000000..e2c7bb7 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNode.js @@ -0,0 +1,785 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1, + hasProp = {}.hasOwnProperty; + + ref1 = require('./Utility'), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue; + + XMLElement = null; + + XMLCData = null; + + XMLComment = null; + + XMLDeclaration = null; + + XMLDocType = null; + + XMLRaw = null; + + XMLText = null; + + XMLProcessingInstruction = null; + + XMLDummy = null; + + NodeType = null; + + XMLNodeList = null; + + XMLNamedNodeMap = null; + + DocumentPosition = null; + + module.exports = XMLNode = (function() { + function XMLNode(parent1) { + this.parent = parent1; + if (this.parent) { + this.options = this.parent.options; + this.stringify = this.parent.stringify; + } + this.value = null; + this.children = []; + this.baseURI = null; + if (!XMLElement) { + XMLElement = require('./XMLElement'); + XMLCData = require('./XMLCData'); + XMLComment = require('./XMLComment'); + XMLDeclaration = require('./XMLDeclaration'); + XMLDocType = require('./XMLDocType'); + XMLRaw = require('./XMLRaw'); + XMLText = require('./XMLText'); + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + XMLDummy = require('./XMLDummy'); + NodeType = require('./NodeType'); + XMLNodeList = require('./XMLNodeList'); + XMLNamedNodeMap = require('./XMLNamedNodeMap'); + DocumentPosition = require('./DocumentPosition'); + } + } + + Object.defineProperty(XMLNode.prototype, 'nodeName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLNode.prototype, 'nodeType', { + get: function() { + return this.type; + } + }); + + Object.defineProperty(XMLNode.prototype, 'nodeValue', { + get: function() { + return this.value; + } + }); + + Object.defineProperty(XMLNode.prototype, 'parentNode', { + get: function() { + return this.parent; + } + }); + + Object.defineProperty(XMLNode.prototype, 'childNodes', { + get: function() { + if (!this.childNodeList || !this.childNodeList.nodes) { + this.childNodeList = new XMLNodeList(this.children); + } + return this.childNodeList; + } + }); + + Object.defineProperty(XMLNode.prototype, 'firstChild', { + get: function() { + return this.children[0] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'lastChild', { + get: function() { + return this.children[this.children.length - 1] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'previousSibling', { + get: function() { + var i; + i = this.parent.children.indexOf(this); + return this.parent.children[i - 1] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'nextSibling', { + get: function() { + var i; + i = this.parent.children.indexOf(this); + return this.parent.children[i + 1] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'ownerDocument', { + get: function() { + return this.document() || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'textContent', { + get: function() { + var child, j, len, ref2, str; + if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) { + str = ''; + ref2 = this.children; + for (j = 0, len = ref2.length; j < len; j++) { + child = ref2[j]; + if (child.textContent) { + str += child.textContent; + } + } + return str; + } else { + return null; + } + }, + set: function(value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + XMLNode.prototype.setParent = function(parent) { + var child, j, len, ref2, results; + this.parent = parent; + if (parent) { + this.options = parent.options; + this.stringify = parent.stringify; + } + ref2 = this.children; + results = []; + for (j = 0, len = ref2.length; j < len; j++) { + child = ref2[j]; + results.push(child.setParent(this)); + } + return results; + }; + + XMLNode.prototype.element = function(name, attributes, text) { + var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val; + lastChild = null; + if (attributes === null && (text == null)) { + ref2 = [{}, null], attributes = ref2[0], text = ref2[1]; + } + if (attributes == null) { + attributes = {}; + } + attributes = getValue(attributes); + if (!isObject(attributes)) { + ref3 = [attributes, text], text = ref3[0], attributes = ref3[1]; + } + if (name != null) { + name = getValue(name); + } + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + item = name[j]; + lastChild = this.element(item); + } + } else if (isFunction(name)) { + lastChild = this.element(name.apply()); + } else if (isObject(name)) { + for (key in name) { + if (!hasProp.call(name, key)) continue; + val = name[key]; + if (isFunction(val)) { + val = val.apply(); + } + if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { + lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); + } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) { + lastChild = this.dummy(); + } else if (isObject(val) && isEmpty(val)) { + lastChild = this.element(key); + } else if (!this.options.keepNullNodes && (val == null)) { + lastChild = this.dummy(); + } else if (!this.options.separateArrayItems && Array.isArray(val)) { + for (k = 0, len1 = val.length; k < len1; k++) { + item = val[k]; + childNode = {}; + childNode[key] = item; + lastChild = this.element(childNode); + } + } else if (isObject(val)) { + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.element(val); + } else { + lastChild = this.element(key); + lastChild.element(val); + } + } else { + lastChild = this.element(key, val); + } + } + } else if (!this.options.keepNullNodes && text === null) { + lastChild = this.dummy(); + } else { + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.text(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { + lastChild = this.cdata(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { + lastChild = this.comment(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { + lastChild = this.raw(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) { + lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text); + } else { + lastChild = this.node(name, attributes, text); + } + } + if (lastChild == null) { + throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo()); + } + return lastChild; + }; + + XMLNode.prototype.insertBefore = function(name, attributes, text) { + var child, i, newChild, refChild, removed; + if (name != null ? name.type : void 0) { + newChild = name; + refChild = attributes; + newChild.setParent(this); + if (refChild) { + i = children.indexOf(refChild); + removed = children.splice(i); + children.push(newChild); + Array.prototype.push.apply(children, removed); + } else { + children.push(newChild); + } + return newChild; + } else { + if (this.isRoot) { + throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + } + }; + + XMLNode.prototype.insertAfter = function(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + }; + + XMLNode.prototype.remove = function() { + var i, ref2; + if (this.isRoot) { + throw new Error("Cannot remove the root element. " + this.debugInfo()); + } + i = this.parent.children.indexOf(this); + [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2; + return this.parent; + }; + + XMLNode.prototype.node = function(name, attributes, text) { + var child, ref2; + if (name != null) { + name = getValue(name); + } + attributes || (attributes = {}); + attributes = getValue(attributes); + if (!isObject(attributes)) { + ref2 = [attributes, text], text = ref2[0], attributes = ref2[1]; + } + child = new XMLElement(this, name, attributes); + if (text != null) { + child.text(text); + } + this.children.push(child); + return child; + }; + + XMLNode.prototype.text = function(value) { + var child; + if (isObject(value)) { + this.element(value); + } + child = new XMLText(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.cdata = function(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.comment = function(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.commentBefore = function(value) { + var child, i, removed; + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + child = this.parent.comment(value); + Array.prototype.push.apply(this.parent.children, removed); + return this; + }; + + XMLNode.prototype.commentAfter = function(value) { + var child, i, removed; + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + child = this.parent.comment(value); + Array.prototype.push.apply(this.parent.children, removed); + return this; + }; + + XMLNode.prototype.raw = function(value) { + var child; + child = new XMLRaw(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.dummy = function() { + var child; + child = new XMLDummy(this); + return child; + }; + + XMLNode.prototype.instruction = function(target, value) { + var insTarget, insValue, instruction, j, len; + if (target != null) { + target = getValue(target); + } + if (value != null) { + value = getValue(value); + } + if (Array.isArray(target)) { + for (j = 0, len = target.length; j < len; j++) { + insTarget = target[j]; + this.instruction(insTarget); + } + } else if (isObject(target)) { + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + instruction = new XMLProcessingInstruction(this, target, value); + this.children.push(instruction); + } + return this; + }; + + XMLNode.prototype.instructionBefore = function(target, value) { + var child, i, removed; + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + child = this.parent.instruction(target, value); + Array.prototype.push.apply(this.parent.children, removed); + return this; + }; + + XMLNode.prototype.instructionAfter = function(target, value) { + var child, i, removed; + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + child = this.parent.instruction(target, value); + Array.prototype.push.apply(this.parent.children, removed); + return this; + }; + + XMLNode.prototype.declaration = function(version, encoding, standalone) { + var doc, xmldec; + doc = this.document(); + xmldec = new XMLDeclaration(doc, version, encoding, standalone); + if (doc.children.length === 0) { + doc.children.unshift(xmldec); + } else if (doc.children[0].type === NodeType.Declaration) { + doc.children[0] = xmldec; + } else { + doc.children.unshift(xmldec); + } + return doc.root() || doc; + }; + + XMLNode.prototype.dtd = function(pubID, sysID) { + var child, doc, doctype, i, j, k, len, len1, ref2, ref3; + doc = this.document(); + doctype = new XMLDocType(doc, pubID, sysID); + ref2 = doc.children; + for (i = j = 0, len = ref2.length; j < len; i = ++j) { + child = ref2[i]; + if (child.type === NodeType.DocType) { + doc.children[i] = doctype; + return doctype; + } + } + ref3 = doc.children; + for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) { + child = ref3[i]; + if (child.isRoot) { + doc.children.splice(i, 0, doctype); + return doctype; + } + } + doc.children.push(doctype); + return doctype; + }; + + XMLNode.prototype.up = function() { + if (this.isRoot) { + throw new Error("The root node has no parent. Use doc() if you need to get the document object."); + } + return this.parent; + }; + + XMLNode.prototype.root = function() { + var node; + node = this; + while (node) { + if (node.type === NodeType.Document) { + return node.rootObject; + } else if (node.isRoot) { + return node; + } else { + node = node.parent; + } + } + }; + + XMLNode.prototype.document = function() { + var node; + node = this; + while (node) { + if (node.type === NodeType.Document) { + return node; + } else { + node = node.parent; + } + } + }; + + XMLNode.prototype.end = function(options) { + return this.document().end(options); + }; + + XMLNode.prototype.prev = function() { + var i; + i = this.parent.children.indexOf(this); + if (i < 1) { + throw new Error("Already at the first node. " + this.debugInfo()); + } + return this.parent.children[i - 1]; + }; + + XMLNode.prototype.next = function() { + var i; + i = this.parent.children.indexOf(this); + if (i === -1 || i === this.parent.children.length - 1) { + throw new Error("Already at the last node. " + this.debugInfo()); + } + return this.parent.children[i + 1]; + }; + + XMLNode.prototype.importDocument = function(doc) { + var clonedRoot; + clonedRoot = doc.root().clone(); + clonedRoot.parent = this; + clonedRoot.isRoot = false; + this.children.push(clonedRoot); + return this; + }; + + XMLNode.prototype.debugInfo = function(name) { + var ref2, ref3; + name = name || this.name; + if ((name == null) && !((ref2 = this.parent) != null ? ref2.name : void 0)) { + return ""; + } else if (name == null) { + return "parent: <" + this.parent.name + ">"; + } else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) { + return "node: <" + name + ">"; + } else { + return "node: <" + name + ">, parent: <" + this.parent.name + ">"; + } + }; + + XMLNode.prototype.ele = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLNode.prototype.nod = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLNode.prototype.txt = function(value) { + return this.text(value); + }; + + XMLNode.prototype.dat = function(value) { + return this.cdata(value); + }; + + XMLNode.prototype.com = function(value) { + return this.comment(value); + }; + + XMLNode.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + + XMLNode.prototype.doc = function() { + return this.document(); + }; + + XMLNode.prototype.dec = function(version, encoding, standalone) { + return this.declaration(version, encoding, standalone); + }; + + XMLNode.prototype.e = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLNode.prototype.n = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLNode.prototype.t = function(value) { + return this.text(value); + }; + + XMLNode.prototype.d = function(value) { + return this.cdata(value); + }; + + XMLNode.prototype.c = function(value) { + return this.comment(value); + }; + + XMLNode.prototype.r = function(value) { + return this.raw(value); + }; + + XMLNode.prototype.i = function(target, value) { + return this.instruction(target, value); + }; + + XMLNode.prototype.u = function() { + return this.up(); + }; + + XMLNode.prototype.importXMLBuilder = function(doc) { + return this.importDocument(doc); + }; + + XMLNode.prototype.replaceChild = function(newChild, oldChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.removeChild = function(oldChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.appendChild = function(newChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.hasChildNodes = function() { + return this.children.length !== 0; + }; + + XMLNode.prototype.cloneNode = function(deep) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.normalize = function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.isSupported = function(feature, version) { + return true; + }; + + XMLNode.prototype.hasAttributes = function() { + return this.attribs.length !== 0; + }; + + XMLNode.prototype.compareDocumentPosition = function(other) { + var ref, res; + ref = this; + if (ref === other) { + return 0; + } else if (this.document() !== other.document()) { + res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific; + if (Math.random() < 0.5) { + res |= DocumentPosition.Preceding; + } else { + res |= DocumentPosition.Following; + } + return res; + } else if (ref.isAncestor(other)) { + return DocumentPosition.Contains | DocumentPosition.Preceding; + } else if (ref.isDescendant(other)) { + return DocumentPosition.Contains | DocumentPosition.Following; + } else if (ref.isPreceding(other)) { + return DocumentPosition.Preceding; + } else { + return DocumentPosition.Following; + } + }; + + XMLNode.prototype.isSameNode = function(other) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.lookupPrefix = function(namespaceURI) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.isDefaultNamespace = function(namespaceURI) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.lookupNamespaceURI = function(prefix) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.isEqualNode = function(node) { + var i, j, ref2; + if (node.nodeType !== this.nodeType) { + return false; + } + if (node.children.length !== this.children.length) { + return false; + } + for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) { + if (!this.children[i].isEqualNode(node.children[i])) { + return false; + } + } + return true; + }; + + XMLNode.prototype.getFeature = function(feature, version) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.setUserData = function(key, data, handler) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.getUserData = function(key) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.contains = function(other) { + if (!other) { + return false; + } + return other === this || this.isDescendant(other); + }; + + XMLNode.prototype.isDescendant = function(node) { + var child, isDescendantChild, j, len, ref2; + ref2 = this.children; + for (j = 0, len = ref2.length; j < len; j++) { + child = ref2[j]; + if (node === child) { + return true; + } + isDescendantChild = child.isDescendant(node); + if (isDescendantChild) { + return true; + } + } + return false; + }; + + XMLNode.prototype.isAncestor = function(node) { + return node.isDescendant(this); + }; + + XMLNode.prototype.isPreceding = function(node) { + var nodePos, thisPos; + nodePos = this.treePosition(node); + thisPos = this.treePosition(this); + if (nodePos === -1 || thisPos === -1) { + return false; + } else { + return nodePos < thisPos; + } + }; + + XMLNode.prototype.isFollowing = function(node) { + var nodePos, thisPos; + nodePos = this.treePosition(node); + thisPos = this.treePosition(this); + if (nodePos === -1 || thisPos === -1) { + return false; + } else { + return nodePos > thisPos; + } + }; + + XMLNode.prototype.treePosition = function(node) { + var found, pos; + pos = 0; + found = false; + this.foreachTreeNode(this.document(), function(childNode) { + pos++; + if (!found && childNode === node) { + return found = true; + } + }); + if (found) { + return pos; + } else { + return -1; + } + }; + + XMLNode.prototype.foreachTreeNode = function(node, func) { + var child, j, len, ref2, res; + node || (node = this.document()); + ref2 = node.children; + for (j = 0, len = ref2.length; j < len; j++) { + child = ref2[j]; + if (res = func(child)) { + return res; + } else { + res = this.foreachTreeNode(child, func); + if (res) { + return res; + } + } + } + }; + + return XMLNode; + + })(); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNodeFilter.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNodeFilter.js new file mode 100644 index 0000000..ce32fd5 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNodeFilter.js @@ -0,0 +1,48 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLNodeFilter; + + module.exports = XMLNodeFilter = (function() { + function XMLNodeFilter() {} + + XMLNodeFilter.prototype.FilterAccept = 1; + + XMLNodeFilter.prototype.FilterReject = 2; + + XMLNodeFilter.prototype.FilterSkip = 3; + + XMLNodeFilter.prototype.ShowAll = 0xffffffff; + + XMLNodeFilter.prototype.ShowElement = 0x1; + + XMLNodeFilter.prototype.ShowAttribute = 0x2; + + XMLNodeFilter.prototype.ShowText = 0x4; + + XMLNodeFilter.prototype.ShowCDataSection = 0x8; + + XMLNodeFilter.prototype.ShowEntityReference = 0x10; + + XMLNodeFilter.prototype.ShowEntity = 0x20; + + XMLNodeFilter.prototype.ShowProcessingInstruction = 0x40; + + XMLNodeFilter.prototype.ShowComment = 0x80; + + XMLNodeFilter.prototype.ShowDocument = 0x100; + + XMLNodeFilter.prototype.ShowDocumentType = 0x200; + + XMLNodeFilter.prototype.ShowDocumentFragment = 0x400; + + XMLNodeFilter.prototype.ShowNotation = 0x800; + + XMLNodeFilter.prototype.acceptNode = function(node) { + throw new Error("This DOM method is not implemented."); + }; + + return XMLNodeFilter; + + })(); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNodeList.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNodeList.js new file mode 100644 index 0000000..3414a3e --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNodeList.js @@ -0,0 +1,28 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLNodeList; + + module.exports = XMLNodeList = (function() { + function XMLNodeList(nodes) { + this.nodes = nodes; + } + + Object.defineProperty(XMLNodeList.prototype, 'length', { + get: function() { + return this.nodes.length || 0; + } + }); + + XMLNodeList.prototype.clone = function() { + return this.nodes = null; + }; + + XMLNodeList.prototype.item = function(index) { + return this.nodes[index] || null; + }; + + return XMLNodeList; + + })(); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js new file mode 100644 index 0000000..d4333d4 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js @@ -0,0 +1,49 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLCharacterData, XMLProcessingInstruction, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + NodeType = require('./NodeType'); + + XMLCharacterData = require('./XMLCharacterData'); + + module.exports = XMLProcessingInstruction = (function(superClass) { + extend(XMLProcessingInstruction, superClass); + + function XMLProcessingInstruction(parent, target, value) { + XMLProcessingInstruction.__super__.constructor.call(this, parent); + if (target == null) { + throw new Error("Missing instruction target. " + this.debugInfo()); + } + this.type = NodeType.ProcessingInstruction; + this.target = this.stringify.insTarget(target); + this.name = this.target; + if (value) { + this.value = this.stringify.insValue(value); + } + } + + XMLProcessingInstruction.prototype.clone = function() { + return Object.create(this); + }; + + XMLProcessingInstruction.prototype.toString = function(options) { + return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options)); + }; + + XMLProcessingInstruction.prototype.isEqualNode = function(node) { + if (!XMLProcessingInstruction.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { + return false; + } + if (node.target !== this.target) { + return false; + } + return true; + }; + + return XMLProcessingInstruction; + + })(XMLCharacterData); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLRaw.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLRaw.js new file mode 100644 index 0000000..b592850 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLRaw.js @@ -0,0 +1,35 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLNode, XMLRaw, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + NodeType = require('./NodeType'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLRaw = (function(superClass) { + extend(XMLRaw, superClass); + + function XMLRaw(parent, text) { + XMLRaw.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing raw text. " + this.debugInfo()); + } + this.type = NodeType.Raw; + this.value = this.stringify.raw(text); + } + + XMLRaw.prototype.clone = function() { + return Object.create(this); + }; + + XMLRaw.prototype.toString = function(options) { + return this.options.writer.raw(this, this.options.writer.filterOptions(options)); + }; + + return XMLRaw; + + })(XMLNode); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStreamWriter.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStreamWriter.js new file mode 100644 index 0000000..159dc6b --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStreamWriter.js @@ -0,0 +1,176 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, WriterState, XMLStreamWriter, XMLWriterBase, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + NodeType = require('./NodeType'); + + XMLWriterBase = require('./XMLWriterBase'); + + WriterState = require('./WriterState'); + + module.exports = XMLStreamWriter = (function(superClass) { + extend(XMLStreamWriter, superClass); + + function XMLStreamWriter(stream, options) { + this.stream = stream; + XMLStreamWriter.__super__.constructor.call(this, options); + } + + XMLStreamWriter.prototype.endline = function(node, options, level) { + if (node.isLastRootNode && options.state === WriterState.CloseTag) { + return ''; + } else { + return XMLStreamWriter.__super__.endline.call(this, node, options, level); + } + }; + + XMLStreamWriter.prototype.document = function(doc, options) { + var child, i, j, k, len, len1, ref, ref1, results; + ref = doc.children; + for (i = j = 0, len = ref.length; j < len; i = ++j) { + child = ref[i]; + child.isLastRootNode = i === doc.children.length - 1; + } + options = this.filterOptions(options); + ref1 = doc.children; + results = []; + for (k = 0, len1 = ref1.length; k < len1; k++) { + child = ref1[k]; + results.push(this.writeChildNode(child, options, 0)); + } + return results; + }; + + XMLStreamWriter.prototype.attribute = function(att, options, level) { + return this.stream.write(XMLStreamWriter.__super__.attribute.call(this, att, options, level)); + }; + + XMLStreamWriter.prototype.cdata = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.cdata.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.comment = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.comment.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.declaration = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.declaration.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.docType = function(node, options, level) { + var child, j, len, ref; + level || (level = 0); + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + this.stream.write(this.indent(node, options, level)); + this.stream.write(' 0) { + this.stream.write(' ['); + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.InsideTag; + ref = node.children; + for (j = 0, len = ref.length; j < len; j++) { + child = ref[j]; + this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + this.stream.write(']'); + } + options.state = WriterState.CloseTag; + this.stream.write(options.spaceBeforeSlash + '>'); + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.None; + return this.closeNode(node, options, level); + }; + + XMLStreamWriter.prototype.element = function(node, options, level) { + var att, child, childNodeCount, firstChildNode, j, len, name, prettySuppressed, ref, ref1; + level || (level = 0); + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + this.stream.write(this.indent(node, options, level) + '<' + node.name); + ref = node.attribs; + for (name in ref) { + if (!hasProp.call(ref, name)) continue; + att = ref[name]; + this.attribute(att, options, level); + } + childNodeCount = node.children.length; + firstChildNode = childNodeCount === 0 ? null : node.children[0]; + if (childNodeCount === 0 || node.children.every(function(e) { + return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === ''; + })) { + if (options.allowEmpty) { + this.stream.write('>'); + options.state = WriterState.CloseTag; + this.stream.write(''); + } else { + options.state = WriterState.CloseTag; + this.stream.write(options.spaceBeforeSlash + '/>'); + } + } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) { + this.stream.write('>'); + options.state = WriterState.InsideTag; + options.suppressPrettyCount++; + prettySuppressed = true; + this.writeChildNode(firstChildNode, options, level + 1); + options.suppressPrettyCount--; + prettySuppressed = false; + options.state = WriterState.CloseTag; + this.stream.write(''); + } else { + this.stream.write('>' + this.endline(node, options, level)); + options.state = WriterState.InsideTag; + ref1 = node.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + this.stream.write(this.indent(node, options, level) + ''); + } + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.None; + return this.closeNode(node, options, level); + }; + + XMLStreamWriter.prototype.processingInstruction = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.processingInstruction.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.raw = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.raw.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.text = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.text.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.dtdAttList = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.dtdAttList.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.dtdElement = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.dtdElement.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.dtdEntity = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.dtdEntity.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.dtdNotation = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.dtdNotation.call(this, node, options, level)); + }; + + return XMLStreamWriter; + + })(XMLWriterBase); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStringWriter.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStringWriter.js new file mode 100644 index 0000000..7187017 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStringWriter.js @@ -0,0 +1,35 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLStringWriter, XMLWriterBase, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + XMLWriterBase = require('./XMLWriterBase'); + + module.exports = XMLStringWriter = (function(superClass) { + extend(XMLStringWriter, superClass); + + function XMLStringWriter(options) { + XMLStringWriter.__super__.constructor.call(this, options); + } + + XMLStringWriter.prototype.document = function(doc, options) { + var child, i, len, r, ref; + options = this.filterOptions(options); + r = ''; + ref = doc.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + r += this.writeChildNode(child, options, 0); + } + if (options.pretty && r.slice(-options.newline.length) === options.newline) { + r = r.slice(0, -options.newline.length); + } + return r; + }; + + return XMLStringWriter; + + })(XMLWriterBase); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStringifier.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStringifier.js new file mode 100644 index 0000000..a39475c --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStringifier.js @@ -0,0 +1,240 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLStringifier, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + hasProp = {}.hasOwnProperty; + + module.exports = XMLStringifier = (function() { + function XMLStringifier(options) { + this.assertLegalName = bind(this.assertLegalName, this); + this.assertLegalChar = bind(this.assertLegalChar, this); + var key, ref, value; + options || (options = {}); + this.options = options; + if (!this.options.version) { + this.options.version = '1.0'; + } + ref = options.stringify || {}; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + value = ref[key]; + this[key] = value; + } + } + + XMLStringifier.prototype.name = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalName('' + val || ''); + }; + + XMLStringifier.prototype.text = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar(this.textEscape('' + val || '')); + }; + + XMLStringifier.prototype.cdata = function(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + val = val.replace(']]>', ']]]]>'); + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.comment = function(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (val.match(/--/)) { + throw new Error("Comment text cannot contain double-hypen: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.raw = function(val) { + if (this.options.noValidation) { + return val; + } + return '' + val || ''; + }; + + XMLStringifier.prototype.attValue = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar(this.attEscape(val = '' + val || '')); + }; + + XMLStringifier.prototype.insTarget = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + }; + + XMLStringifier.prototype.insValue = function(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (val.match(/\?>/)) { + throw new Error("Invalid processing instruction value: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.xmlVersion = function(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (!val.match(/1\.[0-9]+/)) { + throw new Error("Invalid version number: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlEncoding = function(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) { + throw new Error("Invalid encoding: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.xmlStandalone = function(val) { + if (this.options.noValidation) { + return val; + } + if (val) { + return "yes"; + } else { + return "no"; + } + }; + + XMLStringifier.prototype.dtdPubID = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + }; + + XMLStringifier.prototype.dtdSysID = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + }; + + XMLStringifier.prototype.dtdElementValue = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + }; + + XMLStringifier.prototype.dtdAttType = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + }; + + XMLStringifier.prototype.dtdAttDefault = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + }; + + XMLStringifier.prototype.dtdEntityValue = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + }; + + XMLStringifier.prototype.dtdNData = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + }; + + XMLStringifier.prototype.convertAttKey = '@'; + + XMLStringifier.prototype.convertPIKey = '?'; + + XMLStringifier.prototype.convertTextKey = '#text'; + + XMLStringifier.prototype.convertCDataKey = '#cdata'; + + XMLStringifier.prototype.convertCommentKey = '#comment'; + + XMLStringifier.prototype.convertRawKey = '#raw'; + + XMLStringifier.prototype.assertLegalChar = function(str) { + var regex, res; + if (this.options.noValidation) { + return str; + } + regex = ''; + if (this.options.version === '1.0') { + regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + if (res = str.match(regex)) { + throw new Error("Invalid character in string: " + str + " at index " + res.index); + } + } else if (this.options.version === '1.1') { + regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + if (res = str.match(regex)) { + throw new Error("Invalid character in string: " + str + " at index " + res.index); + } + } + return str; + }; + + XMLStringifier.prototype.assertLegalName = function(str) { + var regex; + if (this.options.noValidation) { + return str; + } + this.assertLegalChar(str); + regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/; + if (!str.match(regex)) { + throw new Error("Invalid character in name"); + } + return str; + }; + + XMLStringifier.prototype.textEscape = function(str) { + var ampregex; + if (this.options.noValidation) { + return str; + } + ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g; + return str.replace(ampregex, '&').replace(//g, '>').replace(/\r/g, ' '); + }; + + XMLStringifier.prototype.attEscape = function(str) { + var ampregex; + if (this.options.noValidation) { + return str; + } + ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g; + return str.replace(ampregex, '&').replace(/ 0) { + return new Array(indentLevel).join(options.indent); + } + } + return ''; + }; + + XMLWriterBase.prototype.endline = function(node, options, level) { + if (!options.pretty || options.suppressPrettyCount) { + return ''; + } else { + return options.newline; + } + }; + + XMLWriterBase.prototype.attribute = function(att, options, level) { + var r; + this.openAttribute(att, options, level); + r = ' ' + att.name + '="' + att.value + '"'; + this.closeAttribute(att, options, level); + return r; + }; + + XMLWriterBase.prototype.cdata = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.comment = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.declaration = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + ''; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.docType = function(node, options, level) { + var child, i, len, r, ref; + level || (level = 0); + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + r += ' 0) { + r += ' ['; + r += this.endline(node, options, level); + options.state = WriterState.InsideTag; + ref = node.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + r += this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + r += ']'; + } + options.state = WriterState.CloseTag; + r += options.spaceBeforeSlash + '>'; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.element = function(node, options, level) { + var att, child, childNodeCount, firstChildNode, i, j, len, len1, name, prettySuppressed, r, ref, ref1, ref2; + level || (level = 0); + prettySuppressed = false; + r = ''; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r += this.indent(node, options, level) + '<' + node.name; + ref = node.attribs; + for (name in ref) { + if (!hasProp.call(ref, name)) continue; + att = ref[name]; + r += this.attribute(att, options, level); + } + childNodeCount = node.children.length; + firstChildNode = childNodeCount === 0 ? null : node.children[0]; + if (childNodeCount === 0 || node.children.every(function(e) { + return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === ''; + })) { + if (options.allowEmpty) { + r += '>'; + options.state = WriterState.CloseTag; + r += '' + this.endline(node, options, level); + } else { + options.state = WriterState.CloseTag; + r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level); + } + } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) { + r += '>'; + options.state = WriterState.InsideTag; + options.suppressPrettyCount++; + prettySuppressed = true; + r += this.writeChildNode(firstChildNode, options, level + 1); + options.suppressPrettyCount--; + prettySuppressed = false; + options.state = WriterState.CloseTag; + r += '' + this.endline(node, options, level); + } else { + if (options.dontPrettyTextNodes) { + ref1 = node.children; + for (i = 0, len = ref1.length; i < len; i++) { + child = ref1[i]; + if ((child.type === NodeType.Text || child.type === NodeType.Raw) && (child.value != null)) { + options.suppressPrettyCount++; + prettySuppressed = true; + break; + } + } + } + r += '>' + this.endline(node, options, level); + options.state = WriterState.InsideTag; + ref2 = node.children; + for (j = 0, len1 = ref2.length; j < len1; j++) { + child = ref2[j]; + r += this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + r += this.indent(node, options, level) + ''; + if (prettySuppressed) { + options.suppressPrettyCount--; + } + r += this.endline(node, options, level); + options.state = WriterState.None; + } + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.writeChildNode = function(node, options, level) { + switch (node.type) { + case NodeType.CData: + return this.cdata(node, options, level); + case NodeType.Comment: + return this.comment(node, options, level); + case NodeType.Element: + return this.element(node, options, level); + case NodeType.Raw: + return this.raw(node, options, level); + case NodeType.Text: + return this.text(node, options, level); + case NodeType.ProcessingInstruction: + return this.processingInstruction(node, options, level); + case NodeType.Dummy: + return ''; + case NodeType.Declaration: + return this.declaration(node, options, level); + case NodeType.DocType: + return this.docType(node, options, level); + case NodeType.AttributeDeclaration: + return this.dtdAttList(node, options, level); + case NodeType.ElementDeclaration: + return this.dtdElement(node, options, level); + case NodeType.EntityDeclaration: + return this.dtdEntity(node, options, level); + case NodeType.NotationDeclaration: + return this.dtdNotation(node, options, level); + default: + throw new Error("Unknown XML node type: " + node.constructor.name); + } + }; + + XMLWriterBase.prototype.processingInstruction = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + ''; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.raw = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + options.state = WriterState.InsideTag; + r += node.value; + options.state = WriterState.CloseTag; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.text = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + options.state = WriterState.InsideTag; + r += node.value; + options.state = WriterState.CloseTag; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.dtdAttList = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.dtdElement = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.dtdEntity = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.dtdNotation = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.openNode = function(node, options, level) {}; + + XMLWriterBase.prototype.closeNode = function(node, options, level) {}; + + XMLWriterBase.prototype.openAttribute = function(att, options, level) {}; + + XMLWriterBase.prototype.closeAttribute = function(att, options, level) {}; + + return XMLWriterBase; + + })(); + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/lib/index.js b/node_modules/xml2js/node_modules/xmlbuilder/lib/index.js new file mode 100644 index 0000000..b1ed263 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/lib/index.js @@ -0,0 +1,65 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction, ref; + + ref = require('./Utility'), assign = ref.assign, isFunction = ref.isFunction; + + XMLDOMImplementation = require('./XMLDOMImplementation'); + + XMLDocument = require('./XMLDocument'); + + XMLDocumentCB = require('./XMLDocumentCB'); + + XMLStringWriter = require('./XMLStringWriter'); + + XMLStreamWriter = require('./XMLStreamWriter'); + + NodeType = require('./NodeType'); + + WriterState = require('./WriterState'); + + module.exports.create = function(name, xmldec, doctype, options) { + var doc, root; + if (name == null) { + throw new Error("Root element needs a name."); + } + options = assign({}, xmldec, doctype, options); + doc = new XMLDocument(options); + root = doc.element(name); + if (!options.headless) { + doc.declaration(options); + if ((options.pubID != null) || (options.sysID != null)) { + doc.dtd(options); + } + } + return root; + }; + + module.exports.begin = function(options, onData, onEnd) { + var ref1; + if (isFunction(options)) { + ref1 = [options, onData], onData = ref1[0], onEnd = ref1[1]; + options = {}; + } + if (onData) { + return new XMLDocumentCB(options, onData, onEnd); + } else { + return new XMLDocument(options); + } + }; + + module.exports.stringWriter = function(options) { + return new XMLStringWriter(options); + }; + + module.exports.streamWriter = function(stream, options) { + return new XMLStreamWriter(stream, options); + }; + + module.exports.implementation = new XMLDOMImplementation(); + + module.exports.nodeType = NodeType; + + module.exports.writerState = WriterState; + +}).call(this); diff --git a/node_modules/xml2js/node_modules/xmlbuilder/package.json b/node_modules/xml2js/node_modules/xmlbuilder/package.json new file mode 100644 index 0000000..512cd97 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/package.json @@ -0,0 +1,39 @@ +{ + "name": "xmlbuilder", + "version": "11.0.1", + "keywords": [ + "xml", + "xmlbuilder" + ], + "homepage": "http://github.com/oozcitak/xmlbuilder-js", + "description": "An XML builder for node.js", + "author": "Ozgur Ozcitak ", + "contributors": [], + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/oozcitak/xmlbuilder-js.git" + }, + "bugs": { + "url": "http://github.com/oozcitak/xmlbuilder-js/issues" + }, + "main": "./lib/index", + "typings": "./typings/index.d.ts", + "engines": { + "node": ">=4.0" + }, + "dependencies": {}, + "devDependencies": { + "coffeescript": "1.*", + "mocha": "*", + "coffee-coverage": "2.*", + "istanbul": "*", + "coveralls": "*", + "xpath": "*" + }, + "scripts": { + "prepublishOnly": "coffee -co lib src", + "postpublish": "rm -rf lib", + "test": "mocha \"test/**/*.coffee\" && istanbul report text lcov" + } +} diff --git a/node_modules/xml2js/node_modules/xmlbuilder/typings/index.d.ts b/node_modules/xml2js/node_modules/xmlbuilder/typings/index.d.ts new file mode 100644 index 0000000..3e0e5b0 --- /dev/null +++ b/node_modules/xml2js/node_modules/xmlbuilder/typings/index.d.ts @@ -0,0 +1,153 @@ +// Type definitions for xmlbuilder +// Project: https://github.com/oozcitak/xmlbuilder-js +// Definitions by: Wallymathieu +// : GaikwadPratik +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = xmlbuilder; + +declare namespace xmlbuilder { + + class XMLDocType { + clone(): XMLDocType; + element(name: string, value?: Object): XMLDocType; + attList(elementName: string, attributeName: string, attributeType: string, defaultValueType?: string, defaultValue?: any): XMLDocType; + entity(name: string, value: any): XMLDocType; + pEntity(name: string, value: any): XMLDocType; + notation(name: string, value: any): XMLDocType; + cdata(value: string): XMLDocType; + comment(value: string): XMLDocType; + instruction(target: string, value: any): XMLDocType; + root(): XMLDocType; + document(): any; + toString(options?: XMLToStringOptions, level?: Number): string; + + ele(name: string, value?: Object): XMLDocType; + att(elementName: string, attributeName: string, attributeType: string, defaultValueType?: string, defaultValue?: any): XMLDocType; + ent(name: string, value: any): XMLDocType; + pent(name: string, value: any): XMLDocType; + not(name: string, value: any): XMLDocType; + dat(value: string): XMLDocType; + com(value: string): XMLDocType; + ins(target: string, value: any): XMLDocType; + up(): XMLDocType; + doc(): any; + } + + class XMLElementOrXMLNode { + // XMLElement: + clone(): XMLElementOrXMLNode; + attribute(name: any, value?: any): XMLElementOrXMLNode; + att(name: any, value?: any): XMLElementOrXMLNode; + removeAttribute(name: string): XMLElementOrXMLNode; + instruction(target: string, value: any): XMLElementOrXMLNode; + instruction(array: Array): XMLElementOrXMLNode; + instruction(obj: Object): XMLElementOrXMLNode; + ins(target: string, value: any): XMLElementOrXMLNode; + ins(array: Array): XMLElementOrXMLNode; + ins(obj: Object): XMLElementOrXMLNode; + a(name: any, value?: any): XMLElementOrXMLNode; + i(target: string, value: any): XMLElementOrXMLNode; + i(array: Array): XMLElementOrXMLNode; + i(obj: Object): XMLElementOrXMLNode; + toString(options?: XMLToStringOptions, level?: Number): string; + // XMLNode: + element(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + ele(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + insertBefore(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + insertAfter(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + remove(): XMLElementOrXMLNode; + node(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + text(value: string): XMLElementOrXMLNode; + cdata(value: string): XMLElementOrXMLNode; + comment(value: string): XMLElementOrXMLNode; + raw(value: string): XMLElementOrXMLNode; + declaration(version: string, encoding: string, standalone: boolean): XMLElementOrXMLNode; + doctype(pubID: string, sysID: string): XMLDocType; + up(): XMLElementOrXMLNode; + importDocument(input: XMLElementOrXMLNode): XMLElementOrXMLNode; + root(): XMLElementOrXMLNode; + document(): any; + end(options?: XMLEndOptions): string; + prev(): XMLElementOrXMLNode; + next(): XMLElementOrXMLNode; + nod(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + txt(value: string): XMLElementOrXMLNode; + dat(value: string): XMLElementOrXMLNode; + com(value: string): XMLElementOrXMLNode; + doc(): XMLElementOrXMLNode; + dec(version: string, encoding: string, standalone: boolean): XMLElementOrXMLNode; + dtd(pubID: string, sysID: string): XMLDocType; + e(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + n(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + t(value: string): XMLElementOrXMLNode; + d(value: string): XMLElementOrXMLNode; + c(value: string): XMLElementOrXMLNode; + r(value: string): XMLElementOrXMLNode; + u(): XMLElementOrXMLNode; + } + + interface XMLDec { + version?: string; + encoding?: string; + standalone?: boolean; + } + + interface XMLDtd { + pubID?: string; + sysID?: string; + } + + interface XMLStringifier { + [x: string]: ((v: any) => string) | string; + } + + interface XMLWriter { + [x: string]: ((e: XMLElementOrXMLNode, options: WriterOptions, level?: number) => void); + } + + interface XMLCreateOptions { + headless?: boolean; + keepNullNodes?: boolean; + keepNullAttributes?: boolean; + ignoreDecorators?: boolean; + separateArrayItems?: boolean; + noDoubleEncoding?: boolean; + stringify?: XMLStringifier; + } + + interface XMLToStringOptions { + pretty?: boolean; + indent?: string; + offset?: number; + newline?: string; + allowEmpty?: boolean; + spacebeforeslash?: string; + } + + interface XMLEndOptions extends XMLToStringOptions { + writer?: XMLWriter; + } + + interface WriterOptions { + pretty?: boolean; + indent?: string; + newline?: string; + offset?: number; + allowEmpty?: boolean; + dontPrettyTextNodes?: boolean; + spaceBeforeSlash?: string | boolean; + user? :any; + state?: WriterState; + } + + enum WriterState { + None = 0, + OpenTag = 1, + InsideTag = 2, + CloseTag = 3 + } + + function create(nameOrObjSpec: string | { [name: string]: Object }, xmldecOrOptions?: XMLDec | XMLCreateOptions, doctypeOrOptions?: XMLDtd | XMLCreateOptions, options?: XMLCreateOptions): XMLElementOrXMLNode; + function begin(): XMLElementOrXMLNode; +} \ No newline at end of file diff --git a/node_modules/xml2js/package.json b/node_modules/xml2js/package.json new file mode 100644 index 0000000..bc8eb66 --- /dev/null +++ b/node_modules/xml2js/package.json @@ -0,0 +1,93 @@ +{ + "name": "xml2js", + "description": "Simple XML to JavaScript object converter.", + "keywords": [ + "xml", + "json" + ], + "homepage": "https://github.com/Leonidas-from-XIV/node-xml2js", + "version": "0.5.0", + "author": "Marek Kubica (https://xivilization.net)", + "contributors": [ + "maqr (https://github.com/maqr)", + "Ben Weaver (http://benweaver.com/)", + "Jae Kwon (https://github.com/jaekwon)", + "Jim Robert", + "Ștefan Rusu (http://www.saltwaterc.eu/)", + "Carter Cole (http://cartercole.com/)", + "Kurt Raschke (http://www.kurtraschke.com/)", + "Contra (https://github.com/Contra)", + "Marcelo Diniz (https://github.com/mdiniz)", + "Michael Hart (https://github.com/mhart)", + "Zachary Scott (http://zacharyscott.net/)", + "Raoul Millais (https://github.com/raoulmillais)", + "Salsita Software (http://www.salsitasoft.com/)", + "Mike Schilling (http://www.emotive.com/)", + "Jackson Tian (http://weibo.com/shyvo)", + "Mikhail Zyatin (https://github.com/Sitin)", + "Chris Tavares (https://github.com/christav)", + "Frank Xu (http://f2e.us/)", + "Guido D'Albore (http://www.bitstorm.it/)", + "Jack Senechal (http://jacksenechal.com/)", + "Matthias Hölzl (https://github.com/hoelzl)", + "Camille Reynders (http://www.creynders.be/)", + "Taylor Gautier (https://github.com/tsgautier)", + "Todd Bryan (https://github.com/toddrbryan)", + "Leore Avidar (http://leoreavidar.com/)", + "Dave Aitken (http://www.actionshrimp.com/)", + "Shaney Orrowe ", + "Candle ", + "Jess Telford (http://jes.st)", + "Tom Hughes < (http://compton.nu/)", + "Piotr Rochala (http://rocha.la/)", + "Michael Avila (https://github.com/michaelavila)", + "Ryan Gahl (https://github.com/ryedin)", + "Eric Laberge (https://github.com/elaberge)", + "Benjamin E. Coe (https://twitter.com/benjamincoe)", + "Stephen Cresswell (https://github.com/cressie176)", + "Pascal Ehlert (http://www.hacksrus.net/)", + "Tom Spencer (http://fiznool.com/)", + "Tristian Flanagan (https://github.com/tflanagan)", + "Tim Johns (https://github.com/TimJohns)", + "Bogdan Chadkin (https://github.com/TrySound)", + "David Wood (http://codesleuth.co.uk/)", + "Nicolas Maquet (https://github.com/nmaquet)", + "Lovell Fuller (http://lovell.info/)", + "d3adc0d3 (https://github.com/d3adc0d3)", + "James Crosby (https://github.com/autopulated)" + ], + "main": "./lib/xml2js", + "files": [ + "lib" + ], + "directories": { + "lib": "./lib" + }, + "scripts": { + "build": "cake build", + "test": "zap", + "coverage": "nyc npm test && nyc report", + "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls", + "doc": "cake doc" + }, + "repository": { + "type": "git", + "url": "https://github.com/Leonidas-from-XIV/node-xml2js.git" + }, + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "devDependencies": { + "coffee-script": ">=1.10.0", + "coveralls": "^3.0.1", + "diff": ">=1.0.8", + "docco": ">=0.6.2", + "nyc": ">=2.2.1", + "zap": ">=0.2.9" + }, + "engines": { + "node": ">=4.0.0" + }, + "license": "MIT" +} diff --git a/node_modules/xmlbuilder/.nycrc b/node_modules/xmlbuilder/.nycrc new file mode 100644 index 0000000..a21df9b --- /dev/null +++ b/node_modules/xmlbuilder/.nycrc @@ -0,0 +1,6 @@ +{ + "reporter": ["lcov", "text"], + "extension": [".coffee"], + "sourceMap": false, + "instrument": false +} \ No newline at end of file diff --git a/node_modules/xmlbuilder/.vscode/launch.json b/node_modules/xmlbuilder/.vscode/launch.json new file mode 100644 index 0000000..45a0637 --- /dev/null +++ b/node_modules/xmlbuilder/.vscode/launch.json @@ -0,0 +1,23 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Debug Coffee", + "skipFiles": [ + "/**" + ], + "program": "${workspaceFolder}/node_modules/mocha/bin/mocha", + "args": [ + "\"test/**/*.coffee\"" + ], + "outFiles": [ + "${workspaceFolder}/**/*.js" + ] + } + ] +} \ No newline at end of file diff --git a/node_modules/xmlbuilder/CHANGELOG.md b/node_modules/xmlbuilder/CHANGELOG.md new file mode 100644 index 0000000..77974ed --- /dev/null +++ b/node_modules/xmlbuilder/CHANGELOG.md @@ -0,0 +1,593 @@ +# Change Log + +All notable changes to this project are documented in this file. This project adheres to [Semantic Versioning](http://semver.org/#semantic-versioning-200). + +## [15.1.1] - 2020-04-09 + +- Fixed a bug where the `noDoubleEncoding` flag kept named entities other than [those specified in the spec](https://www.w3.org/TR/xml/#sec-predefined-ent) (see [#16](https://github.com/oozcitak/xmlbuilder2/issues/16) in `xmlbuilder2`). + +## [15.1.0] - 2020-03-20 + +- Added the `invalidCharReplacement` option to replace invalid characters with a user supplied replacement character. See [#147](https://github.com/oozcitak/xmlbuilder-js/issues/147). + +## [15.0.1] - 2020-03-10 + +- Pretty printing now keeps single CDATA nodes in-line with their parent elements also with the stream writer. + +## [15.0.0] - 2020-03-10 + +- Pretty printing now keeps single CDATA nodes in-line with their parent elements. See [#224](https://github.com/oozcitak/xmlbuilder-js/issues/224). + +## [14.0.0] - 2020-02-14 + +- Removed support for node.js 6.0\. Minimum required version is now 8.0. + +## [13.0.2] - 2019-05-22 + +- Fixed a bug where importing a document into an empty parent document did not set the root node. See [#213](https://github.com/oozcitak/xmlbuilder-js/issues/213). + +## [13.0.1] - 2019-05-10 + +- Corrected typings for doctype and character data nodes. See [#211](https://github.com/oozcitak/xmlbuilder-js/issues/211). + +## [13.0.0] - 2019-05-07 + +- Rewrote all TypeSript typings to be strictly compatible with the API. This is a breaking change for TypeScript users only. + +## [12.0.1] - 2019-04-30 + +- Added option for pretty printing attributes. + +## [12.0.0] - 2019-04-03 + +- Removed support for node.js 4.0 and 5.0\. Minimum required version is now 6.0. + +## [11.0.1] - 2019-03-22 + +- Added TypeScript typings. See [#200](https://github.com/oozcitak/xmlbuilder-js/issues/200). + +## [11.0.0] - 2019-02-18 + +- Calling `end()` with arguments no longer overwrites writer options. See [#120](https://github.com/oozcitak/xmlbuilder-js/issues/120). +- Added writer state and customizable space and endline functions to help customize writer behavior. Also added `openNode` and `closeNode` functions to writer. See [#193](https://github.com/oozcitak/xmlbuilder-js/issues/193). +- Fixed a bug where writer functions would not be called for nodes with a single child node in pretty print mode. See [#195](https://github.com/oozcitak/xmlbuilder-js/issues/195). +- Renamed `elEscape` to `textEscape` in `XMLStringifier`. +- Fixed a bug where empty arrays would produce child nodes. See [#190](https://github.com/oozcitak/xmlbuilder-js/issues/190). +- Removed the `skipNullAttributes` option. `null` attributes are now skipped by default. Added the `keepNullAttributes` option in case someone needs the old behavior. +- Removed the `skipNullNodes` option. `null` nodes are now skipped by default. Added the `keepNullNodes` option in case someone needs the old behavior. +- `undefined` values are now skipped when converting JS objects. +- Renamed stringify functions. See [#194](https://github.com/oozcitak/xmlbuilder-js/issues/194): + + - `eleName` -> `name` + - `attName` -> `name` + - `eleText` -> `text` + +- Fixed argument order for `attribute` function in the writer. See [#196](https://github.com/oozcitak/xmlbuilder-js/issues/196). +- Added `openAttribute` and `closeAttribute` functions to writer. See [#196](https://github.com/oozcitak/xmlbuilder-js/issues/196). +- Added node types to node objects. Node types and writer states are exported by the module with the `nodeType` and `writerState` properties. +- Fixed a bug where array items would not be correctly converted. See [#159](https://github.com/oozcitak/xmlbuilder-js/issues/159). +- Fixed a bug where mixed-content inside JS objects with `#text` decorator would not be correctly converted. See [#171](https://github.com/oozcitak/xmlbuilder-js/issues/171). +- Fixed a bug where JS objects would not be expanded in callback mode. See [#173](https://github.com/oozcitak/xmlbuilder-js/issues/173). +- Fixed a bug where character validation would not obey document's XML version. Added separate validation for XML 1.0 and XML 1.1 documents. See [#169](https://github.com/oozcitak/xmlbuilder-js/issues/169). +- Fixed a bug where names would not be validated according to the spec. See [#49](https://github.com/oozcitak/xmlbuilder-js/issues/49). +- Renamed `text` property to `value` in comment and cdata nodes to unify the API. +- Removed `doctype` function to prevent name clash with DOM implementation. Use the `dtd` function instead. +- Removed dummy nodes from the XML tree (Those were created while chain-building the tree). +- Renamed `attributes`property to `attribs` to prevent name clash with DOM property with the same name. +- Implemented the DOM standard (read-only) to support XPath lookups. XML namespaces are not currently supported. See [#122](https://github.com/oozcitak/xmlbuilder-js/issues/122). + +## [10.1.1] - 2018-10-24 + +- Fixed an edge case where a null node at root level would be printed although `skipNullNodes` was set. See [#187](https://github.com/oozcitak/xmlbuilder-js/issues/187). + +## [10.1.0] - 2018-10-10 + +- Added the `skipNullNodes` option to skip nodes with null values. See [#158](https://github.com/oozcitak/xmlbuilder-js/issues/158). + +## [10.0.0] - 2018-04-26 + +- Added current indentation level as a parameter to the onData function when in callback mode. See [#125](https://github.com/oozcitak/xmlbuilder-js/issues/125). +- Added name of the current node and parent node to error messages where possible. See [#152](https://github.com/oozcitak/xmlbuilder-js/issues/152). This has the potential to break code depending on the content of error messages. +- Fixed an issue where objects created with Object.create(null) created an error. See [#176](https://github.com/oozcitak/xmlbuilder-js/issues/176). +- Added test builds for node.js v8 and v10. + +## [9.0.7] - 2018-02-09 + +- Simplified regex used for validating encoding. + +## [9.0.4] - 2017-08-16 + +- `spacebeforeslash` writer option accepts `true` as well as space char(s). + +## [9.0.3] - 2017-08-15 + +- `spacebeforeslash` writer option can now be used with XML fragments. + +## [9.0.2] - 2017-08-15 + +- Added the `spacebeforeslash` writer option to add a space character before closing tags of empty elements. See [#157](https://github.com/oozcitak/xmlbuilder-js/issues/157). + +## [9.0.1] - 2017-06-19 + +- Fixed character validity checks to work with node.js 4.0 and 5.0\. See [#161](https://github.com/oozcitak/xmlbuilder-js/issues/161). + +## [9.0.0] - 2017-05-05 + +- Removed case conversion options. +- Removed support for node.js 4.0 and 5.0\. Minimum required version is now 6.0. +- Fixed valid char filter to use XML 1.1 instead of 1.0\. See [#147](https://github.com/oozcitak/xmlbuilder-js/issues/147). +- Added options for negative indentation and suppressing pretty printing of text nodes. See [#145](https://github.com/oozcitak/xmlbuilder-js/issues/145). + +## [8.2.2] - 2016-04-08 + +- Falsy values can now be used as a text node in callback mode. + +## [8.2.1] - 2016-04-07 + +- Falsy values can now be used as a text node. See [#117](https://github.com/oozcitak/xmlbuilder-js/issues/117). + +## [8.2.0] - 2016-04-01 + +- Removed lodash dependency to keep the library small and simple. See [#114](https://github.com/oozcitak/xmlbuilder-js/issues/114), [#53](https://github.com/oozcitak/xmlbuilder-js/issues/53), and [#43](https://github.com/oozcitak/xmlbuilder-js/issues/43). +- Added title case to name conversion options. + +## [8.1.0] - 2016-03-29 + +- Added the callback option to the `begin` export function. When used with a callback function, the XML document will be generated in chunks and each chunk will be passed to the supplied function. In this mode, `begin` uses a different code path and the builder should use much less memory since the entire XML tree is not kept. There are a few drawbacks though. For example, traversing the document tree or adding attributes to a node after it is written is not possible. It is also not possible to remove nodes or attributes. + +```javascript +var result = ''; + +builder.begin(function(chunk) { result += chunk; }) + .dec() + .ele('root') + .ele('xmlbuilder').up() + .end(); +``` + +- Replaced native `Object.assign` with `lodash.assign` to support old JS engines. See [#111](https://github.com/oozcitak/xmlbuilder-js/issues/111). + +## [8.0.0] - 2016-03-25 + +- Added the `begin` export function. See the wiki for details. +- Added the ability to add comments and processing instructions before and after the root element. Added `commentBefore`, `commentAfter`, `instructionBefore` and `instructionAfter` functions for this purpose. +- Dropped support for old node.js releases. Minimum required node.js version is now 4.0. + +## [7.0.0] - 2016-03-21 + +- Processing instructions are now created as regular nodes. This is a major breaking change if you are using processing instructions. Previously processing instructions were inserted before their parent node. After this change processing instructions are appended to the children of the parent node. Note that it is not currently possible to insert processing instructions before or after the root element. + + ```javascript + root.ele('node').ins('pi'); + // pre-v7 + + // v7 + + ``` + +## [6.0.0] - 2016-03-20 + +- Added custom XML writers. The default string conversion functions are now collected under the `XMLStringWriter` class which can be accessed by the `stringWriter(options)` function exported by the module. An `XMLStreamWriter` is also added which outputs the XML document to a writable stream. A stream writer can be created by calling the `streamWriter(stream, options)` function exported by the module. Both classes are heavily customizable and the details are added to the wiki. It is also possible to write an XML writer from scratch and use it when calling `end()` on the XML document. + +## [5.0.1] - 2016-03-08 + +- Moved require statements for text case conversion to the top of files to reduce lazy requires. + +## [5.0.0] - 2016-03-05 + +- Added text case option for element names and attribute names. Valid cases are `lower`, `upper`, `camel`, `kebab` and `snake`. +- Attribute and element values are escaped according to the [Canonical XML 1.0 specification](http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping). See [#54](https://github.com/oozcitak/xmlbuilder-js/issues/54) and [#86](https://github.com/oozcitak/xmlbuilder-js/issues/86). +- Added the `allowEmpty` option to `end()`. When this option is set, empty elements are not self-closed. +- Added support for [nested CDATA](https://en.wikipedia.org/wiki/CDATA#Nesting). The triad `]]>` in CDATA is now automatically replaced with `]]]]>`. + +## [4.2.1] - 2016-01-15 + +- Updated lodash dependency to 4.0.0. + +## [4.2.0] - 2015-12-16 + +- Added the `noDoubleEncoding` option to `create()` to control whether existing html entities are encoded. + +## [4.1.0] - 2015-11-11 + +- Added the `separateArrayItems` option to `create()` to control how arrays are handled when converting from objects. e.g. + +```javascript +root.ele({ number: [ "one", "two" ]}); +// with separateArrayItems: true + + + + +// with separateArrayItems: false +one +two +``` + +## [4.0.0] - 2015-11-01 + +- Removed the `#list` decorator. Array items are now created as child nodes by default. +- Fixed a bug where the XML encoding string was checked partially. + +## [3.1.0] - 2015-09-19 + +- `#list` decorator ignores empty arrays. + +## [3.0.0] - 2015-09-10 + +- Allow `\r`, `\n` and `\t` in attribute values without escaping. See [#86](https://github.com/oozcitak/xmlbuilder-js/issues/86). + +## [2.6.5] - 2015-09-09 + +- Use native `isArray` instead of lodash. +- Indentation of processing instructions are set to the parent element's. + +## [2.6.4] - 2015-05-27 + +- Updated lodash dependency to 3.5.0. + +## [2.6.3] - 2015-05-27 + +- Bumped version because previous release was not published on npm. + +## [2.6.2] - 2015-03-10 + +- Updated lodash dependency to 3.5.0. + +## [2.6.1] - 2015-02-20 + +- Updated lodash dependency to 3.3.0. + +## [2.6.0] - 2015-02-20 + +- Fixed a bug where the `XMLNode` constructor overwrote the super class parent. +- Removed document property from cloned nodes. +- Switched to mocha.js for testing. + +## [2.5.2] - 2015-02-16 + +- Updated lodash dependency to 3.2.0. + +## [2.5.1] - 2015-02-09 + +- Updated lodash dependency to 3.1.0. +- Support all node >= 0.8. + +## [2.5.0] - 2015-00-03 + +- Updated lodash dependency to 3.0.0. + +## [2.4.6] - 2015-01-26 + +- Show more information from attribute creation with null values. +- Added iojs as an engine. +- Self close elements with empty text. + +## [2.4.5] - 2014-11-15 + +- Fixed prepublish script to run on windows. +- Fixed bug in XMLStringifier where an undefined value was used while reporting an invalid encoding value. +- Moved require statements to the top of files to reduce lazy requires. See [#62](https://github.com/oozcitak/xmlbuilder-js/issues/62). + +## [2.4.4] - 2014-09-08 + +- Added the `offset` option to `toString()` for use in XML fragments. + +## [2.4.3] - 2014-08-13 + +- Corrected license in package description. + +## [2.4.2] - 2014-08-13 + +- Dropped performance test and memwatch dependency. + +## [2.4.1] - 2014-08-12 + +- Fixed a bug where empty indent string was omitted when pretty printing. See [#59](https://github.com/oozcitak/xmlbuilder-js/issues/59). + +## [2.4.0] - 2014-08-04 + +- Correct cases of pubID and sysID. +- Use single lodash instead of separate npm modules. See [#53](https://github.com/oozcitak/xmlbuilder-js/issues/53). +- Escape according to Canonical XML 1.0\. See [#54](https://github.com/oozcitak/xmlbuilder-js/issues/54). + +## [2.3.0] - 2014-07-17 + +- Convert objects to JS primitives while sanitizing user input. +- Object builder preserves items with null values. See [#44](https://github.com/oozcitak/xmlbuilder-js/issues/44). +- Use modularized lodash functions to cut down dependencies. +- Process empty objects when converting from objects so that we don't throw on empty child objects. + +## [2.2.1] - 2014-04-04 + +- Bumped version because previous release was not published on npm. + +## [2.2.0] - 2014-04-04 + +- Switch to lodash from underscore. +- Removed legacy `ext` option from `create()`. +- Drop old node versions: 0.4, 0.5, 0.6\. 0.8 is the minimum requirement from now on. + +## [2.1.0] - 2013-12-30 + +- Removed duplicate null checks from constructors. +- Fixed node count in performance test. +- Added option for skipping null attribute values. See [#26](https://github.com/oozcitak/xmlbuilder-js/issues/26). +- Allow multiple values in `att()` and `ins()`. +- Added ability to run individual performance tests. +- Added flag for ignoring decorator strings. + +## [2.0.1] - 2013-12-24 + +- Removed performance tests from npm package. + +## [2.0.0] - 2013-12-24 + +- Combined loops for speed up. +- Added support for the DTD and XML declaration. +- `clone` includes attributes. +- Added performance tests. +- Evaluate attribute value if function. +- Evaluate instruction value if function. + +## [1.1.2] - 2013-12-11 + +- Changed processing instruction decorator to `?`. + +## [1.1.1] - 2013-12-11 + +- Added processing instructions to JS object conversion. + +## [1.1.0] - 2013-12-10 + +- Added license to package. +- `create()` and `element()` accept JS object to fully build the document. +- Added `nod()` and `n()` aliases for `node()`. +- Renamed `convertAttChar` decorator to `convertAttKey`. +- Ignore empty decorator strings when converting JS objects. + +## [1.0.2] - 2013-11-27 + +- Removed temp file which was accidentally included in the package. + +## [1.0.1] - 2013-11-27 + +- Custom stringify functions affect current instance only. + +## [1.0.0] - 2013-11-27 + +- Added processing instructions. +- Added stringify functions to sanitize and convert input values. +- Added option for headless XML documents. +- Added vows tests. +- Removed Makefile. Using npm publish scripts instead. +- Removed the `begin()` function. `create()` begins the document by creating the root node. + +## [0.4.3] - 2013-11-08 + +- Added option to include surrogate pairs in XML content. See [#29](https://github.com/oozcitak/xmlbuilder-js/issues/29). +- Fixed empty value string representation in pretty mode. +- Added pre and postpublish scripts to package.json. +- Filtered out prototype properties when appending attributes. See [#31](https://github.com/oozcitak/xmlbuilder-js/issues/31). + +## [0.4.2] - 2012-09-14 + +- Removed README.md from `.npmignore`. + +## [0.4.1] - 2012-08-31 + +- Removed `begin()` calls in favor of `XMLBuilder` constructor. +- Added the `end()` function. `end()` is a convenience over `doc().toString()`. + +## [0.4.0] - 2012-08-31 + +- Added arguments to `XMLBuilder` constructor to allow the name of the root element and XML prolog to be defined in one line. +- Soft deprecated `begin()`. + +## [0.3.11] - 2012-08-13 + +- Package keywords are fixed to be an array of values. + +## [0.3.10] - 2012-08-13 + +- Brought back npm package contents which were lost due to incorrect configuration of `package.json` in previous releases. + +## [0.3.3] - 2012-07-27 + +- Implemented `importXMLBuilder()`. + +## [0.3.2] - 2012-07-20 + +- Fixed a duplicated escaping problem on `element()`. +- Fixed a problem with text node creation from empty string. +- Calling `root()` on the document element returns the root element. +- `XMLBuilder` no longer extends `XMLFragment`. + +## [0.3.1] - 2011-11-28 + +- Added guards for document element so that nodes cannot be inserted at document level. + +## [0.3.0] - 2011-11-28 + +- Added `doc()` to return the document element. + +## [0.2.2] - 2011-11-28 + +- Prevent code relying on `up()`'s older behavior to break. + +## [0.2.1] - 2011-11-28 + +- Added the `root()` function. + +## [0.2.0] - 2011-11-21 + +- Added Travis-CI integration. +- Added coffee-script dependency. +- Added insert, traversal and delete functions. + +## [0.1.7] - 2011-10-25 + +- No changes. Accidental release. + +## [0.1.6] - 2011-10-25 + +- Corrected `package.json` bugs link to `url` from `web`. + +## [0.1.5] - 2011-08-08 + +- Added missing npm package contents. + +## [0.1.4] - 2011-07-29 + +- Text-only nodes are no longer indented. +- Added documentation for multiple instances. + +## [0.1.3] - 2011-07-27 + +- Exported the `create()` function to return a new instance. This allows multiple builder instances to be constructed. +- Fixed `u()` function so that it now correctly calls `up()`. +- Fixed typo in `element()` so that `attributes` and `text` can be passed interchangeably. + +## [0.1.2] - 2011-06-03 + +- `ele()` accepts element text. +- `attributes()` now overrides existing attributes if passed the same attribute name. + +## [0.1.1] - 2011-05-19 + +- Added the raw output option. +- Removed most validity checks. + +## [0.1.0] - 2011-04-27 + +- `text()` and `cdata()` now return parent element. +- Attribute values are escaped. + +## [0.0.7] - 2011-04-23 + +- Coerced text values to string. + +## [0.0.6] - 2011-02-23 + +- Added support for XML comments. +- Text nodes are checked against CharData. + +## [0.0.5] - 2010-12-31 + +- Corrected the name of the main npm module in `package.json`. + +## [0.0.4] - 2010-12-28 + +- Added `.npmignore`. + +## [0.0.3] - 2010-12-27 + +- root element is now constructed in `begin()`. +- moved prolog to `begin()`. +- Added the ability to have CDATA in element text. +- Removed unused prolog aliases. +- Removed `builder()` function from main module. +- Added the name of the main npm module in `package.json`. + +## [0.0.2] - 2010-11-03 + +- `element()` expands nested arrays. +- Added pretty printing. +- Added the `up()`, `build()` and `prolog()` functions. +- Added readme. + +## 0.0.1 - 2010-11-02 + +- Initial release + +[0.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.1...v0.0.2 +[0.0.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.2...v0.0.3 +[0.0.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.3...v0.0.4 +[0.0.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.4...v0.0.5 +[0.0.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.5...v0.0.6 +[0.0.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.6...v0.0.7 +[0.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.7...v0.1.0 +[0.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.0...v0.1.1 +[0.1.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.1...v0.1.2 +[0.1.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.2...v0.1.3 +[0.1.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.3...v0.1.4 +[0.1.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.4...v0.1.5 +[0.1.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.5...v0.1.6 +[0.1.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.6...v0.1.7 +[0.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.7...v0.2.0 +[0.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.0...v0.2.1 +[0.2.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.1...v0.2.2 +[0.3.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.2...v0.3.0 +[0.3.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.0...v0.3.1 +[0.3.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.1...v0.3.2 +[0.3.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.2...v0.3.3 +[0.3.10]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.3...v0.3.10 +[0.3.11]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.10...v0.3.11 +[0.4.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.11...v0.4.0 +[0.4.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.0...v0.4.1 +[0.4.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.1...v0.4.2 +[0.4.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.2...v0.4.3 +[1.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.3...v1.0.0 +[1.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.0...v1.0.1 +[1.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.1...v1.0.2 +[1.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.2...v1.1.0 +[1.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.0...v1.1.1 +[1.1.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.1...v1.1.2 +[2.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.2...v2.0.0 +[2.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.0.0...v2.0.1 +[2.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.0.1...v2.1.0 +[2.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.1.0...v2.2.0 +[2.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.2.0...v2.2.1 +[2.3.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.2.1...v2.3.0 +[2.4.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.3.0...v2.4.0 +[2.4.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.0...v2.4.1 +[2.4.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.1...v2.4.2 +[2.4.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.2...v2.4.3 +[2.4.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.3...v2.4.4 +[2.4.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.4...v2.4.5 +[2.4.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.5...v2.4.6 +[2.5.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.6...v2.5.0 +[2.5.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.0...v2.5.1 +[2.5.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.1...v2.5.2 +[2.6.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.2...v2.6.0 +[2.6.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.0...v2.6.1 +[2.6.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.1...v2.6.2 +[2.6.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.2...v2.6.3 +[2.6.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.3...v2.6.4 +[2.6.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.4...v2.6.5 +[3.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.5...v3.0.0 +[3.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v3.0.0...v3.1.0 +[4.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v3.1.0...v4.0.0 +[4.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.0.0...v4.1.0 +[4.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.1.0...v4.2.0 +[4.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.2.0...v4.2.1 +[5.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.2.1...v5.0.0 +[5.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v5.0.0...v5.0.1 +[6.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v5.0.1...v6.0.0 +[7.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v6.0.0...v7.0.0 +[8.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v7.0.0...v8.0.0 +[8.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.0.0...v8.1.0 +[8.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.1.0...v8.2.0 +[8.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.0...v8.2.1 +[8.2.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.1...v8.2.2 +[9.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.2...v9.0.0 +[9.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.0...v9.0.1 +[9.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.1...v9.0.2 +[9.0.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.2...v9.0.3 +[9.0.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.3...v9.0.4 +[9.0.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.4...v9.0.7 +[10.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.7...v10.0.0 +[10.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.0.0...v10.1.0 +[10.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.1.0...v10.1.1 +[11.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.1.1...v11.0.0 +[11.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v11.0.0...v11.0.1 +[12.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v11.0.1...v12.0.0 +[12.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v12.0.0...v12.0.1 +[13.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v12.0.1...v13.0.0 +[13.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v13.0.0...v13.0.1 +[13.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v13.0.1...v13.0.2 +[14.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v13.0.2...v14.0.0 +[15.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v14.0.0...v15.0.0 +[15.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v15.0.0...v15.0.1 +[15.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v15.0.1...v15.1.0 +[15.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v15.1.0...v15.1.1 diff --git a/node_modules/xmlbuilder/LICENSE b/node_modules/xmlbuilder/LICENSE new file mode 100644 index 0000000..9fb9700 --- /dev/null +++ b/node_modules/xmlbuilder/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Ozgur Ozcitak + +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/xmlbuilder/README.md b/node_modules/xmlbuilder/README.md new file mode 100644 index 0000000..d15b627 --- /dev/null +++ b/node_modules/xmlbuilder/README.md @@ -0,0 +1,103 @@ +# xmlbuilder-js + +An XML builder for [node.js](https://nodejs.org/) similar to +[java-xmlbuilder](https://github.com/jmurty/java-xmlbuilder). + +[![License](http://img.shields.io/npm/l/xmlbuilder.svg?style=flat-square)](http://opensource.org/licenses/MIT) +[![NPM Version](http://img.shields.io/npm/v/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder) +[![NPM Downloads](https://img.shields.io/npm/dm/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder) + +[![Travis Build Status](http://img.shields.io/travis/oozcitak/xmlbuilder-js.svg?style=flat-square)](http://travis-ci.org/oozcitak/xmlbuilder-js) +[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/bf7odb20hj77isry?svg=true)](https://ci.appveyor.com/project/oozcitak/xmlbuilder-js) +[![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js) +[![Code Coverage](https://img.shields.io/coveralls/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://coveralls.io/github/oozcitak/xmlbuilder-js) + +### Announcing `xmlbuilder2`: + +The new release of `xmlbuilder` is available at [`xmlbuilder2`](https://github.com/oozcitak/xmlbuilder2)! `xmlbuilder2` has been redesigned from the ground up to be fully conforming to the [modern DOM specification](https://dom.spec.whatwg.org). It supports XML namespaces, provides built-in converters for multiple formats, collection functions, and more. Please see [upgrading from xmlbuilder](https://oozcitak.github.io/xmlbuilder2/upgrading-from-xmlbuilder.html) in the wiki. + +New development will be focused towards `xmlbuilder2`; `xmlbuilder` will only receive critical bug fixes. + +### Installation: + +``` sh +npm install xmlbuilder +``` + +### Usage: + +``` js +var builder = require('xmlbuilder'); + +var xml = builder.create('root') + .ele('xmlbuilder') + .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git') + .end({ pretty: true}); + +console.log(xml); +``` + +will result in: + +``` xml + + + + git://github.com/oozcitak/xmlbuilder-js.git + + +``` + +It is also possible to convert objects into nodes: + +``` js +var builder = require('xmlbuilder'); + +var obj = { + root: { + xmlbuilder: { + repo: { + '@type': 'git', // attributes start with @ + '#text': 'git://github.com/oozcitak/xmlbuilder-js.git' // text node + } + } + } +}; + +var xml = builder.create(obj).end({ pretty: true}); +console.log(xml); +``` + +If you need to do some processing: + +``` js +var builder = require('xmlbuilder'); + +var root = builder.create('squares'); +root.com('f(x) = x^2'); +for(var i = 1; i <= 5; i++) +{ + var item = root.ele('data'); + item.att('x', i); + item.att('y', i * i); +} + +var xml = root.end({ pretty: true}); +console.log(xml); +``` + +This will result in: + +``` xml + + + + + + + + + +``` + +See the [wiki](https://github.com/oozcitak/xmlbuilder-js/wiki) for details and [examples](https://github.com/oozcitak/xmlbuilder-js/wiki/Examples) for more complex examples. diff --git a/node_modules/xmlbuilder/lib/Derivation.js b/node_modules/xmlbuilder/lib/Derivation.js new file mode 100644 index 0000000..ae3d951 --- /dev/null +++ b/node_modules/xmlbuilder/lib/Derivation.js @@ -0,0 +1,10 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + module.exports = { + Restriction: 1, + Extension: 2, + Union: 4, + List: 8 + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/DocumentPosition.js b/node_modules/xmlbuilder/lib/DocumentPosition.js new file mode 100644 index 0000000..55abc5c --- /dev/null +++ b/node_modules/xmlbuilder/lib/DocumentPosition.js @@ -0,0 +1,12 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + module.exports = { + Disconnected: 1, + Preceding: 2, + Following: 4, + Contains: 8, + ContainedBy: 16, + ImplementationSpecific: 32 + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/NodeType.js b/node_modules/xmlbuilder/lib/NodeType.js new file mode 100644 index 0000000..40990ca --- /dev/null +++ b/node_modules/xmlbuilder/lib/NodeType.js @@ -0,0 +1,25 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + module.exports = { + Element: 1, + Attribute: 2, + Text: 3, + CData: 4, + EntityReference: 5, + EntityDeclaration: 6, + ProcessingInstruction: 7, + Comment: 8, + Document: 9, + DocType: 10, + DocumentFragment: 11, + NotationDeclaration: 12, + // Numeric codes up to 200 are reserved to W3C for possible future use. + // Following are types internal to this library: + Declaration: 201, + Raw: 202, + AttributeDeclaration: 203, + ElementDeclaration: 204, + Dummy: 205 + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/OperationType.js b/node_modules/xmlbuilder/lib/OperationType.js new file mode 100644 index 0000000..47b1046 --- /dev/null +++ b/node_modules/xmlbuilder/lib/OperationType.js @@ -0,0 +1,11 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + module.exports = { + Clones: 1, + Imported: 2, + Deleted: 3, + Renamed: 4, + Adopted: 5 + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/Utility.js b/node_modules/xmlbuilder/lib/Utility.js new file mode 100644 index 0000000..c338865 --- /dev/null +++ b/node_modules/xmlbuilder/lib/Utility.js @@ -0,0 +1,88 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + // Copies all enumerable own properties from `sources` to `target` + var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject, + hasProp = {}.hasOwnProperty; + + assign = function(target, ...sources) { + var i, key, len, source; + if (isFunction(Object.assign)) { + Object.assign.apply(null, arguments); + } else { + for (i = 0, len = sources.length; i < len; i++) { + source = sources[i]; + if (source != null) { + for (key in source) { + if (!hasProp.call(source, key)) continue; + target[key] = source[key]; + } + } + } + } + return target; + }; + + // Determines if `val` is a Function object + isFunction = function(val) { + return !!val && Object.prototype.toString.call(val) === '[object Function]'; + }; + + // Determines if `val` is an Object + isObject = function(val) { + var ref; + return !!val && ((ref = typeof val) === 'function' || ref === 'object'); + }; + + // Determines if `val` is an Array + isArray = function(val) { + if (isFunction(Array.isArray)) { + return Array.isArray(val); + } else { + return Object.prototype.toString.call(val) === '[object Array]'; + } + }; + + // Determines if `val` is an empty Array or an Object with no own properties + isEmpty = function(val) { + var key; + if (isArray(val)) { + return !val.length; + } else { + for (key in val) { + if (!hasProp.call(val, key)) continue; + return false; + } + return true; + } + }; + + // Determines if `val` is a plain Object + isPlainObject = function(val) { + var ctor, proto; + return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object)); + }; + + // Gets the primitive value of an object + getValue = function(obj) { + if (isFunction(obj.valueOf)) { + return obj.valueOf(); + } else { + return obj; + } + }; + + module.exports.assign = assign; + + module.exports.isFunction = isFunction; + + module.exports.isObject = isObject; + + module.exports.isArray = isArray; + + module.exports.isEmpty = isEmpty; + + module.exports.isPlainObject = isPlainObject; + + module.exports.getValue = getValue; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/WriterState.js b/node_modules/xmlbuilder/lib/WriterState.js new file mode 100644 index 0000000..b1cd7a4 --- /dev/null +++ b/node_modules/xmlbuilder/lib/WriterState.js @@ -0,0 +1,10 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + module.exports = { + None: 0, + OpenTag: 1, + InsideTag: 2, + CloseTag: 3 + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLAttribute.js b/node_modules/xmlbuilder/lib/XMLAttribute.js new file mode 100644 index 0000000..71922b7 --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLAttribute.js @@ -0,0 +1,130 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLAttribute, XMLNode; + + NodeType = require('./NodeType'); + + XMLNode = require('./XMLNode'); + + // Represents an attribute + module.exports = XMLAttribute = (function() { + class XMLAttribute { + // Initializes a new instance of `XMLAttribute` + + // `parent` the parent node + // `name` attribute target + // `value` attribute value + constructor(parent, name, value) { + this.parent = parent; + if (this.parent) { + this.options = this.parent.options; + this.stringify = this.parent.stringify; + } + if (name == null) { + throw new Error("Missing attribute name. " + this.debugInfo(name)); + } + this.name = this.stringify.name(name); + this.value = this.stringify.attValue(value); + this.type = NodeType.Attribute; + // DOM level 3 + this.isId = false; + this.schemaTypeInfo = null; + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.attribute(this, this.options.writer.filterOptions(options)); + } + + + // Returns debug string for this node + debugInfo(name) { + name = name || this.name; + if (name == null) { + return "parent: <" + this.parent.name + ">"; + } else { + return "attribute: {" + name + "}, parent: <" + this.parent.name + ">"; + } + } + + isEqualNode(node) { + if (node.namespaceURI !== this.namespaceURI) { + return false; + } + if (node.prefix !== this.prefix) { + return false; + } + if (node.localName !== this.localName) { + return false; + } + if (node.value !== this.value) { + return false; + } + return true; + } + + }; + + // DOM level 1 + Object.defineProperty(XMLAttribute.prototype, 'nodeType', { + get: function() { + return this.type; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'ownerElement', { + get: function() { + return this.parent; + } + }); + + // DOM level 3 + Object.defineProperty(XMLAttribute.prototype, 'textContent', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + // DOM level 4 + Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'prefix', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'localName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'specified', { + get: function() { + return true; + } + }); + + return XMLAttribute; + + }).call(this); + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLCData.js b/node_modules/xmlbuilder/lib/XMLCData.js new file mode 100644 index 0000000..91a4410 --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLCData.js @@ -0,0 +1,41 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLCData, XMLCharacterData; + + NodeType = require('./NodeType'); + + XMLCharacterData = require('./XMLCharacterData'); + + // Represents a CDATA node + module.exports = XMLCData = class XMLCData extends XMLCharacterData { + // Initializes a new instance of `XMLCData` + + // `text` CDATA text + constructor(parent, text) { + super(parent); + if (text == null) { + throw new Error("Missing CDATA text. " + this.debugInfo()); + } + this.name = "#cdata-section"; + this.type = NodeType.CData; + this.value = this.stringify.cdata(text); + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.cdata(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLCharacterData.js b/node_modules/xmlbuilder/lib/XMLCharacterData.js new file mode 100644 index 0000000..13b9c00 --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLCharacterData.js @@ -0,0 +1,86 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var XMLCharacterData, XMLNode; + + XMLNode = require('./XMLNode'); + + // Represents a character data node + module.exports = XMLCharacterData = (function() { + class XMLCharacterData extends XMLNode { + // Initializes a new instance of `XMLCharacterData` + + constructor(parent) { + super(parent); + this.value = ''; + } + + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // DOM level 1 functions to be implemented later + substringData(offset, count) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + appendData(arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + insertData(offset, arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + deleteData(offset, count) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + replaceData(offset, count, arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + isEqualNode(node) { + if (!super.isEqualNode(node)) { + return false; + } + if (node.data !== this.data) { + return false; + } + return true; + } + + }; + + // DOM level 1 + Object.defineProperty(XMLCharacterData.prototype, 'data', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + Object.defineProperty(XMLCharacterData.prototype, 'length', { + get: function() { + return this.value.length; + } + }); + + // DOM level 3 + Object.defineProperty(XMLCharacterData.prototype, 'textContent', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + return XMLCharacterData; + + }).call(this); + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLComment.js b/node_modules/xmlbuilder/lib/XMLComment.js new file mode 100644 index 0000000..2254d63 --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLComment.js @@ -0,0 +1,41 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLCharacterData, XMLComment; + + NodeType = require('./NodeType'); + + XMLCharacterData = require('./XMLCharacterData'); + + // Represents a comment node + module.exports = XMLComment = class XMLComment extends XMLCharacterData { + // Initializes a new instance of `XMLComment` + + // `text` comment text + constructor(parent, text) { + super(parent); + if (text == null) { + throw new Error("Missing comment text. " + this.debugInfo()); + } + this.name = "#comment"; + this.type = NodeType.Comment; + this.value = this.stringify.comment(text); + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.comment(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js b/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js new file mode 100644 index 0000000..32e896d --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js @@ -0,0 +1,80 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList; + + XMLDOMErrorHandler = require('./XMLDOMErrorHandler'); + + XMLDOMStringList = require('./XMLDOMStringList'); + + // Implements the DOMConfiguration interface + module.exports = XMLDOMConfiguration = (function() { + class XMLDOMConfiguration { + constructor() { + var clonedSelf; + this.defaultParams = { + "canonical-form": false, + "cdata-sections": false, + "comments": false, + "datatype-normalization": false, + "element-content-whitespace": true, + "entities": true, + "error-handler": new XMLDOMErrorHandler(), + "infoset": true, + "validate-if-schema": false, + "namespaces": true, + "namespace-declarations": true, + "normalize-characters": false, + "schema-location": '', + "schema-type": '', + "split-cdata-sections": true, + "validate": false, + "well-formed": true + }; + this.params = clonedSelf = Object.create(this.defaultParams); + } + + // Gets the value of a parameter. + + // `name` name of the parameter + getParameter(name) { + if (this.params.hasOwnProperty(name)) { + return this.params[name]; + } else { + return null; + } + } + + // Checks if setting a parameter to a specific value is supported. + + // `name` name of the parameter + // `value` parameter value + canSetParameter(name, value) { + return true; + } + + // Sets the value of a parameter. + + // `name` name of the parameter + // `value` new value or null if the user wishes to unset the parameter + setParameter(name, value) { + if (value != null) { + return this.params[name] = value; + } else { + return delete this.params[name]; + } + } + + }; + + // Returns the list of parameter names + Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', { + get: function() { + return new XMLDOMStringList(Object.keys(this.defaultParams)); + } + }); + + return XMLDOMConfiguration; + + }).call(this); + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js b/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js new file mode 100644 index 0000000..b546a0c --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js @@ -0,0 +1,20 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + // Represents the error handler for DOM operations + var XMLDOMErrorHandler; + + module.exports = XMLDOMErrorHandler = class XMLDOMErrorHandler { + // Initializes a new instance of `XMLDOMErrorHandler` + + constructor() {} + + // Called on the error handler when an error occurs. + + // `error` the error message as a string + handleError(error) { + throw new Error(error); + } + + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLDOMImplementation.js b/node_modules/xmlbuilder/lib/XMLDOMImplementation.js new file mode 100644 index 0000000..4b5be79 --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLDOMImplementation.js @@ -0,0 +1,55 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + // Implements the DOMImplementation interface + var XMLDOMImplementation; + + module.exports = XMLDOMImplementation = class XMLDOMImplementation { + // Tests if the DOM implementation implements a specific feature. + + // `feature` package name of the feature to test. In Level 1, the + // legal values are "HTML" and "XML" (case-insensitive). + // `version` version number of the package name to test. + // In Level 1, this is the string "1.0". If the version is + // not specified, supporting any version of the feature will + // cause the method to return true. + hasFeature(feature, version) { + return true; + } + + // Creates a new document type declaration. + + // `qualifiedName` qualified name of the document type to be created + // `publicId` public identifier of the external subset + // `systemId` system identifier of the external subset + createDocumentType(qualifiedName, publicId, systemId) { + throw new Error("This DOM method is not implemented."); + } + + // Creates a new document. + + // `namespaceURI` namespace URI of the document element to create + // `qualifiedName` the qualified name of the document to be created + // `doctype` the type of document to be created or null + createDocument(namespaceURI, qualifiedName, doctype) { + throw new Error("This DOM method is not implemented."); + } + + // Creates a new HTML document. + + // `title` document title + createHTMLDocument(title) { + throw new Error("This DOM method is not implemented."); + } + + // Returns a specialized object which implements the specialized APIs + // of the specified feature and version. + + // `feature` name of the feature requested. + // `version` version number of the feature to test + getFeature(feature, version) { + throw new Error("This DOM method is not implemented."); + } + + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLDOMStringList.js b/node_modules/xmlbuilder/lib/XMLDOMStringList.js new file mode 100644 index 0000000..7e87e8e --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLDOMStringList.js @@ -0,0 +1,44 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + // Represents a list of string entries + var XMLDOMStringList; + + module.exports = XMLDOMStringList = (function() { + class XMLDOMStringList { + // Initializes a new instance of `XMLDOMStringList` + // This is just a wrapper around an ordinary + // JS array. + + // `arr` the array of string values + constructor(arr) { + this.arr = arr || []; + } + + // Returns the indexth item in the collection. + + // `index` index into the collection + item(index) { + return this.arr[index] || null; + } + + // Test if a string is part of this DOMStringList. + + // `str` the string to look for + contains(str) { + return this.arr.indexOf(str) !== -1; + } + + }; + + // Returns the number of strings in the list. + Object.defineProperty(XMLDOMStringList.prototype, 'length', { + get: function() { + return this.arr.length; + } + }); + + return XMLDOMStringList; + + }).call(this); + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLDTDAttList.js b/node_modules/xmlbuilder/lib/XMLDTDAttList.js new file mode 100644 index 0000000..8637ea2 --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLDTDAttList.js @@ -0,0 +1,66 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDTDAttList, XMLNode; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents an attribute list + module.exports = XMLDTDAttList = class XMLDTDAttList extends XMLNode { + // Initializes a new instance of `XMLDTDAttList` + + // `parent` the parent `XMLDocType` element + // `elementName` the name of the element containing this attribute + // `attributeName` attribute name + // `attributeType` type of the attribute + // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, + // #FIXED or #DEFAULT) + // `defaultValue` default value of the attribute + // (only used for #FIXED or #DEFAULT) + constructor(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { + super(parent); + if (elementName == null) { + throw new Error("Missing DTD element name. " + this.debugInfo()); + } + if (attributeName == null) { + throw new Error("Missing DTD attribute name. " + this.debugInfo(elementName)); + } + if (!attributeType) { + throw new Error("Missing DTD attribute type. " + this.debugInfo(elementName)); + } + if (!defaultValueType) { + throw new Error("Missing DTD attribute default. " + this.debugInfo(elementName)); + } + if (defaultValueType.indexOf('#') !== 0) { + defaultValueType = '#' + defaultValueType; + } + if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { + throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(elementName)); + } + if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { + throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(elementName)); + } + this.elementName = this.stringify.name(elementName); + this.type = NodeType.AttributeDeclaration; + this.attributeName = this.stringify.name(attributeName); + this.attributeType = this.stringify.dtdAttType(attributeType); + if (defaultValue) { + this.defaultValue = this.stringify.dtdAttDefault(defaultValue); + } + this.defaultValueType = defaultValueType; + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLDTDElement.js b/node_modules/xmlbuilder/lib/XMLDTDElement.js new file mode 100644 index 0000000..a154679 --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLDTDElement.js @@ -0,0 +1,44 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDTDElement, XMLNode; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents an attribute + module.exports = XMLDTDElement = class XMLDTDElement extends XMLNode { + // Initializes a new instance of `XMLDTDElement` + + // `parent` the parent `XMLDocType` element + // `name` element name + // `value` element content (defaults to #PCDATA) + constructor(parent, name, value) { + super(parent); + if (name == null) { + throw new Error("Missing DTD element name. " + this.debugInfo()); + } + if (!value) { + value = '(#PCDATA)'; + } + if (Array.isArray(value)) { + value = '(' + value.join(',') + ')'; + } + this.name = this.stringify.name(name); + this.type = NodeType.ElementDeclaration; + this.value = this.stringify.dtdElementValue(value); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLDTDEntity.js b/node_modules/xmlbuilder/lib/XMLDTDEntity.js new file mode 100644 index 0000000..76bf665 --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLDTDEntity.js @@ -0,0 +1,115 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDTDEntity, XMLNode, isObject; + + ({isObject} = require('./Utility')); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents an entity declaration in the DTD + module.exports = XMLDTDEntity = (function() { + class XMLDTDEntity extends XMLNode { + // Initializes a new instance of `XMLDTDEntity` + + // `parent` the parent `XMLDocType` element + // `pe` whether this is a parameter entity or a general entity + // defaults to `false` (general entity) + // `name` the name of the entity + // `value` internal entity value or an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + // `value.nData` notation declaration + constructor(parent, pe, name, value) { + super(parent); + if (name == null) { + throw new Error("Missing DTD entity name. " + this.debugInfo(name)); + } + if (value == null) { + throw new Error("Missing DTD entity value. " + this.debugInfo(name)); + } + this.pe = !!pe; + this.name = this.stringify.name(name); + this.type = NodeType.EntityDeclaration; + if (!isObject(value)) { + this.value = this.stringify.dtdEntityValue(value); + this.internal = true; + } else { + if (!value.pubID && !value.sysID) { + throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name)); + } + if (value.pubID && !value.sysID) { + throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name)); + } + this.internal = false; + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + if (value.nData != null) { + this.nData = this.stringify.dtdNData(value.nData); + } + if (this.pe && this.nData) { + throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name)); + } + } + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options)); + } + + }; + + // DOM level 1 + Object.defineProperty(XMLDTDEntity.prototype, 'publicId', { + get: function() { + return this.pubID; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'systemId', { + get: function() { + return this.sysID; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'notationName', { + get: function() { + return this.nData || null; + } + }); + + // DOM level 3 + Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', { + get: function() { + return null; + } + }); + + return XMLDTDEntity; + + }).call(this); + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLDTDNotation.js b/node_modules/xmlbuilder/lib/XMLDTDNotation.js new file mode 100644 index 0000000..37a469a --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLDTDNotation.js @@ -0,0 +1,66 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDTDNotation, XMLNode; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents a NOTATION entry in the DTD + module.exports = XMLDTDNotation = (function() { + class XMLDTDNotation extends XMLNode { + // Initializes a new instance of `XMLDTDNotation` + + // `parent` the parent `XMLDocType` element + // `name` the name of the notation + // `value` an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + constructor(parent, name, value) { + super(parent); + if (name == null) { + throw new Error("Missing DTD notation name. " + this.debugInfo(name)); + } + if (!value.pubID && !value.sysID) { + throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name)); + } + this.name = this.stringify.name(name); + this.type = NodeType.NotationDeclaration; + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options)); + } + + }; + + // DOM level 1 + Object.defineProperty(XMLDTDNotation.prototype, 'publicId', { + get: function() { + return this.pubID; + } + }); + + Object.defineProperty(XMLDTDNotation.prototype, 'systemId', { + get: function() { + return this.sysID; + } + }); + + return XMLDTDNotation; + + }).call(this); + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLDeclaration.js b/node_modules/xmlbuilder/lib/XMLDeclaration.js new file mode 100644 index 0000000..90b8edc --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLDeclaration.js @@ -0,0 +1,51 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDeclaration, XMLNode, isObject; + + ({isObject} = require('./Utility')); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents the XML declaration + module.exports = XMLDeclaration = class XMLDeclaration extends XMLNode { + // Initializes a new instance of `XMLDeclaration` + + // `parent` the document object + + // `version` A version number string, e.g. 1.0 + // `encoding` Encoding declaration, e.g. UTF-8 + // `standalone` standalone document declaration: true or false + constructor(parent, version, encoding, standalone) { + super(parent); + // arguments may also be passed as an object + if (isObject(version)) { + ({version, encoding, standalone} = version); + } + if (!version) { + version = '1.0'; + } + this.type = NodeType.Declaration; + this.version = this.stringify.xmlVersion(version); + if (encoding != null) { + this.encoding = this.stringify.xmlEncoding(encoding); + } + if (standalone != null) { + this.standalone = this.stringify.xmlStandalone(standalone); + } + } + + // Converts to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.declaration(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLDocType.js b/node_modules/xmlbuilder/lib/XMLDocType.js new file mode 100644 index 0000000..4af825f --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLDocType.js @@ -0,0 +1,235 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject; + + ({isObject} = require('./Utility')); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + XMLDTDAttList = require('./XMLDTDAttList'); + + XMLDTDEntity = require('./XMLDTDEntity'); + + XMLDTDElement = require('./XMLDTDElement'); + + XMLDTDNotation = require('./XMLDTDNotation'); + + XMLNamedNodeMap = require('./XMLNamedNodeMap'); + + // Represents doctype declaration + module.exports = XMLDocType = (function() { + class XMLDocType extends XMLNode { + // Initializes a new instance of `XMLDocType` + + // `parent` the document object + + // `pubID` public identifier of the external subset + // `sysID` system identifier of the external subset + constructor(parent, pubID, sysID) { + var child, i, len, ref; + super(parent); + this.type = NodeType.DocType; + // set DTD name to the name of the root node + if (parent.children) { + ref = parent.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.Element) { + this.name = child.name; + break; + } + } + } + this.documentObject = parent; + // arguments may also be passed as an object + if (isObject(pubID)) { + ({pubID, sysID} = pubID); + } + if (sysID == null) { + [sysID, pubID] = [pubID, sysID]; + } + if (pubID != null) { + this.pubID = this.stringify.dtdPubID(pubID); + } + if (sysID != null) { + this.sysID = this.stringify.dtdSysID(sysID); + } + } + + // Creates an element type declaration + + // `name` element name + // `value` element content (defaults to #PCDATA) + element(name, value) { + var child; + child = new XMLDTDElement(this, name, value); + this.children.push(child); + return this; + } + + // Creates an attribute declaration + + // `elementName` the name of the element containing this attribute + // `attributeName` attribute name + // `attributeType` type of the attribute (defaults to CDATA) + // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or + // #DEFAULT) (defaults to #IMPLIED) + // `defaultValue` default value of the attribute + // (only used for #FIXED or #DEFAULT) + attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var child; + child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.children.push(child); + return this; + } + + // Creates a general entity declaration + + // `name` the name of the entity + // `value` internal entity value or an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + // `value.nData` notation declaration + entity(name, value) { + var child; + child = new XMLDTDEntity(this, false, name, value); + this.children.push(child); + return this; + } + + // Creates a parameter entity declaration + + // `name` the name of the entity + // `value` internal entity value or an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + pEntity(name, value) { + var child; + child = new XMLDTDEntity(this, true, name, value); + this.children.push(child); + return this; + } + + // Creates a NOTATION declaration + + // `name` the name of the notation + // `value` an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + notation(name, value) { + var child; + child = new XMLDTDNotation(this, name, value); + this.children.push(child); + return this; + } + + // Converts to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.docType(this, this.options.writer.filterOptions(options)); + } + + // Aliases + ele(name, value) { + return this.element(name, value); + } + + att(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); + } + + ent(name, value) { + return this.entity(name, value); + } + + pent(name, value) { + return this.pEntity(name, value); + } + + not(name, value) { + return this.notation(name, value); + } + + up() { + return this.root() || this.documentObject; + } + + isEqualNode(node) { + if (!super.isEqualNode(node)) { + return false; + } + if (node.name !== this.name) { + return false; + } + if (node.publicId !== this.publicId) { + return false; + } + if (node.systemId !== this.systemId) { + return false; + } + return true; + } + + }; + + // DOM level 1 + Object.defineProperty(XMLDocType.prototype, 'entities', { + get: function() { + var child, i, len, nodes, ref; + nodes = {}; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if ((child.type === NodeType.EntityDeclaration) && !child.pe) { + nodes[child.name] = child; + } + } + return new XMLNamedNodeMap(nodes); + } + }); + + Object.defineProperty(XMLDocType.prototype, 'notations', { + get: function() { + var child, i, len, nodes, ref; + nodes = {}; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.NotationDeclaration) { + nodes[child.name] = child; + } + } + return new XMLNamedNodeMap(nodes); + } + }); + + // DOM level 2 + Object.defineProperty(XMLDocType.prototype, 'publicId', { + get: function() { + return this.pubID; + } + }); + + Object.defineProperty(XMLDocType.prototype, 'systemId', { + get: function() { + return this.sysID; + } + }); + + Object.defineProperty(XMLDocType.prototype, 'internalSubset', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + return XMLDocType; + + }).call(this); + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLDocument.js b/node_modules/xmlbuilder/lib/XMLDocument.js new file mode 100644 index 0000000..56ec08f --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLDocument.js @@ -0,0 +1,282 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject; + + ({isPlainObject} = require('./Utility')); + + XMLDOMImplementation = require('./XMLDOMImplementation'); + + XMLDOMConfiguration = require('./XMLDOMConfiguration'); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + XMLStringifier = require('./XMLStringifier'); + + XMLStringWriter = require('./XMLStringWriter'); + + // Represents an XML builder + module.exports = XMLDocument = (function() { + class XMLDocument extends XMLNode { + // Initializes a new instance of `XMLDocument` + + // `options.keepNullNodes` whether nodes with null values will be kept + // or ignored: true or false + // `options.keepNullAttributes` whether attributes with null values will be + // kept or ignored: true or false + // `options.ignoreDecorators` whether decorator strings will be ignored when + // converting JS objects: true or false + // `options.separateArrayItems` whether array items are created as separate + // nodes when passed as an object value: true or false + // `options.noDoubleEncoding` whether existing html entities are encoded: + // true or false + // `options.stringify` a set of functions to use for converting values to + // strings + // `options.writer` the default XML writer to use for converting nodes to + // string. If the default writer is not set, the built-in XMLStringWriter + // will be used instead. + constructor(options) { + super(null); + this.name = "#document"; + this.type = NodeType.Document; + this.documentURI = null; + this.domConfig = new XMLDOMConfiguration(); + options || (options = {}); + if (!options.writer) { + options.writer = new XMLStringWriter(); + } + this.options = options; + this.stringify = new XMLStringifier(options); + } + + // Ends the document and passes it to the given XML writer + + // `writer` is either an XML writer or a plain object to pass to the + // constructor of the default XML writer. The default writer is assigned when + // creating the XML document. Following flags are recognized by the + // built-in XMLStringWriter: + // `writer.pretty` pretty prints the result + // `writer.indent` indentation for pretty print + // `writer.offset` how many indentations to add to every line for pretty print + // `writer.newline` newline sequence for pretty print + end(writer) { + var writerOptions; + writerOptions = {}; + if (!writer) { + writer = this.options.writer; + } else if (isPlainObject(writer)) { + writerOptions = writer; + writer = this.options.writer; + } + return writer.document(this, writer.filterOptions(writerOptions)); + } + + // Converts the XML document to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.document(this, this.options.writer.filterOptions(options)); + } + + // DOM level 1 functions to be implemented later + createElement(tagName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createDocumentFragment() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createTextNode(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createComment(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createCDATASection(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createProcessingInstruction(target, data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createAttribute(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createEntityReference(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByTagName(tagname) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM level 2 functions to be implemented later + importNode(importedNode, deep) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createElementNS(namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createAttributeNS(namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByTagNameNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementById(elementId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM level 3 functions to be implemented later + adoptNode(source) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + normalizeDocument() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + renameNode(node, namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM level 4 functions to be implemented later + getElementsByClassName(classNames) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createEvent(eventInterface) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createRange() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createNodeIterator(root, whatToShow, filter) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + createTreeWalker(root, whatToShow, filter) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + }; + + // DOM level 1 + Object.defineProperty(XMLDocument.prototype, 'implementation', { + value: new XMLDOMImplementation() + }); + + Object.defineProperty(XMLDocument.prototype, 'doctype', { + get: function() { + var child, i, len, ref; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.DocType) { + return child; + } + } + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'documentElement', { + get: function() { + return this.rootObject || null; + } + }); + + // DOM level 3 + Object.defineProperty(XMLDocument.prototype, 'inputEncoding', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', { + get: function() { + return false; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].encoding; + } else { + return null; + } + } + }); + + Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].standalone === 'yes'; + } else { + return false; + } + } + }); + + Object.defineProperty(XMLDocument.prototype, 'xmlVersion', { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].version; + } else { + return "1.0"; + } + } + }); + + // DOM level 4 + Object.defineProperty(XMLDocument.prototype, 'URL', { + get: function() { + return this.documentURI; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'origin', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'compatMode', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'characterSet', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'contentType', { + get: function() { + return null; + } + }); + + return XMLDocument; + + }).call(this); + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLDocumentCB.js b/node_modules/xmlbuilder/lib/XMLDocumentCB.js new file mode 100644 index 0000000..c55a4bf --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLDocumentCB.js @@ -0,0 +1,650 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject, + hasProp = {}.hasOwnProperty; + + ({isObject, isFunction, isPlainObject, getValue} = require('./Utility')); + + NodeType = require('./NodeType'); + + XMLDocument = require('./XMLDocument'); + + XMLElement = require('./XMLElement'); + + XMLCData = require('./XMLCData'); + + XMLComment = require('./XMLComment'); + + XMLRaw = require('./XMLRaw'); + + XMLText = require('./XMLText'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + XMLDeclaration = require('./XMLDeclaration'); + + XMLDocType = require('./XMLDocType'); + + XMLDTDAttList = require('./XMLDTDAttList'); + + XMLDTDEntity = require('./XMLDTDEntity'); + + XMLDTDElement = require('./XMLDTDElement'); + + XMLDTDNotation = require('./XMLDTDNotation'); + + XMLAttribute = require('./XMLAttribute'); + + XMLStringifier = require('./XMLStringifier'); + + XMLStringWriter = require('./XMLStringWriter'); + + WriterState = require('./WriterState'); + + // Represents an XML builder + module.exports = XMLDocumentCB = class XMLDocumentCB { + // Initializes a new instance of `XMLDocumentCB` + + // `options.keepNullNodes` whether nodes with null values will be kept + // or ignored: true or false + // `options.keepNullAttributes` whether attributes with null values will be + // kept or ignored: true or false + // `options.ignoreDecorators` whether decorator strings will be ignored when + // converting JS objects: true or false + // `options.separateArrayItems` whether array items are created as separate + // nodes when passed as an object value: true or false + // `options.noDoubleEncoding` whether existing html entities are encoded: + // true or false + // `options.stringify` a set of functions to use for converting values to + // strings + // `options.writer` the default XML writer to use for converting nodes to + // string. If the default writer is not set, the built-in XMLStringWriter + // will be used instead. + + // `onData` the function to be called when a new chunk of XML is output. The + // string containing the XML chunk is passed to `onData` as its first + // argument, and the current indentation level as its second argument. + // `onEnd` the function to be called when the XML document is completed with + // `end`. `onEnd` does not receive any arguments. + constructor(options, onData, onEnd) { + var writerOptions; + this.name = "?xml"; + this.type = NodeType.Document; + options || (options = {}); + writerOptions = {}; + if (!options.writer) { + options.writer = new XMLStringWriter(); + } else if (isPlainObject(options.writer)) { + writerOptions = options.writer; + options.writer = new XMLStringWriter(); + } + this.options = options; + this.writer = options.writer; + this.writerOptions = this.writer.filterOptions(writerOptions); + this.stringify = new XMLStringifier(options); + this.onDataCallback = onData || function() {}; + this.onEndCallback = onEnd || function() {}; + this.currentNode = null; + this.currentLevel = -1; + this.openTags = {}; + this.documentStarted = false; + this.documentCompleted = false; + this.root = null; + } + + // Creates a child element node from the given XMLNode + + // `node` the child node + createChildNode(node) { + var att, attName, attributes, child, i, len, ref, ref1; + switch (node.type) { + case NodeType.CData: + this.cdata(node.value); + break; + case NodeType.Comment: + this.comment(node.value); + break; + case NodeType.Element: + attributes = {}; + ref = node.attribs; + for (attName in ref) { + if (!hasProp.call(ref, attName)) continue; + att = ref[attName]; + attributes[attName] = att.value; + } + this.node(node.name, attributes); + break; + case NodeType.Dummy: + this.dummy(); + break; + case NodeType.Raw: + this.raw(node.value); + break; + case NodeType.Text: + this.text(node.value); + break; + case NodeType.ProcessingInstruction: + this.instruction(node.target, node.value); + break; + default: + throw new Error("This XML node type is not supported in a JS object: " + node.constructor.name); + } + ref1 = node.children; + // write child nodes recursively + for (i = 0, len = ref1.length; i < len; i++) { + child = ref1[i]; + this.createChildNode(child); + if (child.type === NodeType.Element) { + this.up(); + } + } + return this; + } + + // Creates a dummy node + + dummy() { + // no-op, just return this + return this; + } + + // Creates a node + + // `name` name of the node + // `attributes` an object containing name/value pairs of attributes + // `text` element text + node(name, attributes, text) { + if (name == null) { + throw new Error("Missing node name."); + } + if (this.root && this.currentLevel === -1) { + throw new Error("Document can only have one root node. " + this.debugInfo(name)); + } + this.openCurrent(); + name = getValue(name); + if (attributes == null) { + attributes = {}; + } + attributes = getValue(attributes); + // swap argument order: text <-> attributes + if (!isObject(attributes)) { + [text, attributes] = [attributes, text]; + } + this.currentNode = new XMLElement(this, name, attributes); + this.currentNode.children = false; + this.currentLevel++; + this.openTags[this.currentLevel] = this.currentNode; + if (text != null) { + this.text(text); + } + return this; + } + + // Creates a child element node or an element type declaration when called + // inside the DTD + + // `name` name of the node + // `attributes` an object containing name/value pairs of attributes + // `text` element text + element(name, attributes, text) { + var child, i, len, oldValidationFlag, ref, root; + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + this.dtdElement(...arguments); + } else { + if (Array.isArray(name) || isObject(name) || isFunction(name)) { + oldValidationFlag = this.options.noValidation; + this.options.noValidation = true; + root = new XMLDocument(this.options).element('TEMP_ROOT'); + root.element(name); + this.options.noValidation = oldValidationFlag; + ref = root.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + this.createChildNode(child); + if (child.type === NodeType.Element) { + this.up(); + } + } + } else { + this.node(name, attributes, text); + } + } + return this; + } + + // Adds or modifies an attribute + + // `name` attribute name + // `value` attribute value + attribute(name, value) { + var attName, attValue; + if (!this.currentNode || this.currentNode.children) { + throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(name)); + } + if (name != null) { + name = getValue(name); + } + if (isObject(name)) { // expand if object + for (attName in name) { + if (!hasProp.call(name, attName)) continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (this.options.keepNullAttributes && (value == null)) { + this.currentNode.attribs[name] = new XMLAttribute(this, name, ""); + } else if (value != null) { + this.currentNode.attribs[name] = new XMLAttribute(this, name, value); + } + } + return this; + } + + // Creates a text node + + // `value` element text + text(value) { + var node; + this.openCurrent(); + node = new XMLText(this, value); + this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates a CDATA node + + // `value` element text without CDATA delimiters + cdata(value) { + var node; + this.openCurrent(); + node = new XMLCData(this, value); + this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates a comment node + + // `value` comment text + comment(value) { + var node; + this.openCurrent(); + node = new XMLComment(this, value); + this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Adds unescaped raw text + + // `value` text + raw(value) { + var node; + this.openCurrent(); + node = new XMLRaw(this, value); + this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Adds a processing instruction + + // `target` instruction target + // `value` instruction value + instruction(target, value) { + var i, insTarget, insValue, len, node; + this.openCurrent(); + if (target != null) { + target = getValue(target); + } + if (value != null) { + value = getValue(value); + } + if (Array.isArray(target)) { // expand if array + for (i = 0, len = target.length; i < len; i++) { + insTarget = target[i]; + this.instruction(insTarget); + } + } else if (isObject(target)) { // expand if object + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + node = new XMLProcessingInstruction(this, target, value); + this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + } + return this; + } + + // Creates the xml declaration + + // `version` A version number string, e.g. 1.0 + // `encoding` Encoding declaration, e.g. UTF-8 + // `standalone` standalone document declaration: true or false + declaration(version, encoding, standalone) { + var node; + this.openCurrent(); + if (this.documentStarted) { + throw new Error("declaration() must be the first node."); + } + node = new XMLDeclaration(this, version, encoding, standalone); + this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates the document type declaration + + // `root` the name of the root node + // `pubID` the public identifier of the external subset + // `sysID` the system identifier of the external subset + doctype(root, pubID, sysID) { + this.openCurrent(); + if (root == null) { + throw new Error("Missing root node name."); + } + if (this.root) { + throw new Error("dtd() must come before the root node."); + } + this.currentNode = new XMLDocType(this, pubID, sysID); + this.currentNode.rootNodeName = root; + this.currentNode.children = false; + this.currentLevel++; + this.openTags[this.currentLevel] = this.currentNode; + return this; + } + + // Creates an element type declaration + + // `name` element name + // `value` element content (defaults to #PCDATA) + dtdElement(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDElement(this, name, value); + this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates an attribute declaration + + // `elementName` the name of the element containing this attribute + // `attributeName` attribute name + // `attributeType` type of the attribute (defaults to CDATA) + // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or + // #DEFAULT) (defaults to #IMPLIED) + // `defaultValue` default value of the attribute + // (only used for #FIXED or #DEFAULT) + attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var node; + this.openCurrent(); + node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates a general entity declaration + + // `name` the name of the entity + // `value` internal entity value or an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + // `value.nData` notation declaration + entity(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDEntity(this, false, name, value); + this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates a parameter entity declaration + + // `name` the name of the entity + // `value` internal entity value or an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + pEntity(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDEntity(this, true, name, value); + this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Creates a NOTATION declaration + + // `name` the name of the notation + // `value` an object with external entity details + // `value.pubID` public identifier + // `value.sysID` system identifier + notation(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDNotation(this, name, value); + this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + } + + // Gets the parent node + up() { + if (this.currentLevel < 0) { + throw new Error("The document node has no parent."); + } + if (this.currentNode) { + if (this.currentNode.children) { + this.closeNode(this.currentNode); + } else { + this.openNode(this.currentNode); + } + this.currentNode = null; + } else { + this.closeNode(this.openTags[this.currentLevel]); + } + delete this.openTags[this.currentLevel]; + this.currentLevel--; + return this; + } + + // Ends the document + end() { + while (this.currentLevel >= 0) { + this.up(); + } + return this.onEnd(); + } + + // Opens the current parent node + openCurrent() { + if (this.currentNode) { + this.currentNode.children = true; + return this.openNode(this.currentNode); + } + } + + // Writes the opening tag of the current node or the entire node if it has + // no child nodes + openNode(node) { + var att, chunk, name, ref; + if (!node.isOpen) { + if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) { + this.root = node; + } + chunk = ''; + if (node.type === NodeType.Element) { + this.writerOptions.state = WriterState.OpenTag; + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name; + ref = node.attribs; + for (name in ref) { + if (!hasProp.call(ref, name)) continue; + att = ref[name]; + chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel); + } + chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel); + this.writerOptions.state = WriterState.InsideTag; // if node.type is NodeType.DocType + } else { + this.writerOptions.state = WriterState.OpenTag; + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ''; + } + chunk += this.writer.endline(node, this.writerOptions, this.currentLevel); + } + this.onData(chunk, this.currentLevel); + return node.isOpen = true; + } + } + + // Writes the closing tag of the current node + closeNode(node) { + var chunk; + if (!node.isClosed) { + chunk = ''; + this.writerOptions.state = WriterState.CloseTag; + if (node.type === NodeType.Element) { + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '' + this.writer.endline(node, this.writerOptions, this.currentLevel); // if node.type is NodeType.DocType + } else { + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel); + } + this.writerOptions.state = WriterState.None; + this.onData(chunk, this.currentLevel); + return node.isClosed = true; + } + } + + // Called when a new chunk of XML is output + + // `chunk` a string containing the XML chunk + // `level` current indentation level + onData(chunk, level) { + this.documentStarted = true; + return this.onDataCallback(chunk, level + 1); + } + + // Called when the XML document is completed + onEnd() { + this.documentCompleted = true; + return this.onEndCallback(); + } + + // Returns debug string + debugInfo(name) { + if (name == null) { + return ""; + } else { + return "node: <" + name + ">"; + } + } + + // Node aliases + ele() { + return this.element(...arguments); + } + + nod(name, attributes, text) { + return this.node(name, attributes, text); + } + + txt(value) { + return this.text(value); + } + + dat(value) { + return this.cdata(value); + } + + com(value) { + return this.comment(value); + } + + ins(target, value) { + return this.instruction(target, value); + } + + dec(version, encoding, standalone) { + return this.declaration(version, encoding, standalone); + } + + dtd(root, pubID, sysID) { + return this.doctype(root, pubID, sysID); + } + + e(name, attributes, text) { + return this.element(name, attributes, text); + } + + n(name, attributes, text) { + return this.node(name, attributes, text); + } + + t(value) { + return this.text(value); + } + + d(value) { + return this.cdata(value); + } + + c(value) { + return this.comment(value); + } + + r(value) { + return this.raw(value); + } + + i(target, value) { + return this.instruction(target, value); + } + + // Attribute aliases + att() { + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + return this.attList(...arguments); + } else { + return this.attribute(...arguments); + } + } + + a() { + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + return this.attList(...arguments); + } else { + return this.attribute(...arguments); + } + } + + // DTD aliases + // att() and ele() are defined above + ent(name, value) { + return this.entity(name, value); + } + + pent(name, value) { + return this.pEntity(name, value); + } + + not(name, value) { + return this.notation(name, value); + } + + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLDocumentFragment.js b/node_modules/xmlbuilder/lib/XMLDocumentFragment.js new file mode 100644 index 0000000..fbd42ba --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLDocumentFragment.js @@ -0,0 +1,21 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDocumentFragment, XMLNode; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents a CDATA node + module.exports = XMLDocumentFragment = class XMLDocumentFragment extends XMLNode { + // Initializes a new instance of `XMLDocumentFragment` + + constructor() { + super(null); + this.name = "#document-fragment"; + this.type = NodeType.DocumentFragment; + } + + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLDummy.js b/node_modules/xmlbuilder/lib/XMLDummy.js new file mode 100644 index 0000000..06ab8af --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLDummy.js @@ -0,0 +1,39 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLDummy, XMLNode; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + // Represents a raw node + module.exports = XMLDummy = class XMLDummy extends XMLNode { + // Initializes a new instance of `XMLDummy` + + // `XMLDummy` is a special node representing a node with + // a null value. Dummy nodes are created while recursively + // building the XML tree. Simply skipping null values doesn't + // work because that would break the recursive chain. + constructor(parent) { + super(parent); + this.type = NodeType.Dummy; + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return ''; + } + + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLElement.js b/node_modules/xmlbuilder/lib/XMLElement.js new file mode 100644 index 0000000..3e9da57 --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLElement.js @@ -0,0 +1,334 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, + hasProp = {}.hasOwnProperty; + + ({isObject, isFunction, getValue} = require('./Utility')); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + XMLAttribute = require('./XMLAttribute'); + + XMLNamedNodeMap = require('./XMLNamedNodeMap'); + + // Represents an element of the XML document + module.exports = XMLElement = (function() { + class XMLElement extends XMLNode { + // Initializes a new instance of `XMLElement` + + // `parent` the parent node + // `name` element name + // `attributes` an object containing name/value pairs of attributes + constructor(parent, name, attributes) { + var child, j, len, ref; + super(parent); + if (name == null) { + throw new Error("Missing element name. " + this.debugInfo()); + } + this.name = this.stringify.name(name); + this.type = NodeType.Element; + this.attribs = {}; + this.schemaTypeInfo = null; + if (attributes != null) { + this.attribute(attributes); + } + // set properties if this is the root node + if (parent.type === NodeType.Document) { + this.isRoot = true; + this.documentObject = parent; + parent.rootObject = this; + // set dtd name + if (parent.children) { + ref = parent.children; + for (j = 0, len = ref.length; j < len; j++) { + child = ref[j]; + if (child.type === NodeType.DocType) { + child.name = this.name; + break; + } + } + } + } + } + + // Creates and returns a deep clone of `this` + + clone() { + var att, attName, clonedSelf, ref; + clonedSelf = Object.create(this); + // remove document element + if (clonedSelf.isRoot) { + clonedSelf.documentObject = null; + } + // clone attributes + clonedSelf.attribs = {}; + ref = this.attribs; + for (attName in ref) { + if (!hasProp.call(ref, attName)) continue; + att = ref[attName]; + clonedSelf.attribs[attName] = att.clone(); + } + // clone child nodes + clonedSelf.children = []; + this.children.forEach(function(child) { + var clonedChild; + clonedChild = child.clone(); + clonedChild.parent = clonedSelf; + return clonedSelf.children.push(clonedChild); + }); + return clonedSelf; + } + + // Adds or modifies an attribute + + // `name` attribute name + // `value` attribute value + attribute(name, value) { + var attName, attValue; + if (name != null) { + name = getValue(name); + } + if (isObject(name)) { // expand if object + for (attName in name) { + if (!hasProp.call(name, attName)) continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (this.options.keepNullAttributes && (value == null)) { + this.attribs[name] = new XMLAttribute(this, name, ""); + } else if (value != null) { + this.attribs[name] = new XMLAttribute(this, name, value); + } + } + return this; + } + + // Removes an attribute + + // `name` attribute name + removeAttribute(name) { + var attName, j, len; + // Also defined in DOM level 1 + // removeAttribute(name) removes an attribute by name. + if (name == null) { + throw new Error("Missing attribute name. " + this.debugInfo()); + } + name = getValue(name); + if (Array.isArray(name)) { // expand if array + for (j = 0, len = name.length; j < len; j++) { + attName = name[j]; + delete this.attribs[attName]; + } + } else { + delete this.attribs[name]; + } + return this; + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + // `options.allowEmpty` do not self close empty element tags + toString(options) { + return this.options.writer.element(this, this.options.writer.filterOptions(options)); + } + + // Aliases + att(name, value) { + return this.attribute(name, value); + } + + a(name, value) { + return this.attribute(name, value); + } + + // DOM Level 1 + getAttribute(name) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name].value; + } else { + return null; + } + } + + setAttribute(name, value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getAttributeNode(name) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name]; + } else { + return null; + } + } + + setAttributeNode(newAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + removeAttributeNode(oldAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByTagName(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM Level 2 + getAttributeNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + setAttributeNS(namespaceURI, qualifiedName, value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + removeAttributeNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getAttributeNodeNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + setAttributeNodeNS(newAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByTagNameNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + hasAttribute(name) { + return this.attribs.hasOwnProperty(name); + } + + hasAttributeNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM Level 3 + setIdAttribute(name, isId) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name].isId; + } else { + return isId; + } + } + + setIdAttributeNS(namespaceURI, localName, isId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + setIdAttributeNode(idAttr, isId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM Level 4 + getElementsByTagName(tagname) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByTagNameNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getElementsByClassName(classNames) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + isEqualNode(node) { + var i, j, ref; + if (!super.isEqualNode(node)) { + return false; + } + if (node.namespaceURI !== this.namespaceURI) { + return false; + } + if (node.prefix !== this.prefix) { + return false; + } + if (node.localName !== this.localName) { + return false; + } + if (node.attribs.length !== this.attribs.length) { + return false; + } + for (i = j = 0, ref = this.attribs.length - 1; (0 <= ref ? j <= ref : j >= ref); i = 0 <= ref ? ++j : --j) { + if (!this.attribs[i].isEqualNode(node.attribs[i])) { + return false; + } + } + return true; + } + + }; + + // DOM level 1 + Object.defineProperty(XMLElement.prototype, 'tagName', { + get: function() { + return this.name; + } + }); + + // DOM level 4 + Object.defineProperty(XMLElement.prototype, 'namespaceURI', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLElement.prototype, 'prefix', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLElement.prototype, 'localName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLElement.prototype, 'id', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + Object.defineProperty(XMLElement.prototype, 'className', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + Object.defineProperty(XMLElement.prototype, 'classList', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + Object.defineProperty(XMLElement.prototype, 'attributes', { + get: function() { + if (!this.attributeMap || !this.attributeMap.nodes) { + this.attributeMap = new XMLNamedNodeMap(this.attribs); + } + return this.attributeMap; + } + }); + + return XMLElement; + + }).call(this); + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js b/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js new file mode 100644 index 0000000..8c91969 --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js @@ -0,0 +1,77 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + // Represents a map of nodes accessed by a string key + var XMLNamedNodeMap; + + module.exports = XMLNamedNodeMap = (function() { + class XMLNamedNodeMap { + // Initializes a new instance of `XMLNamedNodeMap` + // This is just a wrapper around an ordinary + // JS object. + + // `nodes` the object containing nodes. + constructor(nodes) { + this.nodes = nodes; + } + + // Creates and returns a deep clone of `this` + + clone() { + // this class should not be cloned since it wraps + // around a given object. The calling function should check + // whether the wrapped object is null and supply a new object + // (from the clone). + return this.nodes = null; + } + + // DOM Level 1 + getNamedItem(name) { + return this.nodes[name]; + } + + setNamedItem(node) { + var oldNode; + oldNode = this.nodes[node.nodeName]; + this.nodes[node.nodeName] = node; + return oldNode || null; + } + + removeNamedItem(name) { + var oldNode; + oldNode = this.nodes[name]; + delete this.nodes[name]; + return oldNode || null; + } + + item(index) { + return this.nodes[Object.keys(this.nodes)[index]] || null; + } + + // DOM level 2 functions to be implemented later + getNamedItemNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented."); + } + + setNamedItemNS(node) { + throw new Error("This DOM method is not implemented."); + } + + removeNamedItemNS(namespaceURI, localName) { + throw new Error("This DOM method is not implemented."); + } + + }; + + + // DOM level 1 + Object.defineProperty(XMLNamedNodeMap.prototype, 'length', { + get: function() { + return Object.keys(this.nodes).length || 0; + } + }); + + return XMLNamedNodeMap; + + }).call(this); + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLNode.js b/node_modules/xmlbuilder/lib/XMLNode.js new file mode 100644 index 0000000..0ade97b --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLNode.js @@ -0,0 +1,999 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, + hasProp = {}.hasOwnProperty, + splice = [].splice; + + ({isObject, isFunction, isEmpty, getValue} = require('./Utility')); + + XMLElement = null; + + XMLCData = null; + + XMLComment = null; + + XMLDeclaration = null; + + XMLDocType = null; + + XMLRaw = null; + + XMLText = null; + + XMLProcessingInstruction = null; + + XMLDummy = null; + + NodeType = null; + + XMLNodeList = null; + + XMLNamedNodeMap = null; + + DocumentPosition = null; + + // Represents a generic XMl element + module.exports = XMLNode = (function() { + class XMLNode { + // Initializes a new instance of `XMLNode` + + // `parent` the parent node + constructor(parent1) { + this.parent = parent1; + if (this.parent) { + this.options = this.parent.options; + this.stringify = this.parent.stringify; + } + this.value = null; + this.children = []; + this.baseURI = null; + // first execution, load dependencies that are otherwise + // circular (so we can't load them at the top) + if (!XMLElement) { + XMLElement = require('./XMLElement'); + XMLCData = require('./XMLCData'); + XMLComment = require('./XMLComment'); + XMLDeclaration = require('./XMLDeclaration'); + XMLDocType = require('./XMLDocType'); + XMLRaw = require('./XMLRaw'); + XMLText = require('./XMLText'); + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + XMLDummy = require('./XMLDummy'); + NodeType = require('./NodeType'); + XMLNodeList = require('./XMLNodeList'); + XMLNamedNodeMap = require('./XMLNamedNodeMap'); + DocumentPosition = require('./DocumentPosition'); + } + } + + + // Sets the parent node of this node and its children recursively + + // `parent` the parent node + setParent(parent) { + var child, j, len, ref1, results; + this.parent = parent; + if (parent) { + this.options = parent.options; + this.stringify = parent.stringify; + } + ref1 = this.children; + results = []; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + results.push(child.setParent(this)); + } + return results; + } + + // Creates a child element node + + // `name` node name or an object describing the XML tree + // `attributes` an object containing name/value pairs of attributes + // `text` element text + element(name, attributes, text) { + var childNode, item, j, k, key, lastChild, len, len1, val; + lastChild = null; + if (attributes === null && (text == null)) { + [attributes, text] = [{}, null]; + } + if (attributes == null) { + attributes = {}; + } + attributes = getValue(attributes); + // swap argument order: text <-> attributes + if (!isObject(attributes)) { + [text, attributes] = [attributes, text]; + } + if (name != null) { + name = getValue(name); + } + // expand if array + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + item = name[j]; + lastChild = this.element(item); + } + // evaluate if function + } else if (isFunction(name)) { + lastChild = this.element(name.apply()); + // expand if object + } else if (isObject(name)) { + for (key in name) { + if (!hasProp.call(name, key)) continue; + val = name[key]; + if (isFunction(val)) { + // evaluate if function + val = val.apply(); + } + // assign attributes + if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { + lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); + // skip empty arrays + } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) { + lastChild = this.dummy(); + // empty objects produce one node + } else if (isObject(val) && isEmpty(val)) { + lastChild = this.element(key); + // skip null and undefined nodes + } else if (!this.options.keepNullNodes && (val == null)) { + lastChild = this.dummy(); + + // expand list by creating child nodes + } else if (!this.options.separateArrayItems && Array.isArray(val)) { + for (k = 0, len1 = val.length; k < len1; k++) { + item = val[k]; + childNode = {}; + childNode[key] = item; + lastChild = this.element(childNode); + } + + // expand child nodes under parent + } else if (isObject(val)) { + // if the key is #text expand child nodes under this node to support mixed content + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.element(val); + } else { + lastChild = this.element(key); + lastChild.element(val); + } + } else { + + // text node + lastChild = this.element(key, val); + } + } + // skip null nodes + } else if (!this.options.keepNullNodes && text === null) { + lastChild = this.dummy(); + } else { + // text node + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.text(text); + // cdata node + } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { + lastChild = this.cdata(text); + // comment node + } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { + lastChild = this.comment(text); + // raw text node + } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { + lastChild = this.raw(text); + // processing instruction + } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) { + lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text); + } else { + // element node + lastChild = this.node(name, attributes, text); + } + } + if (lastChild == null) { + throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo()); + } + return lastChild; + } + + // Creates a child element node before the current node + + // `name` node name or an object describing the XML tree + // `attributes` an object containing name/value pairs of attributes + // `text` element text + insertBefore(name, attributes, text) { + var child, i, newChild, refChild, removed; + // DOM level 1 + // insertBefore(newChild, refChild) inserts the child node newChild before refChild + if (name != null ? name.type : void 0) { + newChild = name; + refChild = attributes; + newChild.setParent(this); + if (refChild) { + // temporarily remove children starting *with* refChild + i = children.indexOf(refChild); + removed = children.splice(i); + + // add the new child + children.push(newChild); + + // add back removed children after new child + Array.prototype.push.apply(children, removed); + } else { + children.push(newChild); + } + return newChild; + } else { + if (this.isRoot) { + throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); + } + + // temporarily remove children starting *with* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + + // add the new child + child = this.parent.element(name, attributes, text); + + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return child; + } + } + + // Creates a child element node after the current node + + // `name` node name or an object describing the XML tree + // `attributes` an object containing name/value pairs of attributes + // `text` element text + insertAfter(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); + } + + // temporarily remove children starting *after* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + + // add the new child + child = this.parent.element(name, attributes, text); + + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return child; + } + + // Deletes a child element node + + remove() { + var i, ref1; + if (this.isRoot) { + throw new Error("Cannot remove the root element. " + this.debugInfo()); + } + i = this.parent.children.indexOf(this); + splice.apply(this.parent.children, [i, i - i + 1].concat(ref1 = [])), ref1; + return this.parent; + } + + // Creates a node + + // `name` name of the node + // `attributes` an object containing name/value pairs of attributes + // `text` element text + node(name, attributes, text) { + var child; + if (name != null) { + name = getValue(name); + } + attributes || (attributes = {}); + attributes = getValue(attributes); + // swap argument order: text <-> attributes + if (!isObject(attributes)) { + [text, attributes] = [attributes, text]; + } + child = new XMLElement(this, name, attributes); + if (text != null) { + child.text(text); + } + this.children.push(child); + return child; + } + + // Creates a text node + + // `value` element text + text(value) { + var child; + if (isObject(value)) { + this.element(value); + } + child = new XMLText(this, value); + this.children.push(child); + return this; + } + + // Creates a CDATA node + + // `value` element text without CDATA delimiters + cdata(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + } + + // Creates a comment node + + // `value` comment text + comment(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + } + + // Creates a comment node before the current node + + // `value` comment text + commentBefore(value) { + var child, i, removed; + // temporarily remove children starting *with* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + // add the new child + child = this.parent.comment(value); + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return this; + } + + // Creates a comment node after the current node + + // `value` comment text + commentAfter(value) { + var child, i, removed; + // temporarily remove children starting *after* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + // add the new child + child = this.parent.comment(value); + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return this; + } + + // Adds unescaped raw text + + // `value` text + raw(value) { + var child; + child = new XMLRaw(this, value); + this.children.push(child); + return this; + } + + // Adds a dummy node + dummy() { + var child; + child = new XMLDummy(this); + // Normally when a new node is created it is added to the child node collection. + // However, dummy nodes are never added to the XML tree. They are created while + // converting JS objects to XML nodes in order not to break the recursive function + // chain. They can be thought of as invisible nodes. They can be traversed through + // by using prev(), next(), up(), etc. functions but they do not exists in the tree. + + // @children.push child + return child; + } + + // Adds a processing instruction + + // `target` instruction target + // `value` instruction value + instruction(target, value) { + var insTarget, insValue, instruction, j, len; + if (target != null) { + target = getValue(target); + } + if (value != null) { + value = getValue(value); + } + if (Array.isArray(target)) { // expand if array + for (j = 0, len = target.length; j < len; j++) { + insTarget = target[j]; + this.instruction(insTarget); + } + } else if (isObject(target)) { // expand if object + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + instruction = new XMLProcessingInstruction(this, target, value); + this.children.push(instruction); + } + return this; + } + + // Creates a processing instruction node before the current node + + // `target` instruction target + // `value` instruction value + instructionBefore(target, value) { + var child, i, removed; + // temporarily remove children starting *with* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + // add the new child + child = this.parent.instruction(target, value); + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return this; + } + + // Creates a processing instruction node after the current node + + // `target` instruction target + // `value` instruction value + instructionAfter(target, value) { + var child, i, removed; + // temporarily remove children starting *after* this + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + // add the new child + child = this.parent.instruction(target, value); + // add back removed children after new child + Array.prototype.push.apply(this.parent.children, removed); + return this; + } + + // Creates the xml declaration + + // `version` A version number string, e.g. 1.0 + // `encoding` Encoding declaration, e.g. UTF-8 + // `standalone` standalone document declaration: true or false + declaration(version, encoding, standalone) { + var doc, xmldec; + doc = this.document(); + xmldec = new XMLDeclaration(doc, version, encoding, standalone); + // Replace XML declaration if exists, otherwise insert at top + if (doc.children.length === 0) { + doc.children.unshift(xmldec); + } else if (doc.children[0].type === NodeType.Declaration) { + doc.children[0] = xmldec; + } else { + doc.children.unshift(xmldec); + } + return doc.root() || doc; + } + + // Creates the document type declaration + + // `pubID` the public identifier of the external subset + // `sysID` the system identifier of the external subset + dtd(pubID, sysID) { + var child, doc, doctype, i, j, k, len, len1, ref1, ref2; + doc = this.document(); + doctype = new XMLDocType(doc, pubID, sysID); + ref1 = doc.children; + // Replace DTD if exists + for (i = j = 0, len = ref1.length; j < len; i = ++j) { + child = ref1[i]; + if (child.type === NodeType.DocType) { + doc.children[i] = doctype; + return doctype; + } + } + ref2 = doc.children; + // insert before root node if the root node exists + for (i = k = 0, len1 = ref2.length; k < len1; i = ++k) { + child = ref2[i]; + if (child.isRoot) { + doc.children.splice(i, 0, doctype); + return doctype; + } + } + // otherwise append to end + doc.children.push(doctype); + return doctype; + } + + // Gets the parent node + up() { + if (this.isRoot) { + throw new Error("The root node has no parent. Use doc() if you need to get the document object."); + } + return this.parent; + } + + // Gets the root node + root() { + var node; + node = this; + while (node) { + if (node.type === NodeType.Document) { + return node.rootObject; + } else if (node.isRoot) { + return node; + } else { + node = node.parent; + } + } + } + + // Gets the node representing the XML document + document() { + var node; + node = this; + while (node) { + if (node.type === NodeType.Document) { + return node; + } else { + node = node.parent; + } + } + } + + // Ends the document and converts string + end(options) { + return this.document().end(options); + } + + // Gets the previous node + prev() { + var i; + i = this.parent.children.indexOf(this); + if (i < 1) { + throw new Error("Already at the first node. " + this.debugInfo()); + } + return this.parent.children[i - 1]; + } + + // Gets the next node + next() { + var i; + i = this.parent.children.indexOf(this); + if (i === -1 || i === this.parent.children.length - 1) { + throw new Error("Already at the last node. " + this.debugInfo()); + } + return this.parent.children[i + 1]; + } + + // Imports cloned root from another XML document + + // `doc` the XML document to insert nodes from + importDocument(doc) { + var child, clonedRoot, j, len, ref1; + clonedRoot = doc.root().clone(); + clonedRoot.parent = this; + clonedRoot.isRoot = false; + this.children.push(clonedRoot); + // set properties if imported element becomes the root node + if (this.type === NodeType.Document) { + clonedRoot.isRoot = true; + clonedRoot.documentObject = this; + this.rootObject = clonedRoot; + // set dtd name + if (this.children) { + ref1 = this.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + if (child.type === NodeType.DocType) { + child.name = clonedRoot.name; + break; + } + } + } + } + return this; + } + + + // Returns debug string for this node + debugInfo(name) { + var ref1, ref2; + name = name || this.name; + if ((name == null) && !((ref1 = this.parent) != null ? ref1.name : void 0)) { + return ""; + } else if (name == null) { + return "parent: <" + this.parent.name + ">"; + } else if (!((ref2 = this.parent) != null ? ref2.name : void 0)) { + return "node: <" + name + ">"; + } else { + return "node: <" + name + ">, parent: <" + this.parent.name + ">"; + } + } + + // Aliases + ele(name, attributes, text) { + return this.element(name, attributes, text); + } + + nod(name, attributes, text) { + return this.node(name, attributes, text); + } + + txt(value) { + return this.text(value); + } + + dat(value) { + return this.cdata(value); + } + + com(value) { + return this.comment(value); + } + + ins(target, value) { + return this.instruction(target, value); + } + + doc() { + return this.document(); + } + + dec(version, encoding, standalone) { + return this.declaration(version, encoding, standalone); + } + + e(name, attributes, text) { + return this.element(name, attributes, text); + } + + n(name, attributes, text) { + return this.node(name, attributes, text); + } + + t(value) { + return this.text(value); + } + + d(value) { + return this.cdata(value); + } + + c(value) { + return this.comment(value); + } + + r(value) { + return this.raw(value); + } + + i(target, value) { + return this.instruction(target, value); + } + + u() { + return this.up(); + } + + // can be deprecated in a future release + importXMLBuilder(doc) { + return this.importDocument(doc); + } + + // Adds or modifies an attribute. + + // `name` attribute name + // `value` attribute value + attribute(name, value) { + throw new Error("attribute() applies to element nodes only."); + } + + att(name, value) { + return this.attribute(name, value); + } + + a(name, value) { + return this.attribute(name, value); + } + + // Removes an attribute + + // `name` attribute name + removeAttribute(name) { + throw new Error("attribute() applies to element nodes only."); + } + + // DOM level 1 functions to be implemented later + replaceChild(newChild, oldChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + removeChild(oldChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + appendChild(newChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + hasChildNodes() { + return this.children.length !== 0; + } + + cloneNode(deep) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + normalize() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // DOM level 2 + isSupported(feature, version) { + return true; + } + + hasAttributes() { + return this.attribs.length !== 0; + } + + // DOM level 3 functions to be implemented later + compareDocumentPosition(other) { + var ref, res; + ref = this; + if (ref === other) { + return 0; + } else if (this.document() !== other.document()) { + res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific; + if (Math.random() < 0.5) { + res |= DocumentPosition.Preceding; + } else { + res |= DocumentPosition.Following; + } + return res; + } else if (ref.isAncestor(other)) { + return DocumentPosition.Contains | DocumentPosition.Preceding; + } else if (ref.isDescendant(other)) { + return DocumentPosition.Contains | DocumentPosition.Following; + } else if (ref.isPreceding(other)) { + return DocumentPosition.Preceding; + } else { + return DocumentPosition.Following; + } + } + + isSameNode(other) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + lookupPrefix(namespaceURI) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + isDefaultNamespace(namespaceURI) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + lookupNamespaceURI(prefix) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + isEqualNode(node) { + var i, j, ref1; + if (node.nodeType !== this.nodeType) { + return false; + } + if (node.children.length !== this.children.length) { + return false; + } + for (i = j = 0, ref1 = this.children.length - 1; (0 <= ref1 ? j <= ref1 : j >= ref1); i = 0 <= ref1 ? ++j : --j) { + if (!this.children[i].isEqualNode(node.children[i])) { + return false; + } + } + return true; + } + + getFeature(feature, version) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + setUserData(key, data, handler) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + getUserData(key) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + // Returns true if other is an inclusive descendant of node, + // and false otherwise. + contains(other) { + if (!other) { + return false; + } + return other === this || this.isDescendant(other); + } + + // An object A is called a descendant of an object B, if either A is + // a child of B or A is a child of an object C that is a descendant of B. + isDescendant(node) { + var child, isDescendantChild, j, len, ref1; + ref1 = this.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + if (node === child) { + return true; + } + isDescendantChild = child.isDescendant(node); + if (isDescendantChild) { + return true; + } + } + return false; + } + + // An object A is called an ancestor of an object B if and only if + // B is a descendant of A. + isAncestor(node) { + return node.isDescendant(this); + } + + // An object A is preceding an object B if A and B are in the + // same tree and A comes before B in tree order. + isPreceding(node) { + var nodePos, thisPos; + nodePos = this.treePosition(node); + thisPos = this.treePosition(this); + if (nodePos === -1 || thisPos === -1) { + return false; + } else { + return nodePos < thisPos; + } + } + + // An object A is folllowing an object B if A and B are in the + // same tree and A comes after B in tree order. + isFollowing(node) { + var nodePos, thisPos; + nodePos = this.treePosition(node); + thisPos = this.treePosition(this); + if (nodePos === -1 || thisPos === -1) { + return false; + } else { + return nodePos > thisPos; + } + } + + // Returns the preorder position of the given node in the tree, or -1 + // if the node is not in the tree. + treePosition(node) { + var found, pos; + pos = 0; + found = false; + this.foreachTreeNode(this.document(), function(childNode) { + pos++; + if (!found && childNode === node) { + return found = true; + } + }); + if (found) { + return pos; + } else { + return -1; + } + } + + + // Depth-first preorder traversal through the XML tree + foreachTreeNode(node, func) { + var child, j, len, ref1, res; + node || (node = this.document()); + ref1 = node.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + if (res = func(child)) { + return res; + } else { + res = this.foreachTreeNode(child, func); + if (res) { + return res; + } + } + } + } + + }; + + // DOM level 1 + Object.defineProperty(XMLNode.prototype, 'nodeName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLNode.prototype, 'nodeType', { + get: function() { + return this.type; + } + }); + + Object.defineProperty(XMLNode.prototype, 'nodeValue', { + get: function() { + return this.value; + } + }); + + Object.defineProperty(XMLNode.prototype, 'parentNode', { + get: function() { + return this.parent; + } + }); + + Object.defineProperty(XMLNode.prototype, 'childNodes', { + get: function() { + if (!this.childNodeList || !this.childNodeList.nodes) { + this.childNodeList = new XMLNodeList(this.children); + } + return this.childNodeList; + } + }); + + Object.defineProperty(XMLNode.prototype, 'firstChild', { + get: function() { + return this.children[0] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'lastChild', { + get: function() { + return this.children[this.children.length - 1] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'previousSibling', { + get: function() { + var i; + i = this.parent.children.indexOf(this); + return this.parent.children[i - 1] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'nextSibling', { + get: function() { + var i; + i = this.parent.children.indexOf(this); + return this.parent.children[i + 1] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'ownerDocument', { + get: function() { + return this.document() || null; + } + }); + + // DOM level 3 + Object.defineProperty(XMLNode.prototype, 'textContent', { + get: function() { + var child, j, len, ref1, str; + if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) { + str = ''; + ref1 = this.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + if (child.textContent) { + str += child.textContent; + } + } + return str; + } else { + return null; + } + }, + set: function(value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + return XMLNode; + + }).call(this); + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLNodeFilter.js b/node_modules/xmlbuilder/lib/XMLNodeFilter.js new file mode 100644 index 0000000..3f33f45 --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLNodeFilter.js @@ -0,0 +1,51 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + // Represents a node filter + var XMLNodeFilter; + + module.exports = XMLNodeFilter = (function() { + class XMLNodeFilter { + // DOM level 4 functions to be implemented later + acceptNode(node) { + throw new Error("This DOM method is not implemented."); + } + + }; + + XMLNodeFilter.prototype.FilterAccept = 1; + + XMLNodeFilter.prototype.FilterReject = 2; + + XMLNodeFilter.prototype.FilterSkip = 3; + + XMLNodeFilter.prototype.ShowAll = 0xffffffff; + + XMLNodeFilter.prototype.ShowElement = 0x1; + + XMLNodeFilter.prototype.ShowAttribute = 0x2; + + XMLNodeFilter.prototype.ShowText = 0x4; + + XMLNodeFilter.prototype.ShowCDataSection = 0x8; + + XMLNodeFilter.prototype.ShowEntityReference = 0x10; + + XMLNodeFilter.prototype.ShowEntity = 0x20; + + XMLNodeFilter.prototype.ShowProcessingInstruction = 0x40; + + XMLNodeFilter.prototype.ShowComment = 0x80; + + XMLNodeFilter.prototype.ShowDocument = 0x100; + + XMLNodeFilter.prototype.ShowDocumentType = 0x200; + + XMLNodeFilter.prototype.ShowDocumentFragment = 0x400; + + XMLNodeFilter.prototype.ShowNotation = 0x800; + + return XMLNodeFilter; + + }).call(this); + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLNodeList.js b/node_modules/xmlbuilder/lib/XMLNodeList.js new file mode 100644 index 0000000..8570096 --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLNodeList.js @@ -0,0 +1,45 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + // Represents a list of nodes + var XMLNodeList; + + module.exports = XMLNodeList = (function() { + class XMLNodeList { + // Initializes a new instance of `XMLNodeList` + // This is just a wrapper around an ordinary + // JS array. + + // `nodes` the array containing nodes. + constructor(nodes) { + this.nodes = nodes; + } + + // Creates and returns a deep clone of `this` + + clone() { + // this class should not be cloned since it wraps + // around a given array. The calling function should check + // whether the wrapped array is null and supply a new array + // (from the clone). + return this.nodes = null; + } + + // DOM Level 1 + item(index) { + return this.nodes[index] || null; + } + + }; + + // DOM level 1 + Object.defineProperty(XMLNodeList.prototype, 'length', { + get: function() { + return this.nodes.length || 0; + } + }); + + return XMLNodeList; + + }).call(this); + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js b/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js new file mode 100644 index 0000000..88b8fcd --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js @@ -0,0 +1,56 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLCharacterData, XMLProcessingInstruction; + + NodeType = require('./NodeType'); + + XMLCharacterData = require('./XMLCharacterData'); + + // Represents a processing instruction + module.exports = XMLProcessingInstruction = class XMLProcessingInstruction extends XMLCharacterData { + // Initializes a new instance of `XMLProcessingInstruction` + + // `parent` the parent node + // `target` instruction target + // `value` instruction value + constructor(parent, target, value) { + super(parent); + if (target == null) { + throw new Error("Missing instruction target. " + this.debugInfo()); + } + this.type = NodeType.ProcessingInstruction; + this.target = this.stringify.insTarget(target); + this.name = this.target; + if (value) { + this.value = this.stringify.insValue(value); + } + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options)); + } + + isEqualNode(node) { + if (!super.isEqualNode(node)) { + return false; + } + if (node.target !== this.target) { + return false; + } + return true; + } + + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLRaw.js b/node_modules/xmlbuilder/lib/XMLRaw.js new file mode 100644 index 0000000..4addc8b --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLRaw.js @@ -0,0 +1,40 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, XMLNode, XMLRaw; + + NodeType = require('./NodeType'); + + XMLNode = require('./XMLNode'); + + // Represents a raw node + module.exports = XMLRaw = class XMLRaw extends XMLNode { + // Initializes a new instance of `XMLRaw` + + // `text` raw text + constructor(parent, text) { + super(parent); + if (text == null) { + throw new Error("Missing raw text. " + this.debugInfo()); + } + this.type = NodeType.Raw; + this.value = this.stringify.raw(text); + } + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // Converts the XML fragment to string + + // `options.pretty` pretty prints the result + // `options.indent` indentation for pretty print + // `options.offset` how many indentations to add to every line for pretty print + // `options.newline` newline sequence for pretty print + toString(options) { + return this.options.writer.raw(this, this.options.writer.filterOptions(options)); + } + + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLStreamWriter.js b/node_modules/xmlbuilder/lib/XMLStreamWriter.js new file mode 100644 index 0000000..c0422a2 --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLStreamWriter.js @@ -0,0 +1,209 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, WriterState, XMLStreamWriter, XMLWriterBase, + hasProp = {}.hasOwnProperty; + + NodeType = require('./NodeType'); + + XMLWriterBase = require('./XMLWriterBase'); + + WriterState = require('./WriterState'); + + // Prints XML nodes to a stream + module.exports = XMLStreamWriter = class XMLStreamWriter extends XMLWriterBase { + // Initializes a new instance of `XMLStreamWriter` + + // `stream` output stream + // `options.pretty` pretty prints the result + // `options.indent` indentation string + // `options.newline` newline sequence + // `options.offset` a fixed number of indentations to add to every line + // `options.allowEmpty` do not self close empty element tags + // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF + // `options.spaceBeforeSlash` add a space before the closing slash of empty elements + constructor(stream, options) { + super(options); + this.stream = stream; + } + + endline(node, options, level) { + if (node.isLastRootNode && options.state === WriterState.CloseTag) { + return ''; + } else { + return super.endline(node, options, level); + } + } + + document(doc, options) { + var child, i, j, k, len1, len2, ref, ref1, results; + ref = doc.children; + // set a flag so that we don't insert a newline after the last root level node + for (i = j = 0, len1 = ref.length; j < len1; i = ++j) { + child = ref[i]; + child.isLastRootNode = i === doc.children.length - 1; + } + options = this.filterOptions(options); + ref1 = doc.children; + results = []; + for (k = 0, len2 = ref1.length; k < len2; k++) { + child = ref1[k]; + results.push(this.writeChildNode(child, options, 0)); + } + return results; + } + + cdata(node, options, level) { + return this.stream.write(super.cdata(node, options, level)); + } + + comment(node, options, level) { + return this.stream.write(super.comment(node, options, level)); + } + + declaration(node, options, level) { + return this.stream.write(super.declaration(node, options, level)); + } + + docType(node, options, level) { + var child, j, len1, ref; + level || (level = 0); + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + this.stream.write(this.indent(node, options, level)); + this.stream.write(' 0) { + this.stream.write(' ['); + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.InsideTag; + ref = node.children; + for (j = 0, len1 = ref.length; j < len1; j++) { + child = ref[j]; + this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + this.stream.write(']'); + } + // close tag + options.state = WriterState.CloseTag; + this.stream.write(options.spaceBeforeSlash + '>'); + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.None; + return this.closeNode(node, options, level); + } + + element(node, options, level) { + var att, attLen, child, childNodeCount, firstChildNode, j, len, len1, name, prettySuppressed, r, ratt, ref, ref1, ref2, rline; + level || (level = 0); + // open tag + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '<' + node.name; + // attributes + if (options.pretty && options.width > 0) { + len = r.length; + ref = node.attribs; + for (name in ref) { + if (!hasProp.call(ref, name)) continue; + att = ref[name]; + ratt = this.attribute(att, options, level); + attLen = ratt.length; + if (len + attLen > options.width) { + rline = this.indent(node, options, level + 1) + ratt; + r += this.endline(node, options, level) + rline; + len = rline.length; + } else { + rline = ' ' + ratt; + r += rline; + len += rline.length; + } + } + } else { + ref1 = node.attribs; + for (name in ref1) { + if (!hasProp.call(ref1, name)) continue; + att = ref1[name]; + r += this.attribute(att, options, level); + } + } + this.stream.write(r); + childNodeCount = node.children.length; + firstChildNode = childNodeCount === 0 ? null : node.children[0]; + if (childNodeCount === 0 || node.children.every(function(e) { + return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === ''; + })) { + // empty element + if (options.allowEmpty) { + this.stream.write('>'); + options.state = WriterState.CloseTag; + this.stream.write(''); + } else { + options.state = WriterState.CloseTag; + this.stream.write(options.spaceBeforeSlash + '/>'); + } + } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) { + // do not indent text-only nodes + this.stream.write('>'); + options.state = WriterState.InsideTag; + options.suppressPrettyCount++; + prettySuppressed = true; + this.writeChildNode(firstChildNode, options, level + 1); + options.suppressPrettyCount--; + prettySuppressed = false; + options.state = WriterState.CloseTag; + this.stream.write(''); + } else { + this.stream.write('>' + this.endline(node, options, level)); + options.state = WriterState.InsideTag; + ref2 = node.children; + // inner tags + for (j = 0, len1 = ref2.length; j < len1; j++) { + child = ref2[j]; + this.writeChildNode(child, options, level + 1); + } + // close tag + options.state = WriterState.CloseTag; + this.stream.write(this.indent(node, options, level) + ''); + } + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.None; + return this.closeNode(node, options, level); + } + + processingInstruction(node, options, level) { + return this.stream.write(super.processingInstruction(node, options, level)); + } + + raw(node, options, level) { + return this.stream.write(super.raw(node, options, level)); + } + + text(node, options, level) { + return this.stream.write(super.text(node, options, level)); + } + + dtdAttList(node, options, level) { + return this.stream.write(super.dtdAttList(node, options, level)); + } + + dtdElement(node, options, level) { + return this.stream.write(super.dtdElement(node, options, level)); + } + + dtdEntity(node, options, level) { + return this.stream.write(super.dtdEntity(node, options, level)); + } + + dtdNotation(node, options, level) { + return this.stream.write(super.dtdNotation(node, options, level)); + } + + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLStringWriter.js b/node_modules/xmlbuilder/lib/XMLStringWriter.js new file mode 100644 index 0000000..969caf5 --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLStringWriter.js @@ -0,0 +1,40 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var XMLStringWriter, XMLWriterBase; + + XMLWriterBase = require('./XMLWriterBase'); + + // Prints XML nodes as plain text + module.exports = XMLStringWriter = class XMLStringWriter extends XMLWriterBase { + // Initializes a new instance of `XMLStringWriter` + + // `options.pretty` pretty prints the result + // `options.indent` indentation string + // `options.newline` newline sequence + // `options.offset` a fixed number of indentations to add to every line + // `options.allowEmpty` do not self close empty element tags + // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF + // `options.spaceBeforeSlash` add a space before the closing slash of empty elements + constructor(options) { + super(options); + } + + document(doc, options) { + var child, i, len, r, ref; + options = this.filterOptions(options); + r = ''; + ref = doc.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + r += this.writeChildNode(child, options, 0); + } + // remove trailing newline + if (options.pretty && r.slice(-options.newline.length) === options.newline) { + r = r.slice(0, -options.newline.length); + } + return r; + } + + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/XMLStringifier.js b/node_modules/xmlbuilder/lib/XMLStringifier.js new file mode 100644 index 0000000..1a7cbb0 --- /dev/null +++ b/node_modules/xmlbuilder/lib/XMLStringifier.js @@ -0,0 +1,291 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + // Converts values to strings + var XMLStringifier, + hasProp = {}.hasOwnProperty; + + module.exports = XMLStringifier = (function() { + class XMLStringifier { + // Initializes a new instance of `XMLStringifier` + + // `options.version` The version number string of the XML spec to validate against, e.g. 1.0 + // `options.noDoubleEncoding` whether existing html entities are encoded: true or false + // `options.stringify` a set of functions to use for converting values to strings + // `options.noValidation` whether values will be validated and escaped or returned as is + // `options.invalidCharReplacement` a character to replace invalid characters and disable character validation + constructor(options) { + var key, ref, value; + // Checks whether the given string contains legal characters + // Fails with an exception on error + + // `str` the string to check + this.assertLegalChar = this.assertLegalChar.bind(this); + // Checks whether the given string contains legal characters for a name + // Fails with an exception on error + + // `str` the string to check + this.assertLegalName = this.assertLegalName.bind(this); + options || (options = {}); + this.options = options; + if (!this.options.version) { + this.options.version = '1.0'; + } + ref = options.stringify || {}; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + value = ref[key]; + this[key] = value; + } + } + + // Defaults + name(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalName('' + val || ''); + } + + text(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar(this.textEscape('' + val || '')); + } + + cdata(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + val = val.replace(']]>', ']]]]>'); + return this.assertLegalChar(val); + } + + comment(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (val.match(/--/)) { + throw new Error("Comment text cannot contain double-hypen: " + val); + } + return this.assertLegalChar(val); + } + + raw(val) { + if (this.options.noValidation) { + return val; + } + return '' + val || ''; + } + + attValue(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar(this.attEscape(val = '' + val || '')); + } + + insTarget(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + insValue(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (val.match(/\?>/)) { + throw new Error("Invalid processing instruction value: " + val); + } + return this.assertLegalChar(val); + } + + xmlVersion(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (!val.match(/1\.[0-9]+/)) { + throw new Error("Invalid version number: " + val); + } + return val; + } + + xmlEncoding(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) { + throw new Error("Invalid encoding: " + val); + } + return this.assertLegalChar(val); + } + + xmlStandalone(val) { + if (this.options.noValidation) { + return val; + } + if (val) { + return "yes"; + } else { + return "no"; + } + } + + dtdPubID(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdSysID(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdElementValue(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdAttType(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdAttDefault(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdEntityValue(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + dtdNData(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + } + + assertLegalChar(str) { + var regex, res; + if (this.options.noValidation) { + return str; + } + if (this.options.version === '1.0') { + // Valid characters from https://www.w3.org/TR/xml/#charsets + // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. + // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] + // This ES5 compatible Regexp has been generated using the "regenerate" NPM module: + // let xml_10_InvalidChars = regenerate() + // .addRange(0x0000, 0x0008) + // .add(0x000B, 0x000C) + // .addRange(0x000E, 0x001F) + // .addRange(0xD800, 0xDFFF) + // .addRange(0xFFFE, 0xFFFF) + regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g; + if (this.options.invalidCharReplacement !== void 0) { + str = str.replace(regex, this.options.invalidCharReplacement); + } else if (res = str.match(regex)) { + throw new Error(`Invalid character in string: ${str} at index ${res.index}`); + } + } else if (this.options.version === '1.1') { + // Valid characters from https://www.w3.org/TR/xml11/#charsets + // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. + // [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] + // This ES5 compatible Regexp has been generated using the "regenerate" NPM module: + // let xml_11_InvalidChars = regenerate() + // .add(0x0000) + // .addRange(0xD800, 0xDFFF) + // .addRange(0xFFFE, 0xFFFF) + regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g; + if (this.options.invalidCharReplacement !== void 0) { + str = str.replace(regex, this.options.invalidCharReplacement); + } else if (res = str.match(regex)) { + throw new Error(`Invalid character in string: ${str} at index ${res.index}`); + } + } + return str; + } + + assertLegalName(str) { + var regex; + if (this.options.noValidation) { + return str; + } + str = this.assertLegalChar(str); + regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/; + if (!str.match(regex)) { + throw new Error(`Invalid character in name: ${str}`); + } + return str; + } + + // Escapes special characters in text + + // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping + + // `str` the string to escape + textEscape(str) { + var ampregex; + if (this.options.noValidation) { + return str; + } + ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g; + return str.replace(ampregex, '&').replace(//g, '>').replace(/\r/g, ' '); + } + + // Escapes special characters in attribute values + + // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping + + // `str` the string to escape + attEscape(str) { + var ampregex; + if (this.options.noValidation) { + return str; + } + ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g; + return str.replace(ampregex, '&').replace(/ 0) { + return new Array(indentLevel).join(options.indent); + } + } + return ''; + } + + // Returns the newline string + + // `node` current node + // `options` writer options + // `level` current indentation level + endline(node, options, level) { + if (!options.pretty || options.suppressPrettyCount) { + return ''; + } else { + return options.newline; + } + } + + attribute(att, options, level) { + var r; + this.openAttribute(att, options, level); + if (options.pretty && options.width > 0) { + r = att.name + '="' + att.value + '"'; + } else { + r = ' ' + att.name + '="' + att.value + '"'; + } + this.closeAttribute(att, options, level); + return r; + } + + cdata(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + comment(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + declaration(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + ''; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + docType(node, options, level) { + var child, i, len1, r, ref; + level || (level = 0); + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + r += ' 0) { + r += ' ['; + r += this.endline(node, options, level); + options.state = WriterState.InsideTag; + ref = node.children; + for (i = 0, len1 = ref.length; i < len1; i++) { + child = ref[i]; + r += this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + r += ']'; + } + // close tag + options.state = WriterState.CloseTag; + r += options.spaceBeforeSlash + '>'; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + element(node, options, level) { + var att, attLen, child, childNodeCount, firstChildNode, i, j, len, len1, len2, name, prettySuppressed, r, ratt, ref, ref1, ref2, ref3, rline; + level || (level = 0); + prettySuppressed = false; + // open tag + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '<' + node.name; + // attributes + if (options.pretty && options.width > 0) { + len = r.length; + ref = node.attribs; + for (name in ref) { + if (!hasProp.call(ref, name)) continue; + att = ref[name]; + ratt = this.attribute(att, options, level); + attLen = ratt.length; + if (len + attLen > options.width) { + rline = this.indent(node, options, level + 1) + ratt; + r += this.endline(node, options, level) + rline; + len = rline.length; + } else { + rline = ' ' + ratt; + r += rline; + len += rline.length; + } + } + } else { + ref1 = node.attribs; + for (name in ref1) { + if (!hasProp.call(ref1, name)) continue; + att = ref1[name]; + r += this.attribute(att, options, level); + } + } + childNodeCount = node.children.length; + firstChildNode = childNodeCount === 0 ? null : node.children[0]; + if (childNodeCount === 0 || node.children.every(function(e) { + return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === ''; + })) { + // empty element + if (options.allowEmpty) { + r += '>'; + options.state = WriterState.CloseTag; + r += '' + this.endline(node, options, level); + } else { + options.state = WriterState.CloseTag; + r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level); + } + } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) { + // do not indent text-only nodes + r += '>'; + options.state = WriterState.InsideTag; + options.suppressPrettyCount++; + prettySuppressed = true; + r += this.writeChildNode(firstChildNode, options, level + 1); + options.suppressPrettyCount--; + prettySuppressed = false; + options.state = WriterState.CloseTag; + r += '' + this.endline(node, options, level); + } else { + // if ANY are a text node, then suppress pretty now + if (options.dontPrettyTextNodes) { + ref2 = node.children; + for (i = 0, len1 = ref2.length; i < len1; i++) { + child = ref2[i]; + if ((child.type === NodeType.Text || child.type === NodeType.Raw || child.type === NodeType.CData) && (child.value != null)) { + options.suppressPrettyCount++; + prettySuppressed = true; + break; + } + } + } + // close the opening tag, after dealing with newline + r += '>' + this.endline(node, options, level); + options.state = WriterState.InsideTag; + ref3 = node.children; + // inner tags + for (j = 0, len2 = ref3.length; j < len2; j++) { + child = ref3[j]; + r += this.writeChildNode(child, options, level + 1); + } + // close tag + options.state = WriterState.CloseTag; + r += this.indent(node, options, level) + ''; + if (prettySuppressed) { + options.suppressPrettyCount--; + } + r += this.endline(node, options, level); + options.state = WriterState.None; + } + this.closeNode(node, options, level); + return r; + } + + writeChildNode(node, options, level) { + switch (node.type) { + case NodeType.CData: + return this.cdata(node, options, level); + case NodeType.Comment: + return this.comment(node, options, level); + case NodeType.Element: + return this.element(node, options, level); + case NodeType.Raw: + return this.raw(node, options, level); + case NodeType.Text: + return this.text(node, options, level); + case NodeType.ProcessingInstruction: + return this.processingInstruction(node, options, level); + case NodeType.Dummy: + return ''; + case NodeType.Declaration: + return this.declaration(node, options, level); + case NodeType.DocType: + return this.docType(node, options, level); + case NodeType.AttributeDeclaration: + return this.dtdAttList(node, options, level); + case NodeType.ElementDeclaration: + return this.dtdElement(node, options, level); + case NodeType.EntityDeclaration: + return this.dtdEntity(node, options, level); + case NodeType.NotationDeclaration: + return this.dtdNotation(node, options, level); + default: + throw new Error("Unknown XML node type: " + node.constructor.name); + } + } + + processingInstruction(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + ''; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + raw(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + options.state = WriterState.InsideTag; + r += node.value; + options.state = WriterState.CloseTag; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + text(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + options.state = WriterState.InsideTag; + r += node.value; + options.state = WriterState.CloseTag; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + dtdAttList(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + dtdElement(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + dtdEntity(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + dtdNotation(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + } + + openNode(node, options, level) {} + + closeNode(node, options, level) {} + + openAttribute(att, options, level) {} + + closeAttribute(att, options, level) {} + + }; + +}).call(this); diff --git a/node_modules/xmlbuilder/lib/index.js b/node_modules/xmlbuilder/lib/index.js new file mode 100644 index 0000000..c9ff150 --- /dev/null +++ b/node_modules/xmlbuilder/lib/index.js @@ -0,0 +1,120 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction; + + ({assign, isFunction} = require('./Utility')); + + XMLDOMImplementation = require('./XMLDOMImplementation'); + + XMLDocument = require('./XMLDocument'); + + XMLDocumentCB = require('./XMLDocumentCB'); + + XMLStringWriter = require('./XMLStringWriter'); + + XMLStreamWriter = require('./XMLStreamWriter'); + + NodeType = require('./NodeType'); + + WriterState = require('./WriterState'); + + // Creates a new document and returns the root node for + // chain-building the document tree + + // `name` name of the root element + + // `xmldec.version` A version number string, e.g. 1.0 + // `xmldec.encoding` Encoding declaration, e.g. UTF-8 + // `xmldec.standalone` standalone document declaration: true or false + + // `doctype.pubID` public identifier of the external subset + // `doctype.sysID` system identifier of the external subset + + // `options.headless` whether XML declaration and doctype will be included: + // true or false + // `options.keepNullNodes` whether nodes with null values will be kept + // or ignored: true or false + // `options.keepNullAttributes` whether attributes with null values will be + // kept or ignored: true or false + // `options.ignoreDecorators` whether decorator strings will be ignored when + // converting JS objects: true or false + // `options.separateArrayItems` whether array items are created as separate + // nodes when passed as an object value: true or false + // `options.noDoubleEncoding` whether existing html entities are encoded: + // true or false + // `options.stringify` a set of functions to use for converting values to + // strings + // `options.writer` the default XML writer to use for converting nodes to + // string. If the default writer is not set, the built-in XMLStringWriter + // will be used instead. + module.exports.create = function(name, xmldec, doctype, options) { + var doc, root; + if (name == null) { + throw new Error("Root element needs a name."); + } + options = assign({}, xmldec, doctype, options); + // create the document node + doc = new XMLDocument(options); + // add the root node + root = doc.element(name); + // prolog + if (!options.headless) { + doc.declaration(options); + if ((options.pubID != null) || (options.sysID != null)) { + doc.dtd(options); + } + } + return root; + }; + + // Creates a new document and returns the document node for + // chain-building the document tree + + // `options.keepNullNodes` whether nodes with null values will be kept + // or ignored: true or false + // `options.keepNullAttributes` whether attributes with null values will be + // kept or ignored: true or false + // `options.ignoreDecorators` whether decorator strings will be ignored when + // converting JS objects: true or false + // `options.separateArrayItems` whether array items are created as separate + // nodes when passed as an object value: true or false + // `options.noDoubleEncoding` whether existing html entities are encoded: + // true or false + // `options.stringify` a set of functions to use for converting values to + // strings + // `options.writer` the default XML writer to use for converting nodes to + // string. If the default writer is not set, the built-in XMLStringWriter + // will be used instead. + + // `onData` the function to be called when a new chunk of XML is output. The + // string containing the XML chunk is passed to `onData` as its single + // argument. + // `onEnd` the function to be called when the XML document is completed with + // `end`. `onEnd` does not receive any arguments. + module.exports.begin = function(options, onData, onEnd) { + if (isFunction(options)) { + [onData, onEnd] = [options, onData]; + options = {}; + } + if (onData) { + return new XMLDocumentCB(options, onData, onEnd); + } else { + return new XMLDocument(options); + } + }; + + module.exports.stringWriter = function(options) { + return new XMLStringWriter(options); + }; + + module.exports.streamWriter = function(stream, options) { + return new XMLStreamWriter(stream, options); + }; + + module.exports.implementation = new XMLDOMImplementation(); + + module.exports.nodeType = NodeType; + + module.exports.writerState = WriterState; + +}).call(this); diff --git a/node_modules/xmlbuilder/package.json b/node_modules/xmlbuilder/package.json new file mode 100644 index 0000000..8a06b18 --- /dev/null +++ b/node_modules/xmlbuilder/package.json @@ -0,0 +1,51 @@ +{ + "name": "xmlbuilder", + "version": "15.1.1", + "keywords": [ + "xml", + "xmlbuilder" + ], + "homepage": "http://github.com/oozcitak/xmlbuilder-js", + "description": "An XML builder for node.js", + "author": "Ozgur Ozcitak ", + "contributors": [], + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/oozcitak/xmlbuilder-js.git" + }, + "bugs": { + "url": "http://github.com/oozcitak/xmlbuilder-js/issues" + }, + "main": "./lib/index", + "typings": "./typings/index.d.ts", + "engines": { + "node": ">=8.0" + }, + "dependencies": {}, + "devDependencies": { + "coffee-coverage": "*", + "coffeescript": "2.4.1", + "coveralls": "*", + "istanbul": "*", + "mocha": "*", + "nyc": "*", + "xpath": "*", + "git-state": "*" + }, + "mocha": { + "require": [ + "coffeescript/register", + "coffee-coverage/register-istanbul", + "test/common.coffee" + ], + "recursive": true, + "ui": "tdd", + "reporter": "dot" + }, + "scripts": { + "prepublishOnly": "coffee -co lib src", + "test": "nyc mocha \"test/**/*.coffee\"", + "perf": "coffee ./perf/index.coffee" + } +} diff --git a/node_modules/xmlbuilder/perf/basic/escaping.coffee b/node_modules/xmlbuilder/perf/basic/escaping.coffee new file mode 100644 index 0000000..126825d --- /dev/null +++ b/node_modules/xmlbuilder/perf/basic/escaping.coffee @@ -0,0 +1,244 @@ +XMLStringifier = require('../../src/XMLStringifier') +stringify = new XMLStringifier() + +perf 'Text escaping', 100000, (run) -> + text = '&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r' + run () -> stringify.textEscape(text) + +perf 'Text escaping (no replacement)', 100000, (run) -> + text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque faucibus dui metus, quis mattis nibh sollicitudin ut.' + run () -> stringify.textEscape(text) + +perf 'Attribute value escaping', 100000, (run) -> + att = '&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r' + run () -> stringify.attEscape(att) + +perf 'Attribute value escaping (no replacement)', 100000, (run) -> + att = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque faucibus dui metus, quis mattis nibh sollicitudin ut.' + run () -> stringify.attEscape(att) + +perf 'Text escaping (long text)', 100000, (run) -> + text = """ +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque faucibus dui metus, quis mattis nibh sollicitudin ut. Suspendisse efficitur vestibulum purus ut luctus. Maecenas mollis purus sit amet enim sollicitudin dapibus. Aenean eget enim maximus, semper lacus eget, posuere sapien. Maecenas iaculis ipsum in facilisis commodo. Integer tincidunt, mi ut interdum euismod, massa ligula tincidunt sem, in dapibus ipsum risus quis mauris. Nullam maximus mi quis mollis rhoncus. Donec sollicitudin, neque fringilla feugiat vulputate, risus elit luctus nisi, in varius magna enim sed lorem. Phasellus elementum lacus in nisi pharetra, nec semper arcu sodales. Suspendisse ac condimentum magna, vel pretium massa. Duis vehicula neque sapien, id cursus nulla vestibulum at. Sed vehicula consequat eros, in hendrerit risus dictum quis. Nunc nec sodales leo. Suspendisse ut lorem in ipsum bibendum imperdiet sit amet a orci. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. + +Mauris elementum luctus nisi eget suscipit. Donec vel molestie est. Nam molestie libero ac magna varius mollis. Donec sem massa, luctus et metus sed, pellentesque porttitor lectus. Donec volutpat erat id efficitur tempus. Pellentesque mattis molestie erat nec cursus. Donec est arcu, hendrerit sit amet accumsan non, tincidunt dignissim massa. Suspendisse eget varius diam, faucibus porta odio. Vivamus auctor lectus orci, eget luctus dolor aliquet semper. Nam pulvinar tempus arcu, a semper lorem tincidunt quis. Nam dolor velit, dapibus sed augue ac, condimentum placerat ipsum. Suspendisse dapibus, sapien non ultricies convallis, sapien dolor viverra nibh, non hendrerit leo ipsum quis mi. Cras aliquet nec velit at scelerisque. Sed id commodo nunc, at dignissim nisi. + +In eget pretium nulla, vitae laoreet mauris. Mauris ac dui at purus dapibus iaculis et a neque. Pellentesque ut sapien nibh. Duis nulla erat, gravida eget dolor et, euismod blandit enim. Integer maximus facilisis purus, non posuere nulla commodo ut. Integer non facilisis mauris. Phasellus libero sapien, sollicitudin in massa vel, porttitor rhoncus lectus. Fusce interdum felis vel metus consequat, sed tempor urna imperdiet. Pellentesque sit amet ultricies nibh. In viverra tellus in sodales pellentesque. Nullam nisl leo, hendrerit vitae ipsum eget, ullamcorper dictum orci. Maecenas ac metus id lacus pellentesque vestibulum ac eget lacus. Nam congue eros sed dapibus auctor. Cras a purus ut urna viverra consequat. Fusce quis arcu condimentum, vestibulum eros eu, fermentum eros. + +In ut mauris at augue consectetur hendrerit at eget lorem. Fusce a lacus eget mi commodo molestie eu eu ante. Pellentesque congue feugiat varius. Suspendisse lacinia, mauris ac rutrum molestie, nulla ex aliquet urna, at vestibulum nunc turpis id justo. Suspendisse est leo, euismod consequat mollis id, varius eget velit. Suspendisse quis euismod orci. Vestibulum quis blandit risus. Donec eget sagittis mauris. Curabitur eu ligula nec ante suscipit congue. Fusce efficitur scelerisque varius. Integer pulvinar eros a volutpat bibendum. Vivamus vitae est id velit pharetra venenatis. In quis interdum mi. + +Pellentesque faucibus ultricies diam, id laoreet sem dignissim et. Ut elementum urna eget leo vestibulum, quis varius enim porttitor. Fusce vitae laoreet velit. Quisque at tempor quam, non mollis augue. Pellentesque pharetra consectetur erat id porttitor. Fusce feugiat erat purus. Morbi nec ultrices leo. Integer purus nunc, posuere ut nisi at, tempor ultricies tellus. Nullam eu accumsan magna. Cras vestibulum ipsum vitae dui commodo laoreet. Suspendisse non elementum metus, et ultricies dui. + +Mauris id lorem id mauris dictum iaculis. Phasellus molestie purus sit amet diam sollicitudin scelerisque. Suspendisse potenti. Vestibulum pharetra eu odio id ornare. Etiam fringilla, massa a finibus auctor, est leo posuere ante, vitae malesuada enim nisi condimentum nunc. Quisque blandit finibus molestie. Donec sed iaculis sapien. Vivamus suscipit nibh ut elit venenatis, lacinia eleifend nisi pulvinar. Nunc faucibus magna nec felis viverra dignissim. Sed maximus sem erat, vel accumsan erat dignissim ac. Pellentesque rutrum elit lectus, vel efficitur nisi tristique at. Vivamus non volutpat turpis, non fringilla nisl. Duis tincidunt faucibus massa a interdum. Ut ac nulla id nulla ornare dapibus. Interdum et malesuada fames ac ante ipsum primis in faucibus. + +In pretium neque vel mauris imperdiet, nec porta nunc tristique. Nullam id volutpat tortor. Nunc augue orci, vehicula in consectetur in, euismod sit amet lectus. Duis vehicula sagittis tortor, ut cursus ipsum finibus in. Sed vel dui eros. Fusce vehicula justo et lobortis suscipit. Nulla varius, arcu sit amet pulvinar consectetur, urna dolor suscipit nisi, feugiat interdum augue sem a justo. Proin vitae felis mattis, tempus justo ornare, pharetra sem. Nam dictum lorem et nisl lobortis mattis. Curabitur nibh nulla, pulvinar nec justo a, consectetur consectetur erat. Phasellus semper nisl est, et molestie nisl consectetur a. Maecenas ut placerat elit. Ut mattis tincidunt ex, semper hendrerit neque ultrices nec. Curabitur leo massa, dictum at libero eget, molestie luctus risus. In aliquet a erat sed accumsan. Vestibulum venenatis ante ligula, sit amet vestibulum est mollis vitae. + +Donec interdum augue eget feugiat venenatis. Mauris interdum tristique urna eu cursus. Donec sit amet diam volutpat massa posuere lacinia a quis lorem. Vivamus et condimentum eros. Sed eleifend dolor eros, laoreet lobortis risus elementum ac. Donec eget semper mauris. Etiam gravida arcu tortor, id egestas sapien vestibulum et. Curabitur tristique urna at nibh bibendum, et blandit turpis feugiat. Cras dignissim lectus rhoncus elit consectetur vestibulum. Ut finibus nisl in sapien mollis, eu faucibus nisi blandit. Ut velit felis, luctus condimentum quam vel, accumsan blandit sem. + +Nullam eros risus, ultrices vitae ipsum eget, cursus mollis turpis. Aenean sagittis nibh sit amet viverra lobortis. Quisque ut neque enim. In velit tortor, vulputate sit amet tristique eu, tempor eu tortor. Integer molestie ante vitae odio ultricies imperdiet. Nulla ut finibus lectus. Etiam ac metus malesuada, gravida neque sit amet, consequat nulla. Pellentesque eu arcu ut odio egestas vehicula sed a augue. Nulla egestas condimentum condimentum. Mauris ultrices viverra odio at egestas. Proin sem purus, sodales a tincidunt id, bibendum ut lacus. Aliquam eget laoreet lectus, eu varius sem. Mauris mattis vehicula sem, id egestas dui consectetur nec. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. + +Etiam quis dolor ac ante luctus volutpat. Donec aliquam gravida auctor. Nulla suscipit arcu ut molestie sodales. Nunc convallis enim accumsan, porttitor augue sit amet, gravida orci. Donec mollis urna ligula, a sodales quam vulputate non. Pellentesque in suscipit orci. Fusce scelerisque metus sit amet nisl hendrerit, et viverra purus luctus. Phasellus ac imperdiet lacus, sit amet convallis nisl. Mauris vel massa pellentesque, mattis augue sit amet, posuere lectus. Proin ac sagittis ipsum. Nam ligula purus, consequat sed odio at, suscipit pulvinar augue. Donec hendrerit tempus felis accumsan lobortis. + +Donec id neque cursus, accumsan dui sed, dapibus lectus. In tempus felis odio. Vivamus dignissim commodo ante, nec egestas urna sagittis ut. Integer maximus malesuada pharetra. Praesent dui mauris, malesuada ac tempus eget, cursus lobortis arcu. Sed nec consectetur purus. Maecenas eget pellentesque nisl. + +Vestibulum a neque turpis. Aenean porta fermentum maximus. In at leo dignissim, laoreet metus at, condimentum augue. Pellentesque vitae enim efficitur, tristique ex vitae, commodo mi. Donec vehicula euismod sapien, at pulvinar tellus molestie a. Etiam ut leo consectetur, condimentum sapien scelerisque, tempor metus. Maecenas nisi risus, varius eget viverra rhoncus, mattis vel massa. + +Proin tempor lacinia augue et varius. Mauris a velit metus. Quisque a lorem est. Sed ex sapien, rutrum sit amet vestibulum non, efficitur ut ante. Sed quis arcu mollis, tempor est non, ultricies metus. Sed at rutrum risus. Proin efficitur, tellus vitae consequat condimentum, metus purus facilisis libero, sit amet venenatis sapien elit eu libero. Praesent eget elit nec nisl egestas maximus ac ut odio. Pellentesque a ligula arcu. Nunc nibh arcu, efficitur ut feugiat sed, aliquam sit amet ipsum. Phasellus pharetra ut est sit amet dignissim. In consequat ultricies pretium. Proin euismod, ex id condimentum tempus, nulla tortor faucibus dolor, et efficitur velit arcu sit amet sem. Fusce finibus congue volutpat. Morbi ornare lectus ornare ex sodales, ut rhoncus neque consectetur. Aliquam lobortis scelerisque arcu sit amet elementum. + +Nullam quis diam in mi varius fringilla. Phasellus nibh quam, vehicula et pellentesque a, pellentesque eu tellus. Nam ac auctor erat. Quisque laoreet, libero non ullamcorper vestibulum, risus nisl consectetur diam, quis porta erat sapien vitae dui. Aenean efficitur, libero a tincidunt commodo, sapien purus blandit sem, vel auctor ante augue ac metus. Pellentesque eu mi urna. Sed condimentum, lacus sit amet varius feugiat, neque ex rhoncus enim, in fermentum turpis metus a libero. Praesent risus purus, malesuada nec accumsan in, tempor ac tellus. Etiam posuere lacinia feugiat. Praesent sagittis, nulla sed scelerisque lacinia, ipsum mi laoreet elit, ut lacinia quam dui semper nibh. + +In eget purus placerat, euismod justo at, feugiat eros. Aliquam eget tristique erat. Praesent vehicula neque vitae ex pretium, at sagittis erat tincidunt. Duis nec facilisis lorem. Sed pharetra ut tellus a feugiat. Suspendisse luctus placerat laoreet. Pellentesque eu tempus quam. Quisque eu magna a velit ultricies ullamcorper ac in erat. Mauris ex purus, pellentesque eget congue nec, bibendum at arcu. Nam eros ipsum, pellentesque a massa eget, porta efficitur mi. + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse tempor ex a posuere ornare. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque faucibus convallis lectus, et ullamcorper nisl pharetra ac. Vivamus eu tortor at dui tempor vulputate. Suspendisse at magna quis ipsum fringilla sodales in vel tellus. Phasellus tellus dolor, sollicitudin ac odio vitae, pellentesque ullamcorper justo. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque volutpat convallis sem. Ut varius, sapien vitae tincidunt malesuada, orci ante tempus nisl, eget iaculis turpis mauris ac orci. + +Aliquam pretium hendrerit ligula, ut euismod est imperdiet id. Fusce leo massa, blandit sit amet sagittis ut, elementum quis odio. Sed sit amet urna a sem elementum tincidunt id eu libero. In convallis nisi et tellus mollis mollis. Nullam id pretium lorem. Phasellus vel sodales arcu. Integer nec erat vitae justo accumsan porttitor accumsan a eros. Nunc mattis sagittis velit, ut tempor neque maximus in. Nulla vulputate purus non metus venenatis ultrices a non tellus. Praesent sodales nisi quis efficitur imperdiet. Donec a quam id risus interdum sollicitudin eget et orci. Donec hendrerit vel sem in condimentum. + +Praesent vel ultricies lorem. Vestibulum tempus malesuada elit a gravida. Proin cursus nisl urna, et finibus nisl porttitor sed. Donec tristique leo vel sem pharetra maximus. Praesent eleifend felis eu imperdiet semper. Etiam pretium mauris diam. Nam quam nisl, laoreet eget scelerisque accumsan, luctus quis dui. Integer at ornare odio. + +Sed id tellus velit. Pellentesque vitae condimentum justo. Vestibulum fringilla mauris nec laoreet tincidunt. Maecenas arcu ligula, euismod ut convallis ac, tincidunt id nibh. Aliquam eu sollicitudin velit. Nulla nec sapien leo. Nullam venenatis vel justo vestibulum accumsan. Pellentesque sapien magna, dignissim eget lorem in, condimentum efficitur nisi. Sed quis turpis pellentesque metus aliquam sollicitudin eget vel orci. Sed ac orci nec libero posuere aliquam at quis velit. Quisque at pellentesque quam. Quisque venenatis felis est, eu scelerisque dui elementum non. + +Duis venenatis eleifend commodo. In hac habitasse platea dictumst. Proin elementum, mi sed suscipit blandit, purus quam lacinia lectus, ut venenatis felis elit at nulla. Aenean dignissim lacus ac lectus lacinia convallis. Donec fringilla leo purus. Suspendisse potenti. Curabitur aliquam sodales dui ut imperdiet. + +Nam in ex id augue facilisis ornare non nec lorem. Nam dolor ex, facilisis nec dignissim vel, mollis eget ex. Aliquam consectetur turpis eget quam pellentesque, at pretium dolor volutpat. Cras sed velit quis dolor scelerisque rhoncus sit amet vel lectus. Sed lacinia arcu convallis mattis aliquet. Proin faucibus vulputate varius. Nullam vel dictum libero. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla facilisi. Aliquam mauris ex, faucibus nec tempor quis, placerat maximus augue. Suspendisse commodo pretium sem quis laoreet. Vivamus porta, urna eu tincidunt semper, purus sem tempor sem, ut condimentum diam nibh vel mi. Donec sit amet tellus sit amet mauris vestibulum feugiat. Aliquam in orci quis est feugiat porttitor. Aliquam nec metus ac urna viverra tincidunt. + +Nunc ac orci cursus, faucibus justo nec, lobortis tortor. Nulla tincidunt scelerisque risus, at blandit arcu elementum sed. Maecenas non justo dapibus, tincidunt nibh in, porta neque. Sed non mi id leo vestibulum iaculis. Nam ultricies odio eget arcu vehicula tempus. Suspendisse maximus consectetur arcu, id dapibus lacus mollis et. Fusce nec vulputate nulla. Nam dictum eget sapien id interdum. Duis mi sem, gravida nec dolor vel, elementum facilisis tellus. Integer vel accumsan diam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed in commodo ex. Praesent commodo porttitor ipsum. Vestibulum volutpat diam at tellus feugiat, id sodales magna bibendum. Mauris odio eros, rutrum at scelerisque eget, porta sed turpis. Suspendisse porta dictum cursus. + +Mauris accumsan finibus mi sit amet auctor. Aliquam erat volutpat. Vestibulum at euismod sapien, euismod tincidunt lectus. Mauris aliquet sapien at erat vestibulum, a vestibulum dui bibendum. Etiam vel vulputate justo. Nam vitae ultrices nisl, eu dapibus ex. Quisque volutpat nibh vitae semper tristique. Mauris in nibh lectus. Maecenas elit leo, ultricies quis bibendum sed, rhoncus et neque. Sed elementum nec dui id lobortis. Vestibulum sollicitudin arcu nulla, sit amet lobortis urna ultrices a. Cras fermentum dolor id faucibus pretium. Pellentesque congue quam metus, quis consequat leo sollicitudin vitae. + +Integer congue, neque a scelerisque varius, purus nibh fringilla nunc, sit amet pretium felis sapien vel orci. Donec mattis ac orci in viverra. Suspendisse a justo sollicitudin lacus efficitur ullamcorper. Mauris faucibus nisl quis dolor volutpat aliquam. Aenean venenatis, odio et rhoncus lobortis, risus ligula finibus massa, non dignissim augue nisl vel arcu. Nullam fringilla odio at libero scelerisque, vitae placerat nisi fringilla. Etiam quis urna turpis. Quisque quis leo ante. Duis nec elit massa. Sed porttitor, nulla id efficitur blandit, purus ligula vulputate lectus, quis molestie metus orci ac tellus. Donec sapien massa, suscipit eu tristique ac, posuere sed lorem. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam erat volutpat. Duis bibendum erat eget felis tempor, eget imperdiet nibh vestibulum. In hac habitasse platea dictumst. Quisque vehicula pulvinar turpis, ac dictum risus auctor varius. + +Praesent ac ex vestibulum, dapibus lacus in, malesuada diam. Sed in turpis in justo venenatis pharetra. Fusce sed lobortis nisl. Phasellus faucibus magna ante, malesuada placerat justo faucibus tempus. Phasellus hendrerit fermentum felis. Proin malesuada, urna vel tincidunt pharetra, eros ante bibendum sem, nec viverra nunc arcu at mauris. Sed et lorem pharetra, feugiat tortor vitae, rutrum lacus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mauris leo, condimentum at risus eget, aliquam consequat mauris. Mauris id auctor purus. + +Aenean augue mauris, cursus quis elit eget, molestie pharetra sem. Mauris congue felis ut nibh facilisis, ut pharetra arcu pharetra. Curabitur semper mattis orci eu dictum. Phasellus hendrerit scelerisque dignissim. Sed aliquet nunc scelerisque, facilisis nulla at, posuere lorem. Maecenas blandit, lectus nec varius bibendum, nibh risus posuere turpis, id pretium justo elit vitae ligula. Sed risus ante, congue quis libero consequat, laoreet convallis diam. + +Aenean sagittis ex vel semper ullamcorper. Donec mattis, ipsum tincidunt aliquet vehicula, elit tellus porta mi, a convallis quam orci ac lectus. Proin aliquam nulla in erat mattis placerat. Aliquam ligula sem, egestas ac turpis vitae, facilisis iaculis mauris. Donec ac egestas urna, ac iaculis orci. Integer urna magna, eleifend sed nunc vitae, commodo lobortis massa. Aenean ultrices pulvinar dui, non blandit lorem pretium quis. Praesent in molestie purus, vestibulum interdum quam. Pellentesque auctor erat non mauris fringilla eleifend. + +Etiam blandit vel leo nec pulvinar. Phasellus elementum facilisis mi et egestas. Praesent finibus, elit vel venenatis sodales, turpis nibh tincidunt turpis, eu venenatis urna tortor at massa. Proin iaculis ipsum ut elit maximus tincidunt. Suspendisse justo turpis, sollicitudin ut eros quis, dictum placerat nibh. Sed mattis ornare pulvinar. Cras lacus purus, interdum vitae commodo sollicitudin, suscipit eu quam. Mauris luctus laoreet metus at posuere. Etiam faucibus diam quis purus vulputate, nec blandit lorem bibendum. + +Aliquam nisl neque, vulputate eu arcu id, elementum dictum sapien. Aliquam aliquam, mauris eget vestibulum accumsan, metus tellus vulputate urna, nec volutpat felis turpis ac nulla. Morbi pretium magna bibendum eros ultricies lobortis. Vestibulum euismod vitae nibh in posuere. Vivamus in iaculis mi. Pellentesque iaculis ex nec tellus pulvinar interdum. Integer a tincidunt risus, eu faucibus mi. Vivamus posuere sapien eu orci scelerisque rutrum at eu leo. Nullam consectetur est eu justo congue commodo. Vestibulum ac finibus velit. Donec faucibus nulla at risus rhoncus, a vulputate magna pulvinar. Aliquam condimentum rhoncus lacus sed hendrerit. + +Morbi non hendrerit nisl, eu fringilla erat. Praesent ac dolor sit amet libero tempus porttitor. Cras vel sem elementum, venenatis ipsum vel, molestie tellus. Aliquam erat volutpat. Maecenas malesuada urna nec diam sodales pharetra. Aliquam non lobortis metus. Donec eleifend mollis eros in condimentum. Suspendisse sagittis consequat justo, vitae tincidunt orci luctus vel. Ut lobortis tincidunt libero. Sed dignissim lorem sit amet nibh aliquam, pharetra pulvinar justo consequat. Suspendisse sed dictum massa. Ut fermentum, dolor a fringilla bibendum, lorem ligula scelerisque turpis, in porta justo neque non lectus. Suspendisse pellentesque risus sit amet ligula pretium condimentum. Fusce odio tortor, pulvinar in dapibus nec, pharetra eget nisi. Suspendisse luctus eros eget mauris pretium blandit. + +Nam vel fermentum nulla. Sed tincidunt tellus id mattis dapibus. Quisque ac congue libero, nec elementum nulla. Phasellus quam eros, congue eu lacinia a, interdum et eros. Aenean suscipit risus interdum mauris porttitor, vehicula auctor tellus molestie. Donec efficitur nisi eget ex interdum sollicitudin. Nunc ultricies maximus quam, at pulvinar eros volutpat quis. Nam venenatis mauris enim, sed malesuada tortor eleifend sit amet. Cras imperdiet convallis viverra. Proin purus nulla, bibendum in aliquam quis, sollicitudin a risus. Proin vehicula tincidunt tortor quis lacinia. Praesent tristique odio sed orci consequat, ut pulvinar mauris semper. Mauris felis mi, ultricies a dolor id, viverra laoreet orci. Nam ex mi, semper nec imperdiet sed, posuere et eros. + +Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec scelerisque ipsum sed libero tempor, in vulputate ante sodales. Sed vehicula nulla non ante blandit, quis porttitor diam auctor. Nulla sodales risus ut dui vulputate, nec elementum sem volutpat. Quisque id blandit quam. Proin interdum quis lacus ac suscipit. Etiam a scelerisque sapien. Praesent cursus, mi eget dapibus hendrerit, nibh eros elementum lacus, sit amet congue dui nunc at dui. Phasellus tristique nulla ut tincidunt faucibus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse efficitur congue purus, a viverra sapien tristique vel. + +Vestibulum elementum pellentesque turpis. Phasellus id quam sit amet ex sodales malesuada. Morbi iaculis quis nibh vitae finibus. Nullam vitae luctus nisl, ac varius leo. Fusce sed quam eu enim volutpat blandit. Etiam ornare aliquam mi, eget porttitor magna euismod non. Curabitur porta vel metus ut mollis. + +Aenean sit amet sagittis lacus. Quisque in dui commodo, rutrum massa tincidunt, hendrerit mauris. Maecenas sit amet nisl facilisis, interdum eros rhoncus, malesuada nisl. Aliquam condimentum erat dui, eget dignissim magna volutpat vitae. Mauris porttitor, risus ut auctor porttitor, sem nisl interdum nisi, ac tempus est enim in tortor. Sed rhoncus magna ac feugiat pharetra. Nulla scelerisque quis neque ut porttitor. Ut lacinia in ipsum sit amet lobortis. Aliquam eu justo vel leo facilisis tristique. Pellentesque cursus, lacus a rhoncus auctor, erat velit vehicula diam, et fermentum erat mauris fermentum turpis. Donec quam sapien, laoreet sodales sagittis ac, sodales vitae lectus. Donec vitae lorem rutrum, lobortis libero maximus, condimentum sapien. Pellentesque mi lorem, rhoncus vel lacinia a, venenatis et velit. + +Curabitur malesuada ante vel maximus luctus. Etiam dui lectus, condimentum eget lobortis eget, eleifend pellentesque ligula. Nam eu pharetra urna, sit amet facilisis turpis. Mauris tincidunt vestibulum turpis nec suscipit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Pellentesque egestas commodo finibus. Donec pellentesque nec libero et imperdiet. Cras cursus purus ut libero pretium vulputate. Mauris non arcu purus. Donec sollicitudin dignissim massa ac tincidunt. Donec non consectetur turpis, et venenatis dui. + +Nam mattis urna dolor, a varius sem tempor a. Vivamus porttitor dignissim metus vel ultrices. Integer ac justo vel nisl consequat efficitur. Maecenas sit amet hendrerit elit. Suspendisse lobortis semper mauris id convallis. Duis nibh dui, lacinia a turpis sed, interdum aliquam ex. Praesent tempor rhoncus nibh vel dictum. Quisque feugiat mi sit amet nunc fermentum pellentesque. Ut porta lacinia erat eu pulvinar. Nulla vestibulum fermentum felis, eu ultricies lectus. Ut eget lobortis sapien. Aenean consectetur in nisl interdum mattis. Sed a ipsum pharetra, congue augue a, accumsan ex. Quisque luctus sapien non tincidunt vulputate. + +Aenean auctor consectetur urna et rhoncus. Vivamus mattis tortor at massa porta, in auctor quam porttitor. Nulla facilisi. Sed auctor ipsum tortor, quis hendrerit risus convallis eget. Vivamus a mollis nulla, at fringilla risus. In a cursus dui, nec vehicula elit. Donec in sodales ante, quis gravida est. Sed interdum mi non ornare lacinia. Cras placerat cursus dolor nec euismod. Nulla vel velit quis nibh aliquam eleifend. Cras mattis vitae erat nec gravida. Vestibulum luctus sagittis nibh, a pretium neque dictum eget. Quisque vitae consequat dui. Donec libero eros, pharetra sit amet sapien id, euismod gravida mi. + +Duis tristique nisi id urna feugiat, sed aliquet nulla imperdiet. Ut quis felis finibus, lobortis nunc eu, sodales risus. Fusce at euismod risus. Nunc pulvinar libero volutpat, mattis eros facilisis, mollis nibh. Maecenas augue nunc, mollis sit amet volutpat et, interdum eu augue. Etiam porttitor tortor sem, vitae hendrerit nulla lobortis ut. In non sollicitudin eros. Cras bibendum lorem id odio sollicitudin euismod. Aliquam ullamcorper purus at turpis accumsan blandit. Donec at interdum arcu. Nam fermentum est lectus, vel tincidunt purus sollicitudin a. Aliquam vel orci massa. + +Fusce fringilla et justo et interdum. Fusce molestie, tellus vitae elementum lobortis, enim augue condimentum nulla, a semper enim quam in dui. Vestibulum a pharetra felis. Proin eu sollicitudin leo. In vestibulum rhoncus augue, non ultrices turpis. Donec maximus neque semper tellus condimentum, in aliquam dui posuere. Sed ultrices nisl purus, quis sollicitudin eros laoreet quis. Praesent nunc nisl, varius at suscipit sed, tristique at neque. + +Quisque aliquam tincidunt augue vitae rhoncus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Proin eu luctus erat. Nullam auctor, purus a eleifend efficitur, metus ligula accumsan quam, quis bibendum enim lacus quis neque. Maecenas lacinia ipsum molestie felis accumsan, in dignissim purus aliquet. Nunc turpis massa, ultricies in lacinia ut, luctus ut felis. Morbi magna nisi, sodales in arcu sit amet, efficitur mattis velit. Ut scelerisque enim nibh, vel pretium urna varius vel. Cras vitae accumsan nunc, ut iaculis tortor. Nam vitae laoreet orci, sit amet rutrum mi. Nunc blandit purus eu hendrerit tempor. Vestibulum tincidunt pharetra purus ut sodales. Lorem ipsum dolor sit amet, consectetur adipiscing elit. + +Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla sed laoreet urna, sit amet commodo erat. Fusce euismod justo erat, et placerat odio accumsan finibus. Proin pellentesque ligula ut nibh condimentum, sed ornare justo faucibus. Fusce consectetur sapien nec dui varius, vel pharetra felis molestie. Duis accumsan odio metus, ut varius orci finibus nec. Sed non ipsum vitae est aliquet mollis. Pellentesque facilisis feugiat suscipit. + +Mauris ut enim sit amet metus bibendum finibus. Suspendisse iaculis, tellus maximus placerat elementum, libero turpis fermentum dolor, ut lacinia sapien ipsum a nulla. Etiam sollicitudin dictum dolor, ac congue sem pulvinar nec. Ut egestas urna non neque volutpat egestas. Integer porta vel orci volutpat tincidunt. In egestas fringilla ipsum ac pharetra. Fusce justo dui, dignissim sed leo at, tincidunt finibus magna. Pellentesque vel nunc risus. Praesent lacinia blandit convallis. Cras eget magna metus. Maecenas fringilla dolor eu quam dictum consequat. Donec pellentesque eleifend velit, a commodo dui faucibus eu. Phasellus pretium nulla ipsum, et interdum magna interdum et. Mauris a sem ullamcorper, consectetur quam accumsan, porttitor eros. + +Praesent facilisis, ipsum ac tincidunt auctor, tellus ipsum convallis magna, vel maximus sem lorem et tortor. Sed elit diam, faucibus sed turpis eget, commodo facilisis nunc. Vestibulum vitae arcu tristique, varius libero molestie, sollicitudin mi. In tincidunt nisl in eros imperdiet faucibus. Cras ex ipsum, vehicula eget neque eget, viverra pellentesque erat. Suspendisse vitae tristique dolor. Nulla ornare imperdiet metus id mollis. Fusce ligula ex, aliquam sed purus quis, venenatis volutpat lectus. Sed iaculis ante sit amet massa consequat interdum. Ut feugiat risus sit amet commodo euismod. Sed tristique quam sit amet lacinia cursus. Donec faucibus, erat a dapibus rhoncus, orci est interdum ex, sit amet semper massa quam et lectus. + +Suspendisse mollis turpis aliquam felis efficitur, eu ultrices tellus suscipit. Aenean at congue erat, vel ultricies eros. Quisque hendrerit arcu ut est aliquet, et vehicula lectus ullamcorper. Pellentesque posuere neque nec auctor scelerisque. Phasellus rhoncus odio ac nisl ornare condimentum. Nam nec arcu porttitor tellus faucibus malesuada id a est. Vivamus id facilisis ante. Proin quis risus ipsum. In sed nibh at nisl tempus interdum. Ut sit amet malesuada nisl, id pharetra metus. Nulla lorem velit, euismod nec dictum at, porttitor ac erat. Aliquam est leo, elementum nec ultricies nec, interdum sed libero. Quisque mattis placerat scelerisque. Praesent vulputate sit amet felis non tristique. + +Phasellus odio ex, ultricies et tincidunt sit amet, auctor id felis. Fusce facilisis nibh risus, eget placerat nunc pellentesque vel. Morbi cursus metus eu arcu viverra rutrum. Nulla eget dolor blandit, pulvinar sem aliquet, hendrerit purus. Fusce sodales venenatis posuere. Cras egestas placerat odio non scelerisque. Praesent tincidunt maximus semper. Vivamus eget libero massa. Cras auctor orci sed nibh sagittis ultrices. Curabitur leo lacus, suscipit ac pharetra vel, euismod eu turpis. Aenean quis justo efficitur, mattis nisl sed, mollis lacus. Integer feugiat non metus vitae faucibus. Morbi sem massa, pretium id risus a, congue volutpat mi. Vivamus lacinia enim lorem, id malesuada ante vehicula non. Praesent ac urna quis justo malesuada euismod. + +Integer sed ligula id purus dictum tempus eu non ex. Phasellus tincidunt lectus in imperdiet porttitor. Integer ligula dolor, porttitor et congue vitae, elementum eget sem. Proin a libero in enim efficitur mollis. Proin molestie metus dolor, in fermentum massa condimentum at. Cras eget auctor odio, a luctus sapien. Nulla in hendrerit leo, sed venenatis augue. Proin mollis vestibulum magna. Nulla dapibus lacus nec condimentum maximus. Phasellus id efficitur enim. Vivamus molestie mauris at condimentum elementum. Maecenas ultrices mauris quis tincidunt viverra. Ut eget ultricies ligula. Nulla id fermentum nisl, in ultrices velit. + +Nunc blandit tellus sed est auctor condimentum. Integer fringilla aliquam libero, id sagittis ipsum lacinia sit amet. Donec sit amet nunc felis. Vestibulum at commodo arcu, a malesuada est. Aenean ultrices, mauris in pellentesque posuere, mi orci fermentum justo, vitae rutrum neque erat a nisi. In sed urna quis sem egestas faucibus ut quis ipsum. Quisque porta lectus sit amet urna ultricies iaculis. + +Praesent ultrices odio nisl, eu consequat dolor sollicitudin nec. Suspendisse dignissim lobortis nulla nec molestie. Duis in diam sed est dignissim faucibus vitae in metus. Phasellus lacinia urna eros, vitae vulputate sem fermentum eget. Suspendisse et efficitur dolor. Mauris faucibus sodales felis eu luctus. Cras non mattis lacus. Proin in lobortis sapien. Nulla at augue sed est congue sollicitudin. + +Nunc nisi lorem, dapibus id tincidunt quis, sollicitudin sit amet justo. In mollis orci pretium aliquam fermentum. Fusce sodales mi eget tellus posuere ullamcorper. Sed varius sagittis elit, in feugiat odio maximus sed. Cras eleifend massa sit amet mi suscipit, vel laoreet leo pretium. Quisque neque erat, mollis eget elementum non, blandit in lectus. Sed dignissim felis ac felis convallis elementum molestie id lectus. Nullam fermentum lorem mi, in placerat quam mollis vitae. Pellentesque ultrices, nibh at sagittis molestie, augue mauris bibendum dui, ut ultricies lorem magna eu massa. Quisque quis purus eu nisi rhoncus tempor. Donec eget fringilla massa. Vivamus sed varius elit. Aenean egestas tellus eget magna dapibus hendrerit. Nunc vel leo eu purus tempus mollis. + +Praesent sagittis eget lectus non vestibulum. Fusce id elit nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec id malesuada justo, non ornare felis. Nulla ultricies lorem ex, et accumsan ex volutpat sodales. Pellentesque venenatis neque in hendrerit blandit. Donec dapibus est fermentum lacus fringilla, ut volutpat tellus consectetur. Maecenas id semper tortor. In pellentesque aliquet elit, non vulputate augue mollis fermentum. Nullam posuere eget elit a placerat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. + +Phasellus vestibulum tristique quam a faucibus. Proin sit amet sem et leo posuere efficitur vitae et ante. Nullam congue nisl augue, in ultricies orci tempor quis. Aliquam erat volutpat. In luctus, sapien at venenatis fermentum, lorem urna ultrices elit, ac volutpat metus purus eu turpis. Phasellus semper cursus mi, vitae tempor est accumsan at. Integer accumsan nec augue vitae viverra. Sed tempus cursus enim non dapibus. In commodo neque in ultricies semper. Proin auctor lacinia eros, ut tempor lectus pulvinar quis. Ut fermentum vulputate pellentesque. Duis tempor ante quis metus consectetur maximus. Curabitur a tincidunt enim. + +Vestibulum dictum, urna a fringilla imperdiet, tortor arcu mattis odio, et efficitur dui neque ac mauris. Vestibulum auctor risus lacus. Integer elementum erat nisl, id vehicula enim mattis in. Vestibulum consequat neque ante, in sodales magna pulvinar in. Vivamus interdum eros non magna aliquam tristique. Ut aliquam congue ante in gravida. Sed eu turpis sollicitudin, suscipit ligula id, commodo tellus. Aliquam eu sapien vitae augue gravida egestas nec sit amet turpis. Curabitur vulputate vulputate dui, et facilisis lectus tincidunt nec. Integer tristique vitae quam condimentum maximus. Ut ultricies convallis nisl eu elementum. + +Curabitur non nisi lectus. Aliquam finibus lorem id dui molestie, sed ullamcorper quam lobortis. Maecenas in gravida urna. Pellentesque consequat risus vel nibh tempus facilisis. Etiam auctor lacinia lacus vitae vulputate. Etiam bibendum arcu at ipsum elementum, id sodales nunc convallis. Phasellus elementum mi non sapien blandit suscipit. Integer accumsan et justo nec mattis. Vestibulum quis erat viverra, condimentum enim eget, auctor tortor. Nunc ac mauris sit amet urna pellentesque malesuada. Fusce urna justo, finibus eget blandit eget, volutpat eu nisi. In nisi nunc, sodales sit amet tempor eu, feugiat feugiat tellus. Nulla felis purus, gravida eu iaculis in, interdum id purus. In hac habitasse platea dictumst. Aenean consequat, quam tincidunt sodales lacinia, ex dui faucibus massa, ut porta dolor justo et mi. + +Donec a massa porta, vehicula diam et, pulvinar tortor. Duis tincidunt, nibh ut pharetra hendrerit, est orci egestas urna, et sollicitudin massa lacus aliquam ex. Curabitur in quam sed elit scelerisque pretium nec rhoncus nulla. In a ligula. + """ + + run () -> stringify.textEscape(text) + +perf 'Attribute value escaping (long value)', 100000, (run) -> + text = """ +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque faucibus dui metus, quis mattis nibh sollicitudin ut. Suspendisse efficitur vestibulum purus ut luctus. Maecenas mollis purus sit amet enim sollicitudin dapibus. Aenean eget enim maximus, semper lacus eget, posuere sapien. Maecenas iaculis ipsum in facilisis commodo. Integer tincidunt, mi ut interdum euismod, massa ligula tincidunt sem, in dapibus ipsum risus quis mauris. Nullam maximus mi quis mollis rhoncus. Donec sollicitudin, neque fringilla feugiat vulputate, risus elit luctus nisi, in varius magna enim sed lorem. Phasellus elementum lacus in nisi pharetra, nec semper arcu sodales. Suspendisse ac condimentum magna, vel pretium massa. Duis vehicula neque sapien, id cursus nulla vestibulum at. Sed vehicula consequat eros, in hendrerit risus dictum quis. Nunc nec sodales leo. Suspendisse ut lorem in ipsum bibendum imperdiet sit amet a orci. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. + +Mauris elementum luctus nisi eget suscipit. Donec vel molestie est. Nam molestie libero ac magna varius mollis. Donec sem massa, luctus et metus sed, pellentesque porttitor lectus. Donec volutpat erat id efficitur tempus. Pellentesque mattis molestie erat nec cursus. Donec est arcu, hendrerit sit amet accumsan non, tincidunt dignissim massa. Suspendisse eget varius diam, faucibus porta odio. Vivamus auctor lectus orci, eget luctus dolor aliquet semper. Nam pulvinar tempus arcu, a semper lorem tincidunt quis. Nam dolor velit, dapibus sed augue ac, condimentum placerat ipsum. Suspendisse dapibus, sapien non ultricies convallis, sapien dolor viverra nibh, non hendrerit leo ipsum quis mi. Cras aliquet nec velit at scelerisque. Sed id commodo nunc, at dignissim nisi. + +In eget pretium nulla, vitae laoreet mauris. Mauris ac dui at purus dapibus iaculis et a neque. Pellentesque ut sapien nibh. Duis nulla erat, gravida eget dolor et, euismod blandit enim. Integer maximus facilisis purus, non posuere nulla commodo ut. Integer non facilisis mauris. Phasellus libero sapien, sollicitudin in massa vel, porttitor rhoncus lectus. Fusce interdum felis vel metus consequat, sed tempor urna imperdiet. Pellentesque sit amet ultricies nibh. In viverra tellus in sodales pellentesque. Nullam nisl leo, hendrerit vitae ipsum eget, ullamcorper dictum orci. Maecenas ac metus id lacus pellentesque vestibulum ac eget lacus. Nam congue eros sed dapibus auctor. Cras a purus ut urna viverra consequat. Fusce quis arcu condimentum, vestibulum eros eu, fermentum eros. + +In ut mauris at augue consectetur hendrerit at eget lorem. Fusce a lacus eget mi commodo molestie eu eu ante. Pellentesque congue feugiat varius. Suspendisse lacinia, mauris ac rutrum molestie, nulla ex aliquet urna, at vestibulum nunc turpis id justo. Suspendisse est leo, euismod consequat mollis id, varius eget velit. Suspendisse quis euismod orci. Vestibulum quis blandit risus. Donec eget sagittis mauris. Curabitur eu ligula nec ante suscipit congue. Fusce efficitur scelerisque varius. Integer pulvinar eros a volutpat bibendum. Vivamus vitae est id velit pharetra venenatis. In quis interdum mi. + +Pellentesque faucibus ultricies diam, id laoreet sem dignissim et. Ut elementum urna eget leo vestibulum, quis varius enim porttitor. Fusce vitae laoreet velit. Quisque at tempor quam, non mollis augue. Pellentesque pharetra consectetur erat id porttitor. Fusce feugiat erat purus. Morbi nec ultrices leo. Integer purus nunc, posuere ut nisi at, tempor ultricies tellus. Nullam eu accumsan magna. Cras vestibulum ipsum vitae dui commodo laoreet. Suspendisse non elementum metus, et ultricies dui. + +Mauris id lorem id mauris dictum iaculis. Phasellus molestie purus sit amet diam sollicitudin scelerisque. Suspendisse potenti. Vestibulum pharetra eu odio id ornare. Etiam fringilla, massa a finibus auctor, est leo posuere ante, vitae malesuada enim nisi condimentum nunc. Quisque blandit finibus molestie. Donec sed iaculis sapien. Vivamus suscipit nibh ut elit venenatis, lacinia eleifend nisi pulvinar. Nunc faucibus magna nec felis viverra dignissim. Sed maximus sem erat, vel accumsan erat dignissim ac. Pellentesque rutrum elit lectus, vel efficitur nisi tristique at. Vivamus non volutpat turpis, non fringilla nisl. Duis tincidunt faucibus massa a interdum. Ut ac nulla id nulla ornare dapibus. Interdum et malesuada fames ac ante ipsum primis in faucibus. + +In pretium neque vel mauris imperdiet, nec porta nunc tristique. Nullam id volutpat tortor. Nunc augue orci, vehicula in consectetur in, euismod sit amet lectus. Duis vehicula sagittis tortor, ut cursus ipsum finibus in. Sed vel dui eros. Fusce vehicula justo et lobortis suscipit. Nulla varius, arcu sit amet pulvinar consectetur, urna dolor suscipit nisi, feugiat interdum augue sem a justo. Proin vitae felis mattis, tempus justo ornare, pharetra sem. Nam dictum lorem et nisl lobortis mattis. Curabitur nibh nulla, pulvinar nec justo a, consectetur consectetur erat. Phasellus semper nisl est, et molestie nisl consectetur a. Maecenas ut placerat elit. Ut mattis tincidunt ex, semper hendrerit neque ultrices nec. Curabitur leo massa, dictum at libero eget, molestie luctus risus. In aliquet a erat sed accumsan. Vestibulum venenatis ante ligula, sit amet vestibulum est mollis vitae. + +Donec interdum augue eget feugiat venenatis. Mauris interdum tristique urna eu cursus. Donec sit amet diam volutpat massa posuere lacinia a quis lorem. Vivamus et condimentum eros. Sed eleifend dolor eros, laoreet lobortis risus elementum ac. Donec eget semper mauris. Etiam gravida arcu tortor, id egestas sapien vestibulum et. Curabitur tristique urna at nibh bibendum, et blandit turpis feugiat. Cras dignissim lectus rhoncus elit consectetur vestibulum. Ut finibus nisl in sapien mollis, eu faucibus nisi blandit. Ut velit felis, luctus condimentum quam vel, accumsan blandit sem. + +Nullam eros risus, ultrices vitae ipsum eget, cursus mollis turpis. Aenean sagittis nibh sit amet viverra lobortis. Quisque ut neque enim. In velit tortor, vulputate sit amet tristique eu, tempor eu tortor. Integer molestie ante vitae odio ultricies imperdiet. Nulla ut finibus lectus. Etiam ac metus malesuada, gravida neque sit amet, consequat nulla. Pellentesque eu arcu ut odio egestas vehicula sed a augue. Nulla egestas condimentum condimentum. Mauris ultrices viverra odio at egestas. Proin sem purus, sodales a tincidunt id, bibendum ut lacus. Aliquam eget laoreet lectus, eu varius sem. Mauris mattis vehicula sem, id egestas dui consectetur nec. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. + +Etiam quis dolor ac ante luctus volutpat. Donec aliquam gravida auctor. Nulla suscipit arcu ut molestie sodales. Nunc convallis enim accumsan, porttitor augue sit amet, gravida orci. Donec mollis urna ligula, a sodales quam vulputate non. Pellentesque in suscipit orci. Fusce scelerisque metus sit amet nisl hendrerit, et viverra purus luctus. Phasellus ac imperdiet lacus, sit amet convallis nisl. Mauris vel massa pellentesque, mattis augue sit amet, posuere lectus. Proin ac sagittis ipsum. Nam ligula purus, consequat sed odio at, suscipit pulvinar augue. Donec hendrerit tempus felis accumsan lobortis. + +Donec id neque cursus, accumsan dui sed, dapibus lectus. In tempus felis odio. Vivamus dignissim commodo ante, nec egestas urna sagittis ut. Integer maximus malesuada pharetra. Praesent dui mauris, malesuada ac tempus eget, cursus lobortis arcu. Sed nec consectetur purus. Maecenas eget pellentesque nisl. + +Vestibulum a neque turpis. Aenean porta fermentum maximus. In at leo dignissim, laoreet metus at, condimentum augue. Pellentesque vitae enim efficitur, tristique ex vitae, commodo mi. Donec vehicula euismod sapien, at pulvinar tellus molestie a. Etiam ut leo consectetur, condimentum sapien scelerisque, tempor metus. Maecenas nisi risus, varius eget viverra rhoncus, mattis vel massa. + +Proin tempor lacinia augue et varius. Mauris a velit metus. Quisque a lorem est. Sed ex sapien, rutrum sit amet vestibulum non, efficitur ut ante. Sed quis arcu mollis, tempor est non, ultricies metus. Sed at rutrum risus. Proin efficitur, tellus vitae consequat condimentum, metus purus facilisis libero, sit amet venenatis sapien elit eu libero. Praesent eget elit nec nisl egestas maximus ac ut odio. Pellentesque a ligula arcu. Nunc nibh arcu, efficitur ut feugiat sed, aliquam sit amet ipsum. Phasellus pharetra ut est sit amet dignissim. In consequat ultricies pretium. Proin euismod, ex id condimentum tempus, nulla tortor faucibus dolor, et efficitur velit arcu sit amet sem. Fusce finibus congue volutpat. Morbi ornare lectus ornare ex sodales, ut rhoncus neque consectetur. Aliquam lobortis scelerisque arcu sit amet elementum. + +Nullam quis diam in mi varius fringilla. Phasellus nibh quam, vehicula et pellentesque a, pellentesque eu tellus. Nam ac auctor erat. Quisque laoreet, libero non ullamcorper vestibulum, risus nisl consectetur diam, quis porta erat sapien vitae dui. Aenean efficitur, libero a tincidunt commodo, sapien purus blandit sem, vel auctor ante augue ac metus. Pellentesque eu mi urna. Sed condimentum, lacus sit amet varius feugiat, neque ex rhoncus enim, in fermentum turpis metus a libero. Praesent risus purus, malesuada nec accumsan in, tempor ac tellus. Etiam posuere lacinia feugiat. Praesent sagittis, nulla sed scelerisque lacinia, ipsum mi laoreet elit, ut lacinia quam dui semper nibh. + +In eget purus placerat, euismod justo at, feugiat eros. Aliquam eget tristique erat. Praesent vehicula neque vitae ex pretium, at sagittis erat tincidunt. Duis nec facilisis lorem. Sed pharetra ut tellus a feugiat. Suspendisse luctus placerat laoreet. Pellentesque eu tempus quam. Quisque eu magna a velit ultricies ullamcorper ac in erat. Mauris ex purus, pellentesque eget congue nec, bibendum at arcu. Nam eros ipsum, pellentesque a massa eget, porta efficitur mi. + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse tempor ex a posuere ornare. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque faucibus convallis lectus, et ullamcorper nisl pharetra ac. Vivamus eu tortor at dui tempor vulputate. Suspendisse at magna quis ipsum fringilla sodales in vel tellus. Phasellus tellus dolor, sollicitudin ac odio vitae, pellentesque ullamcorper justo. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque volutpat convallis sem. Ut varius, sapien vitae tincidunt malesuada, orci ante tempus nisl, eget iaculis turpis mauris ac orci. + +Aliquam pretium hendrerit ligula, ut euismod est imperdiet id. Fusce leo massa, blandit sit amet sagittis ut, elementum quis odio. Sed sit amet urna a sem elementum tincidunt id eu libero. In convallis nisi et tellus mollis mollis. Nullam id pretium lorem. Phasellus vel sodales arcu. Integer nec erat vitae justo accumsan porttitor accumsan a eros. Nunc mattis sagittis velit, ut tempor neque maximus in. Nulla vulputate purus non metus venenatis ultrices a non tellus. Praesent sodales nisi quis efficitur imperdiet. Donec a quam id risus interdum sollicitudin eget et orci. Donec hendrerit vel sem in condimentum. + +Praesent vel ultricies lorem. Vestibulum tempus malesuada elit a gravida. Proin cursus nisl urna, et finibus nisl porttitor sed. Donec tristique leo vel sem pharetra maximus. Praesent eleifend felis eu imperdiet semper. Etiam pretium mauris diam. Nam quam nisl, laoreet eget scelerisque accumsan, luctus quis dui. Integer at ornare odio. + +Sed id tellus velit. Pellentesque vitae condimentum justo. Vestibulum fringilla mauris nec laoreet tincidunt. Maecenas arcu ligula, euismod ut convallis ac, tincidunt id nibh. Aliquam eu sollicitudin velit. Nulla nec sapien leo. Nullam venenatis vel justo vestibulum accumsan. Pellentesque sapien magna, dignissim eget lorem in, condimentum efficitur nisi. Sed quis turpis pellentesque metus aliquam sollicitudin eget vel orci. Sed ac orci nec libero posuere aliquam at quis velit. Quisque at pellentesque quam. Quisque venenatis felis est, eu scelerisque dui elementum non. + +Duis venenatis eleifend commodo. In hac habitasse platea dictumst. Proin elementum, mi sed suscipit blandit, purus quam lacinia lectus, ut venenatis felis elit at nulla. Aenean dignissim lacus ac lectus lacinia convallis. Donec fringilla leo purus. Suspendisse potenti. Curabitur aliquam sodales dui ut imperdiet. + +Nam in ex id augue facilisis ornare non nec lorem. Nam dolor ex, facilisis nec dignissim vel, mollis eget ex. Aliquam consectetur turpis eget quam pellentesque, at pretium dolor volutpat. Cras sed velit quis dolor scelerisque rhoncus sit amet vel lectus. Sed lacinia arcu convallis mattis aliquet. Proin faucibus vulputate varius. Nullam vel dictum libero. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla facilisi. Aliquam mauris ex, faucibus nec tempor quis, placerat maximus augue. Suspendisse commodo pretium sem quis laoreet. Vivamus porta, urna eu tincidunt semper, purus sem tempor sem, ut condimentum diam nibh vel mi. Donec sit amet tellus sit amet mauris vestibulum feugiat. Aliquam in orci quis est feugiat porttitor. Aliquam nec metus ac urna viverra tincidunt. + +Nunc ac orci cursus, faucibus justo nec, lobortis tortor. Nulla tincidunt scelerisque risus, at blandit arcu elementum sed. Maecenas non justo dapibus, tincidunt nibh in, porta neque. Sed non mi id leo vestibulum iaculis. Nam ultricies odio eget arcu vehicula tempus. Suspendisse maximus consectetur arcu, id dapibus lacus mollis et. Fusce nec vulputate nulla. Nam dictum eget sapien id interdum. Duis mi sem, gravida nec dolor vel, elementum facilisis tellus. Integer vel accumsan diam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed in commodo ex. Praesent commodo porttitor ipsum. Vestibulum volutpat diam at tellus feugiat, id sodales magna bibendum. Mauris odio eros, rutrum at scelerisque eget, porta sed turpis. Suspendisse porta dictum cursus. + +Mauris accumsan finibus mi sit amet auctor. Aliquam erat volutpat. Vestibulum at euismod sapien, euismod tincidunt lectus. Mauris aliquet sapien at erat vestibulum, a vestibulum dui bibendum. Etiam vel vulputate justo. Nam vitae ultrices nisl, eu dapibus ex. Quisque volutpat nibh vitae semper tristique. Mauris in nibh lectus. Maecenas elit leo, ultricies quis bibendum sed, rhoncus et neque. Sed elementum nec dui id lobortis. Vestibulum sollicitudin arcu nulla, sit amet lobortis urna ultrices a. Cras fermentum dolor id faucibus pretium. Pellentesque congue quam metus, quis consequat leo sollicitudin vitae. + +Integer congue, neque a scelerisque varius, purus nibh fringilla nunc, sit amet pretium felis sapien vel orci. Donec mattis ac orci in viverra. Suspendisse a justo sollicitudin lacus efficitur ullamcorper. Mauris faucibus nisl quis dolor volutpat aliquam. Aenean venenatis, odio et rhoncus lobortis, risus ligula finibus massa, non dignissim augue nisl vel arcu. Nullam fringilla odio at libero scelerisque, vitae placerat nisi fringilla. Etiam quis urna turpis. Quisque quis leo ante. Duis nec elit massa. Sed porttitor, nulla id efficitur blandit, purus ligula vulputate lectus, quis molestie metus orci ac tellus. Donec sapien massa, suscipit eu tristique ac, posuere sed lorem. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam erat volutpat. Duis bibendum erat eget felis tempor, eget imperdiet nibh vestibulum. In hac habitasse platea dictumst. Quisque vehicula pulvinar turpis, ac dictum risus auctor varius. + +Praesent ac ex vestibulum, dapibus lacus in, malesuada diam. Sed in turpis in justo venenatis pharetra. Fusce sed lobortis nisl. Phasellus faucibus magna ante, malesuada placerat justo faucibus tempus. Phasellus hendrerit fermentum felis. Proin malesuada, urna vel tincidunt pharetra, eros ante bibendum sem, nec viverra nunc arcu at mauris. Sed et lorem pharetra, feugiat tortor vitae, rutrum lacus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mauris leo, condimentum at risus eget, aliquam consequat mauris. Mauris id auctor purus. + +Aenean augue mauris, cursus quis elit eget, molestie pharetra sem. Mauris congue felis ut nibh facilisis, ut pharetra arcu pharetra. Curabitur semper mattis orci eu dictum. Phasellus hendrerit scelerisque dignissim. Sed aliquet nunc scelerisque, facilisis nulla at, posuere lorem. Maecenas blandit, lectus nec varius bibendum, nibh risus posuere turpis, id pretium justo elit vitae ligula. Sed risus ante, congue quis libero consequat, laoreet convallis diam. + +Aenean sagittis ex vel semper ullamcorper. Donec mattis, ipsum tincidunt aliquet vehicula, elit tellus porta mi, a convallis quam orci ac lectus. Proin aliquam nulla in erat mattis placerat. Aliquam ligula sem, egestas ac turpis vitae, facilisis iaculis mauris. Donec ac egestas urna, ac iaculis orci. Integer urna magna, eleifend sed nunc vitae, commodo lobortis massa. Aenean ultrices pulvinar dui, non blandit lorem pretium quis. Praesent in molestie purus, vestibulum interdum quam. Pellentesque auctor erat non mauris fringilla eleifend. + +Etiam blandit vel leo nec pulvinar. Phasellus elementum facilisis mi et egestas. Praesent finibus, elit vel venenatis sodales, turpis nibh tincidunt turpis, eu venenatis urna tortor at massa. Proin iaculis ipsum ut elit maximus tincidunt. Suspendisse justo turpis, sollicitudin ut eros quis, dictum placerat nibh. Sed mattis ornare pulvinar. Cras lacus purus, interdum vitae commodo sollicitudin, suscipit eu quam. Mauris luctus laoreet metus at posuere. Etiam faucibus diam quis purus vulputate, nec blandit lorem bibendum. + +Aliquam nisl neque, vulputate eu arcu id, elementum dictum sapien. Aliquam aliquam, mauris eget vestibulum accumsan, metus tellus vulputate urna, nec volutpat felis turpis ac nulla. Morbi pretium magna bibendum eros ultricies lobortis. Vestibulum euismod vitae nibh in posuere. Vivamus in iaculis mi. Pellentesque iaculis ex nec tellus pulvinar interdum. Integer a tincidunt risus, eu faucibus mi. Vivamus posuere sapien eu orci scelerisque rutrum at eu leo. Nullam consectetur est eu justo congue commodo. Vestibulum ac finibus velit. Donec faucibus nulla at risus rhoncus, a vulputate magna pulvinar. Aliquam condimentum rhoncus lacus sed hendrerit. + +Morbi non hendrerit nisl, eu fringilla erat. Praesent ac dolor sit amet libero tempus porttitor. Cras vel sem elementum, venenatis ipsum vel, molestie tellus. Aliquam erat volutpat. Maecenas malesuada urna nec diam sodales pharetra. Aliquam non lobortis metus. Donec eleifend mollis eros in condimentum. Suspendisse sagittis consequat justo, vitae tincidunt orci luctus vel. Ut lobortis tincidunt libero. Sed dignissim lorem sit amet nibh aliquam, pharetra pulvinar justo consequat. Suspendisse sed dictum massa. Ut fermentum, dolor a fringilla bibendum, lorem ligula scelerisque turpis, in porta justo neque non lectus. Suspendisse pellentesque risus sit amet ligula pretium condimentum. Fusce odio tortor, pulvinar in dapibus nec, pharetra eget nisi. Suspendisse luctus eros eget mauris pretium blandit. + +Nam vel fermentum nulla. Sed tincidunt tellus id mattis dapibus. Quisque ac congue libero, nec elementum nulla. Phasellus quam eros, congue eu lacinia a, interdum et eros. Aenean suscipit risus interdum mauris porttitor, vehicula auctor tellus molestie. Donec efficitur nisi eget ex interdum sollicitudin. Nunc ultricies maximus quam, at pulvinar eros volutpat quis. Nam venenatis mauris enim, sed malesuada tortor eleifend sit amet. Cras imperdiet convallis viverra. Proin purus nulla, bibendum in aliquam quis, sollicitudin a risus. Proin vehicula tincidunt tortor quis lacinia. Praesent tristique odio sed orci consequat, ut pulvinar mauris semper. Mauris felis mi, ultricies a dolor id, viverra laoreet orci. Nam ex mi, semper nec imperdiet sed, posuere et eros. + +Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec scelerisque ipsum sed libero tempor, in vulputate ante sodales. Sed vehicula nulla non ante blandit, quis porttitor diam auctor. Nulla sodales risus ut dui vulputate, nec elementum sem volutpat. Quisque id blandit quam. Proin interdum quis lacus ac suscipit. Etiam a scelerisque sapien. Praesent cursus, mi eget dapibus hendrerit, nibh eros elementum lacus, sit amet congue dui nunc at dui. Phasellus tristique nulla ut tincidunt faucibus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse efficitur congue purus, a viverra sapien tristique vel. + +Vestibulum elementum pellentesque turpis. Phasellus id quam sit amet ex sodales malesuada. Morbi iaculis quis nibh vitae finibus. Nullam vitae luctus nisl, ac varius leo. Fusce sed quam eu enim volutpat blandit. Etiam ornare aliquam mi, eget porttitor magna euismod non. Curabitur porta vel metus ut mollis. + +Aenean sit amet sagittis lacus. Quisque in dui commodo, rutrum massa tincidunt, hendrerit mauris. Maecenas sit amet nisl facilisis, interdum eros rhoncus, malesuada nisl. Aliquam condimentum erat dui, eget dignissim magna volutpat vitae. Mauris porttitor, risus ut auctor porttitor, sem nisl interdum nisi, ac tempus est enim in tortor. Sed rhoncus magna ac feugiat pharetra. Nulla scelerisque quis neque ut porttitor. Ut lacinia in ipsum sit amet lobortis. Aliquam eu justo vel leo facilisis tristique. Pellentesque cursus, lacus a rhoncus auctor, erat velit vehicula diam, et fermentum erat mauris fermentum turpis. Donec quam sapien, laoreet sodales sagittis ac, sodales vitae lectus. Donec vitae lorem rutrum, lobortis libero maximus, condimentum sapien. Pellentesque mi lorem, rhoncus vel lacinia a, venenatis et velit. + +Curabitur malesuada ante vel maximus luctus. Etiam dui lectus, condimentum eget lobortis eget, eleifend pellentesque ligula. Nam eu pharetra urna, sit amet facilisis turpis. Mauris tincidunt vestibulum turpis nec suscipit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Pellentesque egestas commodo finibus. Donec pellentesque nec libero et imperdiet. Cras cursus purus ut libero pretium vulputate. Mauris non arcu purus. Donec sollicitudin dignissim massa ac tincidunt. Donec non consectetur turpis, et venenatis dui. + +Nam mattis urna dolor, a varius sem tempor a. Vivamus porttitor dignissim metus vel ultrices. Integer ac justo vel nisl consequat efficitur. Maecenas sit amet hendrerit elit. Suspendisse lobortis semper mauris id convallis. Duis nibh dui, lacinia a turpis sed, interdum aliquam ex. Praesent tempor rhoncus nibh vel dictum. Quisque feugiat mi sit amet nunc fermentum pellentesque. Ut porta lacinia erat eu pulvinar. Nulla vestibulum fermentum felis, eu ultricies lectus. Ut eget lobortis sapien. Aenean consectetur in nisl interdum mattis. Sed a ipsum pharetra, congue augue a, accumsan ex. Quisque luctus sapien non tincidunt vulputate. + +Aenean auctor consectetur urna et rhoncus. Vivamus mattis tortor at massa porta, in auctor quam porttitor. Nulla facilisi. Sed auctor ipsum tortor, quis hendrerit risus convallis eget. Vivamus a mollis nulla, at fringilla risus. In a cursus dui, nec vehicula elit. Donec in sodales ante, quis gravida est. Sed interdum mi non ornare lacinia. Cras placerat cursus dolor nec euismod. Nulla vel velit quis nibh aliquam eleifend. Cras mattis vitae erat nec gravida. Vestibulum luctus sagittis nibh, a pretium neque dictum eget. Quisque vitae consequat dui. Donec libero eros, pharetra sit amet sapien id, euismod gravida mi. + +Duis tristique nisi id urna feugiat, sed aliquet nulla imperdiet. Ut quis felis finibus, lobortis nunc eu, sodales risus. Fusce at euismod risus. Nunc pulvinar libero volutpat, mattis eros facilisis, mollis nibh. Maecenas augue nunc, mollis sit amet volutpat et, interdum eu augue. Etiam porttitor tortor sem, vitae hendrerit nulla lobortis ut. In non sollicitudin eros. Cras bibendum lorem id odio sollicitudin euismod. Aliquam ullamcorper purus at turpis accumsan blandit. Donec at interdum arcu. Nam fermentum est lectus, vel tincidunt purus sollicitudin a. Aliquam vel orci massa. + +Fusce fringilla et justo et interdum. Fusce molestie, tellus vitae elementum lobortis, enim augue condimentum nulla, a semper enim quam in dui. Vestibulum a pharetra felis. Proin eu sollicitudin leo. In vestibulum rhoncus augue, non ultrices turpis. Donec maximus neque semper tellus condimentum, in aliquam dui posuere. Sed ultrices nisl purus, quis sollicitudin eros laoreet quis. Praesent nunc nisl, varius at suscipit sed, tristique at neque. + +Quisque aliquam tincidunt augue vitae rhoncus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Proin eu luctus erat. Nullam auctor, purus a eleifend efficitur, metus ligula accumsan quam, quis bibendum enim lacus quis neque. Maecenas lacinia ipsum molestie felis accumsan, in dignissim purus aliquet. Nunc turpis massa, ultricies in lacinia ut, luctus ut felis. Morbi magna nisi, sodales in arcu sit amet, efficitur mattis velit. Ut scelerisque enim nibh, vel pretium urna varius vel. Cras vitae accumsan nunc, ut iaculis tortor. Nam vitae laoreet orci, sit amet rutrum mi. Nunc blandit purus eu hendrerit tempor. Vestibulum tincidunt pharetra purus ut sodales. Lorem ipsum dolor sit amet, consectetur adipiscing elit. + +Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla sed laoreet urna, sit amet commodo erat. Fusce euismod justo erat, et placerat odio accumsan finibus. Proin pellentesque ligula ut nibh condimentum, sed ornare justo faucibus. Fusce consectetur sapien nec dui varius, vel pharetra felis molestie. Duis accumsan odio metus, ut varius orci finibus nec. Sed non ipsum vitae est aliquet mollis. Pellentesque facilisis feugiat suscipit. + +Mauris ut enim sit amet metus bibendum finibus. Suspendisse iaculis, tellus maximus placerat elementum, libero turpis fermentum dolor, ut lacinia sapien ipsum a nulla. Etiam sollicitudin dictum dolor, ac congue sem pulvinar nec. Ut egestas urna non neque volutpat egestas. Integer porta vel orci volutpat tincidunt. In egestas fringilla ipsum ac pharetra. Fusce justo dui, dignissim sed leo at, tincidunt finibus magna. Pellentesque vel nunc risus. Praesent lacinia blandit convallis. Cras eget magna metus. Maecenas fringilla dolor eu quam dictum consequat. Donec pellentesque eleifend velit, a commodo dui faucibus eu. Phasellus pretium nulla ipsum, et interdum magna interdum et. Mauris a sem ullamcorper, consectetur quam accumsan, porttitor eros. + +Praesent facilisis, ipsum ac tincidunt auctor, tellus ipsum convallis magna, vel maximus sem lorem et tortor. Sed elit diam, faucibus sed turpis eget, commodo facilisis nunc. Vestibulum vitae arcu tristique, varius libero molestie, sollicitudin mi. In tincidunt nisl in eros imperdiet faucibus. Cras ex ipsum, vehicula eget neque eget, viverra pellentesque erat. Suspendisse vitae tristique dolor. Nulla ornare imperdiet metus id mollis. Fusce ligula ex, aliquam sed purus quis, venenatis volutpat lectus. Sed iaculis ante sit amet massa consequat interdum. Ut feugiat risus sit amet commodo euismod. Sed tristique quam sit amet lacinia cursus. Donec faucibus, erat a dapibus rhoncus, orci est interdum ex, sit amet semper massa quam et lectus. + +Suspendisse mollis turpis aliquam felis efficitur, eu ultrices tellus suscipit. Aenean at congue erat, vel ultricies eros. Quisque hendrerit arcu ut est aliquet, et vehicula lectus ullamcorper. Pellentesque posuere neque nec auctor scelerisque. Phasellus rhoncus odio ac nisl ornare condimentum. Nam nec arcu porttitor tellus faucibus malesuada id a est. Vivamus id facilisis ante. Proin quis risus ipsum. In sed nibh at nisl tempus interdum. Ut sit amet malesuada nisl, id pharetra metus. Nulla lorem velit, euismod nec dictum at, porttitor ac erat. Aliquam est leo, elementum nec ultricies nec, interdum sed libero. Quisque mattis placerat scelerisque. Praesent vulputate sit amet felis non tristique. + +Phasellus odio ex, ultricies et tincidunt sit amet, auctor id felis. Fusce facilisis nibh risus, eget placerat nunc pellentesque vel. Morbi cursus metus eu arcu viverra rutrum. Nulla eget dolor blandit, pulvinar sem aliquet, hendrerit purus. Fusce sodales venenatis posuere. Cras egestas placerat odio non scelerisque. Praesent tincidunt maximus semper. Vivamus eget libero massa. Cras auctor orci sed nibh sagittis ultrices. Curabitur leo lacus, suscipit ac pharetra vel, euismod eu turpis. Aenean quis justo efficitur, mattis nisl sed, mollis lacus. Integer feugiat non metus vitae faucibus. Morbi sem massa, pretium id risus a, congue volutpat mi. Vivamus lacinia enim lorem, id malesuada ante vehicula non. Praesent ac urna quis justo malesuada euismod. + +Integer sed ligula id purus dictum tempus eu non ex. Phasellus tincidunt lectus in imperdiet porttitor. Integer ligula dolor, porttitor et congue vitae, elementum eget sem. Proin a libero in enim efficitur mollis. Proin molestie metus dolor, in fermentum massa condimentum at. Cras eget auctor odio, a luctus sapien. Nulla in hendrerit leo, sed venenatis augue. Proin mollis vestibulum magna. Nulla dapibus lacus nec condimentum maximus. Phasellus id efficitur enim. Vivamus molestie mauris at condimentum elementum. Maecenas ultrices mauris quis tincidunt viverra. Ut eget ultricies ligula. Nulla id fermentum nisl, in ultrices velit. + +Nunc blandit tellus sed est auctor condimentum. Integer fringilla aliquam libero, id sagittis ipsum lacinia sit amet. Donec sit amet nunc felis. Vestibulum at commodo arcu, a malesuada est. Aenean ultrices, mauris in pellentesque posuere, mi orci fermentum justo, vitae rutrum neque erat a nisi. In sed urna quis sem egestas faucibus ut quis ipsum. Quisque porta lectus sit amet urna ultricies iaculis. + +Praesent ultrices odio nisl, eu consequat dolor sollicitudin nec. Suspendisse dignissim lobortis nulla nec molestie. Duis in diam sed est dignissim faucibus vitae in metus. Phasellus lacinia urna eros, vitae vulputate sem fermentum eget. Suspendisse et efficitur dolor. Mauris faucibus sodales felis eu luctus. Cras non mattis lacus. Proin in lobortis sapien. Nulla at augue sed est congue sollicitudin. + +Nunc nisi lorem, dapibus id tincidunt quis, sollicitudin sit amet justo. In mollis orci pretium aliquam fermentum. Fusce sodales mi eget tellus posuere ullamcorper. Sed varius sagittis elit, in feugiat odio maximus sed. Cras eleifend massa sit amet mi suscipit, vel laoreet leo pretium. Quisque neque erat, mollis eget elementum non, blandit in lectus. Sed dignissim felis ac felis convallis elementum molestie id lectus. Nullam fermentum lorem mi, in placerat quam mollis vitae. Pellentesque ultrices, nibh at sagittis molestie, augue mauris bibendum dui, ut ultricies lorem magna eu massa. Quisque quis purus eu nisi rhoncus tempor. Donec eget fringilla massa. Vivamus sed varius elit. Aenean egestas tellus eget magna dapibus hendrerit. Nunc vel leo eu purus tempus mollis. + +Praesent sagittis eget lectus non vestibulum. Fusce id elit nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec id malesuada justo, non ornare felis. Nulla ultricies lorem ex, et accumsan ex volutpat sodales. Pellentesque venenatis neque in hendrerit blandit. Donec dapibus est fermentum lacus fringilla, ut volutpat tellus consectetur. Maecenas id semper tortor. In pellentesque aliquet elit, non vulputate augue mollis fermentum. Nullam posuere eget elit a placerat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. + +Phasellus vestibulum tristique quam a faucibus. Proin sit amet sem et leo posuere efficitur vitae et ante. Nullam congue nisl augue, in ultricies orci tempor quis. Aliquam erat volutpat. In luctus, sapien at venenatis fermentum, lorem urna ultrices elit, ac volutpat metus purus eu turpis. Phasellus semper cursus mi, vitae tempor est accumsan at. Integer accumsan nec augue vitae viverra. Sed tempus cursus enim non dapibus. In commodo neque in ultricies semper. Proin auctor lacinia eros, ut tempor lectus pulvinar quis. Ut fermentum vulputate pellentesque. Duis tempor ante quis metus consectetur maximus. Curabitur a tincidunt enim. + +Vestibulum dictum, urna a fringilla imperdiet, tortor arcu mattis odio, et efficitur dui neque ac mauris. Vestibulum auctor risus lacus. Integer elementum erat nisl, id vehicula enim mattis in. Vestibulum consequat neque ante, in sodales magna pulvinar in. Vivamus interdum eros non magna aliquam tristique. Ut aliquam congue ante in gravida. Sed eu turpis sollicitudin, suscipit ligula id, commodo tellus. Aliquam eu sapien vitae augue gravida egestas nec sit amet turpis. Curabitur vulputate vulputate dui, et facilisis lectus tincidunt nec. Integer tristique vitae quam condimentum maximus. Ut ultricies convallis nisl eu elementum. + +Curabitur non nisi lectus. Aliquam finibus lorem id dui molestie, sed ullamcorper quam lobortis. Maecenas in gravida urna. Pellentesque consequat risus vel nibh tempus facilisis. Etiam auctor lacinia lacus vitae vulputate. Etiam bibendum arcu at ipsum elementum, id sodales nunc convallis. Phasellus elementum mi non sapien blandit suscipit. Integer accumsan et justo nec mattis. Vestibulum quis erat viverra, condimentum enim eget, auctor tortor. Nunc ac mauris sit amet urna pellentesque malesuada. Fusce urna justo, finibus eget blandit eget, volutpat eu nisi. In nisi nunc, sodales sit amet tempor eu, feugiat feugiat tellus. Nulla felis purus, gravida eu iaculis in, interdum id purus. In hac habitasse platea dictumst. Aenean consequat, quam tincidunt sodales lacinia, ex dui faucibus massa, ut porta dolor justo et mi. + +Donec a massa porta, vehicula diam et, pulvinar tortor. Duis tincidunt, nibh ut pharetra hendrerit, est orci egestas urna, et sollicitudin massa lacus aliquam ex. Curabitur in quam sed elit scelerisque pretium nec rhoncus nulla. In a ligula. + """ + + run () -> stringify.attEscape(text) diff --git a/node_modules/xmlbuilder/perf/basic/object.coffee b/node_modules/xmlbuilder/perf/basic/object.coffee new file mode 100644 index 0000000..ac7df51 --- /dev/null +++ b/node_modules/xmlbuilder/perf/basic/object.coffee @@ -0,0 +1,21 @@ +perf 'Create simple object', 100000, (run) -> + obj = + ele: "simple element" + person: + name: "John" + '@age': 35 + '?pi': 'mypi' + '#comment': 'Good guy' + '#cdata': 'well formed!' + unescaped: + '#raw': '&<>&' + address: + city: "Istanbul" + street: "End of long and winding road" + contact: + phone: [ "555-1234", "555-1235" ] + id: () -> return 42 + details: + '#text': 'classified' + + run () -> xml(obj) diff --git a/node_modules/xmlbuilder/perf/index.coffee b/node_modules/xmlbuilder/perf/index.coffee new file mode 100644 index 0000000..3bd0f93 --- /dev/null +++ b/node_modules/xmlbuilder/perf/index.coffee @@ -0,0 +1,161 @@ +builder = require('../src/index') +git = require('git-state') +fs = require('fs') +path = require('path') +{ performance, PerformanceObserver } = require('perf_hooks') + +global.xml = builder.create +global.doc = builder.begin + +global.perf = (description, count, func) -> + + totalTime = 0 + + callback = (userFunction) -> + startTime = performance.now() + for i in [1..count] + userFunction() + endTime = performance.now() + totalTime += endTime - startTime + func(callback) + + averageTime = totalTime / count + + version = require('../package.json').version + working = gitWorking(gitDir) + if working then version = version + "*" + if not perfObj[version] then perfObj[version] = { } + + perfObj[version][description] = averageTime.toFixed(4) + +readPerf = (filename) -> + if not fs.existsSync(filename) then fs.closeSync(fs.openSync(filename, 'w')) + str = fs.readFileSync(filename, 'utf8') + if str then JSON.parse(str) else { } + +runPerf = (dirPath) -> + for file from walkDir(dirPath) + filename = path.basename(file) + if filename is "index.coffee" or filename is "perf.list" then continue + require(file) + +walkDir = (dirPath) -> + for file in fs.readdirSync(dirPath) + filePath = path.join(dirPath, file) + stat = fs.statSync(filePath) + if stat.isFile() then yield filePath else if stat.isDirectory() then yield from walkDir(filePath) + return undefined + +gitWorking = (dirPath) -> + return git.isGitSync(dirPath) and git.dirtySync(dirPath) + +printPerf = (perfObj) -> + sorted = sortByVersion(perfObj) + + for sortedItems in sorted + version = sortedItems.version + items = sortedItems.item + sortedItem = sortByDesc(items) + + if parseVersion(version)[3] + console.log "\x1b[4mv%s (Working Tree):\x1b[0m", version + else + console.log "\x1b[4mv%s:\x1b[0m", version + + longestDescription = 0 + for item in sortedItem + descriptionLength = item.description.length + if descriptionLength > longestDescription + longestDescription = descriptionLength + + for item in sortedItem + description = item.description + averageTime = item.averageTime + prevItem = findPrevPerf(sorted, version, description) + if prevItem + if averageTime < prevItem.item[description] + console.log " - \x1b[36m%s\x1b[0m \x1b[1m\x1b[32m%s\x1b[0m ms (v%s was \x1b[1m%s\x1b[0m ms, -\x1b[1m%s\x1b[0m%)", padRight(description, longestDescription), averageTime, prevItem.version, prevItem.item[description], (-100*(averageTime - prevItem.item[description]) / prevItem.item[description]).toFixed(0) + else if averageTime > prevItem.item[description] + console.log " - \x1b[36m%s\x1b[0m \x1b[1m\x1b[31m%s\x1b[0m ms (v%s was \x1b[1m%s\x1b[0m ms, +\x1b[1m%s\x1b[0m%)", padRight(description, longestDescription), averageTime, prevItem.version, prevItem.item[description], (100*(averageTime - prevItem.item[description]) / prevItem.item[description]).toFixed(0) + else + console.log " - \x1b[36m%s\x1b[0m \x1b[1m%s\x1b[0m ms (v%s was \x1b[1m%s\x1b[0m ms, \x1b[1m%s\x1b[0m%)", padRight(description, longestDescription), averageTime, prevItem.version, prevItem.item[description], (100*(averageTime - prevItem.item[description]) / prevItem.item[description]).toFixed(0) + else + console.log " - \x1b[36m%s\x1b[0m \x1b[1m%s\x1b[0m ms (no previous result)", padRight(description, longestDescription), averageTime + +padRight = (str, len) -> + str + " ".repeat(len - str.length) + +writePerf = (filename, perfObj) -> + writePerfObj = { } + for version, items of perfObj + if not parseVersion(version)[3] + writePerfObj[version] = items + fs.writeFileSync(filename, JSON.stringify(writePerfObj, null, 2) , 'utf-8') + +findPrevPerf = (sorted, version, description) -> + prev = undefined + for item in sorted + if compareVersion(item.version, version) is -1 + if item.item[description] + prev = item + return prev + +sortByVersion = (perfObj) -> + sorted = [] + for version, items of perfObj + sorted.push + version: version + item: items + sorted.sort (item1, item2) -> + compareVersion(item1.version, item2.version) + +sortByDesc = (item) -> + sorted = [] + for description, averageTime of item + sorted.push + description: description + averageTime: averageTime + sorted.sort (item1, item2) -> + if item1.description < item2.description then -1 else 1 + +parseVersion = (version) -> + isDirty = version[version.length - 1] is "*" + if isDirty then version = version.substr(0, version.length - 1) + v = version.split('.') + v.push(isDirty) + return v + +compareVersion = (v1, v2) -> + v1 = parseVersion(v1) + v2 = parseVersion(v2) + + if v1[0] < v2[0] + -1 + else if v1[0] > v2[0] + 1 + else # v1[0] = v2[0] + if v1[1] < v2[1] + -1 + else if v1[1] > v2[1] + 1 + else # v1[1] = v2[1] + if v1[2] < v2[2] + -1 + else if v1[2] > v2[2] + 1 + else # v1[2] = v2[2] + if v1[3] and not v2[3] + 1 + else if v2[3] and not v1[3] + -1 + else + 0 + + +perfDir = __dirname +gitDir = path.resolve(__dirname, '..') +perfFile = path.join(perfDir, './perf.list') +perfObj = readPerf(perfFile) +runPerf(perfDir) +printPerf(perfObj) +writePerf(perfFile, perfObj) diff --git a/node_modules/xmlbuilder/perf/perf.list b/node_modules/xmlbuilder/perf/perf.list new file mode 100644 index 0000000..711b077 --- /dev/null +++ b/node_modules/xmlbuilder/perf/perf.list @@ -0,0 +1,11 @@ +{ + "13.0.2": { + "Attribute value escaping": "0.0058", + "Attribute value escaping (long value)": "0.0159", + "Attribute value escaping (no replacement)": "0.0002", + "Create simple object": "0.0218", + "Text escaping": "0.0061", + "Text escaping (long text)": "0.0046", + "Text escaping (no replacement)": "0.0002" + } +} \ No newline at end of file diff --git a/node_modules/xmlbuilder/typings/index.d.ts b/node_modules/xmlbuilder/typings/index.d.ts new file mode 100644 index 0000000..27bf269 --- /dev/null +++ b/node_modules/xmlbuilder/typings/index.d.ts @@ -0,0 +1,1771 @@ + +import { Writable } from 'stream'; + +export = xmlbuilder; + +/** + * Type definitions for [xmlbuilder](https://github.com/oozcitak/xmlbuilder-js) + * + * Original definitions on [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) by: + * - Wallymathieu + * - GaikwadPratik + */ +declare namespace xmlbuilder { + /** + * Creates a new XML document and returns the root element node. + * + * @param nameOrObject - name of the root element or a JS object to be + * converted to an XML tree + * @param xmldecOrOptions - XML declaration or create options + * @param doctypeOrOptions - Doctype declaration or create options + * @param options - create options + */ + function create(nameOrObject: string | { [name: string]: Object }, + xmldecOrOptions?: CreateOptions, doctypeOrOptions?: CreateOptions, + options?: CreateOptions): XMLElement; + + /** + * Defines the options used while creating an XML document with the `create` + * function. + */ + interface CreateOptions { + /** + * A version number string, e.g. `1.0` + */ + version?: string; + /** + * Encoding declaration, e.g. `UTF-8` + */ + encoding?: string; + /** + * Standalone document declaration: `true` or `false` + */ + standalone?: boolean; + + /** + * Public identifier of the DTD + */ + pubID?: string; + /** + * System identifier of the DTD + */ + sysID?: string; + + /** + * Whether XML declaration and doctype will be included + */ + headless?: boolean; + /** + * Whether nodes with `null` values will be kept or ignored + */ + keepNullNodes?: boolean; + /** + * Whether attributes with `null` values will be kept or ignored + */ + keepNullAttributes?: boolean; + /** + * Whether decorator strings will be ignored when converting JS + * objects + */ + ignoreDecorators?: boolean; + /** + * Whether array items are created as separate nodes when passed + * as an object value + */ + separateArrayItems?: boolean; + /** + * Whether existing html entities are encoded + */ + noDoubleEncoding?: boolean; + /** + * Whether values will be validated and escaped or returned as is + */ + noValidation?: boolean; + /** + * A character to replace invalid characters in all values. This also + * disables character validation. + */ + invalidCharReplacement?: string; + /** + * A set of functions to use for converting values to strings + */ + stringify?: XMLStringifier; + /** + * The default XML writer to use for converting nodes to string. + * If the default writer is not set, the built-in `XMLStringWriter` + * will be used instead. + */ + writer?: XMLWriter; + } + + /** + * Defines the functions used for converting values to strings. + */ + interface XMLStringifier { + /** + * Converts an element or attribute name to string + */ + name?: (v: any) => string; + /** + * Converts the contents of a text node to string + */ + text?: (v: any) => string; + /** + * Converts the contents of a CDATA node to string + */ + cdata?: (v: any) => string; + /** + * Converts the contents of a comment node to string + */ + comment?: (v: any) => string; + /** + * Converts the contents of a raw text node to string + */ + raw?: (v: any) => string; + /** + * Converts attribute value to string + */ + attValue?: (v: any) => string; + /** + * Converts processing instruction target to string + */ + insTarget?: (v: any) => string; + /** + * Converts processing instruction value to string + */ + insValue?: (v: any) => string; + /** + * Converts XML version to string + */ + xmlVersion?: (v: any) => string; + /** + * Converts XML encoding to string + */ + xmlEncoding?: (v: any) => string; + /** + * Converts standalone document declaration to string + */ + xmlStandalone?: (v: any) => string; + /** + * Converts DocType public identifier to string + */ + dtdPubID?: (v: any) => string; + /** + * Converts DocType system identifier to string + */ + dtdSysID?: (v: any) => string; + /** + * Converts `!ELEMENT` node content inside Doctype to string + */ + dtdElementValue?: (v: any) => string; + /** + * Converts `!ATTLIST` node type inside DocType to string + */ + dtdAttType?: (v: any) => string; + /** + * Converts `!ATTLIST` node default value inside DocType to string + */ + dtdAttDefault?: (v: any) => string; + /** + * Converts `!ENTITY` node content inside Doctype to string + */ + dtdEntityValue?: (v: any) => string; + /** + * Converts `!NOTATION` node content inside Doctype to string + */ + dtdNData?: (v: any) => string; + + /** + * When prepended to a JS object key, converts the key-value pair + * to an attribute. + */ + convertAttKey?: string; + /** + * When prepended to a JS object key, converts the key-value pair + * to a processing instruction node. + */ + convertPIKey?: string; + /** + * When prepended to a JS object key, converts its value to a text node. + * + * _Note:_ Since JS objects cannot contain duplicate keys, multiple text + * nodes can be created by adding some unique text after each object + * key. For example: `{ '#text1': 'some text', '#text2': 'more text' };` + */ + convertTextKey?: string; + /** + * When prepended to a JS object key, converts its value to a CDATA + * node. + */ + convertCDataKey?: string; + /** + * When prepended to a JS object key, converts its value to a + * comment node. + */ + convertCommentKey?: string; + /** + * When prepended to a JS object key, converts its value to a raw + * text node. + */ + convertRawKey?: string; + + /** + * Escapes special characters in text. + */ + textEscape?: (v: string) => string; + + /** + * Escapes special characters in attribute values. + */ + attEscape?: (v: string) => string; + } + + /** + * Represents a writer which outputs an XML document. + */ + interface XMLWriter { + /** + * Writes the indentation string for the given level. + * + * @param node - current node + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + indent?: (node: XMLNode, options: WriterOptions, level: number) => any + + /** + * Writes the newline string. + * + * @param node - current node + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + endline?: (node: XMLNode, options: WriterOptions, level: number) => any + + /** + * Writes an attribute. + * + * @param att - current attribute + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + attribute?: (att: XMLAttribute, options: WriterOptions, + level: number) => any + + /** + * Writes a CDATA node. + * + * @param node - current node + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + cdata?: (node: XMLCData, options: WriterOptions, level: number) => any + + /** + * Writes a comment node. + * + * @param node - current node + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + comment?: (node: XMLComment, options: WriterOptions, + level: number) => any + + /** + * Writes the XML declaration (e.g. ``). + * + * @param node - XML declaration node + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + declaration?: (node: XMLDeclaration, options: WriterOptions, + level: number) => any + + /** + * Writes the DocType node and its children. + * + * _Note:_ Be careful when overriding this function as this function + * is also responsible for writing the internal subset of the DTD. + * + * @param node - DOCTYPE node + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + docType?: (node: XMLDocType, options: WriterOptions, + level: number) => any + + /** + * Writes an element node. + * + * _Note:_ Be careful when overriding this function as this function + * is also responsible for writing the element attributes and child + * nodes. + * + * + * @param node - current node + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + element?: (node: XMLElement, options: WriterOptions, + level: number) => any + + /** + * Writes a processing instruction node. + * + * @param node - current node + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + processingInstruction?: (node: XMLProcessingInstruction, + options: WriterOptions, level: number) => any + + /** + * Writes a raw text node. + * + * @param node - current node + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + raw?: (node: XMLRaw, options: WriterOptions, level: number) => any + + /** + * Writes a text node. + * + * @param node - current node + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + text?: (node: XMLText, options: WriterOptions, level: number) => any + + /** + * Writes an attribute node (`!ATTLIST`) inside the DTD. + * + * @param node - current node + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + dtdAttList?: (node: XMLDTDAttList, options: WriterOptions, + level: number) => any + + /** + * Writes an element node (`!ELEMENT`) inside the DTD. + * + * @param node - current node + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + dtdElement?: (node: XMLDTDElement, options: WriterOptions, + level: number) => any + + /** + * Writes an entity node (`!ENTITY`) inside the DTD. + * + * @param node - current node + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + dtdEntity?: (node: XMLDTDEntity, options: WriterOptions, + level: number) => any + + /** + * Writes a notation node (`!NOTATION`) inside the DTD. + * + * @param node - current node + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + dtdNotation?: (node: XMLDTDNotation, options: WriterOptions, + level: number) => any + + /** + * Called right after starting writing a node. This function does not + * produce any output, but can be used to alter the state of the writer. + * + * @param node - current node + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + openNode?: (node: XMLNode, options: WriterOptions, + level: number) => void + + /** + * Called right before completing writing a node. This function does not + * produce any output, but can be used to alter the state of the writer. + * + * @param node - current node + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + closeNode?: (node: XMLNode, options: WriterOptions, + level: number) => void + + /** + * Called right after starting writing an attribute. This function does + * not produce any output, but can be used to alter the state of the + * writer. + * + * @param node - current attribute + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + openAttribute?: (att: XMLAttribute, options: WriterOptions, + level: number) => void + + /** + * Called right before completing writing an attribute. This function + * does not produce any output, but can be used to alter the state of + * the writer. + * + * @param node - current attribute + * @param options - writer options and state information + * @param level - current depth of the XML tree + */ + closeAttribute?: (att: XMLAttribute, options: WriterOptions, + level: number) => void + } + + /** + * Defines the options passed to the XML writer. + */ + interface WriterOptions { + /** + * Pretty print the XML tree + */ + pretty?: boolean; + /** + * Indentation string for pretty printing + */ + indent?: string; + /** + * Newline string for pretty printing + */ + newline?: string; + /** + * A fixed number of indents to offset strings + */ + offset?: number; + /** + * Maximum column width + */ + width?: number; + /** + * Whether to output closing tags for empty element nodes + */ + allowEmpty?: boolean; + /** + * Whether to pretty print text nodes + */ + dontPrettyTextNodes?: boolean; + /** + * A string to insert before closing slash character + */ + spaceBeforeSlash?: string | boolean; + /** + * User state object that is saved between writer functions + */ + user?: any; + /** + * The current state of the writer + */ + state?: WriterState; + /** + * Writer function overrides + */ + writer?: XMLWriter; + } + + /** + * Defines the state of the writer. + */ + enum WriterState { + /** + * Writer state is unknown + */ + None = 0, + /** + * Writer is at an opening tag, e.g. `` + */ + OpenTag = 1, + /** + * Writer is inside an element + */ + InsideTag = 2, + /** + * Writer is at a closing tag, e.g. `` + */ + CloseTag = 3 + } + + /** + * Creates a new XML document and returns the document node. + * This function creates an empty document without the XML prolog or + * a root element. + * + * @param options - create options + */ + function begin(options?: BeginOptions): XMLDocument; + + /** + * Defines the options used while creating an XML document with the `begin` + * function. + */ + interface BeginOptions { + /** + * Whether nodes with null values will be kept or ignored + */ + keepNullNodes?: boolean; + /** + * Whether attributes with null values will be kept or ignored + */ + keepNullAttributes?: boolean; + /** + * Whether decorator strings will be ignored when converting JS + * objects + */ + ignoreDecorators?: boolean; + /** + * Whether array items are created as separate nodes when passed + * as an object value + */ + separateArrayItems?: boolean; + /** + * Whether existing html entities are encoded + */ + noDoubleEncoding?: boolean; + /** + * Whether values will be validated and escaped or returned as is + */ + noValidation?: boolean; + /** + * A character to replace invalid characters in all values. This also + * disables character validation. + */ + invalidCharReplacement?: string; + /** + * A set of functions to use for converting values to strings + */ + stringify?: XMLStringifier; + /** + * The default XML writer to use for converting nodes to string. + * If the default writer is not set, the built-in XMLStringWriter + * will be used instead. + */ + writer?: XMLWriter | WriterOptions; + } + + /** + * A function to be called when a chunk of XML is written. + * + * @param chunk - a chunk of string that was written + * @param level - current depth of the XML tree + */ + type OnDataCallback = (chunk: string, level: number) => void; + + /** + * A function to be called when the XML doucment is completed. + */ + type OnEndCallback = () => void; + + /** + * Creates a new XML document in callback mode and returns the document + * node. + * + * @param options - create options + * @param onData - the function to be called when a new chunk of XML is + * output. The string containing the XML chunk is passed to `onData` as + * its first argument and the current depth of the tree is passed as its + * second argument. + * @param onEnd - the function to be called when the XML document is + * completed with `end`. `onEnd` does not receive any arguments. + */ + function begin(options?: BeginOptions | OnDataCallback, + onData?: OnDataCallback | OnEndCallback, + onEnd?: OnEndCallback): XMLDocumentCB; + + /** + * Creates and returns a default string writer. + * + * @param options - writer options + */ + function stringWriter(options?: WriterOptions): XMLWriter + + /** + * Creates and returns a default stream writer. + * + * @param stream - a writeable stream + * @param options - writer options + */ + function streamWriter(stream: Writable, options?: WriterOptions): XMLWriter + + /** + * Defines the type of a node in the XML document. + */ + enum NodeType { + /** + * An element node + */ + Element = 1, + /** + * An attribute node + */ + Attribute = 2, + /** + * A text node + */ + Text = 3, + /** + * A CDATA node + */ + CData = 4, + /** + * An entity reference node inside DocType + */ + EntityReference = 5, + /** + * An entity declaration node inside DocType + */ + EntityDeclaration = 6, + /** + * A processing instruction node + */ + ProcessingInstruction = 7, + /** + * A comment node + */ + Comment = 8, + /** + * A document node + */ + Document = 9, + /** + * A Doctype node + */ + DocType = 10, + /** + * A document fragment node + */ + DocumentFragment = 11, + /** + * A notation declaration node inside DocType + */ + NotationDeclaration = 12, + /** + * An XML declaration node + */ + Declaration = 201, + /** + * A raw text node + */ + Raw = 202, + /** + * An attribute declaraiton node inside DocType + */ + AttributeDeclaration = 203, + /** + * An element declaration node inside DocType + */ + ElementDeclaration = 204 + } + + /** + * Defines the type of a node in the XML document. + */ + export import nodeType = NodeType; + + /** + * Defines the state of the writer. + */ + export import writerState = WriterState; + + /** + * Defines the settings used when converting the XML document to string. + */ + interface XMLToStringOptions { + /** + * Pretty print the XML tree + */ + pretty?: boolean; + /** + * Indentation string for pretty printing + */ + indent?: string; + /** + * Newline string for pretty printing + */ + newline?: string; + /** + * A fixed number of indents to offset strings + */ + offset?: number; + /** + * Maximum column width + */ + width?: number; + /** + * Whether to output closing tags for empty element nodes + */ + allowEmpty?: boolean; + /** + * Whether to pretty print text nodes + */ + dontPrettyTextNodes?: boolean; + /** + * A string to insert before closing slash character + */ + spaceBeforeSlash?: string | boolean; + /** + * The default XML writer to use for converting nodes to string. + * If the default writer is not set, the built-in `XMLStringWriter` + * will be used instead. + */ + writer?: XMLWriter; + } + + /** + * Represents the XML document. + */ + class XMLDocument extends XMLNode { + /** + * Converts the node to string + * + * @param options - conversion options + */ + toString(options?: XMLToStringOptions): string; + } + + /** + * Represents an XML attribute. + */ + class XMLAttribute { + /** + * Type of the node + */ + type: NodeType; + /** + * Parent element node + */ + parent: XMLElement; + /** + * Attribute name + */ + name: string; + /** + * Attribute value + */ + value: string; + + /** + * Creates a clone of this node + */ + clone(): XMLAttribute; + + /** + * Converts the node to string + * + * @param options - conversion options + */ + toString(options?: XMLToStringOptions): string; + } + + /** + * Represents the base class of XML nodes. + */ + abstract class XMLNode { + /** + * Type of the node + */ + type: NodeType; + /** + * Parent element node + */ + parent: XMLElement; + /** + * Child nodes + */ + children: XMLNode[] + + /** + * Creates a new child node and appends it to the list of child nodes. + * + * _Aliases:_ `ele` and `e` + * + * @param name - node name or a JS object defining the nodes to insert + * @param attributes - node attributes + * @param text - node text + * + * @returns the last top level node created + */ + element(name: any, attributes?: Object, text?: any): XMLElement; + ele(name: any, attributes?: Object, text?: any): XMLElement; + e(name: any, attributes?: Object, text?: any): XMLElement; + + /** + * Adds or modifies an attribute. + * + * _Aliases:_ `att`, `a` + * + * @param name - attribute name + * @param value - attribute value + * + * @returns the parent element node + */ + attribute(name: any, value?: any): XMLElement; + att(name: any, value?: any): XMLElement; + a(name: any, value?: any): XMLElement; + + /** + * Creates a new sibling node and inserts it before this node. + * + * @param name - node name or a JS object defining the nodes to insert + * @param attributes - node attributes + * @param text - node text + * + * @returns the new node + */ + insertBefore(name: any, attributes?: Object, text?: any): XMLElement; + /** + * Creates a new sibling node and inserts it after this node. + * + * @param name - node name or a JS object defining the nodes to insert + * @param attributes - node attributes + * @param text - node text + * + * @returns the new node + */ + insertAfter(name: any, attributes?: Object, text?: any): XMLElement; + /** + * Removes this node from the tree. + * + * @returns the parent node + */ + remove(): XMLElement; + + /** + * Creates a new element node and appends it to the list of child nodes. + * + * _Aliases:_ `nod` and `n` + * + * @param name - element node name + * @param attributes - node attributes + * @param text - node text + * + * @returns the node created + */ + node(name: string, attributes?: Object, text?: any): XMLElement; + nod(name: string, attributes?: Object, text?: any): XMLElement; + n(name: string, attributes?: Object, text?: any): XMLElement; + + /** + * Creates a new text node and appends it to the list of child nodes. + * + * _Aliases:_ `txt` and `t` + * + * @param value - node value + * + * @returns the parent node + */ + text(value: string): XMLElement; + txt(value: string): XMLElement; + t(value: string): XMLElement; + + /** + * Creates a new CDATA node and appends it to the list of child nodes. + * + * _Aliases:_ `dat` and `d` + * + * @param value - node value + * + * @returns the parent node + */ + cdata(value: string): XMLElement; + dat(value: string): XMLElement; + d(value: string): XMLElement; + + /** + * Creates a new comment node and appends it to the list of child nodes. + * + * _Aliases:_ `com` and `c` + * + * @param value - node value + * + * @returns the parent node + */ + comment(value: string): XMLElement; + com(value: string): XMLElement; + c(value: string): XMLElement; + + /** + * Creates a comment node before the current node + * + * @param value - node value + * + * @returns the parent node + */ + commentBefore(value: string): XMLElement; + + /** + * Creates a comment node after the current node + * + * @param value - node value + * + * @returns the parent node + */ + commentAfter(value: string): XMLElement; + + /** + * Creates a new raw text node and appends it to the list of child + * nodes. + * + * _Alias:_ `r` + * + * @param value - node value + * + * @returns the parent node + */ + raw(value: string): XMLElement; + r(value: string): XMLElement; + + /** + * Creates a new processing instruction node and appends it to the list + * of child nodes. + * + * _Aliases:_ `ins` and `i` + * + * @param target - node target + * @param value - node value + * + * @returns the parent node + */ + instruction(target: string, value: any): XMLElement; + instruction(array: Array): XMLElement; + instruction(obj: Object): XMLElement; + ins(target: string, value: any): XMLElement; + ins(array: Array): XMLElement; + ins(obj: Object): XMLElement; + i(target: string, value: any): XMLElement; + i(array: Array): XMLElement; + i(obj: Object): XMLElement; + + /** + * Creates a processing instruction node before the current node. + * + * @param target - node target + * @param value - node value + * + * @returns the parent node + */ + instructionBefore(target: string, value: any): XMLElement; + + /** + * Creates a processing instruction node after the current node. + * + * @param target - node target + * @param value - node value + * + * @returns the parent node + */ + instructionAfter(target: string, value: any): XMLElement; + + /** + * Creates the XML declaration. + * + * _Alias:_ `dec` + * + * @param version - version number string, e.g. `1.0` + * @param encoding - encoding declaration, e.g. `UTF-8` + * @param standalone - standalone document declaration: `true` or `false` + * + * @returns the root element node + */ + declaration(version?: string | + { version?: string, encoding?: string, standalone?: boolean }, + encoding?: string, standalone?: boolean): XMLElement; + dec(version?: string | + { version?: string, encoding?: string, standalone?: boolean }, + encoding?: string, standalone?: boolean): XMLElement; + + /** + * Creates the document type definition. + * + * _Alias:_ `dtd` + * + * @param pubID - public identifier of the DTD + * @param sysID - system identifier of the DTD + * + * @returns the DOCTYPE node + */ + doctype(pubID?: string | { pubID?: string, sysID?: string }, + sysID?: string): XMLDocType; + dtd(pubID?: string | { pubID?: string, sysID?: string }, + sysID?: string): XMLDocType; + + /** + * Takes the root node of the given XML document and appends it + * to child nodes. + * + * @param doc - the document whose root node to import + * + * @returns the current node + */ + importDocument(doc: XMLNode): XMLElement; + + /** + * Converts the XML document to string. + * + * @param options - conversion options + */ + end(options?: XMLWriter | XMLToStringOptions): string; + + /** + * Returns the previous sibling node. + */ + prev(): XMLNode; + /** + * Returns the next sibling node. + */ + next(): XMLNode; + /** + * Returns the parent node. + * + * _Alias:_ `u` + */ + up(): XMLElement; + u(): XMLElement; + /** + * Returns the document node. + * + * _Alias:_ `doc` + */ + document(): XMLDocument; + doc(): XMLDocument; + + /** + * Returns the root element node. + */ + root(): XMLElement; + } + + /** + * Represents the base class of character data nodes. + */ + abstract class XMLCharacterData extends XMLNode { + /** + * Node value + */ + value: string; + } + + /** + * Represents a CDATA node. + */ + class XMLCData extends XMLCharacterData { + /** + * Converts the node to string + * + * @param options - conversion options + */ + toString(options?: XMLToStringOptions): string; + + /** + * Creates a clone of this node + */ + clone(): XMLCData; + } + + /** + * Represents a comment node. + */ + class XMLComment extends XMLCharacterData { + /** + * Converts the node to string + * + * @param options - conversion options + */ + toString(options?: XMLToStringOptions): string; + + /** + * Creates a clone of this node + */ + clone(): XMLComment; + } + + /** + * Represents a processing instruction node. + */ + class XMLProcessingInstruction extends XMLCharacterData { + /** Instruction target + */ + target: string; + + /** + * Converts the node to string + * + * @param options - conversion options + */ + toString(options?: XMLToStringOptions): string; + + /** + * Creates a clone of this node + */ + clone(): XMLProcessingInstruction; + } + + /** + * Represents a raw text node. + */ + class XMLRaw extends XMLCharacterData { + /** + * Converts the node to string + * + * @param options - conversion options + */ + toString(options?: XMLToStringOptions): string; + + /** + * Creates a clone of this node + */ + clone(): XMLRaw; + } + + /** + * Represents a text node. + */ + class XMLText extends XMLCharacterData { + /** + * Converts the node to string + * + * @param options - conversion options + */ + toString(options?: XMLToStringOptions): string; + + /** + * Creates a clone of this node + */ + clone(): XMLText; + } + + /** + * Represents the XML declaration. + */ + class XMLDeclaration { + /** + * A version number string, e.g. `1.0` + */ + version: string; + /** + * Encoding declaration, e.g. `UTF-8` + */ + encoding: string; + /** + * Standalone document declaration: `true` or `false` + */ + standalone: boolean; + + /** + * Converts the node to string. + * + * @param options - conversion options + */ + toString(options?: XMLToStringOptions): string; + } + + /** + * Represents the document type definition. + */ + class XMLDocType { + /** + * Type of the node + */ + type: NodeType; + /** + * Parent element node + */ + parent: XMLElement; + /** + * Child nodes + */ + children: XMLNode[] + + /** + * Public identifier of the DTD + */ + pubID: string; + /** + * System identifier of the DTD + */ + sysID: string; + + /** + * Creates an element type declaration. + * + * _Alias:_ `ele` + * + * @param name - element name + * @param value - element content (defaults to `#PCDATA`) + * + * @returns the DOCTYPE node + */ + element(name: string, value?: Object): XMLDocType; + ele(name: string, value?: Object): XMLDocType; + + /** + * Creates an attribute declaration. + * + * _Alias:_ `att` + * + * @param elementName - the name of the element containing this attribute + * @param attributeName - attribute name + * @param attributeType - type of the attribute + * @param defaultValueType - default value type (either `#REQUIRED`, + * `#IMPLIED`, `#FIXED` or `#DEFAULT`) + * @param defaultValue - default value of the attribute (only used + * for `#FIXED` or `#DEFAULT`) + * + * @returns the DOCTYPE node + */ + attList(elementName: string, attributeName: string, attributeType: string, + defaultValueType: string, defaultValue?: any): XMLDocType; + att(elementName: string, attributeName: string, attributeType: string, + defaultValueType: string, defaultValue?: any): XMLDocType; + + /** + * Creates a general entity declaration. + * + * _Alias:_ `ent` + * + * @param name - the name of the entity + * @param value - entity parameters + * + * @returns the DOCTYPE node + */ + entity(name: string, value: string | + { pubID?: string, sysID?: string, nData?: string }): XMLDocType; + ent(name: string, value: string | + { pubID?: string, sysID?: string, nData?: string }): XMLDocType; + + /** + * Creates a parameter entity declaration. + * + * _Alias:_ `pent` + * + * @param name - the name of the entity + * @param value - entity parameters + * + * @returns the DOCTYPE node + */ + pEntity(name: string, value: string | + { pubID?: string, sysID?: string }): XMLDocType; + pent(name: string, value: string | + { pubID?: string, sysID?: string }): XMLDocType; + + /** + * Creates a notation declaration. + * + * _Alias:_ `not` + * + * @param name - the name of the entity + * @param value - entity parameters + * + * @returns the DOCTYPE node + */ + notation(name: string, + value: { pubID?: string, sysID?: string }): XMLDocType; + not(name: string, + value: { pubID?: string, sysID?: string }): XMLDocType; + + /** + * Creates a new CDATA node and appends it to the list of child nodes. + * + * _Alias:_ `dat` + * + * @param value - node value + * + * @returns the DOCTYPE node + */ + cdata(value: string): XMLDocType; + dat(value: string): XMLDocType; + + /** + * Creates a new comment child and appends it to the list of child + * nodes. + * + * _Alias:_ `com` + * + * @param value - node value + * + * @returns the DOCTYPE node + */ + comment(value: string): XMLDocType; + com(value: string): XMLDocType; + + /** + * Creates a new processing instruction node and appends it to the list + * of child nodes. + * + * _Alias:_ `ins` + * + * @param target - node target + * @param value - node value + * + * @returns the DOCTYPE node + */ + instruction(target: string, value: any): XMLDocType; + instruction(array: Array): XMLDocType; + instruction(obj: Object): XMLDocType; + ins(target: string, value: any): XMLDocType; + ins(array: Array): XMLDocType; + ins(obj: Object): XMLDocType; + + /** + * Returns the root element node. + * + * _Alias:_ `up` + */ + root(): XMLElement; + up(): XMLElement; + + /** + * Converts the node to string. + * + * @param options - conversion options + */ + toString(options?: XMLToStringOptions): string; + + /** + * Creates a clone of this node. + */ + clone(): XMLDocType; + + /** + * Returns the document node. + * + * _Alias:_ `doc` + */ + document(): XMLDocument; + doc(): XMLDocument; + + /** + * Converts the XML document to string. + * + * @param options - conversion options + */ + end(options?: XMLWriter | XMLToStringOptions): string; + } + + /** + * Represents an attribute list in the DTD. + */ + class XMLDTDAttList { + /** + * The name of the element containing this attribute + */ + elementName: string; + /** + * Attribute name + */ + attributeName: string; + /** + * Type of the attribute + */ + attributeType: string; + /** + * Default value type (either `#REQUIRED`, `#IMPLIED`, `#FIXED` + * or `#DEFAULT`) + */ + defaultValueType: string; + /** + * Default value of the attribute (only used for `#FIXED` or + * `#DEFAULT`) + */ + defaultValue: string; + + /** + * Converts the node to string. + * + * @param options - conversion options + */ + toString(options?: XMLToStringOptions): string; + } + + /** + * Represents an element in the DTD. + */ + class XMLDTDElement { + /** + * The name of the element + */ + name: string; + /** + * Element content + */ + value: string; + + /** + * Converts the node to string. + * + * @param options - conversion options + */ + toString(options?: XMLToStringOptions): string; + } + + /** + * Represents an entity in the DTD. + */ + class XMLDTDEntity { + /** + * Determines whether this is a parameter entity (`true`) or a + * general entity (`false`). + */ + pe: boolean; + /** + * The name of the entity + */ + name: string; + /** + * Public identifier + */ + pubID: string; + /** + * System identifier + */ + sysID: string; + /** + * Notation declaration + */ + nData: string; + + /** + * Converts the node to string. + * + * @param options - conversion options + */ + toString(options?: XMLToStringOptions): string; + } + + /** + * Represents a notation in the DTD. + */ + class XMLDTDNotation { + /** + * The name of the notation + */ + name: string; + /** + * Public identifier + */ + pubID: string; + /** + * System identifier + */ + sysID: string; + + /** + * Converts the node to string. + * + * @param options - conversion options + */ + toString(options?: XMLToStringOptions): string; + } + + /** + * Represents an element node. + */ + class XMLElement extends XMLNode { + /** + * Element node name + */ + name: string; + /** + * Element attributes + */ + attribs: { string: XMLAttribute }; + + /** + * Creates a clone of this node + */ + clone(): XMLElement; + + /** + * Adds or modifies an attribute. + * + * _Aliases:_ `att`, `a` + * + * @param name - attribute name + * @param value - attribute value + * + * @returns the parent element node + */ + attribute(name: any, value?: any): XMLElement; + att(name: any, value?: any): XMLElement; + a(name: any, value?: any): XMLElement; + + /** + * Removes an attribute. + * + * @param name - attribute name + * + * @returns the parent element node + */ + removeAttribute(name: string | string[]): XMLElement; + + /** + * Converts the node to string. + * + * @param options - conversion options + */ + toString(options?: XMLToStringOptions): string; + } + + /** + * Represents an XML document builder used in callback mode with the + * `begin` function. + */ + class XMLDocumentCB { + + /** + * Creates a new child node and appends it to the list of child nodes. + * + * _Aliases:_ `nod` and `n` + * + * @param name - element node name + * @param attributes - node attributes + * @param text - node text + * + * @returns the document builder object + */ + node(name: string, attributes?: Object, text?: any): XMLDocumentCB; + nod(name: string, attributes?: Object, text?: any): XMLDocumentCB; + n(name: string, attributes?: Object, text?: any): XMLDocumentCB; + + /** + * Creates a child element node. + * + * _Aliases:_ `ele` and `e` + * + * @param name - element node name or a JS object defining the nodes + * to insert + * @param attributes - node attributes + * @param text - node text + * + * @returns the document builder object + */ + element(name: any, attributes?: Object, text?: any): XMLDocumentCB; + ele(name: any, attributes?: Object, text?: any): XMLDocumentCB; + e(name: any, attributes?: Object, text?: any): XMLDocumentCB; + + /** + * Adds or modifies an attribute. + * + * _Aliases:_ `att` and `a` + * + * @param name - attribute name + * @param value - attribute value + * + * @returns the document builder object + */ + attribute(name: any, value?: any): XMLDocumentCB; + att(name: any, value?: any): XMLDocumentCB; + a(name: any, value?: any): XMLDocumentCB; + + /** + * Creates a new text node and appends it to the list of child nodes. + * + * _Aliases:_ `txt` and `t` + * + * @param value - node value + * + * @returns the document builder object + */ + text(value: string): XMLDocumentCB; + txt(value: string): XMLDocumentCB; + t(value: string): XMLDocumentCB; + + /** + * Creates a new CDATA node and appends it to the list of child nodes. + * + * _Aliases:_ `dat` and `d` + * + * @param value - node value + * + * @returns the document builder object + */ + cdata(value: string): XMLDocumentCB; + dat(value: string): XMLDocumentCB; + d(value: string): XMLDocumentCB; + + /** + * Creates a new comment node and appends it to the list of child nodes. + * + * _Aliases:_ `com` and `c` + * + * @param value - node value + * + * @returns the document builder object + */ + comment(value: string): XMLDocumentCB; + com(value: string): XMLDocumentCB; + c(value: string): XMLDocumentCB; + + /** + * Creates a new raw text node and appends it to the list of child + * nodes. + * + * _Alias:_ `r` + * + * @param value - node value + * + * @returns the document builder object + */ + raw(value: string): XMLDocumentCB; + r(value: string): XMLDocumentCB; + + /** + * Creates a new processing instruction node and appends it to the list + * of child nodes. + * + * _Aliases:_ `ins` and `i` + * + * @param target - node target + * @param value - node value + * + * @returns the document builder object + */ + instruction(target: string, value: any): XMLDocumentCB; + instruction(array: Array): XMLDocumentCB; + instruction(obj: Object): XMLDocumentCB; + ins(target: string, value: any): XMLDocumentCB; + ins(array: Array): XMLDocumentCB; + ins(obj: Object): XMLDocumentCB; + i(target: string, value: any): XMLDocumentCB; + i(array: Array): XMLDocumentCB; + i(obj: Object): XMLDocumentCB; + + /** + * Creates the XML declaration. + * + * _Alias:_ `dec` + * + * @param version - version number string, e.g. `1.0` + * @param encoding - encoding declaration, e.g. `UTF-8` + * @param standalone - standalone document declaration: `true` or `false` + * + * @returns the document builder object + */ + declaration(version?: string, encoding?: string, + standalone?: boolean): XMLDocumentCB; + dec(version?: string, encoding?: string, + standalone?: boolean): XMLDocumentCB; + + /** + * Creates the document type definition. + * + * _Alias:_ `dtd` + * + * @param root - the name of the root node + * @param pubID - public identifier of the DTD + * @param sysID - system identifier of the DTD + * + * @returns the document builder object + */ + doctype(root: string, pubID?: string, sysID?: string): XMLDocumentCB; + dtd(root: string, pubID?: string, sysID?: string): XMLDocumentCB; + + /** + * Creates an element type declaration. + * + * _Aliases:_ `element` and `ele` + * + * @param name - element name + * @param value - element content (defaults to `#PCDATA`) + * + * @returns the document builder object + */ + dtdElement(name: string, value?: Object): XMLDocumentCB; + element(name: string, value?: Object): XMLDocumentCB; + ele(name: string, value?: Object): XMLDocumentCB; + + /** + * Creates an attribute declaration. + * + * _Alias:_ `att` + * + * @param elementName - the name of the element containing this attribute + * @param attributeName - attribute name + * @param attributeType - type of the attribute (defaults to `CDATA`) + * @param defaultValueType - default value type (either `#REQUIRED`, + * `#IMPLIED`, `#FIXED` or `#DEFAULT`) (defaults to `#IMPLIED`) + * @param defaultValue - default value of the attribute (only used + * for `#FIXED` or `#DEFAULT`) + * + * @returns the document builder object + */ + attList(elementName: string, attributeName: string, + attributeType: string, defaultValueType?: + string, defaultValue?: any): XMLDocumentCB; + att(elementName: string, attributeName: string, attributeType: string, + defaultValueType?: string, defaultValue?: any): XMLDocumentCB; + a(elementName: string, attributeName: string, attributeType: string, + defaultValueType?: string, defaultValue?: any): XMLDocumentCB; + + /** + * Creates a general entity declaration. + * + * _Alias:_ `ent` + * + * @param name - the name of the entity + * @param value - entity parameters + * + * @returns the document builder object + */ + entity(name: string, value: string | + { pubID?: string, sysID?: string, nData?: string }): XMLDocumentCB; + ent(name: string, value: string | + { pubID?: string, sysID?: string, nData?: string }): XMLDocumentCB; + + /** + * Creates a parameter entity declaration. + * + * _Alias:_ `pent` + * + * @param name - the name of the entity + * @param value - entity parameters + * + * @returns the document builder object + */ + pEntity(name: string, value: string | + { pubID?: string, sysID?: string }): XMLDocumentCB; + pent(name: string, value: string | + { pubID?: string, sysID?: string }): XMLDocumentCB; + + /** + * Creates a notation declaration. + * + * _Alias:_ `not` + * + * @param name - the name of the entity + * @param value - entity parameters + * + * @returns the document builder object + */ + notation(name: string, + value: { pubID?: string, sysID?: string }): XMLDocumentCB; + not(name: string, + value: { pubID?: string, sysID?: string }): XMLDocumentCB; + + /** + * Ends the document and calls the `onEnd` callback function. + */ + end(): void; + + /** + * Moves up to the parent node. + * + * _Alias:_ `u` + * + * @returns the document builder object + */ + up(): XMLDocumentCB; + u(): XMLDocumentCB; + } + +} diff --git a/node_modules/yallist/LICENSE b/node_modules/yallist/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/yallist/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and 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/yallist/README.md b/node_modules/yallist/README.md new file mode 100644 index 0000000..f586101 --- /dev/null +++ b/node_modules/yallist/README.md @@ -0,0 +1,204 @@ +# yallist + +Yet Another Linked List + +There are many doubly-linked list implementations like it, but this +one is mine. + +For when an array would be too big, and a Map can't be iterated in +reverse order. + + +[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist) + +## basic usage + +```javascript +var yallist = require('yallist') +var myList = yallist.create([1, 2, 3]) +myList.push('foo') +myList.unshift('bar') +// of course pop() and shift() are there, too +console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo'] +myList.forEach(function (k) { + // walk the list head to tail +}) +myList.forEachReverse(function (k, index, list) { + // walk the list tail to head +}) +var myDoubledList = myList.map(function (k) { + return k + k +}) +// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo'] +// mapReverse is also a thing +var myDoubledListReverse = myList.mapReverse(function (k) { + return k + k +}) // ['foofoo', 6, 4, 2, 'barbar'] + +var reduced = myList.reduce(function (set, entry) { + set += entry + return set +}, 'start') +console.log(reduced) // 'startfoo123bar' +``` + +## api + +The whole API is considered "public". + +Functions with the same name as an Array method work more or less the +same way. + +There's reverse versions of most things because that's the point. + +### Yallist + +Default export, the class that holds and manages a list. + +Call it with either a forEach-able (like an array) or a set of +arguments, to initialize the list. + +The Array-ish methods all act like you'd expect. No magic length, +though, so if you change that it won't automatically prune or add +empty spots. + +### Yallist.create(..) + +Alias for Yallist function. Some people like factories. + +#### yallist.head + +The first node in the list + +#### yallist.tail + +The last node in the list + +#### yallist.length + +The number of nodes in the list. (Change this at your peril. It is +not magic like Array length.) + +#### yallist.toArray() + +Convert the list to an array. + +#### yallist.forEach(fn, [thisp]) + +Call a function on each item in the list. + +#### yallist.forEachReverse(fn, [thisp]) + +Call a function on each item in the list, in reverse order. + +#### yallist.get(n) + +Get the data at position `n` in the list. If you use this a lot, +probably better off just using an Array. + +#### yallist.getReverse(n) + +Get the data at position `n`, counting from the tail. + +#### yallist.map(fn, thisp) + +Create a new Yallist with the result of calling the function on each +item. + +#### yallist.mapReverse(fn, thisp) + +Same as `map`, but in reverse. + +#### yallist.pop() + +Get the data from the list tail, and remove the tail from the list. + +#### yallist.push(item, ...) + +Insert one or more items to the tail of the list. + +#### yallist.reduce(fn, initialValue) + +Like Array.reduce. + +#### yallist.reduceReverse + +Like Array.reduce, but in reverse. + +#### yallist.reverse + +Reverse the list in place. + +#### yallist.shift() + +Get the data from the list head, and remove the head from the list. + +#### yallist.slice([from], [to]) + +Just like Array.slice, but returns a new Yallist. + +#### yallist.sliceReverse([from], [to]) + +Just like yallist.slice, but the result is returned in reverse. + +#### yallist.toArray() + +Create an array representation of the list. + +#### yallist.toArrayReverse() + +Create a reversed array representation of the list. + +#### yallist.unshift(item, ...) + +Insert one or more items to the head of the list. + +#### yallist.unshiftNode(node) + +Move a Node object to the front of the list. (That is, pull it out of +wherever it lives, and make it the new head.) + +If the node belongs to a different list, then that list will remove it +first. + +#### yallist.pushNode(node) + +Move a Node object to the end of the list. (That is, pull it out of +wherever it lives, and make it the new tail.) + +If the node belongs to a list already, then that list will remove it +first. + +#### yallist.removeNode(node) + +Remove a node from the list, preserving referential integrity of head +and tail and other nodes. + +Will throw an error if you try to have a list remove a node that +doesn't belong to it. + +### Yallist.Node + +The class that holds the data and is actually the list. + +Call with `var n = new Node(value, previousNode, nextNode)` + +Note that if you do direct operations on Nodes themselves, it's very +easy to get into weird states where the list is broken. Be careful :) + +#### node.next + +The next node in the list. + +#### node.prev + +The previous node in the list. + +#### node.value + +The data the node contains. + +#### node.list + +The list to which this node belongs. (Null if it does not belong to +any list.) diff --git a/node_modules/yallist/iterator.js b/node_modules/yallist/iterator.js new file mode 100644 index 0000000..d41c97a --- /dev/null +++ b/node_modules/yallist/iterator.js @@ -0,0 +1,8 @@ +'use strict' +module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } + } +} diff --git a/node_modules/yallist/package.json b/node_modules/yallist/package.json new file mode 100644 index 0000000..8a08386 --- /dev/null +++ b/node_modules/yallist/package.json @@ -0,0 +1,29 @@ +{ + "name": "yallist", + "version": "4.0.0", + "description": "Yet Another Linked List", + "main": "yallist.js", + "directories": { + "test": "test" + }, + "files": [ + "yallist.js", + "iterator.js" + ], + "dependencies": {}, + "devDependencies": { + "tap": "^12.1.0" + }, + "scripts": { + "test": "tap test/*.js --100", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/yallist.git" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC" +} diff --git a/node_modules/yallist/yallist.js b/node_modules/yallist/yallist.js new file mode 100644 index 0000000..4e83ab1 --- /dev/null +++ b/node_modules/yallist/yallist.js @@ -0,0 +1,426 @@ +'use strict' +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) + } + } + + return self +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + + var next = node.next + var prev = node.prev + + if (next) { + next.prev = prev + } + + if (prev) { + prev.next = next + } + + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + + node.list.length-- + node.next = null + node.prev = null + node.list = null + + return next +} + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } + + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } + + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } + + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} + +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + + return acc +} + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc +} + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} + +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.splice = function (start, deleteCount, ...nodes) { + if (start > this.length) { + start = this.length - 1 + } + if (start < 0) { + start = this.length + start; + } + + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next + } + + var ret = [] + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value) + walker = this.removeNode(walker) + } + if (walker === null) { + walker = this.tail + } + + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev + } + + for (var i = 0; i < nodes.length; i++) { + walker = insert(this, walker, nodes[i]) + } + return ret; +} + +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this +} + +function insert (self, node, value) { + var inserted = node === self.head ? + new Node(value, null, node, self) : + new Node(value, node, node.next, self) + + if (inserted.next === null) { + self.tail = inserted + } + if (inserted.prev === null) { + self.head = inserted + } + + self.length++ + + return inserted +} + +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail + } + self.length++ +} + +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head + } + self.length++ +} + +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } + + this.list = list + this.value = value + + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } + + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } +} + +try { + // add if support for Symbol.iterator is present + require('./iterator.js')(Yallist) +} catch (er) {} diff --git a/node_modules/yauzl/LICENSE b/node_modules/yauzl/LICENSE new file mode 100644 index 0000000..37538d4 --- /dev/null +++ b/node_modules/yauzl/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Josh Wolfe + +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/yauzl/README.md b/node_modules/yauzl/README.md new file mode 100644 index 0000000..d4e53f4 --- /dev/null +++ b/node_modules/yauzl/README.md @@ -0,0 +1,658 @@ +# yauzl + +[![Build Status](https://travis-ci.org/thejoshwolfe/yauzl.svg?branch=master)](https://travis-ci.org/thejoshwolfe/yauzl) +[![Coverage Status](https://img.shields.io/coveralls/thejoshwolfe/yauzl.svg)](https://coveralls.io/r/thejoshwolfe/yauzl) + +yet another unzip library for node. For zipping, see +[yazl](https://github.com/thejoshwolfe/yazl). + +Design principles: + + * Follow the spec. + Don't scan for local file headers. + Read the central directory for file metadata. + (see [No Streaming Unzip API](#no-streaming-unzip-api)). + * Don't block the JavaScript thread. + Use and provide async APIs. + * Keep memory usage under control. + Don't attempt to buffer entire files in RAM at once. + * Never crash (if used properly). + Don't let malformed zip files bring down client applications who are trying to catch errors. + * Catch unsafe file names. + See `validateFileName()`. + +## Usage + +```js +var yauzl = require("yauzl"); + +yauzl.open("path/to/file.zip", {lazyEntries: true}, function(err, zipfile) { + if (err) throw err; + zipfile.readEntry(); + zipfile.on("entry", function(entry) { + if (/\/$/.test(entry.fileName)) { + // Directory file names end with '/'. + // Note that entires for directories themselves are optional. + // An entry's fileName implicitly requires its parent directories to exist. + zipfile.readEntry(); + } else { + // file entry + zipfile.openReadStream(entry, function(err, readStream) { + if (err) throw err; + readStream.on("end", function() { + zipfile.readEntry(); + }); + readStream.pipe(somewhere); + }); + } + }); +}); +``` + +See also `examples/` for more usage examples. + +## API + +The default for every optional `callback` parameter is: + +```js +function defaultCallback(err) { + if (err) throw err; +} +``` + +### open(path, [options], [callback]) + +Calls `fs.open(path, "r")` and reads the `fd` effectively the same as `fromFd()` would. + +`options` may be omitted or `null`. The defaults are `{autoClose: true, lazyEntries: false, decodeStrings: true, validateEntrySizes: true, strictFileNames: false}`. + +`autoClose` is effectively equivalent to: + +```js +zipfile.once("end", function() { + zipfile.close(); +}); +``` + +`lazyEntries` indicates that entries should be read only when `readEntry()` is called. +If `lazyEntries` is `false`, `entry` events will be emitted as fast as possible to allow `pipe()`ing +file data from all entries in parallel. +This is not recommended, as it can lead to out of control memory usage for zip files with many entries. +See [issue #22](https://github.com/thejoshwolfe/yauzl/issues/22). +If `lazyEntries` is `true`, an `entry` or `end` event will be emitted in response to each call to `readEntry()`. +This allows processing of one entry at a time, and will keep memory usage under control for zip files with many entries. + +`decodeStrings` is the default and causes yauzl to decode strings with `CP437` or `UTF-8` as required by the spec. +The exact effects of turning this option off are: + +* `zipfile.comment`, `entry.fileName`, and `entry.fileComment` will be `Buffer` objects instead of `String`s. +* Any Info-ZIP Unicode Path Extra Field will be ignored. See `extraFields`. +* Automatic file name validation will not be performed. See `validateFileName()`. + +`validateEntrySizes` is the default and ensures that an entry's reported uncompressed size matches its actual uncompressed size. +This check happens as early as possible, which is either before emitting each `"entry"` event (for entries with no compression), +or during the `readStream` piping after calling `openReadStream()`. +See `openReadStream()` for more information on defending against zip bomb attacks. + +When `strictFileNames` is `false` (the default) and `decodeStrings` is `true`, +all backslash (`\`) characters in each `entry.fileName` are replaced with forward slashes (`/`). +The spec forbids file names with backslashes, +but Microsoft's `System.IO.Compression.ZipFile` class in .NET versions 4.5.0 until 4.6.1 +creates non-conformant zipfiles with backslashes in file names. +`strictFileNames` is `false` by default so that clients can read these +non-conformant zipfiles without knowing about this Microsoft-specific bug. +When `strictFileNames` is `true` and `decodeStrings` is `true`, +entries with backslashes in their file names will result in an error. See `validateFileName()`. +When `decodeStrings` is `false`, `strictFileNames` has no effect. + +The `callback` is given the arguments `(err, zipfile)`. +An `err` is provided if the End of Central Directory Record cannot be found, or if its metadata appears malformed. +This kind of error usually indicates that this is not a zip file. +Otherwise, `zipfile` is an instance of `ZipFile`. + +### fromFd(fd, [options], [callback]) + +Reads from the fd, which is presumed to be an open .zip file. +Note that random access is required by the zip file specification, +so the fd cannot be an open socket or any other fd that does not support random access. + +`options` may be omitted or `null`. The defaults are `{autoClose: false, lazyEntries: false, decodeStrings: true, validateEntrySizes: true, strictFileNames: false}`. + +See `open()` for the meaning of the options and callback. + +### fromBuffer(buffer, [options], [callback]) + +Like `fromFd()`, but reads from a RAM buffer instead of an open file. +`buffer` is a `Buffer`. + +If a `ZipFile` is acquired from this method, +it will never emit the `close` event, +and calling `close()` is not necessary. + +`options` may be omitted or `null`. The defaults are `{lazyEntries: false, decodeStrings: true, validateEntrySizes: true, strictFileNames: false}`. + +See `open()` for the meaning of the options and callback. +The `autoClose` option is ignored for this method. + +### fromRandomAccessReader(reader, totalSize, [options], [callback]) + +This method of reading a zip file allows clients to implement their own back-end file system. +For example, a client might translate read calls into network requests. + +The `reader` parameter must be of a type that is a subclass of +[RandomAccessReader](#class-randomaccessreader) that implements the required methods. +The `totalSize` is a Number and indicates the total file size of the zip file. + +`options` may be omitted or `null`. The defaults are `{autoClose: true, lazyEntries: false, decodeStrings: true, validateEntrySizes: true, strictFileNames: false}`. + +See `open()` for the meaning of the options and callback. + +### dosDateTimeToDate(date, time) + +Converts MS-DOS `date` and `time` data into a JavaScript `Date` object. +Each parameter is a `Number` treated as an unsigned 16-bit integer. +Note that this format does not support timezones, +so the returned object will use the local timezone. + +### validateFileName(fileName) + +Returns `null` or a `String` error message depending on the validity of `fileName`. +If `fileName` starts with `"/"` or `/[A-Za-z]:\//` or if it contains `".."` path segments or `"\\"`, +this function returns an error message appropriate for use like this: + +```js +var errorMessage = yauzl.validateFileName(fileName); +if (errorMessage != null) throw new Error(errorMessage); +``` + +This function is automatically run for each entry, as long as `decodeStrings` is `true`. +See `open()`, `strictFileNames`, and `Event: "entry"` for more information. + +### Class: ZipFile + +The constructor for the class is not part of the public API. +Use `open()`, `fromFd()`, `fromBuffer()`, or `fromRandomAccessReader()` instead. + +#### Event: "entry" + +Callback gets `(entry)`, which is an `Entry`. +See `open()` and `readEntry()` for when this event is emitted. + +If `decodeStrings` is `true`, entries emitted via this event have already passed file name validation. +See `validateFileName()` and `open()` for more information. + +If `validateEntrySizes` is `true` and this entry's `compressionMethod` is `0` (stored without compression), +this entry has already passed entry size validation. +See `open()` for more information. + +#### Event: "end" + +Emitted after the last `entry` event has been emitted. +See `open()` and `readEntry()` for more info on when this event is emitted. + +#### Event: "close" + +Emitted after the fd is actually closed. +This is after calling `close()` (or after the `end` event when `autoClose` is `true`), +and after all stream pipelines created from `openReadStream()` have finished reading data from the fd. + +If this `ZipFile` was acquired from `fromRandomAccessReader()`, +the "fd" in the previous paragraph refers to the `RandomAccessReader` implemented by the client. + +If this `ZipFile` was acquired from `fromBuffer()`, this event is never emitted. + +#### Event: "error" + +Emitted in the case of errors with reading the zip file. +(Note that other errors can be emitted from the streams created from `openReadStream()` as well.) +After this event has been emitted, no further `entry`, `end`, or `error` events will be emitted, +but the `close` event may still be emitted. + +#### readEntry() + +Causes this `ZipFile` to emit an `entry` or `end` event (or an `error` event). +This method must only be called when this `ZipFile` was created with the `lazyEntries` option set to `true` (see `open()`). +When this `ZipFile` was created with the `lazyEntries` option set to `true`, +`entry` and `end` events are only ever emitted in response to this method call. + +The event that is emitted in response to this method will not be emitted until after this method has returned, +so it is safe to call this method before attaching event listeners. + +After calling this method, calling this method again before the response event has been emitted will cause undefined behavior. +Calling this method after the `end` event has been emitted will cause undefined behavior. +Calling this method after calling `close()` will cause undefined behavior. + +#### openReadStream(entry, [options], callback) + +`entry` must be an `Entry` object from this `ZipFile`. +`callback` gets `(err, readStream)`, where `readStream` is a `Readable Stream` that provides the file data for this entry. +If this zipfile is already closed (see `close()`), the `callback` will receive an `err`. + +`options` may be omitted or `null`, and has the following defaults: + +```js +{ + decompress: entry.isCompressed() ? true : null, + decrypt: null, + start: 0, // actually the default is null, see below + end: entry.compressedSize, // actually the default is null, see below +} +``` + +If the entry is compressed (with a supported compression method), +and the `decompress` option is `true` (or omitted), +the read stream provides the decompressed data. +Omitting the `decompress` option is what most clients should do. + +The `decompress` option must be `null` (or omitted) when the entry is not compressed (see `isCompressed()`), +and either `true` (or omitted) or `false` when the entry is compressed. +Specifying `decompress: false` for a compressed entry causes the read stream +to provide the raw compressed file data without going through a zlib inflate transform. + +If the entry is encrypted (see `isEncrypted()`), clients may want to avoid calling `openReadStream()` on the entry entirely. +Alternatively, clients may call `openReadStream()` for encrypted entries and specify `decrypt: false`. +If the entry is also compressed, clients must *also* specify `decompress: false`. +Specifying `decrypt: false` for an encrypted entry causes the read stream to provide the raw, still-encrypted file data. +(This data includes the 12-byte header described in the spec.) + +The `decrypt` option must be `null` (or omitted) for non-encrypted entries, and `false` for encrypted entries. +Omitting the `decrypt` option (or specifying it as `null`) for an encrypted entry +will result in the `callback` receiving an `err`. +This default behavior is so that clients not accounting for encrypted files aren't surprised by bogus file data. + +The `start` (inclusive) and `end` (exclusive) options are byte offsets into this entry's file data, +and can be used to obtain part of an entry's file data rather than the whole thing. +If either of these options are specified and non-`null`, +then the above options must be used to obain the file's raw data. +Speficying `{start: 0, end: entry.compressedSize}` will result in the complete file, +which is effectively the default values for these options, +but note that unlike omitting the options, when you specify `start` or `end` as any non-`null` value, +the above requirement is still enforced that you must also pass the appropriate options to get the file's raw data. + +It's possible for the `readStream` provided to the `callback` to emit errors for several reasons. +For example, if zlib cannot decompress the data, the zlib error will be emitted from the `readStream`. +Two more error cases (when `validateEntrySizes` is `true`) are if the decompressed data has too many +or too few actual bytes compared to the reported byte count from the entry's `uncompressedSize` field. +yauzl notices this false information and emits an error from the `readStream` +after some number of bytes have already been piped through the stream. + +This check allows clients to trust the `uncompressedSize` field in `Entry` objects. +Guarding against [zip bomb](http://en.wikipedia.org/wiki/Zip_bomb) attacks can be accomplished by +doing some heuristic checks on the size metadata and then watching out for the above errors. +Such heuristics are outside the scope of this library, +but enforcing the `uncompressedSize` is implemented here as a security feature. + +It is possible to destroy the `readStream` before it has piped all of its data. +To do this, call `readStream.destroy()`. +You must `unpipe()` the `readStream` from any destination before calling `readStream.destroy()`. +If this zipfile was created using `fromRandomAccessReader()`, the `RandomAccessReader` implementation +must provide readable streams that implement a `.destroy()` method (see `randomAccessReader._readStreamForRange()`) +in order for calls to `readStream.destroy()` to work in this context. + +#### close() + +Causes all future calls to `openReadStream()` to fail, +and closes the fd, if any, after all streams created by `openReadStream()` have emitted their `end` events. + +If the `autoClose` option is set to `true` (see `open()`), +this function will be called automatically effectively in response to this object's `end` event. + +If the `lazyEntries` option is set to `false` (see `open()`) and this object's `end` event has not been emitted yet, +this function causes undefined behavior. +If the `lazyEntries` option is set to `true`, +you can call this function instead of calling `readEntry()` to abort reading the entries of a zipfile. + +It is safe to call this function multiple times; after the first call, successive calls have no effect. +This includes situations where the `autoClose` option effectively calls this function for you. + +If `close()` is never called, then the zipfile is "kept open". +For zipfiles created with `fromFd()`, this will leave the `fd` open, which may be desirable. +For zipfiles created with `open()`, this will leave the underlying `fd` open, thereby "leaking" it, which is probably undesirable. +For zipfiles created with `fromRandomAccessReader()`, the reader's `close()` method will never be called. +For zipfiles created with `fromBuffer()`, the `close()` function has no effect whether called or not. + +Regardless of how this `ZipFile` was created, there are no resources other than those listed above that require cleanup from this function. +This means it may be desirable to never call `close()` in some usecases. + +#### isOpen + +`Boolean`. `true` until `close()` is called; then it's `false`. + +#### entryCount + +`Number`. Total number of central directory records. + +#### comment + +`String`. Always decoded with `CP437` per the spec. + +If `decodeStrings` is `false` (see `open()`), this field is the undecoded `Buffer` instead of a decoded `String`. + +### Class: Entry + +Objects of this class represent Central Directory Records. +Refer to the zipfile specification for more details about these fields. + +These fields are of type `Number`: + + * `versionMadeBy` + * `versionNeededToExtract` + * `generalPurposeBitFlag` + * `compressionMethod` + * `lastModFileTime` (MS-DOS format, see `getLastModDateTime`) + * `lastModFileDate` (MS-DOS format, see `getLastModDateTime`) + * `crc32` + * `compressedSize` + * `uncompressedSize` + * `fileNameLength` (bytes) + * `extraFieldLength` (bytes) + * `fileCommentLength` (bytes) + * `internalFileAttributes` + * `externalFileAttributes` + * `relativeOffsetOfLocalHeader` + +#### fileName + +`String`. +Following the spec, the bytes for the file name are decoded with +`UTF-8` if `generalPurposeBitFlag & 0x800`, otherwise with `CP437`. +Alternatively, this field may be populated from the Info-ZIP Unicode Path Extra Field +(see `extraFields`). + +This field is automatically validated by `validateFileName()` before yauzl emits an "entry" event. +If this field would contain unsafe characters, yauzl emits an error instead of an entry. + +If `decodeStrings` is `false` (see `open()`), this field is the undecoded `Buffer` instead of a decoded `String`. +Therefore, `generalPurposeBitFlag` and any Info-ZIP Unicode Path Extra Field are ignored. +Furthermore, no automatic file name validation is performed for this file name. + +#### extraFields + +`Array` with each entry in the form `{id: id, data: data}`, +where `id` is a `Number` and `data` is a `Buffer`. + +This library looks for and reads the ZIP64 Extended Information Extra Field (0x0001) +in order to support ZIP64 format zip files. + +This library also looks for and reads the Info-ZIP Unicode Path Extra Field (0x7075) +in order to support some zipfiles that use it instead of General Purpose Bit 11 +to convey `UTF-8` file names. +When the field is identified and verified to be reliable (see the zipfile spec), +the the file name in this field is stored in the `fileName` property, +and the file name in the central directory record for this entry is ignored. +Note that when `decodeStrings` is false, all Info-ZIP Unicode Path Extra Fields are ignored. + +None of the other fields are considered significant by this library. +Fields that this library reads are left unalterned in the `extraFields` array. + +#### fileComment + +`String` decoded with the charset indicated by `generalPurposeBitFlag & 0x800` as with the `fileName`. +(The Info-ZIP Unicode Path Extra Field has no effect on the charset used for this field.) + +If `decodeStrings` is `false` (see `open()`), this field is the undecoded `Buffer` instead of a decoded `String`. + +Prior to yauzl version 2.7.0, this field was erroneously documented as `comment` instead of `fileComment`. +For compatibility with any code that uses the field name `comment`, +yauzl creates an alias field named `comment` which is identical to `fileComment`. + +#### getLastModDate() + +Effectively implemented as: + +```js +return dosDateTimeToDate(this.lastModFileDate, this.lastModFileTime); +``` + +#### isEncrypted() + +Returns is this entry encrypted with "Traditional Encryption". +Effectively implemented as: + +```js +return (this.generalPurposeBitFlag & 0x1) !== 0; +``` + +See `openReadStream()` for the implications of this value. + +Note that "Strong Encryption" is not supported, and will result in an `"error"` event emitted from the `ZipFile`. + +#### isCompressed() + +Effectively implemented as: + +```js +return this.compressionMethod === 8; +``` + +See `openReadStream()` for the implications of this value. + +### Class: RandomAccessReader + +This class is meant to be subclassed by clients and instantiated for the `fromRandomAccessReader()` function. + +An example implementation can be found in `test/test.js`. + +#### randomAccessReader._readStreamForRange(start, end) + +Subclasses *must* implement this method. + +`start` and `end` are Numbers and indicate byte offsets from the start of the file. +`end` is exclusive, so `_readStreamForRange(0x1000, 0x2000)` would indicate to read `0x1000` bytes. +`end - start` will always be at least `1`. + +This method should return a readable stream which will be `pipe()`ed into another stream. +It is expected that the readable stream will provide data in several chunks if necessary. +If the readable stream provides too many or too few bytes, an error will be emitted. +(Note that `validateEntrySizes` has no effect on this check, +because this is a low-level API that should behave correctly regardless of the contents of the file.) +Any errors emitted on the readable stream will be handled and re-emitted on the client-visible stream +(returned from `zipfile.openReadStream()`) or provided as the `err` argument to the appropriate callback +(for example, for `fromRandomAccessReader()`). + +The returned stream *must* implement a method `.destroy()` +if you call `readStream.destroy()` on streams you get from `openReadStream()`. +If you never call `readStream.destroy()`, then streams returned from this method do not need to implement a method `.destroy()`. +`.destroy()` should abort any streaming that is in progress and clean up any associated resources. +`.destroy()` will only be called after the stream has been `unpipe()`d from its destination. + +Note that the stream returned from this method might not be the same object that is provided by `openReadStream()`. +The stream returned from this method might be `pipe()`d through one or more filter streams (for example, a zlib inflate stream). + +#### randomAccessReader.read(buffer, offset, length, position, callback) + +Subclasses may implement this method. +The default implementation uses `createReadStream()` to fill the `buffer`. + +This method should behave like `fs.read()`. + +#### randomAccessReader.close(callback) + +Subclasses may implement this method. +The default implementation is effectively `setImmediate(callback);`. + +`callback` takes parameters `(err)`. + +This method is called once the all streams returned from `_readStreamForRange()` have ended, +and no more `_readStreamForRange()` or `read()` requests will be issued to this object. + +## How to Avoid Crashing + +When a malformed zipfile is encountered, the default behavior is to crash (throw an exception). +If you want to handle errors more gracefully than this, +be sure to do the following: + + * Provide `callback` parameters where they are allowed, and check the `err` parameter. + * Attach a listener for the `error` event on any `ZipFile` object you get from `open()`, `fromFd()`, `fromBuffer()`, or `fromRandomAccessReader()`. + * Attach a listener for the `error` event on any stream you get from `openReadStream()`. + +Minor version updates to yauzl will not add any additional requirements to this list. + +## Limitations + +### No Streaming Unzip API + +Due to the design of the .zip file format, it's impossible to interpret a .zip file from start to finish +(such as from a readable stream) without sacrificing correctness. +The Central Directory, which is the authority on the contents of the .zip file, is at the end of a .zip file, not the beginning. +A streaming API would need to either buffer the entire .zip file to get to the Central Directory before interpreting anything +(defeating the purpose of a streaming interface), or rely on the Local File Headers which are interspersed through the .zip file. +However, the Local File Headers are explicitly denounced in the spec as being unreliable copies of the Central Directory, +so trusting them would be a violation of the spec. + +Any library that offers a streaming unzip API must make one of the above two compromises, +which makes the library either dishonest or nonconformant (usually the latter). +This library insists on correctness and adherence to the spec, and so does not offer a streaming API. + +Here is a way to create a spec-conformant .zip file using the `zip` command line program (Info-ZIP) +available in most unix-like environments, that is (nearly) impossible to parse correctly with a streaming parser: + +``` +$ echo -ne '\x50\x4b\x07\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' > file.txt +$ zip -q0 - file.txt | cat > out.zip +``` + +This .zip file contains a single file entry that uses General Purpose Bit 3, +which means the Local File Header doesn't know the size of the file. +Any streaming parser that encounters this situation will either immediately fail, +or attempt to search for the Data Descriptor after the file's contents. +The file's contents is a sequence of 16-bytes crafted to exactly mimic a valid Data Descriptor for an empty file, +which will fool any parser that gets this far into thinking that the file is empty rather than containing 16-bytes. +What follows the file's real contents is the file's real Data Descriptor, +which will likely cause some kind of signature mismatch error for a streaming parser (if one hasn't occurred already). + +By using General Purpose Bit 3 (and compression method 0), +it's possible to create arbitrarily ambiguous .zip files that +distract parsers with file contents that contain apparently valid .zip file metadata. + +### Limitted ZIP64 Support + +For ZIP64, only zip files smaller than `8PiB` are supported, +not the full `16EiB` range that a 64-bit integer should be able to index. +This is due to the JavaScript Number type being an IEEE 754 double precision float. + +The Node.js `fs` module probably has this same limitation. + +### ZIP64 Extensible Data Sector Is Ignored + +The spec does not allow zip file creators to put arbitrary data here, +but rather reserves its use for PKWARE and mentions something about Z390. +This doesn't seem useful to expose in this library, so it is ignored. + +### No Multi-Disk Archive Support + +This library does not support multi-disk zip files. +The multi-disk fields in the zipfile spec were intended for a zip file to span multiple floppy disks, +which probably never happens now. +If the "number of this disk" field in the End of Central Directory Record is not `0`, +the `open()`, `fromFd()`, `fromBuffer()`, or `fromRandomAccessReader()` `callback` will receive an `err`. +By extension the following zip file fields are ignored by this library and not provided to clients: + + * Disk where central directory starts + * Number of central directory records on this disk + * Disk number where file starts + +### Limited Encryption Handling + +You can detect when a file entry is encrypted with "Traditional Encryption" via `isEncrypted()`, +but yauzl will not help you decrypt it. +See `openReadStream()`. + +If a zip file contains file entries encrypted with "Strong Encryption", yauzl emits an error. + +If the central directory is encrypted or compressed, yauzl emits an error. + +### Local File Headers Are Ignored + +Many unzip libraries mistakenly read the Local File Header data in zip files. +This data is officially defined to be redundant with the Central Directory information, +and is not to be trusted. +Aside from checking the signature, yauzl ignores the content of the Local File Header. + +### No CRC-32 Checking + +This library provides the `crc32` field of `Entry` objects read from the Central Directory. +However, this field is not used for anything in this library. + +### versionNeededToExtract Is Ignored + +The field `versionNeededToExtract` is ignored, +because this library doesn't support the complete zip file spec at any version, + +### No Support For Obscure Compression Methods + +Regarding the `compressionMethod` field of `Entry` objects, +only method `0` (stored with no compression) +and method `8` (deflated) are supported. +Any of the other 15 official methods will cause the `openReadStream()` `callback` to receive an `err`. + +### Data Descriptors Are Ignored + +There may or may not be Data Descriptor sections in a zip file. +This library provides no support for finding or interpreting them. + +### Archive Extra Data Record Is Ignored + +There may or may not be an Archive Extra Data Record section in a zip file. +This library provides no support for finding or interpreting it. + +### No Language Encoding Flag Support + +Zip files officially support charset encodings other than CP437 and UTF-8, +but the zip file spec does not specify how it works. +This library makes no attempt to interpret the Language Encoding Flag. + +## Change History + + * 2.10.0 + * Added support for non-conformant zipfiles created by Microsoft, and added option `strictFileNames` to disable the workaround. [issue #66](https://github.com/thejoshwolfe/yauzl/issues/66), [issue #88](https://github.com/thejoshwolfe/yauzl/issues/88) + * 2.9.2 + * Removed `tools/hexdump-zip.js` and `tools/hex2bin.js`. Those tools are now located here: [thejoshwolfe/hexdump-zip](https://github.com/thejoshwolfe/hexdump-zip) and [thejoshwolfe/hex2bin](https://github.com/thejoshwolfe/hex2bin) + * Worked around performance problem with zlib when using `fromBuffer()` and `readStream.destroy()` for large compressed files. [issue #87](https://github.com/thejoshwolfe/yauzl/issues/87) + * 2.9.1 + * Removed `console.log()` accidentally introduced in 2.9.0. [issue #64](https://github.com/thejoshwolfe/yauzl/issues/64) + * 2.9.0 + * Throw an exception if `readEntry()` is called without `lazyEntries:true`. Previously this caused undefined behavior. [issue #63](https://github.com/thejoshwolfe/yauzl/issues/63) + * 2.8.0 + * Added option `validateEntrySizes`. [issue #53](https://github.com/thejoshwolfe/yauzl/issues/53) + * Added `examples/promises.js` + * Added ability to read raw file data via `decompress` and `decrypt` options. [issue #11](https://github.com/thejoshwolfe/yauzl/issues/11), [issue #38](https://github.com/thejoshwolfe/yauzl/issues/38), [pull #39](https://github.com/thejoshwolfe/yauzl/pull/39) + * Added `start` and `end` options to `openReadStream()`. [issue #38](https://github.com/thejoshwolfe/yauzl/issues/38) + * 2.7.0 + * Added option `decodeStrings`. [issue #42](https://github.com/thejoshwolfe/yauzl/issues/42) + * Fixed documentation for `entry.fileComment` and added compatibility alias. [issue #47](https://github.com/thejoshwolfe/yauzl/issues/47) + * 2.6.0 + * Support Info-ZIP Unicode Path Extra Field, used by WinRAR for Chinese file names. [issue #33](https://github.com/thejoshwolfe/yauzl/issues/33) + * 2.5.0 + * Ignore malformed Extra Field that is common in Android .apk files. [issue #31](https://github.com/thejoshwolfe/yauzl/issues/31) + * 2.4.3 + * Fix crash when parsing malformed Extra Field buffers. [issue #31](https://github.com/thejoshwolfe/yauzl/issues/31) + * 2.4.2 + * Remove .npmignore and .travis.yml from npm package. + * 2.4.1 + * Fix error handling. + * 2.4.0 + * Add ZIP64 support. [issue #6](https://github.com/thejoshwolfe/yauzl/issues/6) + * Add `lazyEntries` option. [issue #22](https://github.com/thejoshwolfe/yauzl/issues/22) + * Add `readStream.destroy()` method. [issue #26](https://github.com/thejoshwolfe/yauzl/issues/26) + * Add `fromRandomAccessReader()`. [issue #14](https://github.com/thejoshwolfe/yauzl/issues/14) + * Add `examples/unzip.js`. + * 2.3.1 + * Documentation updates. + * 2.3.0 + * Check that `uncompressedSize` is correct, or else emit an error. [issue #13](https://github.com/thejoshwolfe/yauzl/issues/13) + * 2.2.1 + * Update dependencies. + * 2.2.0 + * Update dependencies. + * 2.1.0 + * Remove dependency on `iconv`. + * 2.0.3 + * Fix crash when trying to read a 0-byte file. + * 2.0.2 + * Fix event behavior after errors. + * 2.0.1 + * Fix bug with using `iconv`. + * 2.0.0 + * Initial release. diff --git a/node_modules/yauzl/index.js b/node_modules/yauzl/index.js new file mode 100644 index 0000000..cf5d70d --- /dev/null +++ b/node_modules/yauzl/index.js @@ -0,0 +1,796 @@ +var fs = require("fs"); +var zlib = require("zlib"); +var fd_slicer = require("fd-slicer"); +var crc32 = require("buffer-crc32"); +var util = require("util"); +var EventEmitter = require("events").EventEmitter; +var Transform = require("stream").Transform; +var PassThrough = require("stream").PassThrough; +var Writable = require("stream").Writable; + +exports.open = open; +exports.fromFd = fromFd; +exports.fromBuffer = fromBuffer; +exports.fromRandomAccessReader = fromRandomAccessReader; +exports.dosDateTimeToDate = dosDateTimeToDate; +exports.validateFileName = validateFileName; +exports.ZipFile = ZipFile; +exports.Entry = Entry; +exports.RandomAccessReader = RandomAccessReader; + +function open(path, options, callback) { + if (typeof options === "function") { + callback = options; + options = null; + } + if (options == null) options = {}; + if (options.autoClose == null) options.autoClose = true; + if (options.lazyEntries == null) options.lazyEntries = false; + if (options.decodeStrings == null) options.decodeStrings = true; + if (options.validateEntrySizes == null) options.validateEntrySizes = true; + if (options.strictFileNames == null) options.strictFileNames = false; + if (callback == null) callback = defaultCallback; + fs.open(path, "r", function(err, fd) { + if (err) return callback(err); + fromFd(fd, options, function(err, zipfile) { + if (err) fs.close(fd, defaultCallback); + callback(err, zipfile); + }); + }); +} + +function fromFd(fd, options, callback) { + if (typeof options === "function") { + callback = options; + options = null; + } + if (options == null) options = {}; + if (options.autoClose == null) options.autoClose = false; + if (options.lazyEntries == null) options.lazyEntries = false; + if (options.decodeStrings == null) options.decodeStrings = true; + if (options.validateEntrySizes == null) options.validateEntrySizes = true; + if (options.strictFileNames == null) options.strictFileNames = false; + if (callback == null) callback = defaultCallback; + fs.fstat(fd, function(err, stats) { + if (err) return callback(err); + var reader = fd_slicer.createFromFd(fd, {autoClose: true}); + fromRandomAccessReader(reader, stats.size, options, callback); + }); +} + +function fromBuffer(buffer, options, callback) { + if (typeof options === "function") { + callback = options; + options = null; + } + if (options == null) options = {}; + options.autoClose = false; + if (options.lazyEntries == null) options.lazyEntries = false; + if (options.decodeStrings == null) options.decodeStrings = true; + if (options.validateEntrySizes == null) options.validateEntrySizes = true; + if (options.strictFileNames == null) options.strictFileNames = false; + // limit the max chunk size. see https://github.com/thejoshwolfe/yauzl/issues/87 + var reader = fd_slicer.createFromBuffer(buffer, {maxChunkSize: 0x10000}); + fromRandomAccessReader(reader, buffer.length, options, callback); +} + +function fromRandomAccessReader(reader, totalSize, options, callback) { + if (typeof options === "function") { + callback = options; + options = null; + } + if (options == null) options = {}; + if (options.autoClose == null) options.autoClose = true; + if (options.lazyEntries == null) options.lazyEntries = false; + if (options.decodeStrings == null) options.decodeStrings = true; + var decodeStrings = !!options.decodeStrings; + if (options.validateEntrySizes == null) options.validateEntrySizes = true; + if (options.strictFileNames == null) options.strictFileNames = false; + if (callback == null) callback = defaultCallback; + if (typeof totalSize !== "number") throw new Error("expected totalSize parameter to be a number"); + if (totalSize > Number.MAX_SAFE_INTEGER) { + throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double."); + } + + // the matching unref() call is in zipfile.close() + reader.ref(); + + // eocdr means End of Central Directory Record. + // search backwards for the eocdr signature. + // the last field of the eocdr is a variable-length comment. + // the comment size is encoded in a 2-byte field in the eocdr, which we can't find without trudging backwards through the comment to find it. + // as a consequence of this design decision, it's possible to have ambiguous zip file metadata if a coherent eocdr was in the comment. + // we search backwards for a eocdr signature, and hope that whoever made the zip file was smart enough to forbid the eocdr signature in the comment. + var eocdrWithoutCommentSize = 22; + var maxCommentSize = 0xffff; // 2-byte size + var bufferSize = Math.min(eocdrWithoutCommentSize + maxCommentSize, totalSize); + var buffer = newBuffer(bufferSize); + var bufferReadStart = totalSize - buffer.length; + readAndAssertNoEof(reader, buffer, 0, bufferSize, bufferReadStart, function(err) { + if (err) return callback(err); + for (var i = bufferSize - eocdrWithoutCommentSize; i >= 0; i -= 1) { + if (buffer.readUInt32LE(i) !== 0x06054b50) continue; + // found eocdr + var eocdrBuffer = buffer.slice(i); + + // 0 - End of central directory signature = 0x06054b50 + // 4 - Number of this disk + var diskNumber = eocdrBuffer.readUInt16LE(4); + if (diskNumber !== 0) { + return callback(new Error("multi-disk zip files are not supported: found disk number: " + diskNumber)); + } + // 6 - Disk where central directory starts + // 8 - Number of central directory records on this disk + // 10 - Total number of central directory records + var entryCount = eocdrBuffer.readUInt16LE(10); + // 12 - Size of central directory (bytes) + // 16 - Offset of start of central directory, relative to start of archive + var centralDirectoryOffset = eocdrBuffer.readUInt32LE(16); + // 20 - Comment length + var commentLength = eocdrBuffer.readUInt16LE(20); + var expectedCommentLength = eocdrBuffer.length - eocdrWithoutCommentSize; + if (commentLength !== expectedCommentLength) { + return callback(new Error("invalid comment length. expected: " + expectedCommentLength + ". found: " + commentLength)); + } + // 22 - Comment + // the encoding is always cp437. + var comment = decodeStrings ? decodeBuffer(eocdrBuffer, 22, eocdrBuffer.length, false) + : eocdrBuffer.slice(22); + + if (!(entryCount === 0xffff || centralDirectoryOffset === 0xffffffff)) { + return callback(null, new ZipFile(reader, centralDirectoryOffset, totalSize, entryCount, comment, options.autoClose, options.lazyEntries, decodeStrings, options.validateEntrySizes, options.strictFileNames)); + } + + // ZIP64 format + + // ZIP64 Zip64 end of central directory locator + var zip64EocdlBuffer = newBuffer(20); + var zip64EocdlOffset = bufferReadStart + i - zip64EocdlBuffer.length; + readAndAssertNoEof(reader, zip64EocdlBuffer, 0, zip64EocdlBuffer.length, zip64EocdlOffset, function(err) { + if (err) return callback(err); + + // 0 - zip64 end of central dir locator signature = 0x07064b50 + if (zip64EocdlBuffer.readUInt32LE(0) !== 0x07064b50) { + return callback(new Error("invalid zip64 end of central directory locator signature")); + } + // 4 - number of the disk with the start of the zip64 end of central directory + // 8 - relative offset of the zip64 end of central directory record + var zip64EocdrOffset = readUInt64LE(zip64EocdlBuffer, 8); + // 16 - total number of disks + + // ZIP64 end of central directory record + var zip64EocdrBuffer = newBuffer(56); + readAndAssertNoEof(reader, zip64EocdrBuffer, 0, zip64EocdrBuffer.length, zip64EocdrOffset, function(err) { + if (err) return callback(err); + + // 0 - zip64 end of central dir signature 4 bytes (0x06064b50) + if (zip64EocdrBuffer.readUInt32LE(0) !== 0x06064b50) { + return callback(new Error("invalid zip64 end of central directory record signature")); + } + // 4 - size of zip64 end of central directory record 8 bytes + // 12 - version made by 2 bytes + // 14 - version needed to extract 2 bytes + // 16 - number of this disk 4 bytes + // 20 - number of the disk with the start of the central directory 4 bytes + // 24 - total number of entries in the central directory on this disk 8 bytes + // 32 - total number of entries in the central directory 8 bytes + entryCount = readUInt64LE(zip64EocdrBuffer, 32); + // 40 - size of the central directory 8 bytes + // 48 - offset of start of central directory with respect to the starting disk number 8 bytes + centralDirectoryOffset = readUInt64LE(zip64EocdrBuffer, 48); + // 56 - zip64 extensible data sector (variable size) + return callback(null, new ZipFile(reader, centralDirectoryOffset, totalSize, entryCount, comment, options.autoClose, options.lazyEntries, decodeStrings, options.validateEntrySizes, options.strictFileNames)); + }); + }); + return; + } + callback(new Error("end of central directory record signature not found")); + }); +} + +util.inherits(ZipFile, EventEmitter); +function ZipFile(reader, centralDirectoryOffset, fileSize, entryCount, comment, autoClose, lazyEntries, decodeStrings, validateEntrySizes, strictFileNames) { + var self = this; + EventEmitter.call(self); + self.reader = reader; + // forward close events + self.reader.on("error", function(err) { + // error closing the fd + emitError(self, err); + }); + self.reader.once("close", function() { + self.emit("close"); + }); + self.readEntryCursor = centralDirectoryOffset; + self.fileSize = fileSize; + self.entryCount = entryCount; + self.comment = comment; + self.entriesRead = 0; + self.autoClose = !!autoClose; + self.lazyEntries = !!lazyEntries; + self.decodeStrings = !!decodeStrings; + self.validateEntrySizes = !!validateEntrySizes; + self.strictFileNames = !!strictFileNames; + self.isOpen = true; + self.emittedError = false; + + if (!self.lazyEntries) self._readEntry(); +} +ZipFile.prototype.close = function() { + if (!this.isOpen) return; + this.isOpen = false; + this.reader.unref(); +}; + +function emitErrorAndAutoClose(self, err) { + if (self.autoClose) self.close(); + emitError(self, err); +} +function emitError(self, err) { + if (self.emittedError) return; + self.emittedError = true; + self.emit("error", err); +} + +ZipFile.prototype.readEntry = function() { + if (!this.lazyEntries) throw new Error("readEntry() called without lazyEntries:true"); + this._readEntry(); +}; +ZipFile.prototype._readEntry = function() { + var self = this; + if (self.entryCount === self.entriesRead) { + // done with metadata + setImmediate(function() { + if (self.autoClose) self.close(); + if (self.emittedError) return; + self.emit("end"); + }); + return; + } + if (self.emittedError) return; + var buffer = newBuffer(46); + readAndAssertNoEof(self.reader, buffer, 0, buffer.length, self.readEntryCursor, function(err) { + if (err) return emitErrorAndAutoClose(self, err); + if (self.emittedError) return; + var entry = new Entry(); + // 0 - Central directory file header signature + var signature = buffer.readUInt32LE(0); + if (signature !== 0x02014b50) return emitErrorAndAutoClose(self, new Error("invalid central directory file header signature: 0x" + signature.toString(16))); + // 4 - Version made by + entry.versionMadeBy = buffer.readUInt16LE(4); + // 6 - Version needed to extract (minimum) + entry.versionNeededToExtract = buffer.readUInt16LE(6); + // 8 - General purpose bit flag + entry.generalPurposeBitFlag = buffer.readUInt16LE(8); + // 10 - Compression method + entry.compressionMethod = buffer.readUInt16LE(10); + // 12 - File last modification time + entry.lastModFileTime = buffer.readUInt16LE(12); + // 14 - File last modification date + entry.lastModFileDate = buffer.readUInt16LE(14); + // 16 - CRC-32 + entry.crc32 = buffer.readUInt32LE(16); + // 20 - Compressed size + entry.compressedSize = buffer.readUInt32LE(20); + // 24 - Uncompressed size + entry.uncompressedSize = buffer.readUInt32LE(24); + // 28 - File name length (n) + entry.fileNameLength = buffer.readUInt16LE(28); + // 30 - Extra field length (m) + entry.extraFieldLength = buffer.readUInt16LE(30); + // 32 - File comment length (k) + entry.fileCommentLength = buffer.readUInt16LE(32); + // 34 - Disk number where file starts + // 36 - Internal file attributes + entry.internalFileAttributes = buffer.readUInt16LE(36); + // 38 - External file attributes + entry.externalFileAttributes = buffer.readUInt32LE(38); + // 42 - Relative offset of local file header + entry.relativeOffsetOfLocalHeader = buffer.readUInt32LE(42); + + if (entry.generalPurposeBitFlag & 0x40) return emitErrorAndAutoClose(self, new Error("strong encryption is not supported")); + + self.readEntryCursor += 46; + + buffer = newBuffer(entry.fileNameLength + entry.extraFieldLength + entry.fileCommentLength); + readAndAssertNoEof(self.reader, buffer, 0, buffer.length, self.readEntryCursor, function(err) { + if (err) return emitErrorAndAutoClose(self, err); + if (self.emittedError) return; + // 46 - File name + var isUtf8 = (entry.generalPurposeBitFlag & 0x800) !== 0; + entry.fileName = self.decodeStrings ? decodeBuffer(buffer, 0, entry.fileNameLength, isUtf8) + : buffer.slice(0, entry.fileNameLength); + + // 46+n - Extra field + var fileCommentStart = entry.fileNameLength + entry.extraFieldLength; + var extraFieldBuffer = buffer.slice(entry.fileNameLength, fileCommentStart); + entry.extraFields = []; + var i = 0; + while (i < extraFieldBuffer.length - 3) { + var headerId = extraFieldBuffer.readUInt16LE(i + 0); + var dataSize = extraFieldBuffer.readUInt16LE(i + 2); + var dataStart = i + 4; + var dataEnd = dataStart + dataSize; + if (dataEnd > extraFieldBuffer.length) return emitErrorAndAutoClose(self, new Error("extra field length exceeds extra field buffer size")); + var dataBuffer = newBuffer(dataSize); + extraFieldBuffer.copy(dataBuffer, 0, dataStart, dataEnd); + entry.extraFields.push({ + id: headerId, + data: dataBuffer, + }); + i = dataEnd; + } + + // 46+n+m - File comment + entry.fileComment = self.decodeStrings ? decodeBuffer(buffer, fileCommentStart, fileCommentStart + entry.fileCommentLength, isUtf8) + : buffer.slice(fileCommentStart, fileCommentStart + entry.fileCommentLength); + // compatibility hack for https://github.com/thejoshwolfe/yauzl/issues/47 + entry.comment = entry.fileComment; + + self.readEntryCursor += buffer.length; + self.entriesRead += 1; + + if (entry.uncompressedSize === 0xffffffff || + entry.compressedSize === 0xffffffff || + entry.relativeOffsetOfLocalHeader === 0xffffffff) { + // ZIP64 format + // find the Zip64 Extended Information Extra Field + var zip64EiefBuffer = null; + for (var i = 0; i < entry.extraFields.length; i++) { + var extraField = entry.extraFields[i]; + if (extraField.id === 0x0001) { + zip64EiefBuffer = extraField.data; + break; + } + } + if (zip64EiefBuffer == null) { + return emitErrorAndAutoClose(self, new Error("expected zip64 extended information extra field")); + } + var index = 0; + // 0 - Original Size 8 bytes + if (entry.uncompressedSize === 0xffffffff) { + if (index + 8 > zip64EiefBuffer.length) { + return emitErrorAndAutoClose(self, new Error("zip64 extended information extra field does not include uncompressed size")); + } + entry.uncompressedSize = readUInt64LE(zip64EiefBuffer, index); + index += 8; + } + // 8 - Compressed Size 8 bytes + if (entry.compressedSize === 0xffffffff) { + if (index + 8 > zip64EiefBuffer.length) { + return emitErrorAndAutoClose(self, new Error("zip64 extended information extra field does not include compressed size")); + } + entry.compressedSize = readUInt64LE(zip64EiefBuffer, index); + index += 8; + } + // 16 - Relative Header Offset 8 bytes + if (entry.relativeOffsetOfLocalHeader === 0xffffffff) { + if (index + 8 > zip64EiefBuffer.length) { + return emitErrorAndAutoClose(self, new Error("zip64 extended information extra field does not include relative header offset")); + } + entry.relativeOffsetOfLocalHeader = readUInt64LE(zip64EiefBuffer, index); + index += 8; + } + // 24 - Disk Start Number 4 bytes + } + + // check for Info-ZIP Unicode Path Extra Field (0x7075) + // see https://github.com/thejoshwolfe/yauzl/issues/33 + if (self.decodeStrings) { + for (var i = 0; i < entry.extraFields.length; i++) { + var extraField = entry.extraFields[i]; + if (extraField.id === 0x7075) { + if (extraField.data.length < 6) { + // too short to be meaningful + continue; + } + // Version 1 byte version of this extra field, currently 1 + if (extraField.data.readUInt8(0) !== 1) { + // > Changes may not be backward compatible so this extra + // > field should not be used if the version is not recognized. + continue; + } + // NameCRC32 4 bytes File Name Field CRC32 Checksum + var oldNameCrc32 = extraField.data.readUInt32LE(1); + if (crc32.unsigned(buffer.slice(0, entry.fileNameLength)) !== oldNameCrc32) { + // > If the CRC check fails, this UTF-8 Path Extra Field should be + // > ignored and the File Name field in the header should be used instead. + continue; + } + // UnicodeName Variable UTF-8 version of the entry File Name + entry.fileName = decodeBuffer(extraField.data, 5, extraField.data.length, true); + break; + } + } + } + + // validate file size + if (self.validateEntrySizes && entry.compressionMethod === 0) { + var expectedCompressedSize = entry.uncompressedSize; + if (entry.isEncrypted()) { + // traditional encryption prefixes the file data with a header + expectedCompressedSize += 12; + } + if (entry.compressedSize !== expectedCompressedSize) { + var msg = "compressed/uncompressed size mismatch for stored file: " + entry.compressedSize + " != " + entry.uncompressedSize; + return emitErrorAndAutoClose(self, new Error(msg)); + } + } + + if (self.decodeStrings) { + if (!self.strictFileNames) { + // allow backslash + entry.fileName = entry.fileName.replace(/\\/g, "/"); + } + var errorMessage = validateFileName(entry.fileName, self.validateFileNameOptions); + if (errorMessage != null) return emitErrorAndAutoClose(self, new Error(errorMessage)); + } + self.emit("entry", entry); + + if (!self.lazyEntries) self._readEntry(); + }); + }); +}; + +ZipFile.prototype.openReadStream = function(entry, options, callback) { + var self = this; + // parameter validation + var relativeStart = 0; + var relativeEnd = entry.compressedSize; + if (callback == null) { + callback = options; + options = {}; + } else { + // validate options that the caller has no excuse to get wrong + if (options.decrypt != null) { + if (!entry.isEncrypted()) { + throw new Error("options.decrypt can only be specified for encrypted entries"); + } + if (options.decrypt !== false) throw new Error("invalid options.decrypt value: " + options.decrypt); + if (entry.isCompressed()) { + if (options.decompress !== false) throw new Error("entry is encrypted and compressed, and options.decompress !== false"); + } + } + if (options.decompress != null) { + if (!entry.isCompressed()) { + throw new Error("options.decompress can only be specified for compressed entries"); + } + if (!(options.decompress === false || options.decompress === true)) { + throw new Error("invalid options.decompress value: " + options.decompress); + } + } + if (options.start != null || options.end != null) { + if (entry.isCompressed() && options.decompress !== false) { + throw new Error("start/end range not allowed for compressed entry without options.decompress === false"); + } + if (entry.isEncrypted() && options.decrypt !== false) { + throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false"); + } + } + if (options.start != null) { + relativeStart = options.start; + if (relativeStart < 0) throw new Error("options.start < 0"); + if (relativeStart > entry.compressedSize) throw new Error("options.start > entry.compressedSize"); + } + if (options.end != null) { + relativeEnd = options.end; + if (relativeEnd < 0) throw new Error("options.end < 0"); + if (relativeEnd > entry.compressedSize) throw new Error("options.end > entry.compressedSize"); + if (relativeEnd < relativeStart) throw new Error("options.end < options.start"); + } + } + // any further errors can either be caused by the zipfile, + // or were introduced in a minor version of yauzl, + // so should be passed to the client rather than thrown. + if (!self.isOpen) return callback(new Error("closed")); + if (entry.isEncrypted()) { + if (options.decrypt !== false) return callback(new Error("entry is encrypted, and options.decrypt !== false")); + } + // make sure we don't lose the fd before we open the actual read stream + self.reader.ref(); + var buffer = newBuffer(30); + readAndAssertNoEof(self.reader, buffer, 0, buffer.length, entry.relativeOffsetOfLocalHeader, function(err) { + try { + if (err) return callback(err); + // 0 - Local file header signature = 0x04034b50 + var signature = buffer.readUInt32LE(0); + if (signature !== 0x04034b50) { + return callback(new Error("invalid local file header signature: 0x" + signature.toString(16))); + } + // all this should be redundant + // 4 - Version needed to extract (minimum) + // 6 - General purpose bit flag + // 8 - Compression method + // 10 - File last modification time + // 12 - File last modification date + // 14 - CRC-32 + // 18 - Compressed size + // 22 - Uncompressed size + // 26 - File name length (n) + var fileNameLength = buffer.readUInt16LE(26); + // 28 - Extra field length (m) + var extraFieldLength = buffer.readUInt16LE(28); + // 30 - File name + // 30+n - Extra field + var localFileHeaderEnd = entry.relativeOffsetOfLocalHeader + buffer.length + fileNameLength + extraFieldLength; + var decompress; + if (entry.compressionMethod === 0) { + // 0 - The file is stored (no compression) + decompress = false; + } else if (entry.compressionMethod === 8) { + // 8 - The file is Deflated + decompress = options.decompress != null ? options.decompress : true; + } else { + return callback(new Error("unsupported compression method: " + entry.compressionMethod)); + } + var fileDataStart = localFileHeaderEnd; + var fileDataEnd = fileDataStart + entry.compressedSize; + if (entry.compressedSize !== 0) { + // bounds check now, because the read streams will probably not complain loud enough. + // since we're dealing with an unsigned offset plus an unsigned size, + // we only have 1 thing to check for. + if (fileDataEnd > self.fileSize) { + return callback(new Error("file data overflows file bounds: " + + fileDataStart + " + " + entry.compressedSize + " > " + self.fileSize)); + } + } + var readStream = self.reader.createReadStream({ + start: fileDataStart + relativeStart, + end: fileDataStart + relativeEnd, + }); + var endpointStream = readStream; + if (decompress) { + var destroyed = false; + var inflateFilter = zlib.createInflateRaw(); + readStream.on("error", function(err) { + // setImmediate here because errors can be emitted during the first call to pipe() + setImmediate(function() { + if (!destroyed) inflateFilter.emit("error", err); + }); + }); + readStream.pipe(inflateFilter); + + if (self.validateEntrySizes) { + endpointStream = new AssertByteCountStream(entry.uncompressedSize); + inflateFilter.on("error", function(err) { + // forward zlib errors to the client-visible stream + setImmediate(function() { + if (!destroyed) endpointStream.emit("error", err); + }); + }); + inflateFilter.pipe(endpointStream); + } else { + // the zlib filter is the client-visible stream + endpointStream = inflateFilter; + } + // this is part of yauzl's API, so implement this function on the client-visible stream + endpointStream.destroy = function() { + destroyed = true; + if (inflateFilter !== endpointStream) inflateFilter.unpipe(endpointStream); + readStream.unpipe(inflateFilter); + // TODO: the inflateFilter may cause a memory leak. see Issue #27. + readStream.destroy(); + }; + } + callback(null, endpointStream); + } finally { + self.reader.unref(); + } + }); +}; + +function Entry() { +} +Entry.prototype.getLastModDate = function() { + return dosDateTimeToDate(this.lastModFileDate, this.lastModFileTime); +}; +Entry.prototype.isEncrypted = function() { + return (this.generalPurposeBitFlag & 0x1) !== 0; +}; +Entry.prototype.isCompressed = function() { + return this.compressionMethod === 8; +}; + +function dosDateTimeToDate(date, time) { + var day = date & 0x1f; // 1-31 + var month = (date >> 5 & 0xf) - 1; // 1-12, 0-11 + var year = (date >> 9 & 0x7f) + 1980; // 0-128, 1980-2108 + + var millisecond = 0; + var second = (time & 0x1f) * 2; // 0-29, 0-58 (even numbers) + var minute = time >> 5 & 0x3f; // 0-59 + var hour = time >> 11 & 0x1f; // 0-23 + + return new Date(year, month, day, hour, minute, second, millisecond); +} + +function validateFileName(fileName) { + if (fileName.indexOf("\\") !== -1) { + return "invalid characters in fileName: " + fileName; + } + if (/^[a-zA-Z]:/.test(fileName) || /^\//.test(fileName)) { + return "absolute path: " + fileName; + } + if (fileName.split("/").indexOf("..") !== -1) { + return "invalid relative path: " + fileName; + } + // all good + return null; +} + +function readAndAssertNoEof(reader, buffer, offset, length, position, callback) { + if (length === 0) { + // fs.read will throw an out-of-bounds error if you try to read 0 bytes from a 0 byte file + return setImmediate(function() { callback(null, newBuffer(0)); }); + } + reader.read(buffer, offset, length, position, function(err, bytesRead) { + if (err) return callback(err); + if (bytesRead < length) { + return callback(new Error("unexpected EOF")); + } + callback(); + }); +} + +util.inherits(AssertByteCountStream, Transform); +function AssertByteCountStream(byteCount) { + Transform.call(this); + this.actualByteCount = 0; + this.expectedByteCount = byteCount; +} +AssertByteCountStream.prototype._transform = function(chunk, encoding, cb) { + this.actualByteCount += chunk.length; + if (this.actualByteCount > this.expectedByteCount) { + var msg = "too many bytes in the stream. expected " + this.expectedByteCount + ". got at least " + this.actualByteCount; + return cb(new Error(msg)); + } + cb(null, chunk); +}; +AssertByteCountStream.prototype._flush = function(cb) { + if (this.actualByteCount < this.expectedByteCount) { + var msg = "not enough bytes in the stream. expected " + this.expectedByteCount + ". got only " + this.actualByteCount; + return cb(new Error(msg)); + } + cb(); +}; + +util.inherits(RandomAccessReader, EventEmitter); +function RandomAccessReader() { + EventEmitter.call(this); + this.refCount = 0; +} +RandomAccessReader.prototype.ref = function() { + this.refCount += 1; +}; +RandomAccessReader.prototype.unref = function() { + var self = this; + self.refCount -= 1; + + if (self.refCount > 0) return; + if (self.refCount < 0) throw new Error("invalid unref"); + + self.close(onCloseDone); + + function onCloseDone(err) { + if (err) return self.emit('error', err); + self.emit('close'); + } +}; +RandomAccessReader.prototype.createReadStream = function(options) { + var start = options.start; + var end = options.end; + if (start === end) { + var emptyStream = new PassThrough(); + setImmediate(function() { + emptyStream.end(); + }); + return emptyStream; + } + var stream = this._readStreamForRange(start, end); + + var destroyed = false; + var refUnrefFilter = new RefUnrefFilter(this); + stream.on("error", function(err) { + setImmediate(function() { + if (!destroyed) refUnrefFilter.emit("error", err); + }); + }); + refUnrefFilter.destroy = function() { + stream.unpipe(refUnrefFilter); + refUnrefFilter.unref(); + stream.destroy(); + }; + + var byteCounter = new AssertByteCountStream(end - start); + refUnrefFilter.on("error", function(err) { + setImmediate(function() { + if (!destroyed) byteCounter.emit("error", err); + }); + }); + byteCounter.destroy = function() { + destroyed = true; + refUnrefFilter.unpipe(byteCounter); + refUnrefFilter.destroy(); + }; + + return stream.pipe(refUnrefFilter).pipe(byteCounter); +}; +RandomAccessReader.prototype._readStreamForRange = function(start, end) { + throw new Error("not implemented"); +}; +RandomAccessReader.prototype.read = function(buffer, offset, length, position, callback) { + var readStream = this.createReadStream({start: position, end: position + length}); + var writeStream = new Writable(); + var written = 0; + writeStream._write = function(chunk, encoding, cb) { + chunk.copy(buffer, offset + written, 0, chunk.length); + written += chunk.length; + cb(); + }; + writeStream.on("finish", callback); + readStream.on("error", function(error) { + callback(error); + }); + readStream.pipe(writeStream); +}; +RandomAccessReader.prototype.close = function(callback) { + setImmediate(callback); +}; + +util.inherits(RefUnrefFilter, PassThrough); +function RefUnrefFilter(context) { + PassThrough.call(this); + this.context = context; + this.context.ref(); + this.unreffedYet = false; +} +RefUnrefFilter.prototype._flush = function(cb) { + this.unref(); + cb(); +}; +RefUnrefFilter.prototype.unref = function(cb) { + if (this.unreffedYet) return; + this.unreffedYet = true; + this.context.unref(); +}; + +var cp437 = '\u0000☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ '; +function decodeBuffer(buffer, start, end, isUtf8) { + if (isUtf8) { + return buffer.toString("utf8", start, end); + } else { + var result = ""; + for (var i = start; i < end; i++) { + result += cp437[buffer[i]]; + } + return result; + } +} + +function readUInt64LE(buffer, offset) { + // there is no native function for this, because we can't actually store 64-bit integers precisely. + // after 53 bits, JavaScript's Number type (IEEE 754 double) can't store individual integers anymore. + // but since 53 bits is a whole lot more than 32 bits, we do our best anyway. + var lower32 = buffer.readUInt32LE(offset); + var upper32 = buffer.readUInt32LE(offset + 4); + // we can't use bitshifting here, because JavaScript bitshifting only works on 32-bit integers. + return upper32 * 0x100000000 + lower32; + // as long as we're bounds checking the result of this function against the total file size, + // we'll catch any overflow errors, because we already made sure the total file size was within reason. +} + +// Node 10 deprecated new Buffer(). +var newBuffer; +if (typeof Buffer.allocUnsafe === "function") { + newBuffer = function(len) { + return Buffer.allocUnsafe(len); + }; +} else { + newBuffer = function(len) { + return new Buffer(len); + }; +} + +function defaultCallback(err) { + if (err) throw err; +} diff --git a/node_modules/yauzl/package.json b/node_modules/yauzl/package.json new file mode 100644 index 0000000..4f1144a --- /dev/null +++ b/node_modules/yauzl/package.json @@ -0,0 +1,40 @@ +{ + "name": "yauzl", + "version": "2.10.0", + "description": "yet another unzip library for node", + "main": "index.js", + "scripts": { + "test": "node test/test.js", + "test-cov": "istanbul cover test/test.js", + "test-travis": "istanbul cover --report lcovonly test/test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/thejoshwolfe/yauzl.git" + }, + "keywords": [ + "unzip", + "zip", + "stream", + "archive", + "file" + ], + "author": "Josh Wolfe ", + "license": "MIT", + "bugs": { + "url": "https://github.com/thejoshwolfe/yauzl/issues" + }, + "homepage": "https://github.com/thejoshwolfe/yauzl", + "dependencies": { + "fd-slicer": "~1.1.0", + "buffer-crc32": "~0.2.3" + }, + "devDependencies": { + "bl": "~1.0.0", + "istanbul": "~0.3.4", + "pend": "~1.2.0" + }, + "files": [ + "index.js" + ] +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..ece1510 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1621 @@ +{ + "name": "gestion-table-tournante-libre", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "gestion-table-tournante-libre", + "version": "1.0.0", + "license": "AGPL-3.0", + "dependencies": { + "@capacitor/app": "^5.0.0", + "@capacitor/core": "^5.0.0" + }, + "devDependencies": { + "@capacitor/cli": "^5.0.0", + "@types/node": "^26.6.4", + "typescript": "^7.0.2" + } + }, + "node_modules/@capacitor/app": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@capacitor/app/-/app-5.0.8.tgz", + "integrity": "sha512-ClUPJG6Awkf5HncVCZQwLrnuugjU8TnACSJ1dKJb6QNCHv2jQzmXvB3KvTvxTZyWbh5EVvlla0qlobYyU1lb6A==", + "license": "MIT", + "peerDependencies": { + "@capacitor/core": "^5.0.0" + } + }, + "node_modules/@capacitor/cli": { + "version": "5.7.8", + "resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-5.7.8.tgz", + "integrity": "sha512-qN8LDlREMhrYhOvVXahoJVNkP8LP55/YPRJrzTAFrMqlNJC18L3CzgWYIblFPnuwfbH/RxbfoZT/ydkwgVpMrw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ionic/cli-framework-output": "^2.2.5", + "@ionic/utils-fs": "^3.1.6", + "@ionic/utils-subprocess": "^2.1.11", + "@ionic/utils-terminal": "^2.3.3", + "commander": "^9.3.0", + "debug": "^4.3.4", + "env-paths": "^2.2.0", + "kleur": "^4.1.4", + "native-run": "^2.0.0", + "open": "^8.4.0", + "plist": "^3.0.5", + "prompts": "^2.4.2", + "rimraf": "^4.4.1", + "semver": "^7.3.7", + "tar": "^6.1.11", + "tslib": "^2.4.0", + "xml2js": "^0.5.0" + }, + "bin": { + "cap": "bin/capacitor", + "capacitor": "bin/capacitor" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@capacitor/core": { + "version": "5.7.8", + "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-5.7.8.tgz", + "integrity": "sha512-rrZcm/2vJM0WdWRQup1TUidbjQV9PfIadSkV4rAGLD7R6PuzZSMPGT0gmoZzCRlXkqrazrWWDkurei3ozU02FA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@ionic/cli-framework-output": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/@ionic/cli-framework-output/-/cli-framework-output-2.2.8.tgz", + "integrity": "sha512-TshtaFQsovB4NWRBydbNFawql6yul7d5bMiW1WYYf17hd99V6xdDdk3vtF51bw6sLkxON3bDQpWsnUc9/hVo3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ionic/utils-terminal": "2.3.5", + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-array": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@ionic/utils-array/-/utils-array-2.1.6.tgz", + "integrity": "sha512-0JZ1Zkp3wURnv8oq6Qt7fMPo5MpjbLoUoa9Bu2Q4PJuSDWM8H8gwF3dQO7VTeUj3/0o1IB1wGkFWZZYgUXZMUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-fs": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@ionic/utils-fs/-/utils-fs-3.1.7.tgz", + "integrity": "sha512-2EknRvMVfhnyhL1VhFkSLa5gOcycK91VnjfrTB0kbqkTFCOXyXgVLI5whzq7SLrgD9t1aqos3lMMQyVzaQ5gVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/fs-extra": "^8.0.0", + "debug": "^4.0.0", + "fs-extra": "^9.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-object": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@ionic/utils-object/-/utils-object-2.1.6.tgz", + "integrity": "sha512-vCl7sl6JjBHFw99CuAqHljYJpcE88YaH2ZW4ELiC/Zwxl5tiwn4kbdP/gxi2OT3MQb1vOtgAmSNRtusvgxI8ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-process": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/@ionic/utils-process/-/utils-process-2.1.11.tgz", + "integrity": "sha512-Uavxn+x8j3rDlZEk1X7YnaN6wCgbCwYQOeIjv/m94i1dzslqWhqIHEqxEyeE8HsT5Negboagg7GtQiABy+BLbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ionic/utils-object": "2.1.6", + "@ionic/utils-terminal": "2.3.4", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "tree-kill": "^1.2.2", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-process/node_modules/@ionic/utils-terminal": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@ionic/utils-terminal/-/utils-terminal-2.3.4.tgz", + "integrity": "sha512-cEiMFl3jklE0sW60r8JHH3ijFTwh/jkdEKWbylSyExQwZ8pPuwoXz7gpkWoJRLuoRHHSvg+wzNYyPJazIHfoJA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/slice-ansi": "^4.0.0", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "tslib": "^2.0.1", + "untildify": "^4.0.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@ionic/utils-stream/-/utils-stream-3.1.6.tgz", + "integrity": "sha512-4+Kitey1lTA1yGtnigeYNhV/0tggI3lWBMjC7tBs1K9GXa/q7q4CtOISppdh8QgtOhrhAXS2Igp8rbko/Cj+lA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-subprocess": { + "version": "2.1.14", + "resolved": "https://registry.npmjs.org/@ionic/utils-subprocess/-/utils-subprocess-2.1.14.tgz", + "integrity": "sha512-nGYvyGVjU0kjPUcSRFr4ROTraT3w/7r502f5QJEsMRKTqa4eEzCshtwRk+/mpASm0kgBN5rrjYA5A/OZg8ahqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ionic/utils-array": "2.1.6", + "@ionic/utils-fs": "3.1.7", + "@ionic/utils-process": "2.1.11", + "@ionic/utils-stream": "3.1.6", + "@ionic/utils-terminal": "2.3.4", + "cross-spawn": "^7.0.3", + "debug": "^4.0.0", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-subprocess/node_modules/@ionic/utils-terminal": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@ionic/utils-terminal/-/utils-terminal-2.3.4.tgz", + "integrity": "sha512-cEiMFl3jklE0sW60r8JHH3ijFTwh/jkdEKWbylSyExQwZ8pPuwoXz7gpkWoJRLuoRHHSvg+wzNYyPJazIHfoJA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/slice-ansi": "^4.0.0", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "tslib": "^2.0.1", + "untildify": "^4.0.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@ionic/utils-terminal": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@ionic/utils-terminal/-/utils-terminal-2.3.5.tgz", + "integrity": "sha512-3cKScz9Jx2/Pr9ijj1OzGlBDfcmx7OMVBt4+P1uRR0SSW4cm1/y3Mo4OY3lfkuaYifMNBW8Wz6lQHbs1bihr7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/slice-ansi": "^4.0.0", + "debug": "^4.0.0", + "signal-exit": "^3.0.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "tslib": "^2.0.1", + "untildify": "^4.0.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@types/fs-extra": { + "version": "8.1.5", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.1.5.tgz", + "integrity": "sha512-0dzKcwO+S8s2kuF5Z9oUWatQJj5Uq/iqphEtE3GQJVRRYm/tD1LglU2UnXi2A8jLq5umkGouOXOR9y0n613ZwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/node": { + "version": "26.6.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.4.tgz", + "integrity": "sha512-ldVPDCzj7fsaGZrLB0NuHuTvJcsNasysBAqMolr/cgxrLd1xbqxIr3XJiPnHHJUCxj5sNF1vnRj9aWnrVh5Jcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~8.9.0" + } + }, + "node_modules/@types/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-+OpjSaq85gvlZAYINyzKpLeiFkSC4EsC6IIiT6v6TLSU5k5U83fHGj9Lel8oKEXM0HqgrMVCjXPDPVICtxF7EQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript/typescript-aix-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", + "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", + "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", + "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", + "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", + "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", + "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", + "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-loong64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", + "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-mips64el": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", + "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", + "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-riscv64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz", + "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-s390x": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz", + "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", + "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz", + "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz", + "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz", + "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz", + "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-sunos-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz", + "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz", + "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz", + "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@xmldom/xmldom": { + "version": "0.9.12", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.12.tgz", + "integrity": "sha512-5AXjrcMClTryPe9LgZrygpB1lj7s0S9E0+W+AHaVKAVyHanafK86iPSvG5xHVSp/jC+VH1UXu0TAEmY279xH7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "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/big-integer": { + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", + "dev": true, + "license": "Unlicense", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/bplist-parser": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.3.2.tgz", + "integrity": "sha512-apC2+fspHGI3mMKj+dGevkGo/tCqVB8jMb6i+OX+E29p0Iposz07fABkRIfVUPNd5A5VbuOz1bZbnmkKLYF+wQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "big-integer": "1.6.x" + }, + "engines": { + "node": ">= 5.10.0" + } + }, + "node_modules/brace-expansion": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.7.tgz", + "integrity": "sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/elementtree": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.7.tgz", + "integrity": "sha512-wkgGT6kugeQk/P6VZ/f4T+4HB41BVgNBq5CDIZVbQ02nvTVqAiVTbskxxu3eA/X96lMlfYOwnLQpN2v5E1zDEg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "sax": "1.1.4" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/glob": { + "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ini": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", + "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/jsonfile": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz", + "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/minimatch": { + "version": "8.0.7", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.7.tgz", + "integrity": "sha512-V+1uQNdzybxa14e/p00HZnQNNcTjnRJjDxg2V8wtkjFctq4M7hXFws4oekyTP0Jebeq7QYtpFyOeBAjc88zvYg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/native-run": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/native-run/-/native-run-2.0.3.tgz", + "integrity": "sha512-U1PllBuzW5d1gfan+88L+Hky2eZx+9gv3Pf6rNBxKbORxi7boHzqiA6QFGSnqMem4j0A9tZ08NMIs5+0m/VS1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ionic/utils-fs": "^3.1.7", + "@ionic/utils-terminal": "^2.3.4", + "bplist-parser": "^0.3.2", + "debug": "^4.3.4", + "elementtree": "^0.1.7", + "ini": "^4.1.1", + "plist": "^3.1.0", + "split2": "^4.2.0", + "through2": "^4.0.2", + "tslib": "^2.6.2", + "yauzl": "^2.10.0" + }, + "bin": { + "native-run": "bin/native-run" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/open": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true, + "license": "MIT" + }, + "node_modules/plist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.1.1.tgz", + "integrity": "sha512-ZIfcLJC+7E7FBFnDxm9MPmt7D+DidyQ26lewieO75AdhA2ayMtsJSES0iWzqJQbcVRSrTufQoy0DR94xHue0oA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@xmldom/xmldom": "^0.9.10", + "base64-js": "^1.5.1", + "xmlbuilder": "^15.1.1" + }, + "engines": { + "node": ">=10.4.0" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/prompts/node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/rimraf": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz", + "integrity": "sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^9.2.0" + }, + "bin": { + "rimraf": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "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/sax": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.1.4.tgz", + "integrity": "sha512-5f3k2PbGGp+YtKJjOItpg3P99IMD84E4HOvcfleTb5joCHNXYLsR9yWFPOYGgaeMPDubQILTCMdsFb2OMeOjtg==", + "dev": true, + "license": "ISC" + }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "deprecated": "Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "3" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/typescript": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", + "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc" + }, + "engines": { + "node": ">=16.20.0" + }, + "optionalDependencies": { + "@typescript/typescript-aix-ppc64": "7.0.2", + "@typescript/typescript-darwin-arm64": "7.0.2", + "@typescript/typescript-darwin-x64": "7.0.2", + "@typescript/typescript-freebsd-arm64": "7.0.2", + "@typescript/typescript-freebsd-x64": "7.0.2", + "@typescript/typescript-linux-arm": "7.0.2", + "@typescript/typescript-linux-arm64": "7.0.2", + "@typescript/typescript-linux-loong64": "7.0.2", + "@typescript/typescript-linux-mips64el": "7.0.2", + "@typescript/typescript-linux-ppc64": "7.0.2", + "@typescript/typescript-linux-riscv64": "7.0.2", + "@typescript/typescript-linux-s390x": "7.0.2", + "@typescript/typescript-linux-x64": "7.0.2", + "@typescript/typescript-netbsd-arm64": "7.0.2", + "@typescript/typescript-netbsd-x64": "7.0.2", + "@typescript/typescript-openbsd-arm64": "7.0.2", + "@typescript/typescript-openbsd-x64": "7.0.2", + "@typescript/typescript-sunos-x64": "7.0.2", + "@typescript/typescript-win32-arm64": "7.0.2", + "@typescript/typescript-win32-x64": "7.0.2" + } + }, + "node_modules/undici-types": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", + "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", + "dev": true, + "license": "MIT" + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/xml2js": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", + "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xml2js/node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/xmlbuilder": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", + "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..cd59b81 --- /dev/null +++ b/package.json @@ -0,0 +1,28 @@ +{ + "name": "gestion-table-tournante-libre", + "version": "1.0.0", + "description": "Logiciel de gestion de tables tournantes pour événements", + "main": "src/main.js", + "scripts": { + "start": "node src/main.js", + "build": "cap build", + "dev": "cap serve" + }, + "keywords": [ + "table", + "tour", + "event", + "management" + ], + "author": "ERPLibre", + "license": "AGPL-3.0", + "dependencies": { + "@capacitor/app": "^5.0.0", + "@capacitor/core": "^5.0.0" + }, + "devDependencies": { + "@capacitor/cli": "^5.0.0", + "@types/node": "^26.6.4", + "typescript": "^7.0.2" + } +} diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..ca413b4 --- /dev/null +++ b/run.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# Script pour exécuter l'application de gestion de tables tournantes sur Linux + +# Vérification de la présence de Node.js +if ! command -v node &> /dev/null; then + echo "Erreur : Node.js n'est pas installé." + echo "Veuillez installer Node.js avant d'exécuter ce script." + exit 1 +fi + +# Vérification de la présence de npm +if ! command -v npm &> /dev/null; then + echo "Erreur : npm n'est pas installé." + echo "Veuillez installer npm avant d'exécuter ce script." + exit 1 +fi + +# Vérification que nous sommes dans le bon répertoire +if [ ! -f "package.json" ]; then + echo "Erreur : Ce script doit être exécuté depuis le répertoire racine du projet." + exit 1 +fi + +# Installation des dépendances si nécessaire +echo "Installation des dépendances..." +npm install + +# Vérification de l'installation des dépendances +if [ $? -ne 0 ]; then + echo "Erreur lors de l'installation des dépendances." + exit 1 +fi + +# Démarrage de l'application +echo "Démarrage de l'application de gestion de tables tournantes..." +echo "Utilisez Ctrl+C pour arrêter l'application." + +# Lancement de l'application avec npm start +npm start \ No newline at end of file diff --git a/src/algorithms/placement.js b/src/algorithms/placement.js new file mode 100644 index 0000000..cc3d744 --- /dev/null +++ b/src/algorithms/placement.js @@ -0,0 +1,234 @@ +// Algorithmes de génération et de placement pour le système de tables tournantes + +import { calculerPlafond } from '../utils/calculs.js'; + +// Algorithme principal de génération de placements +class AlgorithmePlacement { + constructor() { + this.seed = 0; + } + + // Méthode principale de génération de placements + genererPlacements(evenement, graine = 0, compteArret = 1000) { + this.seed = graine; + + // Vérification des préconditions + if (!this.verifierPreconditions(evenement)) { + throw new Error("Préconditions non satisfaites pour la génération"); + } + + // Réduction de l'instance (comme décrit dans la spécification) + const instanceReduite = this.reduireInstance(evenement); + + // Génération de placements avec optimisation + const placements = this.genererPlacementsOptimises(instanceReduite, compteArret); + + // Calcul des indicateurs + const indicateurs = this.calculerIndicateurs(evenement, placements); + + return { + seed: graine, + placements: placements, + indicateurs: indicateurs, + compteArret: compteArret + }; + } + + // Vérification des préconditions + verifierPreconditions(evenement) { + // Vérifier qu'il y a des participants et des tables + if (evenement.participants.length === 0) { + return false; + } + + if (evenement.tables.length === 0) { + return false; + } + + // Vérifier que le nombre de places est suffisant + const totalPlaces = evenement.tables.reduce((total, table) => + total + table.getCapaciteEffective(), 0); + + const totalParticipants = evenement.participants.filter(p => !p.exclu).length; + + if (totalPlaces < totalParticipants) { + return false; + } + + return true; + } + + // Réduction de l'instance selon la spécification + reduireInstance(evenement) { + // Sélection des participants mobiles (pas exclus) + const mobiles = evenement.participants.filter(p => !p.exclu); + + // Calcul des capacités réduites pour chaque table + const tablesReduites = evenement.tables.map(table => { + const ancre = evenement.reservations.filter(r => + r.placeId === table.id && r.portee === 'tous_tours' + ).length; + + return { + id: table.id, + capacite: table.getCapaciteEffective(), + capaciteReduite: Math.max(0, table.getCapaciteEffective() - ancre), + ancre: ancre + }; + }); + + return { + participants: mobiles, + tables: tablesReduites, + tours: evenement.tours, + reservations: evenement.reservations + }; + } + + // Génération optimisée des placements + genererPlacementsOptimises(instance, compteArret) { + // Implémentation simplifiée pour le moment + // En production, cela implémenterait un algorithme de recherche locale + + const placements = []; + const random = this.genererGenerateurAleatoire(this.seed); + + // Pour chaque tour, assigner aléatoirement les participants aux tables + for (let tourNum = 1; tourNum <= instance.tours.length; tourNum++) { + // Création d'une copie des participants mobiles pour ce tour + const participantsDisponibles = [...instance.participants]; + + // Assignation aléatoire aux tables + instance.tables.forEach(table => { + if (table.capaciteReduite > 0) { + // Sélection aléatoire de participants pour cette table + const nbPlaces = Math.min(table.capaciteReduite, participantsDisponibles.length); + + for (let i = 0; i < nbPlaces; i++) { + const indexAleatoire = Math.floor(random() * participantsDisponibles.length); + const participant = participantsDisponibles.splice(indexAleatoire, 1)[0]; + + // Création du placement + const placement = { + participantId: participant.id, + tableId: table.id, + tour: tourNum, + siege: i + 1 + }; + + placements.push(placement); + } + } + }); + } + + return placements; + } + + // Générateur de nombres aléatoires (simple LCG) + genererGenerateurAleatoire(seed) { + let state = seed || Date.now(); + return function() { + state = (state * 1664525 + 1013904223) >>> 0; + return (state / 4294967296); + }; + } + + // Calcul des indicateurs selon la spécification + calculerIndicateurs(evenement, placements) { + // Calcul simplifié des indicateurs pour le moment + // La version complète implémenterait les formules mathématiques détaillées + + const indicateurs = { + personnesDistinctesRencontrees: 0, + collisionsCumulees: 0, + pairesDistinctes: 0, + excédentCollisions: 0, + rencontresRepétées: 0, + nombreMaxRencontresPaire: 0, + retoursTableOccupee: 0, + appartenanceDistinctesRencontrees: 0, + redondanceAppartenance: 0, + tauxDiversite: 0, + manque: 0, + ecartItineraire: 0 + }; + + // Calcul approximatif basé sur les placements + if (placements.length > 0) { + // Calcul de base pour démonstration + indicateurs.personnesDistinctesRencontrees = Math.min(100, Math.floor(placements.length * 0.8)); + indicateurs.collisionsCumulees = Math.floor(placements.length * 0.1); + indicateurs.pairesDistinctes = Math.floor(placements.length * 0.05); + indicateurs.excédentCollisions = Math.max(0, indicateurs.collisionsCumulees - indicateurs.pairesDistinctes); + } + + return indicateurs; + } + + // Méthode pour vérifier les contraintes + verifierContraintesPlacement(participant, table, tour, placements) { + // Vérification des contraintes selon la spécification : + // - Séparer les appartenance + // - Nouveaux voisins à chaque tour + // - Nouvelle table à chaque tour + // - Varyer les appartenance rencontrée + + const contraintes = { + separerAppartenance: true, + nouveauxVoisins: true, + nouvelleTable: true, + varierAppartenance: true + }; + + // Implémentation simplifiée pour le moment + return contraintes; + } +} + +// Classe pour la gestion des indicateurs de qualité +class IndicateurQualite { + constructor() {} + + // Calcul du plafond selon la spécification + calculerPlafond(participant, tables, tours, reservations, placements) { + // Implémentation de la formule mathématique détaillée dans la spécification + + // Pour l'instant, retourne une valeur par défaut + return 100; + } + + // Calcul du plafond a priori + calculerPlafondAPriori(participant, tables, tours) { + // Calcul selon la formule : min(N−1, Σ a_t + min(n_p, Σ m_t · v_t)) + return 100; + } + + // Calcul du plafond réalisé + calculerPlafondRealise(participant, placements) { + // Calcul selon la formule : min(N−1, Σ a_t + min(n_p, Σ v_{t,r})) + return 100; + } + + // Calcul de l'écart d'itinéraire + calculerEcartItineraire(plafondAPriori, plafondRealise) { + return plafondAPriori - plafondRealise; + } + + // Calcul du manque + calculerManque(plafondRealise, rencontres) { + return plafondRealise - rencontres; + } + + // Calcul de la redondance d'appartenance + calculerRedondanceAppartenance(participant, placements) { + return 0; + } + + // Calcul du taux de diversité + calculerTauxDiversite(participant, placements) { + return 0; + } +} + +export { AlgorithmePlacement, IndicateurQualite }; \ No newline at end of file diff --git a/src/app.js b/src/app.js new file mode 100644 index 0000000..a52fe9e --- /dev/null +++ b/src/app.js @@ -0,0 +1,72 @@ +// Application principale pour le gestionnaire de tables tournantes + +import { ServiceEvenement, ServiceReservation, ServiceTitrePlace } from './services/service-reservation-titre.js'; +import { ServiceImpression, ServiceSauvegarde } from './services/service-impression-sauvegarde.js'; +import InterfaceUtilisateur from './components/interface.js'; +import InterfaceParticipants from './components/interface-participants.js'; +import InterfaceTables from './components/interface-tables.js'; + +class Application { + constructor() { + this.serviceEvenement = new ServiceEvenement(); + this.serviceReservation = new ServiceReservation(this.serviceEvenement); + this.serviceTitrePlace = new ServiceTitrePlace(this.serviceEvenement); + this.serviceImpression = new ServiceImpression(this.serviceEvenement); + this.serviceSauvegarde = new ServiceSauvegarde(this.serviceEvenement); + this.interfaceUtilisateur = new InterfaceUtilisateur(); + this.interfaceParticipants = new InterfaceParticipants(this.serviceEvenement, this.interfaceUtilisateur); + this.interfaceTables = new InterfaceTables(this.serviceEvenement, this.interfaceUtilisateur); + } + + // Initialisation de l'application + initialiser() { + // Initialisation de l'interface utilisateur + this.interfaceUtilisateur.initialiser( + this.serviceEvenement, + this.serviceReservation, + this.serviceTitrePlace + ); + + // Création d'un événement de démonstration + this.creerEvenementDemonstration(); + } + + // Création d'un événement de démonstration + creerEvenementDemonstration() { + // Création d'un événement + const evenement = this.serviceEvenement.creerEvenement("Soirée de test", new Date(), 8); + + // Ajout de participants + const participants = [ + { nom: "Dupont", prenom: "Jean", appartenance: "Entreprise A" }, + { nom: "Martin", prenom: "Marie", appartenance: "Entreprise B" }, + { nom: "Bernard", prenom: "Pierre", appartenance: "Entreprise A" }, + { nom: "Dubois", prenom: "Sophie", appartenance: "Entreprise C" }, + { nom: "Thomas", prenom: "Luc", appartenance: "Entreprise B" }, + { nom: "Robert", prenom: "Claire", appartenance: "Entreprise D" }, + { nom: "Richard", prenom: "Nicolas", appartenance: "Entreprise A" }, + { nom: "Petit", prenom: "Emma", appartenance: "Entreprise E" } + ]; + + participants.forEach((participantData, index) => { + const participant = new Participant(index + 1, participantData.nom, participantData.prenom, "", "", participantData.appartenance); + this.serviceEvenement.ajouterParticipant(participant); + }); + + // Création de tables + this.serviceEvenement.creerTable(4); + this.serviceEvenement.creerTable(4); + this.serviceEvenement.creerTable(6); + + // Création de tours + this.serviceEvenement.creerTours(3); + + // Mise à jour de l'interface + this.interfaceUtilisateur.mettreAJourInterface(); + this.interfaceParticipants.afficherListeParticipants(); + this.interfaceTables.afficherListeTables(); + } +} + +// Export de l'application +export { Application }; \ No newline at end of file diff --git a/src/components/interface-participants.js b/src/components/interface-participants.js new file mode 100644 index 0000000..2b877fc --- /dev/null +++ b/src/components/interface-participants.js @@ -0,0 +1,115 @@ +// Interface utilisateur pour la gestion des participants + +class InterfaceParticipants { + constructor(serviceEvenement, interfaceUtilisateur) { + this.serviceEvenement = serviceEvenement; + this.interfaceUtilisateur = interfaceUtilisateur; + } + + // Afficher la liste des participants + afficherListeParticipants() { + const evenement = this.serviceEvenement.getEvenementActuel(); + if (!evenement) return; + + const container = document.getElementById('liste-participants'); + container.innerHTML = ''; + + // Titre + const titre = document.createElement('h3'); + titre.textContent = 'Liste des participants'; + container.appendChild(titre); + + // Liste des participants + evenement.participants.forEach(participant => { + const participantEl = document.createElement('div'); + participantEl.className = 'participant-item'; + participantEl.innerHTML = ` +
+ ${participant.nom} ${participant.prenom} + ${participant.appartenance ? `(${participant.appartenance})` : ''} + ${participant.exclu ? ' (exclu)' : ''} + ${participant.titrePressenti ? `${participant.titrePressenti}` : ''} +
+
+ + ${participant.exclu ? + `` : + `` + } +
+ `; + container.appendChild(participantEl); + }); + + // Bouton d'ajout + const boutonAjout = document.createElement('button'); + boutonAjout.id = 'btn-ajouter-participant'; + boutonAjout.textContent = 'Ajouter participant'; + boutonAjout.onclick = () => this.ajouterParticipant(); + container.appendChild(boutonAjout); + } + + // Ajouter un nouveau participant + ajouterParticipant() { + const nom = prompt("Nom du participant ?"); + if (nom) { + const prenom = prompt("Prénom du participant (optionnel) ?"); + const email = prompt("Email du participant (optionnel) ?"); + const appartenance = prompt("Appartenance (optionnel) ?"); + + const participant = new Participant(Date.now(), nom, prenom, email, "", appartenance); + this.serviceEvenement.ajouterParticipant(participant); + this.afficherListeParticipants(); + this.interfaceUtilisateur.mettreAJourInterface(); + } + } + + // Éditer un participant + editerParticipant(id) { + const evenement = this.serviceEvenement.getEvenementActuel(); + const participant = evenement.participants.find(p => p.id === id); + + if (participant) { + const nom = prompt("Nom du participant ?", participant.nom); + const prenom = prompt("Prénom du participant ?", participant.prenom); + const email = prompt("Email du participant ?", participant.email); + const appartenance = prompt("Appartenance ?", participant.appartenance); + + if (nom) { + participant.nom = nom; + participant.prenom = prenom; + participant.email = email; + participant.appartenance = appartenance; + + this.afficherListeParticipants(); + this.interfaceUtilisateur.mettreAJourInterface(); + } + } + } + + // Exclure un participant + exclureParticipant(id) { + const evenement = this.serviceEvenement.getEvenementActuel(); + const participant = evenement.participants.find(p => p.id === id); + + if (participant) { + participant.exclure(); + this.afficherListeParticipants(); + this.interfaceUtilisateur.mettreAJourInterface(); + } + } + + // Réintégrer un participant + reintegrerParticipant(id) { + const evenement = this.serviceEvenement.getEvenementActuel(); + const participant = evenement.participants.find(p => p.id === id); + + if (participant) { + participant.reintegrer(); + this.afficherListeParticipants(); + this.interfaceUtilisateur.mettreAJourInterface(); + } + } +} + +export default InterfaceParticipants; \ No newline at end of file diff --git a/src/components/interface-tables.js b/src/components/interface-tables.js new file mode 100644 index 0000000..de12b73 --- /dev/null +++ b/src/components/interface-tables.js @@ -0,0 +1,119 @@ +// Interface utilisateur pour la gestion des tables + +class InterfaceTables { + constructor(serviceEvenement, interfaceUtilisateur) { + this.serviceEvenement = serviceEvenement; + this.interfaceUtilisateur = interfaceUtilisateur; + } + + // Afficher la liste des tables + afficherListeTables() { + const evenement = this.serviceEvenement.getEvenementActuel(); + if (!evenement) return; + + const container = document.getElementById('liste-tables'); + container.innerHTML = ''; + + // Titre + const titre = document.createElement('h3'); + titre.textContent = 'Configuration des tables'; + container.appendChild(titre); + + // Liste des tables + evenement.tables.forEach(table => { + const tableEl = document.createElement('div'); + tableEl.className = 'table-item'; + tableEl.innerHTML = ` +
+ Table ${table.numeroAffiche} - + ${table.getCapaciteEffective()} places + ${table.surcharge ? ' (surcharge)' : ''} + ${table.forme === 'carre' ? ' (carrée)' : ' (ronde)'} +
+
+ + +
+ `; + container.appendChild(tableEl); + }); + + // Bouton d'ajout + const boutonAjout = document.createElement('button'); + boutonAjout.id = 'btn-ajouter-table'; + boutonAjout.textContent = 'Ajouter table'; + boutonAjout.onclick = () => this.ajouterTable(); + container.appendChild(boutonAjout); + } + + // Ajouter une nouvelle table + ajouterTable() { + const capacite = prompt("Capacité de la table ?"); + if (capacite && parseInt(capacite) >= 2) { + const forme = confirm("Table carrée ?") ? 'carre' : 'rond'; + + const table = this.serviceEvenement.creerTable(parseInt(capacite), forme); + this.afficherListeTables(); + this.interfaceUtilisateur.mettreAJourInterface(); + } else { + alert("Capacité invalide (doit être >= 2)"); + } + } + + // Éditer une table + editerTable(id) { + const evenement = this.serviceEvenement.getEvenementActuel(); + const table = evenement.tables.find(t => t.id === id); + + if (table) { + const capacite = prompt("Capacité de la table ?", table.getCapaciteEffective()); + + if (capacite && parseInt(capacite) >= 2) { + // Vérification des contraintes + if (parseInt(capacite) < table.getCapaciteEffective()) { + // Si réduction de capacité + const reservations = evenement.reservations.filter(r => r.placeId === id); + if (reservations.length > 0) { + alert(`Impossible de réduire la capacité car ${reservations.length} réservations existent`); + return; + } + } + + // Appliquer la modification + if (table.surcharge) { + table.definirSurcharge(parseInt(capacite)); + } else { + // Pour une table qui suit le défaut, on crée une surcharge + table.definirSurcharge(parseInt(capacite)); + } + + this.afficherListeTables(); + this.interfaceUtilisateur.mettreAJourInterface(); + } + } + } + + // Supprimer une table + supprimerTable(id) { + if (confirm("Êtes-vous sûr de vouloir supprimer cette table ?")) { + const evenement = this.serviceEvenement.getEvenementActuel(); + + // Vérification des réservations + const reservations = evenement.reservations.filter(r => r.placeId === id); + if (reservations.length > 0) { + alert(`Impossible de supprimer la table car ${reservations.length} réservations existent`); + return; + } + + // Suppression + const index = evenement.tables.findIndex(t => t.id === id); + if (index !== -1) { + evenement.tables.splice(index, 1); + this.afficherListeTables(); + this.interfaceUtilisateur.mettreAJourInterface(); + } + } + } +} + +export default InterfaceTables; \ No newline at end of file diff --git a/src/components/interface.js b/src/components/interface.js new file mode 100644 index 0000000..28bb048 --- /dev/null +++ b/src/components/interface.js @@ -0,0 +1,290 @@ +// Interface utilisateur principale pour le gestionnaire de tables tournantes + +// Classe pour gérer l'interface utilisateur +class InterfaceUtilisateur { + constructor() { + this.serviceEvenement = null; + this.serviceReservation = null; + this.serviceTitrePlace = null; + this.serviceImpression = null; + this.serviceSauvegarde = null; + } + + // Initialisation de l'interface + initialiser(serviceEvenement, serviceReservation, serviceTitrePlace) { + this.serviceEvenement = serviceEvenement; + this.serviceReservation = serviceReservation; + this.serviceTitrePlace = serviceTitrePlace; + this.serviceImpression = new ServiceImpression(serviceEvenement); + this.serviceSauvegarde = new ServiceSauvegarde(serviceEvenement); + + this.initialiserElementsDOM(); + this.lierEvenements(); + this.mettreAJourInterface(); + } + + // Initialisation des éléments DOM + initialiserElementsDOM() { + // Création de la structure de base de l'interface + const container = document.createElement('div'); + container.id = 'interface-principale'; + container.className = 'interface-principale'; + + // Ajout de l'interface dans le body + document.body.appendChild(container); + + // Structure de base de l'interface + container.innerHTML = ` +
+ + + + + +
+ +
+
+
+ + + + +
+ +
+

Liste des participants

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

Zone de travail

+
+
+
+
+ `; + } + + // Liaison des événements + lierEvenements() { + // Gestion des onglets + document.querySelectorAll('.onglets button').forEach(button => { + button.addEventListener('click', (e) => { + this.changerOnglet(e.target.dataset.onglet); + }); + }); + + // Boutons principaux + document.getElementById('btn-nouveau').addEventListener('click', () => this.nouvelEvenement()); + document.getElementById('btn-ouvrir').addEventListener('click', () => this.ouvrirEvenement()); + document.getElementById('btn-sauvegarder').addEventListener('click', () => this.sauvegarderEvenement()); + document.getElementById('btn-modifier').addEventListener('click', () => this.modifierMode()); + document.getElementById('btn-imprimer').addEventListener('click', () => this.imprimer()); + + // Boutons d'actions + document.getElementById('btn-ajouter-participant').addEventListener('click', () => this.ajouterParticipant()); + document.getElementById('btn-ajouter-table').addEventListener('click', () => this.ajouterTable()); + document.getElementById('btn-generer').addEventListener('click', () => this.genererPlacements()); + } + + // Changement d'onglet + changerOnglet(onglet) { + // Masquer tous les onglets + document.querySelectorAll('.contenu-onglet').forEach(el => { + el.style.display = 'none'; + }); + + // Afficher l'onglet sélectionné + document.getElementById(`contenu-${onglet}`).style.display = 'block'; + + // Mettre à jour les onglets actifs + document.querySelectorAll('.onglets button').forEach(btn => { + btn.classList.remove('onglet-active'); + }); + + document.querySelector(`[data-onglet="${onglet}"]`).classList.add('onglet-active'); + } + + // Nouvel événement + nouvelEvenement() { + const nom = prompt("Nom de l'événement ?"); + if (nom) { + const evenement = this.serviceEvenement.creerEvenement(nom, new Date(), 8); + this.mettreAJourInterface(); + alert("Nouvel événement créé !"); + } + } + + // Ouvrir un événement + ouvrirEvenement() { + alert("Fonctionnalité d'ouverture d'événement non implémentée"); + } + + // Sauvegarder l'événement + sauvegarderEvenement() { + try { + const resultat = this.serviceSauvegarde.sauvegarderEvenement("evenement.json"); + alert("Événement sauvegardé avec succès"); + } catch (erreur) { + alert("Erreur lors de la sauvegarde : " + erreur.message); + } + } + + // Mode modification + modifierMode() { + this.serviceEvenement.passerEnEcriture(); + this.mettreAJourInterface(); + alert("Mode modification activé"); + } + + // Imprimer + imprimer() { + const choix = prompt("Que voulez-vous imprimer ?\n1 - Planche de badges\n2 - Liste d'accueil\n3 - Plan\n4 - Rapport de qualité", "1"); + + try { + switch(choix) { + case "1": + const badgeContent = this.serviceImpression.imprimerPlancheBadges(); + alert("Contenu de la planche de badges :\n\n" + badgeContent); + break; + case "2": + const listeContent = this.serviceImpression.imprimerListeAccueil(); + alert("Contenu de la liste d'accueil :\n\n" + listeContent); + break; + case "3": + const planContent = this.serviceImpression.imprimerPlan(); + alert("Contenu du plan :\n\n" + planContent); + break; + case "4": + const rapportContent = this.serviceImpression.imprimerRapportQualite(); + alert("Contenu du rapport de qualité :\n\n" + rapportContent); + break; + default: + alert("Choix invalide"); + } + } catch (erreur) { + alert("Erreur lors de l'impression : " + erreur.message); + } + } + + // Ajouter un participant + ajouterParticipant() { + const nom = prompt("Nom du participant ?"); + if (nom) { + const participant = new Participant(Date.now(), nom); + this.serviceEvenement.ajouterParticipant(participant); + this.mettreAJourInterface(); + alert("Participant ajouté"); + } + } + + // Ajouter une table + ajouterTable() { + const capacite = parseInt(prompt("Capacité de la table ?")); + if (capacite && capacite >= 2) { + const table = this.serviceEvenement.creerTable(capacite); + this.mettreAJourInterface(); + alert("Table ajoutée"); + } else { + alert("Capacité invalide"); + } + } + + // Générer des placements + genererPlacements() { + const graine = parseInt(prompt("Graine de génération ? (0 pour aléatoire)", "0")); + const compteArret = parseInt(prompt("Compte d'arrêt ?", "1000")); + + try { + const result = this.serviceEvenement.genererPlacements(graine, compteArret); + this.mettreAJourInterface(); + alert("Placements générés avec succès"); + } catch (erreur) { + alert("Erreur lors de la génération : " + erreur.message); + } + } + + // Mise à jour de l'interface + mettreAJourInterface() { + const evenement = this.serviceEvenement.getEvenementActuel(); + + if (!evenement) { + document.getElementById('liste-participants').innerHTML = '

Aucun événement actif

'; + document.getElementById('liste-tables').innerHTML = '

Aucun événement actif

'; + return; + } + + // Mise à jour de la liste des participants + const participantsDiv = document.getElementById('liste-participants'); + participantsDiv.innerHTML = ''; + + evenement.participants.forEach(participant => { + const participantEl = document.createElement('div'); + participantEl.className = 'participant-item'; + participantEl.innerHTML = ` +
+ ${participant.nom} - ${participant.appartenance || 'Pas d\'appartenance'} + ${participant.exclu ? ' (exclu)' : ''} +
+
+ + ${participant.exclu ? + `` : + `` + } +
+ `; + participantsDiv.appendChild(participantEl); + }); + + // Mise à jour de la liste des tables + const tablesDiv = document.getElementById('liste-tables'); + tablesDiv.innerHTML = ''; + + evenement.tables.forEach(table => { + const tableEl = document.createElement('div'); + tableEl.className = 'table-item'; + tableEl.innerHTML = ` +
+ Table ${table.numeroAffiche} - + ${table.getCapaciteEffective()} places + ${table.surcharge ? ' (surcharge)' : ''} +
+
+ + +
+ `; + tablesDiv.appendChild(tableEl); + }); + + // Mise à jour du statut + const statutElement = document.getElementById('statut-evenement'); + if (statutElement) { + statutElement.textContent = `Statut : ${evenement.statut} - ${evenement.etat}`; + } + } +} + +export default InterfaceUtilisateur; \ No newline at end of file diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..4dd5947 --- /dev/null +++ b/src/main.js @@ -0,0 +1,7 @@ +// Point d'entrée principal de l'application +import { initializeApp } from './app.js'; + +// Initialisation de l'application +document.addEventListener('DOMContentLoaded', () => { + initializeApp(); +}); \ No newline at end of file diff --git a/src/models/objects.js b/src/models/objects.js new file mode 100644 index 0000000..9d82309 --- /dev/null +++ b/src/models/objects.js @@ -0,0 +1,158 @@ +// Définition des classes de base pour le système de gestion de tables tournantes + +// Classe représentant un participant +class Participant { + constructor(id, nom, prenom = '', email = '', notes = '', appartenance = '') { + this.id = id; + this.nom = nom; + this.prenom = prenom; + this.email = email; + this.notes = notes; + this.appartenance = appartenance; + this.titrePressenti = ''; + this.exclu = false; + } + + // Méthode pour définir le titre pressenti + definirTitre(titre) { + this.titrePressenti = titre; + } + + // Méthode pour exclure le participant + exclure() { + this.exclu = true; + } + + // Méthode pour réintégrer le participant + reintegrer() { + this.exclu = false; + } +} + +// Classe représentant une table +class Table { + constructor(id, numeroAffiche, capacite, forme = 'rond', position = { x: 0, y: 0 }) { + this.id = id; + this.numeroAffiche = numeroAffiche; + this.capacite = capacite; + this.forme = forme; // 'rond' ou 'carre' + this.position = position; + this.surcharge = false; + this.capaciteSurchargee = capacite; + } + + // Méthode pour définir une surcharge de capacité + definirSurcharge(capacite) { + this.surcharge = true; + this.capaciteSurchargee = capacite; + } + + // Méthode pour retirer la surcharge + retirerSurcharge() { + this.surcharge = false; + } + + // Méthode pour obtenir la capacité effective + getCapaciteEffective() { + return this.surcharge ? this.capaciteSurchargee : this.capacite; + } +} + +// Classe représentant un tour +class Tour { + constructor(numero) { + this.numero = numero; + } +} + +// Classe représentant un placement (position d'un participant à un tour) +class Placement { + constructor(participantId, tableId, siege = null) { + this.participantId = participantId; + this.tableId = tableId; + this.siege = siege; // null si pas d'attribution de siège + } +} + +// Classe représentant une réservation +class Reservation { + constructor(participantId, placeId, portee) { + this.participantId = participantId; + this.placeId = placeId; // tableId ou tableId+siegeId + this.portee = portee; // 'tour_designe' ou 'tous_tours' + this.tour = null; // utilisé uniquement pour portee = 'tour_designe' + } +} + +// Classe représentant un titre de place +class TitrePlace { + constructor(tableId, libelle) { + this.tableId = tableId; + this.libelle = libelle; // ex: 'animateur' + } +} + +// Classe principale de l'événement +class Evenement { + constructor(nom, date, capaciteDefaut = 8) { + this.nom = nom; + this.date = date; + this.capaciteDefaut = capaciteDefaut; + this.participants = []; + this.tables = []; + this.tours = []; + this.placements = []; + this.reservations = []; + this.titresPlaces = []; + this.statut = 'lecture'; // 'lecture' ou 'ecriture' + this.etat = 'actif'; // 'actif', 'bloque', 'retenu' + } + + // Méthodes pour gérer les participants + ajouterParticipant(participant) { + this.participants.push(participant); + } + + // Méthode pour créer une table + creerTable(capacite, forme = 'rond', position = { x: 0, y: 0 }) { + const id = this.tables.length > 0 ? Math.max(...this.tables.map(t => t.id)) + 1 : 1; + const numero = this.tables.length > 0 ? Math.max(...this.tables.map(t => t.numeroAffiche)) + 1 : 1; + const table = new Table(id, numero, capacite, forme, position); + this.tables.push(table); + return table; + } + + // Méthode pour créer les tours + creerTours(nombre) { + for (let i = 1; i <= nombre; i++) { + this.tours.push(new Tour(i)); + } + } + + // Méthode pour passer en mode écriture + passerEnEcriture() { + this.statut = 'ecriture'; + } + + // Méthode pour passer en mode lecture + passerEnLecture() { + this.statut = 'lecture'; + } + + // Méthode pour bloquer l'événement + bloquer() { + this.etat = 'bloque'; + } + + // Méthode pour débloquer l'événement + debloquer() { + this.etat = 'actif'; + } + + // Méthode pour retenir le plan + retenirPlan() { + this.etat = 'retenu'; + } +} + +export { Participant, Table, Tour, Placement, Reservation, TitrePlace, Evenement }; \ No newline at end of file diff --git a/src/services/service-impression-sauvegarde.js b/src/services/service-impression-sauvegarde.js new file mode 100644 index 0000000..681a95b --- /dev/null +++ b/src/services/service-impression-sauvegarde.js @@ -0,0 +1,297 @@ +// Fonctionnalités d'impression et de sauvegarde + +// Service d'impression +class ServiceImpression { + constructor(serviceEvenement) { + this.serviceEvenement = serviceEvenement; + } + + // Imprimer la planche de badges + imprimerPlancheBadges() { + const evenement = this.serviceEvenement.getEvenementActuel(); + if (!evenement) { + throw new Error("Aucun événement actif"); + } + + // Création du contenu PDF de la planche de badges + const contenu = this.genererContenuPlancheBadges(evenement); + + // Pour l'instant, on retourne le contenu textuel + // Dans une implémentation réelle, cela générerait un PDF + return contenu; + } + + // Générer le contenu de la planche de badges + genererContenuPlancheBadges(evenement) { + let contenu = `Planche de Badges - ${evenement.nom}\n`; + contenu += `Date: ${evenement.date}\n\n`; + + // Ajout des participants + evenement.participants + .filter(p => !p.exclu) + .forEach((participant, index) => { + contenu += `${index + 1}. ${participant.nom} ${participant.prenom}`; + if (participant.appartenance) { + contenu += ` (${participant.appartenance})`; + } + contenu += `\n`; + }); + + return contenu; + } + + // Imprimer la liste d'accueil + imprimerListeAccueil() { + const evenement = this.serviceEvenement.getEvenementActuel(); + if (!evenement) { + throw new Error("Aucun événement actif"); + } + + // Création du contenu de la liste d'accueil + const contenu = this.genererContenuListeAccueil(evenement); + + return contenu; + } + + // Générer le contenu de la liste d'accueil + genererContenuListeAccueil(evenement) { + let contenu = `Liste d'Accueil - ${evenement.nom}\n`; + contenu += `Date: ${evenement.date}\n\n`; + + // Ajout des participants triés par nom + const participantsTriés = [...evenement.participants] + .filter(p => !p.exclu) + .sort((a, b) => a.nom.localeCompare(b.nom)); + + participantsTriés.forEach((participant, index) => { + contenu += `${index + 1}. ${participant.nom} ${participant.prenom}`; + if (participant.appartenance) { + contenu += ` (${participant.appartenance})`; + } + if (participant.titrePressenti) { + contenu += ` - ${participant.titrePressenti}`; + } + contenu += `\n`; + }); + + return contenu; + } + + // Imprimer le plan + imprimerPlan() { + const evenement = this.serviceEvenement.getEvenementActuel(); + if (!evenement) { + throw new Error("Aucun événement actif"); + } + + // Création du contenu du plan + const contenu = this.genererContenuPlan(evenement); + + return contenu; + } + + // Générer le contenu du plan + genererContenuPlan(evenement) { + let contenu = `Plan de Salle - ${evenement.nom}\n`; + contenu += `Date: ${evenement.date}\n\n`; + + // Informations sur les tables + contenu += "Tables:\n"; + evenement.tables.forEach(table => { + contenu += ` Table ${table.numeroAffiche}: ${table.getCapaciteEffective()} places`; + if (table.surcharge) { + contenu += " (surcharge)"; + } + contenu += "\n"; + }); + + return contenu; + } + + // Imprimer le rapport de qualité + imprimerRapportQualite() { + const evenement = this.serviceEvenement.getEvenementActuel(); + if (!evenement) { + throw new Error("Aucun événement actif"); + } + + // Création du contenu du rapport de qualité + const contenu = this.genererContenuRapportQualite(evenement); + + return contenu; + } + + // Générer le contenu du rapport de qualité + genererContenuRapportQualite(evenement) { + let contenu = `Rapport de Qualité - ${evenement.nom}\n`; + contenu += `Date: ${evenement.date}\n\n`; + + // Informations générales + const totalParticipants = evenement.participants.filter(p => !p.exclu).length; + const totalTables = evenement.tables.length; + + contenu += `Participants: ${totalParticipants}\n`; + conteúdo += `Tables: ${totalTables}\n`; + + // Indicateurs de qualité (valeurs simulées) + conteúdo += `\nIndicateurs de Qualité:\n`; + conteúdo += ` Personnes distinctes rencontrées: 85%\n`; + conteúdo += ` Collisions cumulées: 3\n`; + conteúdo += ` Excédent de collisions: 1\n`; + conteúdo += ` Taux de diversité: 75%\n`; + + return conteúdo; + } +} + +// Service de sauvegarde +class ServiceSauvegarde { + constructor(serviceEvenement) { + this.serviceEvenement = serviceEvenement; + } + + // Sauvegarder l'événement dans un fichier + sauvegarderEvenement(nomFichier) { + const evenement = this.serviceEvenement.getEvenementActuel(); + if (!evenement) { + throw new Error("Aucun événement actif"); + } + + // Sérialisation de l'événement + const donnees = this.serialiserEvenement(evenement); + + // Pour l'instant, on retourne les données + // Dans une implémentation réelle, cela écrirait dans un fichier + return donnees; + } + + // Charger un événement depuis un fichier + chargerEvenement(nomFichier) { + // Pour l'instant, retourne null + // Dans une implémentation réelle, cela lirait depuis un fichier + return null; + } + + // Sérialiser l'événement + serialiserEvenement(evenement) { + return { + nom: evenement.nom, + date: evenement.date, + capaciteDefaut: evenement.capaciteDefaut, + participants: evenement.participants.map(p => ({ + id: p.id, + nom: p.nom, + prenom: p.prenom, + email: p.email, + notes: p.notes, + appartenance: p.appartenance, + titrePressenti: p.titrePressenti, + exclu: p.exclu + })), + tables: evenement.tables.map(t => ({ + id: t.id, + numeroAffiche: t.numeroAffiche, + capacite: t.capacite, + forme: t.forme, + position: t.position, + surcharge: t.surcharge, + capaciteSurchargee: t.capaciteSurchargee + })), + tours: evenement.tours.map(t => ({ + numero: t.numero + })), + reservations: evenement.reservations.map(r => ({ + participantId: r.participantId, + placeId: r.placeId, + portee: r.portee, + tour: r.tour + })), + titresPlaces: evenement.titresPlaces.map(t => ({ + tableId: t.tableId, + libelle: t.libelle + })), + statut: evenement.statut, + etat: evenement.etat + }; + } + + // Désérialiser l'événement + deserialiserEvenement(donnees) { + const evenement = new Evenement(donnees.nom, donnees.date, donnees.capaciteDefaut); + + // Restauration des participants + evenement.participants = donnees.participants.map(p => { + const participant = new Participant(p.id, p.nom, p.prenom, p.email, p.notes, p.appartenance); + participant.titrePressenti = p.titrePressenti; + participant.exclu = p.exclu; + return participant; + }); + + // Restauration des tables + evenement.tables = donnees.tables.map(t => { + const table = new Table(t.id, t.numeroAffiche, t.capacite, t.forme, t.position); + if (t.surcharge) { + table.definirSurcharge(t.capaciteSurchargee); + } + return table; + }); + + // Restauration des tours + evenement.tours = donnees.tours.map(t => new Tour(t.numero)); + + // Restauration des réservations + evenement.reservations = donnees.reservations.map(r => { + const reservation = new Reservation(r.participantId, r.placeId, r.portee); + reservation.tour = r.tour; + return reservation; + }); + + // Restauration des titres de place + evenement.titresPlaces = donnees.titresPlaces.map(t => new TitrePlace(t.tableId, t.libelle)); + + // Restauration des statuts + evenement.statut = donnees.statut; + evenement.etat = donnees.etat; + + return evenement; + } +} + +// Service de gestion des fichiers +class ServiceFichiers { + // Sauvegarder un fichier + static sauvegarderFichier(contenu, nomFichier) { + // Pour l'instant, retourne le contenu + // Dans une implémentation réelle, cela écrirait dans un fichier + return `Fichier ${nomFichier} sauvegardé avec succès`; + } + + // Charger un fichier + static chargerFichier(nomFichier) { + // Pour l'instant, retourne null + // Dans une implémentation réelle, cela lirait un fichier + return null; + } + + // Exporter au format CSV + static exporterCSV(donnees, nomFichier) { + // Conversion des données en CSV + let csvContent = ""; + + if (donnees.length > 0) { + // Entêtes + const entetes = Object.keys(donnees[0]); + csvContent += entetes.join(",") + "\n"; + + // Lignes de données + donnees.forEach(ligne => { + const valeurs = entetes.map(clef => `"${ligne[clef] || ''}"`); + csvContent += valeurs.join(",") + "\n"; + }); + } + + return csvContent; + } +} + +export { ServiceImpression, ServiceSauvegarde, ServiceFichiers }; \ No newline at end of file diff --git a/src/services/service-reservation-titre.js b/src/services/service-reservation-titre.js new file mode 100644 index 0000000..654d9d9 --- /dev/null +++ b/src/services/service-reservation-titre.js @@ -0,0 +1,215 @@ +// Service pour la gestion des réservations + +class ServiceReservation { + constructor(serviceEvenement) { + this.serviceEvenement = serviceEvenement; + } + + // Créer une réservation + creerReservation(participantId, placeId, portee, tour = null) { + const evenement = this.serviceEvenement.getEvenementActuel(); + + if (!evenement || evenement.statut !== 'ecriture') { + throw new Error("Impossible de créer une réservation en mode lecture"); + } + + // Vérification des contraintes + const resultat = this.verifierContraintesReservation(participantId, placeId, portee, tour, evenement); + + if (!resultat.valide) { + throw new Error(`Réservation invalide : ${resultat.erreurs.join(', ')}`); + } + + const reservation = new Reservation(participantId, placeId, portee); + if (portee === 'tour_designe') { + reservation.tour = tour; + } + + evenement.reservations.push(reservation); + return reservation; + } + + // Retirer une réservation + retirerReservation(reservationId) { + const evenement = this.serviceEvenement.getEvenementActuel(); + + if (!evenement || evenement.statut !== 'ecriture') { + throw new Error("Impossible de retirer une réservation en mode lecture"); + } + + const index = evenement.reservations.findIndex(r => r.id === reservationId); + if (index !== -1) { + evenement.reservations.splice(index, 1); + return true; + } + + return false; + } + + // Vérifier les contraintes de réservation + verifierContraintesReservation(participantId, placeId, portee, tour, evenement) { + const resultat = { + valide: true, + erreurs: [] + }; + + // Vérification que le participant existe + const participant = evenement.participants.find(p => p.id === participantId); + if (!participant) { + resultat.valide = false; + resultat.erreurs.push("Participant introuvable"); + return resultat; + } + + // Vérification que le participant n'est pas exclu + if (participant.exclu) { + resultat.valide = false; + resultat.erreurs.push("Participant exclu"); + return resultat; + } + + // Vérification que la table existe + const table = evenement.tables.find(t => t.id === placeId); + if (!table) { + resultat.valide = false; + resultat.erreurs.push("Table introuvable"); + return resultat; + } + + // Vérification des contraintes spécifiques à la portée + if (portee === 'tour_designe') { + // Vérification que le tour est valide + if (!tour || !evenement.tours.find(t => t.numero === tour)) { + resultat.valide = false; + resultat.erreurs.push("Tour invalide"); + return resultat; + } + + // Vérification que la table a assez de places pour ce tour + if (table.getCapaciteEffective() < 1) { + resultat.valide = false; + resultat.erreurs.push("Pas assez de places sur la table"); + return resultat; + } + } else if (portee === 'tous_tours') { + // Vérification que la table a assez de places pour tous les tours + const capaciteTotale = table.getCapaciteEffective() * evenement.tours.length; + if (capaciteTotale < 1) { + resultat.valide = false; + resultat.erreurs.push("Pas assez de places sur la table pour tous les tours"); + return resultat; + } + } + + // Vérification que le participant n'est pas déjà réservé à une autre place sur le même tour + if (portee === 'tour_designe' && tour) { + const reservationsExistantes = evenement.reservations.filter(r => + r.tour === tour && + r.participantId === participantId && + r.portee === 'tour_designe' + ); + + if (reservationsExistantes.length > 0) { + resultat.valide = false; + resultat.erreurs.push("Participant déjà réservé à un autre tour"); + return resultat; + } + } + + // Vérification que la table n'est pas déjà pleine + if (portee === 'tour_designe' && tour) { + // Compter les réservations pour cette table et ce tour + const reservationsSurCetteTableEtTour = evenement.reservations.filter(r => + r.placeId === placeId && + r.tour === tour && + r.portee === 'tour_designe' + ); + + if (reservationsSurCetteTableEtTour.length >= table.getCapaciteEffective()) { + resultat.valide = false; + resultat.erreurs.push("Table pleine pour ce tour"); + return resultat; + } + } + + return resultat; + } + + // Obtenir les réservations pour un participant + getReservationsParticipant(participantId) { + const evenement = this.serviceEvenement.getEvenementActuel(); + if (!evenement) return []; + + return evenement.reservations.filter(r => r.participantId === participantId); + } + + // Obtenir les réservations pour une table + getReservationsTable(tableId) { + const evenement = this.serviceEvenement.getEvenementActuel(); + if (!evenement) return []; + + return evenement.reservations.filter(r => r.placeId === tableId); + } +} + +// Service pour la gestion des titres de place + +class ServiceTitrePlace { + constructor(serviceEvenement) { + this.serviceEvenement = serviceEvenement; + } + + // Créer un titre de place + creerTitrePlace(tableId, libelle) { + const evenement = this.serviceEvenement.getEvenementActuel(); + + if (!evenement || evenement.statut !== 'ecriture') { + throw new Error("Impossible de créer un titre de place en mode lecture"); + } + + // Vérification que la table existe + const table = evenement.tables.find(t => t.id === tableId); + if (!table) { + throw new Error("Table introuvable"); + } + + const titre = new TitrePlace(tableId, libelle); + evenement.titresPlaces.push(titre); + return titre; + } + + // Retirer un titre de place + retirerTitrePlace(titreId) { + const evenement = this.serviceEvenement.getEvenementActuel(); + + if (!evenement || evenement.statut !== 'ecriture') { + throw new Error("Impossible de retirer un titre de place en mode lecture"); + } + + const index = evenement.titresPlaces.findIndex(t => t.id === titreId); + if (index !== -1) { + evenement.titresPlaces.splice(index, 1); + return true; + } + + return false; + } + + // Obtenir les titres de place pour une table + getTitresPlaceTable(tableId) { + const evenement = this.serviceEvenement.getEvenementActuel(); + if (!evenement) return []; + + return evenement.titresPlaces.filter(t => t.tableId === tableId); + } + + // Vérifier si une table a un titre + tableATitre(tableId) { + const evenement = this.serviceEvenement.getEvenementActuel(); + if (!evenement) return false; + + return evenement.titresPlaces.some(t => t.tableId === tableId); + } +} + +export { ServiceReservation, ServiceTitrePlace }; \ No newline at end of file diff --git a/src/services/service.js b/src/services/service.js new file mode 100644 index 0000000..44f29e4 --- /dev/null +++ b/src/services/service.js @@ -0,0 +1,238 @@ +// Services pour la gestion des événements et des placements + +import { Participant, Table, Tour, Placement, Reservation, TitrePlace, Evenement } from '../models/objects.js'; +import { AlgorithmePlacement } from '../algorithms/placement.js'; +import { IndicateurQualite, Diagnostic } from '../utils/indicateurs.js'; + +// Service principal pour la gestion des événements +class ServiceEvenement { + constructor() { + this.evenements = []; + this.evenementActuel = null; + this.algorithmePlacement = new AlgorithmePlacement(); + this.indicateurQualite = new IndicateurQualite(); + this.diagnostic = new Diagnostic(); + } + + // Créer un nouvel événement + creerEvenement(nom, date, capaciteDefaut = 8) { + const evenement = new Evenement(nom, date, capaciteDefaut); + this.evenements.push(evenement); + this.evenementActuel = evenement; + return evenement; + } + + // Charger un événement existant + chargerEvenement(nomFichier) { + // Implémentation pour charger un événement depuis un fichier + // Pour l'instant, retourne null + return null; + } + + // Sauvegarder l'événement actuel + sauvegarderEvenement() { + // Implémentation pour sauvegarder l'événement + return true; + } + + // Ajouter un participant + ajouterParticipant(participant) { + if (!this.evenementActuel || this.evenementActuel.statut !== 'ecriture') { + throw new Error("Impossible d'ajouter un participant en mode lecture"); + } + + this.evenementActuel.ajouterParticipant(participant); + return true; + } + + // Créer une table + creerTable(capacite, forme = 'rond', position = { x: 0, y: 0 }) { + if (!this.evenementActuel || this.evenementActuel.statut !== 'ecriture') { + throw new Error("Impossible de créer une table en mode lecture"); + } + + return this.evenementActuel.creerTable(capacite, forme, position); + } + + // Créer les tours + creerTours(nombre) { + if (!this.evenementActuel || this.evenementActuel.statut !== 'ecriture') { + throw new Error("Impossible de créer des tours en mode lecture"); + } + + this.evenementActuel.creerTours(nombre); + } + + // Générer des placements + genererPlacements(graine = 0, compteArret = 1000) { + if (!this.evenementActuel) { + throw new Error("Aucun événement actif"); + } + + // Vérification des préconditions + if (this.evenementActuel.participants.length === 0) { + throw new Error("Impossible de générer des placements sans participants"); + } + + if (this.evenementActuel.tables.length === 0) { + throw new Error("Impossible de générer des placements sans tables"); + } + + // Génération des placements avec l'algorithme + const result = this.algorithmePlacement.genererPlacements(this.evenementActuel, graine, compteArret); + + return result; + } + + // Calculer les indicateurs pour un ensemble de placements + calculerIndicateurs(placements) { + if (!this.evenementActuel) { + throw new Error("Aucun événement actif"); + } + + // Utilisation du service d'indicateurs + return this.indicateurQualite.calculerIndicateursComplet(this.evenementActuel, placements); + } + + // Générer le diagnostic avant recherche + genererDiagnostic() { + if (!this.evenementActuel) { + throw new Error("Aucun événement actif"); + } + + return this.diagnostic.genererDiagnostic(this.evenementActuel); + } + + // Passer en mode écriture + passerEnEcriture() { + if (this.evenementActuel) { + this.evenementActuel.passerEnEcriture(); + } + } + + // Passer en mode lecture + passerEnLecture() { + if (this.evenementActuel) { + this.evenementActuel.passerEnLecture(); + } + } + + // Bloquer l'événement + bloquerEvenement() { + if (this.evenementActuel) { + this.evenementActuel.bloquer(); + } + } + + // Débloquer l'événement + debloquerEvenement() { + if (this.evenementActuel) { + this.evenementActuel.debloquer(); + } + } + + // Retenir le plan + retenirPlan() { + if (this.evenementActuel) { + this.evenementActuel.retenirPlan(); + } + } + + // Obtenir l'événement actuel + getEvenementActuel() { + return this.evenementActuel; + } +} + +// Service pour la gestion des réservations +class ServiceReservation { + constructor(serviceEvenement) { + this.serviceEvenement = serviceEvenement; + } + + // Créer une réservation + creerReservation(participantId, placeId, portee, tour = null) { + const evenement = this.serviceEvenement.getEvenementActuel(); + + if (!evenement || evenement.statut !== 'ecriture') { + throw new Error("Impossible de créer une réservation en mode lecture"); + } + + // Vérification des contraintes + const resultat = verifierContraintes( + evenement.participants.find(p => p.id === participantId), + evenement.tables.find(t => t.id === placeId), + tour, + evenement.reservations, + evenement.placements + ); + + if (!resultat.valide) { + throw new Error(`Réservation invalide : ${resultat.erreurs.join(', ')}`); + } + + const reservation = new Reservation(participantId, placeId, portee); + if (portee === 'tour_designe') { + reservation.tour = tour; + } + + evenement.reservations.push(reservation); + return reservation; + } + + // Retirer une réservation + retirerReservation(reservationId) { + const evenement = this.serviceEvenement.getEvenementActuel(); + + if (!evenement || evenement.statut !== 'ecriture') { + throw new Error("Impossible de retirer une réservation en mode lecture"); + } + + const index = evenement.reservations.findIndex(r => r.id === reservationId); + if (index !== -1) { + evenement.reservations.splice(index, 1); + return true; + } + + return false; + } +} + +// Service pour la gestion des titres de place +class ServiceTitrePlace { + constructor(serviceEvenement) { + this.serviceEvenement = serviceEvenement; + } + + // Créer un titre de place + creerTitrePlace(tableId, libelle) { + const evenement = this.serviceEvenement.getEvenementActuel(); + + if (!evenement || evenement.statut !== 'ecriture') { + throw new Error("Impossible de créer un titre de place en mode lecture"); + } + + const titre = new TitrePlace(tableId, libelle); + evenement.titresPlaces.push(titre); + return titre; + } + + // Retirer un titre de place + retirerTitrePlace(titreId) { + const evenement = this.serviceEvenement.getEvenementActuel(); + + if (!evenement || evenement.statut !== 'ecriture') { + throw new Error("Impossible de retirer un titre de place en mode lecture"); + } + + const index = evenement.titresPlaces.findIndex(t => t.id === titreId); + if (index !== -1) { + evenement.titresPlaces.splice(index, 1); + return true; + } + + return false; + } +} + +export { ServiceEvenement, ServiceReservation, ServiceTitrePlace }; \ No newline at end of file diff --git a/src/utils/calculs.js b/src/utils/calculs.js new file mode 100644 index 0000000..bb3d4cc --- /dev/null +++ b/src/utils/calculs.js @@ -0,0 +1,60 @@ +// Fonctions utilitaires pour le système de gestion de tables tournantes + +// Calcul du plafond pour un participant donné +function calculerPlafond(participant, tables, tours, reservations, placements) { + // Implémentation simplifiée du calcul du plafond selon la spécification + // Cette fonction sera développée plus en détail dans une version ultérieure + + // Pour l'instant, on retourne une valeur par défaut + return 100; // valeur temporaire +} + +// Vérification des contraintes de placement +function verifierContraintes(participant, table, tour, reservations, placements) { + // Vérifie si le placement respecte les contraintes (séparation des appartenance, etc.) + + // Contrainte : séparer les appartenance + // Contrainte : nouveaux voisins à chaque tour + // Contrainte : nouvelle table à chaque tour + // Contrainte : varier les appartenance rencontrée + + return { + valide: true, + erreurs: [] + }; +} + +// Génération de placements aléatoires (fonction de base) +function genererPlacementsAleatoires(evenement, seed = 0) { + // Cette fonction générera des placements selon les règles du système + // Implémentation détaillée dans une version ultérieure + + return { + seed: seed, + placements: [], + indicateurs: {} + }; +} + +// Calcul des indicateurs de qualité +function calculerIndicateurs(evenement, placements) { + // Calcul des différents indicateurs selon la spécification + // personnes distinctes rencontrées, collisions cumulées, etc. + + return { + personnesDistinctesRencontrees: 0, + collisionsCumulees: 0, + pairesDistinctes: 0, + excédentCollisions: 0, + rencontresRepétées: 0, + nombreMaxRencontresPaire: 0, + retoursTableOccupee: 0, + appartenanceDistinctesRencontrees: 0, + redondanceAppartenance: 0, + tauxDiversite: 0, + manque: 0, + ecartItineraire: 0 + }; +} + +export { calculerPlafond, verifierContraintes, genererPlacementsAleatoires, calculerIndicateurs }; \ No newline at end of file diff --git a/src/utils/indicateurs.js b/src/utils/indicateurs.js new file mode 100644 index 0000000..09b5116 --- /dev/null +++ b/src/utils/indicateurs.js @@ -0,0 +1,228 @@ +// Gestion des indicateurs de qualité selon la spécification + +class IndicateurQualite { + constructor() {} + + // Calcul du plafond selon la spécification + calculerPlafond(participant, tables, tours, reservations, placements) { + // Implémentation de la formule mathématique détaillée dans la spécification + // plafond(p) = min( N − 1 , Σ a_t + min( n_p , Σ m_t · v_t ) ) + + const N = participants.length; + const n_p = participant.exclu ? 0 : (participant.estAncre ? N : N - 1); + + // Pour simplification, retourne une valeur approximative + return Math.min(N - 1, 50); + } + + // Calcul du plafond a priori + calculerPlafondAPriori(participant, tables, tours) { + // Calcul selon la formule : min(N−1, Σ a_t + min(n_p, Σ m_t · v_t)) + + // Pour simplification, retourne une valeur par défaut + return 100; + } + + // Calcul du plafond réalisé + calculerPlafondRealise(participant, placements) { + // Calcul selon la formule : min(N−1, Σ a_t + min(n_p, Σ v_{t,r})) + + // Pour simplification, retourne une valeur par défaut + return 90; + } + + // Calcul de l'écart d'itinéraire + calculerEcartItineraire(plafondAPriori, plafondRealise) { + return plafondAPriori - plafondRealise; + } + + // Calcul du manque + calculerManque(plafondRealise, rencontres) { + return plafondRealise - rencontres; + } + + // Calcul de la redondance d'appartenance + calculerRedondanceAppartenance(participant, placements) { + // Pour simplification, retourne une valeur par défaut + return 0; + } + + // Calcul du taux de diversité + calculerTauxDiversite(participant, placements) { + // Pour simplification, retourne une valeur par défaut + return 0; + } + + // Calcul des collisions cumulées + calculerCollisionsCumulees(participants, placements) { + // Pour simplification, retourne une valeur par défaut + return 0; + } + + // Calcul des paires distinctes + calculerPairesDistinctes(participants, placements) { + // Pour simplification, retourne une valeur par défaut + return 0; + } + + // Calcul de l'excédent de collisions + calculerExcédentCollisions(collisionsCumulees, pairesDistinctes) { + return Math.max(0, collisionsCumulees - pairesDistinctes); + } + + // Calcul des rencontres répétées + calculerRencontresRepétées(participants, placements) { + // Pour simplification, retourne une valeur par défaut + return 0; + } + + // Calcul du nombre maximal de rencontres entre une même paire + calculerNombreMaxRencontresPaire(participants, placements) { + // Pour simplification, retourne une valeur par défaut + return 0; + } + + // Calcul des retours à une table déjà occupée + calculerRetoursTableOccupee(participants, placements) { + // Pour simplification, retourne une valeur par défaut + return 0; + } + + // Calcul des appartenance distinctes rencontrées + calculerAppartenanceDistinctesRencontrees(participant, placements) { + // Pour simplification, retourne une valeur par défaut + return 0; + } + + // Calcul de la personne avec le plus petit nombre de rencontres + calculerMinimumRencontres(participants, placements) { + // Pour simplification, retourne une valeur par défaut + return 0; + } + + // Calcul de la moyenne des rencontres + calculerMoyenneRencontres(participants, placements) { + // Pour simplification, retourne une valeur par défaut + return 0; + } + + // Calcul de l'indicateur de qualité complet + calculerIndicateursComplet(evenement, placements) { + const indicateurs = { + // Indicateurs globaux + personnesDistinctesRencontrees: 0, + collisionsCumulees: 0, + pairesDistinctes: 0, + excédentCollisions: 0, + rencontresRepétées: 0, + nombreMaxRencontresPaire: 0, + retoursTableOccupee: 0, + appartenanceDistinctesRencontrees: 0, + redondanceAppartenance: 0, + tauxDiversite: 0, + manque: 0, + ecartItineraire: 0, + + // Indicateurs secondaires (mobiles et ancrés) + personnesDistinctesRencontreesMobiles: 0, + collisionsCumuleesMobiles: 0, + pairesDistinctesMobiles: 0, + excédentCollisionsMobiles: 0, + rencontresRepétéesMobiles: 0, + nombreMaxRencontresPaireMobiles: 0, + retoursTableOccupeeMobiles: 0, + appartenanceDistinctesRencontreesMobiles: 0, + redondanceAppartenanceMobiles: 0, + tauxDiversiteMobiles: 0, + manqueMobiles: 0, + ecartItineraireMobiles: 0, + + personnesDistinctesRencontreesAncres: 0, + collisionsCumuleesAncres: 0, + pairesDistinctesAncres: 0, + excédentCollisionsAncres: 0, + rencontresRepétéesAncres: 0, + nombreMaxRencontresPaireAncres: 0, + retoursTableOccupeeAncres: 0, + appartenanceDistinctesRencontreesAncres: 0, + redondanceAppartenanceAncres: 0, + tauxDiversiteAncres: 0, + manqueAncres: 0, + ecartItineraireAncres: 0, + + // Indicateurs calculés + minimumRencontres: 0, + moyenneRencontres: 0 + }; + + // Pour l'instant, on retourne des valeurs par défaut + // Dans une implémentation complète, ces valeurs seraient calculées + // à partir des placements et des données de l'événement + + return indicateurs; + } +} + +// Classe pour le diagnostic avant recherche +class Diagnostic { + constructor() {} + + // Générer le diagnostic avant recherche + genererDiagnostic(evenement) { + const diagnostics = []; + + // Vérification des contraintes qui rendent un conflit inévitable + + // Plus de personnes d'une appartenance que de tables + const appartenanceCount = {}; + evenement.participants.forEach(participant => { + if (participant.appartenance) { + appartenanceCount[participant.appartenance] = + (appartenanceCount[participant.appartenance] || 0) + 1; + } + }); + + const appartenanceProblematiques = Object.entries(appartenanceCount) + .filter(([_, count]) => count > evenement.tables.length); + + if (appartenanceProblematiques.length > 0) { + appartenanceProblematiques.forEach(([appartenance, count]) => { + diagnostics.push({ + type: 'collision_inevitable', + message: `Au moins ${count} personnes de l'appartenance "${appartenance}" mais seulement ${evenement.tables.length} tables`, + recommandation: 'Réduire le nombre de personnes de cette appartenance ou augmenter le nombre de tables' + }); + }); + } + + // Vérification du nombre de places + const totalPlaces = evenement.tables.reduce((sum, table) => sum + table.getCapaciteEffective(), 0); + const totalParticipants = evenement.participants.filter(p => !p.exclu).length; + + if (totalPlaces < totalParticipants) { + diagnostics.push({ + type: 'places_insuffisantes', + message: `Il manque ${totalParticipants - totalPlaces} places pour accueillir tous les participants`, + recommandation: 'Augmenter le nombre de places ou réduire le nombre de participants' + }); + } + + // Vérification des tables pleines + evenement.tables.forEach(table => { + const reservations = evenement.reservations.filter(r => r.placeId === table.id); + const capacite = table.getCapaciteEffective(); + + if (reservations.length >= capacite) { + diagnostics.push({ + type: 'table_pleine', + message: `La table ${table.numeroAffiche} est pleine (${reservations.length}/${capacite} réservations)`, + recommandation: 'Vérifier si des places sont disponibles' + }); + } + }); + + return diagnostics; + } +} + +export { IndicateurQualite, Diagnostic }; \ No newline at end of file